const fst="modulepreload",bst=function(t,e){return new URL(t,e).href},VAe={},ye=function(e,n,a){let r=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");r=Promise.allSettled(n.map(u=>{if(u=bst(u,a),u in VAe)return;VAe[u]=!0;const d=u.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!a)for(let g=o.length-1;g>=0;g--){const h=o[g];if(h.href===u&&(!d||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${p}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":fst,d||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),d)return new Promise((g,h)=>{m.addEventListener("load",g),m.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return r.then(o=>{for(const s of o||[])s.status==="rejected"&&i(s.reason);return e().catch(i)})},yst=` SocratiQ

SocratiQ

What is SocratiQ?

SocratiQ is an AI Generative Learning Assistant, designed to make learning more efficient, engaging and accessible. We welcome your Feedback. Learn more about SocratiQ.
1 2 3

Information provided here may not always be accurate. Provide feedback

Press Ctrl + / to open chat
Disconnected
`,wst=` /* SIMPLE THEME SYSTEM - NO !important */ :host, .socratiq-widget-root { --socratiq-text: #1f2328; /* Light theme default: dark text */ --socratiq-bg: #ffffff; --socratiq-muted: #4c566a; --socratiq-border: #d0d7de; --socratiq-hover: #f6f8fa; --socratiq-accent: #0969da; --socratiq-accent-bg: #dbeafe; --socratiq-accent-hover: #bfdbfe; color: var(--socratiq-text); background: var(--socratiq-bg); } :host([data-socratiq-theme="dark"]), .socratiq-widget-root[data-socratiq-theme="dark"] { --socratiq-text: #e6edf3; /* Dark theme: light text */ --socratiq-bg: #0d1117; --socratiq-muted: #9ca3af; --socratiq-border: #30363d; --socratiq-hover: #21262d; --socratiq-accent: #58a6ff; --socratiq-accent-bg: #1f2937; --socratiq-accent-hover: #374151; } #text-selection-menu{ z-index: 9999; position: fixed; } /* If the icons class is for SVGs within the buttons, adjust their size here */ .icons { width: 24px; /* Adjust SVG size as needed */ height: 24px; /* Adjust SVG size as needed */ margin: auto; } .icon-tiny { width: 12px; /* Adjust SVG size as needed */ height: 12px; /* Adjust SVG size as needed */ } .icons-left { width: 24px; /* Adjust SVG size as needed */ height: 24px; /* Adjust SVG size as needed */ } /* */ /* Basic table styles */ table { width: 100%; /* Full-width */ border-collapse: collapse; /* Collapse borders */ margin: 20px 0; /* Add some margin around the table */ font-size: 0.9em; /* Adjust font size */ font-family: Arial, sans-serif; /* Use a nice font-family */ box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); /* Slight shadow around table */ } /* Table headers */ th { background-color: #009879; /* A nice green background */ color: #ffffff; /* White text color */ text-align: left; /* Align text to the left */ padding: 12px 15px; /* Add some padding */ } /* Table cells */ td { padding: 12px 15px; /* Add some padding */ border-bottom: 1px solid #dddddd; /* A light border for each cell */ } /* Table row hover effect */ tr:nth-of-type(even) { background-color: #f3f3f3; /* Light grey background for even rows */ } tr:hover { background-color: #f1f1f1; /* Slightly different grey for hover effect */ } /* Responsive tables */ @media screen and (max-width: 600px) { table { width: 100%; display: block; overflow-x: auto; /* Enable horizontal scrolling on small devices */ } } /* iframe */ /* body { margin: 0; padding: 0; } */ /* .iframe-container { position: relative; background-color: transparent ; max-width: 200px; border: none; max-height: fit-content; overflow: hidden; border: 2px solid black; overflow: visible; max-height: 300px; overflow-y: auto; box-sizing: border-box; background-color: #fff; } */ #markdown-preview { /* min-width: 50px; */ width: 100%; background-color: #fff; overflow: visible; /* Let it expand */ /* hide any overflow initially */ transition: height 0.3s ease-out, opacity 0.3s ease-out; /* Add opacity to the transition *//* animate height changes */ padding: 4px; word-wrap: break-word; word-break: break-word; overflow-wrap: break-word; } /* Force proper text wrapping for pre elements */ #markdown-preview pre, #markdown-preview pre.dark-mode { white-space: pre-wrap !important; word-wrap: break-word !important; word-break: break-word !important; overflow-wrap: break-word !important; max-width: 100% !important; } #markdown-preview pre[style*="white-space: normal"] { white-space: pre-wrap !important; } /* Override any inline white-space styles on pre elements */ #markdown-preview pre[style*="white-space"] { white-space: pre-wrap !important; } /* Ensure code elements inside pre also wrap properly */ #markdown-preview pre code { white-space: pre-wrap !important; word-wrap: break-word !important; word-break: break-word !important; overflow-wrap: break-word !important; } /* Handle dark-mode pre elements specifically */ #markdown-preview pre.dark-mode, #markdown-preview pre.dark-mode code { white-space: pre-wrap !important; word-wrap: break-word !important; word-break: break-word !important; overflow-wrap: break-word !important; max-width: 100% !important; } .iframe-container .markdown-preview { border: none; max-height: 300px; /* set maximum height */ overflow-y: auto; /* show scrollbars when needed */ } .button-row{ display: flex; justify-content: last baseline; gap: 10px; flex-direction: row; background-color: transparent; } #quiz-form { margin-bottom: 1rem; /* Tailwind class mb-4 */ } #submit-quiz-btn { margin-top: 1rem; /* Tailwind class mt-4 */ width: 100%; /* Tailwind class w-full */ background-color: black; /* Tailwind class bg-blue-500 */ color: white; /* Tailwind class text-white */ padding: 0.5rem 1rem; /* Tailwind classes px-4 py-2 */ border-radius: 0.25rem; /* Tailwind class rounded */ transition: background-color 0.2s; /* Tailwind hover state */ margin-bottom: 10px; } #submit-quiz-btn:hover { background-color: #2779bd; /* Tailwind class hover:bg-blue-600 */ } .submit-quiz-btn { margin-top: 1rem; /* Tailwind class mt-4 */ width: 100%; /* Tailwind class w-full */ background-color: black; /* Tailwind class bg-blue-500 */ color: white; /* Tailwind class text-white */ padding: 0.5rem 1rem; /* Tailwind classes px-4 py-2 */ border-radius: 0.25rem; /* Tailwind class rounded */ transition: background-color 0.2s; /* Tailwind hover state */ margin-bottom: 10px; } .submit-quiz-btn:hover { background-color: #2779bd; /* Tailwind class hover:bg-blue-600 */ } #quiz form{ display: block; /* flex-direction: column; */ box-shadow: 0 0 0px 0 rgba(0, 0, 0, 0.1); } #quiz h4 { font-size: 16px; /* Change this value to adjust the font size */ } #quiz ul { list-style-type: none; } #result { margin-top: 1rem; /* Tailwind class mt-4 */ text-align: center; /* Tailwind class text-center */ } details > .spoiler-content, details > p, details > em { color: black; font-style: normal !important; /* This will override other styles unless they also use !important */ } /* .correct-answer::after { content: '✅'; color: green; margin-right: 8px; } */ .wrong-answer::after { content: '❌'; color: #f87171; margin-left: 8px; } /* Style adjustments */ .icon-button { cursor: pointer; padding: 10px 20px; background-color: #000; /* Make buttons black */ color: #fff; /* Text color white for contrast */ border: none; border-radius: 5px; margin: 20px; } /* ///////////////////////////////////////////////////////////////////// */ /* General styles for the slider */ input[type=range] { -webkit-appearance: none; /* Override default CSS styles */ appearance: none; width: 100%; /* Full-width */ height: 5px; /* Specified height */ background: black; /* Black track */ outline: none; /* Remove outline */ opacity: 0.7; /* Partial transparency */ transition: opacity .2s; /* Transition for the slider */ } /* Initially hide the popup div */ /* Show the popup div when hovering over the button or the popup div itself */ .hover-btn:hover + .popup-content, .popup-content:hover { visibility: visible; opacity: 1; transition-delay: 0s; /* Make popup appear immediately */ } /* Style for Webkit browsers like Chrome, Safari */ input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; /* Override default CSS styles */ appearance: none; width: 25px; /* Width of the thumb */ height: 25px; /* Height of the thumb */ background: black; /* Black thumb */ cursor: pointer; /* Cursor on hover */ } /* Style for Mozilla Firefox */ input[type=range]::-moz-range-thumb { width: 25px; /* Width of the thumb */ height: 25px; /* Height of the thumb */ background: black; /* Black thumb */ cursor: pointer; /* Cursor on hover */ } /* Style for the focus state */ input[type=range]:focus { outline: none; /* Remove the outline */ } /* Additional style for the focus state on Webkit browsers */ input[type=range]:focus::-webkit-slider-thumb { background: #333; /* Darker shade when focused */ } /* Additional style for the focus state on Mozilla Firefox */ input[type=range]:focus::-moz-range-thumb { background: #333; /* Darker shade when focused */ } /* Show the popup div on hover */ .hover-btn:hover + .popup-content, .popup-content:hover { display: block; } /* Style for the slider */ .slider { width: 100%; margin: 20px 0; } /* Slider labels */ .slider-labels { display: flex; justify-content: space-between; } /* Style adjustments for checkboxes */ .checkbox-container { margin: 10px 0; } /* Making the icons black, assuming SVG icons */ .icon-button img { filter: brightness(0) invert(0); /* A general way to make images black */ } .icon-button { color: white; margin: auto; } .button-and-popup-container { position: relative; display: inline-block; /* Or any other display type that suits your layout */ } .settings-button:hover + .popup-content, .popup-content:hover { visibility: visible; /* Show the popup */ opacity: 1; transition: opacity 0.5s ease; transition-delay: 0s; /* React immediately when hovered */ } /* Initially hide the modal */ .modal { display: none; position: fixed; z-index: 100; left: 50%; top: 50%; padding: 10px; width: 400px; height: fit-content; transform: translate(-50%, -50%); /* Center the modal */ /* overflow: auto; */ /* background-color: rgba(0, 0, 0, 0.4); */ } /* #popover-container { position: fixed; z-index: 1000; top: 50%; left: 50%; transform: translate(-50%, -50%); } */ #popover-container .overflow-auto { max-height: 250px; overflow: auto; } /* Modal Content */ .modal-content { background-color: #fefefe; margin: 15% auto; padding: 20px; /* border: 1px solid #888; */ width: 80%; } /* The Close Button */ .close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeOutDown { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } } .animate-fadeInUp { animation: fadeInUp 0.5s ease-out forwards; } .animate-fadeOutDown { animation: fadeOutDown 0.5s ease-out forwards; } .rotate-180 { transform: rotate(180deg); } /* #enter-btn { top: -0.3rem; } */ #enter-btn { transition: transform 0.2s ease, color 0.2s ease; } #enter-btn:hover { transform: translateY(-50%) scale(1.1); color: #3b82f6; /* Tailwind's blue-500 */ } #enter-btn svg { transition: transform 0.2s ease; } #enter-btn:hover svg { transform: rotate(-45deg) scale(1.1); } /* HEADINGS LISTS */ /* Overriding Tailwind styles with higher specificity */ /* For headers */ h1 { font-size: 2rem; font-weight: 700; } h2 { font-size: 1.5rem; font-weight: 600; } /* ... include your other styles ... */ /* For unordered lists */ ul { list-style-type: disc; padding-left: 1.5rem; } /* For ordered lists */ ol { list-style-type: decimal; padding-left: 1.5rem; } /* For list items */ li { margin-bottom: 0.5rem; } ul, ol { list-style-type: none; /* Removes the default list-style */ padding: 0; /* Removes the default padding */ margin: 0; /* Removes the default margin */ } /* LIGHT MODE // / // DARK MODE */ .dark-mode { /* --background-color: #1e1e1e; */ --text-color: black; /* --border-color: #333; */ --link-color: #4ea0f6; /* --secondary-background-color: #2a2a2a; */ } .dark-mode { /* background-color: var(--background-color); */ color: var(--text-color); } .dark-mode a { color: var(--link-color); } .dark-mode .secondary-background { /* background-color: var(--secondary-background-color); */ } .dark-mode .bordered { /* border: 1px solid var(--border-color); */ } .light-mode { --background-color: #ffffff; --text-color: #333333; --border-color: #ddd; --link-color: #007bff; --secondary-background-color: #f9f9f9; } .light-mode { background-color: var(--background-color); color: var(--text-color); } .light-mode a { color: var(--link-color); } .light-mode .secondary-background { background-color: var(--secondary-background-color); } .light-mode .bordered { border: 1px solid var(--border-color); } .icon-mini { height: 1rem; width: 1rem; } /* Add the CSS class for the button */ .followup-button { cursor: pointer; /* Optional: Changes the mouse cursor on hover */ } /* Define the hover state for the button */ .followup-button:hover { color: purple; /* Change text color to purple on hover */ } #menu-toggle:checked~label { background-color: #2563eb; /* Darker shade for active state */ } #input-container { position: relative; } #copy-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; padding: 8px; border-radius: 4px; } .input-wrapper { position: relative; width: 100%; } #user-input { width: 100%; padding-right: 2.5rem; /* Space for the send button */ } #enter-btn { position: absolute; /* top: 50%; */ top: 46%; transform: translateY(-50%); /* Center vertically */ display: flex; align-items: center; } #copy-container.hidden { display: none !important; /* Hide copy-container when no items are present */ } @keyframes inner-pulse { 0% { box-shadow: inset 0 0 10px rgba(0, 123, 255, 0.7), inset 0 0 20px rgba(0, 123, 255, 0.5); } 50% { box-shadow: inset 0 0 15px rgba(0, 123, 255, 1), inset 0 0 30px rgba(0, 123, 255, 0.8); } 100% { box-shadow: inset 0 0 10px rgba(0, 123, 255, 0.7), inset 0 0 20px rgba(0, 123, 255, 0.5); } } .pulse-effect { animation: inner-pulse 1.5s ease-in-out infinite; border-radius: 6px; } #context-button { margin-left: 8px; /* context button */ position: relative; background: transparent; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; margin-top: 8px; margin-bottom: 8px; /* background-color: white; */ padding: 4px; /* border: 1px solid #ddd; */ /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); */ } #context-button:hover { background-color: #f5f5f5; /* Change background color on hover */ border-color: #ccc; /* Change border color on hover */ } #quiz-button { /* quiz button */ position: relative; background: transparent; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; margin-top: 8px; margin-bottom: 8px; /* background-color: white; */ padding: 4px; /* border: 1px solid #ddd; */ /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); */ } #quiz-button:hover { background-color: #f5f5f5; /* Change background color on hover */ border-color: #ccc; /* Change border color on hover */ } .big-quiz-btn-disabled { background-color: #666 !important; color: #ccc !important; cursor: not-allowed !important; } .big-quiz-btn-disabled:hover { background-color: #666 !important; color: #ccc !important; } /* smart input */ .at-mentions-dropup { scrollbar-width: thin; scrollbar-color: #cbd5e0 #fff; } .at-mentions-dropup::-webkit-scrollbar { width: 6px; } .at-mentions-dropup::-webkit-scrollbar-track { background: #fff; } .at-mentions-dropup::-webkit-scrollbar-thumb { background-color: #cbd5e0; border-radius: 3px; } .at-mention-item { transition: background-color 0.2s; } .hidden-mention { display: none !important; position: absolute !important; visibility: hidden !important; pointer-events: none !important; } .folder-filters { position: sticky; top: 0; background: white; z-index: 1; } .folder-filter { font-size: 0.875rem; transition: background-color 0.2s; } .folder-filter:hover { background-color: #f3f4f6; } .results-container { scrollbar-width: thin; scrollbar-color: #cbd5e0 #fff; } .results-container::-webkit-scrollbar { width: 6px; } .results-container::-webkit-scrollbar-track { background: #fff; } .results-container::-webkit-scrollbar-thumb { background-color: #cbd5e0; border-radius: 3px; } .difficulty-dropdown { position: relative; margin-bottom: 0.5rem; display: flex; justify-content: flex-end; z-index: 50; /* Ensure it's above other content */ } .difficulty-options { position: absolute; right: 0; min-width: 150px; border: 1px solid rgba(0,0,0,0.1); background-color: white; border-radius: 0.375rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 9999; /* Higher z-index to ensure visibility */ display: block; } .difficulty-options.hidden { display: none; /* Show when not hidden */ } .difficulty-option { transition: background-color 0.2s; font-size: 0.75rem; cursor: pointer; white-space: nowrap; } /* Animation for dropdown */ .difficulty-options:not(.hidden) { animation: dropdownFade 0.2s ease-out; } @keyframes dropdownFade { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } /* Add this section after your existing styles */ /* Tooltip styles */ /* Tooltip styles */ /* .tooltip-container { position: fixed; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity 0.2s; } */ /* prev chats */ #popover-container { z-index: 102; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; } /* Custom scrollbar */ #list-container::-webkit-scrollbar { width: 8px; } #list-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } #list-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; } #list-container::-webkit-scrollbar-thumb:hover { background: #94a3b8; } .search-input { transition: all 0.2s ease-in-out; } .search-input:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); } /* Customize scrollbar for Webkit browsers (Chrome, Safari, etc.) */ #message-container::-webkit-scrollbar { width: 4px; /* thin scrollbar */ height: 0; /* hide horizontal scrollbar */ } #message-container::-webkit-scrollbar-track { background: transparent; /* transparent track */ } #message-container::-webkit-scrollbar-thumb { background-color: rgba(156, 163, 175, 0.2); /* light gray with opacity */ border-radius: 20px; transition: background-color 0.3s ease; } #message-container:hover::-webkit-scrollbar-thumb { background-color: rgba(156, 163, 175, 0.5); /* darker on hover */ } /* For Firefox */ #message-container { scrollbar-width: thin; scrollbar-color: #0d6efd transparent; overflow-x: hidden; /* hide horizontal scrollbar */ } .mermaid-container { background-color: #f8f9fa; padding: 1em; border-radius: 4px; margin: 1em 0; } .mermaid-diagram { display: flex; justify-content: center; align-items: center; min-height: 100px; } .mermaid-error { color: red; padding: 1em; border: 1px solid red; margin: 1em 0; } .mermaid-figure { margin: 1.5em 0; padding: 1em; background: #f8f9fa; border-radius: 4px; } .mermaid-figure figcaption { margin-top: 0.5em; text-align: center; font-style: italic; color: #666; } .mermaid { display: flex; justify-content: center; } .ink-mde-details { display: none !important; } .sr-notification { background: white; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); margin: 8px; padding: 12px; min-width: 200px; animation: slideIn_2 0.3s ease-out; } .sr-notification-content { display: flex; align-items: center; gap: 8px; } .sr-spinner { width: 16px; height: 16px; border: 2px solid #f3f3f3; border-top: 2px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes slideIn_2 { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .sr-notification.success { background: #e6ffe6; border-left: 4px solid #28a745; } .sr-notification.error { background: #ffe6e6; border-left: 4px solid #dc3545; } .sr-notification.saving { background: #e6f3ff; border-left: 4px solid #0066cc; } .save-button-content { display: flex; justify-content: center; align-items: center; } #saveCard:disabled { opacity: 0.75; cursor: not-allowed; } .boarding-highlight { background: rgba(255, 255, 255, 0.1); border-radius: 4px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5); } .boarding-popover { background: white; border-radius: 8px; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2); padding: 20px; max-width: 300px; } .boarding-popover-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; } .boarding-popover-description { font-size: 14px; line-height: 1.5; margin-bottom: 15px; } .boarding-button { background: #007bff; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; } .boarding-button:hover { background: #0056b3; } #floating-ai-btn .menu-item { display: flex !important; align-items: center !important; padding: 8px 16px !important; gap: 8px !important; cursor: pointer !important; transition: transform 0.2s ease !important; } #floating-ai-btn .menu-item:hover { transform: scale(1.05) !important; } #floating-ai-btn { padding: 2px !important; background: rgb(75, 85, 99) !important; border-radius: 4px !important; min-width: 140px !important; box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; } #floating-ai-btn .menu-divider { height: 1px !important; background: rgba(255, 255, 255, 0.1) !important; margin: 4px 0 !important; } /* Boarding.js specific styles */ .socratiq-onboarding .boarding-popover, .sr-onboarding .boarding-popover { max-width: 300px !important; max-height: 80vh !important; overflow-y: auto !important; position: fixed !important; background: white !important; border-radius: 8px !important; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2) !important; padding: 20px !important; z-index: 99999 !important; word-break: break-word !important; transform-origin: center center !important; transition: opacity 0.3s ease-in-out !important; } /* Prevent content from causing unwanted scrolling */ .socratiq-onboarding .boarding-popover-content, .sr-onboarding .boarding-popover-content { max-height: calc(80vh - 100px) !important; overflow-y: auto !important; scrollbar-width: thin !important; padding-right: 5px !important; } /* Custom scrollbar for the popover content */ .socratiq-onboarding .boarding-popover-content::-webkit-scrollbar, .sr-onboarding .boarding-popover-content::-webkit-scrollbar { width: 4px !important; } .socratiq-onboarding .boarding-popover-content::-webkit-scrollbar-track, .sr-onboarding .boarding-popover-content::-webkit-scrollbar-track { background: transparent !important; } .socratiq-onboarding .boarding-popover-content::-webkit-scrollbar-thumb, .sr-onboarding .boarding-popover-content::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2) !important; border-radius: 4px !important; } /* Ensure popovers stay within viewport bounds */ @media screen and (max-width: 768px) { .socratiq-onboarding .boarding-popover, .sr-onboarding .boarding-popover { max-width: 260px !important; font-size: 14px !important; } } /* Add these new styles */ .push-content-enabled #mybody { transition: margin-left 0.3s ease-in-out; } .push-content-enabled.menu-open #mybody { margin-left: -400px; /* Adjust based on your menu width */ } /* Toggle switch styles */ .toggle-checkbox:checked { right: 0; border-color: #68D391; } .toggle-label { transition: background-color 0.2s ease; } .toggle-checkbox:checked + .toggle-label { background-color: #48BB78; } `;function Gre(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wx=Gre();function a$e(t){wx=t}var bI={exec:()=>null};function hi(t,e=""){let n=typeof t=="string"?t:t.source,a={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(Hu.caret,"$1"),n=n.replace(r,o),a},getRegex:()=>new RegExp(n,e)};return a}var Hu={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},vst=/^(?:[ \t]*(?:\n|$))+/,kst=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xst=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,y$=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ost=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Hre=/(?:[*+-]|\d{1,9}[.)])/,r$e=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,i$e=hi(r$e).replace(/bull/g,Hre).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/\|table/g,"").getRegex(),Cst=hi(r$e).replace(/bull/g,Hre).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Wre=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_st=/^[^\n]+/,Yre=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bst=hi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yre).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Est=hi(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hre).getRegex(),$N="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",Xre=/|$))/,Qst=hi("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xre).replace("tag",$N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o$e=hi(Wre).replace("hr",y$).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",$N).getRegex(),Sst=hi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",o$e).getRegex(),Vre={blockquote:Sst,code:kst,def:Bst,fences:xst,heading:Ost,hr:y$,html:Qst,lheading:i$e,list:Est,newline:vst,paragraph:o$e,table:bI,text:_st},ZAe=hi("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",y$).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$N).getRegex(),Ist={...Vre,lheading:Cst,table:ZAe,paragraph:hi(Wre).replace("hr",y$).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ZAe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$N).getRegex()},Dst={...Vre,html:hi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xre).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bI,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:hi(Wre).replace("hr",y$).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",i$e).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$st=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Tst=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,s$e=/^( {2,}|\\)\n(?!\s*$)/,Pst=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,u$e=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Mst=hi(u$e,"u").replace(/punct/g,TN).getRegex(),zst=hi(u$e,"u").replace(/punct/g,l$e).getRegex(),d$e="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qst=hi(d$e,"gu").replace(/notPunctSpace/g,c$e).replace(/punctSpace/g,Zre).replace(/punct/g,TN).getRegex(),jst=hi(d$e,"gu").replace(/notPunctSpace/g,Lst).replace(/punctSpace/g,Rst).replace(/punct/g,l$e).getRegex(),Ust=hi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,c$e).replace(/punctSpace/g,Zre).replace(/punct/g,TN).getRegex(),Gst=hi(/\\(punct)/,"gu").replace(/punct/g,TN).getRegex(),Hst=hi(/^<(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(),Wst=hi(Xre).replace("(?:-->|$)","-->").getRegex(),Yst=hi("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Wst).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),N9=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Xst=hi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",N9).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),p$e=hi(/^!?\[(label)\]\[(ref)\]/).replace("label",N9).replace("ref",Yre).getRegex(),A$e=hi(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yre).getRegex(),Vst=hi("reflink|nolink(?!\\()","g").replace("reflink",p$e).replace("nolink",A$e).getRegex(),Kre={_backpedal:bI,anyPunctuation:Gst,autolink:Hst,blockSkip:Nst,br:s$e,code:Tst,del:bI,emStrongLDelim:Mst,emStrongRDelimAst:qst,emStrongRDelimUnd:Ust,escape:$st,link:Xst,nolink:A$e,punctuation:Fst,reflink:p$e,reflinkSearch:Vst,tag:Yst,text:Pst,url:bI},Zst={...Kre,link:hi(/^!?\[(label)\]\((.*?)\)/).replace("label",N9).getRegex(),reflink:hi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",N9).getRegex()},ZV={...Kre,emStrongRDelimAst:jst,emStrongLDelim:zst,url:hi(/^((?: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\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},KAe=t=>Jst[t];function Kg(t,e){if(e){if(Hu.escapeTest.test(t))return t.replace(Hu.escapeReplace,KAe)}else if(Hu.escapeTestNoEncode.test(t))return t.replace(Hu.escapeReplaceNoEncode,KAe);return t}function JAe(t){try{t=encodeURI(t).replace(Hu.percentDecode,"%")}catch{return null}return t}function eme(t,e){let n=t.replace(Hu.findPipe,(i,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),a=n.split(Hu.splitPipe),r=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length0?-2:-1}function tme(t,e,n,a,r){let i=e.href,o=e.title||null,s=t[1].replace(r.other.outputLinkReplace,"$1");a.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:a.inlineTokens(s)};return a.state.inLink=!1,l}function tct(t,e,n){let a=t.match(n.other.indentCodeCompensation);if(a===null)return e;let r=a[1];return e.split(` `).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(` `)}var M9=class{options;rules;lexer;constructor(e){this.options=e||wx}space(e){let n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){let n=this.rules.block.code.exec(e);if(n){let a=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?a:w2(a,` `)}}}fences(e){let n=this.rules.block.fences.exec(e);if(n){let a=n[0],r=tct(a,n[3]||"",this.rules);return{type:"code",raw:a,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:r}}}heading(e){let n=this.rules.block.heading.exec(e);if(n){let a=n[2].trim();if(this.rules.other.endingHash.test(a)){let r=w2(a,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(a=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(e){let n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:w2(n[0],` `)}}blockquote(e){let n=this.rules.block.blockquote.exec(e);if(n){let a=w2(n[0],` `).split(` `),r="",i="",o=[];for(;a.length>0;){let s=!1,l=[],u;for(u=0;u1,i={type:"list",raw:"",ordered:r,start:r?+a.slice(0,-1):"",loose:!1,items:[]};a=r?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=r?a:"[*+-]");let o=this.rules.other.listItemRegex(a),s=!1;for(;e;){let u=!1,d="",p="";if(!(n=o.exec(e))||this.rules.block.hr.test(e))break;d=n[0],e=e.substring(d.length);let A=n[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),m=e.split(` `,1)[0],g=!A.trim(),h=0;if(this.options.pedantic?(h=2,p=A.trimStart()):g?h=n[1].length+1:(h=n[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,p=A.slice(h),h+=n[1].length),g&&this.rules.other.blankLine.test(m)&&(d+=m+` `,e=e.substring(m.length+1),u=!0),!u){let y=this.rules.other.nextBulletRegex(h),w=this.rules.other.hrRegex(h),v=this.rules.other.fencesBeginRegex(h),k=this.rules.other.headingBeginRegex(h),_=this.rules.other.htmlBeginRegex(h);for(;e;){let x=e.split(` `,1)[0],C;if(m=x,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),C=m):C=m.replace(this.rules.other.tabCharGlobal," "),v.test(m)||k.test(m)||_.test(m)||y.test(m)||w.test(m))break;if(C.search(this.rules.other.nonSpaceChar)>=h||!m.trim())p+=` `+C.slice(h);else{if(g||A.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(A)||k.test(A)||w.test(A))break;p+=` `+m}!g&&!m.trim()&&(g=!0),d+=x+` `,e=e.substring(x.length+1),A=C.slice(h)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0));let f=null,b;this.options.gfm&&(f=this.rules.other.listIsTask.exec(p),f&&(b=f[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:d,task:!!f,checked:b,loose:!1,text:p,tokens:[]}),i.raw+=d}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let u=0;uA.type==="space"),p=d.length>0&&d.some(A=>this.rules.other.anyLine.test(A.raw));i.loose=p}if(i.loose)for(let u=0;u({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[u]})));return o}}lheading(e){let n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){let n=this.rules.block.paragraph.exec(e);if(n){let a=n[1].charAt(n[1].length-1)===` `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:a,tokens:this.lexer.inline(a)}}}text(e){let n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){let n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(e){let n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){let n=this.rules.inline.link.exec(e);if(n){let a=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let o=w2(a.slice(0,-1),"\\");if((a.length-o.length)%2===0)return}else{let o=ect(n[2],"()");if(o===-2)return;if(o>-1){let s=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,s).trim(),n[3]=""}}let r=n[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=n[3]?n[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?r=r.slice(1):r=r.slice(1,-1)),tme(n,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(e,n){let a;if((a=this.rules.inline.reflink.exec(e))||(a=this.rules.inline.nolink.exec(e))){let r=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=n[r.toLowerCase()];if(!i){let o=a[0].charAt(0);return{type:"text",raw:o,text:o}}return tme(a,i,a[0],this.lexer,this.rules)}}emStrong(e,n,a=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!a||this.rules.inline.punctuation.exec(a))){let i=[...r[0]].length-1,o,s,l=i,u=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+i);(r=d.exec(n))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){l+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);let p=[...r[0]][0].length,A=e.slice(0,i+r.index+p+s);if(Math.min(i,s)%2){let g=A.slice(1,-1);return{type:"em",raw:A,text:g,tokens:this.lexer.inlineTokens(g)}}let m=A.slice(2,-2);return{type:"strong",raw:A,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let n=this.rules.inline.code.exec(e);if(n){let a=n[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(a),i=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return r&&i&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:n[0],text:a}}}br(e){let n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){let n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){let n=this.rules.inline.autolink.exec(e);if(n){let a,r;return n[2]==="@"?(a=n[1],r="mailto:"+a):(a=n[1],r=a),{type:"link",raw:n[0],text:a,href:r,tokens:[{type:"text",raw:a,text:a}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let a,r;if(n[2]==="@")a=n[0],r="mailto:"+a;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(i!==n[0]);a=n[0],n[1]==="www."?r="http://"+n[0]:r=n[0]}return{type:"link",raw:n[0],text:a,href:r,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let n=this.rules.inline.text.exec(e);if(n){let a=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:a}}}},fb=class KV{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||wx,this.options.tokenizer=this.options.tokenizer||new M9,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 n={other:Hu,block:G5.normal,inline:y2.normal};this.options.pedantic?(n.block=G5.pedantic,n.inline=y2.pedantic):this.options.gfm&&(n.block=G5.gfm,this.options.breaks?n.inline=y2.breaks:n.inline=y2.gfm),this.tokenizer.rules=n}static get rules(){return{block:G5,inline:y2}}static lex(e,n){return new KV(n).lex(e)}static lexInline(e,n){return new KV(n).inlineTokens(e)}lex(e){e=e.replace(Hu.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let n=0;n(r=o.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let o=n.at(-1);r.raw.length===1&&o!==void 0?o.raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+r.raw,o.text+=` `+r.text,this.inlineQueue.at(-1).src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+r.raw,o.text+=` `+r.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let o=1/0,s=e.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},s),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(i=e.substring(0,o+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=n.at(-1);a&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+r.raw,o.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(r),a=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+r.raw,o.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(r);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,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let a=e,r=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)s.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,r.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){i||(o=""),i=!1;let s;if(this.options.extensions?.inline?.some(u=>(s=u.call({lexer:this},e,n))?(e=e.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);let u=n.at(-1);s.type==="text"&&u?.type==="text"?(u.raw+=s.raw,u.text+=s.text):n.push(s);continue}if(s=this.tokenizer.emStrong(e,a,o)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),n.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),n.push(s);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(A=>{p=A.call({lexer:this},d),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),i=!0;let u=n.at(-1);u?.type==="text"?(u.raw+=s.raw,u.text+=s.text):n.push(s);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}},z9=class{options;parser;constructor(e){this.options=e||wx}space(e){return""}code({text:e,lang:n,escaped:a}){let r=(n||"").match(Hu.notSpaceStart)?.[0],i=e.replace(Hu.endingNewline,"")+` `;return r?'
'+(a?i:Kg(i,!0))+`
`:"
"+(a?i:Kg(i,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:n}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){let n=e.ordered,a=e.start,r="";for(let s=0;s `+r+" `}listitem(e){let n="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=a+" "+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=a+" "+Kg(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):n+=a+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`
  • ${n}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let n="",a="";for(let i=0;i${r}`),` `+n+` `+r+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){let n=this.parser.parseInline(e.tokens),a=e.header?"th":"td";return(e.align?`<${a} align="${e.align}">`:`<${a}>`)+n+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Kg(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:n,tokens:a}){let r=this.parser.parseInline(a),i=JAe(e);if(i===null)return r;e=i;let o='
    ",o}image({href:e,title:n,text:a,tokens:r}){r&&(a=this.parser.parseInline(r,this.parser.textRenderer));let i=JAe(e);if(i===null)return Kg(a);e=i;let o=`${a}{let s=i[o].flat(1/0);a=a.concat(this.walkTokens(s,n))}):i.tokens&&(a=a.concat(this.walkTokens(i.tokens,n)))}}return a}use(...e){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{let r={...a};if(r.async=this.defaults.async||r.async||!1,a.extensions&&(a.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=n.renderers[i.name];o?n.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[i.level];o?o.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),r.extensions=n),a.renderer){let i=this.defaults.renderer||new z9(this.defaults);for(let o in a.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=a.renderer[s],u=i[s];i[s]=(...d)=>{let p=l.apply(i,d);return p===!1&&(p=u.apply(i,d)),p||""}}r.renderer=i}if(a.tokenizer){let i=this.defaults.tokenizer||new M9(this.defaults);for(let o in a.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=a.tokenizer[s],u=i[s];i[s]=(...d)=>{let p=l.apply(i,d);return p===!1&&(p=u.apply(i,d)),p}}r.tokenizer=i}if(a.hooks){let i=this.defaults.hooks||new G6;for(let o in a.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=a.hooks[s],u=i[s];G6.passThroughHooks.has(o)?i[s]=d=>{if(this.defaults.async)return Promise.resolve(l.call(i,d)).then(A=>u.call(i,A));let p=l.call(i,d);return u.call(i,p)}:i[s]=(...d)=>{let p=l.apply(i,d);return p===!1&&(p=u.apply(i,d)),p}}r.hooks=i}if(a.walkTokens){let i=this.defaults.walkTokens,o=a.walkTokens;r.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return fb.lex(e,n??this.defaults)}parser(e,n){return bb.parse(e,n??this.defaults)}parseMarkdown(e){return(n,a)=>{let r={...a},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));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"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let s=i.hooks?i.hooks.provideLexer():e?fb.lex:fb.lexInline,l=i.hooks?i.hooks.provideParser():e?bb.parse:bb.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(u=>s(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(o);try{i.hooks&&(n=i.hooks.preprocess(n));let u=s(n,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=l(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return o(u)}}}onError(e,n){return a=>{if(a.message+=` Please report this to https://github.com/markedjs/marked.`,e){let r="

    An error occurred:

    "+Kg(a.message+"",!0)+"
    ";return n?Promise.resolve(r):r}if(n)return Promise.reject(a);throw a}}},_1=new nct;function $i(t,e){return _1.parse(t,e)}$i.options=$i.setOptions=function(t){return _1.setOptions(t),$i.defaults=_1.defaults,a$e($i.defaults),$i};$i.getDefaults=Gre;$i.defaults=wx;$i.use=function(...t){return _1.use(...t),$i.defaults=_1.defaults,a$e($i.defaults),$i};$i.walkTokens=function(t,e){return _1.walkTokens(t,e)};$i.parseInline=_1.parseInline;$i.Parser=bb;$i.parser=bb.parse;$i.Renderer=z9;$i.TextRenderer=Jre;$i.Lexer=fb;$i.lexer=fb.lex;$i.Tokenizer=M9;$i.Hooks=G6;$i.parse=$i;$i.options;$i.setOptions;$i.use;$i.walkTokens;$i.parseInline;bb.parse;fb.lex;var eZ={name:"mermaid",version:"11.11.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},la=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ky(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function m$e(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return t[a]}})}),n}var g$e={exports:{}};(function(t,e){(function(n,a){t.exports=a()})(la,function(){var n=1e3,a=6e4,r=36e5,i="millisecond",o="second",s="minute",l="hour",u="day",d="week",p="month",A="quarter",m="year",g="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,y={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(O){var T=["th","st","nd","rd"],D=O%100;return"["+O+(T[(D-20)%10]||T[D]||T[0])+"]"}},w=function(O,T,D){var $=String(O);return!$||$.length>=T?O:""+Array(T+1-$.length).join(D)+O},v={s:w,z:function(O){var T=-O.utcOffset(),D=Math.abs(T),$=Math.floor(D/60),F=D%60;return(T<=0?"+":"-")+w($,2,"0")+":"+w(F,2,"0")},m:function O(T,D){if(T.date()1)return O(q[0])}else{var M=T.name;_[M]=T,F=M}return!$&&F&&(k=F),F||!$&&k},I=function(O,T){if(C(O))return O.clone();var D=typeof T=="object"?T:{};return D.date=O,D.args=arguments,new S(D)},E=v;E.l=B,E.i=C,E.w=function(O,T){return I(O,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var S=function(){function O(D){this.$L=B(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[x]=!0}var T=O.prototype;return T.parse=function(D){this.$d=function($){var F=$.date,L=$.utc;if(F===null)return new Date(NaN);if(E.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var q=F.match(f);if(q){var M=q[2]-1||0,R=(q[7]||"0").substring(0,3);return L?new Date(Date.UTC(q[1],M,q[3]||1,q[4]||0,q[5]||0,q[6]||0,R)):new Date(q[1],M,q[3]||1,q[4]||0,q[5]||0,q[6]||0,R)}}return new Date(F)}(D),this.init()},T.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},T.$utils=function(){return E},T.isValid=function(){return this.$d.toString()!==h},T.isSame=function(D,$){var F=I(D);return this.startOf($)<=F&&F<=this.endOf($)},T.isAfter=function(D,$){return I(D)h$e(t,"name",{value:e,configurable:!0}),PN=(t,e)=>{for(var n in e)h$e(t,n,{get:e[n],enumerable:!0})},Cf={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},_e={trace:Q((...t)=>{},"trace"),debug:Q((...t)=>{},"debug"),info:Q((...t)=>{},"info"),warn:Q((...t)=>{},"warn"),error:Q((...t)=>{},"error"),fatal:Q((...t)=>{},"fatal")},eie=Q(function(t="fatal"){let e=Cf.fatal;typeof t=="string"?t.toLowerCase()in Cf&&(e=Cf[t]):typeof t=="number"&&(e=t),_e.trace=()=>{},_e.debug=()=>{},_e.info=()=>{},_e.warn=()=>{},_e.error=()=>{},_e.fatal=()=>{},e<=Cf.fatal&&(_e.fatal=console.error?console.error.bind(console,lA("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",lA("FATAL"))),e<=Cf.error&&(_e.error=console.error?console.error.bind(console,lA("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",lA("ERROR"))),e<=Cf.warn&&(_e.warn=console.warn?console.warn.bind(console,lA("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",lA("WARN"))),e<=Cf.info&&(_e.info=console.info?console.info.bind(console,lA("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",lA("INFO"))),e<=Cf.debug&&(_e.debug=console.debug?console.debug.bind(console,lA("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",lA("DEBUG"))),e<=Cf.trace&&(_e.trace=console.debug?console.debug.bind(console,lA("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",lA("TRACE")))},"setLogLevel"),lA=Q(t=>`%c${uu().format("ss.SSS")} : ${t} : `,"format");const H6={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=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},a)=>{if(!e)return n*2.55;t/=360,e/=100,n/=100;const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r;switch(a){case"r":return H6.hue2rgb(i,r,t+1/3)*255;case"g":return H6.hue2rgb(i,r,t)*255;case"b":return H6.hue2rgb(i,r,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:n},a)=>{t/=255,e/=255,n/=255;const r=Math.max(t,e,n),i=Math.min(t,e,n),o=(r+i)/2;if(a==="l")return o*100;if(r===i)return 0;const s=r-i,l=o>.5?s/(2-r-i):s/(r+i);if(a==="s")return l*100;switch(r){case t:return((e-n)/s+(ee>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},ict={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},qa={channel:H6,lang:rct,unit:ict},l0={};for(let t=0;t<=255;t++)l0[t]=qa.unit.dec2hex(t);const Hl={ALL:0,RGB:1,HSL:2};let oct=class{constructor(){this.type=Hl.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=Hl.ALL}is(e){return this.type===e}};class sct{constructor(e,n){this.color=n,this.changed=!1,this.data=e,this.type=new oct}set(e,n){return this.color=n,this.changed=!1,this.data=e,this.type.type=Hl.ALL,this}_ensureHSL(){const e=this.data,{h:n,s:a,l:r}=e;n===void 0&&(e.h=qa.channel.rgb2hsl(e,"h")),a===void 0&&(e.s=qa.channel.rgb2hsl(e,"s")),r===void 0&&(e.l=qa.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:n,g:a,b:r}=e;n===void 0&&(e.r=qa.channel.hsl2rgb(e,"r")),a===void 0&&(e.g=qa.channel.hsl2rgb(e,"g")),r===void 0&&(e.b=qa.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,n=e.r;return!this.type.is(Hl.HSL)&&n!==void 0?n:(this._ensureHSL(),qa.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,n=e.g;return!this.type.is(Hl.HSL)&&n!==void 0?n:(this._ensureHSL(),qa.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,n=e.b;return!this.type.is(Hl.HSL)&&n!==void 0?n:(this._ensureHSL(),qa.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,n=e.h;return!this.type.is(Hl.RGB)&&n!==void 0?n:(this._ensureRGB(),qa.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,n=e.s;return!this.type.is(Hl.RGB)&&n!==void 0?n:(this._ensureRGB(),qa.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,n=e.l;return!this.type.is(Hl.RGB)&&n!==void 0?n:(this._ensureRGB(),qa.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Hl.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Hl.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Hl.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Hl.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Hl.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Hl.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const FN=new sct({r:0,g:0,b:0,a:0},"transparent"),d_={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(d_.re);if(!e)return;const n=e[1],a=parseInt(n,16),r=n.length,i=r%4===0,o=r>4,s=o?1:17,l=o?8:4,u=i?0:-1,d=o?255:15;return FN.set({r:(a>>l*(u+3)&d)*s,g:(a>>l*(u+2)&d)*s,b:(a>>l*(u+1)&d)*s,a:i?(a&d)*s/255:1},t)},stringify:t=>{const{r:e,g:n,b:a,a:r}=t;return r<1?`#${l0[Math.round(e)]}${l0[Math.round(n)]}${l0[Math.round(a)]}${l0[Math.round(r*255)]}`:`#${l0[Math.round(e)]}${l0[Math.round(n)]}${l0[Math.round(a)]}`}},Gk={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=>{const e=t.match(Gk.hueRe);if(e){const[,n,a]=e;switch(a){case"grad":return qa.channel.clamp.h(parseFloat(n)*.9);case"rad":return qa.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return qa.channel.clamp.h(parseFloat(n)*360)}}return qa.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const n=t.match(Gk.re);if(!n)return;const[,a,r,i,o,s]=n;return FN.set({h:Gk._hue2deg(a),s:qa.channel.clamp.s(parseFloat(r)),l:qa.channel.clamp.l(parseFloat(i)),a:o?qa.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:a,a:r}=t;return r<1?`hsla(${qa.lang.round(e)}, ${qa.lang.round(n)}%, ${qa.lang.round(a)}%, ${r})`:`hsl(${qa.lang.round(e)}, ${qa.lang.round(n)}%, ${qa.lang.round(a)}%)`}},yI={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();const e=yI.colors[t];if(e)return d_.parse(e)},stringify:t=>{const e=d_.stringify(t);for(const n in yI.colors)if(yI.colors[n]===e)return n}},UQ={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=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const n=t.match(UQ.re);if(!n)return;const[,a,r,i,o,s,l,u,d]=n;return FN.set({r:qa.channel.clamp.r(r?parseFloat(a)*2.55:parseFloat(a)),g:qa.channel.clamp.g(o?parseFloat(i)*2.55:parseFloat(i)),b:qa.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?qa.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:a,a:r}=t;return r<1?`rgba(${qa.lang.round(e)}, ${qa.lang.round(n)}, ${qa.lang.round(a)}, ${qa.lang.round(r)})`:`rgb(${qa.lang.round(e)}, ${qa.lang.round(n)}, ${qa.lang.round(a)})`}},dg={format:{keyword:yI,hex:d_,rgb:UQ,rgba:UQ,hsl:Gk,hsla:Gk},parse:t=>{if(typeof t!="string")return t;const e=d_.parse(t)||UQ.parse(t)||Gk.parse(t)||yI.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Hl.HSL)||t.data.r===void 0?Gk.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?UQ.stringify(t):d_.stringify(t)},f$e=(t,e)=>{const n=dg.parse(t);for(const a in e)n[a]=qa.channel.clamp[a](e[a]);return dg.stringify(n)},aw=(t,e,n=0,a=1)=>{if(typeof t!="number")return f$e(t,{a:e});const r=FN.set({r:qa.channel.clamp.r(t),g:qa.channel.clamp.g(e),b:qa.channel.clamp.b(n),a:qa.channel.clamp.a(a)});return dg.stringify(r)},tie=(t,e)=>qa.lang.round(dg.parse(t)[e]),cct=t=>{const{r:e,g:n,b:a}=dg.parse(t),r=.2126*qa.channel.toLinear(e)+.7152*qa.channel.toLinear(n)+.0722*qa.channel.toLinear(a);return qa.lang.round(r)},lct=t=>cct(t)>=.5,Jw=t=>!lct(t),b$e=(t,e,n)=>{const a=dg.parse(t),r=a[e],i=qa.channel.clamp[e](r+n);return r!==i&&(a[e]=i),dg.stringify(a)},Xn=(t,e)=>b$e(t,"l",e),ca=(t,e)=>b$e(t,"l",-e),xt=(t,e)=>{const n=dg.parse(t),a={};for(const r in e)e[r]&&(a[r]=n[r]+e[r]);return f$e(t,a)},uct=(t,e,n=50)=>{const{r:a,g:r,b:i,a:o}=dg.parse(t),{r:s,g:l,b:u,a:d}=dg.parse(e),p=n/100,A=p*2-1,m=o-d,h=((A*m===-1?A:(A+m)/(1+A*m))+1)/2,f=1-h,b=a*h+s*f,y=r*h+l*f,w=i*h+u*f,v=o*p+d*(1-p);return aw(b,y,w,v)},Rn=(t,e=100)=>{const n=dg.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,uct(n,t,e)};/*! @license DOMPurify 3.2.6 | (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.6/LICENSE */const{entries:y$e,setPrototypeOf:nme,isFrozen:dct,getPrototypeOf:pct,getOwnPropertyDescriptor:Act}=Object;let{freeze:ad,seal:VA,create:w$e}=Object,{apply:tZ,construct:nZ}=typeof Reflect<"u"&&Reflect;ad||(ad=function(e){return e});VA||(VA=function(e){return e});tZ||(tZ=function(e,n,a){return e.apply(n,a)});nZ||(nZ=function(e,n){return new e(...n)});const H5=rd(Array.prototype.forEach),mct=rd(Array.prototype.lastIndexOf),ame=rd(Array.prototype.pop),v2=rd(Array.prototype.push),gct=rd(Array.prototype.splice),W6=rd(String.prototype.toLowerCase),Uj=rd(String.prototype.toString),rme=rd(String.prototype.match),k2=rd(String.prototype.replace),hct=rd(String.prototype.indexOf),fct=rd(String.prototype.trim),Pm=rd(Object.prototype.hasOwnProperty),$u=rd(RegExp.prototype.test),x2=bct(TypeError);function rd(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:W6;nme&&nme(t,null);let a=e.length;for(;a--;){let r=e[a];if(typeof r=="string"){const i=n(r);i!==r&&(dct(e)||(e[a]=i),r=i)}t[r]=!0}return t}function yct(t){for(let e=0;e/gm),Oct=VA(/\$\{[\w\W]*/gm),Cct=VA(/^data-[\-\w.\u00B7-\uFFFF]+$/),_ct=VA(/^aria-[\-\w]+$/),v$e=VA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Bct=VA(/^(?:\w+script|data):/i),Ect=VA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),k$e=VA(/^html$/i),Qct=VA(/^[a-z][.\w]*(-[.\w]+)+$/i);var lme=Object.freeze({__proto__:null,ARIA_ATTR:_ct,ATTR_WHITESPACE:Ect,CUSTOM_ELEMENT:Qct,DATA_ATTR:Cct,DOCTYPE_NAME:k$e,ERB_EXPR:xct,IS_ALLOWED_URI:v$e,IS_SCRIPT_OR_DATA:Bct,MUSTACHE_EXPR:kct,TMPLIT_EXPR:Oct});const C2={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Sct=function(){return typeof window>"u"?null:window},Ict=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(a=n.getAttribute(r));const i="dompurify"+(a?"#"+a:"");try{return e.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ume=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function x$e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sct();const e=_n=>x$e(_n);if(e.version="3.2.6",e.removed=[],!t||!t.document||t.document.nodeType!==C2.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const a=n,r=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:A,trustedTypes:m}=t,g=l.prototype,h=O2(g,"cloneNode"),f=O2(g,"remove"),b=O2(g,"nextSibling"),y=O2(g,"childNodes"),w=O2(g,"parentNode");if(typeof o=="function"){const _n=n.createElement("template");_n.content&&_n.content.ownerDocument&&(n=_n.content.ownerDocument)}let v,k="";const{implementation:_,createNodeIterator:x,createDocumentFragment:C,getElementsByTagName:B}=n,{importNode:I}=a;let E=ume();e.isSupported=typeof y$e=="function"&&typeof w=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:S,ERB_EXPR:P,TMPLIT_EXPR:O,DATA_ATTR:T,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:L}=lme;let{IS_ALLOWED_URI:q}=lme,M=null;const R=fr({},[...ime,...Gj,...Hj,...Wj,...ome]);let j=null;const W=fr({},[...sme,...Yj,...cme,...W5]);let G=Object.seal(w$e(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}})),X=null,ne=null,oe=!0,ee=!0,he=!1,le=!0,me=!1,be=!0,ce=!1,fe=!1,Z=!1,ze=!1,ae=!1,qe=!1,Oe=!0,nt=!1;const et="user-content-";let lt=!0,Ge=!1,at={},Pe=null;const de=fr({},["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"]);let $e=null;const we=fr({},["audio","video","img","source","image","track"]);let Ie=null;const ie=fr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",se="http://www.w3.org/2000/svg",De="http://www.w3.org/1999/xhtml";let Se=De,Ve=!1,je=null;const Ze=fr({},[Ne,se,De],Uj);let At=fr({},["mi","mo","mn","ms","mtext"]),Xe=fr({},["annotation-xml"]);const ht=fr({},["title","style","font","a","script"]);let Rt=null;const zt=["application/xhtml+xml","text/html"],Ct="text/html";let Ht=null,Qt=null;const Gt=n.createElement("form"),cn=function(st){return st instanceof RegExp||st instanceof Function},tn=function(){let st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Qt&&Qt===st)){if((!st||typeof st!="object")&&(st={}),st=Uf(st),Rt=zt.indexOf(st.PARSER_MEDIA_TYPE)===-1?Ct:st.PARSER_MEDIA_TYPE,Ht=Rt==="application/xhtml+xml"?Uj:W6,M=Pm(st,"ALLOWED_TAGS")?fr({},st.ALLOWED_TAGS,Ht):R,j=Pm(st,"ALLOWED_ATTR")?fr({},st.ALLOWED_ATTR,Ht):W,je=Pm(st,"ALLOWED_NAMESPACES")?fr({},st.ALLOWED_NAMESPACES,Uj):Ze,Ie=Pm(st,"ADD_URI_SAFE_ATTR")?fr(Uf(ie),st.ADD_URI_SAFE_ATTR,Ht):ie,$e=Pm(st,"ADD_DATA_URI_TAGS")?fr(Uf(we),st.ADD_DATA_URI_TAGS,Ht):we,Pe=Pm(st,"FORBID_CONTENTS")?fr({},st.FORBID_CONTENTS,Ht):de,X=Pm(st,"FORBID_TAGS")?fr({},st.FORBID_TAGS,Ht):Uf({}),ne=Pm(st,"FORBID_ATTR")?fr({},st.FORBID_ATTR,Ht):Uf({}),at=Pm(st,"USE_PROFILES")?st.USE_PROFILES:!1,oe=st.ALLOW_ARIA_ATTR!==!1,ee=st.ALLOW_DATA_ATTR!==!1,he=st.ALLOW_UNKNOWN_PROTOCOLS||!1,le=st.ALLOW_SELF_CLOSE_IN_ATTR!==!1,me=st.SAFE_FOR_TEMPLATES||!1,be=st.SAFE_FOR_XML!==!1,ce=st.WHOLE_DOCUMENT||!1,ze=st.RETURN_DOM||!1,ae=st.RETURN_DOM_FRAGMENT||!1,qe=st.RETURN_TRUSTED_TYPE||!1,Z=st.FORCE_BODY||!1,Oe=st.SANITIZE_DOM!==!1,nt=st.SANITIZE_NAMED_PROPS||!1,lt=st.KEEP_CONTENT!==!1,Ge=st.IN_PLACE||!1,q=st.ALLOWED_URI_REGEXP||v$e,Se=st.NAMESPACE||De,At=st.MATHML_TEXT_INTEGRATION_POINTS||At,Xe=st.HTML_INTEGRATION_POINTS||Xe,G=st.CUSTOM_ELEMENT_HANDLING||{},st.CUSTOM_ELEMENT_HANDLING&&cn(st.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=st.CUSTOM_ELEMENT_HANDLING.tagNameCheck),st.CUSTOM_ELEMENT_HANDLING&&cn(st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),st.CUSTOM_ELEMENT_HANDLING&&typeof st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),me&&(ee=!1),ae&&(ze=!0),at&&(M=fr({},ome),j=[],at.html===!0&&(fr(M,ime),fr(j,sme)),at.svg===!0&&(fr(M,Gj),fr(j,Yj),fr(j,W5)),at.svgFilters===!0&&(fr(M,Hj),fr(j,Yj),fr(j,W5)),at.mathMl===!0&&(fr(M,Wj),fr(j,cme),fr(j,W5))),st.ADD_TAGS&&(M===R&&(M=Uf(M)),fr(M,st.ADD_TAGS,Ht)),st.ADD_ATTR&&(j===W&&(j=Uf(j)),fr(j,st.ADD_ATTR,Ht)),st.ADD_URI_SAFE_ATTR&&fr(Ie,st.ADD_URI_SAFE_ATTR,Ht),st.FORBID_CONTENTS&&(Pe===de&&(Pe=Uf(Pe)),fr(Pe,st.FORBID_CONTENTS,Ht)),lt&&(M["#text"]=!0),ce&&fr(M,["html","head","body"]),M.table&&(fr(M,["tbody"]),delete X.tbody),st.TRUSTED_TYPES_POLICY){if(typeof st.TRUSTED_TYPES_POLICY.createHTML!="function")throw x2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof st.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw x2('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=st.TRUSTED_TYPES_POLICY,k=v.createHTML("")}else v===void 0&&(v=Ict(m,r)),v!==null&&typeof k=="string"&&(k=v.createHTML(""));ad&&ad(st),Qt=st}},ft=fr({},[...Gj,...Hj,...wct]),vn=fr({},[...Wj,...vct]),It=function(st){let vt=w(st);(!vt||!vt.tagName)&&(vt={namespaceURI:Se,tagName:"template"});const We=W6(st.tagName),Tt=W6(vt.tagName);return je[st.namespaceURI]?st.namespaceURI===se?vt.namespaceURI===De?We==="svg":vt.namespaceURI===Ne?We==="svg"&&(Tt==="annotation-xml"||At[Tt]):!!ft[We]:st.namespaceURI===Ne?vt.namespaceURI===De?We==="math":vt.namespaceURI===se?We==="math"&&Xe[Tt]:!!vn[We]:st.namespaceURI===De?vt.namespaceURI===se&&!Xe[Tt]||vt.namespaceURI===Ne&&!At[Tt]?!1:!vn[We]&&(ht[We]||!ft[We]):!!(Rt==="application/xhtml+xml"&&je[st.namespaceURI]):!1},Nt=function(st){v2(e.removed,{element:st});try{w(st).removeChild(st)}catch{f(st)}},dn=function(st,vt){try{v2(e.removed,{attribute:vt.getAttributeNode(st),from:vt})}catch{v2(e.removed,{attribute:null,from:vt})}if(vt.removeAttribute(st),st==="is")if(ze||ae)try{Nt(vt)}catch{}else try{vt.setAttribute(st,"")}catch{}},jt=function(st){let vt=null,We=null;if(Z)st=""+st;else{const jn=rme(st,/^[\r\n\t ]+/);We=jn&&jn[0]}Rt==="application/xhtml+xml"&&Se===De&&(st=''+st+"");const Tt=v?v.createHTML(st):st;if(Se===De)try{vt=new A().parseFromString(Tt,Rt)}catch{}if(!vt||!vt.documentElement){vt=_.createDocument(Se,"template",null);try{vt.documentElement.innerHTML=Ve?k:Tt}catch{}}const an=vt.body||vt.documentElement;return st&&We&&an.insertBefore(n.createTextNode(We),an.childNodes[0]||null),Se===De?B.call(vt,ce?"html":"body")[0]:ce?vt.documentElement:an},Xt=function(st){return x.call(st.ownerDocument||st,st,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},bn=function(st){return st instanceof p&&(typeof st.nodeName!="string"||typeof st.textContent!="string"||typeof st.removeChild!="function"||!(st.attributes instanceof d)||typeof st.removeAttribute!="function"||typeof st.setAttribute!="function"||typeof st.namespaceURI!="string"||typeof st.insertBefore!="function"||typeof st.hasChildNodes!="function")},ga=function(st){return typeof s=="function"&&st instanceof s};function yn(_n,st,vt){H5(_n,We=>{We.call(e,st,vt,Qt)})}const ha=function(st){let vt=null;if(yn(E.beforeSanitizeElements,st,null),bn(st))return Nt(st),!0;const We=Ht(st.nodeName);if(yn(E.uponSanitizeElement,st,{tagName:We,allowedTags:M}),be&&st.hasChildNodes()&&!ga(st.firstElementChild)&&$u(/<[/\w!]/g,st.innerHTML)&&$u(/<[/\w!]/g,st.textContent)||st.nodeType===C2.progressingInstruction||be&&st.nodeType===C2.comment&&$u(/<[/\w]/g,st.data))return Nt(st),!0;if(!M[We]||X[We]){if(!X[We]&&Ya(We)&&(G.tagNameCheck instanceof RegExp&&$u(G.tagNameCheck,We)||G.tagNameCheck instanceof Function&&G.tagNameCheck(We)))return!1;if(lt&&!Pe[We]){const Tt=w(st)||st.parentNode,an=y(st)||st.childNodes;if(an&&Tt){const jn=an.length;for(let ya=jn-1;ya>=0;--ya){const ve=h(an[ya],!0);ve.__removalCount=(st.__removalCount||0)+1,Tt.insertBefore(ve,b(st))}}}return Nt(st),!0}return st instanceof l&&!It(st)||(We==="noscript"||We==="noembed"||We==="noframes")&&$u(/<\/no(script|embed|frames)/i,st.innerHTML)?(Nt(st),!0):(me&&st.nodeType===C2.text&&(vt=st.textContent,H5([S,P,O],Tt=>{vt=k2(vt,Tt," ")}),st.textContent!==vt&&(v2(e.removed,{element:st.cloneNode()}),st.textContent=vt)),yn(E.afterSanitizeElements,st,null),!1)},Ca=function(st,vt,We){if(Oe&&(vt==="id"||vt==="name")&&(We in n||We in Gt))return!1;if(!(ee&&!ne[vt]&&$u(T,vt))){if(!(oe&&$u(D,vt))){if(!j[vt]||ne[vt]){if(!(Ya(st)&&(G.tagNameCheck instanceof RegExp&&$u(G.tagNameCheck,st)||G.tagNameCheck instanceof Function&&G.tagNameCheck(st))&&(G.attributeNameCheck instanceof RegExp&&$u(G.attributeNameCheck,vt)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(vt))||vt==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&$u(G.tagNameCheck,We)||G.tagNameCheck instanceof Function&&G.tagNameCheck(We))))return!1}else if(!Ie[vt]){if(!$u(q,k2(We,F,""))){if(!((vt==="src"||vt==="xlink:href"||vt==="href")&&st!=="script"&&hct(We,"data:")===0&&$e[st])){if(!(he&&!$u($,k2(We,F,"")))){if(We)return!1}}}}}}return!0},Ya=function(st){return st!=="annotation-xml"&&rme(st,L)},fa=function(st){yn(E.beforeSanitizeAttributes,st,null);const{attributes:vt}=st;if(!vt||bn(st))return;const We={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let Tt=vt.length;for(;Tt--;){const an=vt[Tt],{name:jn,namespaceURI:ya,value:ve}=an,Ue=Ht(jn),$t=ve;let Ut=jn==="value"?$t:fct($t);if(We.attrName=Ue,We.attrValue=Ut,We.keepAttr=!0,We.forceKeepAttr=void 0,yn(E.uponSanitizeAttribute,st,We),Ut=We.attrValue,nt&&(Ue==="id"||Ue==="name")&&(dn(jn,st),Ut=et+Ut),be&&$u(/((--!?|])>)|<\/(style|title)/i,Ut)){dn(jn,st);continue}if(We.forceKeepAttr)continue;if(!We.keepAttr){dn(jn,st);continue}if(!le&&$u(/\/>/i,Ut)){dn(jn,st);continue}me&&H5([S,P,O],Vt=>{Ut=k2(Ut,Vt," ")});const Pt=Ht(st.nodeName);if(!Ca(Pt,Ue,Ut)){dn(jn,st);continue}if(v&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ya)switch(m.getAttributeType(Pt,Ue)){case"TrustedHTML":{Ut=v.createHTML(Ut);break}case"TrustedScriptURL":{Ut=v.createScriptURL(Ut);break}}if(Ut!==$t)try{ya?st.setAttributeNS(ya,jn,Ut):st.setAttribute(jn,Ut),bn(st)?Nt(st):ame(e.removed)}catch{dn(jn,st)}}yn(E.afterSanitizeAttributes,st,null)},Ka=function _n(st){let vt=null;const We=Xt(st);for(yn(E.beforeSanitizeShadowDOM,st,null);vt=We.nextNode();)yn(E.uponSanitizeShadowNode,vt,null),ha(vt),fa(vt),vt.content instanceof i&&_n(vt.content);yn(E.afterSanitizeShadowDOM,st,null)};return e.sanitize=function(_n){let st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},vt=null,We=null,Tt=null,an=null;if(Ve=!_n,Ve&&(_n=""),typeof _n!="string"&&!ga(_n))if(typeof _n.toString=="function"){if(_n=_n.toString(),typeof _n!="string")throw x2("dirty is not a string, aborting")}else throw x2("toString is not a function");if(!e.isSupported)return _n;if(fe||tn(st),e.removed=[],typeof _n=="string"&&(Ge=!1),Ge){if(_n.nodeName){const ve=Ht(_n.nodeName);if(!M[ve]||X[ve])throw x2("root node is forbidden and cannot be sanitized in-place")}}else if(_n instanceof s)vt=jt(""),We=vt.ownerDocument.importNode(_n,!0),We.nodeType===C2.element&&We.nodeName==="BODY"||We.nodeName==="HTML"?vt=We:vt.appendChild(We);else{if(!ze&&!me&&!ce&&_n.indexOf("<")===-1)return v&&qe?v.createHTML(_n):_n;if(vt=jt(_n),!vt)return ze?null:qe?k:""}vt&&Z&&Nt(vt.firstChild);const jn=Xt(Ge?_n:vt);for(;Tt=jn.nextNode();)ha(Tt),fa(Tt),Tt.content instanceof i&&Ka(Tt.content);if(Ge)return _n;if(ze){if(ae)for(an=C.call(vt.ownerDocument);vt.firstChild;)an.appendChild(vt.firstChild);else an=vt;return(j.shadowroot||j.shadowrootmode)&&(an=I.call(a,an,!0)),an}let ya=ce?vt.outerHTML:vt.innerHTML;return ce&&M["!doctype"]&&vt.ownerDocument&&vt.ownerDocument.doctype&&vt.ownerDocument.doctype.name&&$u(k$e,vt.ownerDocument.doctype.name)&&(ya=" `+ya),me&&H5([S,P,O],ve=>{ya=k2(ya,ve," ")}),v&&qe?v.createHTML(ya):ya},e.setConfig=function(){let _n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tn(_n),fe=!0},e.clearConfig=function(){Qt=null,fe=!1},e.isValidAttribute=function(_n,st,vt){Qt||tn({});const We=Ht(_n),Tt=Ht(st);return Ca(We,Tt,vt)},e.addHook=function(_n,st){typeof st=="function"&&v2(E[_n],st)},e.removeHook=function(_n,st){if(st!==void 0){const vt=mct(E[_n],st);return vt===-1?void 0:gct(E[_n],vt,1)[0]}return ame(E[_n])},e.removeHooks=function(_n){E[_n]=[]},e.removeAllHooks=function(){E=ume()},e}var j_=x$e(),O$e=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,wI=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Dct=/\s*%%.*\n/gm,C$e=class extends Error{static{Q(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},B1={},nie=Q(function(t,e){t=t.replace(O$e,"").replace(wI,"").replace(Dct,` `);for(const[n,{detector:a}]of Object.entries(B1))if(a(t,e))return n;throw new C$e(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),aZ=Q((...t)=>{for(const{id:e,detector:n,loader:a}of t)_$e(e,n,a)},"registerLazyLoadedDiagrams"),_$e=Q((t,e,n)=>{B1[t]&&_e.warn(`Detector with key ${t} already exists. Overwriting.`),B1[t]={detector:e,loader:n},_e.debug(`Detector with key ${t} added${n?" with loader":""}`)},"addDetector"),$ct=Q(t=>B1[t].loader,"getDiagramLoader"),rZ=Q((t,e,{depth:n=2,clobber:a=!1}={})=>{const r={depth:n,clobber:a};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(i=>rZ(t,i,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(i=>{t.includes(i)||t.push(i)}),t):t===void 0||n<=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(i=>{typeof e[i]=="object"&&(t[i]===void 0||typeof t[i]=="object")?(t[i]===void 0&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=rZ(t[i],e[i],{depth:n-1,clobber:a})):(a||typeof t[i]!="object"&&typeof e[i]!="object")&&(t[i]=e[i])}),t)},"assignWithDepth"),Os=rZ,RN="#ffffff",LN="#f2f2f2",Wu=Q((t,e)=>e?xt(t,{s:-40,l:10}):xt(t,{s:-40,l:-10}),"mkBorder"),Tct=class{static{Q(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||xt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||xt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wu(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wu(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wu(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wu(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Rn(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Rn(this.tertiaryColor),this.lineColor=this.lineColor||Rn(this.background),this.arrowheadColor=this.arrowheadColor||Rn(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?ca(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||ca(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Rn(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||Xn(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.vertLineColor=this.vertLineColor||"navy",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.darkMode?(this.rowOdd=this.rowOdd||ca(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ca(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Xn(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Xn(this.mainBkg,5)),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||xt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||xt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xt(this.primaryColor,{h:330}),this.darkMode)for(let n=0;n{this[a]=e[a]}),this.updateColors(),n.forEach(a=>{this[a]=e[a]})}},Pct=Q(t=>{const e=new Tct;return e.calculate(t),e},"getThemeVariables"),Fct=class{static{Q(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Xn(this.primaryColor,16),this.tertiaryColor=xt(this.primaryColor,{h:-160}),this.primaryBorderColor=Rn(this.background),this.secondaryBorderColor=Wu(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wu(this.tertiaryColor,this.darkMode),this.primaryTextColor=Rn(this.primaryColor),this.secondaryTextColor=Rn(this.secondaryColor),this.tertiaryTextColor=Rn(this.tertiaryColor),this.lineColor=Rn(this.background),this.textColor=Rn(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Xn(Rn("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=aw(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=ca("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ca(this.sectionBkgColor,10),this.taskBorderColor=aw(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=aw(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.vertLineColor="#00BFFF",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.rowOdd=this.rowOdd||Xn(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ca(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Xn(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=Xn(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=Xn(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=xt(this.primaryColor,{h:64}),this.fillType3=xt(this.secondaryColor,{h:64}),this.fillType4=xt(this.primaryColor,{h:-64}),this.fillType5=xt(this.secondaryColor,{h:-64}),this.fillType6=xt(this.primaryColor,{h:128}),this.fillType7=xt(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||xt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||xt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xt(this.primaryColor,{h:330});for(let t=0;t{this[n]=t[n]}),this.updateColors(),e.forEach(n=>{this[n]=t[n]})}},Rct=Q(t=>{const e=new Fct;return e.calculate(t),e},"getThemeVariables"),Lct=class{static{Q(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=xt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=xt(this.primaryColor,{h:-160}),this.primaryBorderColor=Wu(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wu(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wu(this.tertiaryColor,this.darkMode),this.primaryTextColor=Rn(this.primaryColor),this.secondaryTextColor=Rn(this.secondaryColor),this.tertiaryTextColor=Rn(this.tertiaryColor),this.lineColor=Rn(this.background),this.textColor=Rn(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.vertLineColor="calculated",this.sectionBkgColor=aw(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.vertLineColor="navy",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.rowOdd="calculated",this.rowEven="calculated",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||xt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||xt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ca(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ca(this.tertiaryColor,40);for(let t=0;t{this[n]==="calculated"&&(this[n]=void 0)}),typeof t!="object"){this.updateColors();return}const e=Object.keys(t);e.forEach(n=>{this[n]=t[n]}),this.updateColors(),e.forEach(n=>{this[n]=t[n]})}},NN=Q(t=>{const e=new Lct;return e.calculate(t),e},"getThemeVariables"),Nct=class{static{Q(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=Xn("#cde498",10),this.primaryBorderColor=Wu(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wu(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wu(this.tertiaryColor,this.darkMode),this.primaryTextColor=Rn(this.primaryColor),this.secondaryTextColor=Rn(this.secondaryColor),this.tertiaryTextColor=Rn(this.primaryColor),this.lineColor=Rn(this.background),this.textColor=Rn(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.vertLineColor="#00BFFF",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=ca(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||xt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||xt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ca(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ca(this.tertiaryColor,40);for(let t=0;t{this[n]=t[n]}),this.updateColors(),e.forEach(n=>{this[n]=t[n]})}},Mct=Q(t=>{const e=new Nct;return e.calculate(t),e},"getThemeVariables"),zct=class{static{Q(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Xn(this.contrast,55),this.background="#ffffff",this.tertiaryColor=xt(this.primaryColor,{h:-160}),this.primaryBorderColor=Wu(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wu(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wu(this.tertiaryColor,this.darkMode),this.primaryTextColor=Rn(this.primaryColor),this.secondaryTextColor=Rn(this.secondaryColor),this.tertiaryTextColor=Rn(this.tertiaryColor),this.lineColor=Rn(this.background),this.textColor=Rn(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.vertLineColor="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.rowOdd=this.rowOdd||Xn(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Xn(this.contrast,55),this.border2=this.contrast,this.actorBorder=Xn(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[n]=t[n]}),this.updateColors(),e.forEach(n=>{this[n]=t[n]})}},qct=Q(t=>{const e=new zct;return e.calculate(t),e},"getThemeVariables"),$b={base:{getThemeVariables:Pct},dark:{getThemeVariables:Rct},default:{getThemeVariables:NN},forest:{getThemeVariables:Mct},neutral:{getThemeVariables:qct}},Mg={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,inheritDir:!1},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,maxLabelWidth:360,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"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},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,nodeSpacing:140,rankSpacing:80,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,showDataLabel:!1,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,layoutAlgorithm:"cose-bilkent"},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},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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},B$e={...Mg,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:$b.default.getThemeVariables(),sequence:{...Mg.sequence,messageFont:Q(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:Q(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:Q(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Mg.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Mg.c4,useWidth:void 0,personFont:Q(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Mg.flowchart,inheritDir:!1},external_personFont:Q(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:Q(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:Q(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:Q(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:Q(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:Q(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:Q(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:Q(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:Q(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:Q(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:Q(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:Q(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:Q(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:Q(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:Q(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:Q(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:Q(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:Q(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:Q(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:Q(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:Q(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Mg.pie,useWidth:984},xyChart:{...Mg.xyChart,useWidth:void 0},requirement:{...Mg.requirement,useWidth:void 0},packet:{...Mg.packet},radar:{...Mg.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},E$e=Q((t,e="")=>Object.keys(t).reduce((n,a)=>Array.isArray(t[a])?n:typeof t[a]=="object"&&t[a]!==null?[...n,e+a,...E$e(t[a],"")]:[...n,e+a],[]),"keyify"),jct=new Set(E$e(B$e,"")),Br=B$e,q9=Q(t=>{if(_e.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>q9(e));return}for(const e of Object.keys(t)){if(_e.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!jct.has(e)||t[e]==null){_e.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){_e.debug("sanitizing object",e),q9(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const a of n)e.includes(a)&&(_e.debug("sanitizing css option",e),t[e]=Uct(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}_e.debug("After sanitization",t)}},"sanitizeDirective"),Uct=Q(t=>{let e=0,n=0;for(const a of t){if(e{let n=Os({},t),a={};for(const r of e)I$e(r),a=Os(a,r);if(n=Os(n,a),a.theme&&a.theme in $b){const r=Os({},j9),i=Os(r.themeVariables||{},a.themeVariables);n.theme&&n.theme in $b&&(n.themeVariables=$b[n.theme].getThemeVariables(i))}return vI=n,D$e(vI),vI},"updateCurrentConfig"),Gct=Q(t=>(Bd=Os({},U_),Bd=Os(Bd,t),t.theme&&$b[t.theme]&&(Bd.themeVariables=$b[t.theme].getThemeVariables(t.themeVariables)),MN(Bd,E1),Bd),"setSiteConfig"),Hct=Q(t=>{j9=Os({},t)},"saveConfigFromInitialize"),Wct=Q(t=>(Bd=Os(Bd,t),MN(Bd,E1),Bd),"updateSiteConfig"),Q$e=Q(()=>Os({},Bd),"getSiteConfig"),S$e=Q(t=>(D$e(t),Os(vI,t),Pr()),"setConfig"),Pr=Q(()=>Os({},vI),"getConfig"),I$e=Q(t=>{t&&(["secure",...Bd.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(_e.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"&&I$e(t[e])}))},"sanitize"),Yct=Q(t=>{q9(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),E1.push(t),MN(Bd,E1)},"addDirective"),U9=Q((t=Bd)=>{E1=[],MN(t,E1)},"reset"),Xct={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},dme={},Vct=Q(t=>{dme[t]||(_e.warn(Xct[t]),dme[t]=!0)},"issueWarning"),D$e=Q(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Vct("LAZY_LOAD_DEPRECATED")},"checkConfig"),Zct=Q(()=>{let t={};j9&&(t=Os(t,j9));for(const e of E1)t=Os(t,e);return t},"getUserDefinedConfig"),KB=//gi,Kct=Q(t=>t?P$e(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Jct=(()=>{let t=!1;return()=>{t||($$e(),t=!0)}})();function $$e(){const t="data-temp-href-target";j_.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),j_.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}Q($$e,"setupDompurifyHooks");var T$e=Q(t=>(Jct(),j_.sanitize(t)),"removeScript"),pme=Q((t,e)=>{if(e.flowchart?.htmlLabels!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=T$e(t):n!=="loose"&&(t=P$e(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=alt(t))}return t},"sanitizeMore"),Qr=Q((t,e)=>t&&(e.dompurifyConfig?t=j_.sanitize(pme(t,e),e.dompurifyConfig).toString():t=j_.sanitize(pme(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),elt=Q((t,e)=>typeof t=="string"?Qr(t,e):t.flat().map(n=>Qr(n,e)),"sanitizeTextOrArray"),tlt=Q(t=>KB.test(t),"hasBreaks"),nlt=Q(t=>t.split(KB),"splitBreaks"),alt=Q(t=>t.replace(/#br#/g,"
    "),"placeholderToBreak"),P$e=Q(t=>t.replace(KB,"#br#"),"breakToPlaceholder"),w$=Q(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Ci=Q(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),rlt=Q(function(...t){const e=t.filter(n=>!isNaN(n));return Math.max(...e)},"getMax"),ilt=Q(function(...t){const e=t.filter(n=>!isNaN(n));return Math.min(...e)},"getMin"),m0=Q(function(t){const e=t.split(/(,)/),n=[];for(let a=0;a0&&a+1Math.max(0,t.split(e).length-1),"countOccurrence"),olt=Q((t,e)=>{const n=iZ(t,"~"),a=iZ(e,"~");return n===1&&a===1},"shouldCombineSets"),slt=Q(t=>{const e=iZ(t,"~");let n=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const a=[...t];let r=a.indexOf("~"),i=a.lastIndexOf("~");for(;r!==-1&&i!==-1&&r!==i;)a[r]="<",a[i]=">",r=a.indexOf("~"),i=a.lastIndexOf("~");return n&&a.unshift("~"),a.join("")},"processSet"),Ame=Q(()=>window.MathMLElement!==void 0,"isMathMLSupported"),oZ=/\$\$(.*)\$\$/g,is=Q(t=>(t.match(oZ)?.length??0)>0,"hasKatex"),v$=Q(async(t,e)=>{const n=document.createElement("div");n.innerHTML=await k$(t,e),n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",n);const r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},"calculateMathMLDimensions"),clt=Q(async(t,e)=>{if(!is(t))return t;if(!(Ame()||e.legacyMathML||e.forceLegacyMathML))return t.replace(oZ,"MathML is unsupported in this environment.");{const{default:n}=await ye(async()=>{const{default:r}=await Promise.resolve().then(()=>QK);return{default:r}},void 0,import.meta.url),a=e.forceLegacyMathML||!Ame()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(KB).map(r=>is(r)?`
    ${r}
    `:`
    ${r}
    `).join("").replace(oZ,(r,i)=>n.renderToString(i,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),k$=Q(async(t,e)=>Qr(await clt(t,e),e),"renderKatexSanitized"),kn={getRows:Kct,sanitizeText:Qr,sanitizeTextOrArray:elt,hasBreaks:tlt,splitBreaks:nlt,lineBreakRegex:KB,removeScript:T$e,getUrl:w$,evaluate:Ci,getMax:rlt,getMin:ilt},llt=Q(function(t,e){for(let n of e)t.attr(n[0],n[1])},"d3Attrs"),ult=Q(function(t,e,n){let a=new Map;return n?(a.set("width","100%"),a.set("style",`max-width: ${e}px;`)):(a.set("height",t),a.set("width",e)),a},"calculateSvgSizeAttrs"),ld=Q(function(t,e,n,a){const r=ult(e,n,a);llt(t,r)},"configureSvgSize"),x$=Q(function(t,e,n,a){const r=e.node().getBBox(),i=r.width,o=r.height;_e.info(`SVG bounds: ${i}x${o}`,r);let s=0,l=0;_e.info(`Graph bounds: ${s}x${l}`,t),s=i+n*2,l=o+n*2,_e.info(`Calculated bounds: ${s}x${l}`),ld(e,l,s,a);const u=`${r.x-n} ${r.y-n} ${r.width+2*n} ${r.height+2*n}`;e.attr("viewBox",u)},"setupGraphViewbox"),Y6={},dlt=Q((t,e,n)=>{let a="";return t in Y6&&Y6[t]?a=Y6[t](n):_e.warn(`No theme found for ${t}`),` & { font-family: ${n.fontFamily}; font-size: ${n.fontSize}; fill: ${n.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${n.errorBkgColor}; } & .error-text { fill: ${n.errorTextColor}; stroke: ${n.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${n.lineColor}; stroke: ${n.lineColor}; } & .marker.cross { stroke: ${n.lineColor}; } & svg { font-family: ${n.fontFamily}; font-size: ${n.fontSize}; } & p { margin: 0 } ${a} ${e} `},"getStyles"),plt=Q((t,e)=>{e!==void 0&&(Y6[t]=e)},"addStylesForDiagram"),Alt=dlt,aie={};PN(aie,{clear:()=>rc,getAccDescription:()=>$c,getAccTitle:()=>Ic,getDiagramTitle:()=>ic,setAccDescription:()=>Dc,setAccTitle:()=>tc,setDiagramTitle:()=>il});var rie="",iie="",oie="",sie=Q(t=>Qr(t,Pr()),"sanitizeText"),rc=Q(()=>{rie="",oie="",iie=""},"clear"),tc=Q(t=>{rie=sie(t).replace(/^\s+/g,"")},"setAccTitle"),Ic=Q(()=>rie,"getAccTitle"),Dc=Q(t=>{oie=sie(t).replace(/\n\s+/g,` `)},"setAccDescription"),$c=Q(()=>oie,"getAccDescription"),il=Q(t=>{iie=sie(t)},"setDiagramTitle"),ic=Q(()=>iie,"getDiagramTitle"),mme=_e,mlt=eie,ot=Pr,sZ=S$e,F$e=U_,cie=Q(t=>Qr(t,ot()),"sanitizeText"),R$e=x$,glt=Q(()=>aie,"getCommonDb"),G9={},H9=Q((t,e,n)=>{G9[t]&&mme.warn(`Diagram with id ${t} already registered. Overwriting.`),G9[t]=e,n&&_$e(t,n),plt(t,e.styles),e.injectUtils?.(mme,mlt,ot,cie,R$e,glt(),()=>{})},"registerDiagram"),cZ=Q(t=>{if(t in G9)return G9[t];throw new hlt(t)},"getDiagram"),hlt=class extends Error{static{Q(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function kI(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function flt(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function lie(t){let e,n,a;t.length!==2?(e=kI,n=(s,l)=>kI(t(s),l),a=(s,l)=>t(s)-l):(e=t===kI||t===flt?t:blt,n=t,a=t);function r(s,l,u=0,d=s.length){if(u>>1;n(s[p],l)<0?u=p+1:d=p}while(u>>1;n(s[p],l)<=0?u=p+1:d=p}while(uu&&a(s[p-1],l)>-a(s[p],l)?p-1:p}return{left:r,center:o,right:i}}function blt(){return 0}function ylt(t){return t===null?NaN:+t}const wlt=lie(kI),L$e=wlt.right;lie(ylt).center;class gme extends Map{constructor(e,n=xlt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[a,r]of e)this.set(a,r)}get(e){return super.get(hme(this,e))}has(e){return super.has(hme(this,e))}set(e,n){return super.set(vlt(this,e),n)}delete(e){return super.delete(klt(this,e))}}function hme({_intern:t,_key:e},n){const a=e(n);return t.has(a)?t.get(a):n}function vlt({_intern:t,_key:e},n){const a=e(n);return t.has(a)?t.get(a):(t.set(a,n),n)}function klt({_intern:t,_key:e},n){const a=e(n);return t.has(a)&&(n=t.get(a),t.delete(a)),n}function xlt(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Olt=Math.sqrt(50),Clt=Math.sqrt(10),_lt=Math.sqrt(2);function W9(t,e,n){const a=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(a)),i=a/Math.pow(10,r),o=i>=Olt?10:i>=Clt?5:i>=_lt?2:1;let s,l,u;return r<0?(u=Math.pow(10,-r)/o,s=Math.round(t*u),l=Math.round(e*u),s/ue&&--l,u=-u):(u=Math.pow(10,r)*o,s=Math.round(t/u),l=Math.round(e/u),s*ue&&--l),l0))return[];if(t===e)return[t];const a=e=r))return[];const s=i-r+1,l=new Array(s);if(a)if(o<0)for(let u=0;u=a)&&(n=a);else{let a=-1;for(let r of t)(r=e(r,++a,t))!=null&&(n=r)&&(n=r)}return n}function Qlt(t,e){let n;if(e===void 0)for(const a of t)a!=null&&(n>a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let r of t)(r=e(r,++a,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Slt(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var a=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(r);++a+t(e)}function Plt(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Flt(){return!this.__axis}function N$e(t,e){var n=[],a=null,r=null,i=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===X6||t===Y5?-1:1,d=t===Y5||t===Xj?"x":"y",p=t===X6||t===dZ?Dlt:$lt;function A(m){var g=a??(e.ticks?e.ticks.apply(e,n):e.domain()),h=r??(e.tickFormat?e.tickFormat.apply(e,n):Ilt),f=Math.max(i,0)+s,b=e.range(),y=+b[0]+l,w=+b[b.length-1]+l,v=(e.bandwidth?Plt:Tlt)(e.copy(),l),k=m.selection?m.selection():m,_=k.selectAll(".domain").data([null]),x=k.selectAll(".tick").data(g,e).order(),C=x.exit(),B=x.enter().append("g").attr("class","tick"),I=x.select("line"),E=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(B),I=I.merge(B.append("line").attr("stroke","currentColor").attr(d+"2",u*i)),E=E.merge(B.append("text").attr("fill","currentColor").attr(d,u*f).attr("dy",t===X6?"0em":t===dZ?"0.71em":"0.32em")),m!==k&&(_=_.transition(m),x=x.transition(m),I=I.transition(m),E=E.transition(m),C=C.transition(m).attr("opacity",fme).attr("transform",function(S){return isFinite(S=v(S))?p(S+l):this.getAttribute("transform")}),B.attr("opacity",fme).attr("transform",function(S){var P=this.parentNode.__axis;return p((P&&isFinite(P=P(S))?P:v(S))+l)})),C.remove(),_.attr("d",t===Y5||t===Xj?o?"M"+u*o+","+y+"H"+l+"V"+w+"H"+u*o:"M"+l+","+y+"V"+w:o?"M"+y+","+u*o+"V"+l+"H"+w+"V"+u*o:"M"+y+","+l+"H"+w),x.attr("opacity",1).attr("transform",function(S){return p(v(S)+l)}),I.attr(d+"2",u*i),E.attr(d,u*f).text(h),k.filter(Flt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Xj?"start":t===Y5?"end":"middle"),k.each(function(){this.__axis=v})}return A.scale=function(m){return arguments.length?(e=m,A):e},A.ticks=function(){return n=Array.from(arguments),A},A.tickArguments=function(m){return arguments.length?(n=m==null?[]:Array.from(m),A):n.slice()},A.tickValues=function(m){return arguments.length?(a=m==null?null:Array.from(m),A):a&&a.slice()},A.tickFormat=function(m){return arguments.length?(r=m,A):r},A.tickSize=function(m){return arguments.length?(i=o=+m,A):i},A.tickSizeInner=function(m){return arguments.length?(i=+m,A):i},A.tickSizeOuter=function(m){return arguments.length?(o=+m,A):o},A.tickPadding=function(m){return arguments.length?(s=+m,A):s},A.offset=function(m){return arguments.length?(l=+m,A):l},A}function Rlt(t){return N$e(X6,t)}function Llt(t){return N$e(dZ,t)}var Nlt={value:()=>{}};function O$(){for(var t=0,e=arguments.length,n={},a;t=0&&(a=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}V6.prototype=O$.prototype={constructor:V6,on:function(t,e){var n=this._,a=Mlt(t+"",n),r,i=-1,o=a.length;if(arguments.length<2){for(;++i0)for(var n=new Array(r),a=0,r,i;a=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),yme.hasOwnProperty(e)?{space:yme[e],local:t}:t}function qlt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===pZ&&e.documentElement.namespaceURI===pZ?e.createElement(t):e.createElementNS(n,t)}}function jlt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function M$e(t){var e=zN(t);return(e.local?jlt:qlt)(e)}function Ult(){}function uie(t){return t==null?Ult:function(){return this.querySelector(t)}}function Glt(t){typeof t!="function"&&(t=uie(t));for(var e=this._groups,n=e.length,a=new Array(n),r=0;r=w&&(w=y+1);!(k=f[w])&&++w=0;)(o=a[r])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function hut(t){t||(t=fut);function e(p,A){return p&&A?t(p.__data__,A.__data__):!p-!A}for(var n=this._groups,a=n.length,r=new Array(a),i=0;ie?1:t>=e?0:NaN}function but(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function yut(){return Array.from(this)}function wut(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?Iut:typeof e=="function"?$ut:Dut)(t,e,n??"")):G_(this.node(),t)}function G_(t,e){return t.style.getPropertyValue(e)||G$e(t).getComputedStyle(t,null).getPropertyValue(e)}function Put(t){return function(){delete this[t]}}function Fut(t,e){return function(){this[t]=e}}function Rut(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Lut(t,e){return arguments.length>1?this.each((e==null?Put:typeof e=="function"?Rut:Fut)(t,e)):this.node()[t]}function H$e(t){return t.trim().split(/^|\s+/)}function die(t){return t.classList||new W$e(t)}function W$e(t){this._node=t,this._names=H$e(t.getAttribute("class")||"")}W$e.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 Y$e(t,e){for(var n=die(t),a=-1,r=e.length;++a=0&&(n=e.slice(a+1),e=e.slice(0,a)),{type:e,name:n}})}function pdt(t){return function(){var e=this.__on;if(e){for(var n=0,a=-1,r=e.length,i;n()=>t;function AZ(t,{sourceEvent:e,subject:n,target:a,identifier:r,active:i,x:o,y:s,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}AZ.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function kdt(t){return!t.ctrlKey&&!t.button}function xdt(){return this.parentNode}function Odt(t,e){return e??{x:t.x,y:t.y}}function Cdt(){return navigator.maxTouchPoints||"ontouchstart"in this}function _dt(){var t=kdt,e=xdt,n=Odt,a=Cdt,r={},i=O$("start","drag","end"),o=0,s,l,u,d,p=0;function A(v){v.on("mousedown.drag",m).filter(a).on("touchstart.drag",f).on("touchmove.drag",b,vdt).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(v,k){if(!(d||!t.call(this,v,k))){var _=w(this,e.call(this,v,k),v,k,"mouse");_&&(en(v.view).on("mousemove.drag",g,f4).on("mouseup.drag",h,f4),K$e(v.view),Vj(v),u=!1,s=v.clientX,l=v.clientY,_("start",v))}}function g(v){if(p_(v),!u){var k=v.clientX-s,_=v.clientY-l;u=k*k+_*_>p}r.mouse("drag",v)}function h(v){en(v.view).on("mousemove.drag mouseup.drag",null),J$e(v.view,u),p_(v),r.mouse("end",v)}function f(v,k){if(t.call(this,v,k)){var _=v.changedTouches,x=e.call(this,v,k),C=_.length,B,I;for(B=0;B>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?V5(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?V5(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=Edt.exec(t))?new du(e[1],e[2],e[3],1):(e=Qdt.exec(t))?new du(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Sdt.exec(t))?V5(e[1],e[2],e[3],e[4]):(e=Idt.exec(t))?V5(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ddt.exec(t))?_me(e[1],e[2]/100,e[3]/100,1):(e=$dt.exec(t))?_me(e[1],e[2]/100,e[3]/100,e[4]):wme.hasOwnProperty(t)?xme(wme[t]):t==="transparent"?new du(NaN,NaN,NaN,0):null}function xme(t){return new du(t>>16&255,t>>8&255,t&255,1)}function V5(t,e,n,a){return a<=0&&(t=e=n=NaN),new du(t,e,n,a)}function e3e(t){return t instanceof vx||(t=Q1(t)),t?(t=t.rgb(),new du(t.r,t.g,t.b,t.opacity)):new du}function mZ(t,e,n,a){return arguments.length===1?e3e(t):new du(t,e,n,a??1)}function du(t,e,n,a){this.r=+t,this.g=+e,this.b=+n,this.opacity=+a}_$(du,mZ,qN(vx,{brighter(t){return t=t==null?X9:Math.pow(X9,t),new du(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?b4:Math.pow(b4,t),new du(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new du(d1(this.r),d1(this.g),d1(this.b),V9(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:Ome,formatHex:Ome,formatHex8:Fdt,formatRgb:Cme,toString:Cme}));function Ome(){return`#${Hk(this.r)}${Hk(this.g)}${Hk(this.b)}`}function Fdt(){return`#${Hk(this.r)}${Hk(this.g)}${Hk(this.b)}${Hk((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cme(){const t=V9(this.opacity);return`${t===1?"rgb(":"rgba("}${d1(this.r)}, ${d1(this.g)}, ${d1(this.b)}${t===1?")":`, ${t})`}`}function V9(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function d1(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Hk(t){return t=d1(t),(t<16?"0":"")+t.toString(16)}function _me(t,e,n,a){return a<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Jm(t,e,n,a)}function t3e(t){if(t instanceof Jm)return new Jm(t.h,t.s,t.l,t.opacity);if(t instanceof vx||(t=Q1(t)),!t)return new Jm;if(t instanceof Jm)return t;t=t.rgb();var e=t.r/255,n=t.g/255,a=t.b/255,r=Math.min(e,n,a),i=Math.max(e,n,a),o=NaN,s=i-r,l=(i+r)/2;return s?(e===i?o=(n-a)/s+(n0&&l<1?0:o,new Jm(o,s,l,t.opacity)}function Rdt(t,e,n,a){return arguments.length===1?t3e(t):new Jm(t,e,n,a??1)}function Jm(t,e,n,a){this.h=+t,this.s=+e,this.l=+n,this.opacity=+a}_$(Jm,Rdt,qN(vx,{brighter(t){return t=t==null?X9:Math.pow(X9,t),new Jm(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?b4:Math.pow(b4,t),new Jm(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,n=this.l,a=n+(n<.5?n:1-n)*e,r=2*n-a;return new du(Zj(t>=240?t-240:t+120,r,a),Zj(t,r,a),Zj(t<120?t+240:t-120,r,a),this.opacity)},clamp(){return new Jm(Bme(this.h),Z5(this.s),Z5(this.l),V9(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(){const t=V9(this.opacity);return`${t===1?"hsl(":"hsla("}${Bme(this.h)}, ${Z5(this.s)*100}%, ${Z5(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Bme(t){return t=(t||0)%360,t<0?t+360:t}function Z5(t){return Math.max(0,Math.min(1,t||0))}function Zj(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ldt=Math.PI/180,Ndt=180/Math.PI,Z9=18,n3e=.96422,a3e=1,r3e=.82521,i3e=4/29,m_=6/29,o3e=3*m_*m_,Mdt=m_*m_*m_;function s3e(t){if(t instanceof Qh)return new Qh(t.l,t.a,t.b,t.opacity);if(t instanceof yb)return c3e(t);t instanceof du||(t=e3e(t));var e=tU(t.r),n=tU(t.g),a=tU(t.b),r=Kj((.2225045*e+.7168786*n+.0606169*a)/a3e),i,o;return e===n&&n===a?i=o=r:(i=Kj((.4360747*e+.3850649*n+.1430804*a)/n3e),o=Kj((.0139322*e+.0971045*n+.7141733*a)/r3e)),new Qh(116*r-16,500*(i-r),200*(r-o),t.opacity)}function zdt(t,e,n,a){return arguments.length===1?s3e(t):new Qh(t,e,n,a??1)}function Qh(t,e,n,a){this.l=+t,this.a=+e,this.b=+n,this.opacity=+a}_$(Qh,zdt,qN(vx,{brighter(t){return new Qh(this.l+Z9*(t??1),this.a,this.b,this.opacity)},darker(t){return new Qh(this.l-Z9*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=n3e*Jj(e),t=a3e*Jj(t),n=r3e*Jj(n),new du(eU(3.1338561*e-1.6168667*t-.4906146*n),eU(-.9787684*e+1.9161415*t+.033454*n),eU(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Kj(t){return t>Mdt?Math.pow(t,1/3):t/o3e+i3e}function Jj(t){return t>m_?t*t*t:o3e*(t-i3e)}function eU(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function tU(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qdt(t){if(t instanceof yb)return new yb(t.h,t.c,t.l,t.opacity);if(t instanceof Qh||(t=s3e(t)),t.a===0&&t.b===0)return new yb(NaN,0()=>t;function l3e(t,e){return function(n){return t+n*e}}function jdt(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(a){return Math.pow(t+a*e,n)}}function Udt(t,e){var n=e-t;return n?l3e(t,n>180||n<-180?n-360*Math.round(n/360):n):jN(isNaN(t)?e:t)}function Gdt(t){return(t=+t)==1?xI:function(e,n){return n-e?jdt(e,n,t):jN(isNaN(e)?n:e)}}function xI(t,e){var n=e-t;return n?l3e(t,n):jN(isNaN(t)?e:t)}const K9=function t(e){var n=Gdt(e);function a(r,i){var o=n((r=mZ(r)).r,(i=mZ(i)).r),s=n(r.g,i.g),l=n(r.b,i.b),u=xI(r.opacity,i.opacity);return function(d){return r.r=o(d),r.g=s(d),r.b=l(d),r.opacity=u(d),r+""}}return a.gamma=t,a}(1);function Hdt(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,a=e.slice(),r;return function(i){for(r=0;rn&&(i=e.slice(n,i),s[o]?s[o]+=i:s[++o]=i),(a=a[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Hm(a,r)})),n=nU.lastIndex;return n180?d+=360:d-u>180&&(u+=360),A.push({i:p.push(r(p)+"rotate(",null,a)-2,x:Hm(u,d)})):d&&p.push(r(p)+"rotate("+d+a)}function s(u,d,p,A){u!==d?A.push({i:p.push(r(p)+"skewX(",null,a)-2,x:Hm(u,d)}):d&&p.push(r(p)+"skewX("+d+a)}function l(u,d,p,A,m,g){if(u!==p||d!==A){var h=m.push(r(m)+"scale(",null,",",null,")");g.push({i:h-4,x:Hm(u,p)},{i:h-2,x:Hm(d,A)})}else(p!==1||A!==1)&&m.push(r(m)+"scale("+p+","+A+")")}return function(u,d){var p=[],A=[];return u=t(u),d=t(d),i(u.translateX,u.translateY,d.translateX,d.translateY,p,A),o(u.rotate,d.rotate,p,A),s(u.skewX,d.skewX,p,A),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,p,A),u=d=null,function(m){for(var g=-1,h=A.length,f;++g=0&&t._call.call(void 0,e),t=t._next;--H_}function Sme(){S1=(eR=w4.now())+UN,H_=GQ=0;try{dpt()}finally{H_=0,Apt(),S1=0}}function ppt(){var t=w4.now(),e=t-eR;e>A3e&&(UN-=e,eR=t)}function Apt(){for(var t,e=J9,n,a=1/0;e;)e._call?(a>e._time&&(a=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:J9=n);HQ=t,bZ(a)}function bZ(t){if(!H_){GQ&&(GQ=clearTimeout(GQ));var e=t-S1;e>24?(t<1/0&&(GQ=setTimeout(Sme,t-w4.now()-UN)),_2&&(_2=clearInterval(_2))):(_2||(eR=w4.now(),_2=setInterval(ppt,A3e)),H_=1,m3e(Sme))}}function Ime(t,e,n){var a=new tR;return e=e==null?0:+e,a.restart(r=>{a.stop(),t(r+e)},e,n),a}var mpt=O$("start","end","cancel","interrupt"),gpt=[],g3e=0,Dme=1,yZ=2,Z6=3,$me=4,wZ=5,K6=6;function GN(t,e,n,a,r,i){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;hpt(t,n,{name:e,index:a,group:r,on:mpt,tween:gpt,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:g3e})}function gie(t,e){var n=bg(t,e);if(n.state>g3e)throw new Error("too late; already scheduled");return n}function Wh(t,e){var n=bg(t,e);if(n.state>Z6)throw new Error("too late; already running");return n}function bg(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function hpt(t,e,n){var a=t.__transition,r;a[e]=n,n.timer=mie(i,0,n.time);function i(u){n.state=Dme,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var d,p,A,m;if(n.state!==Dme)return l();for(d in a)if(m=a[d],m.name===n.name){if(m.state===Z6)return Ime(o);m.state===$me?(m.state=K6,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete a[d]):+dyZ&&a.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function Hpt(t,e,n){var a,r,i=Gpt(e)?gie:Wh;return function(){var o=i(this,t),s=o.on;s!==a&&(r=(a=s).copy()).on(e,n),o.on=r}}function Wpt(t,e){var n=this._id;return arguments.length<2?bg(this.node(),n).on.on(t):this.each(Hpt(n,t,e))}function Ypt(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Xpt(){return this.on("end.remove",Ypt(this._id))}function Vpt(t){var e=this._name,n=this._id;typeof t!="function"&&(t=uie(t));for(var a=this._groups,r=a.length,i=new Array(r),o=0;o=0))throw new Error(`invalid digits: ${t}`);if(e>15)return y3e;const n=10**e;return function(a){this._+=a[0];for(let r=1,i=a.length;rhk)if(!(Math.abs(p*l-u*d)>hk)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let m=a-o,g=r-s,h=l*l+u*u,f=m*m+g*g,b=Math.sqrt(h),y=Math.sqrt(A),w=i*Math.tan((vZ-Math.acos((h+A-f)/(2*b*y)))/2),v=w/y,k=w/b;Math.abs(v-1)>hk&&this._append`L${e+v*d},${n+v*p}`,this._append`A${i},${i},0,0,${+(p*m>d*g)},${this._x1=e+k*l},${this._y1=n+k*u}`}}arc(e,n,a,r,i,o){if(e=+e,n=+n,a=+a,o=!!o,a<0)throw new Error(`negative radius: ${a}`);let s=a*Math.cos(r),l=a*Math.sin(r),u=e+s,d=n+l,p=1^o,A=o?r-i:i-r;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>hk||Math.abs(this._y1-d)>hk)&&this._append`L${u},${d}`,a&&(A<0&&(A=A%kZ+kZ),A>vAt?this._append`A${a},${a},0,1,${p},${e-s},${n-l}A${a},${a},0,1,${p},${this._x1=u},${this._y1=d}`:A>hk&&this._append`A${a},${a},0,${+(A>=vZ)},${p},${this._x1=e+a*Math.cos(i)},${this._y1=n+a*Math.sin(i)}`)}rect(e,n,a,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${a=+a}v${+r}h${-a}Z`}toString(){return this._}};function Tme(t,e){var n,a=1;t==null&&(t=0),e==null&&(e=0);function r(){var i,o=n.length,s,l=0,u=0;for(i=0;i=(p=(s+u)/2))?s=p:u=p,(f=n>=(A=(l+d)/2))?l=A:d=A,r=i,!(i=i[b=f<<1|h]))return r[b]=o,t;if(m=+t._x.call(null,i.data),g=+t._y.call(null,i.data),e===m&&n===g)return o.next=i,r?r[b]=o:t._root=o,t;do r=r?r[b]=new Array(4):t._root=new Array(4),(h=e>=(p=(s+u)/2))?s=p:u=p,(f=n>=(A=(l+d)/2))?l=A:d=A;while((b=f<<1|h)===(y=(g>=A)<<1|m>=p));return r[y]=i,r[b]=o,t}function CAt(t){var e,n,a=t.length,r,i,o=new Array(a),s=new Array(a),l=1/0,u=1/0,d=-1/0,p=-1/0;for(n=0;nd&&(d=r),ip&&(p=i));if(l>d||u>p)return this;for(this.cover(l,u).cover(d,p),n=0;nt||t>=r||a>e||e>=i;)switch(u=(ed||(s=g.y0)>p||(l=g.x1)=b)<<1|t>=f)&&(g=A[A.length-1],A[A.length-1]=A[A.length-1-h],A[A.length-1-h]=g)}else{var y=t-+this._x.call(null,m.data),w=e-+this._y.call(null,m.data),v=y*y+w*w;if(v=(A=(o+l)/2))?o=A:l=A,(h=p>=(m=(s+u)/2))?s=m:u=m,e=n,!(n=n[f=h<<1|g]))return this;if(!n.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(a=e,b=f)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(i=n.next)&&delete n.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(a?a[b]=n:this._root=n),this):(this._root=i,this)}function IAt(t){for(var e=0,n=t.length;eA.index){var E=m-C.x-C.vx,S=g-C.y-C.vy,P=E*E+S*S;Pm+I||_g+I||xu.r&&(u.r=u[d].r)}function l(){if(e){var u,d=e.length,p;for(n=new Array(d),u=0;u[e(k,_,o),k])),v;for(f=0,s=new Array(b);f(t=(jAt*t+UAt)%Nme)/Nme}function HAt(t){return t.x}function WAt(t){return t.y}var YAt=10,XAt=Math.PI*(3-Math.sqrt(5));function VAt(t){var e,n=1,a=.001,r=1-Math.pow(a,1/300),i=0,o=.6,s=new Map,l=mie(p),u=O$("tick","end"),d=GAt();t==null&&(t=[]);function p(){A(),u.call("tick",e),n1?(f==null?s.delete(h):s.set(h,g(f)),e):s.get(h)},find:function(h,f,b){var y=0,w=t.length,v,k,_,x,C;for(b==null?b=1/0:b*=b,y=0;y1?(u.on(h,f),e):u.on(h)}}}function Mme(){var t,e,n,a,r=ng(-30),i,o=1,s=1/0,l=.81;function u(m){var g,h=t.length,f=fie(t,HAt,WAt).visitAfter(p);for(a=m,g=0;g=s)return;(m.data!==e||m.next)&&(b===0&&(b=I0(n),v+=b*b),y===0&&(y=I0(n),v+=y*y),v=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function nR(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,a=t.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+t.slice(n+1)]}function W_(t){return t=nR(Math.abs(t)),t?t[1]:NaN}function JAt(t,e){return function(n,a){for(var r=n.length,i=[],o=0,s=t[0],l=0;r>0&&s>0&&(l+s+1>a&&(s=Math.max(1,a-l)),i.push(n.substring(r-=s,r+s)),!((l+=s+1)>a));)s=t[o=(o+1)%t.length];return i.reverse().join(e)}}function emt(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var tmt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function aR(t){if(!(e=tmt.exec(t)))throw new Error("invalid format: "+t);var e;return new yie({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]})}aR.prototype=yie.prototype;function yie(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+""}yie.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 nmt(t){e:for(var e=t.length,n=1,a=-1,r;n0&&(a=0);break}return a>0?t.slice(0,a)+t.slice(r+1):t}var v3e;function amt(t,e){var n=nR(t,e);if(!n)return t+"";var a=n[0],r=n[1],i=r-(v3e=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=a.length;return i===o?a:i>o?a+new Array(i-o+1).join("0"):i>0?a.slice(0,i)+"."+a.slice(i):"0."+new Array(1-i).join("0")+nR(t,Math.max(0,e+i-1))[0]}function zme(t,e){var n=nR(t,e);if(!n)return t+"";var a=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+a:a.length>r+1?a.slice(0,r+1)+"."+a.slice(r+1):a+new Array(r-a.length+2).join("0")}const qme={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:KAt,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)=>zme(t*100,e),r:zme,s:amt,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jme(t){return t}var Ume=Array.prototype.map,Gme=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rmt(t){var e=t.grouping===void 0||t.thousands===void 0?jme:JAt(Ume.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",a=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?jme:emt(Ume.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(p){p=aR(p);var A=p.fill,m=p.align,g=p.sign,h=p.symbol,f=p.zero,b=p.width,y=p.comma,w=p.precision,v=p.trim,k=p.type;k==="n"?(y=!0,k="g"):qme[k]||(w===void 0&&(w=12),v=!0,k="g"),(f||A==="0"&&m==="=")&&(f=!0,A="0",m="=");var _=h==="$"?n:h==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",x=h==="$"?a:/[%p]/.test(k)?o:"",C=qme[k],B=/[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 I(E){var S=_,P=x,O,T,D;if(k==="c")P=C(E)+P,E="";else{E=+E;var $=E<0||1/E<0;if(E=isNaN(E)?l:C(Math.abs(E),w),v&&(E=nmt(E)),$&&+E==0&&g!=="+"&&($=!1),S=($?g==="("?g:s:g==="-"||g==="("?"":g)+S,P=(k==="s"?Gme[8+v3e/3]:"")+P+($&&g==="("?")":""),B){for(O=-1,T=E.length;++OD||D>57){P=(D===46?r+E.slice(O+1):E.slice(O))+P,E=E.slice(0,O);break}}}y&&!f&&(E=e(E,1/0));var F=S.length+E.length+P.length,L=F>1)+S+E+P+L.slice(F);break;default:E=L+S+E+P;break}return i(E)}return I.toString=function(){return p+""},I}function d(p,A){var m=u((p=aR(p),p.type="f",p)),g=Math.max(-8,Math.min(8,Math.floor(W_(A)/3)))*3,h=Math.pow(10,-g),f=Gme[8+g/3];return function(b){return m(h*b)+f}}return{format:u,formatPrefix:d}}var J5,Tk,k3e;imt({thousands:",",grouping:[3],currency:["$",""]});function imt(t){return J5=rmt(t),Tk=J5.format,k3e=J5.formatPrefix,J5}function omt(t){return Math.max(0,-W_(Math.abs(t)))}function smt(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(W_(e)/3)))*3-W_(Math.abs(t)))}function cmt(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,W_(e)-W_(t))+1}function lmt(t){var e=0,n=t.children,a=n&&n.length;if(!a)e=1;else for(;--a>=0;)e+=n[a].value;t.value=e}function umt(){return this.eachAfter(lmt)}function dmt(t,e){let n=-1;for(const a of this)t.call(e,a,++n,this);return this}function pmt(t,e){for(var n=this,a=[n],r,i,o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;i>=0;--i)a.push(r[i]);return this}function Amt(t,e){for(var n=this,a=[n],r=[],i,o,s,l=-1;n=a.pop();)if(r.push(n),i=n.children)for(o=0,s=i.length;o=0;)n+=a[r].value;e.value=n})}function hmt(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fmt(t){for(var e=this,n=bmt(e,t),a=[e];e!==n;)e=e.parent,a.push(e);for(var r=a.length;t!==n;)a.splice(r,0,t),t=t.parent;return a}function bmt(t,e){if(t===e)return t;var n=t.ancestors(),a=e.ancestors(),r=null;for(t=n.pop(),e=a.pop();t===e;)r=t,t=n.pop(),e=a.pop();return r}function ymt(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function wmt(){return Array.from(this)}function vmt(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function kmt(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*xmt(){var t=this,e,n=[t],a,r,i;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,a=t.children)for(r=0,i=a.length;r=0;--s)r.push(i=o[s]=new v4(o[s])),i.parent=a,i.depth=a.depth+1;return n.eachBefore(Emt)}function Omt(){return HN(this).eachBefore(Bmt)}function Cmt(t){return t.children}function _mt(t){return Array.isArray(t)?t[1]:null}function Bmt(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Emt(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function v4(t){this.data=t,this.depth=this.height=0,this.parent=null}v4.prototype=HN.prototype={constructor:v4,count:umt,each:dmt,eachAfter:Amt,eachBefore:pmt,find:mmt,sum:gmt,sort:hmt,path:fmt,ancestors:ymt,descendants:wmt,leaves:vmt,links:kmt,copy:Omt,[Symbol.iterator]:xmt};function Qmt(t){if(typeof t!="function")throw new Error;return t}function B2(){return 0}function E2(t){return function(){return t}}function Smt(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Imt(t,e,n,a,r){for(var i=t.children,o,s=-1,l=i.length,u=t.value&&(a-e)/t.value;++s=0;)i=a[r],i.z+=e,i.m+=e,e+=i.s+(n+=i.c)}function Pmt(t,e,n){return t.a.parent===e.parent?t.a:n}function eF(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}eF.prototype=Object.create(v4.prototype);function Fmt(t){for(var e=new eF(t,0),n,a=[e],r,i,o,s;n=a.pop();)if(i=n._.children)for(n.children=new Array(s=i.length),o=s-1;o>=0;--o)a.push(r=n.children[o]=new eF(i[o],o)),r.parent=n;return(e.parent=new eF(null,0)).children=[e],e}function Hme(){var t=Dmt,e=1,n=1,a=null;function r(u){var d=Fmt(u);if(d.eachAfter(i),d.parent.m=-d.z,d.eachBefore(o),a)u.eachBefore(l);else{var p=u,A=u,m=u;u.eachBefore(function(y){y.xA.x&&(A=y),y.depth>m.depth&&(m=y)});var g=p===A?1:t(p,A)/2,h=g-p.x,f=e/(A.x+g+h),b=n/(m.depth||1);u.eachBefore(function(y){y.x=(y.x+h)*f,y.y=y.depth*b})}return u}function i(u){var d=u.children,p=u.parent.children,A=u.i?p[u.i-1]:null;if(d){Tmt(u);var m=(d[0].z+d[d.length-1].z)/2;A?(u.z=A.z+t(u._,A._),u.m=u.z-m):u.z=m}else A&&(u.z=A.z+t(u._,A._));u.parent.A=s(u,A,u.parent.A||p[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,d,p){if(d){for(var A=u,m=u,g=d,h=A.parent.children[0],f=A.m,b=m.m,y=g.m,w=h.m,v;g=rU(g),A=aU(A),g&&A;)h=aU(h),m=rU(m),m.a=u,v=g.z+y-A.z-f+t(g._,A._),v>0&&($mt(Pmt(g,u,p),u,v),f+=v,b+=v),y+=g.m,f+=A.m,w+=h.m,b+=m.m;g&&!rU(m)&&(m.t=g,m.m+=y-b),A&&!aU(h)&&(h.t=A,h.m+=f-w,p=u)}return p}function l(u){u.x*=e,u.y=u.depth*n}return r.separation=function(u){return arguments.length?(t=u,r):t},r.size=function(u){return arguments.length?(a=!1,e=+u[0],n=+u[1],r):a?null:[e,n]},r.nodeSize=function(u){return arguments.length?(a=!0,e=+u[0],n=+u[1],r):a?[e,n]:null},r}function Rmt(t,e,n,a,r){for(var i=t.children,o,s=-1,l=i.length,u=t.value&&(r-n)/t.value;++sy&&(y=u),_=f*f*k,w=Math.max(y/_,_/b),w>v){f-=u;break}v=w}o.push(l={value:f,dice:m1?a:1)},n}(Lmt);function zmt(){var t=Mmt,e=!1,n=1,a=1,r=[0],i=B2,o=B2,s=B2,l=B2,u=B2;function d(A){return A.x0=A.y0=0,A.x1=n,A.y1=a,A.eachBefore(p),r=[0],e&&A.eachBefore(Smt),A}function p(A){var m=r[A.depth],g=A.x0+m,h=A.y0+m,f=A.x1-m,b=A.y1-m;fe&&(n=t,t=e,e=n),function(a){return Math.max(t,Math.min(e,a))}}function Gmt(t,e,n){var a=t[0],r=t[1],i=e[0],o=e[1];return r2?Hmt:Gmt,l=u=null,p}function p(A){return A==null||isNaN(A=+A)?i:(l||(l=s(t.map(a),e,n)))(a(o(A)))}return p.invert=function(A){return o(r((u||(u=s(e,t.map(a),Hm)))(A)))},p.domain=function(A){return arguments.length?(t=Array.from(A,jmt),d()):t.slice()},p.range=function(A){return arguments.length?(e=Array.from(A),d()):e.slice()},p.rangeRound=function(A){return e=Array.from(A),n=Jdt,d()},p.clamp=function(A){return arguments.length?(o=A?!0:WC,d()):o!==WC},p.interpolate=function(A){return arguments.length?(n=A,d()):n},p.unknown=function(A){return arguments.length?(i=A,p):i},function(A,m){return a=A,r=m,d()}}function O3e(){return Wmt()(WC,WC)}function Ymt(t,e,n,a){var r=uZ(t,e,n),i;switch(a=aR(a??",f"),a.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return a.precision==null&&!isNaN(i=smt(r,o))&&(a.precision=i),k3e(a,o)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(i=cmt(r,Math.max(Math.abs(t),Math.abs(e))))&&(a.precision=i-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(i=omt(r))&&(a.precision=i-(a.type==="%")*2);break}}return Tk(a)}function C3e(t){var e=t.domain;return t.ticks=function(n){var a=e();return Blt(a[0],a[a.length-1],n??10)},t.tickFormat=function(n,a){var r=e();return Ymt(r[0],r[r.length-1],n??10,a)},t.nice=function(n){n==null&&(n=10);var a=e(),r=0,i=a.length-1,o=a[r],s=a[i],l,u,d=10;for(s0;){if(u=lZ(o,s,n),u===l)return a[r]=o,a[i]=s,e(a);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function Y_(){var t=O3e();return t.copy=function(){return x3e(t,Y_())},B$.apply(t,arguments),C3e(t)}function Xmt(t,e){t=t.slice();var n=0,a=t.length-1,r=t[n],i=t[a],o;return i=n?[a[n-1],e]:[a[u-1],a[u]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return a.slice()},o.copy=function(){return _3e().domain([t,e]).range(r).unknown(i)},B$.apply(C3e(o),arguments)}const iU=new Date,oU=new Date;function Tc(t,e,n,a){function r(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return r.floor=i=>(t(i=new Date(+i)),i),r.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),r.round=i=>{const o=r(i),s=r.ceil(i);return i-o(e(i=new Date(+i),o==null?1:Math.floor(o)),i),r.range=(i,o,s)=>{const l=[];if(i=r.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let u;do l.push(u=new Date(+i)),e(i,s),t(i);while(uTc(o=>{if(o>=o)for(;t(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!i(o););else for(;--s>=0;)for(;e(o,1),!i(o););}),n&&(r.count=(i,o)=>(iU.setTime(+i),oU.setTime(+o),t(iU),t(oU),Math.floor(n(iU,oU))),r.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?r.filter(a?o=>a(o)%i===0:o=>r.count(0,o)%i===0):r)),r}const X_=Tc(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);X_.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tc(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):X_);X_.range;const wb=1e3,RA=wb*60,vb=RA*60,Xb=vb*24,wie=Xb*7,Xme=Xb*30,sU=Xb*365,D0=Tc(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*wb)},(t,e)=>(e-t)/wb,t=>t.getUTCSeconds());D0.range;const k4=Tc(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*wb)},(t,e)=>{t.setTime(+t+e*RA)},(t,e)=>(e-t)/RA,t=>t.getMinutes());k4.range;const Vmt=Tc(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*RA)},(t,e)=>(e-t)/RA,t=>t.getUTCMinutes());Vmt.range;const x4=Tc(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*wb-t.getMinutes()*RA)},(t,e)=>{t.setTime(+t+e*vb)},(t,e)=>(e-t)/vb,t=>t.getHours());x4.range;const Zmt=Tc(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*vb)},(t,e)=>(e-t)/vb,t=>t.getUTCHours());Zmt.range;const I1=Tc(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*RA)/Xb,t=>t.getDate()-1);I1.range;const vie=Tc(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Xb,t=>t.getUTCDate()-1);vie.range;const Kmt=Tc(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Xb,t=>Math.floor(t/Xb));Kmt.range;function kx(t){return Tc(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*RA)/wie)}const JB=kx(0),O4=kx(1),B3e=kx(2),E3e=kx(3),D1=kx(4),Q3e=kx(5),S3e=kx(6);JB.range;O4.range;B3e.range;E3e.range;D1.range;Q3e.range;S3e.range;function xx(t){return Tc(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/wie)}const I3e=xx(0),rR=xx(1),Jmt=xx(2),egt=xx(3),V_=xx(4),tgt=xx(5),ngt=xx(6);I3e.range;rR.range;Jmt.range;egt.range;V_.range;tgt.range;ngt.range;const C4=Tc(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());C4.range;const agt=Tc(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());agt.range;const Vb=Tc(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());Vb.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tc(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Vb.range;const $1=Tc(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());$1.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tc(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});$1.range;function rgt(t,e,n,a,r,i){const o=[[D0,1,wb],[D0,5,5*wb],[D0,15,15*wb],[D0,30,30*wb],[i,1,RA],[i,5,5*RA],[i,15,15*RA],[i,30,30*RA],[r,1,vb],[r,3,3*vb],[r,6,6*vb],[r,12,12*vb],[a,1,Xb],[a,2,2*Xb],[n,1,wie],[e,1,Xme],[e,3,3*Xme],[t,1,sU]];function s(u,d,p){const A=df).right(o,A);if(m===o.length)return t.every(uZ(u/sU,d/sU,p));if(m===0)return X_.every(Math.max(uZ(u,d,p),1));const[g,h]=o[A/o[m-1][2]53)return null;"w"in me||(me.w=1),"Z"in me?(ce=lU(Q2(me.y,0,1)),fe=ce.getUTCDay(),ce=fe>4||fe===0?rR.ceil(ce):rR(ce),ce=vie.offset(ce,(me.V-1)*7),me.y=ce.getUTCFullYear(),me.m=ce.getUTCMonth(),me.d=ce.getUTCDate()+(me.w+6)%7):(ce=cU(Q2(me.y,0,1)),fe=ce.getDay(),ce=fe>4||fe===0?O4.ceil(ce):O4(ce),ce=I1.offset(ce,(me.V-1)*7),me.y=ce.getFullYear(),me.m=ce.getMonth(),me.d=ce.getDate()+(me.w+6)%7)}else("W"in me||"U"in me)&&("w"in me||(me.w="u"in me?me.u%7:"W"in me?1:0),fe="Z"in me?lU(Q2(me.y,0,1)).getUTCDay():cU(Q2(me.y,0,1)).getDay(),me.m=0,me.d="W"in me?(me.w+6)%7+me.W*7-(fe+5)%7:me.w+me.U*7-(fe+6)%7);return"Z"in me?(me.H+=me.Z/100|0,me.M+=me.Z%100,lU(me)):cU(me)}}function C(ee,he,le,me){for(var be=0,ce=he.length,fe=le.length,Z,ze;be=fe)return-1;if(Z=he.charCodeAt(be++),Z===37){if(Z=he.charAt(be++),ze=k[Z in Vme?he.charAt(be++):Z],!ze||(me=ze(ee,le,me))<0)return-1}else if(Z!=le.charCodeAt(me++))return-1}return me}function B(ee,he,le){var me=u.exec(he.slice(le));return me?(ee.p=d.get(me[0].toLowerCase()),le+me[0].length):-1}function I(ee,he,le){var me=m.exec(he.slice(le));return me?(ee.w=g.get(me[0].toLowerCase()),le+me[0].length):-1}function E(ee,he,le){var me=p.exec(he.slice(le));return me?(ee.w=A.get(me[0].toLowerCase()),le+me[0].length):-1}function S(ee,he,le){var me=b.exec(he.slice(le));return me?(ee.m=y.get(me[0].toLowerCase()),le+me[0].length):-1}function P(ee,he,le){var me=h.exec(he.slice(le));return me?(ee.m=f.get(me[0].toLowerCase()),le+me[0].length):-1}function O(ee,he,le){return C(ee,e,he,le)}function T(ee,he,le){return C(ee,n,he,le)}function D(ee,he,le){return C(ee,a,he,le)}function $(ee){return o[ee.getDay()]}function F(ee){return i[ee.getDay()]}function L(ee){return l[ee.getMonth()]}function q(ee){return s[ee.getMonth()]}function M(ee){return r[+(ee.getHours()>=12)]}function R(ee){return 1+~~(ee.getMonth()/3)}function j(ee){return o[ee.getUTCDay()]}function W(ee){return i[ee.getUTCDay()]}function G(ee){return l[ee.getUTCMonth()]}function X(ee){return s[ee.getUTCMonth()]}function ne(ee){return r[+(ee.getUTCHours()>=12)]}function oe(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var he=_(ee+="",w);return he.toString=function(){return ee},he},parse:function(ee){var he=x(ee+="",!1);return he.toString=function(){return ee},he},utcFormat:function(ee){var he=_(ee+="",v);return he.toString=function(){return ee},he},utcParse:function(ee){var he=x(ee+="",!0);return he.toString=function(){return ee},he}}}var Vme={"-":"",_:" ",0:"0"},ol=/^\s*\d+/,cgt=/^%/,lgt=/[\\^$*+?|[\]().{}]/g;function Vr(t,e,n){var a=t<0?"-":"",r=(a?-t:t)+"",i=r.length;return a+(i[e.toLowerCase(),n]))}function dgt(t,e,n){var a=ol.exec(e.slice(n,n+1));return a?(t.w=+a[0],n+a[0].length):-1}function pgt(t,e,n){var a=ol.exec(e.slice(n,n+1));return a?(t.u=+a[0],n+a[0].length):-1}function Agt(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.U=+a[0],n+a[0].length):-1}function mgt(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.V=+a[0],n+a[0].length):-1}function ggt(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.W=+a[0],n+a[0].length):-1}function Zme(t,e,n){var a=ol.exec(e.slice(n,n+4));return a?(t.y=+a[0],n+a[0].length):-1}function Kme(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function hgt(t,e,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return a?(t.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function fgt(t,e,n){var a=ol.exec(e.slice(n,n+1));return a?(t.q=a[0]*3-3,n+a[0].length):-1}function bgt(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.m=a[0]-1,n+a[0].length):-1}function Jme(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.d=+a[0],n+a[0].length):-1}function ygt(t,e,n){var a=ol.exec(e.slice(n,n+3));return a?(t.m=0,t.d=+a[0],n+a[0].length):-1}function ege(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.H=+a[0],n+a[0].length):-1}function wgt(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.M=+a[0],n+a[0].length):-1}function vgt(t,e,n){var a=ol.exec(e.slice(n,n+2));return a?(t.S=+a[0],n+a[0].length):-1}function kgt(t,e,n){var a=ol.exec(e.slice(n,n+3));return a?(t.L=+a[0],n+a[0].length):-1}function xgt(t,e,n){var a=ol.exec(e.slice(n,n+6));return a?(t.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function Ogt(t,e,n){var a=cgt.exec(e.slice(n,n+1));return a?n+a[0].length:-1}function Cgt(t,e,n){var a=ol.exec(e.slice(n));return a?(t.Q=+a[0],n+a[0].length):-1}function _gt(t,e,n){var a=ol.exec(e.slice(n));return a?(t.s=+a[0],n+a[0].length):-1}function tge(t,e){return Vr(t.getDate(),e,2)}function Bgt(t,e){return Vr(t.getHours(),e,2)}function Egt(t,e){return Vr(t.getHours()%12||12,e,2)}function Qgt(t,e){return Vr(1+I1.count(Vb(t),t),e,3)}function D3e(t,e){return Vr(t.getMilliseconds(),e,3)}function Sgt(t,e){return D3e(t,e)+"000"}function Igt(t,e){return Vr(t.getMonth()+1,e,2)}function Dgt(t,e){return Vr(t.getMinutes(),e,2)}function $gt(t,e){return Vr(t.getSeconds(),e,2)}function Tgt(t){var e=t.getDay();return e===0?7:e}function Pgt(t,e){return Vr(JB.count(Vb(t)-1,t),e,2)}function $3e(t){var e=t.getDay();return e>=4||e===0?D1(t):D1.ceil(t)}function Fgt(t,e){return t=$3e(t),Vr(D1.count(Vb(t),t)+(Vb(t).getDay()===4),e,2)}function Rgt(t){return t.getDay()}function Lgt(t,e){return Vr(O4.count(Vb(t)-1,t),e,2)}function Ngt(t,e){return Vr(t.getFullYear()%100,e,2)}function Mgt(t,e){return t=$3e(t),Vr(t.getFullYear()%100,e,2)}function zgt(t,e){return Vr(t.getFullYear()%1e4,e,4)}function qgt(t,e){var n=t.getDay();return t=n>=4||n===0?D1(t):D1.ceil(t),Vr(t.getFullYear()%1e4,e,4)}function jgt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Vr(e/60|0,"0",2)+Vr(e%60,"0",2)}function nge(t,e){return Vr(t.getUTCDate(),e,2)}function Ugt(t,e){return Vr(t.getUTCHours(),e,2)}function Ggt(t,e){return Vr(t.getUTCHours()%12||12,e,2)}function Hgt(t,e){return Vr(1+vie.count($1(t),t),e,3)}function T3e(t,e){return Vr(t.getUTCMilliseconds(),e,3)}function Wgt(t,e){return T3e(t,e)+"000"}function Ygt(t,e){return Vr(t.getUTCMonth()+1,e,2)}function Xgt(t,e){return Vr(t.getUTCMinutes(),e,2)}function Vgt(t,e){return Vr(t.getUTCSeconds(),e,2)}function Zgt(t){var e=t.getUTCDay();return e===0?7:e}function Kgt(t,e){return Vr(I3e.count($1(t)-1,t),e,2)}function P3e(t){var e=t.getUTCDay();return e>=4||e===0?V_(t):V_.ceil(t)}function Jgt(t,e){return t=P3e(t),Vr(V_.count($1(t),t)+($1(t).getUTCDay()===4),e,2)}function eht(t){return t.getUTCDay()}function tht(t,e){return Vr(rR.count($1(t)-1,t),e,2)}function nht(t,e){return Vr(t.getUTCFullYear()%100,e,2)}function aht(t,e){return t=P3e(t),Vr(t.getUTCFullYear()%100,e,2)}function rht(t,e){return Vr(t.getUTCFullYear()%1e4,e,4)}function iht(t,e){var n=t.getUTCDay();return t=n>=4||n===0?V_(t):V_.ceil(t),Vr(t.getUTCFullYear()%1e4,e,4)}function oht(){return"+0000"}function age(){return"%"}function rge(t){return+t}function ige(t){return Math.floor(+t/1e3)}var SO,_4;sht({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"]});function sht(t){return SO=sgt(t),_4=SO.format,SO.parse,SO.utcFormat,SO.utcParse,SO}function cht(t){return new Date(t)}function lht(t){return t instanceof Date?+t:+new Date(+t)}function F3e(t,e,n,a,r,i,o,s,l,u){var d=O3e(),p=d.invert,A=d.domain,m=u(".%L"),g=u(":%S"),h=u("%I:%M"),f=u("%I %p"),b=u("%a %d"),y=u("%b %d"),w=u("%B"),v=u("%Y");function k(_){return(l(_)<_?m:s(_)<_?g:o(_)<_?h:i(_)<_?f:a(_)<_?r(_)<_?b:y:n(_)<_?w:v)(_)}return d.invert=function(_){return new Date(p(_))},d.domain=function(_){return arguments.length?A(Array.from(_,lht)):A().map(cht)},d.ticks=function(_){var x=A();return t(x[0],x[x.length-1],_??10)},d.tickFormat=function(_,x){return x==null?k:u(x)},d.nice=function(_){var x=A();return(!_||typeof _.range!="function")&&(_=e(x[0],x[x.length-1],_??10)),_?A(Xmt(x,_)):d},d.copy=function(){return x3e(d,F3e(t,e,n,a,r,i,o,s,l,u))},d}function uht(){return B$.apply(F3e(igt,ogt,Vb,C4,JB,I1,x4,k4,D0,_4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dht(t){for(var e=t.length/6|0,n=new Array(e),a=0;a1?0:t<-1?B4:Math.acos(t)}function sge(t){return t>=1?iR:t<=-1?-iR:Math.asin(t)}function kie(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const a=Math.floor(n);if(!(a>=0))throw new RangeError(`invalid digits: ${n}`);e=a}return t},()=>new xAt(e)}function ght(t){return t.innerRadius}function hht(t){return t.outerRadius}function fht(t){return t.startAngle}function bht(t){return t.endAngle}function yht(t){return t&&t.padAngle}function wht(t,e,n,a,r,i,o,s){var l=n-t,u=a-e,d=o-r,p=s-i,A=p*l-d*u;if(!(A*AO*O+T*T&&(C=I,B=E),{cx:C,cy:B,x01:-d,y01:-p,x11:C*(r/k-1),y11:B*(r/k-1)}}function Z_(){var t=ght,e=hht,n=Ro(0),a=null,r=fht,i=bht,o=yht,s=null,l=kie(u);function u(){var d,p,A=+t.apply(this,arguments),m=+e.apply(this,arguments),g=r.apply(this,arguments)-iR,h=i.apply(this,arguments)-iR,f=oge(h-g),b=h>g;if(s||(s=d=l()),mWl))s.moveTo(0,0);else if(f>tF-Wl)s.moveTo(m*Lv(g),m*zg(g)),s.arc(0,0,m,g,h,!b),A>Wl&&(s.moveTo(A*Lv(h),A*zg(h)),s.arc(0,0,A,h,g,b));else{var y=g,w=h,v=g,k=h,_=f,x=f,C=o.apply(this,arguments)/2,B=C>Wl&&(a?+a.apply(this,arguments):YC(A*A+m*m)),I=uU(oge(m-A)/2,+n.apply(this,arguments)),E=I,S=I,P,O;if(B>Wl){var T=sge(B/A*zg(C)),D=sge(B/m*zg(C));(_-=T*2)>Wl?(T*=b?1:-1,v+=T,k-=T):(_=0,v=k=(g+h)/2),(x-=D*2)>Wl?(D*=b?1:-1,y+=D,w-=D):(x=0,y=w=(g+h)/2)}var $=m*Lv(y),F=m*zg(y),L=A*Lv(k),q=A*zg(k);if(I>Wl){var M=m*Lv(w),R=m*zg(w),j=A*Lv(v),W=A*zg(v),G;if(fWl?S>Wl?(P=eT(j,W,$,F,m,S,b),O=eT(M,R,L,q,m,S,b),s.moveTo(P.cx+P.x01,P.cy+P.y01),SWl)||!(_>Wl)?s.lineTo(L,q):E>Wl?(P=eT(L,q,M,R,A,-E,b),O=eT($,F,j,W,A,-E,b),s.lineTo(P.cx+P.x01,P.cy+P.y01),Et?1:e>=t?0:NaN}function xht(t){return t}function Oht(){var t=xht,e=kht,n=null,a=Ro(0),r=Ro(tF),i=Ro(0);function o(s){var l,u=(s=R3e(s)).length,d,p,A=0,m=new Array(u),g=new Array(u),h=+a.apply(this,arguments),f=Math.min(tF,Math.max(-tF,r.apply(this,arguments)-h)),b,y=Math.min(Math.abs(f)/u,i.apply(this,arguments)),w=y*(f<0?-1:1),v;for(l=0;l0&&(A+=v);for(e!=null?m.sort(function(k,_){return e(g[k],g[_])}):n!=null&&m.sort(function(k,_){return n(s[k],s[_])}),l=0,p=A?(f-u*w)/A:0;l0?v*p:0)+w,g[d]={data:s[d],index:l,value:v,startAngle:h,endAngle:b,padAngle:y};return g}return o.value=function(s){return arguments.length?(t=typeof s=="function"?s:Ro(+s),o):t},o.sortValues=function(s){return arguments.length?(e=s,n=null,o):e},o.sort=function(s){return arguments.length?(n=s,e=null,o):n},o.startAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Ro(+s),o):a},o.endAngle=function(s){return arguments.length?(r=typeof s=="function"?s:Ro(+s),o):r},o.padAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ro(+s),o):i},o}function tT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class z3e{constructor(e,n){this._context=e,this._x=n}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,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class Cht{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const a=tT(this._x0,this._y0),r=tT(this._x0,this._y0=(this._y0+n)/2),i=tT(e,this._y0),o=tT(e,n);this._context.moveTo(...a),this._context.bezierCurveTo(...r,...i,...o)}this._x0=e,this._y0=n}}function q3e(t){return new z3e(t,!0)}function j3e(t){return new z3e(t,!1)}function _ht(t){return new Cht(t)}function Bht(t){return t.source}function Eht(t){return t.target}function Qht(t){let e=Bht,n=Eht,a=N3e,r=M3e,i=null,o=null,s=kie(l);function l(){let u;const d=vht.call(arguments),p=e.apply(this,d),A=n.apply(this,d);if(i==null&&(o=t(u=s())),o.lineStart(),d[0]=p,o.point(+a.apply(this,d),+r.apply(this,d)),d[0]=A,o.point(+a.apply(this,d),+r.apply(this,d)),o.lineEnd(),u)return o=null,u+""||null}return l.source=function(u){return arguments.length?(e=u,l):e},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(a=typeof u=="function"?u:Ro(+u),l):a},l.y=function(u){return arguments.length?(r=typeof u=="function"?u:Ro(+u),l):r},l.context=function(u){return arguments.length?(u==null?i=o=null:o=t(i=u),l):i},l}function Sht(){const t=Qht(_ht);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}function gw(){}function sR(t,e,n){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+n)/6)}function WN(t){this._context=t}WN.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:sR(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:sR(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function g_(t){return new WN(t)}function U3e(t){this._context=t}U3e.prototype={areaStart:gw,areaEnd:gw,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:sR(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Iht(t){return new U3e(t)}function G3e(t){this._context=t}G3e.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 n=(this._x0+4*this._x1+t)/6,a=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,a):this._context.moveTo(n,a);break;case 3:this._point=4;default:sR(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Dht(t){return new G3e(t)}function H3e(t,e){this._basis=new WN(t),this._beta=e}H3e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var a=t[0],r=e[0],i=t[n]-a,o=e[n]-r,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(a+l*i),this._beta*e[s]+(1-this._beta)*(r+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const $ht=function t(e){function n(a){return e===1?new WN(a):new H3e(a,e)}return n.beta=function(a){return t(+a)},n}(.85);function cR(t,e,n){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-n),t._x2,t._y2)}function xie(t,e){this._context=t,this._k=(1-e)/6}xie.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:cR(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:cR(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}};const W3e=function t(e){function n(a){return new xie(a,e)}return n.tension=function(a){return t(+a)},n}(0);function Oie(t,e){this._context=t,this._k=(1-e)/6}Oie.prototype={areaStart:gw,areaEnd:gw,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:cR(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}};const Tht=function t(e){function n(a){return new Oie(a,e)}return n.tension=function(a){return t(+a)},n}(0);function Cie(t,e){this._context=t,this._k=(1-e)/6}Cie.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:cR(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}};const Pht=function t(e){function n(a){return new Cie(a,e)}return n.tension=function(a){return t(+a)},n}(0);function _ie(t,e,n){var a=t._x1,r=t._y1,i=t._x2,o=t._y2;if(t._l01_a>Wl){var s=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);a=(a*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Wl){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*u+t._x1*t._l23_2a-e*t._l12_2a)/d,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/d}t._context.bezierCurveTo(a,r,i,o,t._x2,t._y2)}function Y3e(t,e){this._context=t,this._alpha=e}Y3e.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 n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,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:_ie(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}};const X3e=function t(e){function n(a){return e?new Y3e(a,e):new xie(a,0)}return n.alpha=function(a){return t(+a)},n}(.5);function V3e(t,e){this._context=t,this._alpha=e}V3e.prototype={areaStart:gw,areaEnd:gw,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 n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,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:_ie(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}};const Fht=function t(e){function n(a){return e?new V3e(a,e):new Oie(a,0)}return n.alpha=function(a){return t(+a)},n}(.5);function Z3e(t,e){this._context=t,this._alpha=e}Z3e.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 n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,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:_ie(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}};const Rht=function t(e){function n(a){return e?new Z3e(a,e):new Cie(a,0)}return n.alpha=function(a){return t(+a)},n}(.5);function K3e(t){this._context=t}K3e.prototype={areaStart:gw,areaEnd:gw,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 Lht(t){return new K3e(t)}function cge(t){return t<0?-1:1}function lge(t,e,n){var a=t._x1-t._x0,r=e-t._x1,i=(t._y1-t._y0)/(a||r<0&&-0),o=(n-t._y1)/(r||a<0&&-0),s=(i*r+o*a)/(a+r);return(cge(i)+cge(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function uge(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function dU(t,e,n){var a=t._x0,r=t._y0,i=t._x1,o=t._y1,s=(i-a)/3;t._context.bezierCurveTo(a+s,r+s*e,i-s,o-s*n,i,o)}function lR(t){this._context=t}lR.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:dU(this,this._t0,uge(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 n=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,dU(this,uge(this,n=lge(this,t,e)),n);break;default:dU(this,this._t0,n=lge(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function J3e(t){this._context=new e5e(t)}(J3e.prototype=Object.create(lR.prototype)).point=function(t,e){lR.prototype.point.call(this,e,t)};function e5e(t){this._context=t}e5e.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,n,a,r,i){this._context.bezierCurveTo(e,t,a,n,i,r)}};function t5e(t){return new lR(t)}function n5e(t){return new J3e(t)}function a5e(t){this._context=t}a5e.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,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var a=dge(t),r=dge(e),i=0,o=1;o=0;--e)r[e]=(o[e]-r[e+1])/i[e];for(i[n-1]=(t[n]+r[n-1])/2,e=0;e=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 n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function i5e(t){return new YN(t,.5)}function o5e(t){return new YN(t,0)}function s5e(t){return new YN(t,1)}const nT=t=>()=>t;function Nht(t,{sourceEvent:e,target:n,transform:a,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:r}})}function kb(t,e,n){this.k=t,this.x=e,this.y=n}kb.prototype={constructor:kb,scale:function(t){return t===1?this:new kb(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new kb(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+")"}};var Bie=new kb(1,0,0);kb.prototype;function pU(t){t.stopImmediatePropagation()}function D2(t){t.preventDefault(),t.stopImmediatePropagation()}function Mht(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function zht(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function pge(){return this.__zoom||Bie}function qht(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function jht(){return navigator.maxTouchPoints||"ontouchstart"in this}function Uht(t,e,n){var a=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>a?(a+r)/2:Math.min(0,a)||Math.max(0,r),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function CZ(){var t=Mht,e=zht,n=Uht,a=qht,r=jht,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=spt,u=O$("start","zoom","end"),d,p,A,m=500,g=150,h=0,f=10;function b(O){O.property("__zoom",pge).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",I).filter(r).on("touchstart.zoom",E).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(O,T,D,$){var F=O.selection?O.selection():O;F.property("__zoom",pge),O!==F?k(O,T,D,$):F.interrupt().each(function(){_(this,arguments).event($).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},b.scaleBy=function(O,T,D,$){b.scaleTo(O,function(){var F=this.__zoom.k,L=typeof T=="function"?T.apply(this,arguments):T;return F*L},D,$)},b.scaleTo=function(O,T,D,$){b.transform(O,function(){var F=e.apply(this,arguments),L=this.__zoom,q=D==null?v(F):typeof D=="function"?D.apply(this,arguments):D,M=L.invert(q),R=typeof T=="function"?T.apply(this,arguments):T;return n(w(y(L,R),q,M),F,o)},D,$)},b.translateBy=function(O,T,D,$){b.transform(O,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof D=="function"?D.apply(this,arguments):D),e.apply(this,arguments),o)},null,$)},b.translateTo=function(O,T,D,$,F){b.transform(O,function(){var L=e.apply(this,arguments),q=this.__zoom,M=$==null?v(L):typeof $=="function"?$.apply(this,arguments):$;return n(Bie.translate(M[0],M[1]).scale(q.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof D=="function"?-D.apply(this,arguments):-D),L,o)},$,F)};function y(O,T){return T=Math.max(i[0],Math.min(i[1],T)),T===O.k?O:new kb(T,O.x,O.y)}function w(O,T,D){var $=T[0]-D[0]*O.k,F=T[1]-D[1]*O.k;return $===O.x&&F===O.y?O:new kb(O.k,$,F)}function v(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function k(O,T,D,$){O.on("start.zoom",function(){_(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event($).end()}).tween("zoom",function(){var F=this,L=arguments,q=_(F,L).event($),M=e.apply(F,L),R=D==null?v(M):typeof D=="function"?D.apply(F,L):D,j=Math.max(M[1][0]-M[0][0],M[1][1]-M[0][1]),W=F.__zoom,G=typeof T=="function"?T.apply(F,L):T,X=l(W.invert(R).concat(j/W.k),G.invert(R).concat(j/G.k));return function(ne){if(ne===1)ne=G;else{var oe=X(ne),ee=j/oe[2];ne=new kb(ee,R[0]-oe[0]*ee,R[1]-oe[1]*ee)}q.zoom(null,ne)}})}function _(O,T,D){return!D&&O.__zooming||new x(O,T)}function x(O,T){this.that=O,this.args=T,this.active=0,this.sourceEvent=null,this.extent=e.apply(O,T),this.taps=0}x.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,T){return this.mouse&&O!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var T=en(this.that).datum();u.call(O,this.that,new Nht(O,{sourceEvent:this.sourceEvent,target:b,type:O,transform:this.that.__zoom,dispatch:u}),T)}};function C(O,...T){if(!t.apply(this,arguments))return;var D=_(this,T).event(O),$=this.__zoom,F=Math.max(i[0],Math.min(i[1],$.k*Math.pow(2,a.apply(this,arguments)))),L=tb(O);if(D.wheel)(D.mouse[0][0]!==L[0]||D.mouse[0][1]!==L[1])&&(D.mouse[1]=$.invert(D.mouse[0]=L)),clearTimeout(D.wheel);else{if($.k===F)return;D.mouse=[L,$.invert(L)],J6(this),D.start()}D2(O),D.wheel=setTimeout(q,g),D.zoom("mouse",n(w(y($,F),D.mouse[0],D.mouse[1]),D.extent,o));function q(){D.wheel=null,D.end()}}function B(O,...T){if(A||!t.apply(this,arguments))return;var D=O.currentTarget,$=_(this,T,!0).event(O),F=en(O.view).on("mousemove.zoom",R,!0).on("mouseup.zoom",j,!0),L=tb(O,D),q=O.clientX,M=O.clientY;K$e(O.view),pU(O),$.mouse=[L,this.__zoom.invert(L)],J6(this),$.start();function R(W){if(D2(W),!$.moved){var G=W.clientX-q,X=W.clientY-M;$.moved=G*G+X*X>h}$.event(W).zoom("mouse",n(w($.that.__zoom,$.mouse[0]=tb(W,D),$.mouse[1]),$.extent,o))}function j(W){F.on("mousemove.zoom mouseup.zoom",null),J$e(W.view,$.moved),D2(W),$.event(W).end()}}function I(O,...T){if(t.apply(this,arguments)){var D=this.__zoom,$=tb(O.changedTouches?O.changedTouches[0]:O,this),F=D.invert($),L=D.k*(O.shiftKey?.5:2),q=n(w(y(D,L),$,F),e.apply(this,T),o);D2(O),s>0?en(this).transition().duration(s).call(k,q,$,O):en(this).call(b.transform,q,$,O)}}function E(O,...T){if(t.apply(this,arguments)){var D=O.touches,$=D.length,F=_(this,T,O.changedTouches.length===$).event(O),L,q,M,R;for(pU(O),q=0;q<$;++q)M=D[q],R=tb(M,this),R=[R,this.__zoom.invert(R),M.identifier],F.touch0?!F.touch1&&F.touch0[2]!==R[2]&&(F.touch1=R,F.taps=0):(F.touch0=R,L=!0,F.taps=1+!!d);d&&(d=clearTimeout(d)),L&&(F.taps<2&&(p=R[0],d=setTimeout(function(){d=null},m)),J6(this),F.start())}}function S(O,...T){if(this.__zooming){var D=_(this,T).event(O),$=O.changedTouches,F=$.length,L,q,M,R;for(D2(O),L=0;L{const{securityLevel:e}=ot();let n=en("body");if(e==="sandbox"){const i=en(`#i${t}`).node()?.contentDocument??document;n=en(i.body)}return n.select(`#${t}`)},"selectSvgElement");function Eie(t){return typeof t>"u"||t===null}Q(Eie,"isNothing");function c5e(t){return typeof t=="object"&&t!==null}Q(c5e,"isObject");function l5e(t){return Array.isArray(t)?t:Eie(t)?[]:[t]}Q(l5e,"toArray");function u5e(t,e){var n,a,r,i;if(e)for(i=Object.keys(e),n=0,a=i.length;ns&&(i=" ... ",e=a-s+i.length),n-a>s&&(o=" ...",n=a+s-o.length),{str:i+t.slice(e,n).replace(/\t/g,"→")+o,pos:a-e+i.length}}Q(nF,"getLine");function aF(t,e){return Oc.repeat(" ",e-t.length)+t}Q(aF,"padStart");function A5e(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 n=/\r?\n|\r|\0/g,a=[0],r=[],i,o=-1;i=n.exec(t.buffer);)r.push(i.index),a.push(i.index+i[0].length),t.position<=i.index&&o<0&&(o=a.length-2);o<0&&(o=a.length-1);var s="",l,u,d=Math.min(t.line+e.linesAfter,r.length).toString().length,p=e.maxLength-(e.indent+d+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)u=nF(t.buffer,a[o-l],r[o-l],t.position-(a[o]-a[o-l]),p),s=Oc.repeat(" ",e.indent)+aF((t.line-l+1).toString(),d)+" | "+u.str+` `+s;for(u=nF(t.buffer,a[o],r[o],t.position,p),s+=Oc.repeat(" ",e.indent)+aF((t.line+1).toString(),d)+" | "+u.str+` `,s+=Oc.repeat("-",e.indent+d+3+u.pos)+`^ `,l=1;l<=e.linesAfter&&!(o+l>=r.length);l++)u=nF(t.buffer,a[o+l],r[o+l],t.position-(a[o]-a[o+l]),p),s+=Oc.repeat(" ",e.indent)+aF((t.line+l+1).toString(),d)+" | "+u.str+` `;return s.replace(/\n$/,"")}Q(A5e,"makeSnippet");var Zht=A5e,Kht=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Jht=["scalar","sequence","mapping"];function m5e(t){var e={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(a){e[String(a)]=n})}),e}Q(m5e,"compileStyleAliases");function g5e(t,e){if(e=e||{},Object.keys(e).forEach(function(n){if(Kht.indexOf(n)===-1)throw new Id('Unknown option "'+n+'" 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(n){return n},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=m5e(e.styleAliases||null),Jht.indexOf(this.kind)===-1)throw new Id('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}Q(g5e,"Type$1");var gu=g5e;function _Z(t,e){var n=[];return t[e].forEach(function(a){var r=n.length;n.forEach(function(i,o){i.tag===a.tag&&i.kind===a.kind&&i.multi===a.multi&&(r=o)}),n[r]=a}),n}Q(_Z,"compileList");function h5e(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,n;function a(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r}for(Q(a,"collectType"),e=0,n=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:Q(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:Q(function(t){return t.toString(10)},"decimal"),hexadecimal:Q(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"]}}),cft=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Q5e(t){return!(t===null||!cft.test(t)||t[t.length-1]==="_")}Q(Q5e,"resolveYamlFloat");function S5e(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}Q(S5e,"constructYamlFloat");var lft=/^[-+]?[0-9]+e/;function I5e(t,e){var n;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(Oc.isNegativeZero(t))return"-0.0";return n=t.toString(10),lft.test(n)?n.replace("e",".e"):n}Q(I5e,"representYamlFloat");function D5e(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Oc.isNegativeZero(t))}Q(D5e,"isFloat");var uft=new gu("tag:yaml.org,2002:float",{kind:"scalar",resolve:Q5e,construct:S5e,predicate:D5e,represent:I5e,defaultStyle:"lowercase"}),$5e=rft.extend({implicit:[ift,oft,sft,uft]}),dft=$5e,T5e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P5e=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]))?))?$");function F5e(t){return t===null?!1:T5e.exec(t)!==null||P5e.exec(t)!==null}Q(F5e,"resolveYamlTimestamp");function R5e(t){var e,n,a,r,i,o,s,l=0,u=null,d,p,A;if(e=T5e.exec(t),e===null&&(e=P5e.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],a=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,a,r));if(i=+e[4],o=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(d=+e[10],p=+(e[11]||0),u=(d*60+p)*6e4,e[9]==="-"&&(u=-u)),A=new Date(Date.UTC(n,a,r,i,o,s,l)),u&&A.setTime(A.getTime()-u),A}Q(R5e,"constructYamlTimestamp");function L5e(t){return t.toISOString()}Q(L5e,"representYamlTimestamp");var pft=new gu("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:F5e,construct:R5e,instanceOf:Date,represent:L5e});function N5e(t){return t==="<<"||t===null}Q(N5e,"resolveYamlMerge");var Aft=new gu("tag:yaml.org,2002:merge",{kind:"scalar",resolve:N5e}),Sie=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function M5e(t){if(t===null)return!1;var e,n,a=0,r=t.length,i=Sie;for(n=0;n64)){if(e<0)return!1;a+=6}return a%8===0}Q(M5e,"resolveYamlBinary");function z5e(t){var e,n,a=t.replace(/[\r\n=]/g,""),r=a.length,i=Sie,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|i.indexOf(a.charAt(e));return n=r%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}Q(z5e,"constructYamlBinary");function q5e(t){var e="",n=0,a,r,i=t.length,o=Sie;for(a=0;a>18&63],e+=o[n>>12&63],e+=o[n>>6&63],e+=o[n&63]),n=(n<<8)+t[a];return r=i%3,r===0?(e+=o[n>>18&63],e+=o[n>>12&63],e+=o[n>>6&63],e+=o[n&63]):r===2?(e+=o[n>>10&63],e+=o[n>>4&63],e+=o[n<<2&63],e+=o[64]):r===1&&(e+=o[n>>2&63],e+=o[n<<4&63],e+=o[64],e+=o[64]),e}Q(q5e,"representYamlBinary");function j5e(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}Q(j5e,"isBinary");var mft=new gu("tag:yaml.org,2002:binary",{kind:"scalar",resolve:M5e,construct:z5e,predicate:j5e,represent:q5e}),gft=Object.prototype.hasOwnProperty,hft=Object.prototype.toString;function U5e(t){if(t===null)return!0;var e=[],n,a,r,i,o,s=t;for(n=0,a=s.length;n>10)+55296,(t-65536&1023)+56320)}Q(rTe,"charFromCodepoint");var iTe=new Array(256),oTe=new Array(256);for(Nv=0;Nv<256;Nv++)iTe[Nv]=EZ(Nv)?1:0,oTe[Nv]=EZ(Nv);var Nv;function sTe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||V5e,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=[]}Q(sTe,"State$1");function Iie(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Zht(n),new Id(e,n)}Q(Iie,"generateError");function ua(t,e){throw Iie(t,e)}Q(ua,"throwError");function Q4(t,e){t.onWarning&&t.onWarning.call(null,Iie(t,e))}Q(Q4,"throwWarning");var mge={YAML:Q(function(e,n,a){var r,i,o;e.version!==null&&ua(e,"duplication of %YAML directive"),a.length!==1&&ua(e,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),r===null&&ua(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),i!==1&&ua(e,"unacceptable YAML version of the document"),e.version=a[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Q4(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Q(function(e,n,a){var r,i;a.length!==2&&ua(e,"TAG directive accepts exactly two arguments"),r=a[0],i=a[1],J5e.test(r)||ua(e,"ill-formed tag handle (first argument) of the TAG directive"),hw.call(e.tagMap,r)&&ua(e,'there is a previously declared suffix for "'+r+'" tag handle'),eTe.test(i)||ua(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{ua(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i},"handleTagDirective")};function Tb(t,e,n,a){var r,i,o,s;if(e1&&(t.result+=Oc.repeat(` `,e-1))}Q(VN,"writeFoldedLines");function cTe(t,e,n){var a,r,i,o,s,l,u,d,p=t.kind,A=t.result,m;if(m=t.input.charCodeAt(t.position),Yu(m)||Wk(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(r=t.input.charCodeAt(t.position+1),Yu(r)||n&&Wk(r)))return!1;for(t.kind="scalar",t.result="",i=o=t.position,s=!1;m!==0;){if(m===58){if(r=t.input.charCodeAt(t.position+1),Yu(r)||n&&Wk(r))break}else if(m===35){if(a=t.input.charCodeAt(t.position-1),Yu(a))break}else{if(t.position===t.lineStart&&E$(t)||n&&Wk(m))break;if(rg(m))if(l=t.line,u=t.lineStart,d=t.lineIndent,Cs(t,!1,-1),t.lineIndent>=e){s=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=u,t.lineIndent=d;break}}s&&(Tb(t,i,o,!1),VN(t,t.line-l),i=o=t.position,s=!1),rw(m)||(o=t.position+1),m=t.input.charCodeAt(++t.position)}return Tb(t,i,o,!1),t.result?!0:(t.kind=p,t.result=A,!1)}Q(cTe,"readPlainScalar");function lTe(t,e){var n,a,r;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,a=r=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(Tb(t,a,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)a=t.position,t.position++,r=t.position;else return!0;else rg(n)?(Tb(t,a,r,!0),VN(t,Cs(t,!1,e)),a=r=t.position):t.position===t.lineStart&&E$(t)?ua(t,"unexpected end of the document within a single quoted scalar"):(t.position++,r=t.position);ua(t,"unexpected end of the stream within a single quoted scalar")}Q(lTe,"readSingleQuotedScalar");function uTe(t,e){var n,a,r,i,o,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=a=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return Tb(t,n,t.position,!0),t.position++,!0;if(s===92){if(Tb(t,n,t.position,!0),s=t.input.charCodeAt(++t.position),rg(s))Cs(t,!1,e);else if(s<256&&iTe[s])t.result+=oTe[s],t.position++;else if((o=nTe(s))>0){for(r=o,i=0;r>0;r--)s=t.input.charCodeAt(++t.position),(o=tTe(s))>=0?i=(i<<4)+o:ua(t,"expected hexadecimal character");t.result+=rTe(i),t.position++}else ua(t,"unknown escape sequence");n=a=t.position}else rg(s)?(Tb(t,n,a,!0),VN(t,Cs(t,!1,e)),n=a=t.position):t.position===t.lineStart&&E$(t)?ua(t,"unexpected end of the document within a double quoted scalar"):(t.position++,a=t.position)}ua(t,"unexpected end of the stream within a double quoted scalar")}Q(uTe,"readDoubleQuotedScalar");function dTe(t,e){var n=!0,a,r,i,o=t.tag,s,l=t.anchor,u,d,p,A,m,g=Object.create(null),h,f,b,y;if(y=t.input.charCodeAt(t.position),y===91)d=93,m=!1,s=[];else if(y===123)d=125,m=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),y=t.input.charCodeAt(++t.position);y!==0;){if(Cs(t,!0,e),y=t.input.charCodeAt(t.position),y===d)return t.position++,t.tag=o,t.anchor=l,t.kind=m?"mapping":"sequence",t.result=s,!0;n?y===44&&ua(t,"expected the node content, but found ','"):ua(t,"missed comma between flow collection entries"),f=h=b=null,p=A=!1,y===63&&(u=t.input.charCodeAt(t.position+1),Yu(u)&&(p=A=!0,t.position++,Cs(t,!0,e))),a=t.line,r=t.lineStart,i=t.position,T1(t,e,dR,!1,!0),f=t.tag,h=t.result,Cs(t,!0,e),y=t.input.charCodeAt(t.position),(A||t.line===a)&&y===58&&(p=!0,y=t.input.charCodeAt(++t.position),Cs(t,!0,e),T1(t,e,dR,!1,!0),b=t.result),m?Yk(t,s,g,f,h,b,a,r,i):p?s.push(Yk(t,null,g,f,h,b,a,r,i)):s.push(h),Cs(t,!0,e),y=t.input.charCodeAt(t.position),y===44?(n=!0,y=t.input.charCodeAt(++t.position)):n=!1}ua(t,"unexpected end of the stream within a flow collection")}Q(dTe,"readFlowCollection");function pTe(t,e){var n,a,r=AU,i=!1,o=!1,s=e,l=0,u=!1,d,p;if(p=t.input.charCodeAt(t.position),p===124)a=!1;else if(p===62)a=!0;else return!1;for(t.kind="scalar",t.result="";p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)AU===r?r=p===43?Age:kft:ua(t,"repeat of a chomping mode identifier");else if((d=aTe(p))>=0)d===0?ua(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ua(t,"repeat of an indentation width identifier"):(s=e+d-1,o=!0);else break;if(rw(p)){do p=t.input.charCodeAt(++t.position);while(rw(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!rg(p)&&p!==0)}for(;p!==0;){for(XN(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!o||t.lineIndents&&(s=t.lineIndent),rg(p)){l++;continue}if(t.lineIndente)&&l!==0)ua(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(f&&(o=t.line,s=t.lineStart,l=t.position),T1(t,e,pR,!0,r)&&(f?g=t.result:h=t.result),f||(Yk(t,p,A,m,g,h,o,s,l),m=g=h=null),Cs(t,!0,-1),y=t.input.charCodeAt(t.position)),(t.line===i||t.lineIndent>e)&&y!==0)ua(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),p=0,A=t.implicitTypes.length;p"),t.result!==null&&g.kind!==t.kind&&ua(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)):ua(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}Q(T1,"composeNode");function fTe(t){var e=t.position,n,a,r,i=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(Cs(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(i=!0,o=t.input.charCodeAt(++t.position),n=t.position;o!==0&&!Yu(o);)o=t.input.charCodeAt(++t.position);for(a=t.input.slice(n,t.position),r=[],a.length<1&&ua(t,"directive name must not be less than one character in length");o!==0;){for(;rw(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!rg(o));break}if(rg(o))break;for(n=t.position;o!==0&&!Yu(o);)o=t.input.charCodeAt(++t.position);r.push(t.input.slice(n,t.position))}o!==0&&XN(t),hw.call(mge,a)?mge[a](t,a,r):Q4(t,'unknown document directive "'+a+'"')}if(Cs(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,Cs(t,!0,-1)):i&&ua(t,"directives end mark is expected"),T1(t,t.lineIndent-1,pR,!1,!0),Cs(t,!0,-1),t.checkLineBreaks&&Oft.test(t.input.slice(e,t.position))&&Q4(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&E$(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Cs(t,!0,-1));return}if(t.position"u"&&(n=e,e=null);var a=Die(t,n);if(typeof e!="function")return a;for(var r=0,i=a.length;r=55296&&n<=56319&&e+1=56320&&a<=57343)?(n-55296)*1024+a-56320+65536:n}Q(XC,"codePointAt");function Tie(t){var e=/^\n* /;return e.test(t)}Q(Tie,"needIndentIndicator");var $Te=1,PZ=2,TTe=3,PTe=4,BC=5;function FTe(t,e,n,a,r,i,o,s){var l,u=0,d=null,p=!1,A=!1,m=a!==-1,g=-1,h=ITe(XC(t,0))&&DTe(XC(t,t.length-1));if(e||o)for(l=0;l=65536?l+=2:l++){if(u=XC(t,l),!J_(u))return BC;h=h&&TZ(u,d,s),d=u}else{for(l=0;l=65536?l+=2:l++){if(u=XC(t,l),u===S4)p=!0,m&&(A=A||l-g-1>a&&t[g+1]!==" ",g=l);else if(!J_(u))return BC;h=h&&TZ(u,d,s),d=u}A=A||m&&l-g-1>a&&t[g+1]!==" "}return!p&&!A?h&&!o&&!r(t)?$Te:i===I4?BC:PZ:n>9&&Tie(t)?BC:o?i===I4?BC:PZ:A?PTe:TTe}Q(FTe,"chooseScalarStyle");function RTe(t,e,n,a,r){t.dump=function(){if(e.length===0)return t.quotingType===I4?'""':"''";if(!t.noCompatMode&&(Gft.indexOf(e)!==-1||Hft.test(e)))return t.quotingType===I4?'"'+e+'"':"'"+e+"'";var i=t.indent*Math.max(1,n),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),s=a||t.flowLevel>-1&&n>=t.flowLevel;function l(u){return STe(t,u)}switch(Q(l,"testAmbiguity"),FTe(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!a,r)){case $Te:return e;case PZ:return"'"+e.replace(/'/g,"''")+"'";case TTe:return"|"+FZ(e,t.indent)+RZ(DZ(e,i));case PTe:return">"+FZ(e,t.indent)+RZ(DZ(LTe(e,o),i));case BC:return'"'+NTe(e)+'"';default:throw new Id("impossible error: invalid scalar style")}}()}Q(RTe,"writeScalar");function FZ(t,e){var n=Tie(t)?String(e):"",a=t[t.length-1]===` `,r=a&&(t[t.length-2]===` `||t===` `),i=r?"+":a?"":"-";return n+i+` `}Q(FZ,"blockHeader");function RZ(t){return t[t.length-1]===` `?t.slice(0,-1):t}Q(RZ,"dropEndingNewline");function LTe(t,e){for(var n=/(\n+)([^\n]*)/g,a=function(){var u=t.indexOf(` `);return u=u!==-1?u:t.length,n.lastIndex=u,LZ(t.slice(0,u),e)}(),r=t[0]===` `||t[0]===" ",i,o;o=n.exec(t);){var s=o[1],l=o[2];i=l[0]===" ",a+=s+(!r&&!i&&l!==""?` `:"")+LZ(l,e),r=i}return a}Q(LTe,"foldString");function LZ(t,e){if(t===""||t[0]===" ")return t;for(var n=/ [^ ]/g,a,r=0,i,o=0,s=0,l="";a=n.exec(t);)s=a.index,s-r>e&&(i=o>r?o:s,l+=` `+t.slice(r,i),r=i+1),o=s;return l+=` `,t.length-r>e&&o>r?l+=t.slice(r,o)+` `+t.slice(o+1):l+=t.slice(r),l.slice(1)}Q(LZ,"foldLine");function NTe(t){for(var e="",n=0,a,r=0;r=65536?r+=2:r++)n=XC(t,r),a=Cu[n],!a&&J_(n)?(e+=t[r],n>=65536&&(e+=t[r+1])):e+=a||ETe(n);return e}Q(NTe,"escapeString");function MTe(t,e,n){var a="",r=t.tag,i,o,s;for(i=0,o=n.length;i"u"&&Rh(t,e,null,!1,!1))&&(a!==""&&(a+=","+(t.condenseFlow?"":" ")),a+=t.dump);t.tag=r,t.dump="["+a+"]"}Q(MTe,"writeFlowSequence");function NZ(t,e,n,a){var r="",i=t.tag,o,s,l;for(o=0,s=n.length;o"u"&&Rh(t,e+1,null,!0,!0,!1,!0))&&((!a||r!=="")&&(r+=mR(t,e)),t.dump&&S4===t.dump.charCodeAt(0)?r+="-":r+="- ",r+=t.dump);t.tag=i,t.dump=r||"[]"}Q(NZ,"writeBlockSequence");function zTe(t,e,n){var a="",r=t.tag,i=Object.keys(n),o,s,l,u,d;for(o=0,s=i.length;o1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Rh(t,e,u,!1,!1)&&(d+=t.dump,a+=d));t.tag=r,t.dump="{"+a+"}"}Q(zTe,"writeFlowMapping");function qTe(t,e,n,a){var r="",i=t.tag,o=Object.keys(n),s,l,u,d,p,A;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Id("sortKeys must be a boolean or a function");for(s=0,l=o.length;s1024,p&&(t.dump&&S4===t.dump.charCodeAt(0)?A+="?":A+="? "),A+=t.dump,p&&(A+=mR(t,e)),Rh(t,e+1,d,!0,p)&&(t.dump&&S4===t.dump.charCodeAt(0)?A+=":":A+=": ",A+=t.dump,r+=A));t.tag=i,t.dump=r||"{}"}Q(qTe,"writeBlockMapping");function MZ(t,e,n){var a,r,i,o,s,l;for(r=n?t.explicitTypes:t.implicitTypes,i=0,o=r.length;i tag resolver accepts not "'+l+'" style');t.dump=a}return!0}return!1}Q(MZ,"detectType");function Rh(t,e,n,a,r,i,o){t.tag=null,t.dump=n,MZ(t,n,!1)||MZ(t,n,!0);var s=wTe.call(t.dump),l=a,u;a&&(a=t.flowLevel<0||t.flowLevel>e);var d=s==="[object Object]"||s==="[object Array]",p,A;if(d&&(p=t.duplicates.indexOf(n),A=p!==-1),(t.tag!==null&&t.tag!=="?"||A||t.indent!==2&&e>0)&&(r=!1),A&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(d&&A&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),s==="[object Object]")a&&Object.keys(t.dump).length!==0?(qTe(t,e,t.dump,r),A&&(t.dump="&ref_"+p+t.dump)):(zTe(t,e,t.dump),A&&(t.dump="&ref_"+p+" "+t.dump));else if(s==="[object Array]")a&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?NZ(t,e-1,t.dump,r):NZ(t,e,t.dump,r),A&&(t.dump="&ref_"+p+t.dump)):(MTe(t,e,t.dump),A&&(t.dump="&ref_"+p+" "+t.dump));else if(s==="[object String]")t.tag!=="?"&&RTe(t,t.dump,e,i,l);else{if(s==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Id("unacceptable kind of an object to dump "+s)}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}Q(Rh,"writeNode");function jTe(t,e){var n=[],a=[],r,i;for(gR(t,n,a),r=0,i=a.length;rArray.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),UTe=Q(t=>({x:Q(function(e,n,a){let r=0;const i=bo(a[0]).x=0?1:-1)}else if(n===a.length-1&&Object.hasOwn(uA,t.arrowTypeEnd)){const{angle:m,deltaX:g}=WQ(a[a.length-1],a[a.length-2]);r=uA[t.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}const o=Math.abs(bo(e).x-bo(a[a.length-1]).x),s=Math.abs(bo(e).y-bo(a[a.length-1]).y),l=Math.abs(bo(e).x-bo(a[0]).x),u=Math.abs(bo(e).y-bo(a[0]).y),d=uA[t.arrowTypeStart],p=uA[t.arrowTypeEnd],A=1;if(o0&&s0&&u=0?1:-1)}else if(n===a.length-1&&Object.hasOwn(uA,t.arrowTypeEnd)){const{angle:m,deltaY:g}=WQ(a[a.length-1],a[a.length-2]);r=uA[t.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}const o=Math.abs(bo(e).y-bo(a[a.length-1]).y),s=Math.abs(bo(e).x-bo(a[a.length-1]).x),l=Math.abs(bo(e).y-bo(a[0]).y),u=Math.abs(bo(e).x-bo(a[0]).x),d=uA[t.arrowTypeStart],p=uA[t.arrowTypeEnd],A=1;if(o0&&s0&&u{const e=t?.subGraphTitleMargin?.top??0,n=t?.subGraphTitleMargin?.bottom??0,a=e+n;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:a}},"getSubGraphTitleMargins"),Vft=Q(t=>{const{handDrawnSeed:e}=ot();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),eE=Q(t=>{const e=Zft([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),Zft=Q(t=>{const e=new Map;return t.forEach(n=>{const[a,r]=n.split(":");e.set(a.trim(),r?.trim())}),e},"styles2Map"),Pie=Q(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),Vn=Q(t=>{const{stylesArray:e}=eE(t),n=[],a=[],r=[],i=[];return e.forEach(o=>{const s=o[0];Pie(s)?n.push(o.join(":")+" !important"):(a.push(o.join(":")+" !important"),s.includes("stroke")&&r.push(o.join(":")+" !important"),s==="fill"&&i.push(o.join(":")+" !important"))}),{labelStyles:n.join(";"),nodeStyles:a.join(";"),stylesArray:e,borderStyles:r,backgroundStyles:i}},"styles2String"),aa=Q((t,e)=>{const{themeVariables:n,handDrawnSeed:a}=ot(),{nodeBorder:r,mainBkg:i}=n,{stylesMap:o}=eE(t);return Object.assign({roughness:.7,fill:o.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||r,seed:a,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Kft(o.get("stroke-dasharray"))},e)},"userNodeOverrides"),Kft=Q(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(e.length===1){const r=isNaN(e[0])?0:e[0];return[r,r]}const n=isNaN(e[0])?0:e[0],a=isNaN(e[1])?0:e[1];return[n,a]},"getStrokeDashArray"),Fie={},Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.BLANK_URL=Xc.relativeFirstCharacters=Xc.whitespaceEscapeCharsRegex=Xc.urlSchemeRegex=Xc.ctrlCharactersRegex=Xc.htmlCtrlEntityRegex=Xc.htmlEntitiesRegex=Xc.invalidProtocolRegex=void 0;Xc.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Xc.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Xc.htmlCtrlEntityRegex=/&(newline|tab);/gi;Xc.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Xc.urlSchemeRegex=/^.+(:|:)/gim;Xc.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Xc.relativeFirstCharacters=[".","/"];Xc.BLANK_URL="about:blank";Object.defineProperty(Fie,"__esModule",{value:!0});var ev=Fie.sanitizeUrl=void 0,Yl=Xc;function Jft(t){return Yl.relativeFirstCharacters.indexOf(t[0])>-1}function ebt(t){var e=t.replace(Yl.ctrlCharactersRegex,"");return e.replace(Yl.htmlEntitiesRegex,function(n,a){return String.fromCharCode(a)})}function tbt(t){return URL.canParse(t)}function gge(t){try{return decodeURIComponent(t)}catch{return t}}function nbt(t){if(!t)return Yl.BLANK_URL;var e,n=gge(t.trim());do n=ebt(n).replace(Yl.htmlCtrlEntityRegex,"").replace(Yl.ctrlCharactersRegex,"").replace(Yl.whitespaceEscapeCharsRegex,"").trim(),n=gge(n),e=n.match(Yl.ctrlCharactersRegex)||n.match(Yl.htmlEntitiesRegex)||n.match(Yl.htmlCtrlEntityRegex)||n.match(Yl.whitespaceEscapeCharsRegex);while(e&&e.length>0);var a=n;if(!a)return Yl.BLANK_URL;if(Jft(a))return a;var r=a.trimStart(),i=r.match(Yl.urlSchemeRegex);if(!i)return a;var o=i[0].toLowerCase().trim();if(Yl.invalidProtocolRegex.test(o))return Yl.BLANK_URL;var s=r.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return s;if(o==="http:"||o==="https:"){if(!tbt(s))return Yl.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s}ev=Fie.sanitizeUrl=nbt;var GTe=typeof global=="object"&&global&&global.Object===Object&&global,abt=typeof self=="object"&&self&&self.Object===Object&&self,Yh=GTe||abt||Function("return this")(),ZA=Yh.Symbol,HTe=Object.prototype,rbt=HTe.hasOwnProperty,ibt=HTe.toString,$2=ZA?ZA.toStringTag:void 0;function obt(t){var e=rbt.call(t,$2),n=t[$2];try{t[$2]=void 0;var a=!0}catch{}var r=ibt.call(t);return a&&(e?t[$2]=n:delete t[$2]),r}var sbt=Object.prototype,cbt=sbt.toString;function lbt(t){return cbt.call(t)}var ubt="[object Null]",dbt="[object Undefined]",hge=ZA?ZA.toStringTag:void 0;function Oy(t){return t==null?t===void 0?dbt:ubt:hge&&hge in Object(t)?obt(t):lbt(t)}function Nd(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var pbt="[object AsyncFunction]",Abt="[object Function]",mbt="[object GeneratorFunction]",gbt="[object Proxy]";function KA(t){if(!Nd(t))return!1;var e=Oy(t);return e==Abt||e==mbt||e==pbt||e==gbt}var mU=Yh["__core-js_shared__"],fge=function(){var t=/[^.]+$/.exec(mU&&mU.keys&&mU.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function hbt(t){return!!fge&&fge in t}var fbt=Function.prototype,bbt=fbt.toString;function Ox(t){if(t!=null){try{return bbt.call(t)}catch{}try{return t+""}catch{}}return""}var ybt=/[\\^$.*+?()[\]{}|]/g,wbt=/^\[object .+?Constructor\]$/,vbt=Function.prototype,kbt=Object.prototype,xbt=vbt.toString,Obt=kbt.hasOwnProperty,Cbt=RegExp("^"+xbt.call(Obt).replace(ybt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _bt(t){if(!Nd(t)||hbt(t))return!1;var e=KA(t)?Cbt:wbt;return e.test(Ox(t))}function Bbt(t,e){return t?.[e]}function Cx(t,e){var n=Bbt(t,e);return _bt(n)?n:void 0}var $4=Cx(Object,"create");function Ebt(){this.__data__=$4?$4(null):{},this.size=0}function Qbt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Sbt="__lodash_hash_undefined__",Ibt=Object.prototype,Dbt=Ibt.hasOwnProperty;function $bt(t){var e=this.__data__;if($4){var n=e[t];return n===Sbt?void 0:n}return Dbt.call(e,t)?e[t]:void 0}var Tbt=Object.prototype,Pbt=Tbt.hasOwnProperty;function Fbt(t){var e=this.__data__;return $4?e[t]!==void 0:Pbt.call(e,t)}var Rbt="__lodash_hash_undefined__";function Lbt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=$4&&e===void 0?Rbt:e,this}function P1(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}function Gbt(t,e){var n=this.__data__,a=JN(n,t);return a<0?(++this.size,n.push([t,e])):n[a][1]=e,this}function Cy(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=pyt}function Xh(t){return t!=null&&Mie(t.length)&&!KA(t)}function bR(t){return JA(t)&&Xh(t)}function Ayt(){return!1}var e8e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xge=e8e&&typeof module=="object"&&module&&!module.nodeType&&module,myt=xge&&xge.exports===e8e,Oge=myt?Yh.Buffer:void 0,gyt=Oge?Oge.isBuffer:void 0,tB=gyt||Ayt,hyt="[object Object]",fyt=Function.prototype,byt=Object.prototype,t8e=fyt.toString,yyt=byt.hasOwnProperty,wyt=t8e.call(Object);function vyt(t){if(!JA(t)||Oy(t)!=hyt)return!1;var e=Nie(t);if(e===null)return!0;var n=yyt.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&t8e.call(n)==wyt}var kyt="[object Arguments]",xyt="[object Array]",Oyt="[object Boolean]",Cyt="[object Date]",_yt="[object Error]",Byt="[object Function]",Eyt="[object Map]",Qyt="[object Number]",Syt="[object Object]",Iyt="[object RegExp]",Dyt="[object Set]",$yt="[object String]",Tyt="[object WeakMap]",Pyt="[object ArrayBuffer]",Fyt="[object DataView]",Ryt="[object Float32Array]",Lyt="[object Float64Array]",Nyt="[object Int8Array]",Myt="[object Int16Array]",zyt="[object Int32Array]",qyt="[object Uint8Array]",jyt="[object Uint8ClampedArray]",Uyt="[object Uint16Array]",Gyt="[object Uint32Array]",ao={};ao[Ryt]=ao[Lyt]=ao[Nyt]=ao[Myt]=ao[zyt]=ao[qyt]=ao[jyt]=ao[Uyt]=ao[Gyt]=!0;ao[kyt]=ao[xyt]=ao[Pyt]=ao[Oyt]=ao[Fyt]=ao[Cyt]=ao[_yt]=ao[Byt]=ao[Eyt]=ao[Qyt]=ao[Syt]=ao[Iyt]=ao[Dyt]=ao[$yt]=ao[Tyt]=!1;function Hyt(t){return JA(t)&&Mie(t.length)&&!!ao[Oy(t)]}function D$(t){return function(e){return t(e)}}var n8e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,OI=n8e&&typeof module=="object"&&module&&!module.nodeType&&module,Wyt=OI&&OI.exports===n8e,gU=Wyt&>e.process,fw=function(){try{var t=OI&&OI.require&&OI.require("util").types;return t||gU&&gU.binding&&gU.binding("util")}catch{}}(),Cge=fw&&fw.isTypedArray,tM=Cge?D$(Cge):Hyt;function qZ(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Yyt=Object.prototype,Xyt=Yyt.hasOwnProperty;function $$(t,e,n){var a=t[e];(!(Xyt.call(t,e)&&tE(a,n))||n===void 0&&!(e in t))&&S$(t,e,n)}function aE(t,e,n,a){var r=!n;n||(n={});for(var i=-1,o=e.length;++i-1&&t%1==0&&t0){if(++e>=l0t)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var o8e=p0t(c0t);function T$(t,e){return o8e(i8e(t,e,Zb),t+"")}function P4(t,e,n){if(!Nd(n))return!1;var a=typeof e;return(a=="number"?Xh(n)&&nM(e,n.length):a=="string"&&e in n)?tE(n[e],t):!1}function s8e(t){return T$(function(e,n){var a=-1,r=n.length,i=r>1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(r--,i):void 0,o&&P4(n[0],n[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++as.args);q9(o),a=Os(a,[...o])}else a=n.args;if(!a)return;let r=nie(t,e);const i="config";return a[i]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),a[r]=a[i],delete a[i]),a},"detectInit"),l8e=Q(function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${m0t.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),_e.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let a;const r=[];for(;(a=wI.exec(t))!==null;)if(a.index===wI.lastIndex&&wI.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const i=a[1]?a[1]:a[2],o=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;r.push({type:i,args:o})}return r.length===0?{type:t,args:null}:r.length===1?r[0]:r}catch(n){return _e.error(`ERROR: ${n.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),h0t=Q(function(t){return t.replace(wI,"")},"removeDirectives"),f0t=Q(function(t,e){for(const[n,a]of e.entries())if(a.match(t))return n;return-1},"isSubstringInArray");function zie(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return A0t[n]??e}Q(zie,"interpolateToCurve");function u8e(t,e){const n=t.trim();if(n)return e.securityLevel!=="loose"?ev(n):n}Q(u8e,"formatUrl");var b0t=Q((t,...e)=>{const n=t.split("."),a=n.length-1,r=n[a];let i=window;for(let o=0;o{n+=qie(r,e),e=r});const a=n/2;return jie(t,a)}Q(d8e,"traverseEdge");function p8e(t){return t.length===1?t[0]:d8e(t)}Q(p8e,"calcLabelPosition");var Bge=Q((t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},"roundNumber"),jie=Q((t,e)=>{let n,a=e;for(const r of t){if(n){const i=qie(r,n);if(i===0)return n;if(i=1)return{x:r.x,y:r.y};if(o>0&&o<1)return{x:Bge((1-o)*n.x+o*r.x,5),y:Bge((1-o)*n.y+o*r.y,5)}}}n=r}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),y0t=Q((t,e,n)=>{_e.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const r=jie(e,25),i=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(o)*i+(e[0].x+r.x)/2,s.y=-Math.cos(o)*i+(e[0].y+r.y)/2,s},"calcCardinalityPosition");function A8e(t,e,n){const a=structuredClone(n);_e.info("our points",a),e!=="start_left"&&e!=="start_right"&&a.reverse();const r=25+t,i=jie(a,r),o=10+t*.5,s=Math.atan2(a[0].y-i.y,a[0].x-i.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(a[0].x+i.x)/2,l.y=-Math.cos(s+Math.PI)*o+(a[0].y+i.y)/2):e==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(a[0].x+i.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(a[0].y+i.y)/2-5):e==="end_left"?(l.x=Math.sin(s)*o+(a[0].x+i.x)/2-5,l.y=-Math.cos(s)*o+(a[0].y+i.y)/2-5):(l.x=Math.sin(s)*o+(a[0].x+i.x)/2,l.y=-Math.cos(s)*o+(a[0].y+i.y)/2),l}Q(A8e,"calcTerminalLabelPosition");function Uie(t){let e="",n="";for(const a of t)a!==void 0&&(a.startsWith("color:")||a.startsWith("text-align:")?n=n+a+";":e=e+a+";");return{style:e,labelStyle:n}}Q(Uie,"getStylesFromArray");var Ege=0,m8e=Q(()=>(Ege++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ege),"generateId");function g8e(t){let e="";const n="0123456789abcdef",a=n.length;for(let r=0;rg8e(t.length),"random"),w0t=Q(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"),v0t=Q(function(t,e){const n=e.text.replace(kn.lineBreakRegex," "),[,a]=Bx(e.fontSize),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",a),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),e.class!==void 0&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.attr("fill",e.fill),i.text(n),r},"drawSimpleText"),f8e=nE((t,e,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},n),kn.lineBreakRegex.test(t)))return t;const a=t.split(" ").filter(Boolean),r=[];let i="";return a.forEach((o,s)=>{const l=Ku(`${o} `,n),u=Ku(i,n);if(l>e){const{hyphenatedStrings:A,remainingWord:m}=k0t(o,e,"-",n);r.push(i,...A),i=m}else u+l>=e?(r.push(i),i=o):i=[i,o].filter(Boolean).join(" ");s+1===a.length&&r.push(i)}),r.filter(o=>o!=="").join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),k0t=nE((t,e,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const r=[...t],i=[];let o="";return r.forEach((s,l)=>{const u=`${o}${s}`;if(Ku(u,a)>=e){const p=l+1,A=r.length===p,m=`${u}${n}`;i.push(A?u:m),o=""}else o=u}),{hyphenatedStrings:i,remainingWord:o}},(t,e,n="-",a)=>`${t}${e}${n}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function wR(t,e){return Gie(t,e).height}Q(wR,"calculateTextHeight");function Ku(t,e){return Gie(t,e).width}Q(Ku,"calculateTextWidth");var Gie=nE((t,e)=>{const{fontSize:n=12,fontFamily:a="Arial",fontWeight:r=400}=e;if(!t)return{width:0,height:0};const[,i]=Bx(n),o=["sans-serif",a],s=t.split(kn.lineBreakRegex),l=[],u=en("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const d=u.append("svg");for(const A of o){let m=0;const g={width:0,height:0,lineHeight:0};for(const h of s){const f=w0t();f.text=h||c8e;const b=v0t(d,f).style("font-size",i).style("font-weight",r).style("font-family",A),y=(b._groups||b)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),m=Math.round(y.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}l.push(g)}d.remove();const p=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[p]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),x0t=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{Q(this,"InitIDGenerator")}},aT,O0t=Q(function(t){return aT=aT||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),aT.innerHTML=t,unescape(aT.textContent)},"entityDecode");function Hie(t){return"str"in t}Q(Hie,"isDetailedError");var C0t=Q((t,e,n,a)=>{if(!a)return;const r=t.node()?.getBBox();r&&t.append("text").text(a).attr("text-anchor","middle").attr("x",r.x+r.width/2).attr("y",-n).attr("class",e)},"insertTitle"),Bx=Q(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function id(t,e){return yR({},t,e)}Q(id,"cleanAndMerge");var Wa={assignWithDepth:Os,wrapLabel:f8e,calculateTextHeight:wR,calculateTextWidth:Ku,calculateTextDimensions:Gie,cleanAndMerge:id,detectInit:g0t,detectDirective:l8e,isSubstringInArray:f0t,interpolateToCurve:zie,calcLabelPosition:p8e,calcCardinalityPosition:y0t,calcTerminalLabelPosition:A8e,formatUrl:u8e,getStylesFromArray:Uie,generateId:m8e,random:h8e,runFunc:b0t,entityDecode:O0t,insertTitle:C0t,isLabelCoordinateInPath:b8e,parseFontSize:Bx,InitIDGenerator:x0t},_0t=Q(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/#\w+;/g,function(n){const a=n.substring(1,n.length-1);return/^\+?\d+$/.test(a)?"fl°°"+a+"¶ß":"fl°"+a+"¶ß"}),e},"encodeEntities"),Lh=Q(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),CI=Q((t,e,{counter:n=0,prefix:a,suffix:r},i)=>i||`${a?`${a}_`:""}${t}_${e}_${n}${r?`_${r}`:""}`,"getEdgeId");function hu(t){return t??null}Q(hu,"handleUndefinedAttr");function b8e(t,e){const n=Math.round(t.x),a=Math.round(t.y),r=e.replace(/(\d+\.\d+)/g,i=>Math.round(parseFloat(i)).toString());return r.includes(n.toString())||r.includes(a.toString())}Q(b8e,"isLabelCoordinateInPath");const B0t=Object.freeze({left:0,top:0,width:16,height:16}),vR=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),y8e=Object.freeze({...B0t,...vR}),E0t=Object.freeze({...y8e,body:"",hidden:!1}),Q0t=Object.freeze({width:null,height:null}),S0t=Object.freeze({...Q0t,...vR}),I0t=(t,e,n,a="")=>{const r=t.split(":");if(t.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;a=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const s=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:a,prefix:l,name:s};return hU(u)?u:null}const i=r[0],o=i.split("-");if(o.length>1){const s={provider:a,prefix:o.shift(),name:o.join("-")};return hU(s)?s:null}if(n&&a===""){const s={provider:a,prefix:"",name:i};return hU(s,n)?s:null}return null},hU=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function D0t(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const a=((t.rotate||0)+(e.rotate||0))%4;return a&&(n.rotate=a),n}function Qge(t,e){const n=D0t(t,e);for(const a in E0t)a in vR?a in t&&!(a in n)&&(n[a]=vR[a]):a in e?n[a]=e[a]:a in t&&(n[a]=t[a]);return n}function $0t(t,e){const n=t.icons,a=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const s=a[o]&&a[o].parent,l=s&&i(s);l&&(r[o]=[s].concat(l))}return r[o]}return e.forEach(i),r}function Sge(t,e,n){const a=t.icons,r=t.aliases||Object.create(null);let i={};function o(s){i=Qge(a[s]||r[s],i)}return o(e),n.forEach(o),Qge(t,i)}function T0t(t,e){if(t.icons[e])return Sge(t,e,[]);const n=$0t(t,[e])[e];return n?Sge(t,e,n):null}const P0t=/(-?[0-9.]*[0-9]+[0-9.]*)/g,F0t=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ige(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const a=t.split(P0t);if(a===null||!a.length)return t;const r=[];let i=a.shift(),o=F0t.test(i);for(;;){if(o){const s=parseFloat(i);isNaN(s)?r.push(i):r.push(Math.ceil(s*e*n)/n)}else r.push(i);if(i=a.shift(),i===void 0)return r.join("");o=!o}}function R0t(t,e="defs"){let n="";const a=t.indexOf("<"+e);for(;a>=0;){const r=t.indexOf(">",a),i=t.indexOf("",i);if(o===-1)break;n+=t.slice(r+1,i).trim(),t=t.slice(0,a).trim()+t.slice(o+1)}return{defs:n,content:t}}function L0t(t,e){return t?""+t+""+e:e}function N0t(t,e,n){const a=R0t(t);return L0t(a.defs,e+a.content+n)}const M0t=t=>t==="unset"||t==="undefined"||t==="none";function z0t(t,e){const n={...y8e,...t},a={...S0t,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,a].forEach(h=>{const f=[],b=h.hFlip,y=h.vFlip;let w=h.rotate;b?y?w+=2:(f.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),f.push("scale(-1 1)"),r.top=r.left=0):y&&(f.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),f.push("scale(1 -1)"),r.top=r.left=0);let v;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:v=r.height/2+r.top,f.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:f.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:v=r.width/2+r.left,f.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}w%2===1&&(r.left!==r.top&&(v=r.left,r.left=r.top,r.top=v),r.width!==r.height&&(v=r.width,r.width=r.height,r.height=v)),f.length&&(i=N0t(i,'',""))});const o=a.width,s=a.height,l=r.width,u=r.height;let d,p;o===null?(p=s===null?"1em":s==="auto"?u:s,d=Ige(p,l/u)):(d=o==="auto"?l:o,p=s===null?Ige(d,u/l):s==="auto"?u:s);const A={},m=(h,f)=>{M0t(f)||(A[h]=f.toString())};m("width",d),m("height",p);const g=[r.left,r.top,l,u];return A.viewBox=g.join(" "),{attributes:A,viewBox:g,body:i}}const q0t=/\sid="(\S+)"/g,j0t="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let U0t=0;function G0t(t,e=j0t){const n=[];let a;for(;a=q0t.exec(t);)n.push(a[1]);if(!n.length)return t;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const o=typeof e=="function"?e(i):e+(U0t++).toString(),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),t=t.replace(new RegExp(r,"g"),""),t}function H0t(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in e)n+=" "+a+'="'+e[a]+'"';return'"+t+""}function Wie(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ex=Wie();function w8e(t){Ex=t}var _I={exec:()=>null};function fi(t,e=""){let n=typeof t=="string"?t:t.source;const a={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(Xu.caret,"$1"),n=n.replace(r,o),a},getRegex:()=>new RegExp(n,e)};return a}var Xu={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
    /i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},W0t=/^(?:[ \t]*(?:\n|$))+/,Y0t=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,X0t=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P$=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,V0t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yie=/(?:[*+-]|\d{1,9}[.)])/,v8e=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,k8e=fi(v8e).replace(/bull/g,Yie).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/\|table/g,"").getRegex(),Z0t=fi(v8e).replace(/bull/g,Yie).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xie=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,K0t=/^[^\n]+/,Vie=/(?!\s*\])(?:\\.|[^\[\]\\])+/,J0t=fi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Vie).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ewt=fi(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yie).getRegex(),aM="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",Zie=/|$))/,twt=fi("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Zie).replace("tag",aM).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x8e=fi(Xie).replace("hr",P$).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",aM).getRegex(),nwt=fi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x8e).getRegex(),Kie={blockquote:nwt,code:Y0t,def:J0t,fences:X0t,heading:V0t,hr:P$,html:twt,lheading:k8e,list:ewt,newline:W0t,paragraph:x8e,table:_I,text:K0t},Dge=fi("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P$).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",aM).getRegex(),awt={...Kie,lheading:Z0t,table:Dge,paragraph:fi(Xie).replace("hr",P$).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dge).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",aM).getRegex()},rwt={...Kie,html:fi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Zie).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_I,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fi(Xie).replace("hr",P$).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",k8e).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},iwt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,owt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,O8e=/^( {2,}|\\)\n(?!\s*$)/,swt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,B8e=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,pwt=fi(B8e,"u").replace(/punct/g,rM).getRegex(),Awt=fi(B8e,"u").replace(/punct/g,_8e).getRegex(),E8e="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mwt=fi(E8e,"gu").replace(/notPunctSpace/g,C8e).replace(/punctSpace/g,Jie).replace(/punct/g,rM).getRegex(),gwt=fi(E8e,"gu").replace(/notPunctSpace/g,uwt).replace(/punctSpace/g,lwt).replace(/punct/g,_8e).getRegex(),hwt=fi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,C8e).replace(/punctSpace/g,Jie).replace(/punct/g,rM).getRegex(),fwt=fi(/\\(punct)/,"gu").replace(/punct/g,rM).getRegex(),bwt=fi(/^<(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(),ywt=fi(Zie).replace("(?:-->|$)","-->").getRegex(),wwt=fi("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ywt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kR=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vwt=fi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",kR).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q8e=fi(/^!?\[(label)\]\[(ref)\]/).replace("label",kR).replace("ref",Vie).getRegex(),S8e=fi(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vie).getRegex(),kwt=fi("reflink|nolink(?!\\()","g").replace("reflink",Q8e).replace("nolink",S8e).getRegex(),eoe={_backpedal:_I,anyPunctuation:fwt,autolink:bwt,blockSkip:dwt,br:O8e,code:owt,del:_I,emStrongLDelim:pwt,emStrongRDelimAst:mwt,emStrongRDelimUnd:hwt,escape:iwt,link:vwt,nolink:S8e,punctuation:cwt,reflink:Q8e,reflinkSearch:kwt,tag:wwt,text:swt,url:_I},xwt={...eoe,link:fi(/^!?\[(label)\]\((.*?)\)/).replace("label",kR).getRegex(),reflink:fi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kR).getRegex()},jZ={...eoe,emStrongRDelimAst:gwt,emStrongLDelim:Awt,url:fi(/^((?: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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},$ge=t=>Cwt[t];function Jg(t,e){if(e){if(Xu.escapeTest.test(t))return t.replace(Xu.escapeReplace,$ge)}else if(Xu.escapeTestNoEncode.test(t))return t.replace(Xu.escapeReplaceNoEncode,$ge);return t}function Tge(t){try{t=encodeURI(t).replace(Xu.percentDecode,"%")}catch{return null}return t}function Pge(t,e){const n=t.replace(Xu.findPipe,(i,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),a=n.split(Xu.splitPipe);let r=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length0?-2:-1}function Fge(t,e,n,a,r){const i=e.href,o=e.title||null,s=t[1].replace(r.other.outputLinkReplace,"$1");a.state.inLink=!0;const l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:a.inlineTokens(s)};return a.state.inLink=!1,l}function Bwt(t,e,n){const a=t.match(n.other.indentCodeCompensation);if(a===null)return e;const r=a[1];return e.split(` `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(` `)}var xR=class{options;rules;lexer;constructor(t){this.options=t||Ex}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:P2(n,` `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],a=Bwt(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:a}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){const a=P2(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:P2(e[0],` `)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=P2(e[0],` `).split(` `),a="",r="";const i=[];for(;n.length>0;){let o=!1;const s=[];let l;for(l=0;l1,r={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let o=!1;for(;t;){let l=!1,u="",d="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let p=e[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),A=t.split(` `,1)[0],m=!p.trim(),g=0;if(this.options.pedantic?(g=2,d=p.trimStart()):m?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=p.slice(g),g+=e[1].length),m&&this.rules.other.blankLine.test(A)&&(u+=A+` `,t=t.substring(A.length+1),l=!0),!l){const b=this.rules.other.nextBulletRegex(g),y=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),v=this.rules.other.headingBeginRegex(g),k=this.rules.other.htmlBeginRegex(g);for(;t;){const _=t.split(` `,1)[0];let x;if(A=_,this.options.pedantic?(A=A.replace(this.rules.other.listReplaceNesting," "),x=A):x=A.replace(this.rules.other.tabCharGlobal," "),w.test(A)||v.test(A)||k.test(A)||b.test(A)||y.test(A))break;if(x.search(this.rules.other.nonSpaceChar)>=g||!A.trim())d+=` `+x.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||v.test(p)||y.test(p))break;d+=` `+A}!m&&!A.trim()&&(m=!0),u+=_+` `,t=t.substring(_.length+1),p=x.slice(g)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let h=null,f;this.options.gfm&&(h=this.rules.other.listIsTask.exec(d),h&&(f=h[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:u,task:!!h,checked:f,loose:!1,text:d,tokens:[]}),r.raw+=u}const s=r.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;lp.type==="space"),d=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));r.loose=d}if(r.loose)for(let l=0;l({text:s,tokens:this.lexer.inline(s),header:!1,align:i.align[l]})));return i}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const i=P2(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=_wt(e[2],"()");if(i===-2)return;if(i>-1){const s=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let a=e[2],r="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(a);i&&(a=i[1],r=i[3])}else r=e[3]?e[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),Fge(e,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[a.toLowerCase()];if(!r){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Fge(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(a[1]||a[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...a[0]].length-1;let o,s,l=i,u=0;const d=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*t.length+i);(a=d.exec(e))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(s=[...o].length,a[3]||a[4]){l+=s;continue}else if((a[5]||a[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);const p=[...a[0]][0].length,A=t.slice(0,i+a.index+p+s);if(Math.min(i,s)%2){const g=A.slice(1,-1);return{type:"em",raw:A,text:g,tokens:this.lexer.inlineTokens(g)}}const m=A.slice(2,-2);return{type:"strong",raw:A,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," ");const a=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,a;return e[2]==="@"?(n=e[1],a="mailto:"+n):(n=e[1],a=n),{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},xb=class UZ{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ex,this.options.tokenizer=this.options.tokenizer||new xR,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:Xu,block:rT.normal,inline:T2.normal};this.options.pedantic?(n.block=rT.pedantic,n.inline=T2.pedantic):this.options.gfm&&(n.block=rT.gfm,this.options.breaks?n.inline=T2.breaks:n.inline=T2.gfm),this.tokenizer.rules=n}static get rules(){return{block:rT,inline:T2}}static lex(e,n){return new UZ(n).lex(e)}static lexInline(e,n){return new UZ(n).inlineTokens(e)}lex(e){e=e.replace(Xu.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let n=0;n(r=o.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);const o=n.at(-1);r.raw.length===1&&o!==void 0?o.raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);const o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` `+r.raw,o.text+=` `+r.text,this.inlineQueue.at(-1).src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);const o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` `+r.raw,o.text+=` `+r.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let o=1/0;const s=e.slice(1);let l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},s),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(i=e.substring(0,o+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const o=n.at(-1);a&&o?.type==="paragraph"?(o.raw+=` `+r.raw,o.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(r),a=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);const o=n.at(-1);o?.type==="text"?(o.raw+=` `+r.raw,o.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(r);continue}if(e){const 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,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let a=e,r=null;if(this.tokens.links){const s=Object.keys(this.tokens.links);if(s.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)s.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,r.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;e;){i||(o=""),i=!1;let s;if(this.options.extensions?.inline?.some(u=>(s=u.call({lexer:this},e,n))?(e=e.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const u=n.at(-1);s.type==="text"&&u?.type==="text"?(u.raw+=s.raw,u.text+=s.text):n.push(s);continue}if(s=this.tokenizer.emStrong(e,a,o)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),n.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),n.push(s);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0;const d=e.slice(1);let p;this.options.extensions.startInline.forEach(A=>{p=A.call({lexer:this},d),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),i=!0;const u=n.at(-1);u?.type==="text"?(u.raw+=s.raw,u.text+=s.text):n.push(s);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}},OR=class{options;parser;constructor(t){this.options=t||Ex}space(t){return""}code({text:t,lang:e,escaped:n}){const a=(e||"").match(Xu.notSpaceStart)?.[0],r=t.replace(Xu.endingNewline,"")+` `;return a?'
    '+(n?r:Jg(r,!0))+`
    `:"
    "+(n?r:Jg(r,!0))+`
    `}blockquote({tokens:t}){return`
    ${this.parser.parse(t)}
    `}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return`
    `}list(t){const e=t.ordered,n=t.start;let a="";for(let o=0;o `+a+" `}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Jg(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let e="",n="";for(let r=0;r${a}`),` `+e+` `+a+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Jg(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:n}){const a=this.parser.parseInline(n),r=Tge(t);if(r===null)return a;t=r;let i='
    ",i}image({href:t,title:e,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));const r=Tge(t);if(r===null)return Jg(n);t=r;let i=`${n}{const o=r[i].flat(1/0);n=n.concat(this.walkTokens(o,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const i=e.renderers[r.name];i?e.renderers[r.name]=function(...o){let s=r.renderer.apply(this,o);return s===!1&&(s=i.apply(this,o)),s}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),a.extensions=e),n.renderer){const r=this.defaults.renderer||new OR(this.defaults);for(const i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const o=i,s=n.renderer[o],l=r[o];r[o]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=l.apply(r,u)),d||""}}a.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new xR(this.defaults);for(const i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const o=i,s=n.tokenizer[o],l=r[o];r[o]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=l.apply(r,u)),d}}a.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new rF;for(const i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const o=i,s=n.hooks[o],l=r[o];rF.passThroughHooks.has(i)?r[o]=u=>{if(this.defaults.async)return Promise.resolve(s.call(r,u)).then(p=>l.call(r,p));const d=s.call(r,u);return l.call(r,d)}:r[o]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=l.apply(r,u)),d}}a.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,i=n.walkTokens;a.walkTokens=function(o){let s=[];return s.push(i.call(this,o)),r&&(s=s.concat(r.call(this,o))),s}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return xb.lex(t,e??this.defaults)}parser(t,e){return Ob.parse(t,e??this.defaults)}parseMarkdown(t){return(n,a)=>{const r={...a},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));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"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?xb.lex:xb.lexInline,l=i.hooks?i.hooks.provideParser():t?Ob.parse:Ob.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(u=>s(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(o);try{i.hooks&&(n=i.hooks.preprocess(n));let u=s(n,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=l(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return o(u)}}}onError(t,e){return n=>{if(n.message+=` Please report this to https://github.com/markedjs/marked.`,t){const a="

    An error occurred:

    "+Jg(n.message+"",!0)+"
    ";return e?Promise.resolve(a):a}if(e)return Promise.reject(n);throw n}}},F1=new Ewt;function Ai(t,e){return F1.parse(t,e)}Ai.options=Ai.setOptions=function(t){return F1.setOptions(t),Ai.defaults=F1.defaults,w8e(Ai.defaults),Ai};Ai.getDefaults=Wie;Ai.defaults=Ex;Ai.use=function(...t){return F1.use(...t),Ai.defaults=F1.defaults,w8e(Ai.defaults),Ai};Ai.walkTokens=function(t,e){return F1.walkTokens(t,e)};Ai.parseInline=F1.parseInline;Ai.Parser=Ob;Ai.parser=Ob.parse;Ai.Renderer=OR;Ai.TextRenderer=toe;Ai.Lexer=xb;Ai.lexer=xb.lex;Ai.Tokenizer=xR;Ai.Hooks=rF;Ai.parse=Ai;Ai.options;Ai.setOptions;Ai.use;Ai.walkTokens;Ai.parseInline;Ob.parse;xb.lex;function I8e(t){for(var e=[],n=1;n?',height:80,width:80},HZ=new Map,$8e=new Map,T8e=Q(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(_e.debug("Registering icon pack:",e.name),"loader"in e)$8e.set(e.name,e.loader);else if("icons"in e)HZ.set(e.name,e.icons);else throw _e.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),P8e=Q(async(t,e)=>{const n=I0t(t,!0,e!==void 0);if(!n)throw new Error(`Invalid icon name: ${t}`);const a=n.prefix||e;if(!a)throw new Error(`Icon name must contain a prefix: ${t}`);let r=HZ.get(a);if(!r){const o=$8e.get(a);if(!o)throw new Error(`Icon set not found: ${n.prefix}`);try{r={...await o(),prefix:a},HZ.set(a,r)}catch(s){throw _e.error(s),new Error(`Failed to load icon set: ${n.prefix}`)}}const i=T0t(r,n.name);if(!i)throw new Error(`Icon not found: ${t}`);return i},"getRegisteredIconData"),Qwt=Q(async t=>{try{return await P8e(t),!0}catch{return!1}},"isIconAvailable"),bw=Q(async(t,e,n)=>{let a;try{a=await P8e(t,e?.fallbackPrefix)}catch(o){_e.error(o),a=D8e}const r=z0t(a,e),i=H0t(G0t(r.body),{...r.attributes,...n});return Qr(i,Pr())},"getIconSVG");function F8e(t,{markdownAutoWrap:e}){const a=t.replace(//g,` `).replace(/\n{2,}/g,` `),r=I8e(a);return e===!1?r.replace(/ /g," "):r}Q(F8e,"preprocessMarkdown");function R8e(t,e={}){const n=F8e(t,e),a=Ai.lexer(n),r=[[]];let i=0;function o(s,l="normal"){s.type==="text"?s.text.split(` `).forEach((d,p)=>{p!==0&&(i++,r.push([])),d.split(" ").forEach(A=>{A=A.replace(/'/g,"'"),A&&r[i].push({content:A,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(u=>{o(u,s.type)}):s.type==="html"&&r[i].push({content:s.text,type:"normal"})}return Q(o,"processNode"),a.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"?r[i].push({content:s.text,type:"normal"}):r[i].push({content:s.raw,type:"normal"})}),r}Q(R8e,"markdownToLines");function L8e(t,{markdownAutoWrap:e}={}){const n=Ai.lexer(t);function a(r){return r.type==="text"?e===!1?r.text.replace(/\n */g,"
    ").replace(/ /g," "):r.text.replace(/\n */g,"
    "):r.type==="strong"?`${r.tokens?.map(a).join("")}`:r.type==="em"?`${r.tokens?.map(a).join("")}`:r.type==="paragraph"?`

    ${r.tokens?.map(a).join("")}

    `:r.type==="space"?"":r.type==="html"?`${r.text}`:r.type==="escape"?r.text:(_e.warn(`Unsupported markdown: ${r.type}`),r.raw)}return Q(a,"output"),n.map(a).join("")}Q(L8e,"markdownToHTML");function N8e(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}Q(N8e,"splitTextToChars");function M8e(t,e){const n=N8e(e.content);return noe(t,[],n,e.type)}Q(M8e,"splitWordToFitWidth");function noe(t,e,n,a){if(n.length===0)return[{content:e.join(""),type:a},{content:"",type:a}];const[r,...i]=n,o=[...e,r];return t([{content:o.join(""),type:a}])?noe(t,o,i,a):(e.length===0&&r&&(e.push(r),n.shift()),[{content:e.join(""),type:a},{content:n.join(""),type:a}])}Q(noe,"splitWordToFitWidthRecursion");function z8e(t,e){if(t.some(({content:n})=>n.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return CR(t,e)}Q(z8e,"splitLineToFitWidth");function CR(t,e,n=[],a=[]){if(t.length===0)return a.length>0&&n.push(a),n.length>0?n:[];let r="";t[0].content===" "&&(r=" ",t.shift());const i=t.shift()??{content:" ",type:"normal"},o=[...a];if(r!==""&&o.push({content:r,type:"normal"}),o.push(i),e(o))return CR(t,e,n,o);if(a.length>0)n.push(a),t.unshift(i);else if(i.content){const[s,l]=M8e(e,i);n.push([s]),l.content&&t.unshift(l)}return CR(t,e,n)}Q(CR,"splitLineToFitWidthRecursion");function WZ(t,e){e&&t.attr("style",e)}Q(WZ,"applyStyle");async function q8e(t,e,n,a,r=!1,i=Pr()){const o=t.append("foreignObject");o.attr("width",`${10*n}px`),o.attr("height",`${10*n}px`);const s=o.append("xhtml:div"),l=is(e.label)?await k$(e.label.replace(kn.lineBreakRegex,` `),i):Qr(e.label,i),u=e.isNode?"nodeLabel":"edgeLabel",d=s.append("span");d.html(l),WZ(d,e.labelStyle),d.attr("class",`${u} ${a}`),WZ(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",n+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),r&&s.attr("class","labelBkg");let p=s.node().getBoundingClientRect();return p.width===n&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",n+"px"),p=s.node().getBoundingClientRect()),o.node()}Q(q8e,"addHtmlSpan");function iM(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}Q(iM,"createTspan");function j8e(t,e,n){const a=t.append("text"),r=iM(a,1,e);oM(r,n);const i=r.node().getComputedTextLength();return a.remove(),i}Q(j8e,"computeWidthOfText");function U8e(t,e,n){const a=t.append("text"),r=iM(a,1,e);oM(r,[{content:n,type:"normal"}]);const i=r.node()?.getBoundingClientRect();return i&&a.remove(),i}Q(U8e,"computeDimensionOfText");function G8e(t,e,n,a=!1){const i=e.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1");let l=0;for(const u of n){const d=Q(A=>j8e(i,1.1,A)<=t,"checkWidth"),p=d(u)?[u]:z8e(u,d);for(const A of p){const m=iM(s,l,1.1);oM(m,A),l++}}if(a){const u=s.node().getBBox(),d=2;return o.attr("x",u.x-d).attr("y",u.y-d).attr("width",u.width+2*d).attr("height",u.height+2*d),i.node()}else return s.node()}Q(G8e,"createFormattedText");function oM(t,e){t.text(""),e.forEach((n,a)=>{const r=t.append("tspan").attr("font-style",n.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",n.type==="strong"?"bold":"normal");a===0?r.text(n.content):r.text(" "+n.content)})}Q(oM,"updateTextContentAndStyles");async function aoe(t,e={}){const n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(r,i,o)=>(n.push((async()=>{const s=`${i}:${o}`;return await Qwt(s)?await bw(s,void 0,{class:"label-icon"}):``})()),r));const a=await Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}Q(aoe,"replaceIconSubstring");var Gp=Q(async(t,e="",{style:n="",isTitle:a=!1,classes:r="",useHtmlLabels:i=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},u)=>{if(_e.debug("XYZ createText",e,n,a,r,i,o,"addSvgBackground: ",l),i){const d=L8e(e,u),p=await aoe(Lh(d),u),A=e.replace(/\\\\/g,"\\"),m={isNode:o,label:is(e)?A:p,labelStyle:n.replace("fill:","color:")};return await q8e(t,m,s,r,l,u)}else{const d=e.replace(//g,"
    "),p=R8e(d.replace("
    ","
    "),u),A=G8e(s,t,p,e?l:!1);if(o){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));const m=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");en(A).attr("style",m)}else{const m=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");en(A).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");en(A).select("text").attr("style",g)}return A}},"createText");function fU(t,e,n){if(t&&t.length){const[a,r]=e,i=Math.PI/180*n,o=Math.cos(i),s=Math.sin(i);for(const l of t){const[u,d]=l;l[0]=(u-a)*o-(d-r)*s+a,l[1]=(u-a)*s+(d-r)*o+r}}}function Swt(t,e){return t[0]===e[0]&&t[1]===e[1]}function Iwt(t,e,n,a=1){const r=n,i=Math.max(e,.1),o=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,s=[0,0];if(r)for(const u of o)fU(u,s,r);const l=function(u,d,p){const A=[];for(const y of u){const w=[...y];Swt(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&A.push(w)}const m=[];d=Math.max(d,.1);const g=[];for(const y of A)for(let w=0;wy.yminw.ymin?1:y.xw.x?1:y.ymax===w.ymax?0:(y.ymax-w.ymax)/Math.abs(y.ymax-w.ymax)),!g.length)return m;let h=[],f=g[0].ymin,b=0;for(;h.length||g.length;){if(g.length){let y=-1;for(let w=0;wf);w++)y=w;g.splice(0,y+1).forEach(w=>{h.push({s:f,edge:w})})}if(h=h.filter(y=>!(y.edge.ymax<=f)),h.sort((y,w)=>y.edge.x===w.edge.x?0:(y.edge.x-w.edge.x)/Math.abs(y.edge.x-w.edge.x)),(p!==1||b%d==0)&&h.length>1)for(let y=0;y=h.length)break;const v=h[y].edge,k=h[w].edge;m.push([[Math.round(v.x),f],[Math.round(k.x),f]])}f+=p,h.forEach(y=>{y.edge.x=y.edge.x+p*y.edge.islope}),b++}return m}(o,i,a);if(r){for(const u of o)fU(u,s,-r);(function(u,d,p){const A=[];u.forEach(m=>A.push(...m)),fU(A,d,p)})(l,s,-r)}return l}function F$(t,e){var n;const a=e.hachureAngle+90;let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(i=r),Iwt(t,r,a,i||1)}let roe=class{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const a=F$(e,n);return{type:"fillSketch",ops:this.renderLines(a,n)}}renderLines(e,n){const a=[];for(const r of e)a.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],n));return a}};function sM(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}let Dwt=class extends roe{fillPolygons(e,n){let a=n.hachureGap;a<0&&(a=4*n.strokeWidth),a=Math.max(a,.1);const r=F$(e,Object.assign({},n,{hachureGap:a})),i=Math.PI/180*n.hachureAngle,o=[],s=.5*a*Math.cos(i),l=.5*a*Math.sin(i);for(const[u,d]of r)sM([u,d])&&o.push([[u[0]-s,u[1]+l],[...d]],[[u[0]+s,u[1]-l],[...d]]);return{type:"fillSketch",ops:this.renderLines(o,n)}}},$wt=class extends roe{fillPolygons(e,n){const a=this._fillPolygons(e,n),r=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),i=this._fillPolygons(e,r);return a.ops=a.ops.concat(i.ops),a}},Twt=class{constructor(e){this.helper=e}fillPolygons(e,n){const a=F$(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(a,n)}dotsOnLines(e,n){const a=[];let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const o=r/4;for(const s of e){const l=sM(s),u=l/r,d=Math.ceil(u)-1,p=l-d*r,A=(s[0][0]+s[1][0])/2-r/4,m=Math.min(s[0][1],s[1][1]);for(let g=0;g{const s=sM(o),l=Math.floor(s/(a+r)),u=(s+r-l*(a+r))/2;let d=o[0],p=o[1];d[0]>p[0]&&(d=o[1],p=o[0]);const A=Math.atan((p[1]-d[1])/(p[0]-d[0]));for(let m=0;m{const o=sM(i),s=Math.round(o/(2*n));let l=i[0],u=i[1];l[0]>u[0]&&(l=i[1],u=i[0]);const d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let p=0;pd%2?u+n:u+e);i.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":i.push({key:"Q",data:[...s]}),e=s[2],n=s[3];break;case"q":{const l=s.map((u,d)=>d%2?u+n:u+e);i.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":i.push({key:"A",data:[...s]}),e=s[5],n=s[6];break;case"a":e+=s[5],n+=s[6],i.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,n]});break;case"H":i.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],i.push({key:"H",data:[e]});break;case"V":i.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...s]}),e=s[2],n=s[3];break;case"s":{const l=s.map((u,d)=>d%2?u+n:u+e);i.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":i.push({key:"T",data:[...s]}),e=s[0],n=s[1];break;case"t":e+=s[0],n+=s[1],i.push({key:"T",data:[e,n]});break;case"Z":case"z":i.push({key:"Z",data:[]}),e=a,n=r}return i}function W8e(t){const e=[];let n="",a=0,r=0,i=0,o=0,s=0,l=0;for(const{key:u,data:d}of t){switch(u){case"M":e.push({key:"M",data:[...d]}),[a,r]=d,[i,o]=d;break;case"C":e.push({key:"C",data:[...d]}),a=d[4],r=d[5],s=d[2],l=d[3];break;case"L":e.push({key:"L",data:[...d]}),[a,r]=d;break;case"H":a=d[0],e.push({key:"L",data:[a,r]});break;case"V":r=d[0],e.push({key:"L",data:[a,r]});break;case"S":{let p=0,A=0;n==="C"||n==="S"?(p=a+(a-s),A=r+(r-l)):(p=a,A=r),e.push({key:"C",data:[p,A,...d]}),s=d[0],l=d[1],a=d[2],r=d[3];break}case"T":{const[p,A]=d;let m=0,g=0;n==="Q"||n==="T"?(m=a+(a-s),g=r+(r-l)):(m=a,g=r);const h=a+2*(m-a)/3,f=r+2*(g-r)/3,b=p+2*(m-p)/3,y=A+2*(g-A)/3;e.push({key:"C",data:[h,f,b,y,p,A]}),s=m,l=g,a=p,r=A;break}case"Q":{const[p,A,m,g]=d,h=a+2*(p-a)/3,f=r+2*(A-r)/3,b=m+2*(p-m)/3,y=g+2*(A-g)/3;e.push({key:"C",data:[h,f,b,y,m,g]}),s=p,l=A,a=m,r=g;break}case"A":{const p=Math.abs(d[0]),A=Math.abs(d[1]),m=d[2],g=d[3],h=d[4],f=d[5],b=d[6];p===0||A===0?(e.push({key:"C",data:[a,r,f,b,f,b]}),a=f,r=b):(a!==f||r!==b)&&(Y8e(a,r,f,b,p,A,m,g,h).forEach(function(y){e.push({key:"C",data:y})}),a=f,r=b);break}case"Z":e.push({key:"Z",data:[]}),a=i,r=o}n=u}return e}function F2(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function Y8e(t,e,n,a,r,i,o,s,l,u){const d=(p=o,Math.PI*p/180);var p;let A=[],m=0,g=0,h=0,f=0;if(u)[m,g,h,f]=u;else{[t,e]=F2(t,e,-d),[n,a]=F2(n,a,-d);const P=(t-n)/2,O=(e-a)/2;let T=P*P/(r*r)+O*O/(i*i);T>1&&(T=Math.sqrt(T),r*=T,i*=T);const D=r*r,$=i*i,F=D*$-D*O*O-$*P*P,L=D*O*O+$*P*P,q=(s===l?-1:1)*Math.sqrt(Math.abs(F/L));h=q*r*O/i+(t+n)/2,f=q*-i*P/r+(e+a)/2,m=Math.asin(parseFloat(((e-f)/i).toFixed(9))),g=Math.asin(parseFloat(((a-f)/i).toFixed(9))),tg&&(m-=2*Math.PI),!l&&g>m&&(g-=2*Math.PI)}let b=g-m;if(Math.abs(b)>120*Math.PI/180){const P=g,O=n,T=a;g=l&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,A=Y8e(n=h+r*Math.cos(g),a=f+i*Math.sin(g),O,T,r,i,o,0,l,[g,P,h,f])}b=g-m;const y=Math.cos(m),w=Math.sin(m),v=Math.cos(g),k=Math.sin(g),_=Math.tan(b/4),x=4/3*r*_,C=4/3*i*_,B=[t,e],I=[t+x*w,e-C*y],E=[n+x*k,a-C*v],S=[n,a];if(I[0]=2*B[0]-I[0],I[1]=2*B[1]-I[1],u)return[I,E,S].concat(A);{A=[I,E,S].concat(A);const P=[];for(let O=0;O2){const r=[];for(let i=0;i2*Math.PI&&(m=0,g=2*Math.PI);const h=2*Math.PI/l.curveStepCount,f=Math.min(h/2,(g-m)/2),b=jge(f,u,d,p,A,m,g,1,l);if(!l.disableMultiStroke){const y=jge(f,u,d,p,A,m,g,1.5,l);b.push(...y)}return o&&(s?b.push(...yw(u,d,u+p*Math.cos(m),d+A*Math.sin(m),l),...yw(u,d,u+p*Math.cos(g),d+A*Math.sin(g),l)):b.push({op:"lineTo",data:[u,d]},{op:"lineTo",data:[u+p*Math.cos(m),d+A*Math.sin(m)]})),{type:"path",ops:b}}function Mge(t,e){const n=W8e(H8e(ioe(t))),a=[];let r=[0,0],i=[0,0];for(const{key:o,data:s}of n)switch(o){case"M":i=[s[0],s[1]],r=[s[0],s[1]];break;case"L":a.push(...yw(i[0],i[1],s[0],s[1],e)),i=[s[0],s[1]];break;case"C":{const[l,u,d,p,A,m]=s;a.push(...zwt(l,u,d,p,A,m,i,e)),i=[A,m];break}case"Z":a.push(...yw(i[0],i[1],r[0],r[1],e)),i=[r[0],r[1]]}return{type:"path",ops:a}}function wU(t,e){const n=[];for(const a of t)if(a.length){const r=e.maxRandomnessOffset||0,i=a.length;if(i>2){n.push({op:"move",data:[a[0][0]+La(r,e),a[0][1]+La(r,e)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let d=r.maxRandomnessOffset||0;d*d*100>s&&(d=l/10);const p=d/2,A=.2+.2*Z8e(r);let m=r.bowing*r.maxRandomnessOffset*(a-e)/200,g=r.bowing*r.maxRandomnessOffset*(t-n)/200;m=La(m,r,u),g=La(g,r,u);const h=[],f=()=>La(p,r,u),b=()=>La(d,r,u),y=r.preserveVertices;return o?h.push({op:"move",data:[t+(y?0:f()),e+(y?0:f())]}):h.push({op:"move",data:[t+(y?0:La(d,r,u)),e+(y?0:La(d,r,u))]}),o?h.push({op:"bcurveTo",data:[m+t+(n-t)*A+f(),g+e+(a-e)*A+f(),m+t+2*(n-t)*A+f(),g+e+2*(a-e)*A+f(),n+(y?0:f()),a+(y?0:f())]}):h.push({op:"bcurveTo",data:[m+t+(n-t)*A+b(),g+e+(a-e)*A+b(),m+t+2*(n-t)*A+b(),g+e+2*(a-e)*A+b(),n+(y?0:b()),a+(y?0:b())]}),h}function oT(t,e,n){if(!t.length)return[];const a=[];a.push([t[0][0]+La(e,n),t[0][1]+La(e,n)]),a.push([t[0][0]+La(e,n),t[0][1]+La(e,n)]);for(let r=1;r3){const i=[],o=1-n.curveTightness;r.push({op:"move",data:[t[1][0],t[1][1]]});for(let s=1;s+21&&r.push(s)):r.push(s),r.push(t[e+3])}else{const l=t[e+0],u=t[e+1],d=t[e+2],p=t[e+3],A=fk(l,u,.5),m=fk(u,d,.5),g=fk(d,p,.5),h=fk(A,m,.5),f=fk(m,g,.5),b=fk(h,f,.5);VZ([l,A,h,b],0,n,r),VZ([b,f,g,p],0,n,r)}var i,o;return r}function jwt(t,e){return ER(t,0,t.length,e)}function ER(t,e,n,a,r){const i=r||[],o=t[e],s=t[n-1];let l=0,u=1;for(let d=e+1;dl&&(l=p,u=d)}return Math.sqrt(l)>a?(ER(t,e,u+1,a,i),ER(t,u,n,a,i)):(i.length||i.push(o),i.push(s)),i}function vU(t,e=.15,n){const a=[],r=(t.length-1)/3;for(let i=0;i0?ER(a,0,a.length,n):a}const sp="none";let QR=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,n,a){return{shape:e,sets:n||[],options:a||this.defaultOptions}}line(e,n,a,r,i){const o=this._o(i);return this._d("line",[X8e(e,n,a,r,o)],o)}rectangle(e,n,a,r,i){const o=this._o(i),s=[],l=Mwt(e,n,a,r,o);if(o.fill){const u=[[e,n],[e+a,n],[e+a,n+r],[e,n+r]];o.fillStyle==="solid"?s.push(wU([u],o)):s.push(IO([u],o))}return o.stroke!==sp&&s.push(l),this._d("rectangle",s,o)}ellipse(e,n,a,r,i){const o=this._o(i),s=[],l=V8e(a,r,o),u=YZ(e,n,o,l);if(o.fill)if(o.fillStyle==="solid"){const d=YZ(e,n,o,l).opset;d.type="fillPath",s.push(d)}else s.push(IO([u.estimatedPoints],o));return o.stroke!==sp&&s.push(u.opset),this._d("ellipse",s,o)}circle(e,n,a,r){const i=this.ellipse(e,n,a,a,r);return i.shape="circle",i}linearPath(e,n){const a=this._o(n);return this._d("linearPath",[iF(e,!1,a)],a)}arc(e,n,a,r,i,o,s=!1,l){const u=this._o(l),d=[],p=Nge(e,n,a,r,i,o,s,!0,u);if(s&&u.fill)if(u.fillStyle==="solid"){const A=Object.assign({},u);A.disableMultiStroke=!0;const m=Nge(e,n,a,r,i,o,!0,!1,A);m.type="fillPath",d.push(m)}else d.push(function(A,m,g,h,f,b,y){const w=A,v=m;let k=Math.abs(g/2),_=Math.abs(h/2);k+=La(.01*k,y),_+=La(.01*_,y);let x=f,C=b;for(;x<0;)x+=2*Math.PI,C+=2*Math.PI;C-x>2*Math.PI&&(x=0,C=2*Math.PI);const B=(C-x)/y.curveStepCount,I=[];for(let E=x;E<=C;E+=B)I.push([w+k*Math.cos(E),v+_*Math.sin(E)]);return I.push([w+k*Math.cos(C),v+_*Math.sin(C)]),I.push([w,v]),IO([I],y)}(e,n,a,r,i,o,u));return u.stroke!==sp&&d.push(p),this._d("arc",d,u)}curve(e,n){const a=this._o(n),r=[],i=Lge(e,a);if(a.fill&&a.fill!==sp)if(a.fillStyle==="solid"){const o=Lge(e,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=e;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const u of l)u.length<3?o.push(...u):u.length===3?o.push(...vU(Uge([u[0],u[0],u[1],u[2]]),10,(1+a.roughness)/2)):o.push(...vU(Uge(u),10,(1+a.roughness)/2))}o.length&&r.push(IO([o],a))}return a.stroke!==sp&&r.push(i),this._d("curve",r,a)}polygon(e,n){const a=this._o(n),r=[],i=iF(e,!0,a);return a.fill&&(a.fillStyle==="solid"?r.push(wU([e],a)):r.push(IO([e],a))),a.stroke!==sp&&r.push(i),this._d("polygon",r,a)}path(e,n){const a=this._o(n),r=[];if(!e)return this._d("path",r,a);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=a.fill&&a.fill!=="transparent"&&a.fill!==sp,o=a.stroke!==sp,s=!!(a.simplification&&a.simplification<1),l=function(d,p,A){const m=W8e(H8e(ioe(d))),g=[];let h=[],f=[0,0],b=[];const y=()=>{b.length>=4&&h.push(...vU(b,p)),b=[]},w=()=>{y(),h.length&&(g.push(h),h=[])};for(const{key:k,data:_}of m)switch(k){case"M":w(),f=[_[0],_[1]],h.push(f);break;case"L":y(),h.push([_[0],_[1]]);break;case"C":if(!b.length){const x=h.length?h[h.length-1]:f;b.push([x[0],x[1]])}b.push([_[0],_[1]]),b.push([_[2],_[3]]),b.push([_[4],_[5]]);break;case"Z":y(),h.push([f[0],f[1]])}if(w(),!A)return g;const v=[];for(const k of g){const _=jwt(k,A);_.length&&v.push(_)}return v}(e,1,s?4-4*(a.simplification||1):(1+a.roughness)/2),u=Mge(e,a);if(i)if(a.fillStyle==="solid")if(l.length===1){const d=Mge(e,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else r.push(wU(l,a));else r.push(IO(l,a));return o&&(s?l.forEach(d=>{r.push(iF(d,!1,a))}):r.push(u)),this._d("path",r,a)}opsToPath(e,n){let a="";for(const r of e.ops){const i=typeof n=="number"&&n>=0?r.data.map(o=>+o.toFixed(n)):r.data;switch(r.op){case"move":a+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":a+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":a+=`L${i[0]} ${i[1]} `}}return a.trim()}toPaths(e){const n=e.sets||[],a=e.options||this.defaultOptions,r=[];for(const i of n){let o=null;switch(i.type){case"path":o={d:this.opsToPath(i),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:sp};break;case"fillPath":o={d:this.opsToPath(i),stroke:sp,strokeWidth:0,fill:a.fill||sp};break;case"fillSketch":o=this.fillSketch(i,a)}o&&r.push(o)}return r}fillSketch(e,n){let a=n.fillWeight;return a<0&&(a=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||sp,strokeWidth:a,fill:sp}}_mergedShape(e){return e.filter((n,a)=>a===0||n.op!=="move")}},Uwt=class{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new QR(n)}draw(e){const n=e.sets||[],a=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(const o of n)switch(o.type){case"path":r.save(),r.strokeStyle=a.stroke==="none"?"transparent":a.stroke,r.lineWidth=a.strokeWidth,a.strokeLineDash&&r.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(r.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(r,o,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=a.fill||"";const s=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(r,o,i,s),r.restore();break}case"fillSketch":this.fillSketch(r,o,a)}}fillSketch(e,n,a){let r=a.fillWeight;r<0&&(r=a.strokeWidth/2),e.save(),a.fillLineDash&&e.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(e.lineDashOffset=a.fillLineDashOffset),e.strokeStyle=a.fill||"",e.lineWidth=r,this._drawToContext(e,n,a.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,a,r="nonzero"){e.beginPath();for(const i of n.ops){const o=typeof a=="number"&&a>=0?i.data.map(s=>+s.toFixed(a)):i.data;switch(i.op){case"move":e.moveTo(o[0],o[1]);break;case"bcurveTo":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":e.lineTo(o[0],o[1])}}n.type==="fillPath"?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,a,r,i){const o=this.gen.line(e,n,a,r,i);return this.draw(o),o}rectangle(e,n,a,r,i){const o=this.gen.rectangle(e,n,a,r,i);return this.draw(o),o}ellipse(e,n,a,r,i){const o=this.gen.ellipse(e,n,a,r,i);return this.draw(o),o}circle(e,n,a,r){const i=this.gen.circle(e,n,a,r);return this.draw(i),i}linearPath(e,n){const a=this.gen.linearPath(e,n);return this.draw(a),a}polygon(e,n){const a=this.gen.polygon(e,n);return this.draw(a),a}arc(e,n,a,r,i,o,s=!1,l){const u=this.gen.arc(e,n,a,r,i,o,s,l);return this.draw(u),u}curve(e,n){const a=this.gen.curve(e,n);return this.draw(a),a}path(e,n){const a=this.gen.path(e,n);return this.draw(a),a}};const sT="http://www.w3.org/2000/svg";let Gwt=class{constructor(e,n){this.svg=e,this.gen=new QR(n)}draw(e){const n=e.sets||[],a=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(sT,"g"),o=e.options.fixedDecimalPlaceDigits;for(const s of n){let l=null;switch(s.type){case"path":l=r.createElementNS(sT,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",a.stroke),l.setAttribute("stroke-width",a.strokeWidth+""),l.setAttribute("fill","none"),a.strokeLineDash&&l.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":l=r.createElementNS(sT,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",a.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(r,s,a)}l&&i.appendChild(l)}return i}fillSketch(e,n,a){let r=a.fillWeight;r<0&&(r=a.strokeWidth/2);const i=e.createElementNS(sT,"path");return i.setAttribute("d",this.opsToPath(n,a.fixedDecimalPlaceDigits)),i.setAttribute("stroke",a.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),a.fillLineDash&&i.setAttribute("stroke-dasharray",a.fillLineDash.join(" ").trim()),a.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${a.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,a,r,i){const o=this.gen.line(e,n,a,r,i);return this.draw(o)}rectangle(e,n,a,r,i){const o=this.gen.rectangle(e,n,a,r,i);return this.draw(o)}ellipse(e,n,a,r,i){const o=this.gen.ellipse(e,n,a,r,i);return this.draw(o)}circle(e,n,a,r){const i=this.gen.circle(e,n,a,r);return this.draw(i)}linearPath(e,n){const a=this.gen.linearPath(e,n);return this.draw(a)}polygon(e,n){const a=this.gen.polygon(e,n);return this.draw(a)}arc(e,n,a,r,i,o,s=!1,l){const u=this.gen.arc(e,n,a,r,i,o,s,l);return this.draw(u)}curve(e,n){const a=this.gen.curve(e,n);return this.draw(a)}path(e,n){const a=this.gen.path(e,n);return this.draw(a)}};var ea={canvas:(t,e)=>new Uwt(t,e),svg:(t,e)=>new Gwt(t,e),generator:t=>new QR(t),newSeed:()=>QR.newSeed()},Ta=Q(async(t,e,n)=>{let a;const r=e.useHtmlLabels||Ci(ot()?.htmlLabels);n?a=n:a="node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=i.insert("g").attr("class","label").attr("style",hu(e.labelStyle));let s;e.label===void 0?s="":s=typeof e.label=="string"?e.label:e.label[0];const l=await Gp(o,Qr(Lh(s),ot()),{useHtmlLabels:r,width:e.width||ot().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let u=l.getBBox();const d=(e?.padding??0)/2;if(r){const p=l.children[0],A=en(l),m=p.getElementsByTagName("img");if(m){const g=s.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(h=>new Promise(f=>{function b(){if(h.style.display="flex",h.style.flexDirection="column",g){const y=ot().fontSize?ot().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[v=Br.fontSize]=Bx(y),k=v*w+"px";h.style.minWidth=k,h.style.maxWidth=k}else h.style.width="100%";f(h)}Q(b,"setupImage"),setTimeout(()=>{h.complete&&b()}),h.addEventListener("error",b),h.addEventListener("load",b)})))}u=p.getBoundingClientRect(),A.attr("width",u.width),A.attr("height",u.height)}return r?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:i,bbox:u,halfPadding:d,label:o}},"labelHelper"),kU=Q(async(t,e,n)=>{const a=n.useHtmlLabels||Ci(ot()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",n.labelStyle||""),i=await Gp(r,Qr(Lh(e),ot()),{useHtmlLabels:a,width:n.width||ot()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img});let o=i.getBBox();const s=n.padding/2;if(Ci(ot()?.flowchart?.htmlLabels)){const l=i.children[0],u=en(i);o=l.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return a?r.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):r.attr("transform","translate(0, "+-o.height/2+")"),n.centerLabel&&r.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:o,halfPadding:s,label:r}},"insertLabel"),ra=Q((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height},"updateNodeBounds"),Oa=Q((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function vr(t){const e=t.map((n,a)=>`${a===0?"M":"L"}${n.x},${n.y}`);return e.push("Z"),e.join(" ")}Q(vr,"createPathFromPoints");function ww(t,e,n,a,r,i){const o=[],l=n-t,u=a-e,d=l/i,p=2*Math.PI/d,A=e+u/2;for(let m=0;m<=50;m++){const g=m/50,h=t+g*l,f=A+r*Math.sin(p*(h-t));o.push({x:h,y:f})}return o}Q(ww,"generateFullSineWavePoints");function F4(t,e,n,a,r,i){const o=[],s=r*Math.PI/180,d=(i*Math.PI/180-s)/(a-1);for(let p=0;p{var n=t.x,a=t.y,r=e.x-n,i=e.y-a,o=t.width/2,s=t.height/2,l,u;return Math.abs(i)*o>Math.abs(r)*s?(i<0&&(s=-s),l=i===0?0:s*r/i,u=s):(r<0&&(o=-o),l=o,u=r===0?0:o*i/r),{x:n+l,y:a+u}},"intersectRect"),rE=Hwt;function K8e(t,e){e&&t.attr("style",e)}Q(K8e,"applyStyle");async function J8e(t){const e=en(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),a=ot();let r=t.label;t.label&&is(t.label)&&(r=await k$(t.label.replace(kn.lineBreakRegex,` `),a));const o='"+r+"";return n.html(Qr(o,a)),K8e(n,t.labelStyle),n.style("display","inline-block"),n.style("padding-right","1px"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}Q(J8e,"addHtmlLabel");var Wwt=Q(async(t,e,n,a)=>{let r=t||"";if(typeof r=="object"&&(r=r[0]),Ci(ot().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"
    "),_e.info("vertexText"+r);const i={isNode:a,label:Lh(r).replace(/fa[blrs]?:fa-[\w-]+/g,s=>``),labelStyle:e&&e.replace("fill:","color:")};return await J8e(i)}else{const i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof r=="string"?o=r.split(/\\n|\n|/gi):Array.isArray(r)?o=r:o=[];for(const s of o){const 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"),n?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),i.appendChild(l)}return i}},"createLabel"),Xk=Wwt,tv=Q((t,e,n,a,r)=>["M",t+r,e,"H",t+n-r,"A",r,r,0,0,1,t+n,e+r,"V",e+a-r,"A",r,r,0,0,1,t+n-r,e+a,"H",t+r,"A",r,r,0,0,1,t,e+a-r,"V",e+r,"A",r,r,0,0,1,t+r,e,"Z"].join(" "),"createRoundedRectPathD"),ePe=Q(async(t,e)=>{_e.info("Creating subgraph rect for ",e.id,e);const n=ot(),{themeVariables:a,handDrawnSeed:r}=n,{clusterBkg:i,clusterBorder:o}=a,{labelStyles:s,nodeStyles:l,borderStyles:u,backgroundStyles:d}=Vn(e),p=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),A=Ci(n.flowchart.htmlLabels),m=p.insert("g").attr("class","cluster-label "),g=await Gp(m,e.label,{style:e.labelStyle,useHtmlLabels:A,isNode:!0});let h=g.getBBox();if(Ci(n.flowchart.htmlLabels)){const x=g.children[0],C=en(g);h=x.getBoundingClientRect(),C.attr("width",h.width),C.attr("height",h.height)}const f=e.width<=h.width+e.padding?h.width+e.padding:e.width;e.width<=h.width+e.padding?e.diff=(f-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,y=e.x-f/2,w=e.y-b/2;_e.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const x=ea.svg(p),C=aa(e,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:r}),B=x.path(tv(y,w,f,b,0),C);v=p.insert(()=>(_e.debug("Rough node insert CXC",B),B),":first-child"),v.select("path:nth-child(2)").attr("style",u.join(";")),v.select("path").attr("style",d.join(";").replace("fill","stroke"))}else v=p.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",y).attr("y",w).attr("width",f).attr("height",b);const{subGraphTitleTopMargin:k}=Q$(n);if(m.attr("transform",`translate(${e.x-h.width/2}, ${e.y-e.height/2+k})`),s){const x=m.select("span");x&&x.attr("style",s)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=h.height-e.padding/2,e.intersect=function(x){return rE(e,x)},{cluster:p,labelBBox:h}},"rect"),Ywt=Q((t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),a=n.insert("rect",":first-child"),r=0*e.padding,i=r/2;a.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");const o=a.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(s){return rE(e,s)},{cluster:n,labelBBox:{width:0,height:0}}},"noteGroup"),Xwt=Q(async(t,e)=>{const n=ot(),{themeVariables:a,handDrawnSeed:r}=n,{altBackground:i,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=a,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),d=u.insert("g",":first-child"),p=u.insert("g").attr("class","cluster-label");let A=u.append("rect");const m=p.node().appendChild(await Xk(e.label,e.labelStyle,void 0,!0));let g=m.getBBox();if(Ci(n.flowchart.htmlLabels)){const B=m.children[0],I=en(m);g=B.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}const h=0*e.padding,f=h/2,b=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+h;e.width<=g.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height+h,w=e.height+h-g.height-6,v=e.x-b/2,k=e.y-y/2;e.width=b;const _=e.y-e.height/2-f+g.height+2;let x;if(e.look==="handDrawn"){const B=e.cssClasses.includes("statediagram-cluster-alt"),I=ea.svg(u),E=e.rx||e.ry?I.path(tv(v,k,b,y,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:r}):I.rectangle(v,k,b,y,{seed:r});x=u.insert(()=>E,":first-child");const S=I.rectangle(v,_,b,w,{fill:B?i:o,fillStyle:B?"hachure":"solid",stroke:l,seed:r});x=u.insert(()=>E,":first-child"),A=u.insert(()=>S)}else x=d.insert("rect",":first-child"),x.attr("class","outer").attr("x",v).attr("y",k).attr("width",b).attr("height",y).attr("data-look",e.look),A.attr("class","inner").attr("x",v).attr("y",_).attr("width",b).attr("height",w);p.attr("transform",`translate(${e.x-g.width/2}, ${k+1-(Ci(n.flowchart.htmlLabels)?0:3)})`);const C=x.node().getBBox();return e.height=C.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(B){return rE(e,B)},{cluster:u,labelBBox:g}},"roundedWithTitle"),Vwt=Q(async(t,e)=>{_e.info("Creating subgraph rect for ",e.id,e);const n=ot(),{themeVariables:a,handDrawnSeed:r}=n,{clusterBkg:i,clusterBorder:o}=a,{labelStyles:s,nodeStyles:l,borderStyles:u,backgroundStyles:d}=Vn(e),p=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),A=Ci(n.flowchart.htmlLabels),m=p.insert("g").attr("class","cluster-label "),g=await Gp(m,e.label,{style:e.labelStyle,useHtmlLabels:A,isNode:!0,width:e.width});let h=g.getBBox();if(Ci(n.flowchart.htmlLabels)){const x=g.children[0],C=en(g);h=x.getBoundingClientRect(),C.attr("width",h.width),C.attr("height",h.height)}const f=e.width<=h.width+e.padding?h.width+e.padding:e.width;e.width<=h.width+e.padding?e.diff=(f-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,y=e.x-f/2,w=e.y-b/2;_e.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const x=ea.svg(p),C=aa(e,{roughness:.7,fill:i,stroke:o,fillWeight:4,seed:r}),B=x.path(tv(y,w,f,b,e.rx),C);v=p.insert(()=>(_e.debug("Rough node insert CXC",B),B),":first-child"),v.select("path:nth-child(2)").attr("style",u.join(";")),v.select("path").attr("style",d.join(";").replace("fill","stroke"))}else v=p.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",y).attr("y",w).attr("width",f).attr("height",b);const{subGraphTitleTopMargin:k}=Q$(n);if(m.attr("transform",`translate(${e.x-h.width/2}, ${e.y-e.height/2+k})`),s){const x=m.select("span");x&&x.attr("style",s)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=h.height-e.padding/2,e.intersect=function(x){return rE(e,x)},{cluster:p,labelBBox:h}},"kanbanSection"),Zwt=Q((t,e)=>{const n=ot(),{themeVariables:a,handDrawnSeed:r}=n,{nodeBorder:i}=a,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;const d=e.height+l,p=e.x-u/2,A=e.y-d/2;e.width=u;let m;if(e.look==="handDrawn"){const f=ea.svg(o).rectangle(p,A,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});m=o.insert(()=>f,":first-child")}else m=s.insert("rect",":first-child"),m.attr("class","divider").attr("x",p).attr("y",A).attr("width",u).attr("height",d).attr("data-look",e.look);const g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(h){return rE(e,h)},{cluster:o,labelBBox:{}}},"divider"),Kwt=ePe,Jwt={rect:ePe,squareRect:Kwt,roundedWithTitle:Xwt,noteGroup:Ywt,divider:Zwt,kanbanSection:Vwt},tPe=new Map,ooe=Q(async(t,e)=>{const n=e.shape||"rect",a=await Jwt[n](t,e);return tPe.set(e.id,a),a},"insertCluster"),evt=Q(()=>{tPe=new Map},"clear");function nPe(t,e){return t.intersect(e)}Q(nPe,"intersectNode");var tvt=nPe;function aPe(t,e,n,a){var r=t.x,i=t.y,o=r-a.x,s=i-a.y,l=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/l);a.x0}Q(ZZ,"sameSign");var avt=oPe;function sPe(t,e,n){let a=t.x,r=t.y,i=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(d){o=Math.min(o,d.x),s=Math.min(s,d.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=a-t.width/2-o,u=r-t.height/2-s;for(let d=0;d1&&i.sort(function(d,p){let A=d.x-n.x,m=d.y-n.y,g=Math.sqrt(A*A+m*m),h=p.x-n.x,f=p.y-n.y,b=Math.sqrt(h*h+f*f);return gd,":first-child");return p.attr("class","anchor").attr("style",hu(s)),ra(e,p),e.intersect=function(A){return _e.info("Circle intersect",e,o,A),qn.circle(e,o,A)},i}Q(cPe,"anchor");function KZ(t,e,n,a,r,i,o){const l=(t+n)/2,u=(e+a)/2,d=Math.atan2(a-e,n-t),p=(n-t)/2,A=(a-e)/2,m=p/r,g=A/i,h=Math.sqrt(m**2+g**2);if(h>1)throw new Error("The given radii are too small to create an arc between the points.");const f=Math.sqrt(1-h**2),b=l+f*i*Math.sin(d)*(o?-1:1),y=u-f*r*Math.cos(d)*(o?-1:1),w=Math.atan2((e-y)/i,(t-b)/r);let k=Math.atan2((a-y)/i,(n-b)/r)-w;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const _=[];for(let x=0;x<20;x++){const C=x/19,B=w+C*k,I=b+r*Math.cos(B),E=y+i*Math.sin(B);_.push({x:I,y:E})}return _}Q(KZ,"generateArcPoints");async function lPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=i.width+e.padding+20,s=i.height+e.padding,l=s/2,u=l/(2.5+s/50),{cssStyles:d}=e,p=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...KZ(-o/2,-s/2,-o/2,s/2,u,l,!1),{x:o/2,y:s/2},...KZ(o/2,s/2,o/2,-s/2,u,l,!0)],A=ea.svg(r),m=aa(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=vr(p),h=A.path(g,m),f=r.insert(()=>h,":first-child");return f.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",d),a&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",a),f.attr("transform",`translate(${u/2}, 0)`),ra(e,f),e.intersect=function(b){return qn.polygon(e,p,b)},r}Q(lPe,"bowTieRect");function nv(t,e,n,a){return t.insert("polygon",":first-child").attr("points",a.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}Q(nv,"insertPolygonShape");async function uPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=i.height+e.padding,s=12,l=i.width+e.padding+s,u=0,d=l,p=-o,A=0,m=[{x:u+s,y:p},{x:d,y:p},{x:d,y:A},{x:u,y:A},{x:u,y:p+s},{x:u+s,y:p}];let g;const{cssStyles:h}=e;if(e.look==="handDrawn"){const f=ea.svg(r),b=aa(e,{}),y=vr(m),w=f.path(y,b);g=r.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),h&&g.attr("style",h)}else g=nv(r,l,o,m);return a&&g.attr("style",a),ra(e,g),e.intersect=function(f){return qn.polygon(e,m,f)},r}Q(uPe,"card");function dPe(t,e){const{nodeStyles:n}=Vn(e);e.label="";const a=t.insert("g").attr("class",Oa(e)).attr("id",e.domId??e.id),{cssStyles:r}=e,i=Math.max(28,e.width??0),o=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}],s=ea.svg(a),l=aa(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const u=vr(o),d=s.path(u,l),p=a.insert(()=>d,":first-child");return r&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",r),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(A){return qn.polygon(e,o,A)},a}Q(dPe,"choice");async function soe(t,e,n){const{labelStyles:a,nodeStyles:r}=Vn(e);e.labelStyle=a;const{shapeSvg:i,bbox:o,halfPadding:s}=await Ta(t,e,Oa(e)),l=n?.padding??s,u=o.width/2+l;let d;const{cssStyles:p}=e;if(e.look==="handDrawn"){const A=ea.svg(i),m=aa(e,{}),g=A.circle(0,0,u*2,m);d=i.insert(()=>g,":first-child"),d.attr("class","basic label-container").attr("style",hu(p))}else d=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",u).attr("cx",0).attr("cy",0);return ra(e,d),e.calcIntersect=function(A,m){const g=A.width/2;return qn.circle(A,g,m)},e.intersect=function(A){return _e.info("Circle intersect",e,u,A),qn.circle(e,u,A)},i}Q(soe,"circle");function pPe(t){const e=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),a=t*2,r={x:a/2*e,y:a/2*n},i={x:-(a/2)*e,y:a/2*n},o={x:-(a/2)*e,y:-(a/2)*n},s={x:a/2*e,y:-(a/2)*n};return`M ${i.x},${i.y} L ${s.x},${s.y} M ${r.x},${r.y} L ${o.x},${o.y}`}Q(pPe,"createLine");function APe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n,e.label="";const r=t.insert("g").attr("class",Oa(e)).attr("id",e.domId??e.id),i=Math.max(30,e?.width??0),{cssStyles:o}=e,s=ea.svg(r),l=aa(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const u=s.circle(0,0,i*2,l),d=pPe(i),p=s.path(d,l),A=r.insert(()=>u,":first-child");return A.insert(()=>p),o&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",a),ra(e,A),e.intersect=function(m){return _e.info("crossedCircle intersect",e,{radius:i,point:m}),qn.circle(e,i,m)},r}Q(APe,"crossedCircle");function Gf(t,e,n,a=100,r=0,i=180){const o=[],s=r*Math.PI/180,d=(i*Math.PI/180-s)/(a-1);for(let p=0;pw,":first-child").attr("stroke-opacity",0),v.insert(()=>b,":first-child"),v.attr("class","text"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),a&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",a),v.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-s/2+u-(i.x-(i.left??0))},${-l/2+(e.padding??0)/2-(i.y-(i.top??0))})`),ra(e,v),e.intersect=function(k){return qn.polygon(e,A,k)},r}Q(mPe,"curlyBraceLeft");function Hf(t,e,n,a=100,r=0,i=180){const o=[],s=r*Math.PI/180,d=(i*Math.PI/180-s)/(a-1);for(let p=0;pw,":first-child").attr("stroke-opacity",0),v.insert(()=>b,":first-child"),v.attr("class","text"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),a&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",a),v.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(i.x-(i.left??0))},${-l/2+(e.padding??0)/2-(i.y-(i.top??0))})`),ra(e,v),e.intersect=function(k){return qn.polygon(e,A,k)},r}Q(gPe,"curlyBraceRight");function gl(t,e,n,a=100,r=0,i=180){const o=[],s=r*Math.PI/180,d=(i*Math.PI/180-s)/(a-1);for(let p=0;px,":first-child").attr("stroke-opacity",0),C.insert(()=>y,":first-child"),C.insert(()=>k,":first-child"),C.attr("class","text"),d&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",d),a&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",a),C.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(i.x-(i.left??0))},${-l/2+(e.padding??0)/2-(i.y-(i.top??0))})`),ra(e,C),e.intersect=function(B){return qn.polygon(e,m,B)},r}Q(hPe,"curlyBraces");async function fPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=80,s=20,l=Math.max(o,(i.width+(e.padding??0)*2)*1.25,e?.width??0),u=Math.max(s,i.height+(e.padding??0)*2,e?.height??0),d=u/2,{cssStyles:p}=e,A=ea.svg(r),m=aa(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=l,h=u,f=g-d,b=h/4,y=[{x:f,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:f,y:h},...F4(-f,-h/2,d,50,270,90)],w=vr(y),v=A.path(w,m),k=r.insert(()=>v,":first-child");return k.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),a&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",a),k.attr("transform",`translate(${-l/2}, ${-u/2})`),ra(e,k),e.intersect=function(_){return qn.polygon(e,y,_)},r}Q(fPe,"curvedTrapezoid");var ivt=Q((t,e,n,a,r,i)=>[`M${t},${e+i}`,`a${r},${i} 0,0,0 ${n},0`,`a${r},${i} 0,0,0 ${-n},0`,`l0,${a}`,`a${r},${i} 0,0,0 ${n},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),ovt=Q((t,e,n,a,r,i)=>[`M${t},${e+i}`,`M${t+n},${e+i}`,`a${r},${i} 0,0,0 ${-n},0`,`l0,${a}`,`a${r},${i} 0,0,0 ${n},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),svt=Q((t,e,n,a,r,i)=>[`M${t-n/2},${-a/2}`,`a${r},${i} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function bPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+e.padding,e.width??0),l=s/2,u=l/(2.5+s/50),d=Math.max(i.height+u+e.padding,e.height??0);let p;const{cssStyles:A}=e;if(e.look==="handDrawn"){const m=ea.svg(r),g=ovt(0,0,s,d,l,u),h=svt(0,u,s,d,l,u),f=m.path(g,aa(e,{})),b=m.path(h,aa(e,{fill:"none"}));p=r.insert(()=>b,":first-child"),p=r.insert(()=>f,":first-child"),p.attr("class","basic label-container"),A&&p.attr("style",A)}else{const m=ivt(0,0,s,d,l,u);p=r.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",hu(A)).attr("style",a)}return p.attr("label-offset-y",u),p.attr("transform",`translate(${-s/2}, ${-(d/2+u)})`),ra(e,p),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)+(e.padding??0)/1.5-(i.y-(i.top??0))})`),e.intersect=function(m){const g=qn.rect(e,m),h=g.x-(e.x??0);if(l!=0&&(Math.abs(h)<(e.width??0)/2||Math.abs(h)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-u)){let f=u*u*(1-h*h/(l*l));f>0&&(f=Math.sqrt(f)),f=u-f,m.y-(e.y??0)>0&&(f=-f),g.y+=f}return g},r}Q(bPe,"cylinder");async function yPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=i.width+e.padding,l=i.height+e.padding,u=l*.2,d=-s/2,p=-l/2-u/2,{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const h=[{x:d,y:p+u},{x:-d,y:p+u},{x:-d,y:-p},{x:d,y:-p},{x:d,y:p},{x:-d,y:p},{x:-d,y:p+u}],f=m.polygon(h.map(y=>[y.x,y.y]),g),b=r.insert(()=>f,":first-child");return b.attr("class","basic label-container"),A&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",A),a&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",a),o.attr("transform",`translate(${d+(e.padding??0)/2-(i.x-(i.left??0))}, ${p+u+(e.padding??0)/2-(i.y-(i.top??0))})`),ra(e,b),e.intersect=function(y){return qn.rect(e,y)},r}Q(yPe,"dividedRectangle");async function wPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,halfPadding:o}=await Ta(t,e,Oa(e)),l=i.width/2+o+5,u=i.width/2+o;let d;const{cssStyles:p}=e;if(e.look==="handDrawn"){const A=ea.svg(r),m=aa(e,{roughness:.2,strokeWidth:2.5}),g=aa(e,{roughness:.2,strokeWidth:1.5}),h=A.circle(0,0,l*2,m),f=A.circle(0,0,u*2,g);d=r.insert("g",":first-child"),d.attr("class",hu(e.cssClasses)).attr("style",hu(p)),d.node()?.appendChild(h),d.node()?.appendChild(f)}else{d=r.insert("g",":first-child");const A=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",a),A.attr("class","outer-circle").attr("style",a).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",a).attr("r",u).attr("cx",0).attr("cy",0)}return ra(e,d),e.intersect=function(A){return _e.info("DoubleCircle intersect",e,l,A),qn.circle(e,l,A)},r}Q(wPe,"doublecircle");function vPe(t,e,{config:{themeVariables:n}}){const{labelStyles:a,nodeStyles:r}=Vn(e);e.label="",e.labelStyle=a;const i=t.insert("g").attr("class",Oa(e)).attr("id",e.domId??e.id),o=7,{cssStyles:s}=e,l=ea.svg(i),{nodeBorder:u}=n,d=aa(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const p=l.circle(0,0,o*2,d),A=i.insert(()=>p,":first-child");return A.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",s),r&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",r),ra(e,A),e.intersect=function(m){return _e.info("filledCircle intersect",e,{radius:o,point:m}),qn.circle(e,o,m)},i}Q(vPe,"filledCircle");async function kPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=i.width+(e.padding??0),l=s+i.height,u=s+i.height,d=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:p}=e,A=ea.svg(r),m=aa(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=vr(d),h=A.path(g,m),f=r.insert(()=>h,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return p&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",p),a&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",a),e.width=s,e.height=l,ra(e,f),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-l/2+(e.padding??0)/2+(i.y-(i.top??0))})`),e.intersect=function(b){return _e.info("Triangle intersect",e,d,b),qn.polygon(e,d,b)},r}Q(kPe,"flippedTriangle");function xPe(t,e,{dir:n,config:{state:a,themeVariables:r}}){const{nodeStyles:i}=Vn(e);e.label="";const o=t.insert("g").attr("class",Oa(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);n==="LR"&&(l=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*l/2,p=-1*u/2,A=ea.svg(o),m=aa(e,{stroke:r.lineColor,fill:r.lineColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=A.rectangle(d,p,l,u,m),h=o.insert(()=>g,":first-child");s&&e.look!=="handDrawn"&&h.selectAll("path").attr("style",s),i&&e.look!=="handDrawn"&&h.selectAll("path").attr("style",i),ra(e,h);const f=a?.padding??0;return e.width&&e.height&&(e.width+=f/2||0,e.height+=f/2||0),e.intersect=function(b){return qn.rect(e,b)},o}Q(xPe,"forkJoin");async function OPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const r=80,i=50,{shapeSvg:o,bbox:s}=await Ta(t,e,Oa(e)),l=Math.max(r,s.width+(e.padding??0)*2,e?.width??0),u=Math.max(i,s.height+(e.padding??0)*2,e?.height??0),d=u/2,{cssStyles:p}=e,A=ea.svg(o),m=aa(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...F4(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],h=vr(g),f=A.path(h,m),b=o.insert(()=>f,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),a&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",a),ra(e,b),e.intersect=function(y){return _e.info("Pill intersect",e,{radius:d,point:y}),qn.polygon(e,g,y)},o}Q(OPe,"halfRoundedRectangle");async function CPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=i.height+(e.padding??0),s=i.width+(e.padding??0)*2.5,{cssStyles:l}=e,u=ea.svg(r),d=aa(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=s/2;const A=p/6;p=p+A;const m=o/2,g=m/2,h=p-g,f=[{x:-h,y:-m},{x:0,y:-m},{x:h,y:-m},{x:p,y:0},{x:h,y:m},{x:0,y:m},{x:-h,y:m},{x:-p,y:0}],b=vr(f),y=u.path(b,d),w=r.insert(()=>y,":first-child");return w.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),a&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",a),e.width=s,e.height=o,ra(e,w),e.intersect=function(v){return qn.polygon(e,f,v)},r}Q(CPe,"hexagon");async function _Pe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.label="",e.labelStyle=n;const{shapeSvg:r}=await Ta(t,e,Oa(e)),i=Math.max(30,e?.width??0),o=Math.max(30,e?.height??0),{cssStyles:s}=e,l=ea.svg(r),u=aa(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:0,y:0},{x:i,y:0},{x:0,y:o},{x:i,y:o}],p=vr(d),A=l.path(p,u),m=r.insert(()=>A,":first-child");return m.attr("class","basic label-container"),s&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",s),a&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",a),m.attr("transform",`translate(${-i/2}, ${-o/2})`),ra(e,m),e.intersect=function(g){return _e.info("Pill intersect",e,{points:d}),qn.polygon(e,d,g)},r}Q(_Pe,"hourglass");async function BPe(t,e,{config:{themeVariables:n,flowchart:a}}){const{labelStyles:r}=Vn(e);e.labelStyle=r;const i=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(i,o),l=a?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:u,bbox:d,label:p}=await Ta(t,e,"icon-shape default"),A=e.pos==="t",m=s,g=s,{nodeBorder:h}=n,{stylesMap:f}=eE(e),b=-g/2,y=-m/2,w=e.label?8:0,v=ea.svg(u),k=aa(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=v.rectangle(b,y,g,m,k),x=Math.max(g,d.width),C=m+d.height+w,B=v.rectangle(-x/2,-C/2,x,C,{...k,fill:"transparent",stroke:"none"}),I=u.insert(()=>_,":first-child"),E=u.insert(()=>B);if(e.icon){const S=u.append("g");S.html(`${await bw(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const P=S.node().getBBox(),O=P.width,T=P.height,D=P.x,$=P.y;S.attr("transform",`translate(${-O/2-D},${A?d.height/2+w/2-T/2-$:-d.height/2-w/2-T/2-$})`),S.attr("style",`color: ${f.get("stroke")??h};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${A?-C/2:C/2-d.height})`),I.attr("transform",`translate(0,${A?d.height/2+w/2:-d.height/2-w/2})`),ra(e,E),e.intersect=function(S){if(_e.info("iconSquare intersect",e,S),!e.label)return qn.rect(e,S);const P=e.x??0,O=e.y??0,T=e.height??0;let D=[];return A?D=[{x:P-d.width/2,y:O-T/2},{x:P+d.width/2,y:O-T/2},{x:P+d.width/2,y:O-T/2+d.height+w},{x:P+g/2,y:O-T/2+d.height+w},{x:P+g/2,y:O+T/2},{x:P-g/2,y:O+T/2},{x:P-g/2,y:O-T/2+d.height+w},{x:P-d.width/2,y:O-T/2+d.height+w}]:D=[{x:P-g/2,y:O-T/2},{x:P+g/2,y:O-T/2},{x:P+g/2,y:O-T/2+m},{x:P+d.width/2,y:O-T/2+m},{x:P+d.width/2/2,y:O+T/2},{x:P-d.width/2,y:O+T/2},{x:P-d.width/2,y:O-T/2+m},{x:P-g/2,y:O-T/2+m}],qn.polygon(e,D,S)},u}Q(BPe,"icon");async function EPe(t,e,{config:{themeVariables:n,flowchart:a}}){const{labelStyles:r}=Vn(e);e.labelStyle=r;const i=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(i,o),l=a?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:u,bbox:d,label:p}=await Ta(t,e,"icon-shape default"),A=20,m=e.label?8:0,g=e.pos==="t",{nodeBorder:h,mainBkg:f}=n,{stylesMap:b}=eE(e),y=ea.svg(u),w=aa(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=b.get("fill");w.stroke=v??f;const k=u.append("g");e.icon&&k.html(`${await bw(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const _=k.node().getBBox(),x=_.width,C=_.height,B=_.x,I=_.y,E=Math.max(x,C)*Math.SQRT2+A*2,S=y.circle(0,0,E,w),P=Math.max(E,d.width),O=E+d.height+m,T=y.rectangle(-P/2,-O/2,P,O,{...w,fill:"transparent",stroke:"none"}),D=u.insert(()=>S,":first-child"),$=u.insert(()=>T);return k.attr("transform",`translate(${-x/2-B},${g?d.height/2+m/2-C/2-I:-d.height/2-m/2-C/2-I})`),k.attr("style",`color: ${b.get("stroke")??h};`),p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-O/2:O/2-d.height})`),D.attr("transform",`translate(0,${g?d.height/2+m/2:-d.height/2-m/2})`),ra(e,$),e.intersect=function(F){return _e.info("iconSquare intersect",e,F),qn.rect(e,F)},u}Q(EPe,"iconCircle");async function QPe(t,e,{config:{themeVariables:n,flowchart:a}}){const{labelStyles:r}=Vn(e);e.labelStyle=r;const i=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(i,o),l=a?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:u,bbox:d,halfPadding:p,label:A}=await Ta(t,e,"icon-shape default"),m=e.pos==="t",g=s+p*2,h=s+p*2,{nodeBorder:f,mainBkg:b}=n,{stylesMap:y}=eE(e),w=-h/2,v=-g/2,k=e.label?8:0,_=ea.svg(u),x=aa(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=y.get("fill");x.stroke=C??b;const B=_.path(tv(w,v,h,g,5),x),I=Math.max(h,d.width),E=g+d.height+k,S=_.rectangle(-I/2,-E/2,I,E,{...x,fill:"transparent",stroke:"none"}),P=u.insert(()=>B,":first-child").attr("class","icon-shape2"),O=u.insert(()=>S);if(e.icon){const T=u.append("g");T.html(`${await bw(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const D=T.node().getBBox(),$=D.width,F=D.height,L=D.x,q=D.y;T.attr("transform",`translate(${-$/2-L},${m?d.height/2+k/2-F/2-q:-d.height/2-k/2-F/2-q})`),T.attr("style",`color: ${y.get("stroke")??f};`)}return A.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-E/2:E/2-d.height})`),P.attr("transform",`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),ra(e,O),e.intersect=function(T){if(_e.info("iconSquare intersect",e,T),!e.label)return qn.rect(e,T);const D=e.x??0,$=e.y??0,F=e.height??0;let L=[];return m?L=[{x:D-d.width/2,y:$-F/2},{x:D+d.width/2,y:$-F/2},{x:D+d.width/2,y:$-F/2+d.height+k},{x:D+h/2,y:$-F/2+d.height+k},{x:D+h/2,y:$+F/2},{x:D-h/2,y:$+F/2},{x:D-h/2,y:$-F/2+d.height+k},{x:D-d.width/2,y:$-F/2+d.height+k}]:L=[{x:D-h/2,y:$-F/2},{x:D+h/2,y:$-F/2},{x:D+h/2,y:$-F/2+g},{x:D+d.width/2,y:$-F/2+g},{x:D+d.width/2/2,y:$+F/2},{x:D-d.width/2,y:$+F/2},{x:D-d.width/2,y:$-F/2+g},{x:D-h/2,y:$-F/2+g}],qn.polygon(e,L,T)},u}Q(QPe,"iconRounded");async function SPe(t,e,{config:{themeVariables:n,flowchart:a}}){const{labelStyles:r}=Vn(e);e.labelStyle=r;const i=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(i,o),l=a?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:u,bbox:d,halfPadding:p,label:A}=await Ta(t,e,"icon-shape default"),m=e.pos==="t",g=s+p*2,h=s+p*2,{nodeBorder:f,mainBkg:b}=n,{stylesMap:y}=eE(e),w=-h/2,v=-g/2,k=e.label?8:0,_=ea.svg(u),x=aa(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=y.get("fill");x.stroke=C??b;const B=_.path(tv(w,v,h,g,.1),x),I=Math.max(h,d.width),E=g+d.height+k,S=_.rectangle(-I/2,-E/2,I,E,{...x,fill:"transparent",stroke:"none"}),P=u.insert(()=>B,":first-child"),O=u.insert(()=>S);if(e.icon){const T=u.append("g");T.html(`${await bw(e.icon,{height:s,width:s,fallbackPrefix:""})}`);const D=T.node().getBBox(),$=D.width,F=D.height,L=D.x,q=D.y;T.attr("transform",`translate(${-$/2-L},${m?d.height/2+k/2-F/2-q:-d.height/2-k/2-F/2-q})`),T.attr("style",`color: ${y.get("stroke")??f};`)}return A.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-E/2:E/2-d.height})`),P.attr("transform",`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),ra(e,O),e.intersect=function(T){if(_e.info("iconSquare intersect",e,T),!e.label)return qn.rect(e,T);const D=e.x??0,$=e.y??0,F=e.height??0;let L=[];return m?L=[{x:D-d.width/2,y:$-F/2},{x:D+d.width/2,y:$-F/2},{x:D+d.width/2,y:$-F/2+d.height+k},{x:D+h/2,y:$-F/2+d.height+k},{x:D+h/2,y:$+F/2},{x:D-h/2,y:$+F/2},{x:D-h/2,y:$-F/2+d.height+k},{x:D-d.width/2,y:$-F/2+d.height+k}]:L=[{x:D-h/2,y:$-F/2},{x:D+h/2,y:$-F/2},{x:D+h/2,y:$-F/2+g},{x:D+d.width/2,y:$-F/2+g},{x:D+d.width/2/2,y:$+F/2},{x:D-d.width/2,y:$+F/2},{x:D-d.width/2,y:$-F/2+g},{x:D-h/2,y:$-F/2+g}],qn.polygon(e,L,T)},u}Q(SPe,"iconSquare");async function IPe(t,e,{config:{flowchart:n}}){const a=new Image;a.src=e?.img??"",await a.decode();const r=Number(a.naturalWidth.toString().replace("px","")),i=Number(a.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/i;const{labelStyles:o}=Vn(e);e.labelStyle=o;const s=n?.wrappingWidth;e.defaultWidth=n?.wrappingWidth;const l=Math.max(e.label?s??0:0,e?.assetWidth??r),u=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,d=e.constraint==="on"?u/e.imageAspectRatio:e?.assetHeight??i;e.width=Math.max(u,s??0);const{shapeSvg:p,bbox:A,label:m}=await Ta(t,e,"image-shape default"),g=e.pos==="t",h=-u/2,f=-d/2,b=e.label?8:0,y=ea.svg(p),w=aa(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=y.rectangle(h,f,u,d,w),k=Math.max(u,A.width),_=d+A.height+b,x=y.rectangle(-k/2,-_/2,k,_,{...w,fill:"none",stroke:"none"}),C=p.insert(()=>v,":first-child"),B=p.insert(()=>x);if(e.img){const I=p.append("image");I.attr("href",e.img),I.attr("width",u),I.attr("height",d),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-u/2},${g?_/2-d:-_/2})`)}return m.attr("transform",`translate(${-A.width/2-(A.x-(A.left??0))},${g?-d/2-A.height/2-b/2:d/2-A.height/2+b/2})`),C.attr("transform",`translate(0,${g?A.height/2+b/2:-A.height/2-b/2})`),ra(e,B),e.intersect=function(I){if(_e.info("iconSquare intersect",e,I),!e.label)return qn.rect(e,I);const E=e.x??0,S=e.y??0,P=e.height??0;let O=[];return g?O=[{x:E-A.width/2,y:S-P/2},{x:E+A.width/2,y:S-P/2},{x:E+A.width/2,y:S-P/2+A.height+b},{x:E+u/2,y:S-P/2+A.height+b},{x:E+u/2,y:S+P/2},{x:E-u/2,y:S+P/2},{x:E-u/2,y:S-P/2+A.height+b},{x:E-A.width/2,y:S-P/2+A.height+b}]:O=[{x:E-u/2,y:S-P/2},{x:E+u/2,y:S-P/2},{x:E+u/2,y:S-P/2+d},{x:E+A.width/2,y:S-P/2+d},{x:E+A.width/2/2,y:S+P/2},{x:E-A.width/2,y:S+P/2},{x:E-A.width/2,y:S-P/2+d},{x:E-u/2,y:S-P/2+d}],qn.polygon(e,O,I)},p}Q(IPe,"imageSquare");async function DPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),s=Math.max(i.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let u;const{cssStyles:d}=e;if(e.look==="handDrawn"){const p=ea.svg(r),A=aa(e,{}),m=vr(l),g=p.path(m,A);u=r.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=nv(r,o,s,l);return a&&u.attr("style",a),e.width=o,e.height=s,ra(e,u),e.intersect=function(p){return qn.polygon(e,l,p)},r}Q(DPe,"inv_trapezoid");async function cM(t,e,n){const{labelStyles:a,nodeStyles:r}=Vn(e);e.labelStyle=a;const{shapeSvg:i,bbox:o}=await Ta(t,e,Oa(e)),s=Math.max(o.width+n.labelPaddingX*2,e?.width||0),l=Math.max(o.height+n.labelPaddingY*2,e?.height||0),u=-s/2,d=-l/2;let p,{rx:A,ry:m}=e;const{cssStyles:g}=e;if(n?.rx&&n.ry&&(A=n.rx,m=n.ry),e.look==="handDrawn"){const h=ea.svg(i),f=aa(e,{}),b=A||m?h.path(tv(u,d,s,l,A||0),f):h.rectangle(u,d,s,l,f);p=i.insert(()=>b,":first-child"),p.attr("class","basic label-container").attr("style",hu(g))}else p=i.insert("rect",":first-child"),p.attr("class","basic label-container").attr("style",r).attr("rx",hu(A)).attr("ry",hu(m)).attr("x",u).attr("y",d).attr("width",s).attr("height",l);return ra(e,p),e.calcIntersect=function(h,f){return qn.rect(h,f)},e.intersect=function(h){return qn.rect(e,h)},i}Q(cM,"drawRect");async function $Pe(t,e){const{shapeSvg:n,bbox:a,label:r}=await Ta(t,e,"label"),i=n.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),ra(e,i),e.intersect=function(l){return qn.rect(e,l)},n}Q($Pe,"labelRect");async function TPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=Math.max(i.width+(e.padding??0),e?.width??0),s=Math.max(i.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let u;const{cssStyles:d}=e;if(e.look==="handDrawn"){const p=ea.svg(r),A=aa(e,{}),m=vr(l),g=p.path(m,A);u=r.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=nv(r,o,s,l);return a&&u.attr("style",a),e.width=o,e.height=s,ra(e,u),e.intersect=function(p){return qn.polygon(e,l,p)},r}Q(TPe,"lean_left");async function PPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=Math.max(i.width+(e.padding??0),e?.width??0),s=Math.max(i.height+(e.padding??0),e?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let u;const{cssStyles:d}=e;if(e.look==="handDrawn"){const p=ea.svg(r),A=aa(e,{}),m=vr(l),g=p.path(m,A);u=r.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=nv(r,o,s,l);return a&&u.attr("style",a),e.width=o,e.height=s,ra(e,u),e.intersect=function(p){return qn.polygon(e,l,p)},r}Q(PPe,"lean_right");function FPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.label="",e.labelStyle=n;const r=t.insert("g").attr("class",Oa(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,o=Math.max(35,e?.width??0),s=Math.max(35,e?.height??0),l=7,u=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],d=ea.svg(r),p=aa(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const A=vr(u),m=d.path(A,p),g=r.insert(()=>m,":first-child");return i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),g.attr("transform",`translate(-${o/2},${-s})`),ra(e,g),e.intersect=function(h){return _e.info("lightningBolt intersect",e,h),qn.polygon(e,u,h)},r}Q(FPe,"lightningBolt");var cvt=Q((t,e,n,a,r,i,o)=>[`M${t},${e+i}`,`a${r},${i} 0,0,0 ${n},0`,`a${r},${i} 0,0,0 ${-n},0`,`l0,${a}`,`a${r},${i} 0,0,0 ${n},0`,`l0,${-a}`,`M${t},${e+i+o}`,`a${r},${i} 0,0,0 ${n},0`].join(" "),"createCylinderPathD"),lvt=Q((t,e,n,a,r,i,o)=>[`M${t},${e+i}`,`M${t+n},${e+i}`,`a${r},${i} 0,0,0 ${-n},0`,`l0,${a}`,`a${r},${i} 0,0,0 ${n},0`,`l0,${-a}`,`M${t},${e+i+o}`,`a${r},${i} 0,0,0 ${n},0`].join(" "),"createOuterCylinderPathD"),uvt=Q((t,e,n,a,r,i)=>[`M${t-n/2},${-a/2}`,`a${r},${i} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function RPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0),e.width??0),l=s/2,u=l/(2.5+s/50),d=Math.max(i.height+u+(e.padding??0),e.height??0),p=d*.1;let A;const{cssStyles:m}=e;if(e.look==="handDrawn"){const g=ea.svg(r),h=lvt(0,0,s,d,l,u,p),f=uvt(0,u,s,d,l,u),b=aa(e,{}),y=g.path(h,b),w=g.path(f,b);r.insert(()=>w,":first-child").attr("class","line"),A=r.insert(()=>y,":first-child"),A.attr("class","basic label-container"),m&&A.attr("style",m)}else{const g=cvt(0,0,s,d,l,u,p);A=r.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",hu(m)).attr("style",a)}return A.attr("label-offset-y",u),A.attr("transform",`translate(${-s/2}, ${-(d/2+u)})`),ra(e,A),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)+u-(i.y-(i.top??0))})`),e.intersect=function(g){const h=qn.rect(e,g),f=h.x-(e.x??0);if(l!=0&&(Math.abs(f)<(e.width??0)/2||Math.abs(f)==(e.width??0)/2&&Math.abs(h.y-(e.y??0))>(e.height??0)/2-u)){let b=u*u*(1-f*f/(l*l));b>0&&(b=Math.sqrt(b)),b=u-b,g.y-(e.y??0)>0&&(b=-b),h.y+=b}return h},r}Q(RPe,"linedCylinder");async function LPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/4,d=l+u,{cssStyles:p}=e,A=ea.svg(r),m=aa(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:d/2},...ww(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,u,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2},{x:-s/2,y:-d/2},{x:-s/2,y:d/2*1.1},{x:-s/2,y:-d/2}],h=A.polygon(g.map(b=>[b.x,b.y]),m),f=r.insert(()=>h,":first-child");return f.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",p),a&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",a),f.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(i.x-(i.left??0))},${-l/2+(e.padding??0)-u/2-(i.y-(i.top??0))})`),ra(e,f),e.intersect=function(b){return qn.polygon(e,g,b)},r}Q(LPe,"linedWaveEdgedRect");async function NPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=5,d=-s/2,p=-l/2,{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{}),h=[{x:d-u,y:p+u},{x:d-u,y:p+l+u},{x:d+s-u,y:p+l+u},{x:d+s-u,y:p+l},{x:d+s,y:p+l},{x:d+s,y:p+l-u},{x:d+s+u,y:p+l-u},{x:d+s+u,y:p-u},{x:d+u,y:p-u},{x:d+u,y:p},{x:d,y:p},{x:d,y:p+u}],f=[{x:d,y:p+u},{x:d+s-u,y:p+u},{x:d+s-u,y:p+l},{x:d+s,y:p+l},{x:d+s,y:p},{x:d,y:p}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=vr(h),y=m.path(b,g),w=vr(f),v=m.path(w,{...g,fill:"none"}),k=r.insert(()=>v,":first-child");return k.insert(()=>y,":first-child"),k.attr("class","basic label-container"),A&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",A),a&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",a),o.attr("transform",`translate(${-(i.width/2)-u-(i.x-(i.left??0))}, ${-(i.height/2)+u-(i.y-(i.top??0))})`),ra(e,k),e.intersect=function(_){return qn.polygon(e,h,_)},r}Q(NPe,"multiRect");async function MPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/4,d=l+u,p=-s/2,A=-d/2,m=5,{cssStyles:g}=e,h=ww(p-m,A+d+m,p+s-m,A+d+m,u,.8),f=h?.[h.length-1],b=[{x:p-m,y:A+m},{x:p-m,y:A+d+m},...h,{x:p+s-m,y:f.y-m},{x:p+s,y:f.y-m},{x:p+s,y:f.y-2*m},{x:p+s+m,y:f.y-2*m},{x:p+s+m,y:A-m},{x:p+m,y:A-m},{x:p+m,y:A},{x:p,y:A},{x:p,y:A+m}],y=[{x:p,y:A+m},{x:p+s-m,y:A+m},{x:p+s-m,y:f.y-m},{x:p+s,y:f.y-m},{x:p+s,y:A},{x:p,y:A}],w=ea.svg(r),v=aa(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=vr(b),_=w.path(k,v),x=vr(y),C=w.path(x,v),B=r.insert(()=>_,":first-child");return B.insert(()=>C),B.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",g),a&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",a),B.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(i.width/2)-m-(i.x-(i.left??0))}, ${-(i.height/2)+m-u/2-(i.y-(i.top??0))})`),ra(e,B),e.intersect=function(I){return qn.polygon(e,b,I)},r}Q(MPe,"multiWaveEdgedRectangle");async function zPe(t,e,{config:{themeVariables:n}}){const{labelStyles:a,nodeStyles:r}=Vn(e);e.labelStyle=a,e.useHtmlLabels||Pr().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await Ta(t,e,Oa(e)),u=Math.max(s.width+(e.padding??0)*2,e?.width??0),d=Math.max(s.height+(e.padding??0)*2,e?.height??0),p=-u/2,A=-d/2,{cssStyles:m}=e,g=ea.svg(o),h=aa(e,{fill:n.noteBkgColor,stroke:n.noteBorderColor});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const f=g.rectangle(p,A,u,d,h),b=o.insert(()=>f,":first-child");return b.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",m),r&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",r),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),ra(e,b),e.intersect=function(y){return qn.rect(e,y)},o}Q(zPe,"note");var dvt=Q((t,e,n)=>[`M${t+n/2},${e}`,`L${t+n},${e-n/2}`,`L${t+n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function qPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=i.width+e.padding,s=i.height+e.padding,l=o+s,u=.5,d=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let p;const{cssStyles:A}=e;if(e.look==="handDrawn"){const m=ea.svg(r),g=aa(e,{}),h=dvt(0,0,l),f=m.path(h,g);p=r.insert(()=>f,":first-child").attr("transform",`translate(${-l/2+u}, ${l/2})`),A&&p.attr("style",A)}else p=nv(r,l,l,d),p.attr("transform",`translate(${-l/2+u}, ${l/2})`);return a&&p.attr("style",a),ra(e,p),e.calcIntersect=function(m,g){const h=m.width,f=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],b=qn.polygon(m,f,g);return{x:b.x-.5,y:b.y-.5}},e.intersect=function(m){return this.calcIntersect(e,m)},r}Q(qPe,"question");async function jPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0),e?.width??0),l=Math.max(i.height+(e.padding??0),e?.height??0),u=-s/2,d=-l/2,p=d/2,A=[{x:u+p,y:d},{x:u,y:0},{x:u+p,y:-d},{x:-u,y:-d},{x:-u,y:d}],{cssStyles:m}=e,g=ea.svg(r),h=aa(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const f=vr(A),b=g.path(f,h),y=r.insert(()=>b,":first-child");return y.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",m),a&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",a),y.attr("transform",`translate(${-p/2},0)`),o.attr("transform",`translate(${-p/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ra(e,y),e.intersect=function(w){return qn.polygon(e,A,w)},r}Q(jPe,"rect_left_inv_arrow");async function UPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;let r;e.cssClasses?r="node "+e.cssClasses:r="node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),o=i.insert("g"),s=i.insert("g").attr("class","label").attr("style",a),l=e.description,u=e.label,d=s.node().appendChild(await Xk(u,e.labelStyle,!0,!0));let p={width:0,height:0};if(Ci(ot()?.flowchart?.htmlLabels)){const C=d.children[0],B=en(d);p=C.getBoundingClientRect(),B.attr("width",p.width),B.attr("height",p.height)}_e.info("Text 2",l);const A=l||[],m=d.getBBox(),g=s.node().appendChild(await Xk(A.join?A.join("
    "):A,e.labelStyle,!0,!0)),h=g.children[0],f=en(g);p=h.getBoundingClientRect(),f.attr("width",p.width),f.attr("height",p.height);const b=(e.padding||0)/2;en(g).attr("transform","translate( "+(p.width>m.width?0:(m.width-p.width)/2)+", "+(m.height+b+5)+")"),en(d).attr("transform","translate( "+(p.width(_e.debug("Rough node insert CXC",I),E),":first-child"),_=i.insert(()=>(_e.debug("Rough node insert CXC",I),I),":first-child")}else _=o.insert("rect",":first-child"),x=o.insert("line"),_.attr("class","outer title-state").attr("style",a).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),x.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+m.height+b).attr("y2",-p.height/2-b+m.height+b);return ra(e,_),e.intersect=function(C){return qn.rect(e,C)},i}Q(UPe,"rectWithTitle");function XQ(t,e,n,a,r,i,o){const l=(t+n)/2,u=(e+a)/2,d=Math.atan2(a-e,n-t),p=(n-t)/2,A=(a-e)/2,m=p/r,g=A/i,h=Math.sqrt(m**2+g**2);if(h>1)throw new Error("The given radii are too small to create an arc between the points.");const f=Math.sqrt(1-h**2),b=l+f*i*Math.sin(d)*(o?-1:1),y=u-f*r*Math.cos(d)*(o?-1:1),w=Math.atan2((e-y)/i,(t-b)/r);let k=Math.atan2((a-y)/i,(n-b)/r)-w;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const _=[];for(let x=0;x<20;x++){const C=x/19,B=w+C*k,I=b+r*Math.cos(B),E=y+i*Math.sin(B);_.push({x:I,y:E})}return _}Q(XQ,"generateArcPoints");async function GPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=e?.padding??0,s=e?.padding??0,l=(e?.width?e?.width:i.width)+o*2,u=(e?.height?e?.height:i.height)+s*2,d=e.radius||5,p=e.taper||5,{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{});e.stroke&&(g.stroke=e.stroke),e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const h=[{x:-l/2+p,y:-u/2},{x:l/2-p,y:-u/2},...XQ(l/2-p,-u/2,l/2,-u/2+p,d,d,!0),{x:l/2,y:-u/2+p},{x:l/2,y:u/2-p},...XQ(l/2,u/2-p,l/2-p,u/2,d,d,!0),{x:l/2-p,y:u/2},{x:-l/2+p,y:u/2},...XQ(-l/2+p,u/2,-l/2,u/2-p,d,d,!0),{x:-l/2,y:u/2-p},{x:-l/2,y:-u/2+p},...XQ(-l/2,-u/2+p,-l/2+p,-u/2,d,d,!0)],f=vr(h),b=m.path(f,g),y=r.insert(()=>b,":first-child");return y.attr("class","basic label-container outer-path"),A&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",A),a&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",a),ra(e,y),e.intersect=function(w){return qn.polygon(e,h,w)},r}Q(GPe,"roundedRect");async function HPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=e?.padding??0,l=Math.max(i.width+(e.padding??0)*2,e?.width??0),u=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=-i.width/2-s,p=-i.height/2-s,{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const h=[{x:d,y:p},{x:d+l+8,y:p},{x:d+l+8,y:p+u},{x:d-8,y:p+u},{x:d-8,y:p},{x:d,y:p},{x:d,y:p+u}],f=m.polygon(h.map(y=>[y.x,y.y]),g),b=r.insert(()=>f,":first-child");return b.attr("class","basic label-container").attr("style",hu(A)),a&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",a),A&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",a),o.attr("transform",`translate(${-l/2+4+(e.padding??0)-(i.x-(i.left??0))},${-u/2+(e.padding??0)-(i.y-(i.top??0))})`),ra(e,b),e.intersect=function(y){return qn.rect(e,y)},r}Q(HPe,"shadedProcess");async function WPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=-s/2,d=-l/2,{cssStyles:p}=e,A=ea.svg(r),m=aa(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:u,y:d},{x:u,y:d+l},{x:u+s,y:d+l},{x:u+s,y:d-l/2}],h=vr(g),f=A.path(h,m),b=r.insert(()=>f,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),a&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",a),b.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(i.x-(i.left??0))}, ${-l/4+(e.padding??0)-(i.y-(i.top??0))})`),ra(e,b),e.intersect=function(y){return qn.polygon(e,g,y)},r}Q(WPe,"slopedRect");async function YPe(t,e){const n={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return cM(t,e,n)}Q(YPe,"squareRect");async function XPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=i.height+e.padding,s=i.width+o/4+e.padding,l=o/2,{cssStyles:u}=e,d=ea.svg(r),p=aa(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const A=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},...F4(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...F4(s/2-l,0,l,50,270,450)],m=vr(A),g=d.path(m,p),h=r.insert(()=>g,":first-child");return h.attr("class","basic label-container outer-path"),u&&e.look!=="handDrawn"&&h.selectChildren("path").attr("style",u),a&&e.look!=="handDrawn"&&h.selectChildren("path").attr("style",a),ra(e,h),e.intersect=function(f){return qn.polygon(e,A,f)},r}Q(XPe,"stadium");async function VPe(t,e){return cM(t,e,{rx:5,ry:5,classes:"flowchart-node"})}Q(VPe,"state");function ZPe(t,e,{config:{themeVariables:n}}){const{labelStyles:a,nodeStyles:r}=Vn(e);e.labelStyle=a;const{cssStyles:i}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=n,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=ea.svg(u),p=aa(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const A=d.circle(0,0,14,{...p,stroke:o,strokeWidth:2}),m=s??l,g=d.circle(0,0,5,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),h=u.insert(()=>A,":first-child");return h.insert(()=>g),i&&h.selectAll("path").attr("style",i),r&&h.selectAll("path").attr("style",r),ra(e,h),e.intersect=function(f){return qn.circle(e,7,f)},u}Q(ZPe,"stateEnd");function KPe(t,e,{config:{themeVariables:n}}){const{lineColor:a}=n,r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i;if(e.look==="handDrawn"){const s=ea.svg(r).circle(0,0,14,Vft(a));i=r.insert(()=>s),i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else i=r.insert("circle",":first-child"),i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return ra(e,i),e.intersect=function(o){return qn.circle(e,7,o)},r}Q(KPe,"stateStart");async function JPe(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=(e?.padding||0)/2,s=i.width+e.padding,l=i.height+e.padding,u=-i.width/2-o,d=-i.height/2-o,p=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){const A=ea.svg(r),m=aa(e,{}),g=A.rectangle(u-8,d,s+16,l,m),h=A.line(u,d,u,d+l,m),f=A.line(u+s,d,u+s,d+l,m);r.insert(()=>h,":first-child"),r.insert(()=>f,":first-child");const b=r.insert(()=>g,":first-child"),{cssStyles:y}=e;b.attr("class","basic label-container").attr("style",hu(y)),ra(e,b)}else{const A=nv(r,s,l,p);a&&A.attr("style",a),ra(e,A)}return e.intersect=function(A){return qn.polygon(e,p,A)},r}Q(JPe,"subroutine");async function e6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),s=Math.max(i.height+(e.padding??0)*2,e?.height??0),l=-o/2,u=-s/2,d=.2*s,p=.2*s,{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{}),h=[{x:l-d/2,y:u},{x:l+o+d/2,y:u},{x:l+o+d/2,y:u+s},{x:l-d/2,y:u+s}],f=[{x:l+o-d/2,y:u+s},{x:l+o+d/2,y:u+s},{x:l+o+d/2,y:u+s-p}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=vr(h),y=m.path(b,g),w=vr(f),v=m.path(w,{...g,fillStyle:"solid"}),k=r.insert(()=>v,":first-child");return k.insert(()=>y,":first-child"),k.attr("class","basic label-container"),A&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",A),a&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",a),ra(e,k),e.intersect=function(_){return qn.polygon(e,h,_)},r}Q(e6e,"taggedRect");async function t6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/4,d=.2*s,p=.2*l,A=l+u,{cssStyles:m}=e,g=ea.svg(r),h=aa(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const f=[{x:-s/2-s/2*.1,y:A/2},...ww(-s/2-s/2*.1,A/2,s/2+s/2*.1,A/2,u,.8),{x:s/2+s/2*.1,y:-A/2},{x:-s/2-s/2*.1,y:-A/2}],b=-s/2+s/2*.1,y=-A/2-p*.4,w=[{x:b+s-d,y:(y+l)*1.4},{x:b+s,y:y+l-p},{x:b+s,y:(y+l)*.9},...ww(b+s,(y+l)*1.3,b+s-d,(y+l)*1.5,-l*.03,.5)],v=vr(f),k=g.path(v,h),_=vr(w),x=g.path(_,{...h,fillStyle:"solid"}),C=r.insert(()=>x,":first-child");return C.insert(()=>k,":first-child"),C.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",m),a&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",a),C.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(i.x-(i.left??0))},${-l/2+(e.padding??0)-u/2-(i.y-(i.top??0))})`),ra(e,C),e.intersect=function(B){return qn.polygon(e,f,B)},r}Q(t6e,"taggedWaveEdgedRectangle");async function n6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=Math.max(i.width+e.padding,e?.width||0),s=Math.max(i.height+e.padding,e?.height||0),l=-o/2,u=-s/2,d=r.insert("rect",":first-child");return d.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",o).attr("height",s),ra(e,d),e.intersect=function(p){return qn.rect(e,p)},r}Q(n6e,"text");var pvt=Q((t,e,n,a,r,i)=>`M${t},${e} a${r},${i} 0,0,1 0,${-a} l${n},0 a${r},${i} 0,0,1 0,${a} M${n},${-a} a${r},${i} 0,0,0 0,${a} l${-n},0`,"createCylinderPathD"),Avt=Q((t,e,n,a,r,i)=>[`M${t},${e}`,`M${t+n},${e}`,`a${r},${i} 0,0,0 0,${-a}`,`l${-n},0`,`a${r},${i} 0,0,0 0,${a}`,`l${n},0`].join(" "),"createOuterCylinderPathD"),mvt=Q((t,e,n,a,r,i)=>[`M${t+n/2},${-a/2}`,`a${r},${i} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD");async function a6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o,halfPadding:s}=await Ta(t,e,Oa(e)),l=e.look==="neo"?s*2:s,u=i.height+l,d=u/2,p=d/(2.5+u/50),A=i.width+p+l,{cssStyles:m}=e;let g;if(e.look==="handDrawn"){const h=ea.svg(r),f=Avt(0,0,A,u,p,d),b=mvt(0,0,A,u,p,d),y=h.path(f,aa(e,{})),w=h.path(b,aa(e,{fill:"none"}));g=r.insert(()=>w,":first-child"),g=r.insert(()=>y,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const h=pvt(0,0,A,u,p,d);g=r.insert("path",":first-child").attr("d",h).attr("class","basic label-container").attr("style",hu(m)).attr("style",a),g.attr("class","basic label-container"),m&&g.selectAll("path").attr("style",m),a&&g.selectAll("path").attr("style",a)}return g.attr("label-offset-x",p),g.attr("transform",`translate(${-A/2}, ${u/2} )`),o.attr("transform",`translate(${-(i.width/2)-p-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ra(e,g),e.intersect=function(h){const f=qn.rect(e,h),b=f.y-(e.y??0);if(d!=0&&(Math.abs(b)<(e.height??0)/2||Math.abs(b)==(e.height??0)/2&&Math.abs(f.x-(e.x??0))>(e.width??0)/2-p)){let y=p*p*(1-b*b/(d*d));y!=0&&(y=Math.sqrt(Math.abs(y))),y=p-y,h.x-(e.x??0)>0&&(y=-y),f.x+=y}return f},r}Q(a6e,"tiltedCylinder");async function r6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=i.width+e.padding,s=i.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let u;const{cssStyles:d}=e;if(e.look==="handDrawn"){const p=ea.svg(r),A=aa(e,{}),m=vr(l),g=p.path(m,A);u=r.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=nv(r,o,s,l);return a&&u.attr("style",a),e.width=o,e.height=s,ra(e,u),e.intersect=function(p){return qn.polygon(e,l,p)},r}Q(r6e,"trapezoid");async function i6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=60,s=20,l=Math.max(o,i.width+(e.padding??0)*2,e?.width??0),u=Math.max(s,i.height+(e.padding??0)*2,e?.height??0),{cssStyles:d}=e,p=ea.svg(r),A=aa(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const m=[{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=vr(m),h=p.path(g,A),f=r.insert(()=>h,":first-child");return f.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",d),a&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",a),ra(e,f),e.intersect=function(b){return qn.polygon(e,m,b)},r}Q(i6e,"trapezoidalPentagon");async function o6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Ci(ot().flowchart?.htmlLabels),l=i.width+(e.padding??0),u=l+i.height,d=l+i.height,p=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const h=vr(p),f=m.path(h,g),b=r.insert(()=>f,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return A&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",A),a&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",a),e.width=l,e.height=u,ra(e,b),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${u/2-(i.height+(e.padding??0)/(s?2:1)-(i.y-(i.top??0)))})`),e.intersect=function(y){return _e.info("Triangle intersect",e,p,y),qn.polygon(e,p,y)},r}Q(o6e,"triangle");async function s6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/8,d=l+u,{cssStyles:p}=e,m=70-s,g=m>0?m/2:0,h=ea.svg(r),f=aa(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const b=[{x:-s/2-g,y:d/2},...ww(-s/2-g,d/2,s/2+g,d/2,u,.8),{x:s/2+g,y:-d/2},{x:-s/2-g,y:-d/2}],y=vr(b),w=h.path(y,f),v=r.insert(()=>w,":first-child");return v.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",p),a&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",a),v.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(i.x-(i.left??0))},${-l/2+(e.padding??0)-u-(i.y-(i.top??0))})`),ra(e,v),e.intersect=function(k){return qn.polygon(e,b,k)},r}Q(s6e,"waveEdgedRectangle");async function c6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i}=await Ta(t,e,Oa(e)),o=100,s=50,l=Math.max(i.width+(e.padding??0)*2,e?.width??0),u=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=l/u;let p=l,A=u;p>A*d?A=p/d:p=A*d,p=Math.max(p,o),A=Math.max(A,s);const m=Math.min(A*.2,A/4),g=A+m*2,{cssStyles:h}=e,f=ea.svg(r),b=aa(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const y=[{x:-p/2,y:g/2},...ww(-p/2,g/2,p/2,g/2,m,1),{x:p/2,y:-g/2},...ww(p/2,-g/2,-p/2,-g/2,m,-1)],w=vr(y),v=f.path(w,b),k=r.insert(()=>v,":first-child");return k.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",h),a&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",a),ra(e,k),e.intersect=function(_){return qn.polygon(e,y,_)},r}Q(c6e,"waveRectangle");async function l6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,label:o}=await Ta(t,e,Oa(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=5,d=-s/2,p=-l/2,{cssStyles:A}=e,m=ea.svg(r),g=aa(e,{}),h=[{x:d-u,y:p-u},{x:d-u,y:p+l},{x:d+s,y:p+l},{x:d+s,y:p-u}],f=`M${d-u},${p-u} L${d+s},${p-u} L${d+s},${p+l} L${d-u},${p+l} L${d-u},${p-u} M${d-u},${p} L${d+s},${p} M${d},${p-u} L${d},${p+l}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=m.path(f,g),y=r.insert(()=>b,":first-child");return y.attr("transform",`translate(${u/2}, ${u/2})`),y.attr("class","basic label-container"),A&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",A),a&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",a),o.attr("transform",`translate(${-(i.width/2)+u/2-(i.x-(i.left??0))}, ${-(i.height/2)+u/2-(i.y-(i.top??0))})`),ra(e,y),e.intersect=function(w){return qn.polygon(e,h,w)},r}Q(l6e,"windowPane");async function coe(t,e){const n=e;if(n.alias&&(e.label=n.alias),e.look==="handDrawn"){const{themeVariables:R}=Pr(),{background:j}=R,W={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${j}`]};await coe(t,W)}const a=Pr();e.useHtmlLabels=a.htmlLabels;let r=a.er?.diagramPadding??10,i=a.er?.entityPadding??6;const{cssStyles:o}=e,{labelStyles:s,nodeStyles:l}=Vn(e);if(n.attributes.length===0&&e.label){const R={rx:0,ry:0,labelPaddingX:r,labelPaddingY:r*1.5,classes:""};Ku(e.label,a)+R.labelPaddingX*20){const R=p.width+r*2-(h+f+b+y);h+=R/k,f+=R/k,b>0&&(b+=R/k),y>0&&(y+=R/k)}const x=h+f+b+y,C=ea.svg(d),B=aa(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((R,j)=>R+(j?.rowHeight??0),0));const E=Math.max(_.width+r*2,e?.width||0,x),S=Math.max((I??0)+p.height,e?.height||0),P=-E/2,O=-S/2;d.selectAll("g:not(:first-child)").each((R,j,W)=>{const G=en(W[j]),X=G.attr("transform");let ne=0,oe=0;if(X){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(X);he&&(ne=parseFloat(he[1]),oe=parseFloat(he[2]),G.attr("class").includes("attribute-name")?ne+=h:G.attr("class").includes("attribute-keys")?ne+=h+f:G.attr("class").includes("attribute-comment")&&(ne+=h+f+b))}G.attr("transform",`translate(${P+r/2+ne}, ${oe+O+p.height+i/2})`)}),d.select(".name").attr("transform","translate("+-p.width/2+", "+(O+i/2)+")");const T=C.rectangle(P,O,E,S,B),D=d.insert(()=>T,":first-child").attr("style",o.join("")),{themeVariables:$}=Pr(),{rowEven:F,rowOdd:L,nodeBorder:q}=$;m.push(0);for(const[R,j]of g.entries()){const G=(R+1)%2===0&&j.yOffset!==0,X=C.rectangle(P,p.height+O+j?.yOffset,E,j?.rowHeight,{...B,fill:G?F:L,stroke:q});d.insert(()=>X,"g.label").attr("style",o.join("")).attr("class",`row-rect-${G?"even":"odd"}`)}let M=C.line(P,p.height+O,E+P,p.height+O,B);d.insert(()=>M).attr("class","divider"),M=C.line(h+P,p.height+O,h+P,S+O,B),d.insert(()=>M).attr("class","divider"),w&&(M=C.line(h+f+P,p.height+O,h+f+P,S+O,B),d.insert(()=>M).attr("class","divider")),v&&(M=C.line(h+f+b+P,p.height+O,h+f+b+P,S+O,B),d.insert(()=>M).attr("class","divider"));for(const R of m)M=C.line(P,p.height+O+R,E+P,p.height+O+R,B),d.insert(()=>M).attr("class","divider");if(ra(e,D),l&&e.look!=="handDrawn"){const j=l.split(";")?.filter(W=>W.includes("stroke"))?.map(W=>`${W}`).join("; ");d.selectAll("path").attr("style",j??""),d.selectAll(".row-rect-even path").attr("style",l)}return e.intersect=function(R){return qn.rect(e,R)},d}Q(coe,"erBox");async function EC(t,e,n,a=0,r=0,i=[],o=""){const s=t.insert("g").attr("class",`label ${i.join(" ")}`).attr("transform",`translate(${a}, ${r})`).attr("style",o);e!==m0(e)&&(e=m0(e),e=e.replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await Gp(s,e,{width:Ku(e,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(e.includes("<")||e.includes(">")){let d=l.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let u=l.getBBox();if(Ci(n.htmlLabels)){const d=l.children[0];d.style.textAlign="start";const p=en(l);u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}return u}Q(EC,"addText");async function u6e(t,e,n,a,r=n.class.padding??12){const i=a?0:3,o=t.insert("g").attr("class",Oa(e)).attr("id",e.domId||e.id);let s=null,l=null,u=null,d=null,p=0,A=0,m=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const y=e.annotations[0];await VQ(s,{text:`«${y}»`},0),p=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await VQ(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();A=g.height,u=o.insert("g").attr("class","members-group text");let h=0;for(const y of e.members){const w=await VQ(u,y,h,[y.parseClassifier()]);h+=w+i}m=u.node().getBBox().height,m<=0&&(m=r/2),d=o.insert("g").attr("class","methods-group text");let f=0;for(const y of e.methods){const w=await VQ(d,y,f,[y.parseClassifier()]);f+=w+i}let b=o.node().getBBox();if(s!==null){const y=s.node().getBBox();s.attr("transform",`translate(${-y.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${p})`),b=o.node().getBBox(),u.attr("transform",`translate(0, ${p+A+r*2})`),b=o.node().getBBox(),d.attr("transform",`translate(0, ${p+A+(m?m+r*4:r*2)})`),b=o.node().getBBox(),{shapeSvg:o,bbox:b}}Q(u6e,"textHelper");async function VQ(t,e,n,a=[]){const r=t.insert("g").attr("class","label").attr("style",a.join("; ")),i=Pr();let o="useHtmlLabels"in e?e.useHtmlLabels:Ci(i.htmlLabels)??!0,s="";"text"in e?s=e.text:s=e.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),is(s)&&(o=!0);const l=await Gp(r,cie(Lh(s)),{width:Ku(s,i)+50,classes:"markdown-node-label",useHtmlLabels:o},i);let u,d=1;if(o){const p=l.children[0],A=en(l);d=p.innerHTML.split("
    ").length,p.innerHTML.includes("")&&(d+=p.innerHTML.split("").length-1);const m=p.getElementsByTagName("img");if(m){const g=s.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(h=>new Promise(f=>{function b(){if(h.style.display="flex",h.style.flexDirection="column",g){const y=i.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,v=parseInt(y,10)*5+"px";h.style.minWidth=v,h.style.maxWidth=v}else h.style.width="100%";f(h)}Q(b,"setupImage"),setTimeout(()=>{h.complete&&b()}),h.addEventListener("error",b),h.addEventListener("load",b)})))}u=p.getBoundingClientRect(),A.attr("width",u.width),A.attr("height",u.height)}else{a.includes("font-weight: bolder")&&en(l).selectAll("tspan").attr("font-weight",""),d=l.children.length;const p=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(p.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(p.textContent=p.textContent[0]+" "+p.textContent.substring(1))),p.textContent==="undefined"&&(p.textContent=""),u=l.getBBox()}return r.attr("transform","translate(0,"+(-u.height/(2*d)+n)+")"),u.height}Q(VQ,"addText");async function d6e(t,e){const n=ot(),a=n.class.padding??12,r=a,i=e.useHtmlLabels??Ci(n.htmlLabels)??!0,o=e;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await u6e(t,e,n,i,r),{labelStyles:u,nodeStyles:d}=Vn(e);e.labelStyle=u,e.cssStyles=o.styles||"";const p=o.styles?.join(";")||d||"";e.cssStyles||(e.cssStyles=p.replaceAll("!important","").split(";"));const A=o.members.length===0&&o.methods.length===0&&!n.class?.hideEmptyMembersBox,m=ea.svg(s),g=aa(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const h=l.width;let f=l.height;o.members.length===0&&o.methods.length===0?f+=r:o.members.length>0&&o.methods.length===0&&(f+=r*2);const b=-h/2,y=-f/2,w=m.rectangle(b-a,y-a-(A?a:o.members.length===0&&o.methods.length===0?-a/2:0),h+2*a,f+2*a+(A?a*2:o.members.length===0&&o.methods.length===0?-a:0),g),v=s.insert(()=>w,":first-child");v.attr("class","basic label-container");const k=v.node().getBBox();s.selectAll(".text").each((B,I,E)=>{const S=en(E[I]),P=S.attr("transform");let O=0;if(P){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);F&&(O=parseFloat(F[2]))}let T=O+y+a-(A?a:o.members.length===0&&o.methods.length===0?-a/2:0);i||(T-=4);let D=b;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(D=-S.node()?.getBBox().width/2||0,s.selectAll("text").each(function($,F,L){window.getComputedStyle(L[F]).textAnchor==="middle"&&(D=0)})),S.attr("transform",`translate(${D}, ${T})`)});const _=s.select(".annotation-group").node().getBBox().height-(A?a/2:0)||0,x=s.select(".label-group").node().getBBox().height-(A?a/2:0)||0,C=s.select(".members-group").node().getBBox().height-(A?a/2:0)||0;if(o.members.length>0||o.methods.length>0||A){const B=m.line(k.x,_+x+y+a,k.x+k.width,_+x+y+a,g);s.insert(()=>B).attr("class","divider").attr("style",p)}if(A||o.members.length>0||o.methods.length>0){const B=m.line(k.x,_+x+C+y+r*2+a,k.x+k.width,_+x+C+y+a+r*2,g);s.insert(()=>B).attr("class","divider").attr("style",p)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",p),v.select(":nth-child(2)").attr("style",p),s.selectAll(".divider").select("path").attr("style",p),e.labelStyle?s.selectAll("span").attr("style",e.labelStyle):s.selectAll("span").attr("style",p),!i){const B=RegExp(/color\s*:\s*([^;]*)/),I=B.exec(p);if(I){const E=I[0].replace("color","fill");s.selectAll("tspan").attr("style",E)}else if(u){const E=B.exec(u);if(E){const S=E[0].replace("color","fill");s.selectAll("tspan").attr("style",S)}}}return ra(e,v),e.intersect=function(B){return qn.rect(e,B)},s}Q(d6e,"classBox");async function p6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const r=e,i=e,o=20,s=20,l="verifyMethod"in e,u=Oa(e),d=t.insert("g").attr("class",u).attr("id",e.domId??e.id);let p;l?p=await eh(d,`<<${r.type}>>`,0,e.labelStyle):p=await eh(d,"<<Element>>",0,e.labelStyle);let A=p;const m=await eh(d,r.name,A,e.labelStyle+"; font-weight: bold;");if(A+=m+s,l){const _=await eh(d,`${r.requirementId?`ID: ${r.requirementId}`:""}`,A,e.labelStyle);A+=_;const x=await eh(d,`${r.text?`Text: ${r.text}`:""}`,A,e.labelStyle);A+=x;const C=await eh(d,`${r.risk?`Risk: ${r.risk}`:""}`,A,e.labelStyle);A+=C,await eh(d,`${r.verifyMethod?`Verification: ${r.verifyMethod}`:""}`,A,e.labelStyle)}else{const _=await eh(d,`${i.type?`Type: ${i.type}`:""}`,A,e.labelStyle);A+=_,await eh(d,`${i.docRef?`Doc Ref: ${i.docRef}`:""}`,A,e.labelStyle)}const g=(d.node()?.getBBox().width??200)+o,h=(d.node()?.getBBox().height??200)+o,f=-g/2,b=-h/2,y=ea.svg(d),w=aa(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=y.rectangle(f,b,g,h,w),k=d.insert(()=>v,":first-child");if(k.attr("class","basic label-container").attr("style",a),d.selectAll(".label").each((_,x,C)=>{const B=en(C[x]),I=B.attr("transform");let E=0,S=0;if(I){const D=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);D&&(E=parseFloat(D[1]),S=parseFloat(D[2]))}const P=S-h/2;let O=f+o/2;(x===0||x===1)&&(O=E),B.attr("transform",`translate(${O}, ${P+o})`)}),A>p+m+s){const _=y.line(f,b+p+m+s,f+g,b+p+m+s,w);d.insert(()=>_).attr("style",a)}return ra(e,k),e.intersect=function(_){return qn.rect(e,_)},d}Q(p6e,"requirementBox");async function eh(t,e,n,a=""){if(e==="")return 0;const r=t.insert("g").attr("class","label").attr("style",a),i=ot(),o=i.htmlLabels??!0,s=await Gp(r,cie(Lh(e)),{width:Ku(e,i)+50,classes:"markdown-node-label",useHtmlLabels:o,style:a},i);let l;if(o){const u=s.children[0],d=en(s);l=u.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}else{const u=s.children[0];for(const d of u.children)d.textContent=d.textContent.replaceAll(">",">").replaceAll("<","<"),a&&d.setAttribute("style",a);l=s.getBBox(),l.height+=6}return r.attr("transform",`translate(${-l.width/2},${-l.height/2+n})`),l.height}Q(eh,"addText");var gvt=Q(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");async function A6e(t,e,{config:n}){const{labelStyles:a,nodeStyles:r}=Vn(e);e.labelStyle=a||"";const i=10,o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:u}=await Ta(t,e,Oa(e)),d=e.padding||10;let p="",A;"ticket"in e&&e.ticket&&n?.kanban?.ticketBaseUrl&&(p=n?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),A=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let g,h;A?{label:g,bbox:h}=await kU(A,"ticket"in e&&e.ticket||"",m):{label:g,bbox:h}=await kU(s,"ticket"in e&&e.ticket||"",m);const{label:f,bbox:b}=await kU(s,"assigned"in e&&e.assigned||"",m);e.width=o;const y=10,w=e?.width||0,v=Math.max(h.height,b.height)/2,k=Math.max(l.height+y*2,e?.height||0)+v,_=-w/2,x=-k/2;u.attr("transform","translate("+(d-w/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(d-w/2)+", "+(-v+l.height/2)+")"),f.attr("transform","translate("+(d+w/2-b.width-2*i)+", "+(-v+l.height/2)+")");let C;const{rx:B,ry:I}=e,{cssStyles:E}=e;if(e.look==="handDrawn"){const S=ea.svg(s),P=aa(e,{}),O=B||I?S.path(tv(_,x,w,k,B||0),P):S.rectangle(_,x,w,k,P);C=s.insert(()=>O,":first-child"),C.attr("class","basic label-container").attr("style",E||null)}else{C=s.insert("rect",":first-child"),C.attr("class","basic label-container __APA__").attr("style",r).attr("rx",B??5).attr("ry",I??5).attr("x",_).attr("y",x).attr("width",w).attr("height",k);const S="priority"in e&&e.priority;if(S){const P=s.append("line"),O=_+2,T=x+Math.floor((B??0)/2),D=x+k-Math.floor((B??0)/2);P.attr("x1",O).attr("y1",T).attr("x2",O).attr("y2",D).attr("stroke-width","4").attr("stroke",gvt(S))}}return ra(e,C),e.height=k,e.intersect=function(S){return qn.rect(e,S)},s}Q(A6e,"kanbanItem");async function m6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,halfPadding:o,label:s}=await Ta(t,e,Oa(e)),l=i.width+10*o,u=i.height+8*o,d=.15*l,{cssStyles:p}=e,A=i.width+20,m=i.height+20,g=Math.max(l,A),h=Math.max(u,m);s.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`);let f;const b=`M0 0 a${d},${d} 1 0,0 ${g*.25},${-1*h*.1} a${d},${d} 1 0,0 ${g*.25},0 a${d},${d} 1 0,0 ${g*.25},0 a${d},${d} 1 0,0 ${g*.25},${h*.1} a${d},${d} 1 0,0 ${g*.15},${h*.33} a${d*.8},${d*.8} 1 0,0 0,${h*.34} a${d},${d} 1 0,0 ${-1*g*.15},${h*.33} a${d},${d} 1 0,0 ${-1*g*.25},${h*.15} a${d},${d} 1 0,0 ${-1*g*.25},0 a${d},${d} 1 0,0 ${-1*g*.25},0 a${d},${d} 1 0,0 ${-1*g*.25},${-1*h*.15} a${d},${d} 1 0,0 ${-1*g*.1},${-1*h*.33} a${d*.8},${d*.8} 1 0,0 0,${-1*h*.34} a${d},${d} 1 0,0 ${g*.1},${-1*h*.33} H0 V0 Z`;if(e.look==="handDrawn"){const y=ea.svg(r),w=aa(e,{}),v=y.path(b,w);f=r.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",hu(p))}else f=r.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",b);return f.attr("transform",`translate(${-g/2}, ${-h/2})`),ra(e,f),e.calcIntersect=function(y,w){return qn.rect(y,w)},e.intersect=function(y){return _e.info("Bang intersect",e,y),qn.rect(e,y)},r}Q(m6e,"bang");async function g6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,halfPadding:o,label:s}=await Ta(t,e,Oa(e)),l=i.width+2*o,u=i.height+2*o,d=.15*l,p=.25*l,A=.35*l,m=.2*l,{cssStyles:g}=e;let h;const f=`M0 0 a${d},${d} 0 0,1 ${l*.25},${-1*l*.1} a${A},${A} 1 0,1 ${l*.4},${-1*l*.1} a${p},${p} 1 0,1 ${l*.35},${l*.2} a${d},${d} 1 0,1 ${l*.15},${u*.35} a${m},${m} 1 0,1 ${-1*l*.15},${u*.65} a${p},${d} 1 0,1 ${-1*l*.25},${l*.15} a${A},${A} 1 0,1 ${-1*l*.5},0 a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15} a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35} a${m},${m} 1 0,1 ${l*.1},${-1*u*.65} H0 V0 Z`;if(e.look==="handDrawn"){const b=ea.svg(r),y=aa(e,{}),w=b.path(f,y);h=r.insert(()=>w,":first-child"),h.attr("class","basic label-container").attr("style",hu(g))}else h=r.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",f);return s.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`),h.attr("transform",`translate(${-l/2}, ${-u/2})`),ra(e,h),e.calcIntersect=function(b,y){return qn.rect(b,y)},e.intersect=function(b){return _e.info("Cloud intersect",e,b),qn.rect(e,b)},r}Q(g6e,"cloud");async function h6e(t,e){const{labelStyles:n,nodeStyles:a}=Vn(e);e.labelStyle=n;const{shapeSvg:r,bbox:i,halfPadding:o,label:s}=await Ta(t,e,Oa(e)),l=i.width+8*o,u=i.height+2*o,d=5,p=` M${-l/2} ${u/2-d} v${-u+2*d} q0,-${d} ${d},-${d} h${l-2*d} q${d},0 ${d},${d} v${u-2*d} q0,${d} -${d},${d} h${-l+2*d} q-${d},0 -${d},-${d} Z `,A=r.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",a).attr("d",p);return r.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",u/2).attr("x2",l/2).attr("y2",u/2),s.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`),r.append(()=>s.node()),ra(e,A),e.calcIntersect=function(m,g){return qn.rect(m,g)},e.intersect=function(m){return qn.rect(e,m)},r}Q(h6e,"defaultMindmapNode");async function f6e(t,e){const n={padding:e.padding??0};return soe(t,e,n)}Q(f6e,"mindmapCircle");var hvt=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:YPe},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:GPe},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:XPe},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:JPe},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:bPe},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:soe},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:m6e},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:g6e},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:qPe},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:CPe},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:PPe},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:TPe},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:r6e},{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:DPe},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:wPe},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:n6e},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:uPe},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:HPe},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:KPe},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ZPe},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:xPe},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:_Pe},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:mPe},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:gPe},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hPe},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:FPe},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:s6e},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:OPe},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:a6e},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:RPe},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fPe},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:yPe},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:o6e},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:l6e},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:vPe},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:i6e},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:kPe},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:WPe},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:MPe},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:NPe},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:lPe},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:APe},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:t6e},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:e6e},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:c6e},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:jPe},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:LPe}],fvt=Q(()=>{const e=[...Object.entries({state:VPe,choice:dPe,note:zPe,rectWithTitle:UPe,labelRect:$Pe,iconSquare:SPe,iconCircle:EPe,icon:BPe,iconRounded:QPe,imageSquare:IPe,anchor:cPe,kanbanItem:A6e,mindmapCircle:f6e,defaultMindmapNode:h6e,classBox:d6e,erBox:coe,requirementBox:p6e}),...hvt.flatMap(n=>[n.shortName,..."aliases"in n?n.aliases:[],..."internalAliases"in n?n.internalAliases:[]].map(r=>[r,n.handler]))];return Object.fromEntries(e)},"generateShapeMap"),b6e=fvt();function y6e(t){return t in b6e}Q(y6e,"isValidShape");var lM=new Map;async function uM(t,e,n){let a,r;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const i=e.shape?b6e[e.shape]:void 0;if(!i)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;n.config.securityLevel==="sandbox"?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),r=await i(a,e,n)}else r=await i(t,e,n),a=r;return e.tooltip&&r.attr("title",e.tooltip),lM.set(e.id,a),e.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}Q(uM,"insertNode");var bvt=Q((t,e)=>{lM.set(e.id,t)},"setNodeElem"),yvt=Q(()=>{lM.clear()},"clear"),JZ=Q(t=>{const e=lM.get(t.id);_e.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=8,a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-n)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode"),wvt=Q((t,e,n,a,r,i)=>{e.arrowTypeStart&&Gge(t,"start",e.arrowTypeStart,n,a,r,i),e.arrowTypeEnd&&Gge(t,"end",e.arrowTypeEnd,n,a,r,i)},"addEdgeMarkers"),vvt={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Gge=Q((t,e,n,a,r,i,o)=>{const s=vvt[n];if(!s){_e.warn(`Unknown arrow type: ${n}`);return}const l=s.type,d=`${r}_${i}-${l}${e==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const p=o.replace(/[^\dA-Za-z]/g,"_"),A=`${d}_${p}`;if(!document.getElementById(A)){const m=document.getElementById(d);if(m){const g=m.cloneNode(!0);g.id=A,g.querySelectorAll("path, circle, line").forEach(f=>{f.setAttribute("stroke",o),s.fill&&f.setAttribute("fill",o)}),m.parentNode?.appendChild(g)}}t.attr(`marker-${e}`,`url(${a}#${A})`)}else t.attr(`marker-${e}`,`url(${a}#${d})`)},"addEdgeMarker"),SR=new Map,yl=new Map,kvt=Q(()=>{SR.clear(),yl.clear()},"clear"),L2=Q(t=>t?t.reduce((n,a)=>n+";"+a,""):"","getLabelStyles"),w6e=Q(async(t,e)=>{let n=Ci(ot().flowchart.htmlLabels);const a=await Gp(t,e.label,{style:L2(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1});_e.info("abc82",e,e.labelType);const r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(a);let o=a.getBBox();if(n){const l=a.children[0],u=en(a);o=l.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),SR.set(e.id,r),e.width=o.width,e.height=o.height;let s;if(e.startLabelLeft){const l=await Xk(e.startLabelLeft,L2(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),d=u.insert("g").attr("class","inner");s=d.node().appendChild(l);const p=l.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),yl.get(e.id)||yl.set(e.id,{}),yl.get(e.id).startLeft=u,ZQ(s,e.startLabelLeft)}if(e.startLabelRight){const l=await Xk(e.startLabelRight,L2(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),d=u.insert("g").attr("class","inner");s=u.node().appendChild(l),d.node().appendChild(l);const p=l.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),yl.get(e.id)||yl.set(e.id,{}),yl.get(e.id).startRight=u,ZQ(s,e.startLabelRight)}if(e.endLabelLeft){const l=await Xk(e.endLabelLeft,L2(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),d=u.insert("g").attr("class","inner");s=d.node().appendChild(l);const p=l.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.node().appendChild(l),yl.get(e.id)||yl.set(e.id,{}),yl.get(e.id).endLeft=u,ZQ(s,e.endLabelLeft)}if(e.endLabelRight){const l=await Xk(e.endLabelRight,L2(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),d=u.insert("g").attr("class","inner");s=d.node().appendChild(l);const p=l.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.node().appendChild(l),yl.get(e.id)||yl.set(e.id,{}),yl.get(e.id).endRight=u,ZQ(s,e.endLabelRight)}return a},"insertEdgeLabel");function ZQ(t,e){ot().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}Q(ZQ,"setTerminalWidth");var v6e=Q((t,e)=>{_e.debug("Moving label abc88 ",t.id,t.label,SR.get(t.id),e);let n=e.updatedPath?e.updatedPath:e.originalPath;const a=ot(),{subGraphTitleTotalMargin:r}=Q$(a);if(t.label){const i=SR.get(t.id);let o=t.x,s=t.y;if(n){const l=Wa.calcLabelPosition(n);_e.debug("Moving label "+t.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(o=l.x,s=l.y)}i.attr("transform",`translate(${o}, ${s+r/2})`)}if(t.startLabelLeft){const i=yl.get(t.id).startLeft;let o=t.x,s=t.y;if(n){const l=Wa.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);o=l.x,s=l.y}i.attr("transform",`translate(${o}, ${s})`)}if(t.startLabelRight){const i=yl.get(t.id).startRight;let o=t.x,s=t.y;if(n){const l=Wa.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);o=l.x,s=l.y}i.attr("transform",`translate(${o}, ${s})`)}if(t.endLabelLeft){const i=yl.get(t.id).endLeft;let o=t.x,s=t.y;if(n){const l=Wa.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);o=l.x,s=l.y}i.attr("transform",`translate(${o}, ${s})`)}if(t.endLabelRight){const i=yl.get(t.id).endRight;let o=t.x,s=t.y;if(n){const l=Wa.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);o=l.x,s=l.y}i.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),xvt=Q((t,e)=>{const n=t.x,a=t.y,r=Math.abs(e.x-n),i=Math.abs(e.y-a),o=t.width/2,s=t.height/2;return r>=o||i>=s},"outsideNode"),Ovt=Q((t,e,n)=>{_e.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(n)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,r=t.y,i=Math.abs(a-n.x),o=t.width/2;let s=n.xMath.abs(a-e.x)*l){let p=n.y{_e.warn("abc88 cutPathAtIntersect",t,e);let n=[],a=t[0],r=!1;return t.forEach(i=>{if(_e.info("abc88 checking point",i,e),!xvt(e,i)&&!r){const o=Ovt(e,a,i);_e.debug("abc88 inside",i,a,o),_e.debug("abc88 intersection",o,e);let s=!1;n.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),n.some(l=>l.x===o.x&&l.y===o.y)?_e.warn("abc88 no intersect",o,n):n.push(o),r=!0}else _e.warn("abc88 outside",i,a),a=i,r||n.push(i)}),_e.debug("returning points",n),n},"cutPathAtIntersect");function k6e(t){const e=[],n=[];for(let a=1;a5&&Math.abs(i.y-r.y)>5||r.y===i.y&&i.x===o.x&&Math.abs(i.x-r.x)>5&&Math.abs(i.y-o.y)>5)&&(e.push(i),n.push(a))}return{cornerPoints:e,cornerPointPositions:n}}Q(k6e,"extractCornerPoints");var Wge=Q(function(t,e,n){const a=e.x-t.x,r=e.y-t.y,i=Math.sqrt(a*a+r*r),o=n/i;return{x:e.x-o*a,y:e.y-o*r}},"findAdjacentPoint"),Cvt=Q(function(t){const{cornerPointPositions:e}=k6e(t),n=[];for(let a=0;a10&&Math.abs(i.y-r.y)>=10){_e.debug("Corner point fixing",Math.abs(i.x-r.x),Math.abs(i.y-r.y));const m=5;o.x===s.x?A={x:u<0?s.x-m+p:s.x+m-p,y:d<0?s.y-p:s.y+p}:A={x:u<0?s.x-p:s.x+p,y:d<0?s.y-m+p:s.y+m-p}}else _e.debug("Corner point skipping fixing",Math.abs(i.x-r.x),Math.abs(i.y-r.y));n.push(A,l)}else n.push(t[a]);return n},"fixCorners"),x6e=Q(function(t,e,n,a,r,i,o){const{handDrawnSeed:s}=ot();let l=e.points,u=!1;const d=r;var p=i;const A=[];for(const E in e.cssCompiledStyles)Pie(E)||A.push(e.cssCompiledStyles[E]);p.intersect&&d.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(d.intersect(l[0])),_e.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],p,p.intersect(l[l.length-1])),l.push(p.intersect(l[l.length-1]))),e.toCluster&&(_e.info("to cluster abc88",n.get(e.toCluster)),l=Hge(e.points,n.get(e.toCluster).node),u=!0),e.fromCluster&&(_e.debug("from cluster abc88",n.get(e.fromCluster),JSON.stringify(l,null,2)),l=Hge(l.reverse(),n.get(e.fromCluster).node).reverse(),u=!0);let m=l.filter(E=>!Number.isNaN(E.y));m=Cvt(m);let g=g_;switch(g=oR,e.curve){case"linear":g=oR;break;case"basis":g=g_;break;case"cardinal":g=W3e;break;case"bumpX":g=q3e;break;case"bumpY":g=j3e;break;case"catmullRom":g=X3e;break;case"monotoneX":g=t5e;break;case"monotoneY":g=n5e;break;case"natural":g=r5e;break;case"step":g=i5e;break;case"stepAfter":g=s5e;break;case"stepBefore":g=o5e;break;default:g=g_}const{x:h,y:f}=UTe(e),b=E4().x(h).y(f).curve(g);let 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 w,v=b(m);const k=Array.isArray(e.style)?e.style:e.style?[e.style]:[];let _=k.find(E=>E?.startsWith("stroke:"));if(e.look==="handDrawn"){const E=ea.svg(t);Object.assign([],m);const S=E.path(v,{roughness:.3,seed:s});y+=" transition",w=en(S).select("path").attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce((O,T)=>O+";"+T,""):"");let P=w.attr("d");w.attr("d",P),t.node().appendChild(w.node())}else{const E=A.join(";"),S=k?k.reduce((T,D)=>T+D+";",""):"";let P="";e.animate&&(P=" edge-animation-fast"),e.animation&&(P=" edge-animation-"+e.animation);const O=E?E+";"+S+";":S;w=t.append("path").attr("d",v).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")+(P??"")).attr("style",O),_=O.match(/stroke:([^;]+)/)?.[1]}let x="";(ot().flowchart.arrowMarkerAbsolute||ot().state.arrowMarkerAbsolute)&&(x=w$(!0)),_e.info("arrowTypeStart",e.arrowTypeStart),_e.info("arrowTypeEnd",e.arrowTypeEnd),wvt(w,e,x,o,a,_);const C=Math.floor(l.length/2),B=l[C];Wa.isLabelCoordinateInPath(B,w.attr("d"))||(u=!0);let I={};return u&&(I.updatedPath=l),I.originalPath=e.points,I},"insertEdge"),_vt=Q((t,e,n,a)=>{e.forEach(r=>{qvt[r](t,n,a)})},"insertMarkers"),Bvt=Q((t,e,n)=>{_e.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+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",n+"_"+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"),Evt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+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",n+"_"+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"),Qvt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+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",n+"_"+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"),Svt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+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",n+"_"+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"),Ivt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+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",n+"_"+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"),Dvt=Q((t,e,n)=>{t.append("marker").attr("id",n+"_"+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",n+"_"+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"),$vt=Q((t,e,n)=>{t.append("marker").attr("id",n+"_"+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",n+"_"+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"),Tvt=Q((t,e,n)=>{t.append("marker").attr("id",n+"_"+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",n+"_"+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"),Pvt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+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"),Fvt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",n+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Rvt=Q((t,e,n)=>{const a=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),a.append("path").attr("d","M9,0 L9,18");const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Lvt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").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",n+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Nvt=Q((t,e,n)=>{const a=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const r=t.append("defs").append("marker").attr("id",n+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");r.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Mvt=Q((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),zvt=Q((t,e,n)=>{const a=t.append("defs").append("marker").attr("id",n+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),qvt={extension:Bvt,composition:Evt,aggregation:Qvt,dependency:Svt,lollipop:Ivt,point:Dvt,circle:$vt,cross:Tvt,barb:Pvt,only_one:Fvt,zero_or_one:Rvt,one_or_more:Lvt,zero_or_more:Nvt,requirement_arrow:Mvt,requirement_contains:zvt},O6e=_vt,jvt={common:kn,getConfig:Pr,insertCluster:ooe,insertEdge:x6e,insertEdgeLabel:w6e,insertMarkers:O6e,insertNode:uM,interpolateToCurve:zie,labelHelper:Ta,log:_e,positionEdgeLabel:v6e},R4={},C6e=Q(t=>{for(const e of t)R4[e.name]=e},"registerLayoutLoaders"),Uvt=Q(()=>{C6e([{name:"dagre",loader:Q(async()=>await ye(()=>Promise.resolve().then(()=>mpn),void 0,import.meta.url),"loader")},{name:"cose-bilkent",loader:Q(async()=>await ye(()=>Promise.resolve().then(()=>e0n),void 0,import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Uvt();var iE=Q(async(t,e)=>{if(!(t.layoutAlgorithm in R4))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const n=R4[t.layoutAlgorithm];return(await n.loader()).render(t,e,jvt,{algorithm:n.algorithm})},"render"),R$=Q((t="",{fallback:e="dagre"}={})=>{if(t in R4)return t;if(e in R4)return _e.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"),_6e="comm",B6e="rule",E6e="decl",Gvt="@import",Hvt="@namespace",Wvt="@keyframes",Yvt="@layer",Q6e=Math.abs,loe=String.fromCharCode;function S6e(t){return t.trim()}function sF(t,e,n){return t.replace(e,n)}function Xvt(t,e,n){return t.indexOf(e,n)}function h_(t,e){return t.charCodeAt(e)|0}function nB(t,e,n){return t.slice(e,n)}function lh(t){return t.length}function Vvt(t){return t.length}function cT(t,e){return e.push(t),t}var dM=1,aB=1,I6e=0,em=0,Ys=0,oE="";function uoe(t,e,n,a,r,i,o,s){return{value:t,root:e,parent:n,type:a,props:r,children:i,line:dM,column:aB,length:o,return:"",siblings:s}}function Zvt(){return Ys}function Kvt(){return Ys=em>0?h_(oE,--em):0,aB--,Ys===10&&(aB=1,dM--),Ys}function og(){return Ys=em2||L4(Ys)>3?"":" "}function nkt(t,e){for(;--e&&og()&&!(Ys<48||Ys>102||Ys>57&&Ys<65||Ys>70&&Ys<97););return pM(t,cF()+(e<6&&$0()==32&&og()==32))}function eK(t){for(;og();)switch(Ys){case t:return em;case 34:case 39:t!==34&&t!==39&&eK(Ys);break;case 40:t===41&&eK(t);break;case 92:og();break}return em}function akt(t,e){for(;og()&&t+Ys!==57;)if(t+Ys===84&&$0()===47)break;return"/*"+pM(e,em-1)+"*"+loe(t===47?t:og())}function rkt(t){for(;!L4($0());)og();return pM(t,em)}function ikt(t){return ekt(lF("",null,null,null,[""],t=Jvt(t),0,[0],t))}function lF(t,e,n,a,r,i,o,s,l){for(var u=0,d=0,p=o,A=0,m=0,g=0,h=1,f=1,b=1,y=0,w="",v=r,k=i,_=a,x=w;f;)switch(g=y,y=og()){case 40:if(g!=108&&h_(x,p-1)==58){Xvt(x+=sF(xU(y),"&","&\f"),"&\f",Q6e(u?s[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:x+=xU(y);break;case 9:case 10:case 13:case 32:x+=tkt(g);break;case 92:x+=nkt(cF()-1,7);continue;case 47:switch($0()){case 42:case 47:cT(okt(akt(og(),cF()),e,n,l),l),(L4(g||1)==5||L4($0()||1)==5)&&lh(x)&&nB(x,-1,void 0)!==" "&&(x+=" ");break;default:x+="/"}break;case 123*h:s[u++]=lh(x)*b;case 125*h:case 59:case 0:switch(y){case 0:case 125:f=0;case 59+d:b==-1&&(x=sF(x,/\f/g,"")),m>0&&(lh(x)-p||h===0&&g===47)&&cT(m>32?Xge(x+";",a,n,p-1,l):Xge(sF(x," ","")+";",a,n,p-2,l),l);break;case 59:x+=";";default:if(cT(_=Yge(x,e,n,u,d,r,s,w,v=[],k=[],p,i),i),y===123)if(d===0)lF(x,e,_,_,v,i,p,s,k);else{switch(A){case 99:if(h_(x,3)===110)break;case 108:if(h_(x,2)===97)break;default:d=0;case 100:case 109:case 115:}d?lF(t,_,_,a&&cT(Yge(t,_,_,0,0,r,s,w,r,v=[],p,k),k),r,k,p,s,a?v:k):lF(x,_,_,_,[""],k,0,s,k)}}u=d=m=0,h=b=1,w=x="",p=o;break;case 58:p=1+lh(x),m=g;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Kvt()==125)continue}switch(x+=loe(y),y*h){case 38:b=d>0?1:(x+="\f",-1);break;case 44:s[u++]=(lh(x)-1)*b,b=1;break;case 64:$0()===45&&(x+=xU(og())),A=$0(),d=p=lh(w=x+=rkt(cF())),y++;break;case 45:g===45&&lh(x)==2&&(h=0)}}return i}function Yge(t,e,n,a,r,i,o,s,l,u,d,p){for(var A=r-1,m=r===0?i:[""],g=Vvt(m),h=0,f=0,b=0;h0?m[y]+" "+w:sF(w,/&\f/g,m[y])))&&(l[b++]=v);return uoe(t,e,n,r===0?B6e:s,l,u,d,p)}function okt(t,e,n,a){return uoe(t,e,n,_6e,loe(Zvt()),nB(t,2,-2),0,a)}function Xge(t,e,n,a,r){return uoe(t,e,n,E6e,nB(t,0,a),nB(t,a+1,-1),a,r)}function tK(t,e){for(var n="",a=0;a/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),kkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>V0n);return{diagram:e}},void 0,import.meta.url);return{id:$6e,diagram:t}},"loader"),xkt={id:$6e,detector:vkt,loader:kkt},Okt=xkt,T6e="flowchart",Ckt=Q((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),_kt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>sue);return{diagram:e}},void 0,import.meta.url);return{id:T6e,diagram:t}},"loader"),Bkt={id:T6e,detector:Ckt,loader:_kt},Ekt=Bkt,P6e="flowchart-v2",Qkt=Q((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"),Skt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>sue);return{diagram:e}},void 0,import.meta.url);return{id:P6e,diagram:t}},"loader"),Ikt={id:P6e,detector:Qkt,loader:Skt},Dkt=Ikt,F6e="er",$kt=Q(t=>/^\s*erDiagram/.test(t),"detector"),Tkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>hwn);return{diagram:e}},void 0,import.meta.url);return{id:F6e,diagram:t}},"loader"),Pkt={id:F6e,detector:$kt,loader:Tkt},Fkt=Pkt,R6e="gitGraph",Rkt=Q(t=>/^\s*gitGraph/.test(t),"detector"),Lkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>D_n);return{diagram:e}},void 0,import.meta.url);return{id:R6e,diagram:t}},"loader"),Nkt={id:R6e,detector:Rkt,loader:Lkt},Mkt=Nkt,L6e="gantt",zkt=Q(t=>/^\s*gantt/.test(t),"detector"),qkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>QBn);return{diagram:e}},void 0,import.meta.url);return{id:L6e,diagram:t}},"loader"),jkt={id:L6e,detector:zkt,loader:qkt},Ukt=jkt,N6e="info",Gkt=Q(t=>/^\s*info/.test(t),"detector"),Hkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>RBn);return{diagram:e}},void 0,import.meta.url);return{id:N6e,diagram:t}},"loader"),Wkt={id:N6e,detector:Gkt,loader:Hkt},M6e="pie",Ykt=Q(t=>/^\s*pie/.test(t),"detector"),Xkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>JBn);return{diagram:e}},void 0,import.meta.url);return{id:M6e,diagram:t}},"loader"),Vkt={id:M6e,detector:Ykt,loader:Xkt},z6e="quadrantChart",Zkt=Q(t=>/^\s*quadrantChart/.test(t),"detector"),Kkt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>cEn);return{diagram:e}},void 0,import.meta.url);return{id:z6e,diagram:t}},"loader"),Jkt={id:z6e,detector:Zkt,loader:Kkt},e1t=Jkt,q6e="xychart",t1t=Q(t=>/^\s*xychart(-beta)?/.test(t),"detector"),n1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>xEn);return{diagram:e}},void 0,import.meta.url);return{id:q6e,diagram:t}},"loader"),a1t={id:q6e,detector:t1t,loader:n1t},r1t=a1t,j6e="requirement",i1t=Q(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),o1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>SEn);return{diagram:e}},void 0,import.meta.url);return{id:j6e,diagram:t}},"loader"),s1t={id:j6e,detector:i1t,loader:o1t},c1t=s1t,U6e="sequence",l1t=Q(t=>/^\s*sequenceDiagram/.test(t),"detector"),u1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>f2n);return{diagram:e}},void 0,import.meta.url);return{id:U6e,diagram:t}},"loader"),d1t={id:U6e,detector:l1t,loader:u1t},p1t=d1t,G6e="class",A1t=Q((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),m1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>x2n);return{diagram:e}},void 0,import.meta.url);return{id:G6e,diagram:t}},"loader"),g1t={id:G6e,detector:A1t,loader:m1t},h1t=g1t,H6e="classDiagram",f1t=Q((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),b1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>C2n);return{diagram:e}},void 0,import.meta.url);return{id:H6e,diagram:t}},"loader"),y1t={id:H6e,detector:f1t,loader:b1t},w1t=y1t,W6e="state",v1t=Q((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),k1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>mQn);return{diagram:e}},void 0,import.meta.url);return{id:W6e,diagram:t}},"loader"),x1t={id:W6e,detector:v1t,loader:k1t},O1t=x1t,Y6e="stateDiagram",C1t=Q((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),_1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>hQn);return{diagram:e}},void 0,import.meta.url);return{id:Y6e,diagram:t}},"loader"),B1t={id:Y6e,detector:C1t,loader:_1t},E1t=B1t,X6e="journey",Q1t=Q(t=>/^\s*journey/.test(t),"detector"),S1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>LQn);return{diagram:e}},void 0,import.meta.url);return{id:X6e,diagram:t}},"loader"),I1t={id:X6e,detector:Q1t,loader:S1t},D1t=I1t,$1t=Q((t,e,n)=>{_e.debug(`rendering svg for syntax error `);const a=xy(e),r=a.append("g");a.attr("viewBox","0 0 2412 512"),ld(a,100,512,!0),r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),V6e={draw:$1t},T1t=V6e,P1t={db:{},renderer:V6e,parser:{parse:Q(()=>{},"parse")}},F1t=P1t,Z6e="flowchart-elk",R1t=Q((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),L1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>sue);return{diagram:e}},void 0,import.meta.url);return{id:Z6e,diagram:t}},"loader"),N1t={id:Z6e,detector:R1t,loader:L1t},M1t=N1t,K6e="timeline",z1t=Q(t=>/^\s*timeline/.test(t),"detector"),q1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>oSn);return{diagram:e}},void 0,import.meta.url);return{id:K6e,diagram:t}},"loader"),j1t={id:K6e,detector:z1t,loader:q1t},U1t=j1t,J6e="mindmap",G1t=Q(t=>/^\s*mindmap/.test(t),"detector"),H1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>wSn);return{diagram:e}},void 0,import.meta.url);return{id:J6e,diagram:t}},"loader"),W1t={id:J6e,detector:G1t,loader:H1t},Y1t=W1t,eFe="kanban",X1t=Q(t=>/^\s*kanban/.test(t),"detector"),V1t=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>MSn);return{diagram:e}},void 0,import.meta.url);return{id:eFe,diagram:t}},"loader"),Z1t={id:eFe,detector:X1t,loader:V1t},K1t=Z1t,tFe="sankey",J1t=Q(t=>/^\s*sankey(-beta)?/.test(t),"detector"),ext=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>OIn);return{diagram:e}},void 0,import.meta.url);return{id:tFe,diagram:t}},"loader"),txt={id:tFe,detector:J1t,loader:ext},nxt=txt,nFe="packet",axt=Q(t=>/^\s*packet(-beta)?/.test(t),"detector"),rxt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>PIn);return{diagram:e}},void 0,import.meta.url);return{id:nFe,diagram:t}},"loader"),ixt={id:nFe,detector:axt,loader:rxt},aFe="radar",oxt=Q(t=>/^\s*radar-beta/.test(t),"detector"),sxt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>n4n);return{diagram:e}},void 0,import.meta.url);return{id:aFe,diagram:t}},"loader"),cxt={id:aFe,detector:oxt,loader:sxt},rFe="block",lxt=Q(t=>/^\s*block(-beta)?/.test(t),"detector"),uxt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>EDn);return{diagram:e}},void 0,import.meta.url);return{id:rFe,diagram:t}},"loader"),dxt={id:rFe,detector:lxt,loader:uxt},pxt=dxt,iFe="architecture",Axt=Q(t=>/^\s*architecture/.test(t),"detector"),mxt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>KDn);return{diagram:e}},void 0,import.meta.url);return{id:iFe,diagram:t}},"loader"),gxt={id:iFe,detector:Axt,loader:mxt},hxt=gxt,oFe="treemap",fxt=Q(t=>/^\s*treemap/.test(t),"detector"),bxt=Q(async()=>{const{diagram:t}=await ye(async()=>{const{diagram:e}=await Promise.resolve().then(()=>l$n);return{diagram:e}},void 0,import.meta.url);return{id:oFe,diagram:t}},"loader"),yxt={id:oFe,detector:fxt,loader:bxt},the=!1,AM=Q(()=>{the||(the=!0,H9("error",F1t,t=>t.toLowerCase().trim()==="error"),H9("---",{db:{clear:Q(()=>{},"clear")},styles:{},renderer:{draw:Q(()=>{},"draw")},parser:{parse:Q(()=>{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:Q(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),aZ(M1t,Y1t,hxt),aZ(Okt,K1t,w1t,h1t,Fkt,Ukt,Wkt,Vkt,c1t,p1t,Dkt,Ekt,U1t,Mkt,E1t,O1t,D1t,e1t,nxt,ixt,r1t,pxt,cxt,yxt))},"addDiagrams"),wxt=Q(async()=>{_e.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(B1).map(async([n,{detector:a,loader:r}])=>{if(r)try{cZ(n)}catch{try{const{diagram:i,id:o}=await r();H9(o,i,a)}catch(i){throw _e.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete B1[n],i}}}))).filter(n=>n.status==="rejected");if(e.length>0){_e.error(`Failed to load ${e.length} external diagrams`);for(const n of e)_e.error(n);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),vxt="graphics-document document";function sFe(t,e){t.attr("role",vxt),e!==""&&t.attr("aria-roledescription",e)}Q(sFe,"setA11yDiagramInfo");function cFe(t,e,n,a){if(t.insert!==void 0){if(n){const r=`chart-desc-${a}`;t.attr("aria-describedby",r),t.insert("desc",":first-child").attr("id",r).text(n)}if(e){const r=`chart-title-${a}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}Q(cFe,"addSVGa11yTitleDescription");var iK=class lFe{constructor(e,n,a,r,i){this.type=e,this.text=n,this.db=a,this.parser=r,this.renderer=i}static{Q(this,"Diagram")}static async fromText(e,n={}){const a=Pr(),r=nie(e,a);e=_0t(e)+` `;try{cZ(r)}catch{const u=$ct(r);if(!u)throw new C$e(`Diagram ${r} not found.`);const{id:d,diagram:p}=await u();H9(d,p)}const{db:i,parser:o,renderer:s,init:l}=cZ(r);return o.parser&&(o.parser.yy=i),i.clear?.(),l?.(a),n.title&&i.setDiagramTitle?.(n.title),await o.parse(e),new lFe(r,e,i,o,s)}async render(e,n){await this.renderer.draw(this.text,e,n,this)}getParser(){return this.parser}getType(){return this.type}},nhe=[],kxt=Q(()=>{nhe.forEach(t=>{t()}),nhe=[]},"attachFunctions"),xxt=Q(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function uFe(t){const e=t.match(O$e);if(!e)return{text:t,metadata:{}};let n=KN(e[1],{schema:ZN})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const a={};return n.displayMode&&(a.displayMode=n.displayMode.toString()),n.title&&(a.title=n.title.toString()),n.config&&(a.config=n.config),{text:t.slice(e[0].length),metadata:a}}Q(uFe,"extractFrontMatter");var Oxt=Q(t=>t.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,n,a)=>"<"+n+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Cxt=Q(t=>{const{text:e,metadata:n}=uFe(t),{displayMode:a,title:r,config:i={}}=n;return a&&(i.gantt||(i.gantt={}),i.gantt.displayMode=a),{title:r,config:i,text:e}},"processFrontmatter"),_xt=Q(t=>{const e=Wa.detectInit(t)??{},n=Wa.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:a})=>a==="wrap"):n?.type==="wrap"&&(e.wrap=!0),{text:h0t(t),directive:e}},"processDirectives");function doe(t){const e=Oxt(t),n=Cxt(e),a=_xt(n.text),r=id(n.config,a.directive);return t=xxt(a.text),{code:t,title:n.title,config:r}}Q(doe,"preprocessDiagram");function dFe(t){const e=new TextEncoder().encode(t),n=Array.from(e,a=>String.fromCodePoint(a)).join("");return btoa(n)}Q(dFe,"toBase64");var Bxt=5e4,Ext="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Qxt="sandbox",Sxt="loose",Ixt="http://www.w3.org/2000/svg",Dxt="http://www.w3.org/1999/xlink",$xt="http://www.w3.org/1999/xhtml",Txt="100%",Pxt="100%",Fxt="border:0;margin:0;",Rxt="margin:0",Lxt="allow-top-navigation-by-user-activation allow-popups",Nxt='The "iframe" tag is not supported by your browser.',Mxt=["foreignobject"],zxt=["dominant-baseline"];function poe(t){const e=doe(t);return U9(),Yct(e.config??{}),e}Q(poe,"processAndSetConfigs");async function pFe(t,e){AM();try{const{code:n,config:a}=poe(t);return{diagramType:(await mFe(n)).type,config:a}}catch(n){if(e?.suppressErrors)return!1;throw n}}Q(pFe,"parse");var ahe=Q((t,e,n=[])=>` .${t} ${e} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),qxt=Q((t,e=new Map)=>{let n="";if(t.themeCSS!==void 0&&(n+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(n+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const o=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(s=>{ai(s.styles)||o.forEach(l=>{n+=ahe(s.id,l,s.styles)}),ai(s.textStyles)||(n+=ahe(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return n},"createCssStyles"),jxt=Q((t,e,n,a)=>{const r=qxt(t,n),i=Alt(e,r,t.themeVariables);return tK(ikt(`${a}{${i}}`),skt)},"createUserStyles"),Uxt=Q((t="",e,n)=>{let a=t;return!n&&!e&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=Lh(a),a=a.replace(/
    /g,"
    "),a},"cleanUpSvgCode"),Gxt=Q((t="",e)=>{const n=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":Pxt,a=dFe(`${t}`);return``},"putIntoIFrame"),rhe=Q((t,e,n,a,r)=>{const i=t.append("div");i.attr("id",n),a&&i.attr("style",a);const o=i.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Ixt);return r&&o.attr("xmlns:xlink",r),o.append("g"),t},"appendDivSvgG");function oK(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Q(oK,"sandboxedIframe");var Hxt=Q((t,e,n,a)=>{t.getElementById(e)?.remove(),t.getElementById(n)?.remove(),t.getElementById(a)?.remove()},"removeExistingElements"),Wxt=Q(async function(t,e,n){AM();const a=poe(e);e=a.code;const r=Pr();_e.debug(r),e.length>(r?.maxTextSize??Bxt)&&(e=Ext);const i="#"+t,o="i"+t,s="#"+o,l="d"+t,u="#"+l,d=Q(()=>{const P=en(A?s:u).node();P&&"remove"in P&&P.remove()},"removeTempElements");let p=en("body");const A=r.securityLevel===Qxt,m=r.securityLevel===Sxt,g=r.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),A){const S=oK(en(n),o);p=en(S.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=en(n);rhe(p,t,l,`font-family: ${g}`,Dxt)}else{if(Hxt(document,t,l,o),A){const S=oK(en("body"),o);p=en(S.nodes()[0].contentDocument.body),p.node().style.margin=0}else p=en("body");rhe(p,t,l)}let h,f;try{h=await iK.fromText(e,{title:a.title})}catch(S){if(r.suppressErrorRendering)throw d(),S;h=await iK.fromText("error"),f=S}const b=p.select(u).node(),y=h.type,w=b.firstChild,v=w.firstChild,k=h.renderer.getClasses?.(e,h),_=jxt(r,y,k,i),x=document.createElement("style");x.innerHTML=_,w.insertBefore(x,v);try{await h.renderer.draw(e,t,eZ.version,h)}catch(S){throw r.suppressErrorRendering?d():T1t.draw(e,t,eZ.version),S}const C=p.select(`${u} svg`),B=h.db.getAccTitle?.(),I=h.db.getAccDescription?.();gFe(y,C,B,I),p.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",$xt);let E=p.select(u).node().innerHTML;if(_e.debug("config.arrowMarkerAbsolute",r.arrowMarkerAbsolute),E=Uxt(E,A,Ci(r.arrowMarkerAbsolute)),A){const S=p.select(u+" svg").node();E=Gxt(E,S)}else m||(E=j_.sanitize(E,{ADD_TAGS:Mxt,ADD_ATTR:zxt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(kxt(),f)throw f;return d(),{diagramType:y,svg:E,bindFunctions:h.db.bindFunctions}},"render");function AFe(t={}){const e=Os({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Hct(e),e?.theme&&e.theme in $b?e.themeVariables=$b[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=$b.default.getThemeVariables(e.themeVariables));const n=typeof e=="object"?Gct(e):Q$e();eie(n.logLevel),AM()}Q(AFe,"initialize");var mFe=Q((t,e={})=>{const{code:n}=doe(t);return iK.fromText(n,e)},"getDiagramFromText");function gFe(t,e,n,a){sFe(e,t),cFe(e,n,a,e.attr("id"))}Q(gFe,"addA11yInfo");var R1=Object.freeze({render:Wxt,parse:pFe,getDiagramFromText:mFe,initialize:AFe,getConfig:Pr,setConfig:S$e,getSiteConfig:Q$e,updateSiteConfig:Wct,reset:Q(()=>{U9()},"reset"),globalReset:Q(()=>{U9(U_)},"globalReset"),defaultConfig:U_});eie(Pr().logLevel);U9(Pr());var Yxt=Q((t,e,n)=>{_e.warn(t),Hie(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),hFe=Q(async function(t={querySelector:".mermaid"}){try{await Xxt(t)}catch(e){if(Hie(e)&&_e.error(e.str),Kb.parseError&&Kb.parseError(e),!t.suppressErrors)throw _e.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Xxt=Q(async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const a=R1.getConfig();_e.debug(`${t?"":"No "}Callback function found`);let r;if(n)r=n;else if(e)r=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");_e.debug(`Found ${r.length} diagrams`),a?.startOnLoad!==void 0&&(_e.debug("Start On Load: "+a?.startOnLoad),R1.updateSiteConfig({startOnLoad:a?.startOnLoad}));const i=new Wa.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let o;const s=[];for(const l of Array.from(r)){if(_e.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${i.next()}`;o=l.innerHTML,o=I8e(Wa.entityDecode(o)).trim().replace(//gi,"
    ");const d=Wa.detectInit(o);d&&_e.debug("Detected early reinit: ",d);try{const{svg:p,bindFunctions:A}=await wFe(u,o,l);l.innerHTML=p,t&&await t(u),A&&A(l)}catch(p){Yxt(p,s,Kb.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),fFe=Q(function(t){R1.initialize(t)},"initialize"),Vxt=Q(async function(t,e,n){_e.warn("mermaid.init is deprecated. Please use run instead."),t&&fFe(t);const a={postRenderCallback:n,querySelector:".mermaid"};typeof e=="string"?a.querySelector=e:e&&(e instanceof HTMLElement?a.nodes=[e]:a.nodes=e),await hFe(a)},"init"),Zxt=Q(async(t,{lazyLoad:e=!0}={})=>{AM(),aZ(...t),e===!1&&await wxt()},"registerExternalDiagrams"),bFe=Q(function(){if(Kb.startOnLoad){const{startOnLoad:t}=R1.getConfig();t&&Kb.run().catch(e=>_e.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",bFe,!1);var Kxt=Q(function(t){Kb.parseError=t},"setParseErrorHandler"),IR=[],OU=!1,yFe=Q(async()=>{if(!OU){for(OU=!0;IR.length>0;){const t=IR.shift();if(t)try{await t()}catch(e){_e.error("Error executing queue",e)}}OU=!1}},"executeQueue"),Jxt=Q(async(t,e)=>new Promise((n,a)=>{const r=Q(()=>new Promise((i,o)=>{R1.parse(t,e).then(s=>{i(s),n(s)},s=>{_e.error("Error parsing",s),Kb.parseError?.(s),o(s),a(s)})}),"performCall");IR.push(r),yFe().catch(a)}),"parse"),wFe=Q((t,e,n)=>new Promise((a,r)=>{const i=Q(()=>new Promise((o,s)=>{R1.render(t,e,n).then(l=>{o(l),a(l)},l=>{_e.error("Error parsing",l),Kb.parseError?.(l),s(l),r(l)})}),"performCall");IR.push(i),yFe().catch(r)}),"render"),eOt=Q(()=>Object.keys(B1).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Kb={startOnLoad:!0,mermaidAPI:R1,parse:Jxt,render:wFe,init:Vxt,run:hFe,registerExternalDiagrams:Zxt,registerLayoutLoaders:C6e,initialize:fFe,parseError:void 0,contentLoaded:bFe,setParseErrorHandler:Kxt,detectType:nie,registerIconPacks:T8e,getRegisteredDiagramsMetadata:eOt},Pb=Kb;/*! Check if previously processed *//*! * Wait for document loaded before starting the execution */let Xs=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function tOt(t){return Aoe(t)}function Aoe(t){return Array.isArray(t)?nOt(t):t instanceof RegExp?t:typeof t=="object"?aOt(t):t}function nOt(t){let e=[];for(let n=0,a=t.length;n{for(let a in n)t[a]=n[a]}),t}function kFe(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?kFe(t.substring(0,t.length-1)):t.substr(~e+1)}var CU=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,lT=class{static hasCaptures(t){return t===null?!1:(CU.lastIndex=0,CU.test(t))}static replaceCaptures(t,e,n){return t.replace(CU,(a,r,i,o)=>{let s=n[parseInt(r||i,10)];if(s){let l=e.substring(s.start,s.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return a})}};function xFe(t,e){return te?1:0}function OFe(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,a=e.length;if(n===a){for(let r=0;rthis._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,a=this._cachedMatchRoot.get(e).find(r=>rOt(t.parent,r.parentScopes));return a?new BFe(a.fontStyle,a.foreground,a.background):null}},_U=class uF{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const a of n)e=new uF(e,a);return e}static from(...e){let n=null;for(let a=0;a"){if(n===e.length-1)return!1;a=e[++n],r=!0}for(;t&&!iOt(t.scopeName,a);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function iOt(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var BFe=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function oOt(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],a=0;for(let r=0,i=e.length;r1&&(f=g.slice(0,g.length-1),f.reverse()),n[a++]=new sOt(h,f,r,l,u,d)}}return n}var sOt=class{constructor(t,e,n,a,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=a,this.foreground=r,this.background=i}},ou=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(ou||{});function cOt(t,e){t.sort((l,u)=>{let d=xFe(l.scope,u.scope);return d!==0||(d=OFe(l.parentScopes,u.parentScopes),d!==0)?d:l.index-u.index});let n=0,a="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(a=l.foreground),l.background!==null&&(r=l.background)}let i=new lOt(e),o=new BFe(n,i.getId(a),i.getId(r)),s=new dOt(new sK(0,null,-1,0,0),[]);for(let l=0,u=t.length;le?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),a!==0&&(this.foreground=a),r!==0&&(this.background=r)}},dOt=class cK{constructor(e,n=[],a={}){this._mainRule=e,this._children=a,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let a=0,r=0;for(;e.parentScopes[a]===">"&&a++,n.parentScopes[r]===">"&&r++,!(a>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[a].length;if(i!==0)return i;a++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let a=e.indexOf("."),r,i;if(a===-1?(r=e,i=""):(r=e.substring(0,a),i=e.substring(a+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(cK._cmpBySpecificity),n}insert(e,n,a,r,i,o){if(n===""){this._doInsertHere(e,a,r,i,o);return}let s=n.indexOf("."),l,u;s===-1?(l=n,u=""):(l=n.substring(0,s),u=n.substring(s+1));let d;this._children.hasOwnProperty(l)?d=this._children[l]:(d=new cK(this._mainRule.clone(),sK.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(e+1,u,a,r,i,o)}_doInsertHere(e,n,a,r,i){if(n===null){this._mainRule.acceptOverwrite(e,a,r,i);return}for(let o=0,s=this._rulesWithParentScopes.length;o>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,a,r,i,o,s){let l=hA.getLanguageId(e),u=hA.getTokenType(e),d=hA.containsBalancedBrackets(e)?1:0,p=hA.getFontStyle(e),A=hA.getForeground(e),m=hA.getBackground(e);return n!==0&&(l=n),a!==8&&(u=a),r!==null&&(d=r?1:0),i!==-1&&(p=i),o!==0&&(A=o),s!==0&&(m=s),(l<<0|u<<8|d<<10|p<<11|A<<15|m<<24)>>>0}};function $R(t,e){const n=[],a=pOt(t);let r=a.next();for(;r!==null;){let l=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=a.next()}let u=o();if(n.push({matcher:u,priority:l}),r!==",")break;r=a.next()}return n;function i(){if(r==="-"){r=a.next();const l=i();return u=>!!l&&!l(u)}if(r==="("){r=a.next();const l=s();return r===")"&&(r=a.next()),l}if(ohe(r)){const l=[];do l.push(r),r=a.next();while(ohe(r));return u=>e(l,u)}return null}function o(){const l=[];let u=i();for(;u;)l.push(u),u=i();return d=>l.every(p=>p(d))}function s(){const l=[];let u=o();for(;u&&(l.push(u),r==="|"||r===",");){do r=a.next();while(r==="|"||r===",");u=o()}return d=>l.some(p=>p(d))}}function ohe(t){return!!t&&!!t.match(/[\w\.:]+/)}function pOt(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const a=n[0];return n=e.exec(t),a}}}function QFe(t){typeof t.dispose=="function"&&t.dispose()}var N4=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},AOt=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},mOt=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},gOt=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new N4(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new mOt;for(const n of t)hOt(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof N4){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function hOt(t,e,n,a){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof N4?dF({baseGrammar:i,selfGrammar:r},a):lK(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},a);const o=n.injections(t.scopeName);if(o)for(const s of o)a.add(new N4(s))}function lK(t,e,n){if(e.repository&&e.repository[t]){const a=e.repository[t];TR([a],e,n)}}function dF(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&TR(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&TR(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function TR(t,e,n){for(const a of t){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const r=a.repository?vFe({},e.repository,a.repository):e.repository;Array.isArray(a.patterns)&&TR(a.patterns,{...e,repository:r},n);const i=a.include;if(!i)continue;const o=SFe(i);switch(o.kind){case 0:dF({...e,selfGrammar:e.baseGrammar},n);break;case 1:dF(e,n);break;case 2:lK(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const s=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(s){const l={baseGrammar:e.baseGrammar,selfGrammar:s,repository:r};o.kind===4?lK(o.ruleName,l,n):dF(l,n)}else o.kind===4?n.add(new AOt(o.scopeName,o.ruleName)):n.add(new N4(o.scopeName));break}}}var fOt=class{kind=0},bOt=class{kind=1},yOt=class{constructor(t){this.ruleName=t}kind=2},wOt=class{constructor(t){this.scopeName=t}kind=3},vOt=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function SFe(t){if(t==="$base")return new fOt;if(t==="$self")return new bOt;const e=t.indexOf("#");if(e===-1)return new wOt(t);if(e===0)return new yOt(t.substring(1));{const n=t.substring(0,e),a=t.substring(e+1);return new vOt(n,a)}}var kOt=/\\(\d+)/,she=/\\(\d+)/g,xOt=-1,IFe=-2;var L$=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,n,a,r){this.$location=e,this.id=n,this._name=a||null,this._nameIsCapturing=lT.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=lT.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${kFe(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return!this._nameIsCapturing||this._name===null||e===null||n===null?this._name:lT.replaceCaptures(this._name,e,n)}getContentName(e,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:lT.replaceCaptures(this._contentName,e,n)}},OOt=class extends L${retokenizeCapturedWithRuleId;constructor(t,e,n,a,r){super(t,e,n,a),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,a){throw new Error("Not supported!")}},COt=class extends L${_match;captures;_cachedCompiledPatterns;constructor(t,e,n,a,r){super(t,e,n,null),this._match=new M4(a,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new z4,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},che=class extends L${hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,a,r){super(t,e,n,a),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new z4,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},uK=class extends L${_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,a,r,i,o,s,l,u){super(t,e,n,a),this._begin=new M4(r,this.id),this.beginCaptures=i,this._end=new M4(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,a)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new z4;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},PR=class extends L${_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,a,r,i,o,s,l){super(t,e,n,a),this._begin=new M4(r,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=new M4(o,IFe),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new z4;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,a){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,a)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new z4,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},DFe=class Ul{static createCaptureRule(e,n,a,r,i){return e.registerRule(o=>new OOt(n,o,a,r,i))}static getCompiledRuleId(e,n,a){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new COt(e.$vscodeTextmateLocation,e.id,e.name,e.match,Ul._compileCaptures(e.captures,n,a));if(typeof e.begin>"u"){e.repository&&(a=vFe({},a,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new che(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,Ul._compilePatterns(i,n,a))}return e.while?new PR(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Ul._compileCaptures(e.beginCaptures||e.captures,n,a),e.while,Ul._compileCaptures(e.whileCaptures||e.captures,n,a),Ul._compilePatterns(e.patterns,n,a)):new uK(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Ul._compileCaptures(e.beginCaptures||e.captures,n,a),e.end,Ul._compileCaptures(e.endCaptures||e.captures,n,a),e.applyEndPatternLast,Ul._compilePatterns(e.patterns,n,a))}),e.id}static _compileCaptures(e,n,a){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const s=parseInt(o,10);s>i&&(i=s)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const s=parseInt(o,10);let l=0;e[o].patterns&&(l=Ul.getCompiledRuleId(e[o],n,a)),r[s]=Ul.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return r}static _compilePatterns(e,n,a){let r=[];if(e)for(let i=0,o=e.length;ie.substring(r.start,r.end));return she.lastIndex=0,this.source.replace(she,(r,i)=>CFe(a[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],a=[],r=[],i,o,s,l;for(i=0,o=this.source.length;in.source);this._cached=new lhe(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let a=this._items.map(r=>r.resolveAnchors(e,n));return new lhe(t,a,this._items.map(r=>r.ruleId))}},lhe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e{const n=this._scopeToLanguage(e),a=this._toStandardTokenType(e);return new BU(n,a)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(dK.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},BOt=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,a])=>CFe(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},uhe=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function TFe(t,e,n,a,r,i,o,s){const l=e.content.length;let u=!1,d=-1;if(o){const m=EOt(t,e,n,a,r,i);r=m.stack,a=m.linePos,n=m.isFirstLine,d=m.anchorPosition}const p=Date.now();for(;!u;){if(s!==0&&Date.now()-p>s)return new uhe(r,!0);A()}return new uhe(r,!1);function A(){const m=QOt(t,e,n,a,r,d);if(!m){i.produce(r,l),u=!0;return}const g=m.captureIndices,h=m.matchedRuleId,f=g&&g.length>0?g[0].end>a:!1;if(h===xOt){const b=r.getRule(t);i.produce(r,g[0].start),r=r.withContentNameScopesList(r.nameScopesList),KQ(t,e,n,r,i,b.endCaptures,g),i.produce(r,g[0].end);const y=r;if(r=r.parent,d=y.getAnchorPos(),!f&&y.getEnterPos()===a){r=y,i.produce(r,l),u=!0;return}}else{const b=t.getRule(h);i.produce(r,g[0].start);const y=r,w=b.getName(e.content,g),v=r.contentNameScopesList.pushAttributed(w,t);if(r=r.push(h,a,d,g[0].end===l,null,v,v),b instanceof uK){const k=b;KQ(t,e,n,r,i,k.beginCaptures,g),i.produce(r,g[0].end),d=g[0].end;const _=k.getContentName(e.content,g),x=v.pushAttributed(_,t);if(r=r.withContentNameScopesList(x),k.endHasBackReferences&&(r=r.withEndRule(k.getEndWithResolvedBackReferences(e.content,g))),!f&&y.hasSameRuleAs(r)){r=r.pop(),i.produce(r,l),u=!0;return}}else if(b instanceof PR){const k=b;KQ(t,e,n,r,i,k.beginCaptures,g),i.produce(r,g[0].end),d=g[0].end;const _=k.getContentName(e.content,g),x=v.pushAttributed(_,t);if(r=r.withContentNameScopesList(x),k.whileHasBackReferences&&(r=r.withEndRule(k.getWhileWithResolvedBackReferences(e.content,g))),!f&&y.hasSameRuleAs(r)){r=r.pop(),i.produce(r,l),u=!0;return}}else if(KQ(t,e,n,r,i,b.captures,g),i.produce(r,g[0].end),r=r.pop(),!f){r=r.safePop(),i.produce(r,l),u=!0;return}}g[0].end>a&&(a=g[0].end,n=!1)}}function EOt(t,e,n,a,r,i){let o=r.beginRuleCapturedEOL?0:-1;const s=[];for(let l=r;l;l=l.pop()){const u=l.getRule(t);u instanceof PR&&s.push({rule:u,stack:l})}for(let l=s.pop();l;l=s.pop()){const{ruleScanner:u,findOptions:d}=DOt(l.rule,t,l.stack.endRule,n,a===o),p=u.findNextMatchSync(e,a,d);if(p){if(p.ruleId!==IFe){r=l.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(i.produce(l.stack,p.captureIndices[0].start),KQ(t,e,n,l.stack,i,l.rule.whileCaptures,p.captureIndices),i.produce(l.stack,p.captureIndices[0].end),o=p.captureIndices[0].end,p.captureIndices[0].end>a&&(a=p.captureIndices[0].end,n=!1))}else{r=l.stack.pop();break}}return{stack:r,linePos:a,anchorPosition:o,isFirstLine:n}}function QOt(t,e,n,a,r,i){const o=SOt(t,e,n,a,r,i),s=t.getInjections();if(s.length===0)return o;const l=IOt(s,t,e,n,a,r,i);if(!l)return o;if(!o)return l;const u=o.captureIndices[0].start,d=l.captureIndices[0].start;return d=s)&&(s=w,l=y.captureIndices,u=y.ruleId,d=g.priority,s===r))break}return l?{priorityMatch:d===-1,captureIndices:l,matchedRuleId:u}:null}function PFe(t,e,n,a,r){return{ruleScanner:t.compileAG(e,n,a,r),findOptions:0}}function DOt(t,e,n,a,r){return{ruleScanner:t.compileWhileAG(e,n,a,r),findOptions:0}}function KQ(t,e,n,a,r,i,o){if(i.length===0)return;const s=e.content,l=Math.min(i.length,o.length),u=[],d=o[0].end;for(let p=0;pd)break;for(;u.length>0&&u[u.length-1].endPos<=m.start;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?r.produceFromScopes(u[u.length-1].scopes,m.start):r.produce(a,m.start),A.retokenizeCapturedWithRuleId){const h=A.getName(s,o),f=a.contentNameScopesList.pushAttributed(h,t),b=A.getContentName(s,o),y=f.pushAttributed(b,t),w=a.push(A.retokenizeCapturedWithRuleId,m.start,-1,!1,null,f,y),v=t.createOnigString(s.substring(0,m.end));TFe(t,v,n&&m.start===0,m.start,w,r,!1,0),QFe(v);continue}const g=A.getName(s,o);if(g!==null){const f=(u.length>0?u[u.length-1].scopes:a.contentNameScopesList).pushAttributed(g,t);u.push(new $Ot(f,m.end))}}for(;u.length>0;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var $Ot=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function TOt(t,e,n,a,r,i,o,s){return new FOt(t,e,n,a,r,i,o,s)}function dhe(t,e,n,a,r){const i=$R(e,FR),o=DFe.getCompiledRuleId(n,a,r.repository);for(const s of i)t.push({debugSelector:e,matcher:s.matcher,ruleId:o,grammar:r,priority:s.priority})}function FR(t,e){if(e.length{for(let r=n;rn&&t.substr(0,n)===e&&t[n]==="."}var FOt=class{constructor(e,n,a,r,i,o,s,l){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new _Ot(a,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=phe(n,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const u of Object.keys(i)){const d=$R(u,FR);for(const p of d)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[u]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},n=[],a=this._rootScopeName,r=e.lookup(a);if(r){const i=r.injections;if(i)for(let s in i)dhe(n,s,i[s],this,r);const o=this._grammarRepository.injections(a);o&&o.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const u=l.injectionSelector;u&&dhe(n,u,l,this,l)}})}return n.sort((i,o)=>i.priority-o.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const n=++this._lastRuleId,a=e(n);return this._ruleId2desc[n]=a,a}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,n){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const a=this._grammarRepository.lookup(e);if(a)return this._includedGrammars[e]=phe(a,n&&n.$base),this._includedGrammars[e]}}tokenizeLine(e,n,a=0){const r=this._tokenize(e,n,!1,a);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,n,a=0){const r=this._tokenize(e,n,!0,a);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,n,a,r){this._rootId===-1&&(this._rootId=DFe.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!n||n===pK.NULL){i=!0;const d=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),A=rB.set(0,d.languageId,d.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),m=this.getRule(this._rootId).getName(null,null);let g;m?g=BI.createRootAndLookUpScopeName(m,A,this):g=BI.createRoot("unknown",A),n=new pK(null,this._rootId,-1,-1,!1,null,g,g)}else i=!1,n.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,l=new LOt(a,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=TFe(this,o,i,0,n,l,!0,r);return QFe(o),{lineLength:s,lineTokens:l,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function phe(t,e){return t=tOt(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var BI=class th{constructor(e,n,a){this.parent=e,this.scopePath=n,this.tokenAttributes=a}static fromExtension(e,n){let a=e,r=e?.scopePath??null;for(const i of n)r=_U.push(r,i.scopeNames),a=new th(a,r,i.encodedTokenAttributes);return a}static createRoot(e,n){return new th(null,new _U(null,e),n)}static createRootAndLookUpScopeName(e,n,a){const r=a.getMetadataForScope(e),i=new _U(null,e),o=a.themeProvider.themeMatch(i),s=th.mergeAttributes(n,r,o);return new th(null,i,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return th.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,a){let r=-1,i=0,o=0;return a!==null&&(r=a.fontStyle,i=a.foregroundId,o=a.backgroundId),rB.set(e,n.languageId,n.tokenType,null,r,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return th._pushAttributed(this,e,n);const a=e.split(/ /g);let r=this;for(const i of a)r=th._pushAttributed(r,i,n);return r}static _pushAttributed(e,n,a){const r=a.getMetadataForScope(n),i=e.scopePath.push(n),o=a.themeProvider.themeMatch(i),s=th.mergeAttributes(e.tokenAttributes,r,o);return new th(e,i,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let a=this;for(;a&&a!==e;)n.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===e?n.reverse():void 0}},pK=class bk{constructor(e,n,a,r,i,o,s,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=s,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new bk(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:bk._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?BI.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){bk._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,a,r,i,o,s){return new bk(this,e,n,a,r,i,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new bk(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const a=BI.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new bk(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,a,BI.fromExtension(a,n.contentNameScopesList))}},ROt=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):$R(n,FR).map(a=>a.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>$R(n,FR).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},LOt=class{constructor(t,e,n,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let a=t?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=t?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(i)&&(a=rB.set(a,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(i))}if(r&&(a=rB.set(a,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let a=0,r=this._binaryTokens.length;a0;)o.Q.map(s=>this._loadSingleGrammar(s.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,a,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const a=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,a)}}addGrammar(e,n=[],a=0,r=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,a,r)}_grammarForScopeName(e,n=0,a=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,a,r,i)}},AK=pK.NULL;const zOt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let N$=class{constructor(e,n,a){this.normal=n,this.property=e,a&&(this.space=a)}};N$.prototype.normal={};N$.prototype.property={};N$.prototype.space=void 0;function FFe(t,e){const n={},a={};for(const r of t)Object.assign(n,r.property),Object.assign(a,r.normal);return new N$(n,a,e)}function mK(t){return t.toLowerCase()}let Ud=class{constructor(e,n){this.attribute=n,this.property=e}};Ud.prototype.attribute="";Ud.prototype.booleanish=!1;Ud.prototype.boolean=!1;Ud.prototype.commaOrSpaceSeparated=!1;Ud.prototype.commaSeparated=!1;Ud.prototype.defined=!1;Ud.prototype.mustUseProperty=!1;Ud.prototype.number=!1;Ud.prototype.overloadedBoolean=!1;Ud.prototype.property="";Ud.prototype.spaceSeparated=!1;Ud.prototype.space=void 0;let qOt=0;const sr=Qx(),qs=Qx(),gK=Qx(),Cn=Qx(),Wi=Qx(),b_=Qx(),bp=Qx();function Qx(){return 2**++qOt}const hK=Object.freeze(Object.defineProperty({__proto__:null,boolean:sr,booleanish:qs,commaOrSpaceSeparated:bp,commaSeparated:b_,number:Cn,overloadedBoolean:gK,spaceSeparated:Wi},Symbol.toStringTag,{value:"Module"})),EU=Object.keys(hK);class moe extends Ud{constructor(e,n,a,r){let i=-1;if(super(e,n),Ahe(this,"space",r),typeof a=="number")for(;++i4&&n.slice(0,4)==="data"&&HOt.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(mhe,XOt);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!mhe.test(i)){let o=i.replace(GOt,YOt);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}r=moe}return new r(a,e)}function YOt(t){return"-"+t.toLowerCase()}function XOt(t){return t.charAt(1).toUpperCase()}const VOt=FFe([RFe,jOt,MFe,zFe,qFe],"html"),jFe=FFe([RFe,UOt,MFe,zFe,qFe],"svg"),ghe={}.hasOwnProperty;function ZOt(t,e){const n=e;function a(r,...i){let o=a.invalid;const s=a.handlers;if(r&&ghe.call(r,t)){const l=String(r[t]);o=ghe.call(s,l)?s[l]:a.unknown}if(o)return o.call(this,r,...i)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a}const KOt=/["&'<>`]/g,JOt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eCt=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tCt=/[|\\{}()[\]^$+*?.]/g,hhe=new WeakMap;function nCt(t,e){if(t=t.replace(e.subset?aCt(e.subset):KOt,a),e.subset||e.escapeOnly)return t;return t.replace(JOt,n).replace(eCt,a);function n(r,i,o){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function a(r,i,o){return e.format(r.charCodeAt(0),o.charCodeAt(i+1),e)}}function aCt(t){let e=hhe.get(t);return e||(e=rCt(t),hhe.set(t,e)),e}function rCt(t){const e=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},uCt=["cent","copy","divide","gt","lt","not","para","times"],UFe={}.hasOwnProperty,fK={};let uT;for(uT in QU)UFe.call(QU,uT)&&(fK[QU[uT]]=uT);const dCt=/[^\dA-Za-z]/;function pCt(t,e,n,a){const r=String.fromCharCode(t);if(UFe.call(fK,r)){const i=fK[r],o="&"+i;return n&&lCt.includes(i)&&!uCt.includes(i)&&(!a||e&&e!==61&&dCt.test(String.fromCharCode(e)))?o:o+";"}return""}function ACt(t,e,n){let a=oCt(t,e,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=pCt(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const i=cCt(t,e,n.omitOptionalSemicolons);i.length|^->||--!>|"],hCt=["<",">"];function fCt(t,e,n,a){return a.settings.bogusComments?"":"";function r(i){return y_(i,Object.assign({},a.settings.characterReferences,{subset:hCt}))}}function bCt(t,e,n,a){return""}function fhe(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let a=0,r=n.indexOf(e);for(;r!==-1;)a++,r=n.indexOf(e,r+e.length);return a}function yCt(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function wCt(t){return t.join(" ").trim()}const vCt=/[ \t\n\f\r]/g;function goe(t){return typeof t=="object"?t.type==="text"?bhe(t.value):!1:bhe(t)}function bhe(t){return t.replace(vCt,"")===""}const Pc=HFe(1),GFe=HFe(-1),kCt=[];function HFe(t){return e;function e(n,a,r){const i=n?n.children:kCt;let o=(a||0)+t,s=i[o];if(!r)for(;s&&goe(s);)o+=t,s=i[o];return s}}const xCt={}.hasOwnProperty;function WFe(t){return e;function e(n,a,r){return xCt.call(t,n.tagName)&&t[n.tagName](n,a,r)}}const hoe=WFe({body:CCt,caption:SU,colgroup:SU,dd:QCt,dt:ECt,head:SU,html:OCt,li:BCt,optgroup:SCt,option:ICt,p:_Ct,rp:yhe,rt:yhe,tbody:$Ct,td:whe,tfoot:TCt,th:whe,thead:DCt,tr:PCt});function SU(t,e,n){const a=Pc(n,e,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&goe(a.value.charAt(0)))}function OCt(t,e,n){const a=Pc(n,e);return!a||a.type!=="comment"}function CCt(t,e,n){const a=Pc(n,e);return!a||a.type!=="comment"}function _Ct(t,e,n){const a=Pc(n,e);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function BCt(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&a.tagName==="li"}function ECt(t,e,n){const a=Pc(n,e);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function QCt(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function yhe(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function SCt(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&a.tagName==="optgroup"}function ICt(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function DCt(t,e,n){const a=Pc(n,e);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function $Ct(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function TCt(t,e,n){return!Pc(n,e)}function PCt(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&a.tagName==="tr"}function whe(t,e,n){const a=Pc(n,e);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const FCt=WFe({body:NCt,colgroup:MCt,head:LCt,html:RCt,tbody:zCt});function RCt(t){const e=Pc(t,-1);return!e||e.type!=="comment"}function LCt(t){const e=new Set;for(const a of t.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(e.has(a.tagName))return!1;e.add(a.tagName)}const n=t.children[0];return!n||n.type==="element"}function NCt(t){const e=Pc(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&goe(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function MCt(t,e,n){const a=GFe(n,e),r=Pc(t,-1,!0);return n&&a&&a.type==="element"&&a.tagName==="colgroup"&&hoe(a,n.children.indexOf(a),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function zCt(t,e,n){const a=GFe(n,e),r=Pc(t,-1);return n&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&hoe(a,n.children.indexOf(a),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const dT={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 \f\r "&'/<=>\``.split("")]],unquoted:[[` \f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0 \f\r "&'<=>\``.split(""),`\0 \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function qCt(t,e,n,a){const r=a.schema,i=r.space==="svg"?!1:a.settings.omitOptionalTags;let o=r.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(t.tagName.toLowerCase());const s=[];let l;r.space==="html"&&t.tagName==="svg"&&(a.schema=jFe);const u=jCt(a,t.properties),d=a.all(r.space==="html"&&t.tagName==="template"?t.content:t);return a.schema=r,d&&(o=!1),(u||!i||!FCt(t,e,n))&&(s.push("<",t.tagName,u?" "+u:""),o&&(r.space==="svg"||a.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!a.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(d),!o&&(!i||!hoe(t,e,n))&&s.push(""),s.join("")}function jCt(t,e){const n=[];let a=-1,r;if(e){for(r in e)if(e[r]!==null&&e[r]!==void 0){const i=UCt(t,r,e[r]);i&&n.push(i)}}for(;++afhe(n,t.alternative)&&(o=t.alternative),s=o+y_(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?dT.single:dT.double)[r][i],attribute:!0}))+o),l+(s&&"="+s))}const GCt=["<","&"];function YFe(t,e,n,a){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:y_(t.value,Object.assign({},a.settings.characterReferences,{subset:GCt}))}function HCt(t,e,n,a){return a.settings.allowDangerousHtml?t.value:YFe(t,e,n,a)}function WCt(t,e,n,a){return a.all(t)}const YCt=ZOt("type",{invalid:XCt,unknown:VCt,handlers:{comment:fCt,doctype:bCt,element:qCt,raw:HCt,root:WCt,text:YFe}});function XCt(t){throw new Error("Expected node, not `"+t+"`")}function VCt(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const ZCt={},KCt={},JCt=[];function e_t(t,e){const n=e||ZCt,a=n.quote||'"',r=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:t_t,all:n_t,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||zOt,characterReferences:n.characterReferences||KCt,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?jFe:VOt,quote:a,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function t_t(t,e,n){return YCt(t,e,n,this)}function n_t(t){const e=[],n=t&&t.children||JCt;let a=-1;for(;++ae.default||e)}function foe(t){return!t||["plaintext","txt","text","plain"].includes(t)}function VFe(t){return t==="ansi"||foe(t)}function boe(t){return t==="none"}function ZFe(t){return boe(t)}function KFe(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const a of n)a&&!t.properties.class.includes(a)&&t.properties.class.push(a);return t}function mM(t,e=!1){const n=t.split(/(\r?\n)/g);let a=0;const r=[];for(let i=0;ir);function n(r){if(r===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=r,o=0;for(const s of e){if(in&&a.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return na-r);return n.length?t.map(a=>a.flatMap(r=>{const i=n.filter(o=>r.offseto-r.offset).sort((o,s)=>o-s);return i.length?o_t(r,i):r})):t}function c_t(t,e,n,a,r="css-vars"){const i={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(d=>LR(t.variants[d])),s=new Set(o.flatMap(d=>Object.keys(d))),l={},u=(d,p)=>{const A=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+e[d]+(p==="color"?"":A)};return o.forEach((d,p)=>{for(const A of s){const m=d[A]||"inherit";if(p===0&&a&&i_t.includes(A))if(a===yoe&&o.length>1){const g=e.findIndex(y=>y==="light"),h=e.findIndex(y=>y==="dark");if(g===-1||h===-1)throw new Xs('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=o[g][A]||"inherit",b=o[h][A]||"inherit";l[A]=`light-dark(${f}, ${b})`,r==="css-vars"&&(l[u(p,A)]=m)}else l[A]=m;else r==="css-vars"&&(l[u(p,A)]=m)}}),i.htmlStyle=l,i}function LR(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&ou.Italic&&(e["font-style"]="italic"),t.fontStyle&ou.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&ou.Underline&&n.push("underline"),t.fontStyle&ou.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function bK(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}const JFe=new WeakMap;function gM(t,e){JFe.set(t,e)}function q4(t){return JFe.get(t)}class cE{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new cE(Object.fromEntries(a_t(n).map(a=>[a,AK])),e)}constructor(...e){if(e.length===2){const[n,a]=e;this.lang=a,this._stacks=n}else{const[n,a,r]=e;this.lang=a,this._stacks={[r]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return l_t(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function l_t(t){const e=[],n=new Set;function a(r){if(n.has(r))return;n.add(r);const i=r?.nameScopesList?.scopeName;i&&e.push(i),r.parent&&a(r.parent)}return a(t),e}function u_t(t,e){if(!(t instanceof cE))throw new Xs("Invalid grammar state");return t.getInternalStack(e)}function d_t(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let a=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new Xs(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{const s=r.lines[o.line];if(s===void 0)throw new Xs(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let l=o.character;if(l<0&&(l=s.length+l),l<0||l>s.length)throw new Xs(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${s.length}`);return{...o,character:l,offset:r.posToIndex(o.line,l)}}};const r=r_t(n.source),i=(n.options.decorations||[]).map(o=>({...o,start:a(o.start),end:a(o.end)}));p_t(i),t.set(n.meta,{decorations:i,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const r=e(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return s_t(n,r)},code(n){if(!this.options.decorations?.length)return;const a=e(this),r=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(r.length!==a.converter.lines.length)throw new Xs(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function i(d,p,A,m){const g=r[d];let h="",f=-1,b=-1;if(p===0&&(f=0),A===0&&(b=0),A===Number.POSITIVE_INFINITY&&(b=g.children.length),f===-1||b===-1)for(let w=0;wh);return d.tagName=p.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},p.properties?.class&&KFe(d,p.properties.class),d=g(d,A)||d,d}const l=[],u=a.decorations.sort((d,p)=>p.start.offset-d.start.offset||d.end.offset-p.end.offset);for(const d of u){const{start:p,end:A}=d;if(p.line===A.line)i(p.line,p.character,A.character,d);else if(p.lineo(m,d));i(A.line,0,A.character,d)}}l.forEach(d=>d())}}}function p_t(t){for(let e=0;en.end.offset)throw new Xs(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let a=e+1;aNumber.parseInt(a));return n.length!==3||n.some(a=>Number.isNaN(a))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function h_t(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const a=Number.parseInt(n);if(!Number.isNaN(a))if(a===0)e.push({type:"resetAll"});else if(a<=9)IU[a]&&e.push({type:"setDecoration",value:IU[a]});else if(a<=29){const r=IU[a-20];r&&(e.push({type:"resetDecoration",value:r}),r==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Vk[a-30]}});else if(a===38){const r=vhe(t);r&&e.push({type:"setForegroundColor",value:r})}else if(a===39)e.push({type:"resetForegroundColor"});else if(a<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Vk[a-40]}});else if(a===48){const r=vhe(t);r&&e.push({type:"setBackgroundColor",value:r})}else a===49?e.push({type:"resetBackgroundColor"}):a===53?e.push({type:"setDecoration",value:"overline"}):a===55?e.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Vk[a-90+8]}}):a>=100&&a<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Vk[a-100+8]}})}return e}function f_t(){let t=null,e=null,n=new Set;return{parse(a){const r=[];let i=0;do{const o=g_t(a,i),s=o.sequence?a.substring(i,o.startPosition):a.substring(i);if(s.length>0&&r.push({value:s,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const l=h_t(o.sequence);for(const u of l)u.type==="resetAll"?(t=null,e=null,n.clear()):u.type==="resetForegroundColor"?t=null:u.type==="resetBackgroundColor"?e=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of l)u.type==="setForegroundColor"?t=u.value:u.type==="setBackgroundColor"?e=u.value:u.type==="setDecoration"&&n.add(u.value)}i=o.position}while(iMath.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let a;function r(){if(a)return a;a=[];for(let u=0;u[s,t.colors?.[`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`]]))),o=f_t();return r.map(s=>o.parse(s[0]).map(l=>{let u,d;l.decorations.has("reverse")?(u=l.background?i.value(l.background):t.bg,d=l.foreground?i.value(l.foreground):t.fg):(u=l.foreground?i.value(l.foreground):t.fg,d=l.background?i.value(l.background):void 0),u=iw(u,a),d=iw(d,a),l.decorations.has("dim")&&(u=v_t(u));let p=ou.None;return l.decorations.has("bold")&&(p|=ou.Bold),l.decorations.has("italic")&&(p|=ou.Italic),l.decorations.has("underline")&&(p|=ou.Underline),l.decorations.has("strikethrough")&&(p|=ou.Strikethrough),{content:l.value,offset:s[1],color:u,bgColor:d,fontStyle:p}}))}function v_t(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const a=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${a}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(a=>`${a}${a}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function woe(t,e,n={}){const{lang:a="text",theme:r=t.getLoadedThemes()[0]}=n;if(foe(a)||boe(r))return mM(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:i,colorMap:o}=t.setTheme(r);if(a==="ansi")return w_t(i,e,n);const s=t.getLanguage(a);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new Xs(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Xs(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return x_t(e,s,i,o,n)}function k_t(...t){if(t.length===2)return q4(t[1]);const[e,n,a={}]=t,{lang:r="text",theme:i=e.getLoadedThemes()[0]}=a;if(foe(r)||boe(i))throw new Xs("Plain language does not have grammar state");if(r==="ansi")throw new Xs("ANSI language does not have grammar state");const{theme:o,colorMap:s}=e.setTheme(i),l=e.getLanguage(r);return new cE(MR(n,l,o,s,a).stateStack,l.name,o.name)}function x_t(t,e,n,a,r){const i=MR(t,e,n,a,r),o=new cE(MR(t,e,n,a,r).stateStack,e.name,n.name);return gM(i.tokens,o),i.tokens}function MR(t,e,n,a,r){const i=RR(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=r,l=mM(t);let u=r.grammarState?u_t(r.grammarState,n.name)??AK:r.grammarContextCode!=null?MR(r.grammarContextCode,e,n,a,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:AK,d=[];const p=[];for(let A=0,m=l.length;A0&&g.length>=o){d=[],p.push([{content:g,offset:h,color:"",fontStyle:0}]);continue}let f,b,y;r.includeExplanation&&(f=e.tokenizeLine(g,u,s),b=f.tokens,y=0);const w=e.tokenizeLine2(g,u,s),v=w.tokens.length/2;for(let k=0;kD.trim());break;case"object":T=O.scope;break;default:continue}S.push({settings:O,selectors:T.map(D=>D.split(/ /))})}E.explanation=[];let P=0;for(;_+P({scopeName:e}))}function C_t(t,e){const n=[];for(let a=0,r=e.length;a=0&&r>=0;)khe(t[a],n[r])&&(a-=1),r-=1;return a===-1}function B_t(t,e,n){const a=[];for(const{selectors:r,settings:i}of t)for(const o of r)if(__t(o,e,n)){a.push(i);break}return a}function t9e(t,e,n){const a=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),r=a.map(l=>{const u=woe(t,e,{...n,theme:l.theme}),d=q4(u),p=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:u,state:d,theme:p}}),i=E_t(...r.map(l=>l.tokens)),o=i[0].map((l,u)=>l.map((d,p)=>{const A={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(A.explanation=d.explanation),i.forEach((m,g)=>{const{content:h,explanation:f,offset:b,...y}=m[u][p];A.variants[a[g].color]=y}),A})),s=r[0].state?new cE(Object.fromEntries(r.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),r[0].state.lang):void 0;return s&&gM(o,s),o}function E_t(...t){const e=t.map(()=>[]),n=t.length;for(let a=0;al[a]),i=e.map(()=>[]);e.forEach((l,u)=>l.push(i[u]));const o=r.map(()=>0),s=r.map(l=>l[0]);for(;s.every(l=>l);){const l=Math.min(...s.map(u=>u.content.length));for(let u=0;ub[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,y)=>b.color===u?-1:y.color===u?1:0);if(A.length===0)throw new Xs("`themes` option must not be empty");const m=t9e(t,e,n);if(l=q4(m),u&&yoe!==u&&!A.find(b=>b.color===u))throw new Xs(`\`themes\` option must contain the defaultColor key \`${u}\``);const g=A.map(b=>t.getTheme(b.theme)),h=A.map(b=>b.color);i=m.map(b=>b.map(y=>c_t(y,h,d,u,p))),l&&gM(i,l);const f=A.map(b=>RR(b.theme,n));r=xhe(A,g,f,d,u,"fg",p),a=xhe(A,g,f,d,u,"bg",p),o=`shiki-themes ${g.map(b=>b.name).join(" ")}`,s=u?void 0:[r,a].join(";")}else if("theme"in n){const u=RR(n.theme,n);i=woe(t,e,n);const d=t.getTheme(n.theme);a=iw(d.bg,u),r=iw(d.fg,u),o=d.name,l=q4(i)}else throw new Xs("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:r,bg:a,themeName:o,rootStyle:s,grammarState:l}}function xhe(t,e,n,a,r,i,o){return t.map((s,l)=>{const u=iw(e[l][i],n[l])||"inherit",d=`${a+s.color}${i==="bg"?"-bg":""}:${u}`;if(l===0&&r){if(r===yoe&&t.length>1){const p=t.findIndex(h=>h.color==="light"),A=t.findIndex(h=>h.color==="dark");if(p===-1||A===-1)throw new Xs('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const m=iw(e[p][i],n[p])||"inherit",g=iw(e[A][i],n[A])||"inherit";return`light-dark(${m}, ${g});${d}`}return u}return o==="css-vars"?d:null}).filter(s=>!!s).join(";")}function qR(t,e,n,a={meta:{},options:n,codeToHast:(r,i)=>qR(t,r,i),codeToTokens:(r,i)=>zR(t,r,i)}){let r=e;for(const g of NR(n))r=g.preprocess?.call(a,r,n)||r;let{tokens:i,fg:o,bg:s,themeName:l,rootStyle:u,grammarState:d}=zR(t,r,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:A=!1}=n;p===!0?i=S_t(i):p==="never"&&(i=I_t(i)),A&&(i=D_t(i));const m={...a,get source(){return r}};for(const g of NR(n))i=g.tokens?.call(m,i)||i;return Q_t(i,{...n,fg:o,bg:s,themeName:l,rootStyle:u},m,d)}function Q_t(t,e,n,a=q4(t)){const r=NR(e),i=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=e;let u={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...l!==!1&&l!=null?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([g])=>!g.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:i};const p=[],A={...n,structure:s,addClassToHast:KFe,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return d},get lines(){return p}};if(t.forEach((g,h)=>{h&&(s==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):s==="classic"&&i.push({type:"text",value:` `}));let f={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(const y of g){let w={type:"element",tagName:"span",properties:{...y.htmlAttrs},children:[{type:"text",value:y.content}]};const v=bK(y.htmlStyle||LR(y));v&&(w.properties.style=v);for(const k of r)w=k?.span?.call(A,w,h+1,b,f,y)||w;s==="inline"?o.children.push(w):s==="classic"&&f.children.push(w),b+=y.content.length}if(s==="classic"){for(const y of r)f=y?.line?.call(A,f,h+1)||f;p.push(f),i.push(f)}}),s==="classic"){for(const g of r)d=g?.code?.call(A,d)||d;u.children.push(d);for(const g of r)u=g?.pre?.call(A,u)||u;o.children.push(u)}let m=o;for(const g of r)m=g?.root?.call(A,m)||m;return a&&gM(m,a),m}function S_t(t){return t.map(e=>{const n=[];let a="",r=0;return e.forEach((i,o)=>{const l=!(i.fontStyle&&(i.fontStyle&ou.Underline||i.fontStyle&ou.Strikethrough));l&&i.content.match(/^\s+$/)&&e[o+1]?(r||(r=i.offset),a+=i.content):a?(l?n.push({...i,offset:r,content:a+i.content}):n.push({content:a,offset:r},i),r=0,a=""):n.push(i)}),n})}function I_t(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const a=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return n;const[,r,i,o]=a;if(!r&&!o)return n;const s=[{...n,offset:n.offset+r.length,content:i}];return r&&s.unshift({content:r,offset:n.offset}),o&&s.push({content:o,offset:n.offset+r.length+i.length}),s}))}function D_t(t){return t.map(e=>{const n=[];for(const a of e){if(n.length===0){n.push({...a});continue}const r=n[n.length-1],i=bK(r.htmlStyle||LR(r)),o=bK(a.htmlStyle||LR(a)),s=r.fontStyle&&(r.fontStyle&ou.Underline||r.fontStyle&ou.Strikethrough),l=a.fontStyle&&(a.fontStyle&ou.Underline||a.fontStyle&ou.Strikethrough);!s&&!l&&i===o?r.content+=a.content:n.push({...a})}return n})}const $_t=e_t;function T_t(t,e,n){const a={meta:{},options:n,codeToHast:(i,o)=>qR(t,i,o),codeToTokens:(i,o)=>zR(t,i,o)};let r=$_t(qR(t,e,n,a));for(const i of NR(n))r=i.postprocess?.call(a,r,n)||r;return r}const Ohe={light:"#333333",dark:"#bbbbbb"},Che={light:"#fffffe",dark:"#1e1e1e"},_he="__shiki_resolved";function voe(t){if(t?.[_he])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:a}=e;if(!n||!a){const s=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;s?.settings?.foreground&&(a=s.settings.foreground),s?.settings?.background&&(n=s.settings.background),!a&&e?.colors?.["editor.foreground"]&&(a=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),a||(a=e.type==="light"?Ohe.light:Ohe.dark),n||(n=e.type==="light"?Che.light:Che.dark),e.fg=a,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const i=new Map;function o(s){if(i.has(s))return i.get(s);r+=1;const l=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?o(s):(i.set(s,l),l)}e.settings=e.settings.map(s=>{const l=s.settings?.foreground&&!s.settings.foreground.startsWith("#"),u=s.settings?.background&&!s.settings.background.startsWith("#");if(!l&&!u)return s;const d={...s,settings:{...s.settings}};if(l){const p=o(s.settings.foreground);e.colorReplacements[p]=s.settings.foreground,d.settings.foreground=p}if(u){const p=o(s.settings.background);e.colorReplacements[p]=s.settings.background,d.settings.background=p}return d});for(const s of Object.keys(e.colors||{}))if((s==="editor.foreground"||s==="editor.background"||s.startsWith("terminal.ansi"))&&!e.colors[s]?.startsWith("#")){const l=o(e.colors[s]);e.colorReplacements[l]=e.colors[s],e.colors[s]=l}return Object.defineProperty(e,_he,{enumerable:!1,writable:!1,value:!0}),e}async function n9e(t){return Array.from(new Set((await Promise.all(t.filter(e=>!VFe(e)).map(async e=>await XFe(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function a9e(t){return(await Promise.all(t.map(async n=>ZFe(n)?null:voe(await XFe(n))))).filter(n=>!!n)}let P_t=3;function F_t(t,e=3){e>P_t||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let VC=class extends Error{constructor(e){super(e),this.name="ShikiError"}},R_t=class extends MOt{constructor(e,n,a,r={}){super(e),this._resolver=e,this._themes=n,this._langs=a,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=voe(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=DR.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){if(this._alias[e]){const n=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],n.has(e))throw new VC(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const a={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,a);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const n=Array.from(this._langGraph.entries()),a=n.filter(([r,i])=>!i);if(a.length){const r=n.filter(([i,o])=>o&&o.embeddedLangs?.some(s=>a.map(([l])=>l).includes(s))).filter(i=>!a.includes(i));throw new VC(`Missing languages ${a.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of n)this._resolver.addLanguage(i);for(const[r,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const n of e.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}};class L_t{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,n){this._onigLib={createOnigScanner:a=>e.createScanner(a),createOnigString:a=>e.createString(a)},n.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let a=[];for(let r=1;r<=n.length;r++){const i=n.slice(0,r).join(".");a=[...a,...this._injections.get(i)||[]]}return a}}let N2=0;function N_t(t){N2+=1,t.warnings!==!1&&N2>=10&&N2%10===0&&console.warn(`[Shiki] ${N2} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new VC("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),a=(t.themes||[]).flat(1).map(voe),r=new L_t(t.engine,n),i=new R_t(r,a,n,t.langAlias);let o;function s(y){f();const w=i.getGrammar(typeof y=="string"?y:y.name);if(!w)throw new VC(`Language \`${y}\` not found, you may need to load it first`);return w}function l(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};f();const w=i.getTheme(y);if(!w)throw new VC(`Theme \`${y}\` not found, you may need to load it first`);return w}function u(y){f();const w=l(y);o!==y&&(i.setTheme(w),o=y);const v=i.getColorMap();return{theme:w,colorMap:v}}function d(){return f(),i.getLoadedThemes()}function p(){return f(),i.getLoadedLanguages()}function A(...y){f(),i.loadLanguages(y.flat(1))}async function m(...y){return A(await n9e(y))}function g(...y){f();for(const w of y.flat(1))i.loadTheme(w)}async function h(...y){return f(),g(await a9e(y))}function f(){if(e)throw new VC("Shiki instance has been disposed")}function b(){e||(e=!0,i.dispose(),N2-=1)}return{setTheme:u,getTheme:l,getLanguage:s,getLoadedThemes:d,getLoadedLanguages:p,loadLanguage:m,loadLanguageSync:A,loadTheme:h,loadThemeSync:g,dispose:b,[Symbol.dispose]:b}}async function M_t(t){t.engine||F_t("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,a]=await Promise.all([a9e(t.themes||[]),n9e(t.langs||[]),t.engine]);return N_t({...t,themes:e,langs:n,engine:a})}async function z_t(t){const e=await M_t(t);return{getLastGrammarState:(...n)=>k_t(e,...n),codeToTokensBase:(n,a)=>woe(e,n,a),codeToTokensWithThemes:(n,a)=>t9e(e,n,a),codeToTokens:(n,a)=>zR(e,n,a),codeToHast:(n,a)=>qR(e,n,a),codeToHtml:(n,a)=>T_t(e,n,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function q_t(t){const e=t.langs,n=t.themes,a=t.engine;async function r(i){function o(p){if(typeof p=="string"){if(VFe(p))return[];p=i.langAlias?.[p]||p;const A=e[p];if(!A)throw new Xs(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return A}return p}function s(p){if(ZFe(p))return"none";if(typeof p=="string"){const A=n[p];if(!A)throw new Xs(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return A}return p}const l=(i.themes??[]).map(p=>s(p)),u=(i.langs??[]).map(p=>o(p)),d=await z_t({engine:i.engine??a(),...i,themes:l,langs:u});return{...d,loadLanguage(...p){return d.loadLanguage(...p.map(o))},loadTheme(...p){return d.loadTheme(...p.map(s))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return r}const r9e=[{id:"abap",name:"ABAP",import:()=>ye(()=>Promise.resolve().then(()=>p$n),void 0,import.meta.url)},{id:"actionscript-3",name:"ActionScript",import:()=>ye(()=>Promise.resolve().then(()=>g$n),void 0,import.meta.url)},{id:"ada",name:"Ada",import:()=>ye(()=>Promise.resolve().then(()=>b$n),void 0,import.meta.url)},{id:"angular-html",name:"Angular HTML",import:()=>ye(()=>Promise.resolve().then(()=>S$n),void 0,import.meta.url)},{id:"angular-ts",name:"Angular TypeScript",import:()=>ye(()=>Promise.resolve().then(()=>N$n),void 0,import.meta.url)},{id:"apache",name:"Apache Conf",import:()=>ye(()=>Promise.resolve().then(()=>q$n),void 0,import.meta.url)},{id:"apex",name:"Apex",import:()=>ye(()=>Promise.resolve().then(()=>G$n),void 0,import.meta.url)},{id:"apl",name:"APL",import:()=>ye(()=>Promise.resolve().then(()=>e3n),void 0,import.meta.url)},{id:"applescript",name:"AppleScript",import:()=>ye(()=>Promise.resolve().then(()=>a3n),void 0,import.meta.url)},{id:"ara",name:"Ara",import:()=>ye(()=>Promise.resolve().then(()=>o3n),void 0,import.meta.url)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>ye(()=>Promise.resolve().then(()=>l3n),void 0,import.meta.url)},{id:"asm",name:"Assembly",import:()=>ye(()=>Promise.resolve().then(()=>p3n),void 0,import.meta.url)},{id:"astro",name:"Astro",import:()=>ye(()=>Promise.resolve().then(()=>v3n),void 0,import.meta.url)},{id:"awk",name:"AWK",import:()=>ye(()=>Promise.resolve().then(()=>O3n),void 0,import.meta.url)},{id:"ballerina",name:"Ballerina",import:()=>ye(()=>Promise.resolve().then(()=>B3n),void 0,import.meta.url)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>ye(()=>Promise.resolve().then(()=>S3n),void 0,import.meta.url)},{id:"beancount",name:"Beancount",import:()=>ye(()=>Promise.resolve().then(()=>$3n),void 0,import.meta.url)},{id:"berry",name:"Berry",aliases:["be"],import:()=>ye(()=>Promise.resolve().then(()=>F3n),void 0,import.meta.url)},{id:"bibtex",name:"BibTeX",import:()=>ye(()=>Promise.resolve().then(()=>N3n),void 0,import.meta.url)},{id:"bicep",name:"Bicep",import:()=>ye(()=>Promise.resolve().then(()=>q3n),void 0,import.meta.url)},{id:"blade",name:"Blade",import:()=>ye(()=>Promise.resolve().then(()=>X3n),void 0,import.meta.url)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>ye(()=>Promise.resolve().then(()=>e5n),void 0,import.meta.url)},{id:"c",name:"C",import:()=>ye(()=>Promise.resolve().then(()=>n5n),void 0,import.meta.url)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>ye(()=>Promise.resolve().then(()=>i5n),void 0,import.meta.url)},{id:"cairo",name:"Cairo",import:()=>ye(()=>Promise.resolve().then(()=>u5n),void 0,import.meta.url)},{id:"clarity",name:"Clarity",import:()=>ye(()=>Promise.resolve().then(()=>A5n),void 0,import.meta.url)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>ye(()=>Promise.resolve().then(()=>h5n),void 0,import.meta.url)},{id:"cmake",name:"CMake",import:()=>ye(()=>Promise.resolve().then(()=>b5n),void 0,import.meta.url)},{id:"cobol",name:"COBOL",import:()=>ye(()=>Promise.resolve().then(()=>v5n),void 0,import.meta.url)},{id:"codeowners",name:"CODEOWNERS",import:()=>ye(()=>Promise.resolve().then(()=>O5n),void 0,import.meta.url)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>ye(()=>Promise.resolve().then(()=>B5n),void 0,import.meta.url)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>ye(()=>Promise.resolve().then(()=>S5n),void 0,import.meta.url)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>ye(()=>Promise.resolve().then(()=>$5n),void 0,import.meta.url)},{id:"coq",name:"Coq",import:()=>ye(()=>Promise.resolve().then(()=>F5n),void 0,import.meta.url)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>ye(()=>Promise.resolve().then(()=>U5n),void 0,import.meta.url)},{id:"crystal",name:"Crystal",import:()=>ye(()=>Promise.resolve().then(()=>X5n),void 0,import.meta.url)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>ye(()=>Promise.resolve().then(()=>Z5n),void 0,import.meta.url)},{id:"css",name:"CSS",import:()=>ye(()=>Promise.resolve().then(()=>k$n),void 0,import.meta.url)},{id:"csv",name:"CSV",import:()=>ye(()=>Promise.resolve().then(()=>eTn),void 0,import.meta.url)},{id:"cue",name:"CUE",import:()=>ye(()=>Promise.resolve().then(()=>aTn),void 0,import.meta.url)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>ye(()=>Promise.resolve().then(()=>oTn),void 0,import.meta.url)},{id:"d",name:"D",import:()=>ye(()=>Promise.resolve().then(()=>lTn),void 0,import.meta.url)},{id:"dart",name:"Dart",import:()=>ye(()=>Promise.resolve().then(()=>pTn),void 0,import.meta.url)},{id:"dax",name:"DAX",import:()=>ye(()=>Promise.resolve().then(()=>gTn),void 0,import.meta.url)},{id:"desktop",name:"Desktop",import:()=>ye(()=>Promise.resolve().then(()=>bTn),void 0,import.meta.url)},{id:"diff",name:"Diff",import:()=>ye(()=>Promise.resolve().then(()=>wTn),void 0,import.meta.url)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>ye(()=>Promise.resolve().then(()=>xTn),void 0,import.meta.url)},{id:"dotenv",name:"dotEnv",import:()=>ye(()=>Promise.resolve().then(()=>_Tn),void 0,import.meta.url)},{id:"dream-maker",name:"Dream Maker",import:()=>ye(()=>Promise.resolve().then(()=>QTn),void 0,import.meta.url)},{id:"edge",name:"Edge",import:()=>ye(()=>Promise.resolve().then(()=>DTn),void 0,import.meta.url)},{id:"elixir",name:"Elixir",import:()=>ye(()=>Promise.resolve().then(()=>PTn),void 0,import.meta.url)},{id:"elm",name:"Elm",import:()=>ye(()=>Promise.resolve().then(()=>LTn),void 0,import.meta.url)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>ye(()=>Promise.resolve().then(()=>zTn),void 0,import.meta.url)},{id:"erb",name:"ERB",import:()=>ye(()=>Promise.resolve().then(()=>n8n),void 0,import.meta.url)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>ye(()=>Promise.resolve().then(()=>s8n),void 0,import.meta.url)},{id:"fennel",name:"Fennel",import:()=>ye(()=>Promise.resolve().then(()=>u8n),void 0,import.meta.url)},{id:"fish",name:"Fish",import:()=>ye(()=>Promise.resolve().then(()=>A8n),void 0,import.meta.url)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>ye(()=>Promise.resolve().then(()=>h8n),void 0,import.meta.url)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>ye(()=>Promise.resolve().then(()=>v8n),void 0,import.meta.url)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>ye(()=>Promise.resolve().then(()=>b8n),void 0,import.meta.url)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>ye(()=>Promise.resolve().then(()=>O8n),void 0,import.meta.url)},{id:"gdresource",name:"GDResource",import:()=>ye(()=>Promise.resolve().then(()=>I8n),void 0,import.meta.url)},{id:"gdscript",name:"GDScript",import:()=>ye(()=>Promise.resolve().then(()=>E8n),void 0,import.meta.url)},{id:"gdshader",name:"GDShader",import:()=>ye(()=>Promise.resolve().then(()=>_8n),void 0,import.meta.url)},{id:"genie",name:"Genie",import:()=>ye(()=>Promise.resolve().then(()=>T8n),void 0,import.meta.url)},{id:"gherkin",name:"Gherkin",import:()=>ye(()=>Promise.resolve().then(()=>R8n),void 0,import.meta.url)},{id:"git-commit",name:"Git Commit Message",import:()=>ye(()=>Promise.resolve().then(()=>M8n),void 0,import.meta.url)},{id:"git-rebase",name:"Git Rebase Message",import:()=>ye(()=>Promise.resolve().then(()=>j8n),void 0,import.meta.url)},{id:"gleam",name:"Gleam",import:()=>ye(()=>Promise.resolve().then(()=>H8n),void 0,import.meta.url)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>ye(()=>Promise.resolve().then(()=>X8n),void 0,import.meta.url)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>ye(()=>Promise.resolve().then(()=>K8n),void 0,import.meta.url)},{id:"glsl",name:"GLSL",import:()=>ye(()=>Promise.resolve().then(()=>M5n),void 0,import.meta.url)},{id:"gnuplot",name:"Gnuplot",import:()=>ye(()=>Promise.resolve().then(()=>tPn),void 0,import.meta.url)},{id:"go",name:"Go",import:()=>ye(()=>Promise.resolve().then(()=>aPn),void 0,import.meta.url)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>ye(()=>Promise.resolve().then(()=>WTn),void 0,import.meta.url)},{id:"groovy",name:"Groovy",import:()=>ye(()=>Promise.resolve().then(()=>oPn),void 0,import.meta.url)},{id:"hack",name:"Hack",import:()=>ye(()=>Promise.resolve().then(()=>lPn),void 0,import.meta.url)},{id:"haml",name:"Ruby Haml",import:()=>ye(()=>Promise.resolve().then(()=>jTn),void 0,import.meta.url)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>ye(()=>Promise.resolve().then(()=>pPn),void 0,import.meta.url)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>ye(()=>Promise.resolve().then(()=>gPn),void 0,import.meta.url)},{id:"haxe",name:"Haxe",import:()=>ye(()=>Promise.resolve().then(()=>fPn),void 0,import.meta.url)},{id:"hcl",name:"HashiCorp HCL",import:()=>ye(()=>Promise.resolve().then(()=>wPn),void 0,import.meta.url)},{id:"hjson",name:"Hjson",import:()=>ye(()=>Promise.resolve().then(()=>xPn),void 0,import.meta.url)},{id:"hlsl",name:"HLSL",import:()=>ye(()=>Promise.resolve().then(()=>CPn),void 0,import.meta.url)},{id:"html",name:"HTML",import:()=>ye(()=>Promise.resolve().then(()=>O$n),void 0,import.meta.url)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>ye(()=>Promise.resolve().then(()=>U3n),void 0,import.meta.url)},{id:"http",name:"HTTP",import:()=>ye(()=>Promise.resolve().then(()=>EPn),void 0,import.meta.url)},{id:"hxml",name:"HXML",import:()=>ye(()=>Promise.resolve().then(()=>IPn),void 0,import.meta.url)},{id:"hy",name:"Hy",import:()=>ye(()=>Promise.resolve().then(()=>TPn),void 0,import.meta.url)},{id:"imba",name:"Imba",import:()=>ye(()=>Promise.resolve().then(()=>RPn),void 0,import.meta.url)},{id:"ini",name:"INI",aliases:["properties"],import:()=>ye(()=>Promise.resolve().then(()=>MPn),void 0,import.meta.url)},{id:"java",name:"Java",import:()=>ye(()=>Promise.resolve().then(()=>W$n),void 0,import.meta.url)},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>ye(()=>Promise.resolve().then(()=>w$n),void 0,import.meta.url)},{id:"jinja",name:"Jinja",import:()=>ye(()=>Promise.resolve().then(()=>GPn),void 0,import.meta.url)},{id:"jison",name:"Jison",import:()=>ye(()=>Promise.resolve().then(()=>YPn),void 0,import.meta.url)},{id:"json",name:"JSON",import:()=>ye(()=>Promise.resolve().then(()=>Z$n),void 0,import.meta.url)},{id:"json5",name:"JSON5",import:()=>ye(()=>Promise.resolve().then(()=>ZPn),void 0,import.meta.url)},{id:"jsonc",name:"JSON with Comments",import:()=>ye(()=>Promise.resolve().then(()=>e6n),void 0,import.meta.url)},{id:"jsonl",name:"JSON Lines",import:()=>ye(()=>Promise.resolve().then(()=>a6n),void 0,import.meta.url)},{id:"jsonnet",name:"Jsonnet",import:()=>ye(()=>Promise.resolve().then(()=>o6n),void 0,import.meta.url)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>ye(()=>Promise.resolve().then(()=>l6n),void 0,import.meta.url)},{id:"jsx",name:"JSX",import:()=>ye(()=>Promise.resolve().then(()=>GTn),void 0,import.meta.url)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>ye(()=>Promise.resolve().then(()=>m6n),void 0,import.meta.url)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>ye(()=>Promise.resolve().then(()=>f6n),void 0,import.meta.url)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>ye(()=>Promise.resolve().then(()=>w6n),void 0,import.meta.url)},{id:"latex",name:"LaTeX",import:()=>ye(()=>Promise.resolve().then(()=>C6n),void 0,import.meta.url)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>ye(()=>Promise.resolve().then(()=>E6n),void 0,import.meta.url)},{id:"less",name:"Less",import:()=>ye(()=>Promise.resolve().then(()=>S6n),void 0,import.meta.url)},{id:"liquid",name:"Liquid",import:()=>ye(()=>Promise.resolve().then(()=>$6n),void 0,import.meta.url)},{id:"llvm",name:"LLVM IR",import:()=>ye(()=>Promise.resolve().then(()=>F6n),void 0,import.meta.url)},{id:"log",name:"Log file",import:()=>ye(()=>Promise.resolve().then(()=>N6n),void 0,import.meta.url)},{id:"logo",name:"Logo",import:()=>ye(()=>Promise.resolve().then(()=>q6n),void 0,import.meta.url)},{id:"lua",name:"Lua",import:()=>ye(()=>Promise.resolve().then(()=>XTn),void 0,import.meta.url)},{id:"luau",name:"Luau",import:()=>ye(()=>Promise.resolve().then(()=>G6n),void 0,import.meta.url)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>ye(()=>Promise.resolve().then(()=>Y6n),void 0,import.meta.url)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>ye(()=>Promise.resolve().then(()=>r8n),void 0,import.meta.url)},{id:"marko",name:"Marko",import:()=>ye(()=>Promise.resolve().then(()=>Z6n),void 0,import.meta.url)},{id:"matlab",name:"MATLAB",import:()=>ye(()=>Promise.resolve().then(()=>eFn),void 0,import.meta.url)},{id:"mdc",name:"MDC",import:()=>ye(()=>Promise.resolve().then(()=>aFn),void 0,import.meta.url)},{id:"mdx",name:"MDX",import:()=>ye(()=>Promise.resolve().then(()=>oFn),void 0,import.meta.url)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>ye(()=>Promise.resolve().then(()=>lFn),void 0,import.meta.url)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>ye(()=>Promise.resolve().then(()=>pFn),void 0,import.meta.url)},{id:"mojo",name:"Mojo",import:()=>ye(()=>Promise.resolve().then(()=>gFn),void 0,import.meta.url)},{id:"move",name:"Move",import:()=>ye(()=>Promise.resolve().then(()=>bFn),void 0,import.meta.url)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>ye(()=>Promise.resolve().then(()=>vFn),void 0,import.meta.url)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>ye(()=>Promise.resolve().then(()=>OFn),void 0,import.meta.url)},{id:"nginx",name:"Nginx",import:()=>ye(()=>Promise.resolve().then(()=>BFn),void 0,import.meta.url)},{id:"nim",name:"Nim",import:()=>ye(()=>Promise.resolve().then(()=>SFn),void 0,import.meta.url)},{id:"nix",name:"Nix",import:()=>ye(()=>Promise.resolve().then(()=>$Fn),void 0,import.meta.url)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>ye(()=>Promise.resolve().then(()=>FFn),void 0,import.meta.url)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>ye(()=>Promise.resolve().then(()=>NFn),void 0,import.meta.url)},{id:"objective-cpp",name:"Objective-C++",import:()=>ye(()=>Promise.resolve().then(()=>qFn),void 0,import.meta.url)},{id:"ocaml",name:"OCaml",import:()=>ye(()=>Promise.resolve().then(()=>GFn),void 0,import.meta.url)},{id:"pascal",name:"Pascal",import:()=>ye(()=>Promise.resolve().then(()=>YFn),void 0,import.meta.url)},{id:"perl",name:"Perl",import:()=>ye(()=>Promise.resolve().then(()=>ZFn),void 0,import.meta.url)},{id:"php",name:"PHP",import:()=>ye(()=>Promise.resolve().then(()=>JFn),void 0,import.meta.url)},{id:"plsql",name:"PL/SQL",import:()=>ye(()=>Promise.resolve().then(()=>n9n),void 0,import.meta.url)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>ye(()=>Promise.resolve().then(()=>i9n),void 0,import.meta.url)},{id:"polar",name:"Polar",import:()=>ye(()=>Promise.resolve().then(()=>c9n),void 0,import.meta.url)},{id:"postcss",name:"PostCSS",import:()=>ye(()=>Promise.resolve().then(()=>h3n),void 0,import.meta.url)},{id:"powerquery",name:"PowerQuery",import:()=>ye(()=>Promise.resolve().then(()=>d9n),void 0,import.meta.url)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>ye(()=>Promise.resolve().then(()=>m9n),void 0,import.meta.url)},{id:"prisma",name:"Prisma",import:()=>ye(()=>Promise.resolve().then(()=>f9n),void 0,import.meta.url)},{id:"prolog",name:"Prolog",import:()=>ye(()=>Promise.resolve().then(()=>w9n),void 0,import.meta.url)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>ye(()=>Promise.resolve().then(()=>x9n),void 0,import.meta.url)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>ye(()=>Promise.resolve().then(()=>_9n),void 0,import.meta.url)},{id:"puppet",name:"Puppet",import:()=>ye(()=>Promise.resolve().then(()=>Q9n),void 0,import.meta.url)},{id:"purescript",name:"PureScript",import:()=>ye(()=>Promise.resolve().then(()=>D9n),void 0,import.meta.url)},{id:"python",name:"Python",aliases:["py"],import:()=>ye(()=>Promise.resolve().then(()=>s5n),void 0,import.meta.url)},{id:"qml",name:"QML",import:()=>ye(()=>Promise.resolve().then(()=>P9n),void 0,import.meta.url)},{id:"qmldir",name:"QML Directory",import:()=>ye(()=>Promise.resolve().then(()=>L9n),void 0,import.meta.url)},{id:"qss",name:"Qt Style Sheets",import:()=>ye(()=>Promise.resolve().then(()=>z9n),void 0,import.meta.url)},{id:"r",name:"R",import:()=>ye(()=>Promise.resolve().then(()=>d6n),void 0,import.meta.url)},{id:"racket",name:"Racket",import:()=>ye(()=>Promise.resolve().then(()=>U9n),void 0,import.meta.url)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>ye(()=>Promise.resolve().then(()=>W9n),void 0,import.meta.url)},{id:"razor",name:"ASP.NET Razor",import:()=>ye(()=>Promise.resolve().then(()=>V9n),void 0,import.meta.url)},{id:"reg",name:"Windows Registry Script",import:()=>ye(()=>Promise.resolve().then(()=>J9n),void 0,import.meta.url)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>ye(()=>Promise.resolve().then(()=>L5n),void 0,import.meta.url)},{id:"rel",name:"Rel",import:()=>ye(()=>Promise.resolve().then(()=>nRn),void 0,import.meta.url)},{id:"riscv",name:"RISC-V",import:()=>ye(()=>Promise.resolve().then(()=>iRn),void 0,import.meta.url)},{id:"rst",name:"reStructuredText",import:()=>ye(()=>Promise.resolve().then(()=>cRn),void 0,import.meta.url)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>ye(()=>Promise.resolve().then(()=>JTn),void 0,import.meta.url)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>ye(()=>Promise.resolve().then(()=>dRn),void 0,import.meta.url)},{id:"sas",name:"SAS",import:()=>ye(()=>Promise.resolve().then(()=>mRn),void 0,import.meta.url)},{id:"sass",name:"Sass",import:()=>ye(()=>Promise.resolve().then(()=>fRn),void 0,import.meta.url)},{id:"scala",name:"Scala",import:()=>ye(()=>Promise.resolve().then(()=>wRn),void 0,import.meta.url)},{id:"scheme",name:"Scheme",import:()=>ye(()=>Promise.resolve().then(()=>xRn),void 0,import.meta.url)},{id:"scss",name:"SCSS",import:()=>ye(()=>Promise.resolve().then(()=>D$n),void 0,import.meta.url)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>ye(()=>Promise.resolve().then(()=>Z3n),void 0,import.meta.url)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>ye(()=>Promise.resolve().then(()=>_Rn),void 0,import.meta.url)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>ye(()=>Promise.resolve().then(()=>H5n),void 0,import.meta.url)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>ye(()=>Promise.resolve().then(()=>QRn),void 0,import.meta.url)},{id:"smalltalk",name:"Smalltalk",import:()=>ye(()=>Promise.resolve().then(()=>DRn),void 0,import.meta.url)},{id:"solidity",name:"Solidity",import:()=>ye(()=>Promise.resolve().then(()=>PRn),void 0,import.meta.url)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>ye(()=>Promise.resolve().then(()=>LRn),void 0,import.meta.url)},{id:"sparql",name:"SPARQL",import:()=>ye(()=>Promise.resolve().then(()=>jRn),void 0,import.meta.url)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>ye(()=>Promise.resolve().then(()=>HRn),void 0,import.meta.url)},{id:"sql",name:"SQL",import:()=>ye(()=>Promise.resolve().then(()=>H3n),void 0,import.meta.url)},{id:"ssh-config",name:"SSH Config",import:()=>ye(()=>Promise.resolve().then(()=>XRn),void 0,import.meta.url)},{id:"stata",name:"Stata",import:()=>ye(()=>Promise.resolve().then(()=>KRn),void 0,import.meta.url)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>ye(()=>Promise.resolve().then(()=>eLn),void 0,import.meta.url)},{id:"svelte",name:"Svelte",import:()=>ye(()=>Promise.resolve().then(()=>aLn),void 0,import.meta.url)},{id:"swift",name:"Swift",import:()=>ye(()=>Promise.resolve().then(()=>oLn),void 0,import.meta.url)},{id:"system-verilog",name:"SystemVerilog",import:()=>ye(()=>Promise.resolve().then(()=>lLn),void 0,import.meta.url)},{id:"systemd",name:"Systemd Units",import:()=>ye(()=>Promise.resolve().then(()=>pLn),void 0,import.meta.url)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>ye(()=>Promise.resolve().then(()=>gLn),void 0,import.meta.url)},{id:"tasl",name:"Tasl",import:()=>ye(()=>Promise.resolve().then(()=>bLn),void 0,import.meta.url)},{id:"tcl",name:"Tcl",import:()=>ye(()=>Promise.resolve().then(()=>vLn),void 0,import.meta.url)},{id:"templ",name:"Templ",import:()=>ye(()=>Promise.resolve().then(()=>OLn),void 0,import.meta.url)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>ye(()=>Promise.resolve().then(()=>BLn),void 0,import.meta.url)},{id:"tex",name:"TeX",import:()=>ye(()=>Promise.resolve().then(()=>k6n),void 0,import.meta.url)},{id:"toml",name:"TOML",import:()=>ye(()=>Promise.resolve().then(()=>SLn),void 0,import.meta.url)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>ye(()=>Promise.resolve().then(()=>jLn),void 0,import.meta.url)},{id:"tsv",name:"TSV",import:()=>ye(()=>Promise.resolve().then(()=>HLn),void 0,import.meta.url)},{id:"tsx",name:"TSX",import:()=>ye(()=>Promise.resolve().then(()=>b3n),void 0,import.meta.url)},{id:"turtle",name:"Turtle",import:()=>ye(()=>Promise.resolve().then(()=>MRn),void 0,import.meta.url)},{id:"twig",name:"Twig",import:()=>ye(()=>Promise.resolve().then(()=>XLn),void 0,import.meta.url)},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>ye(()=>Promise.resolve().then(()=>m3n),void 0,import.meta.url)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>ye(()=>Promise.resolve().then(()=>KLn),void 0,import.meta.url)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>ye(()=>Promise.resolve().then(()=>t7n),void 0,import.meta.url)},{id:"v",name:"V",import:()=>ye(()=>Promise.resolve().then(()=>r7n),void 0,import.meta.url)},{id:"vala",name:"Vala",import:()=>ye(()=>Promise.resolve().then(()=>s7n),void 0,import.meta.url)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>ye(()=>Promise.resolve().then(()=>u7n),void 0,import.meta.url)},{id:"verilog",name:"Verilog",import:()=>ye(()=>Promise.resolve().then(()=>A7n),void 0,import.meta.url)},{id:"vhdl",name:"VHDL",import:()=>ye(()=>Promise.resolve().then(()=>h7n),void 0,import.meta.url)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>ye(()=>Promise.resolve().then(()=>y7n),void 0,import.meta.url)},{id:"vue",name:"Vue",import:()=>ye(()=>Promise.resolve().then(()=>Q7n),void 0,import.meta.url)},{id:"vue-html",name:"Vue HTML",import:()=>ye(()=>Promise.resolve().then(()=>D7n),void 0,import.meta.url)},{id:"vue-vine",name:"Vue Vine",import:()=>ye(()=>Promise.resolve().then(()=>P7n),void 0,import.meta.url)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>ye(()=>Promise.resolve().then(()=>L7n),void 0,import.meta.url)},{id:"wasm",name:"WebAssembly",import:()=>ye(()=>Promise.resolve().then(()=>z7n),void 0,import.meta.url)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>ye(()=>Promise.resolve().then(()=>U7n),void 0,import.meta.url)},{id:"wgsl",name:"WGSL",import:()=>ye(()=>Promise.resolve().then(()=>W7n),void 0,import.meta.url)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>ye(()=>Promise.resolve().then(()=>V7n),void 0,import.meta.url)},{id:"wit",name:"WebAssembly Interface Types",import:()=>ye(()=>Promise.resolve().then(()=>J7n),void 0,import.meta.url)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>ye(()=>Promise.resolve().then(()=>nNn),void 0,import.meta.url)},{id:"xml",name:"XML",import:()=>ye(()=>Promise.resolve().then(()=>X$n),void 0,import.meta.url)},{id:"xsl",name:"XSL",import:()=>ye(()=>Promise.resolve().then(()=>iNn),void 0,import.meta.url)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>ye(()=>Promise.resolve().then(()=>ZTn),void 0,import.meta.url)},{id:"zenscript",name:"ZenScript",import:()=>ye(()=>Promise.resolve().then(()=>cNn),void 0,import.meta.url)},{id:"zig",name:"Zig",import:()=>ye(()=>Promise.resolve().then(()=>dNn),void 0,import.meta.url)}],j_t=Object.fromEntries(r9e.map(t=>[t.id,t.import])),U_t=Object.fromEntries(r9e.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),G_t={...j_t,...U_t},H_t=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>ANn),void 0,import.meta.url)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>gNn),void 0,import.meta.url)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>fNn),void 0,import.meta.url)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>yNn),void 0,import.meta.url)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>vNn),void 0,import.meta.url)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>xNn),void 0,import.meta.url)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>CNn),void 0,import.meta.url)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>BNn),void 0,import.meta.url)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>QNn),void 0,import.meta.url)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>INn),void 0,import.meta.url)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>$Nn),void 0,import.meta.url)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>PNn),void 0,import.meta.url)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>RNn),void 0,import.meta.url)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>NNn),void 0,import.meta.url)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>zNn),void 0,import.meta.url)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>jNn),void 0,import.meta.url)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>GNn),void 0,import.meta.url)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>WNn),void 0,import.meta.url)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>XNn),void 0,import.meta.url)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>ZNn),void 0,import.meta.url)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>JNn),void 0,import.meta.url)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>tMn),void 0,import.meta.url)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>aMn),void 0,import.meta.url)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>iMn),void 0,import.meta.url)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>sMn),void 0,import.meta.url)},{id:"houston",displayName:"Houston",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>lMn),void 0,import.meta.url)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>dMn),void 0,import.meta.url)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>AMn),void 0,import.meta.url)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>gMn),void 0,import.meta.url)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>fMn),void 0,import.meta.url)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>yMn),void 0,import.meta.url)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>vMn),void 0,import.meta.url)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>xMn),void 0,import.meta.url)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>CMn),void 0,import.meta.url)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>BMn),void 0,import.meta.url)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>QMn),void 0,import.meta.url)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>IMn),void 0,import.meta.url)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>$Mn),void 0,import.meta.url)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>PMn),void 0,import.meta.url)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>RMn),void 0,import.meta.url)},{id:"nord",displayName:"Nord",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>NMn),void 0,import.meta.url)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>zMn),void 0,import.meta.url)},{id:"one-light",displayName:"One Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>jMn),void 0,import.meta.url)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>GMn),void 0,import.meta.url)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>WMn),void 0,import.meta.url)},{id:"red",displayName:"Red",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>XMn),void 0,import.meta.url)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>ZMn),void 0,import.meta.url)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>JMn),void 0,import.meta.url)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>tzn),void 0,import.meta.url)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>azn),void 0,import.meta.url)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>izn),void 0,import.meta.url)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>szn),void 0,import.meta.url)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>lzn),void 0,import.meta.url)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>dzn),void 0,import.meta.url)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>Azn),void 0,import.meta.url)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>gzn),void 0,import.meta.url)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>fzn),void 0,import.meta.url)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>yzn),void 0,import.meta.url)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>ye(()=>Promise.resolve().then(()=>vzn),void 0,import.meta.url)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>ye(()=>Promise.resolve().then(()=>xzn),void 0,import.meta.url)}],W_t=Object.fromEntries(H_t.map(t=>[t.id,t.import]));class koe extends Error{constructor(e){super(e),this.name="ShikiError"}}function Y_t(){return 2147483648}function X_t(){return typeof performance<"u"?performance.now():Date.now()}const V_t=(t,e)=>t+(e-t%e)%e;async function Z_t(t){let e,n;const a={};function r(m){n=m,a.HEAPU8=new Uint8Array(m),a.HEAPU32=new Uint32Array(m)}function i(m,g,h){a.HEAPU8.copyWithin(m,g,g+h)}function o(m){try{return e.grow(m-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}function s(m){const g=a.HEAPU8.length;m=m>>>0;const h=Y_t();if(m>h)return!1;for(let f=1;f<=4;f*=2){let b=g*(1+.2/f);b=Math.min(b,m+100663296);const y=Math.min(h,V_t(Math.max(m,b),65536));if(o(y))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(m,g,h=1024){const f=g+h;let b=g;for(;m[b]&&!(b>=f);)++b;if(b-g>16&&m.buffer&&l)return l.decode(m.subarray(g,b));let y="";for(;g>10,56320|_&1023)}}return y}function d(m,g){return m?u(a.HEAPU8,m,g):""}const p={emscripten_get_now:X_t,emscripten_memcpy_big:i,emscripten_resize_heap:s,fd_write:()=>0};async function A(){const g=await t({env:p,wasi_snapshot_preview1:p});e=g.memory,r(e.buffer),Object.assign(a,g),a.UTF8ToString=d}return await A(),a}var K_t=Object.defineProperty,J_t=(t,e,n)=>e in t?K_t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bc=(t,e,n)=>J_t(t,typeof e!="symbol"?e+"":e,n);let Hc=null;function eBt(t){throw new koe(t.UTF8ToString(t.getLastOnigError()))}class hM{constructor(e){bc(this,"utf16Length"),bc(this,"utf8Length"),bc(this,"utf16Value"),bc(this,"utf8Value"),bc(this,"utf16OffsetToUtf8"),bc(this,"utf8OffsetToUtf16");const n=e.length,a=hM._utf8ByteLength(e),r=a!==n,i=r?new Uint32Array(n+1):null;r&&(i[n]=a);const o=r?new Uint32Array(a+1):null;r&&(o[a]=n);const s=new Uint8Array(a);let l=0;for(let u=0;u=55296&&d<=56319&&u+1=56320&&m<=57343&&(p=(d-55296<<10)+65536|m-56320,A=!0)}r&&(i[u]=l,A&&(i[u+1]=l),p<=127?o[l+0]=u:p<=2047?(o[l+0]=u,o[l+1]=u):p<=65535?(o[l+0]=u,o[l+1]=u,o[l+2]=u):(o[l+0]=u,o[l+1]=u,o[l+2]=u,o[l+3]=u)),p<=127?s[l++]=p:p<=2047?(s[l++]=192|(p&1984)>>>6,s[l++]=128|(p&63)>>>0):p<=65535?(s[l++]=224|(p&61440)>>>12,s[l++]=128|(p&4032)>>>6,s[l++]=128|(p&63)>>>0):(s[l++]=240|(p&1835008)>>>18,s[l++]=128|(p&258048)>>>12,s[l++]=128|(p&4032)>>>6,s[l++]=128|(p&63)>>>0),A&&u++}this.utf16Length=n,this.utf8Length=a,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let a=0,r=e.length;a=55296&&i<=56319&&a+1=56320&&l<=57343&&(o=(i-55296<<10)+65536|l-56320,s=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,s&&a++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const fM=class nh{constructor(e){if(bc(this,"id",++nh.LAST_ID),bc(this,"_onigBinding"),bc(this,"content"),bc(this,"utf16Length"),bc(this,"utf8Length"),bc(this,"utf16OffsetToUtf8"),bc(this,"utf8OffsetToUtf16"),bc(this,"ptr"),!Hc)throw new koe("Must invoke loadWasm first.");this._onigBinding=Hc,this.content=e;const n=new hM(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!nh._sharedPtrInUse?(nh._sharedPtr||(nh._sharedPtr=Hc.omalloc(1e4)),nh._sharedPtrInUse=!0,Hc.HEAPU8.set(n.utf8Value,nh._sharedPtr),this.ptr=nh._sharedPtr):this.ptr=n.createString(Hc)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===nh._sharedPtr?nh._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};bc(fM,"LAST_ID",0);bc(fM,"_sharedPtr",0);bc(fM,"_sharedPtrInUse",!1);let i9e=fM;class tBt{constructor(e){if(bc(this,"_onigBinding"),bc(this,"_ptr"),!Hc)throw new koe("Must invoke loadWasm first.");const n=[],a=[];for(let s=0,l=e.length;s{let a=t;return a=await a,typeof a=="function"&&(a=await a(n)),typeof a=="function"&&(a=await a(n)),nBt(a)?a=await a.instantiator(n):aBt(a)?a=await a.default(n):(rBt(a)&&(a=a.data),iBt(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await cBt(a)(n):a=await lBt(a)(n):oBt(a)?a=await DU(a)(n):a instanceof WebAssembly.Module?a=await DU(a)(n):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await DU(a.default)(n))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return pT=e(),pT}function DU(t){return e=>WebAssembly.instantiate(t,e)}function cBt(t){return e=>WebAssembly.instantiateStreaming(t,e)}function lBt(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function uBt(t){return t&&await sBt(t),{createScanner(e){return new tBt(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new i9e(e)}}}const dBt=q_t({langs:G_t,themes:W_t,engine:()=>uBt(ye(()=>Promise.resolve().then(()=>Czn),void 0,import.meta.url))});class kp{constructor(e,n,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=a}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new kp(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}let Sh=class o9e{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new o9e(n,kp.range(this,e))}};class On{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,r,i,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,i=o.end,r===s.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ";var l=s.slice(r,i).replace(/[^]/g,"$&̲"),u;r>15?u="…"+s.slice(r-15,r):u=s.slice(0,r);var d;i+15":">","<":"<",'"':""","'":"'"},fBt=/[&><"']/g;function bBt(t){return String(t).replace(fBt,e=>hBt[e])}var s9e=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},yBt=function(e){var n=s9e(e);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},wBt=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},vBt=function(e){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},va={contains:pBt,deflt:ABt,escape:bBt,hyphenate:gBt,getBaseElem:s9e,isCharacterBox:yBt,protocolFromUrl:vBt},EI={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 "},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 ",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 ",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 ",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 ",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 ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function kBt(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class xoe{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 n in EI)if(EI.hasOwnProperty(n)){var a=EI[n];this[n]=e[n]!==void 0?a.processor?a.processor(e[n]):e[n]:kBt(a)}}reportNonstrict(e,n,a){var r=this.strict;if(typeof r=="function"&&(r=r(e,n,a)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new On("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),a);r==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,a){var r=this.strict;if(typeof r=="function")try{r=r(e,n,a)}catch{r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=va.protocolFromUrl(e.url);if(n==null)return!1;e.protocol=n}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}let Vy=class{constructor(e,n,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=n,this.cramped=a}sup(){return dh[xBt[this.id]]}sub(){return dh[OBt[this.id]]}fracNum(){return dh[CBt[this.id]]}fracDen(){return dh[_Bt[this.id]]}cramp(){return dh[BBt[this.id]]}text(){return dh[EBt[this.id]]}isTight(){return this.size>=2}};var Ooe=0,jR=1,w_=2,Fb=3,j4=4,LA=5,iB=6,Vu=7,dh=[new Vy(Ooe,0,!1),new Vy(jR,0,!0),new Vy(w_,1,!1),new Vy(Fb,1,!0),new Vy(j4,2,!1),new Vy(LA,2,!0),new Vy(iB,3,!1),new Vy(Vu,3,!0)],xBt=[j4,LA,j4,LA,iB,Vu,iB,Vu],OBt=[LA,LA,LA,LA,Vu,Vu,Vu,Vu],CBt=[w_,Fb,j4,LA,iB,Vu,iB,Vu],_Bt=[Fb,Fb,LA,LA,Vu,Vu,Vu,Vu],BBt=[jR,jR,Fb,Fb,LA,LA,Vu,Vu],EBt=[Ooe,jR,w_,Fb,w_,Fb,w_,Fb],Ia={DISPLAY:dh[Ooe],TEXT:dh[w_],SCRIPT:dh[j4],SCRIPTSCRIPT:dh[iB]},yK=[{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]]}];function QBt(t){for(var e=0;e=r[0]&&t<=r[1])return n.name}return null}var pF=[];yK.forEach(t=>t.blocks.forEach(e=>pF.push(...e)));function c9e(t){for(var e=0;e=pF[e]&&t<=pF[e+1])return!0;return!1}var DO=80,SBt=function(e,n){return"M95,"+(622+e+n)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.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 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},IBt=function(e,n){return"M263,"+(601+e+n)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},DBt=function(e,n){return"M983 "+(10+e+n)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},$Bt=function(e,n){return"M424,"+(2398+e+n)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-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 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+n+` h400000v`+(40+e)+"h-400000z"},TBt=function(e,n){return"M473,"+(2713+e+n)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-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 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+e)+" "+n+"h400000v"+(40+e)+"H1017.7z"},PBt=function(e){var n=e/2;return"M400000 "+e+" H0 L"+n+" 0 l65 45 L145 "+(e-80)+" H400000z"},FBt=function(e,n,a){var r=a-54-n-e;return"M702 "+(e+n)+"H400000"+(40+e)+` H742v`+r+`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 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+n+"H400000v"+(40+e)+"H742z"},RBt=function(e,n,a){n=1e3*n;var r="";switch(e){case"sqrtMain":r=SBt(n,DO);break;case"sqrtSize1":r=IBt(n,DO);break;case"sqrtSize2":r=DBt(n,DO);break;case"sqrtSize3":r=$Bt(n,DO);break;case"sqrtSize4":r=TBt(n,DO);break;case"sqrtTall":r=FBt(n,DO,a)}return r},LBt=function(e,n){switch(e){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},Bhe={doubleleftarrow:`M262 157 l10-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 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 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 c2 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 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 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -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 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 -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 -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 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-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 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 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 -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 c-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 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 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 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 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 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 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 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 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -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 -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 -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 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 -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 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 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 -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 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 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -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 -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 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 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-70-101l-7-8h399905v-40H95l7-8 c28.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 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-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 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 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 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.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 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 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 -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 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.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 60.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 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 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 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.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 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 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 -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 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 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 -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 -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 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -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 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.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 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -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 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 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 -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 -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 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 -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 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 m0 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 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 -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 -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 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 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 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-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 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 -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 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 M399960 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 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -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 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 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 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 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 c-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 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 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 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 -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 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 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -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 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 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 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 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -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 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -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 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-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 -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 -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 -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, -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, -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, -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, -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 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-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 s-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 121.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 s2.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 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-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 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 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-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 -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 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,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 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -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 c-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 M0 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 c1.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, 1c0,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, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 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 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -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 c-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 M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},NBt=function(e,n){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z M347 1759 V0 h-84 V1759 v`+n+" 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 c-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, -36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.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 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -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, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` c-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 c-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 c0,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 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -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.")}};class M${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 va.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(e).join("")}}var hh={"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]}},AT={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]},Ehe={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function l9e(t,e){hh[t]=e}function Coe(t,e,n){if(!hh[e])throw new Error("Font metrics not found for font: "+e+".");var a=t.charCodeAt(0),r=hh[e][a];if(!r&&t[0]in Ehe&&(a=Ehe[t[0]].charCodeAt(0),r=hh[e][a]),!r&&n==="text"&&c9e(a)&&(r=hh[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var $U={};function MBt(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!$U[e]){var n=$U[e]={cssEmPerMu:AT.quad[e]/18};for(var a in AT)AT.hasOwnProperty(a)&&(n[a]=AT[a][e])}return $U[e]}var zBt=[[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]],Qhe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],She=function(e,n){return n.size<2?e:zBt[e-1][n.size-1]};class sb{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||sb.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=Qhe[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={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 a in e)e.hasOwnProperty(a)&&(n[a]=e[a]);return new sb(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:She(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:Qhe[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=She(sb.BASESIZE,e);return this.size===n&&this.textSize===sb.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}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!==sb.BASESIZE?["sizing","reset-size"+this.size,"size"+sb.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=MBt(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}sb.BASESIZE=6;var wK={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},qBt={ex:!0,em:!0,mu:!0},u9e=function(e){return typeof e!="string"&&(e=e.unit),e in wK||e in qBt||e==="ex"},Lo=function(e,n){var a;if(e.unit in wK)a=wK[e.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(e.unit==="mu")a=n.fontMetrics().cssEmPerMu;else{var r;if(n.style.isTight()?r=n.havingStyle(n.style.text()):r=n,e.unit==="ex")a=r.fontMetrics().xHeight;else if(e.unit==="em")a=r.fontMetrics().quad;else throw new On("Invalid unit: '"+e.unit+"'");r!==n&&(a*=r.sizeMultiplier/n.sizeMultiplier)}return Math.min(e.number*a,n.maxSize)},Qn=function(e){return+e.toFixed(4)+"em"},vw=function(e){return e.filter(n=>n).join(" ")},d9e=function(e,n,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},n){n.style.isTight()&&this.classes.push("mtight");var r=n.getColor();r&&(this.style.color=r)}},p9e=function(e){var n=document.createElement(e);n.className=vw(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(n.style[a]=this.style[a]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,A9e=function(e){var n="<"+e;this.classes.length&&(n+=' class="'+va.escape(vw(this.classes))+'"');var a="";for(var r in this.style)this.style.hasOwnProperty(r)&&(a+=va.hyphenate(r)+":"+this.style[r]+";");a&&(n+=' style="'+va.escape(a)+'"');for(var i in this.attributes)if(this.attributes.hasOwnProperty(i)){if(jBt.test(i))throw new On("Invalid attribute name '"+i+"'");n+=" "+i+'="'+va.escape(this.attributes[i])+'"'}n+=">";for(var o=0;o",n};let z$=class{constructor(e,n,a,r){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,d9e.call(this,e,a,r),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return va.contains(this.classes,e)}toNode(){return p9e.call(this,"span")}toMarkup(){return A9e.call(this,"span")}},_oe=class{constructor(e,n,a,r){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,d9e.call(this,n,r),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return va.contains(this.classes,e)}toNode(){return p9e.call(this,"a")}toMarkup(){return A9e.call(this,"a")}};class UBt{constructor(e,n,a){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=n,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return va.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);return e}toMarkup(){var e=''+va.escape(this.alt)+'0&&(n=document.createElement("span"),n.style.marginRight=Qn(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=vw(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(n=n||document.createElement("span"),n.style[a]=this.style[a]);return n?(n.appendChild(e),n):e}toMarkup(){var e=!1,n="0&&(a+="margin-right:"+this.italic+"em;");for(var r in this.style)this.style.hasOwnProperty(r)&&(a+=va.hyphenate(r)+":"+this.style[r]+";");a&&(e=!0,n+=' style="'+va.escape(a)+'"');var i=va.escape(this.text);return e?(n+=">",n+=i,n+="",n):i}}class Jb{constructor(e,n){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=n||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&n.setAttribute(a,this.attributes[a]);for(var r=0;r':''}}class vK{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&n.setAttribute(a,this.attributes[a]);return n}toMarkup(){var e=" but got "+String(t)+".")}var WBt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},YBt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Ji={math:{},text:{}};function re(t,e,n,a,r,i){Ji[t][r]={font:e,group:n,replace:a},i&&a&&(Ji[t][a]=Ji[t][r])}var Ae="math",gn="text",Ce="main",tt="ams",Bo="accent-token",Yn="bin",dd="close",lE="inner",Qa="mathord",oc="op-token",Hp="open",bM="punct",rt="rel",By="spacing",mt="textord";re(Ae,Ce,rt,"≡","\\equiv",!0);re(Ae,Ce,rt,"≺","\\prec",!0);re(Ae,Ce,rt,"≻","\\succ",!0);re(Ae,Ce,rt,"∼","\\sim",!0);re(Ae,Ce,rt,"⊥","\\perp");re(Ae,Ce,rt,"⪯","\\preceq",!0);re(Ae,Ce,rt,"⪰","\\succeq",!0);re(Ae,Ce,rt,"≃","\\simeq",!0);re(Ae,Ce,rt,"∣","\\mid",!0);re(Ae,Ce,rt,"≪","\\ll",!0);re(Ae,Ce,rt,"≫","\\gg",!0);re(Ae,Ce,rt,"≍","\\asymp",!0);re(Ae,Ce,rt,"∥","\\parallel");re(Ae,Ce,rt,"⋈","\\bowtie",!0);re(Ae,Ce,rt,"⌣","\\smile",!0);re(Ae,Ce,rt,"⊑","\\sqsubseteq",!0);re(Ae,Ce,rt,"⊒","\\sqsupseteq",!0);re(Ae,Ce,rt,"≐","\\doteq",!0);re(Ae,Ce,rt,"⌢","\\frown",!0);re(Ae,Ce,rt,"∋","\\ni",!0);re(Ae,Ce,rt,"∝","\\propto",!0);re(Ae,Ce,rt,"⊢","\\vdash",!0);re(Ae,Ce,rt,"⊣","\\dashv",!0);re(Ae,Ce,rt,"∋","\\owns");re(Ae,Ce,bM,".","\\ldotp");re(Ae,Ce,bM,"⋅","\\cdotp");re(Ae,Ce,mt,"#","\\#");re(gn,Ce,mt,"#","\\#");re(Ae,Ce,mt,"&","\\&");re(gn,Ce,mt,"&","\\&");re(Ae,Ce,mt,"ℵ","\\aleph",!0);re(Ae,Ce,mt,"∀","\\forall",!0);re(Ae,Ce,mt,"ℏ","\\hbar",!0);re(Ae,Ce,mt,"∃","\\exists",!0);re(Ae,Ce,mt,"∇","\\nabla",!0);re(Ae,Ce,mt,"♭","\\flat",!0);re(Ae,Ce,mt,"ℓ","\\ell",!0);re(Ae,Ce,mt,"♮","\\natural",!0);re(Ae,Ce,mt,"♣","\\clubsuit",!0);re(Ae,Ce,mt,"℘","\\wp",!0);re(Ae,Ce,mt,"♯","\\sharp",!0);re(Ae,Ce,mt,"♢","\\diamondsuit",!0);re(Ae,Ce,mt,"ℜ","\\Re",!0);re(Ae,Ce,mt,"♡","\\heartsuit",!0);re(Ae,Ce,mt,"ℑ","\\Im",!0);re(Ae,Ce,mt,"♠","\\spadesuit",!0);re(Ae,Ce,mt,"§","\\S",!0);re(gn,Ce,mt,"§","\\S");re(Ae,Ce,mt,"¶","\\P",!0);re(gn,Ce,mt,"¶","\\P");re(Ae,Ce,mt,"†","\\dag");re(gn,Ce,mt,"†","\\dag");re(gn,Ce,mt,"†","\\textdagger");re(Ae,Ce,mt,"‡","\\ddag");re(gn,Ce,mt,"‡","\\ddag");re(gn,Ce,mt,"‡","\\textdaggerdbl");re(Ae,Ce,dd,"⎱","\\rmoustache",!0);re(Ae,Ce,Hp,"⎰","\\lmoustache",!0);re(Ae,Ce,dd,"⟯","\\rgroup",!0);re(Ae,Ce,Hp,"⟮","\\lgroup",!0);re(Ae,Ce,Yn,"∓","\\mp",!0);re(Ae,Ce,Yn,"⊖","\\ominus",!0);re(Ae,Ce,Yn,"⊎","\\uplus",!0);re(Ae,Ce,Yn,"⊓","\\sqcap",!0);re(Ae,Ce,Yn,"∗","\\ast");re(Ae,Ce,Yn,"⊔","\\sqcup",!0);re(Ae,Ce,Yn,"◯","\\bigcirc",!0);re(Ae,Ce,Yn,"∙","\\bullet",!0);re(Ae,Ce,Yn,"‡","\\ddagger");re(Ae,Ce,Yn,"≀","\\wr",!0);re(Ae,Ce,Yn,"⨿","\\amalg");re(Ae,Ce,Yn,"&","\\And");re(Ae,Ce,rt,"⟵","\\longleftarrow",!0);re(Ae,Ce,rt,"⇐","\\Leftarrow",!0);re(Ae,Ce,rt,"⟸","\\Longleftarrow",!0);re(Ae,Ce,rt,"⟶","\\longrightarrow",!0);re(Ae,Ce,rt,"⇒","\\Rightarrow",!0);re(Ae,Ce,rt,"⟹","\\Longrightarrow",!0);re(Ae,Ce,rt,"↔","\\leftrightarrow",!0);re(Ae,Ce,rt,"⟷","\\longleftrightarrow",!0);re(Ae,Ce,rt,"⇔","\\Leftrightarrow",!0);re(Ae,Ce,rt,"⟺","\\Longleftrightarrow",!0);re(Ae,Ce,rt,"↦","\\mapsto",!0);re(Ae,Ce,rt,"⟼","\\longmapsto",!0);re(Ae,Ce,rt,"↗","\\nearrow",!0);re(Ae,Ce,rt,"↩","\\hookleftarrow",!0);re(Ae,Ce,rt,"↪","\\hookrightarrow",!0);re(Ae,Ce,rt,"↘","\\searrow",!0);re(Ae,Ce,rt,"↼","\\leftharpoonup",!0);re(Ae,Ce,rt,"⇀","\\rightharpoonup",!0);re(Ae,Ce,rt,"↙","\\swarrow",!0);re(Ae,Ce,rt,"↽","\\leftharpoondown",!0);re(Ae,Ce,rt,"⇁","\\rightharpoondown",!0);re(Ae,Ce,rt,"↖","\\nwarrow",!0);re(Ae,Ce,rt,"⇌","\\rightleftharpoons",!0);re(Ae,tt,rt,"≮","\\nless",!0);re(Ae,tt,rt,"","\\@nleqslant");re(Ae,tt,rt,"","\\@nleqq");re(Ae,tt,rt,"⪇","\\lneq",!0);re(Ae,tt,rt,"≨","\\lneqq",!0);re(Ae,tt,rt,"","\\@lvertneqq");re(Ae,tt,rt,"⋦","\\lnsim",!0);re(Ae,tt,rt,"⪉","\\lnapprox",!0);re(Ae,tt,rt,"⊀","\\nprec",!0);re(Ae,tt,rt,"⋠","\\npreceq",!0);re(Ae,tt,rt,"⋨","\\precnsim",!0);re(Ae,tt,rt,"⪹","\\precnapprox",!0);re(Ae,tt,rt,"≁","\\nsim",!0);re(Ae,tt,rt,"","\\@nshortmid");re(Ae,tt,rt,"∤","\\nmid",!0);re(Ae,tt,rt,"⊬","\\nvdash",!0);re(Ae,tt,rt,"⊭","\\nvDash",!0);re(Ae,tt,rt,"⋪","\\ntriangleleft");re(Ae,tt,rt,"⋬","\\ntrianglelefteq",!0);re(Ae,tt,rt,"⊊","\\subsetneq",!0);re(Ae,tt,rt,"","\\@varsubsetneq");re(Ae,tt,rt,"⫋","\\subsetneqq",!0);re(Ae,tt,rt,"","\\@varsubsetneqq");re(Ae,tt,rt,"≯","\\ngtr",!0);re(Ae,tt,rt,"","\\@ngeqslant");re(Ae,tt,rt,"","\\@ngeqq");re(Ae,tt,rt,"⪈","\\gneq",!0);re(Ae,tt,rt,"≩","\\gneqq",!0);re(Ae,tt,rt,"","\\@gvertneqq");re(Ae,tt,rt,"⋧","\\gnsim",!0);re(Ae,tt,rt,"⪊","\\gnapprox",!0);re(Ae,tt,rt,"⊁","\\nsucc",!0);re(Ae,tt,rt,"⋡","\\nsucceq",!0);re(Ae,tt,rt,"⋩","\\succnsim",!0);re(Ae,tt,rt,"⪺","\\succnapprox",!0);re(Ae,tt,rt,"≆","\\ncong",!0);re(Ae,tt,rt,"","\\@nshortparallel");re(Ae,tt,rt,"∦","\\nparallel",!0);re(Ae,tt,rt,"⊯","\\nVDash",!0);re(Ae,tt,rt,"⋫","\\ntriangleright");re(Ae,tt,rt,"⋭","\\ntrianglerighteq",!0);re(Ae,tt,rt,"","\\@nsupseteqq");re(Ae,tt,rt,"⊋","\\supsetneq",!0);re(Ae,tt,rt,"","\\@varsupsetneq");re(Ae,tt,rt,"⫌","\\supsetneqq",!0);re(Ae,tt,rt,"","\\@varsupsetneqq");re(Ae,tt,rt,"⊮","\\nVdash",!0);re(Ae,tt,rt,"⪵","\\precneqq",!0);re(Ae,tt,rt,"⪶","\\succneqq",!0);re(Ae,tt,rt,"","\\@nsubseteqq");re(Ae,tt,Yn,"⊴","\\unlhd");re(Ae,tt,Yn,"⊵","\\unrhd");re(Ae,tt,rt,"↚","\\nleftarrow",!0);re(Ae,tt,rt,"↛","\\nrightarrow",!0);re(Ae,tt,rt,"⇍","\\nLeftarrow",!0);re(Ae,tt,rt,"⇏","\\nRightarrow",!0);re(Ae,tt,rt,"↮","\\nleftrightarrow",!0);re(Ae,tt,rt,"⇎","\\nLeftrightarrow",!0);re(Ae,tt,rt,"△","\\vartriangle");re(Ae,tt,mt,"ℏ","\\hslash");re(Ae,tt,mt,"▽","\\triangledown");re(Ae,tt,mt,"◊","\\lozenge");re(Ae,tt,mt,"Ⓢ","\\circledS");re(Ae,tt,mt,"®","\\circledR");re(gn,tt,mt,"®","\\circledR");re(Ae,tt,mt,"∡","\\measuredangle",!0);re(Ae,tt,mt,"∄","\\nexists");re(Ae,tt,mt,"℧","\\mho");re(Ae,tt,mt,"Ⅎ","\\Finv",!0);re(Ae,tt,mt,"⅁","\\Game",!0);re(Ae,tt,mt,"‵","\\backprime");re(Ae,tt,mt,"▲","\\blacktriangle");re(Ae,tt,mt,"▼","\\blacktriangledown");re(Ae,tt,mt,"■","\\blacksquare");re(Ae,tt,mt,"⧫","\\blacklozenge");re(Ae,tt,mt,"★","\\bigstar");re(Ae,tt,mt,"∢","\\sphericalangle",!0);re(Ae,tt,mt,"∁","\\complement",!0);re(Ae,tt,mt,"ð","\\eth",!0);re(gn,Ce,mt,"ð","ð");re(Ae,tt,mt,"╱","\\diagup");re(Ae,tt,mt,"╲","\\diagdown");re(Ae,tt,mt,"□","\\square");re(Ae,tt,mt,"□","\\Box");re(Ae,tt,mt,"◊","\\Diamond");re(Ae,tt,mt,"¥","\\yen",!0);re(gn,tt,mt,"¥","\\yen",!0);re(Ae,tt,mt,"✓","\\checkmark",!0);re(gn,tt,mt,"✓","\\checkmark");re(Ae,tt,mt,"ℶ","\\beth",!0);re(Ae,tt,mt,"ℸ","\\daleth",!0);re(Ae,tt,mt,"ℷ","\\gimel",!0);re(Ae,tt,mt,"ϝ","\\digamma",!0);re(Ae,tt,mt,"ϰ","\\varkappa");re(Ae,tt,Hp,"┌","\\@ulcorner",!0);re(Ae,tt,dd,"┐","\\@urcorner",!0);re(Ae,tt,Hp,"└","\\@llcorner",!0);re(Ae,tt,dd,"┘","\\@lrcorner",!0);re(Ae,tt,rt,"≦","\\leqq",!0);re(Ae,tt,rt,"⩽","\\leqslant",!0);re(Ae,tt,rt,"⪕","\\eqslantless",!0);re(Ae,tt,rt,"≲","\\lesssim",!0);re(Ae,tt,rt,"⪅","\\lessapprox",!0);re(Ae,tt,rt,"≊","\\approxeq",!0);re(Ae,tt,Yn,"⋖","\\lessdot");re(Ae,tt,rt,"⋘","\\lll",!0);re(Ae,tt,rt,"≶","\\lessgtr",!0);re(Ae,tt,rt,"⋚","\\lesseqgtr",!0);re(Ae,tt,rt,"⪋","\\lesseqqgtr",!0);re(Ae,tt,rt,"≑","\\doteqdot");re(Ae,tt,rt,"≓","\\risingdotseq",!0);re(Ae,tt,rt,"≒","\\fallingdotseq",!0);re(Ae,tt,rt,"∽","\\backsim",!0);re(Ae,tt,rt,"⋍","\\backsimeq",!0);re(Ae,tt,rt,"⫅","\\subseteqq",!0);re(Ae,tt,rt,"⋐","\\Subset",!0);re(Ae,tt,rt,"⊏","\\sqsubset",!0);re(Ae,tt,rt,"≼","\\preccurlyeq",!0);re(Ae,tt,rt,"⋞","\\curlyeqprec",!0);re(Ae,tt,rt,"≾","\\precsim",!0);re(Ae,tt,rt,"⪷","\\precapprox",!0);re(Ae,tt,rt,"⊲","\\vartriangleleft");re(Ae,tt,rt,"⊴","\\trianglelefteq");re(Ae,tt,rt,"⊨","\\vDash",!0);re(Ae,tt,rt,"⊪","\\Vvdash",!0);re(Ae,tt,rt,"⌣","\\smallsmile");re(Ae,tt,rt,"⌢","\\smallfrown");re(Ae,tt,rt,"≏","\\bumpeq",!0);re(Ae,tt,rt,"≎","\\Bumpeq",!0);re(Ae,tt,rt,"≧","\\geqq",!0);re(Ae,tt,rt,"⩾","\\geqslant",!0);re(Ae,tt,rt,"⪖","\\eqslantgtr",!0);re(Ae,tt,rt,"≳","\\gtrsim",!0);re(Ae,tt,rt,"⪆","\\gtrapprox",!0);re(Ae,tt,Yn,"⋗","\\gtrdot");re(Ae,tt,rt,"⋙","\\ggg",!0);re(Ae,tt,rt,"≷","\\gtrless",!0);re(Ae,tt,rt,"⋛","\\gtreqless",!0);re(Ae,tt,rt,"⪌","\\gtreqqless",!0);re(Ae,tt,rt,"≖","\\eqcirc",!0);re(Ae,tt,rt,"≗","\\circeq",!0);re(Ae,tt,rt,"≜","\\triangleq",!0);re(Ae,tt,rt,"∼","\\thicksim");re(Ae,tt,rt,"≈","\\thickapprox");re(Ae,tt,rt,"⫆","\\supseteqq",!0);re(Ae,tt,rt,"⋑","\\Supset",!0);re(Ae,tt,rt,"⊐","\\sqsupset",!0);re(Ae,tt,rt,"≽","\\succcurlyeq",!0);re(Ae,tt,rt,"⋟","\\curlyeqsucc",!0);re(Ae,tt,rt,"≿","\\succsim",!0);re(Ae,tt,rt,"⪸","\\succapprox",!0);re(Ae,tt,rt,"⊳","\\vartriangleright");re(Ae,tt,rt,"⊵","\\trianglerighteq");re(Ae,tt,rt,"⊩","\\Vdash",!0);re(Ae,tt,rt,"∣","\\shortmid");re(Ae,tt,rt,"∥","\\shortparallel");re(Ae,tt,rt,"≬","\\between",!0);re(Ae,tt,rt,"⋔","\\pitchfork",!0);re(Ae,tt,rt,"∝","\\varpropto");re(Ae,tt,rt,"◀","\\blacktriangleleft");re(Ae,tt,rt,"∴","\\therefore",!0);re(Ae,tt,rt,"∍","\\backepsilon");re(Ae,tt,rt,"▶","\\blacktriangleright");re(Ae,tt,rt,"∵","\\because",!0);re(Ae,tt,rt,"⋘","\\llless");re(Ae,tt,rt,"⋙","\\gggtr");re(Ae,tt,Yn,"⊲","\\lhd");re(Ae,tt,Yn,"⊳","\\rhd");re(Ae,tt,rt,"≂","\\eqsim",!0);re(Ae,Ce,rt,"⋈","\\Join");re(Ae,tt,rt,"≑","\\Doteq",!0);re(Ae,tt,Yn,"∔","\\dotplus",!0);re(Ae,tt,Yn,"∖","\\smallsetminus");re(Ae,tt,Yn,"⋒","\\Cap",!0);re(Ae,tt,Yn,"⋓","\\Cup",!0);re(Ae,tt,Yn,"⩞","\\doublebarwedge",!0);re(Ae,tt,Yn,"⊟","\\boxminus",!0);re(Ae,tt,Yn,"⊞","\\boxplus",!0);re(Ae,tt,Yn,"⋇","\\divideontimes",!0);re(Ae,tt,Yn,"⋉","\\ltimes",!0);re(Ae,tt,Yn,"⋊","\\rtimes",!0);re(Ae,tt,Yn,"⋋","\\leftthreetimes",!0);re(Ae,tt,Yn,"⋌","\\rightthreetimes",!0);re(Ae,tt,Yn,"⋏","\\curlywedge",!0);re(Ae,tt,Yn,"⋎","\\curlyvee",!0);re(Ae,tt,Yn,"⊝","\\circleddash",!0);re(Ae,tt,Yn,"⊛","\\circledast",!0);re(Ae,tt,Yn,"⋅","\\centerdot");re(Ae,tt,Yn,"⊺","\\intercal",!0);re(Ae,tt,Yn,"⋒","\\doublecap");re(Ae,tt,Yn,"⋓","\\doublecup");re(Ae,tt,Yn,"⊠","\\boxtimes",!0);re(Ae,tt,rt,"⇢","\\dashrightarrow",!0);re(Ae,tt,rt,"⇠","\\dashleftarrow",!0);re(Ae,tt,rt,"⇇","\\leftleftarrows",!0);re(Ae,tt,rt,"⇆","\\leftrightarrows",!0);re(Ae,tt,rt,"⇚","\\Lleftarrow",!0);re(Ae,tt,rt,"↞","\\twoheadleftarrow",!0);re(Ae,tt,rt,"↢","\\leftarrowtail",!0);re(Ae,tt,rt,"↫","\\looparrowleft",!0);re(Ae,tt,rt,"⇋","\\leftrightharpoons",!0);re(Ae,tt,rt,"↶","\\curvearrowleft",!0);re(Ae,tt,rt,"↺","\\circlearrowleft",!0);re(Ae,tt,rt,"↰","\\Lsh",!0);re(Ae,tt,rt,"⇈","\\upuparrows",!0);re(Ae,tt,rt,"↿","\\upharpoonleft",!0);re(Ae,tt,rt,"⇃","\\downharpoonleft",!0);re(Ae,Ce,rt,"⊶","\\origof",!0);re(Ae,Ce,rt,"⊷","\\imageof",!0);re(Ae,tt,rt,"⊸","\\multimap",!0);re(Ae,tt,rt,"↭","\\leftrightsquigarrow",!0);re(Ae,tt,rt,"⇉","\\rightrightarrows",!0);re(Ae,tt,rt,"⇄","\\rightleftarrows",!0);re(Ae,tt,rt,"↠","\\twoheadrightarrow",!0);re(Ae,tt,rt,"↣","\\rightarrowtail",!0);re(Ae,tt,rt,"↬","\\looparrowright",!0);re(Ae,tt,rt,"↷","\\curvearrowright",!0);re(Ae,tt,rt,"↻","\\circlearrowright",!0);re(Ae,tt,rt,"↱","\\Rsh",!0);re(Ae,tt,rt,"⇊","\\downdownarrows",!0);re(Ae,tt,rt,"↾","\\upharpoonright",!0);re(Ae,tt,rt,"⇂","\\downharpoonright",!0);re(Ae,tt,rt,"⇝","\\rightsquigarrow",!0);re(Ae,tt,rt,"⇝","\\leadsto");re(Ae,tt,rt,"⇛","\\Rrightarrow",!0);re(Ae,tt,rt,"↾","\\restriction");re(Ae,Ce,mt,"‘","`");re(Ae,Ce,mt,"$","\\$");re(gn,Ce,mt,"$","\\$");re(gn,Ce,mt,"$","\\textdollar");re(Ae,Ce,mt,"%","\\%");re(gn,Ce,mt,"%","\\%");re(Ae,Ce,mt,"_","\\_");re(gn,Ce,mt,"_","\\_");re(gn,Ce,mt,"_","\\textunderscore");re(Ae,Ce,mt,"∠","\\angle",!0);re(Ae,Ce,mt,"∞","\\infty",!0);re(Ae,Ce,mt,"′","\\prime");re(Ae,Ce,mt,"△","\\triangle");re(Ae,Ce,mt,"Γ","\\Gamma",!0);re(Ae,Ce,mt,"Δ","\\Delta",!0);re(Ae,Ce,mt,"Θ","\\Theta",!0);re(Ae,Ce,mt,"Λ","\\Lambda",!0);re(Ae,Ce,mt,"Ξ","\\Xi",!0);re(Ae,Ce,mt,"Π","\\Pi",!0);re(Ae,Ce,mt,"Σ","\\Sigma",!0);re(Ae,Ce,mt,"Υ","\\Upsilon",!0);re(Ae,Ce,mt,"Φ","\\Phi",!0);re(Ae,Ce,mt,"Ψ","\\Psi",!0);re(Ae,Ce,mt,"Ω","\\Omega",!0);re(Ae,Ce,mt,"A","Α");re(Ae,Ce,mt,"B","Β");re(Ae,Ce,mt,"E","Ε");re(Ae,Ce,mt,"Z","Ζ");re(Ae,Ce,mt,"H","Η");re(Ae,Ce,mt,"I","Ι");re(Ae,Ce,mt,"K","Κ");re(Ae,Ce,mt,"M","Μ");re(Ae,Ce,mt,"N","Ν");re(Ae,Ce,mt,"O","Ο");re(Ae,Ce,mt,"P","Ρ");re(Ae,Ce,mt,"T","Τ");re(Ae,Ce,mt,"X","Χ");re(Ae,Ce,mt,"¬","\\neg",!0);re(Ae,Ce,mt,"¬","\\lnot");re(Ae,Ce,mt,"⊤","\\top");re(Ae,Ce,mt,"⊥","\\bot");re(Ae,Ce,mt,"∅","\\emptyset");re(Ae,tt,mt,"∅","\\varnothing");re(Ae,Ce,Qa,"α","\\alpha",!0);re(Ae,Ce,Qa,"β","\\beta",!0);re(Ae,Ce,Qa,"γ","\\gamma",!0);re(Ae,Ce,Qa,"δ","\\delta",!0);re(Ae,Ce,Qa,"ϵ","\\epsilon",!0);re(Ae,Ce,Qa,"ζ","\\zeta",!0);re(Ae,Ce,Qa,"η","\\eta",!0);re(Ae,Ce,Qa,"θ","\\theta",!0);re(Ae,Ce,Qa,"ι","\\iota",!0);re(Ae,Ce,Qa,"κ","\\kappa",!0);re(Ae,Ce,Qa,"λ","\\lambda",!0);re(Ae,Ce,Qa,"μ","\\mu",!0);re(Ae,Ce,Qa,"ν","\\nu",!0);re(Ae,Ce,Qa,"ξ","\\xi",!0);re(Ae,Ce,Qa,"ο","\\omicron",!0);re(Ae,Ce,Qa,"π","\\pi",!0);re(Ae,Ce,Qa,"ρ","\\rho",!0);re(Ae,Ce,Qa,"σ","\\sigma",!0);re(Ae,Ce,Qa,"τ","\\tau",!0);re(Ae,Ce,Qa,"υ","\\upsilon",!0);re(Ae,Ce,Qa,"ϕ","\\phi",!0);re(Ae,Ce,Qa,"χ","\\chi",!0);re(Ae,Ce,Qa,"ψ","\\psi",!0);re(Ae,Ce,Qa,"ω","\\omega",!0);re(Ae,Ce,Qa,"ε","\\varepsilon",!0);re(Ae,Ce,Qa,"ϑ","\\vartheta",!0);re(Ae,Ce,Qa,"ϖ","\\varpi",!0);re(Ae,Ce,Qa,"ϱ","\\varrho",!0);re(Ae,Ce,Qa,"ς","\\varsigma",!0);re(Ae,Ce,Qa,"φ","\\varphi",!0);re(Ae,Ce,Yn,"∗","*",!0);re(Ae,Ce,Yn,"+","+");re(Ae,Ce,Yn,"−","-",!0);re(Ae,Ce,Yn,"⋅","\\cdot",!0);re(Ae,Ce,Yn,"∘","\\circ",!0);re(Ae,Ce,Yn,"÷","\\div",!0);re(Ae,Ce,Yn,"±","\\pm",!0);re(Ae,Ce,Yn,"×","\\times",!0);re(Ae,Ce,Yn,"∩","\\cap",!0);re(Ae,Ce,Yn,"∪","\\cup",!0);re(Ae,Ce,Yn,"∖","\\setminus",!0);re(Ae,Ce,Yn,"∧","\\land");re(Ae,Ce,Yn,"∨","\\lor");re(Ae,Ce,Yn,"∧","\\wedge",!0);re(Ae,Ce,Yn,"∨","\\vee",!0);re(Ae,Ce,mt,"√","\\surd");re(Ae,Ce,Hp,"⟨","\\langle",!0);re(Ae,Ce,Hp,"∣","\\lvert");re(Ae,Ce,Hp,"∥","\\lVert");re(Ae,Ce,dd,"?","?");re(Ae,Ce,dd,"!","!");re(Ae,Ce,dd,"⟩","\\rangle",!0);re(Ae,Ce,dd,"∣","\\rvert");re(Ae,Ce,dd,"∥","\\rVert");re(Ae,Ce,rt,"=","=");re(Ae,Ce,rt,":",":");re(Ae,Ce,rt,"≈","\\approx",!0);re(Ae,Ce,rt,"≅","\\cong",!0);re(Ae,Ce,rt,"≥","\\ge");re(Ae,Ce,rt,"≥","\\geq",!0);re(Ae,Ce,rt,"←","\\gets");re(Ae,Ce,rt,">","\\gt",!0);re(Ae,Ce,rt,"∈","\\in",!0);re(Ae,Ce,rt,"","\\@not");re(Ae,Ce,rt,"⊂","\\subset",!0);re(Ae,Ce,rt,"⊃","\\supset",!0);re(Ae,Ce,rt,"⊆","\\subseteq",!0);re(Ae,Ce,rt,"⊇","\\supseteq",!0);re(Ae,tt,rt,"⊈","\\nsubseteq",!0);re(Ae,tt,rt,"⊉","\\nsupseteq",!0);re(Ae,Ce,rt,"⊨","\\models");re(Ae,Ce,rt,"←","\\leftarrow",!0);re(Ae,Ce,rt,"≤","\\le");re(Ae,Ce,rt,"≤","\\leq",!0);re(Ae,Ce,rt,"<","\\lt",!0);re(Ae,Ce,rt,"→","\\rightarrow",!0);re(Ae,Ce,rt,"→","\\to");re(Ae,tt,rt,"≱","\\ngeq",!0);re(Ae,tt,rt,"≰","\\nleq",!0);re(Ae,Ce,By," ","\\ ");re(Ae,Ce,By," ","\\space");re(Ae,Ce,By," ","\\nobreakspace");re(gn,Ce,By," ","\\ ");re(gn,Ce,By," "," ");re(gn,Ce,By," ","\\space");re(gn,Ce,By," ","\\nobreakspace");re(Ae,Ce,By,null,"\\nobreak");re(Ae,Ce,By,null,"\\allowbreak");re(Ae,Ce,bM,",",",");re(Ae,Ce,bM,";",";");re(Ae,tt,Yn,"⊼","\\barwedge",!0);re(Ae,tt,Yn,"⊻","\\veebar",!0);re(Ae,Ce,Yn,"⊙","\\odot",!0);re(Ae,Ce,Yn,"⊕","\\oplus",!0);re(Ae,Ce,Yn,"⊗","\\otimes",!0);re(Ae,Ce,mt,"∂","\\partial",!0);re(Ae,Ce,Yn,"⊘","\\oslash",!0);re(Ae,tt,Yn,"⊚","\\circledcirc",!0);re(Ae,tt,Yn,"⊡","\\boxdot",!0);re(Ae,Ce,Yn,"△","\\bigtriangleup");re(Ae,Ce,Yn,"▽","\\bigtriangledown");re(Ae,Ce,Yn,"†","\\dagger");re(Ae,Ce,Yn,"⋄","\\diamond");re(Ae,Ce,Yn,"⋆","\\star");re(Ae,Ce,Yn,"◃","\\triangleleft");re(Ae,Ce,Yn,"▹","\\triangleright");re(Ae,Ce,Hp,"{","\\{");re(gn,Ce,mt,"{","\\{");re(gn,Ce,mt,"{","\\textbraceleft");re(Ae,Ce,dd,"}","\\}");re(gn,Ce,mt,"}","\\}");re(gn,Ce,mt,"}","\\textbraceright");re(Ae,Ce,Hp,"{","\\lbrace");re(Ae,Ce,dd,"}","\\rbrace");re(Ae,Ce,Hp,"[","\\lbrack",!0);re(gn,Ce,mt,"[","\\lbrack",!0);re(Ae,Ce,dd,"]","\\rbrack",!0);re(gn,Ce,mt,"]","\\rbrack",!0);re(Ae,Ce,Hp,"(","\\lparen",!0);re(Ae,Ce,dd,")","\\rparen",!0);re(gn,Ce,mt,"<","\\textless",!0);re(gn,Ce,mt,">","\\textgreater",!0);re(Ae,Ce,Hp,"⌊","\\lfloor",!0);re(Ae,Ce,dd,"⌋","\\rfloor",!0);re(Ae,Ce,Hp,"⌈","\\lceil",!0);re(Ae,Ce,dd,"⌉","\\rceil",!0);re(Ae,Ce,mt,"\\","\\backslash");re(Ae,Ce,mt,"∣","|");re(Ae,Ce,mt,"∣","\\vert");re(gn,Ce,mt,"|","\\textbar",!0);re(Ae,Ce,mt,"∥","\\|");re(Ae,Ce,mt,"∥","\\Vert");re(gn,Ce,mt,"∥","\\textbardbl");re(gn,Ce,mt,"~","\\textasciitilde");re(gn,Ce,mt,"\\","\\textbackslash");re(gn,Ce,mt,"^","\\textasciicircum");re(Ae,Ce,rt,"↑","\\uparrow",!0);re(Ae,Ce,rt,"⇑","\\Uparrow",!0);re(Ae,Ce,rt,"↓","\\downarrow",!0);re(Ae,Ce,rt,"⇓","\\Downarrow",!0);re(Ae,Ce,rt,"↕","\\updownarrow",!0);re(Ae,Ce,rt,"⇕","\\Updownarrow",!0);re(Ae,Ce,oc,"∐","\\coprod");re(Ae,Ce,oc,"⋁","\\bigvee");re(Ae,Ce,oc,"⋀","\\bigwedge");re(Ae,Ce,oc,"⨄","\\biguplus");re(Ae,Ce,oc,"⋂","\\bigcap");re(Ae,Ce,oc,"⋃","\\bigcup");re(Ae,Ce,oc,"∫","\\int");re(Ae,Ce,oc,"∫","\\intop");re(Ae,Ce,oc,"∬","\\iint");re(Ae,Ce,oc,"∭","\\iiint");re(Ae,Ce,oc,"∏","\\prod");re(Ae,Ce,oc,"∑","\\sum");re(Ae,Ce,oc,"⨂","\\bigotimes");re(Ae,Ce,oc,"⨁","\\bigoplus");re(Ae,Ce,oc,"⨀","\\bigodot");re(Ae,Ce,oc,"∮","\\oint");re(Ae,Ce,oc,"∯","\\oiint");re(Ae,Ce,oc,"∰","\\oiiint");re(Ae,Ce,oc,"⨆","\\bigsqcup");re(Ae,Ce,oc,"∫","\\smallint");re(gn,Ce,lE,"…","\\textellipsis");re(Ae,Ce,lE,"…","\\mathellipsis");re(gn,Ce,lE,"…","\\ldots",!0);re(Ae,Ce,lE,"…","\\ldots",!0);re(Ae,Ce,lE,"⋯","\\@cdots",!0);re(Ae,Ce,lE,"⋱","\\ddots",!0);re(Ae,Ce,mt,"⋮","\\varvdots");re(gn,Ce,mt,"⋮","\\varvdots");re(Ae,Ce,Bo,"ˊ","\\acute");re(Ae,Ce,Bo,"ˋ","\\grave");re(Ae,Ce,Bo,"¨","\\ddot");re(Ae,Ce,Bo,"~","\\tilde");re(Ae,Ce,Bo,"ˉ","\\bar");re(Ae,Ce,Bo,"˘","\\breve");re(Ae,Ce,Bo,"ˇ","\\check");re(Ae,Ce,Bo,"^","\\hat");re(Ae,Ce,Bo,"⃗","\\vec");re(Ae,Ce,Bo,"˙","\\dot");re(Ae,Ce,Bo,"˚","\\mathring");re(Ae,Ce,Qa,"","\\@imath");re(Ae,Ce,Qa,"","\\@jmath");re(Ae,Ce,mt,"ı","ı");re(Ae,Ce,mt,"ȷ","ȷ");re(gn,Ce,mt,"ı","\\i",!0);re(gn,Ce,mt,"ȷ","\\j",!0);re(gn,Ce,mt,"ß","\\ss",!0);re(gn,Ce,mt,"æ","\\ae",!0);re(gn,Ce,mt,"œ","\\oe",!0);re(gn,Ce,mt,"ø","\\o",!0);re(gn,Ce,mt,"Æ","\\AE",!0);re(gn,Ce,mt,"Œ","\\OE",!0);re(gn,Ce,mt,"Ø","\\O",!0);re(gn,Ce,Bo,"ˊ","\\'");re(gn,Ce,Bo,"ˋ","\\`");re(gn,Ce,Bo,"ˆ","\\^");re(gn,Ce,Bo,"˜","\\~");re(gn,Ce,Bo,"ˉ","\\=");re(gn,Ce,Bo,"˘","\\u");re(gn,Ce,Bo,"˙","\\.");re(gn,Ce,Bo,"¸","\\c");re(gn,Ce,Bo,"˚","\\r");re(gn,Ce,Bo,"ˇ","\\v");re(gn,Ce,Bo,"¨",'\\"');re(gn,Ce,Bo,"˝","\\H");re(gn,Ce,Bo,"◯","\\textcircled");var m9e={"--":!0,"---":!0,"``":!0,"''":!0};re(gn,Ce,mt,"–","--",!0);re(gn,Ce,mt,"–","\\textendash");re(gn,Ce,mt,"—","---",!0);re(gn,Ce,mt,"—","\\textemdash");re(gn,Ce,mt,"‘","`",!0);re(gn,Ce,mt,"‘","\\textquoteleft");re(gn,Ce,mt,"’","'",!0);re(gn,Ce,mt,"’","\\textquoteright");re(gn,Ce,mt,"“","``",!0);re(gn,Ce,mt,"“","\\textquotedblleft");re(gn,Ce,mt,"”","''",!0);re(gn,Ce,mt,"”","\\textquotedblright");re(Ae,Ce,mt,"°","\\degree",!0);re(gn,Ce,mt,"°","\\degree");re(gn,Ce,mt,"°","\\textdegree",!0);re(Ae,Ce,mt,"£","\\pounds");re(Ae,Ce,mt,"£","\\mathsterling",!0);re(gn,Ce,mt,"£","\\pounds");re(gn,Ce,mt,"£","\\textsterling",!0);re(Ae,tt,mt,"✠","\\maltese");re(gn,tt,mt,"✠","\\maltese");var Dhe='0123456789/@."';for(var TU=0;TU0)return jm(i,u,r,n,o.concat(d));if(l){var p,A;if(l==="boldsymbol"){var m=ZBt(i,r,n,o,a);p=m.fontName,A=[m.fontClass]}else s?(p=f9e[l].fontName,A=[l]):(p=fT(l,n.fontWeight,n.fontShape),A=[l,n.fontWeight,n.fontShape]);if(yM(i,p,r).metrics)return jm(i,p,r,n,o.concat(A));if(m9e.hasOwnProperty(i)&&p.slice(0,10)==="Typewriter"){for(var g=[],h=0;h{if(vw(t.classes)!==vw(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var n=t.classes[0];if(n==="mbin"||n==="mord")return!1}for(var a in t.style)if(t.style.hasOwnProperty(a)&&t.style[a]!==e.style[a])return!1;for(var r in e.style)if(e.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;return!0},eEt=t=>{for(var e=0;en&&(n=o.height),o.depth>a&&(a=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=n,e.depth=a,e.maxFontSize=r},Cd=function(e,n,a,r){var i=new z$(e,n,a,r);return Boe(i),i},g9e=(t,e,n,a)=>new z$(t,e,n,a),tEt=function(e,n,a){var r=Cd([e],[],n);return r.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),r.style.borderBottomWidth=Qn(r.height),r.maxFontSize=1,r},nEt=function(e,n,a,r){var i=new _oe(e,n,a,r);return Boe(i),i},h9e=function(e){var n=new M$(e);return Boe(n),n},aEt=function(e,n){return e instanceof M$?Cd([],[e],n):e},rEt=function(e){if(e.positionType==="individualShift"){for(var n=e.children,a=[n[0]],r=-n[0].shift-n[0].elem.depth,i=r,o=1;o{var n=Cd(["mspace"],[],e),a=Lo(t,e);return n.style.marginRight=Qn(a),n},fT=function(e,n,a){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}var i;return n==="textbf"&&a==="textit"?i="BoldItalic":n==="textbf"?i="Bold":n==="textit"?i="Italic":i="Regular",r+"-"+i},f9e={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"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-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"}},b9e={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},sEt=function(e,n){var[a,r,i]=b9e[e],o=new kw(a),s=new Jb([o],{width:Qn(r),height:Qn(i),style:"width:"+Qn(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=g9e(["overlay"],[s],n);return l.height=i,l.style.height=Qn(i),l.style.width=Qn(r),l},St={fontMap:f9e,makeSymbol:jm,mathsym:VBt,makeSpan:Cd,makeSvgSpan:g9e,makeLineSpan:tEt,makeAnchor:nEt,makeFragment:h9e,wrapFragment:aEt,makeVList:iEt,makeOrd:KBt,makeGlue:oEt,staticSvg:sEt,svgData:b9e,tryCombineChars:eEt},To={number:3,unit:"mu"},zv={number:4,unit:"mu"},Bf={number:5,unit:"mu"},cEt={mord:{mop:To,mbin:zv,mrel:Bf,minner:To},mop:{mord:To,mop:To,mrel:Bf,minner:To},mbin:{mord:zv,mop:zv,mopen:zv,minner:zv},mrel:{mord:Bf,mop:Bf,mopen:Bf,minner:Bf},mopen:{},mclose:{mop:To,mbin:zv,mrel:Bf,minner:To},mpunct:{mord:To,mop:To,mrel:Bf,mopen:To,mclose:To,mpunct:To,minner:To},minner:{mord:To,mop:To,mbin:zv,mrel:Bf,mopen:To,mpunct:To,minner:To}},lEt={mord:{mop:To},mop:{mord:To,mop:To},mbin:{},mrel:{},mopen:{},mclose:{mop:To},mpunct:{},minner:{mop:To}},y9e={},GR={},HR={};function Nn(t){for(var{type:e,names:n,props:a,handler:r,htmlBuilder:i,mathmlBuilder:o}=t,s={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:r},l=0;l{var f=h.classes[0],b=g.classes[0];f==="mbin"&&va.contains(dEt,b)?h.classes[0]="mord":b==="mbin"&&va.contains(uEt,f)&&(g.classes[0]="mord")},{node:p},A,m),Rhe(i,(g,h)=>{var f=xK(h),b=xK(g),y=f&&b?g.hasClass("mtight")?lEt[f][b]:cEt[f][b]:null;if(y)return St.makeGlue(y,u)},{node:p},A,m),i},Rhe=function t(e,n,a,r,i){r&&e.push(r);for(var o=0;oA=>{e.splice(p+1,0,A),o++})(o)}r&&e.pop()},w9e=function(e){return e instanceof M$||e instanceof _oe||e instanceof z$&&e.hasClass("enclosing")?e:null},mEt=function t(e,n){var a=w9e(e);if(a){var r=a.children;if(r.length){if(n==="right")return t(r[r.length-1],"right");if(n==="left")return t(r[0],"left")}}return e},xK=function(e,n){return e?(n&&(e=mEt(e,n)),AEt[e.classes[0]]||null):null},U4=function(e,n){var a=["nulldelimiter"].concat(e.baseSizingClasses());return ey(n.concat(a))},jr=function(e,n,a){if(!e)return ey();if(GR[e.type]){var r=GR[e.type](e,n);if(a&&n.size!==a.size){r=ey(n.sizingClasses(a),[r],n);var i=n.sizeMultiplier/a.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new On("Got group of unknown type: '"+e.type+"'")};function bT(t,e){var n=ey(["base"],t,e),a=ey(["strut"]);return a.style.height=Qn(n.height+n.depth),n.depth&&(a.style.verticalAlign=Qn(-n.depth)),n.children.unshift(a),n}function OK(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var a=Ec(t,e,"root"),r;a.length===2&&a[1].hasClass("tag")&&(r=a.pop());for(var i=[],o=[],s=0;s0&&(i.push(bT(o,e)),o=[]),i.push(a[s]));o.length>0&&i.push(bT(o,e));var u;n?(u=bT(Ec(n,e,!0)),u.classes=["tag"],i.push(u)):r&&i.push(r);var d=ey(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var p=u.children[0];p.style.height=Qn(d.height+d.depth),d.depth&&(p.style.verticalAlign=Qn(-d.depth))}return d}function v9e(t){return new M$(t)}class Qp{constructor(e,n,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=n||[],this.classes=a||[]}setAttribute(e,n){this.attributes[e]=n}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=vw(this.classes));for(var a=0;a0&&(e+=' class ="'+va.escape(vw(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}let fh=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return va.escape(this.toText())}toText(){return this.text}};class gEt{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":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",Qn(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var wn={MathNode:Qp,TextNode:fh,SpaceNode:gEt,newDocumentFragment:v9e},nm=function(e,n,a){return Ji[n][e]&&Ji[n][e].replace&&e.charCodeAt(0)!==55349&&!(m9e.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=Ji[n][e].replace),new wn.TextNode(e)},Eoe=function(e){return e.length===1?e[0]:new wn.MathNode("mrow",e)},Qoe=function(e,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var a=n.font;if(!a||a==="mathnormal")return null;var r=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var i=e.text;if(va.contains(["\\imath","\\jmath"],i))return null;Ji[r][i]&&Ji[r][i].replace&&(i=Ji[r][i].replace);var o=St.fontMap[a].fontName;return Coe(i,o,r)?St.fontMap[a].variant:null};function LU(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof fh&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var n=t.children[0];return n instanceof fh&&n.text===","}else return!1}var Gd=function(e,n,a){if(e.length===1){var r=Mi(e[0],n);return a&&r instanceof Qp&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i=[],o,s=0;s=1&&(o.type==="mn"||LU(o))){var u=l.children[0];u instanceof Qp&&u.type==="mn"&&(u.children=[...o.children,...u.children],i.pop())}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof fh&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var p=l.children[0];p instanceof fh&&p.text.length>0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),i.pop())}}}i.push(l),o=l}return i},xw=function(e,n,a){return Eoe(Gd(e,n,a))},Mi=function(e,n){if(!e)return new wn.MathNode("mrow");if(HR[e.type]){var a=HR[e.type](e,n);return a}else throw new On("Got group of unknown type: '"+e.type+"'")};function Lhe(t,e,n,a,r){var i=Gd(t,n),o;i.length===1&&i[0]instanceof Qp&&va.contains(["mrow","mtable"],i[0].type)?o=i[0]:o=new wn.MathNode("mrow",i);var s=new wn.MathNode("annotation",[new wn.TextNode(e)]);s.setAttribute("encoding","application/x-tex");var l=new wn.MathNode("semantics",[o,s]),u=new wn.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&u.setAttribute("display","block");var d=r?"katex":"katex-mathml";return St.makeSpan([d],[u])}var k9e=function(e){return new sb({style:e.displayMode?Ia.DISPLAY:Ia.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},x9e=function(e,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),e=St.makeSpan(a,[e])}return e},hEt=function(e,n,a){var r=k9e(a),i;if(a.output==="mathml")return Lhe(e,n,r,a.displayMode,!0);if(a.output==="html"){var o=OK(e,r);i=St.makeSpan(["katex"],[o])}else{var s=Lhe(e,n,r,a.displayMode,!1),l=OK(e,r);i=St.makeSpan(["katex"],[s,l])}return x9e(i,a)},fEt=function(e,n,a){var r=k9e(a),i=OK(e,r),o=St.makeSpan(["katex"],[i]);return x9e(o,a)},bEt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},yEt=function(e){var n=new wn.MathNode("mo",[new wn.TextNode(bEt[e.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},wEt={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]},vEt=function(e){return e.type==="ordgroup"?e.body.length:1},kEt=function(e,n){function a(){var s=4e5,l=e.label.slice(1);if(va.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=e,d=vEt(u.base),p,A,m;if(d>5)l==="widehat"||l==="widecheck"?(p=420,s=2364,m=.42,A=l+"4"):(p=312,s=2340,m=.34,A="tilde4");else{var g=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(s=[0,1062,2364,2364,2364][g],p=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],A=l+g):(s=[0,600,1033,2339,2340][g],p=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],A="tilde"+g)}var h=new kw(A),f=new Jb([h],{width:"100%",height:Qn(m),viewBox:"0 0 "+s+" "+p,preserveAspectRatio:"none"});return{span:St.makeSvgSpan([],[f],n),minWidth:0,height:m}}else{var b=[],y=wEt[l],[w,v,k]=y,_=k/1e3,x=w.length,C,B;if(x===1){var I=y[3];C=["hide-tail"],B=[I]}else if(x===2)C=["halfarrow-left","halfarrow-right"],B=["xMinYMin","xMaxYMin"];else if(x===3)C=["brace-left","brace-center","brace-right"],B=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+x+" children.");for(var E=0;E0&&(r.style.minWidth=Qn(i)),r},xEt=function(e,n,a,r,i){var o,s=e.height+e.depth+a+r;if(/fbox|color|angl/.test(n)){if(o=St.makeSpan(["stretchy",n],[],i),n==="fbox"){var l=i.color&&i.getColor();l&&(o.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(n)&&u.push(new vK({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&u.push(new vK({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Jb(u,{width:"100%",height:Qn(s)});o=St.makeSvgSpan([],[d],i)}return o.height=s,o.style.height=Qn(s),o},ty={encloseSpan:xEt,mathMLnode:yEt,svgSpan:kEt};function cr(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 Soe(t){var e=wM(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 wM(t){return t&&(t.type==="atom"||YBt.hasOwnProperty(t.type))?t:null}var Ioe=(t,e)=>{var n,a,r;t&&t.type==="supsub"?(a=cr(t.base,"accent"),n=a.base,t.base=n,r=HBt(jr(t,e)),t.base=a):(a=cr(t,"accent"),n=a.base);var i=jr(n,e.havingCrampedStyle()),o=a.isShifty&&va.isCharacterBox(n),s=0;if(o){var l=va.getBaseElem(n),u=jr(l,e.havingCrampedStyle());s=Ihe(u).skew}var d=a.label==="\\c",p=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),A;if(a.isStretchy)A=ty.svgSpan(a,e),A=St.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:A,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+Qn(2*s)+")",marginLeft:Qn(2*s)}:void 0}]},e);else{var m,g;a.label==="\\vec"?(m=St.staticSvg("vec",e),g=St.svgData.vec[1]):(m=St.makeOrd({mode:a.mode,text:a.label},e,"textord"),m=Ihe(m),m.italic=0,g=m.width,d&&(p+=m.depth)),A=St.makeSpan(["accent-body"],[m]);var h=a.label==="\\textcircled";h&&(A.classes.push("accent-full"),p=i.height);var f=s;h||(f-=g/2),A.style.left=Qn(f),a.label==="\\textcircled"&&(A.style.top=".2em"),A=St.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-p},{type:"elem",elem:A}]},e)}var b=St.makeSpan(["mord","accent"],[A],e);return r?(r.children[0]=b,r.height=Math.max(b.height,r.height),r.classes[0]="mord",r):b},O9e=(t,e)=>{var n=t.isStretchy?ty.mathMLnode(t.label):new wn.MathNode("mo",[nm(t.label,t.mode)]),a=new wn.MathNode("mover",[Mi(t.base,e),n]);return a.setAttribute("accent","true"),a},OEt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));Nn({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 n=WR(e[0]),a=!OEt.test(t.funcName),r=!a||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:a,isShifty:r,base:n}},htmlBuilder:Ioe,mathmlBuilder:O9e});Nn({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],a=t.parser.mode;return a==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Ioe,mathmlBuilder:O9e});Nn({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=e[0];return{type:"accentUnder",mode:n.mode,label:a,base:r}},htmlBuilder:(t,e)=>{var n=jr(t.base,e),a=ty.svgSpan(t,e),r=t.label==="\\utilde"?.12:0,i=St.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:n}]},e);return St.makeSpan(["mord","accentunder"],[i],e)},mathmlBuilder:(t,e)=>{var n=ty.mathMLnode(t.label),a=new wn.MathNode("munder",[Mi(t.base,e),n]);return a.setAttribute("accentunder","true"),a}});var yT=t=>{var e=new wn.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Nn({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,n){var{parser:a,funcName:r}=t;return{type:"xArrow",mode:a.mode,label:r,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,a=e.havingStyle(n.sup()),r=St.wrapFragment(jr(t.body,a,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(i+"-arrow-pad");var o;t.below&&(a=e.havingStyle(n.sub()),o=St.wrapFragment(jr(t.below,a,e),e),o.classes.push(i+"-arrow-pad"));var s=ty.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*s.height,u=-e.fontMetrics().axisHeight-.5*s.height-.111;(r.depth>.25||t.label==="\\xleftequilibrium")&&(u-=r.depth);var d;if(o){var p=-e.fontMetrics().axisHeight+o.height+.5*s.height+.111;d=St.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:u},{type:"elem",elem:s,shift:l},{type:"elem",elem:o,shift:p}]},e)}else d=St.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:u},{type:"elem",elem:s,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),St.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(t,e){var n=ty.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(t.body){var r=yT(Mi(t.body,e));if(t.below){var i=yT(Mi(t.below,e));a=new wn.MathNode("munderover",[n,i,r])}else a=new wn.MathNode("mover",[n,r])}else if(t.below){var o=yT(Mi(t.below,e));a=new wn.MathNode("munder",[n,o])}else a=yT(),a=new wn.MathNode("mover",[n,a]);return a}});var CEt=St.makeSpan;function C9e(t,e){var n=Ec(t.body,e,!0);return CEt([t.mclass],n,e)}function _9e(t,e){var n,a=Gd(t.body,e);return t.mclass==="minner"?n=new wn.MathNode("mpadded",a):t.mclass==="mord"?t.isCharacterBox?(n=a[0],n.type="mi"):n=new wn.MathNode("mi",a):(t.isCharacterBox?(n=a[0],n.type="mo"):n=new wn.MathNode("mo",a),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Nn({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:a}=t,r=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+a.slice(5),body:_s(r),isCharacterBox:va.isCharacterBox(r)}},htmlBuilder:C9e,mathmlBuilder:_9e});var vM=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"};Nn({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:vM(e[0]),body:_s(e[1]),isCharacterBox:va.isCharacterBox(e[1])}}});Nn({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:a}=t,r=e[1],i=e[0],o;a!=="\\stackrel"?o=vM(r):o="mrel";var s={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:_s(r)},l={type:"supsub",mode:i.mode,base:s,sup:a==="\\underset"?null:i,sub:a==="\\underset"?i:null};return{type:"mclass",mode:n.mode,mclass:o,body:[l],isCharacterBox:va.isCharacterBox(l)}},htmlBuilder:C9e,mathmlBuilder:_9e});Nn({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:vM(e[0]),body:_s(e[0])}},htmlBuilder(t,e){var n=Ec(t.body,e,!0),a=St.makeSpan([t.mclass],n,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(t,e){var n=Gd(t.body,e),a=new wn.MathNode("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var _Et={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Nhe=()=>({type:"styling",body:[],mode:"math",style:"display"}),Mhe=t=>t.type==="textord"&&t.text==="@",BEt=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function EEt(t,e,n){var a=_Et[t];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=n.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:a,mode:"math",family:"rel"},o=n.callFunction("\\Big",[i],[]),s=n.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,o,s]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function QEt(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 n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new On("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var a=[],r=[a],i=0;i-1))if("<>AV".indexOf(u)>-1)for(var p=0;p<2;p++){for(var A=!0,m=l+1;mAV=|." after @',o[l]);var g=EEt(u,d,t),h={type:"styling",body:[g],mode:"math",style:"display"};a.push(h),s=Nhe()}i%2===0?a.push(s):a.shift(),a=[],r.push(a)}t.gullet.endGroup(),t.gullet.endGroup();var f=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:f,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}Nn({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:a}=t;return{type:"cdlabel",mode:n.mode,side:a.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),a=St.wrapFragment(jr(t.label,n,e),e);return a.classes.push("cd-label-"+t.side),a.style.bottom=Qn(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(t,e){var n=new wn.MathNode("mrow",[Mi(t.label,e)]);return n=new wn.MathNode("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new wn.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Nn({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=St.wrapFragment(jr(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new wn.MathNode("mrow",[Mi(t.fragment,e)])}});Nn({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,a=cr(e[0],"ordgroup"),r=a.body,i="",o=0;o=1114111)throw new On("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:u}}});var B9e=(t,e)=>{var n=Ec(t.body,e.withColor(t.color),!1);return St.makeFragment(n)},E9e=(t,e)=>{var n=Gd(t.body,e.withColor(t.color)),a=new wn.MathNode("mstyle",n);return a.setAttribute("mathcolor",t.color),a};Nn({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,a=cr(e[0],"color-token").color,r=e[1];return{type:"color",mode:n.mode,color:a,body:_s(r)}},htmlBuilder:B9e,mathmlBuilder:E9e});Nn({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:a}=t,r=cr(e[0],"color-token").color;n.gullet.macros.set("\\current@color",r);var i=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:r,body:i}},htmlBuilder:B9e,mathmlBuilder:E9e});Nn({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:a}=t,r=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:r&&cr(r,"size").value}},htmlBuilder(t,e){var n=St.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=Qn(Lo(t.size,e)))),n},mathmlBuilder(t,e){var n=new wn.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",Qn(Lo(t.size,e)))),n}});var CK={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Q9e=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new On("Expected a control sequence",t);return e},SEt=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},S9e=(t,e,n,a)=>{var r=t.gullet.macros.get(n.text);r==null&&(n.noexpand=!0,r={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,r,a)};Nn({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var a=e.fetch();if(CK[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=CK[a.text]),cr(e.parseFunction(),"internal");throw new On("Invalid token after macro prefix",a)}});Nn({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,a=e.gullet.popToken(),r=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new On("Expected a control sequence",a);for(var i=0,o,s=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),s[i].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new On('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==i+1)throw new On('Argument number "'+a.text+'" out of order');i++,s.push([])}else{if(a.text==="EOF")throw new On("Expected a macro definition");s[i].push(a.text)}var{tokens:l}=e.gullet.consumeArg();return o&&l.unshift(o),(n==="\\edef"||n==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:i,delimiters:s},n===CK[n]),{type:"internal",mode:e.mode}}});Nn({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,a=Q9e(e.gullet.popToken());e.gullet.consumeSpaces();var r=SEt(e);return S9e(e,a,r,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});Nn({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,a=Q9e(e.gullet.popToken()),r=e.gullet.popToken(),i=e.gullet.popToken();return S9e(e,a,i,n==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var JQ=function(e,n,a){var r=Ji.math[e]&&Ji.math[e].replace,i=Coe(r||e,n,a);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+n+".");return i},Doe=function(e,n,a,r){var i=a.havingBaseStyle(n),o=St.makeSpan(r.concat(i.sizingClasses(a)),[e],a),s=i.sizeMultiplier/a.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=i.sizeMultiplier,o},I9e=function(e,n,a){var r=n.havingBaseStyle(a),i=(1-n.sizeMultiplier/r.sizeMultiplier)*n.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Qn(i),e.height-=i,e.depth+=i},IEt=function(e,n,a,r,i,o){var s=St.makeSymbol(e,"Main-Regular",i,r),l=Doe(s,n,r,o);return a&&I9e(l,r,n),l},DEt=function(e,n,a,r){return St.makeSymbol(e,"Size"+n+"-Regular",a,r)},D9e=function(e,n,a,r,i,o){var s=DEt(e,n,i,r),l=Doe(St.makeSpan(["delimsizing","size"+n],[s],r),Ia.TEXT,r,o);return a&&I9e(l,r,Ia.TEXT),l},NU=function(e,n,a){var r;n==="Size1-Regular"?r="delim-size1":r="delim-size4";var i=St.makeSpan(["delimsizinginner",r],[St.makeSpan([],[St.makeSymbol(e,n,a)])]);return{type:"elem",elem:i}},MU=function(e,n,a){var r=hh["Size4-Regular"][e.charCodeAt(0)]?hh["Size4-Regular"][e.charCodeAt(0)][4]:hh["Size1-Regular"][e.charCodeAt(0)][4],i=new kw("inner",LBt(e,Math.round(1e3*n))),o=new Jb([i],{width:Qn(r),height:Qn(n),style:"width:"+Qn(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),s=St.makeSvgSpan([],[o],a);return s.height=n,s.style.height=Qn(n),s.style.width=Qn(r),{type:"elem",elem:s}},_K=.008,wT={type:"kern",size:-1*_K},$Et=["|","\\lvert","\\rvert","\\vert"],TEt=["\\|","\\lVert","\\rVert","\\Vert"],$9e=function(e,n,a,r,i,o){var s,l,u,d,p="",A=0;s=u=d=e,l=null;var m="Size1-Regular";e==="\\uparrow"?u=d="⏐":e==="\\Uparrow"?u=d="‖":e==="\\downarrow"?s=u="⏐":e==="\\Downarrow"?s=u="‖":e==="\\updownarrow"?(s="\\uparrow",u="⏐",d="\\downarrow"):e==="\\Updownarrow"?(s="\\Uparrow",u="‖",d="\\Downarrow"):va.contains($Et,e)?(u="∣",p="vert",A=333):va.contains(TEt,e)?(u="∥",p="doublevert",A=556):e==="["||e==="\\lbrack"?(s="⎡",u="⎢",d="⎣",m="Size4-Regular",p="lbrack",A=667):e==="]"||e==="\\rbrack"?(s="⎤",u="⎥",d="⎦",m="Size4-Regular",p="rbrack",A=667):e==="\\lfloor"||e==="⌊"?(u=s="⎢",d="⎣",m="Size4-Regular",p="lfloor",A=667):e==="\\lceil"||e==="⌈"?(s="⎡",u=d="⎢",m="Size4-Regular",p="lceil",A=667):e==="\\rfloor"||e==="⌋"?(u=s="⎥",d="⎦",m="Size4-Regular",p="rfloor",A=667):e==="\\rceil"||e==="⌉"?(s="⎤",u=d="⎥",m="Size4-Regular",p="rceil",A=667):e==="("||e==="\\lparen"?(s="⎛",u="⎜",d="⎝",m="Size4-Regular",p="lparen",A=875):e===")"||e==="\\rparen"?(s="⎞",u="⎟",d="⎠",m="Size4-Regular",p="rparen",A=875):e==="\\{"||e==="\\lbrace"?(s="⎧",l="⎨",d="⎩",u="⎪",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s="⎫",l="⎬",d="⎭",u="⎪",m="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(s="⎧",d="⎩",u="⎪",m="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(s="⎫",d="⎭",u="⎪",m="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(s="⎧",d="⎭",u="⎪",m="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(s="⎫",d="⎩",u="⎪",m="Size4-Regular");var g=JQ(s,m,i),h=g.height+g.depth,f=JQ(u,m,i),b=f.height+f.depth,y=JQ(d,m,i),w=y.height+y.depth,v=0,k=1;if(l!==null){var _=JQ(l,m,i);v=_.height+_.depth,k=2}var x=h+w+v,C=Math.max(0,Math.ceil((n-x)/(k*b))),B=x+C*k*b,I=r.fontMetrics().axisHeight;a&&(I*=r.sizeMultiplier);var E=B/2-I,S=[];if(p.length>0){var P=B-h-w,O=Math.round(B*1e3),T=NBt(p,Math.round(P*1e3)),D=new kw(p,T),$=(A/1e3).toFixed(3)+"em",F=(O/1e3).toFixed(3)+"em",L=new Jb([D],{width:$,height:F,viewBox:"0 0 "+A+" "+O}),q=St.makeSvgSpan([],[L],r);q.height=O/1e3,q.style.width=$,q.style.height=F,S.push({type:"elem",elem:q})}else{if(S.push(NU(d,m,i)),S.push(wT),l===null){var M=B-h-w+2*_K;S.push(MU(u,M,r))}else{var R=(B-h-w-v)/2+2*_K;S.push(MU(u,R,r)),S.push(wT),S.push(NU(l,m,i)),S.push(wT),S.push(MU(u,R,r))}S.push(wT),S.push(NU(s,m,i))}var j=r.havingBaseStyle(Ia.TEXT),W=St.makeVList({positionType:"bottom",positionData:E,children:S},j);return Doe(St.makeSpan(["delimsizing","mult"],[W],j),Ia.TEXT,r,o)},zU=80,qU=.08,jU=function(e,n,a,r,i){var o=RBt(e,r,a),s=new kw(e,o),l=new Jb([s],{width:"400em",height:Qn(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return St.makeSvgSpan(["hide-tail"],[l],i)},PEt=function(e,n){var a=n.havingBaseSizing(),r=R9e("\\surd",e*a.sizeMultiplier,F9e,a),i=a.sizeMultiplier,o=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),s,l=0,u=0,d=0,p;return r.type==="small"?(d=1e3+1e3*o+zU,e<1?i=1:e<1.4&&(i=.7),l=(1+o+qU)/i,u=(1+o)/i,s=jU("sqrtMain",l,d,o,n),s.style.minWidth="0.853em",p=.833/i):r.type==="large"?(d=(1e3+zU)*QI[r.size],u=(QI[r.size]+o)/i,l=(QI[r.size]+o+qU)/i,s=jU("sqrtSize"+r.size,l,d,o,n),s.style.minWidth="1.02em",p=1/i):(l=e+o+qU,u=e+o,d=Math.floor(1e3*e+o)+zU,s=jU("sqrtTall",l,d,o,n),s.style.minWidth="0.742em",p=1.056),s.height=u,s.style.height=Qn(l),{span:s,advanceWidth:p,ruleWidth:(n.fontMetrics().sqrtRuleThickness+o)*i}},T9e=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],FEt=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],P9e=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],QI=[0,1.2,1.8,2.4,3],REt=function(e,n,a,r,i){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),va.contains(T9e,e)||va.contains(P9e,e))return D9e(e,n,!1,a,r,i);if(va.contains(FEt,e))return $9e(e,QI[n],!1,a,r,i);throw new On("Illegal delimiter: '"+e+"'")},LEt=[{type:"small",style:Ia.SCRIPTSCRIPT},{type:"small",style:Ia.SCRIPT},{type:"small",style:Ia.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],NEt=[{type:"small",style:Ia.SCRIPTSCRIPT},{type:"small",style:Ia.SCRIPT},{type:"small",style:Ia.TEXT},{type:"stack"}],F9e=[{type:"small",style:Ia.SCRIPTSCRIPT},{type:"small",style:Ia.SCRIPT},{type:"small",style:Ia.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],MEt=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.")},R9e=function(e,n,a,r){for(var i=Math.min(2,3-r.style.size),o=i;on)return a[o]}return a[a.length-1]},L9e=function(e,n,a,r,i,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var s;va.contains(P9e,e)?s=LEt:va.contains(T9e,e)?s=F9e:s=NEt;var l=R9e(e,n,s,r);return l.type==="small"?IEt(e,l.style,a,r,i,o):l.type==="large"?D9e(e,l.size,a,r,i,o):$9e(e,n,a,r,i,o)},zEt=function(e,n,a,r,i,o){var s=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,u=5/r.fontMetrics().ptPerEm,d=Math.max(n-s,a+s),p=Math.max(d/500*l,2*d-u);return L9e(e,p,!0,r,i,o)},Rb={sqrtImage:PEt,sizedDelim:REt,sizeToMaxHeight:QI,customSizedDelim:L9e,leftRightDelim:zEt},zhe={"\\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}},qEt=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function kM(t,e){var n=wM(t);if(n&&va.contains(qEt,n.text))return n;throw n?new On("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new On("Invalid delimiter type '"+t.type+"'",t)}Nn({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 n=kM(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:zhe[t.funcName].size,mclass:zhe[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?St.makeSpan([t.mclass]):Rb.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(nm(t.delim,t.mode));var n=new wn.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=Qn(Rb.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function qhe(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Nn({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new On("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:kM(e[0],t).text,color:n}}});Nn({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=kM(e[0],t),a=t.parser;++a.leftrightDepth;var r=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=cr(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:r,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{qhe(t);for(var n=Ec(t.body,e,!0,["mopen","mclose"]),a=0,r=0,i=!1,o=0;o{qhe(t);var n=Gd(t.body,e);if(t.left!=="."){var a=new wn.MathNode("mo",[nm(t.left,t.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(t.right!=="."){var r=new wn.MathNode("mo",[nm(t.right,t.mode)]);r.setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),n.push(r)}return Eoe(n)}});Nn({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=kM(e[0],t);if(!t.parser.leftrightDepth)throw new On("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if(t.delim===".")n=U4(e,[]);else{n=Rb.sizedDelim(t.delim,1,e,t.mode,[]);var a={delim:t.delim,options:e};n.isMiddle=a}return n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?nm("|","text"):nm(t.delim,t.mode),a=new wn.MathNode("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var $oe=(t,e)=>{var n=St.wrapFragment(jr(t.body,e),e),a=t.label.slice(1),r=e.sizeMultiplier,i,o=0,s=va.isCharacterBox(t.body);if(a==="sout")i=St.makeSpan(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/r,o=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var l=Lo({number:.6,unit:"pt"},e),u=Lo({number:.35,unit:"ex"},e),d=e.havingBaseSizing();r=r/d.sizeMultiplier;var p=n.height+n.depth+l+u;n.style.paddingLeft=Qn(p/2+l);var A=Math.floor(1e3*p*r),m=PBt(A),g=new Jb([new kw("phase",m)],{width:"400em",height:Qn(A/1e3),viewBox:"0 0 400000 "+A,preserveAspectRatio:"xMinYMin slice"});i=St.makeSvgSpan(["hide-tail"],[g],e),i.style.height=Qn(p),o=n.depth+l+u}else{/cancel/.test(a)?s||n.classes.push("cancel-pad"):a==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var h=0,f=0,b=0;/box/.test(a)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),h=e.fontMetrics().fboxsep+(a==="colorbox"?0:b),f=h):a==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),h=4*b,f=Math.max(0,.25-n.depth)):(h=s?.2:0,f=h),i=ty.encloseSpan(n,a,h,f,e),/fbox|boxed|fcolorbox/.test(a)?(i.style.borderStyle="solid",i.style.borderWidth=Qn(b)):a==="angl"&&b!==.049&&(i.style.borderTopWidth=Qn(b),i.style.borderRightWidth=Qn(b)),o=n.depth+f,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var y;if(t.backgroundColor)y=St.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:n,shift:0}]},e);else{var w=/cancel|phase/.test(a)?["svg-align"]:[];y=St.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:w}]},e)}return/cancel/.test(a)&&(y.height=n.height,y.depth=n.depth),/cancel/.test(a)&&!s?St.makeSpan(["mord","cancel-lap"],[y],e):St.makeSpan(["mord"],[y],e)},Toe=(t,e)=>{var n=0,a=new wn.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Mi(t.body,e)]);switch(t.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*n+"pt"),a.setAttribute("height","+"+2*n+"pt"),a.setAttribute("lspace",n+"pt"),a.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+r+"em solid "+String(t.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&a.setAttribute("mathbackground",t.backgroundColor),a};Nn({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:a,funcName:r}=t,i=cr(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:a.mode,label:r,backgroundColor:i,body:o}},htmlBuilder:$oe,mathmlBuilder:Toe});Nn({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:a,funcName:r}=t,i=cr(e[0],"color-token").color,o=cr(e[1],"color-token").color,s=e[2];return{type:"enclose",mode:a.mode,label:r,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:$oe,mathmlBuilder:Toe});Nn({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});Nn({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:a}=t,r=e[0];return{type:"enclose",mode:n.mode,label:a,body:r}},htmlBuilder:$oe,mathmlBuilder:Toe});Nn({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var N9e={};function Vh(t){for(var{type:e,names:n,props:a,handler:r,htmlBuilder:i,mathmlBuilder:o}=t,s={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l{var e=t.parser.settings;if(!e.displayMode)throw new On("{"+t.envName+"} can be used only in display mode.")};function Poe(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function av(t,e,n){var{hskipBeforeAndAfter:a,addJot:r,cols:i,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:p,leqno:A}=e;if(t.gullet.beginGroup(),u||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){var m=t.gullet.expandMacroAsText("\\arraystretch");if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new On("Invalid \\arraystretch: "+m)}t.gullet.beginGroup();var g=[],h=[g],f=[],b=[],y=l!=null?[]:void 0;function w(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function v(){y&&(t.gullet.macros.get("\\df@tag")?(y.push(t.subparse([new Sh("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),b.push(jhe(t));;){var k=t.parseExpression(!1,u?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),k={type:"ordgroup",mode:t.mode,body:k},n&&(k={type:"styling",mode:t.mode,style:n,body:[k]}),g.push(k);var _=t.fetch().text;if(_==="&"){if(p&&g.length===p){if(u||s)throw new On("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(_==="\\end"){v(),g.length===1&&k.type==="styling"&&k.body[0].body.length===0&&(h.length>1||!d)&&h.pop(),b.length0&&(w+=.25),u.push({pos:w,isDashed:ae[qe]})}for(v(o[0]),a=0;a0&&(E+=y,xae))for(a=0;a=s)){var ne=void 0;(r>0||e.hskipBeforeAndAfter)&&(ne=va.deflt(R.pregap,A),ne!==0&&(T=St.makeSpan(["arraycolsep"],[]),T.style.width=Qn(ne),O.push(T)));var oe=[];for(a=0;a0){for(var me=St.makeLineSpan("hline",n,d),be=St.makeLineSpan("hdashline",n,d),ce=[{type:"elem",elem:l,shift:0}];u.length>0;){var fe=u.pop(),Z=fe.pos-S;fe.isDashed?ce.push({type:"elem",elem:be,shift:Z}):ce.push({type:"elem",elem:me,shift:Z})}l=St.makeVList({positionType:"individualShift",children:ce},n)}if($.length===0)return St.makeSpan(["mord"],[l],n);var ze=St.makeVList({positionType:"individualShift",children:$},n);return ze=St.makeSpan(["tag"],[ze],n),St.makeFragment([l,ze])},jEt={c:"center ",l:"left ",r:"right "},Kh=function(e,n){for(var a=[],r=new wn.MathNode("mtd",[],["mtr-glue"]),i=new wn.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var g=e.cols,h="",f=!1,b=0,y=g.length;g[0].type==="separator"&&(A+="top ",b=1),g[g.length-1].type==="separator"&&(A+="bottom ",y-=1);for(var w=b;w0?"left ":"",A+=C[C.length-1].length>0?"right ":"";for(var B=1;B-1?"alignat":"align",i=e.envName==="split",o=av(e.parser,{cols:a,addJot:!0,autoTag:i?void 0:Poe(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),s,l=0,u={type:"ordgroup",mode:e.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var d="",p=0;p0&&m&&(f=1),a[g]={type:"align",align:h,pregap:f,postgap:0}}return o.colSeparationType=m?"align":"alignat",o};Vh({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=wM(e[0]),a=n?[e[0]]:cr(e[0],"ordgroup").body,r=a.map(function(o){var s=Soe(o),l=s.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 On("Unknown column alignment: "+l,o)}),i={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return av(t.parser,i,Foe(t.envName))},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({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("*","")],n="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var r=t.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),n=r.fetch().text,"lcr".indexOf(n)===-1)throw new On("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),a.cols=[{type:"align",align:n}]}}var i=av(t.parser,a,Foe(t.envName)),o=Math.max(0,...i.body.map(s=>s.length));return i.cols=new Array(o).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=av(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=wM(e[0]),a=n?[e[0]]:cr(e[0],"ordgroup").body,r=a.map(function(o){var s=Soe(o),l=s.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new On("Unknown column alignment: "+l,o)});if(r.length>1)throw new On("{subarray} can contain only one column");var i={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(i=av(t.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new On("{subarray} can contain only one column");return i},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({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}]},n=av(t.parser,e,Foe(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:z9e,htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){va.contains(["gather","gather*"],t.envName)&&xM(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Poe(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return av(t.parser,e,"display")},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:z9e,htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){xM(t);var e={autoTag:Poe(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return av(t.parser,e,"display")},htmlBuilder:Zh,mathmlBuilder:Kh});Vh({type:"array",names:["CD"],props:{numArgs:0},handler(t){return xM(t),QEt(t.parser)},htmlBuilder:Zh,mathmlBuilder:Kh});Fe("\\nonumber","\\gdef\\@eqnsw{0}");Fe("\\notag","\\nonumber");Nn({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new On(t.funcName+" valid only within array environment")}});var Uhe=N9e;Nn({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:a}=t,r=e[0];if(r.type!=="ordgroup")throw new On("Invalid environment name",r);for(var i="",o=0;o{var n=t.font,a=e.withFont(n);return jr(t.body,a)},j9e=(t,e)=>{var n=t.font,a=e.withFont(n);return Mi(t.body,a)},Ghe={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Nn({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=WR(e[0]),i=a;return i in Ghe&&(i=Ghe[i]),{type:"font",mode:n.mode,font:i.slice(1),body:r}},htmlBuilder:q9e,mathmlBuilder:j9e});Nn({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,a=e[0],r=va.isCharacterBox(a);return{type:"mclass",mode:n.mode,mclass:vM(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:r}}});Nn({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:a,breakOnTokenText:r}=t,{mode:i}=n,o=n.parseExpression(!0,r),s="math"+a.slice(1);return{type:"font",mode:i,font:s,body:{type:"ordgroup",mode:n.mode,body:o}}},htmlBuilder:q9e,mathmlBuilder:j9e});var U9e=(t,e)=>{var n=e;return t==="display"?n=n.id>=Ia.SCRIPT.id?n.text():Ia.DISPLAY:t==="text"&&n.size===Ia.DISPLAY.size?n=Ia.TEXT:t==="script"?n=Ia.SCRIPT:t==="scriptscript"&&(n=Ia.SCRIPTSCRIPT),n},Roe=(t,e)=>{var n=U9e(t.size,e.style),a=n.fracNum(),r=n.fracDen(),i;i=e.havingStyle(a);var o=jr(t.numer,i,e);if(t.continued){var s=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?g=3*A:g=7*A,h=e.fontMetrics().denom1):(p>0?(m=e.fontMetrics().num2,g=A):(m=e.fontMetrics().num3,g=3*A),h=e.fontMetrics().denom2);var f;if(d){var y=e.fontMetrics().axisHeight;m-o.depth-(y+.5*p){var n=new wn.MathNode("mfrac",[Mi(t.numer,e),Mi(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var a=Lo(t.barSize,e);n.setAttribute("linethickness",Qn(a))}var r=U9e(t.size,e.style);if(r.size!==e.style.size){n=new wn.MathNode("mstyle",[n]);var i=r.size===Ia.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",i),n.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var s=new wn.MathNode("mo",[new wn.TextNode(t.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(n),t.rightDelim!=null){var l=new wn.MathNode("mo",[new wn.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return Eoe(o)}return n};Nn({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=e[0],i=e[1],o,s=null,l=null,u="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,s="(",l=")";break;case"\\\\bracefrac":o=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:r,denom:i,hasBarLine:o,leftDelim:s,rightDelim:l,size:u,barSize:null}},htmlBuilder:Roe,mathmlBuilder:Loe});Nn({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=e[0],i=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:r,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Nn({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:a}=t,r;switch(n){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:a}}});var Hhe=["display","text","script","scriptscript"],Whe=function(e){var n=null;return e.length>0&&(n=e,n=n==="."?null:n),n};Nn({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,a=e[4],r=e[5],i=WR(e[0]),o=i.type==="atom"&&i.family==="open"?Whe(i.text):null,s=WR(e[1]),l=s.type==="atom"&&s.family==="close"?Whe(s.text):null,u=cr(e[2],"size"),d,p=null;u.isBlank?d=!0:(p=u.value,d=p.number>0);var A="auto",m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=cr(m.body[0],"textord");A=Hhe[Number(g.text)]}}else m=cr(m,"textord"),A=Hhe[Number(m.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:r,continued:!1,hasBarLine:d,barSize:p,leftDelim:o,rightDelim:l,size:A}},htmlBuilder:Roe,mathmlBuilder:Loe});Nn({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:a,token:r}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:cr(e[0],"size").value,token:r}}});Nn({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=e[0],i=wBt(cr(e[1],"infix").size),o=e[2],s=i.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Roe,mathmlBuilder:Loe});var G9e=(t,e)=>{var n=e.style,a,r;t.type==="supsub"?(a=t.sup?jr(t.sup,e.havingStyle(n.sup()),e):jr(t.sub,e.havingStyle(n.sub()),e),r=cr(t.base,"horizBrace")):r=cr(t,"horizBrace");var i=jr(r.base,e.havingBaseStyle(Ia.DISPLAY)),o=ty.svgSpan(r,e),s;if(r.isOver?(s=St.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o}]},e),s.children[0].children[0].children[1].classes.push("svg-align")):(s=St.makeVList({positionType:"bottom",positionData:i.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:i}]},e),s.children[0].children[0].children[0].classes.push("svg-align")),a){var l=St.makeSpan(["mord",r.isOver?"mover":"munder"],[s],e);r.isOver?s=St.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:a}]},e):s=St.makeVList({positionType:"bottom",positionData:l.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return St.makeSpan(["mord",r.isOver?"mover":"munder"],[s],e)},UEt=(t,e)=>{var n=ty.mathMLnode(t.label);return new wn.MathNode(t.isOver?"mover":"munder",[Mi(t.base,e),n])};Nn({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:a}=t;return{type:"horizBrace",mode:n.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:G9e,mathmlBuilder:UEt});Nn({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,a=e[1],r=cr(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:n.mode,href:r,body:_s(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=Ec(t.body,e,!1);return St.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=xw(t.body,e);return n instanceof Qp||(n=new Qp("mrow",[n])),n.setAttribute("href",t.href),n}});Nn({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,a=cr(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var r=[],i=0;i{var{parser:n,funcName:a,token:r}=t,i=cr(e[0],"raw").string,o=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,l={};switch(a){case"\\htmlClass":l.class=i,s={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,s={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,s={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),d=0;d{var n=Ec(t.body,e,!1),a=["enclosing"];t.attributes.class&&a.push(...t.attributes.class.trim().split(/\s+/));var r=St.makeSpan(a,n,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&r.setAttribute(i,t.attributes[i]);return r},mathmlBuilder:(t,e)=>xw(t.body,e)});Nn({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:_s(e[0]),mathml:_s(e[1])}},htmlBuilder:(t,e)=>{var n=Ec(t.html,e,!1);return St.makeFragment(n)},mathmlBuilder:(t,e)=>xw(t.mathml,e)});var UU=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!n)throw new On("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!u9e(a))throw new On("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Nn({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:a}=t,r={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(n[0])for(var l=cr(n[0],"raw").string,u=l.split(","),d=0;d{var n=Lo(t.height,e),a=0;t.totalheight.number>0&&(a=Lo(t.totalheight,e)-n);var r=0;t.width.number>0&&(r=Lo(t.width,e));var i={height:Qn(n+a)};r>0&&(i.width=Qn(r)),a>0&&(i.verticalAlign=Qn(-a));var o=new UBt(t.src,t.alt,i);return o.height=n,o.depth=a,o},mathmlBuilder:(t,e)=>{var n=new wn.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var a=Lo(t.height,e),r=0;if(t.totalheight.number>0&&(r=Lo(t.totalheight,e)-a,n.setAttribute("valign",Qn(-r))),n.setAttribute("height",Qn(a+r)),t.width.number>0){var i=Lo(t.width,e);n.setAttribute("width",Qn(i))}return n.setAttribute("src",t.src),n}});Nn({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:a}=t,r=cr(e[0],"size");if(n.settings.strict){var i=a[1]==="m",o=r.value.unit==="mu";i?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+r.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:r.value}},htmlBuilder(t,e){return St.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Lo(t.dimension,e);return new wn.SpaceNode(n)}});Nn({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=e[0];return{type:"lap",mode:n.mode,alignment:a.slice(5),body:r}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=St.makeSpan([],[jr(t.body,e)]),n=St.makeSpan(["inner"],[n],e)):n=St.makeSpan(["inner"],[jr(t.body,e)]);var a=St.makeSpan(["fix"],[]),r=St.makeSpan([t.alignment],[n,a],e),i=St.makeSpan(["strut"]);return i.style.height=Qn(r.height+r.depth),r.depth&&(i.style.verticalAlign=Qn(-r.depth)),r.children.unshift(i),r=St.makeSpan(["thinbox"],[r],e),St.makeSpan(["mord","vbox"],[r],e)},mathmlBuilder:(t,e)=>{var n=new wn.MathNode("mpadded",[Mi(t.body,e)]);if(t.alignment!=="rlap"){var a=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",a+"width")}return n.setAttribute("width","0px"),n}});Nn({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:a}=t,r=a.mode;a.switchMode("math");var i=n==="\\("?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(r),{type:"styling",mode:a.mode,style:"text",body:o}}});Nn({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new On("Mismatched "+t.funcName)}});var Yhe=(t,e)=>{switch(e.style.size){case Ia.DISPLAY.size:return t.display;case Ia.TEXT.size:return t.text;case Ia.SCRIPT.size:return t.script;case Ia.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};Nn({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:_s(e[0]),text:_s(e[1]),script:_s(e[2]),scriptscript:_s(e[3])}},htmlBuilder:(t,e)=>{var n=Yhe(t,e),a=Ec(n,e,!1);return St.makeFragment(a)},mathmlBuilder:(t,e)=>{var n=Yhe(t,e);return xw(n,e)}});var H9e=(t,e,n,a,r,i,o)=>{t=St.makeSpan([],[t]);var s=n&&va.isCharacterBox(n),l,u;if(e){var d=jr(e,a.havingStyle(r.sup()),a);u={elem:d,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var p=jr(n,a.havingStyle(r.sub()),a);l={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-p.height)}}var A;if(u&&l){var m=a.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+o;A=St.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Qn(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Qn(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(l){var g=t.height-o;A=St.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Qn(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},a)}else if(u){var h=t.depth+o;A=St.makeVList({positionType:"bottom",positionData:h,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Qn(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return t;var f=[A];if(l&&i!==0&&!s){var b=St.makeSpan(["mspace"],[],a);b.style.marginRight=Qn(i),f.unshift(b)}return St.makeSpan(["mop","op-limits"],f,a)},W9e=["\\smallint"],uE=(t,e)=>{var n,a,r=!1,i;t.type==="supsub"?(n=t.sup,a=t.sub,i=cr(t.base,"op"),r=!0):i=cr(t,"op");var o=e.style,s=!1;o.size===Ia.DISPLAY.size&&i.symbol&&!va.contains(W9e,i.name)&&(s=!0);var l;if(i.symbol){var u=s?"Size2-Regular":"Size1-Regular",d="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(d=i.name.slice(1),i.name=d==="oiint"?"\\iint":"\\iiint"),l=St.makeSymbol(i.name,u,"math",e,["mop","op-symbol",s?"large-op":"small-op"]),d.length>0){var p=l.italic,A=St.staticSvg(d+"Size"+(s?"2":"1"),e);l=St.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:A,shift:s?.08:0}]},e),i.name="\\"+d,l.classes.unshift("mop"),l.italic=p}}else if(i.body){var m=Ec(i.body,e,!0);m.length===1&&m[0]instanceof tm?(l=m[0],l.classes[0]="mop"):l=St.makeSpan(["mop"],m,e)}else{for(var g=[],h=1;h{var n;if(t.symbol)n=new Qp("mo",[nm(t.name,t.mode)]),va.contains(W9e,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new Qp("mo",Gd(t.body,e));else{n=new Qp("mi",[new fh(t.name.slice(1))]);var a=new Qp("mo",[nm("⁡","text")]);t.parentIsSupSub?n=new Qp("mrow",[n,a]):n=v9e([n,a])}return n},GEt={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Nn({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=a;return r.length===1&&(r=GEt[r]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:uE,mathmlBuilder:q$});Nn({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,a=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_s(a)}},htmlBuilder:uE,mathmlBuilder:q$});var HEt={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Nn({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:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:uE,mathmlBuilder:q$});Nn({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:uE,mathmlBuilder:q$});Nn({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t,a=n;return a.length===1&&(a=HEt[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:uE,mathmlBuilder:q$});var Y9e=(t,e)=>{var n,a,r=!1,i;t.type==="supsub"?(n=t.sup,a=t.sub,i=cr(t.base,"operatorname"),r=!0):i=cr(t,"operatorname");var o;if(i.body.length>0){for(var s=i.body.map(p=>{var A=p.text;return typeof A=="string"?{type:"textord",mode:p.mode,text:A}:p}),l=Ec(s,e.withFont("mathrm"),!0),u=0;u{for(var n=Gd(t.body,e.withFont("mathrm")),a=!0,r=0;rd.toText()).join("");n=[new wn.TextNode(s)]}var l=new wn.MathNode("mi",n);l.setAttribute("mathvariant","normal");var u=new wn.MathNode("mo",[nm("⁡","text")]);return t.parentIsSupSub?new wn.MathNode("mrow",[l,u]):wn.newDocumentFragment([l,u])};Nn({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:a}=t,r=e[0];return{type:"operatorname",mode:n.mode,body:_s(r),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Y9e,mathmlBuilder:WEt});Fe("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Sx({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?St.makeFragment(Ec(t.body,e,!1)):St.makeSpan(["mord"],Ec(t.body,e,!0),e)},mathmlBuilder(t,e){return xw(t.body,e,!0)}});Nn({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,a=e[0];return{type:"overline",mode:n.mode,body:a}},htmlBuilder(t,e){var n=jr(t.body,e.havingCrampedStyle()),a=St.makeLineSpan("overline-line",e),r=e.fontMetrics().defaultRuleThickness,i=St.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:a},{type:"kern",size:r}]},e);return St.makeSpan(["mord","overline"],[i],e)},mathmlBuilder(t,e){var n=new wn.MathNode("mo",[new wn.TextNode("‾")]);n.setAttribute("stretchy","true");var a=new wn.MathNode("mover",[Mi(t.body,e),n]);return a.setAttribute("accent","true"),a}});Nn({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,a=e[0];return{type:"phantom",mode:n.mode,body:_s(a)}},htmlBuilder:(t,e)=>{var n=Ec(t.body,e.withPhantom(),!1);return St.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Gd(t.body,e);return new wn.MathNode("mphantom",n)}});Nn({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,a=e[0];return{type:"hphantom",mode:n.mode,body:a}},htmlBuilder:(t,e)=>{var n=St.makeSpan([],[jr(t.body,e.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var a=0;a{var n=Gd(_s(t.body),e),a=new wn.MathNode("mphantom",n),r=new wn.MathNode("mpadded",[a]);return r.setAttribute("height","0px"),r.setAttribute("depth","0px"),r}});Nn({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,a=e[0];return{type:"vphantom",mode:n.mode,body:a}},htmlBuilder:(t,e)=>{var n=St.makeSpan(["inner"],[jr(t.body,e.withPhantom())]),a=St.makeSpan(["fix"],[]);return St.makeSpan(["mord","rlap"],[n,a],e)},mathmlBuilder:(t,e)=>{var n=Gd(_s(t.body),e),a=new wn.MathNode("mphantom",n),r=new wn.MathNode("mpadded",[a]);return r.setAttribute("width","0px"),r}});Nn({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,a=cr(e[0],"size").value,r=e[1];return{type:"raisebox",mode:n.mode,dy:a,body:r}},htmlBuilder(t,e){var n=jr(t.body,e),a=Lo(t.dy,e);return St.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new wn.MathNode("mpadded",[Mi(t.body,e)]),a=t.dy.number+t.dy.unit;return n.setAttribute("voffset",a),n}});Nn({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});Nn({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:a}=t,r=n[0],i=cr(e[0],"size"),o=cr(e[1],"size");return{type:"rule",mode:a.mode,shift:r&&cr(r,"size").value,width:i.value,height:o.value}},htmlBuilder(t,e){var n=St.makeSpan(["mord","rule"],[],e),a=Lo(t.width,e),r=Lo(t.height,e),i=t.shift?Lo(t.shift,e):0;return n.style.borderRightWidth=Qn(a),n.style.borderTopWidth=Qn(r),n.style.bottom=Qn(i),n.width=a,n.height=r+i,n.depth=-i,n.maxFontSize=r*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Lo(t.width,e),a=Lo(t.height,e),r=t.shift?Lo(t.shift,e):0,i=e.color&&e.getColor()||"black",o=new wn.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",Qn(n)),o.setAttribute("height",Qn(a));var s=new wn.MathNode("mpadded",[o]);return r>=0?s.setAttribute("height",Qn(r)):(s.setAttribute("height",Qn(r)),s.setAttribute("depth",Qn(-r))),s.setAttribute("voffset",Qn(r)),s}});function X9e(t,e,n){for(var a=Ec(t,e,!1),r=e.sizeMultiplier/n.sizeMultiplier,i=0;i{var n=e.havingSize(t.size);return X9e(t.body,n,e)};Nn({type:"sizing",names:Xhe,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:a,parser:r}=t,i=r.parseExpression(!1,n);return{type:"sizing",mode:r.mode,size:Xhe.indexOf(a)+1,body:i}},htmlBuilder:YEt,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),a=Gd(t.body,n),r=new wn.MathNode("mstyle",a);return r.setAttribute("mathsize",Qn(n.sizeMultiplier)),r}});Nn({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:a}=t,r=!1,i=!1,o=n[0]&&cr(n[0],"ordgroup");if(o)for(var s="",l=0;l{var n=St.makeSpan([],[jr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0,n.children))for(var a=0;a{var n=new wn.MathNode("mpadded",[Mi(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});Nn({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:a}=t,r=n[0],i=e[0];return{type:"sqrt",mode:a.mode,body:i,index:r}},htmlBuilder(t,e){var n=jr(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=St.wrapFragment(n,e);var a=e.fontMetrics(),r=a.defaultRuleThickness,i=r;e.style.idn.height+n.depth+o&&(o=(o+p-n.height-n.depth)/2);var A=l.height-n.height-o-u;n.style.paddingLeft=Qn(d);var m=St.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+A)},{type:"elem",elem:l},{type:"kern",size:u}]},e);if(t.index){var g=e.havingStyle(Ia.SCRIPTSCRIPT),h=jr(t.index,g,e),f=.6*(m.height-m.depth),b=St.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:h}]},e),y=St.makeSpan(["root"],[b]);return St.makeSpan(["mord","sqrt"],[y,m],e)}else return St.makeSpan(["mord","sqrt"],[m],e)},mathmlBuilder(t,e){var{body:n,index:a}=t;return a?new wn.MathNode("mroot",[Mi(n,e),Mi(a,e)]):new wn.MathNode("msqrt",[Mi(n,e)])}});var Vhe={display:Ia.DISPLAY,text:Ia.TEXT,script:Ia.SCRIPT,scriptscript:Ia.SCRIPTSCRIPT};Nn({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:a,parser:r}=t,i=r.parseExpression(!0,n),o=a.slice(1,a.length-5);return{type:"styling",mode:r.mode,style:o,body:i}},htmlBuilder(t,e){var n=Vhe[t.style],a=e.havingStyle(n).withFont("");return X9e(t.body,a,e)},mathmlBuilder(t,e){var n=Vhe[t.style],a=e.havingStyle(n),r=Gd(t.body,a),i=new wn.MathNode("mstyle",r),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[t.style];return i.setAttribute("scriptlevel",s[0]),i.setAttribute("displaystyle",s[1]),i}});var XEt=function(e,n){var a=e.base;if(a)if(a.type==="op"){var r=a.limits&&(n.style.size===Ia.DISPLAY.size||a.alwaysHandleSupSub);return r?uE:null}else if(a.type==="operatorname"){var i=a.alwaysHandleSupSub&&(n.style.size===Ia.DISPLAY.size||a.limits);return i?Y9e:null}else{if(a.type==="accent")return va.isCharacterBox(a.base)?Ioe:null;if(a.type==="horizBrace"){var o=!e.sub;return o===a.isOver?G9e:null}else return null}else return null};Sx({type:"supsub",htmlBuilder(t,e){var n=XEt(t,e);if(n)return n(t,e);var{base:a,sup:r,sub:i}=t,o=jr(a,e),s,l,u=e.fontMetrics(),d=0,p=0,A=a&&va.isCharacterBox(a);if(r){var m=e.havingStyle(e.style.sup());s=jr(r,m,e),A||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(i){var g=e.havingStyle(e.style.sub());l=jr(i,g,e),A||(p=o.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var h;e.style===Ia.DISPLAY?h=u.sup1:e.style.cramped?h=u.sup3:h=u.sup2;var f=e.sizeMultiplier,b=Qn(.5/u.ptPerEm/f),y=null;if(l){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof tm||w)&&(y=Qn(-o.italic))}var v;if(s&&l){d=Math.max(d,h,s.depth+.25*u.xHeight),p=Math.max(p,u.sub2);var k=u.defaultRuleThickness,_=4*k;if(d-s.depth-(l.height-p)<_){p=_-(d-s.depth)+l.height;var x=.8*u.xHeight-(d-s.depth);x>0&&(d+=x,p-=x)}var C=[{type:"elem",elem:l,shift:p,marginRight:b,marginLeft:y},{type:"elem",elem:s,shift:-d,marginRight:b}];v=St.makeVList({positionType:"individualShift",children:C},e)}else if(l){p=Math.max(p,u.sub1,l.height-.8*u.xHeight);var B=[{type:"elem",elem:l,marginLeft:y,marginRight:b}];v=St.makeVList({positionType:"shift",positionData:p,children:B},e)}else if(s)d=Math.max(d,h,s.depth+.25*u.xHeight),v=St.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:s,marginRight:b}]},e);else throw new Error("supsub must have either sup or sub.");var I=xK(o,"right")||"mord";return St.makeSpan([I],[o,St.makeSpan(["msupsub"],[v])],e)},mathmlBuilder(t,e){var n=!1,a,r;t.base&&t.base.type==="horizBrace"&&(r=!!t.sup,r===t.base.isOver&&(n=!0,a=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[Mi(t.base,e)];t.sub&&i.push(Mi(t.sub,e)),t.sup&&i.push(Mi(t.sup,e));var o;if(n)o=a?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===Ia.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===Ia.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===Ia.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Ia.DISPLAY)?o="munder":o="msub"}else{var s=t.base;s&&s.type==="op"&&s.limits&&(e.style===Ia.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||e.style===Ia.DISPLAY)?o="mover":o="msup"}return new wn.MathNode(o,i)}});Sx({type:"atom",htmlBuilder(t,e){return St.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new wn.MathNode("mo",[nm(t.text,t.mode)]);if(t.family==="bin"){var a=Qoe(t,e);a==="bold-italic"&&n.setAttribute("mathvariant",a)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var V9e={mi:"italic",mn:"normal",mtext:"normal"};Sx({type:"mathord",htmlBuilder(t,e){return St.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new wn.MathNode("mi",[nm(t.text,t.mode,e)]),a=Qoe(t,e)||"italic";return a!==V9e[n.type]&&n.setAttribute("mathvariant",a),n}});Sx({type:"textord",htmlBuilder(t,e){return St.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=nm(t.text,t.mode,e),a=Qoe(t,e)||"normal",r;return t.mode==="text"?r=new wn.MathNode("mtext",[n]):/[0-9]/.test(t.text)?r=new wn.MathNode("mn",[n]):t.text==="\\prime"?r=new wn.MathNode("mo",[n]):r=new wn.MathNode("mi",[n]),a!==V9e[r.type]&&r.setAttribute("mathvariant",a),r}});var GU={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},HU={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Sx({type:"spacing",htmlBuilder(t,e){if(HU.hasOwnProperty(t.text)){var n=HU[t.text].className||"";if(t.mode==="text"){var a=St.makeOrd(t,e,"textord");return a.classes.push(n),a}else return St.makeSpan(["mspace",n],[St.mathsym(t.text,t.mode,e)],e)}else{if(GU.hasOwnProperty(t.text))return St.makeSpan(["mspace",GU[t.text]],[],e);throw new On('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(HU.hasOwnProperty(t.text))n=new wn.MathNode("mtext",[new wn.TextNode(" ")]);else{if(GU.hasOwnProperty(t.text))return new wn.MathNode("mspace");throw new On('Unknown type of space "'+t.text+'"')}return n}});var Zhe=()=>{var t=new wn.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Sx({type:"tag",mathmlBuilder(t,e){var n=new wn.MathNode("mtable",[new wn.MathNode("mtr",[Zhe(),new wn.MathNode("mtd",[xw(t.body,e)]),Zhe(),new wn.MathNode("mtd",[xw(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var Khe={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Jhe={"\\textbf":"textbf","\\textmd":"textmd"},VEt={"\\textit":"textit","\\textup":"textup"},efe=(t,e)=>{var n=t.font;if(n){if(Khe[n])return e.withTextFontFamily(Khe[n]);if(Jhe[n])return e.withTextFontWeight(Jhe[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(VEt[n])};Nn({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:n,funcName:a}=t,r=e[0];return{type:"text",mode:n.mode,body:_s(r),font:a}},htmlBuilder(t,e){var n=efe(t,e),a=Ec(t.body,n,!0);return St.makeSpan(["mord","text"],a,n)},mathmlBuilder(t,e){var n=efe(t,e);return xw(t.body,n)}});Nn({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=jr(t.body,e),a=St.makeLineSpan("underline-line",e),r=e.fontMetrics().defaultRuleThickness,i=St.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:r},{type:"elem",elem:a},{type:"kern",size:3*r},{type:"elem",elem:n}]},e);return St.makeSpan(["mord","underline"],[i],e)},mathmlBuilder(t,e){var n=new wn.MathNode("mo",[new wn.TextNode("‾")]);n.setAttribute("stretchy","true");var a=new wn.MathNode("munder",[Mi(t.body,e),n]);return a.setAttribute("accentunder","true"),a}});Nn({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=jr(t.body,e),a=e.fontMetrics().axisHeight,r=.5*(n.height-a-(n.depth+a));return St.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new wn.MathNode("mpadded",[Mi(t.body,e)],["vcenter"])}});Nn({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new On("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=tfe(t),a=[],r=e.havingStyle(e.style.text()),i=0;it.body.replace(/ /g,t.star?"␣":" "),T0=y9e,Z9e=`[ \r ]`,ZEt="\\\\[a-zA-Z@]+",KEt="\\\\[^\uD800-\uDFFF]",JEt="("+ZEt+")"+Z9e+"*",e2t=`\\\\( |[ \r ]+ ?)[ \r ]*`,BK="[̀-ͯ]",t2t=new RegExp(BK+"+$"),n2t="("+Z9e+"+)|"+(e2t+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(BK+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(BK+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+JEt)+("|"+KEt+")");let nfe=class{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(n2t,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new Sh("EOF",new kp(this,n,n));var a=this.tokenRegex.exec(e);if(a===null||a.index!==n)throw new On("Unexpected character: '"+e[n]+"'",new Sh(e[n],new kp(this,n,n+1)));var r=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[r]===14){var i=e.indexOf(` `,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new Sh(r,new kp(this,n,this.tokenRegex.lastIndex))}};class a2t{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new On("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}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,n,a){if(a===void 0&&(a=!1),a){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var r2t=M9e;Fe("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});Fe("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});Fe("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});Fe("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});Fe("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});Fe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Fe("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var afe={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};Fe("\\char",function(t){var e=t.popToken(),n,a="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new On("\\char` missing argument");a=e.text.charCodeAt(0)}else n=10;if(n){if(a=afe[e.text],a==null||a>=n)throw new On("Invalid base-"+n+" digit "+e.text);for(var r;(r=afe[t.future().text])!=null&&r{var r=t.consumeArg().tokens;if(r.length!==1)throw new On("\\newcommand's first argument must be a macro name");var i=r[0].text,o=t.isDefined(i);if(o&&!e)throw new On("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!n)throw new On("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(r=t.consumeArg().tokens,r.length===1&&r[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new On("Invalid number of arguments: "+l);s=parseInt(l),r=t.consumeArg().tokens}return o&&a||t.macros.set(i,{tokens:r,numArgs:s}),""};Fe("\\newcommand",t=>Noe(t,!1,!0,!1));Fe("\\renewcommand",t=>Noe(t,!0,!1,!1));Fe("\\providecommand",t=>Noe(t,!0,!0,!0));Fe("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});Fe("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});Fe("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),T0[n],Ji.math[n],Ji.text[n]),""});Fe("\\bgroup","{");Fe("\\egroup","}");Fe("~","\\nobreakspace");Fe("\\lq","`");Fe("\\rq","'");Fe("\\aa","\\r a");Fe("\\AA","\\r A");Fe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");Fe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Fe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");Fe("ℬ","\\mathscr{B}");Fe("ℰ","\\mathscr{E}");Fe("ℱ","\\mathscr{F}");Fe("ℋ","\\mathscr{H}");Fe("ℐ","\\mathscr{I}");Fe("ℒ","\\mathscr{L}");Fe("ℳ","\\mathscr{M}");Fe("ℛ","\\mathscr{R}");Fe("ℭ","\\mathfrak{C}");Fe("ℌ","\\mathfrak{H}");Fe("ℨ","\\mathfrak{Z}");Fe("\\Bbbk","\\Bbb{k}");Fe("·","\\cdotp");Fe("\\llap","\\mathllap{\\textrm{#1}}");Fe("\\rlap","\\mathrlap{\\textrm{#1}}");Fe("\\clap","\\mathclap{\\textrm{#1}}");Fe("\\mathstrut","\\vphantom{(}");Fe("\\underbar","\\underline{\\text{#1}}");Fe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');Fe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");Fe("\\ne","\\neq");Fe("≠","\\neq");Fe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");Fe("∉","\\notin");Fe("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");Fe("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");Fe("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");Fe("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");Fe("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");Fe("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");Fe("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");Fe("⟂","\\perp");Fe("‼","\\mathclose{!\\mkern-0.8mu!}");Fe("∌","\\notni");Fe("⌜","\\ulcorner");Fe("⌝","\\urcorner");Fe("⌞","\\llcorner");Fe("⌟","\\lrcorner");Fe("©","\\copyright");Fe("®","\\textregistered");Fe("️","\\textregistered");Fe("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Fe("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Fe("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Fe("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Fe("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Fe("⋮","\\vdots");Fe("\\varGamma","\\mathit{\\Gamma}");Fe("\\varDelta","\\mathit{\\Delta}");Fe("\\varTheta","\\mathit{\\Theta}");Fe("\\varLambda","\\mathit{\\Lambda}");Fe("\\varXi","\\mathit{\\Xi}");Fe("\\varPi","\\mathit{\\Pi}");Fe("\\varSigma","\\mathit{\\Sigma}");Fe("\\varUpsilon","\\mathit{\\Upsilon}");Fe("\\varPhi","\\mathit{\\Phi}");Fe("\\varPsi","\\mathit{\\Psi}");Fe("\\varOmega","\\mathit{\\Omega}");Fe("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Fe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Fe("\\boxed","\\fbox{$\\displaystyle{#1}$}");Fe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Fe("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Fe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Fe("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Fe("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var rfe={",":"\\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"};Fe("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in rfe?e=rfe[n]:(n.slice(0,4)==="\\not"||n in Ji.math&&va.contains(["bin","rel"],Ji.math[n].group))&&(e="\\dotsb"),e});var Moe={")":!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};Fe("\\dotso",function(t){var e=t.future().text;return e in Moe?"\\ldots\\,":"\\ldots"});Fe("\\dotsc",function(t){var e=t.future().text;return e in Moe&&e!==","?"\\ldots\\,":"\\ldots"});Fe("\\cdots",function(t){var e=t.future().text;return e in Moe?"\\@cdots\\,":"\\@cdots"});Fe("\\dotsb","\\cdots");Fe("\\dotsm","\\cdots");Fe("\\dotsi","\\!\\cdots");Fe("\\dotsx","\\ldots\\,");Fe("\\DOTSI","\\relax");Fe("\\DOTSB","\\relax");Fe("\\DOTSX","\\relax");Fe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Fe("\\,","\\tmspace+{3mu}{.1667em}");Fe("\\thinspace","\\,");Fe("\\>","\\mskip{4mu}");Fe("\\:","\\tmspace+{4mu}{.2222em}");Fe("\\medspace","\\:");Fe("\\;","\\tmspace+{5mu}{.2777em}");Fe("\\thickspace","\\;");Fe("\\!","\\tmspace-{3mu}{.1667em}");Fe("\\negthinspace","\\!");Fe("\\negmedspace","\\tmspace-{4mu}{.2222em}");Fe("\\negthickspace","\\tmspace-{5mu}{.277em}");Fe("\\enspace","\\kern.5em ");Fe("\\enskip","\\hskip.5em\\relax");Fe("\\quad","\\hskip1em\\relax");Fe("\\qquad","\\hskip2em\\relax");Fe("\\tag","\\@ifstar\\tag@literal\\tag@paren");Fe("\\tag@paren","\\tag@literal{({#1})}");Fe("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new On("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Fe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Fe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Fe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Fe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Fe("\\newline","\\\\\\relax");Fe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var K9e=Qn(hh["Main-Regular"][84][1]-.7*hh["Main-Regular"][65][1]);Fe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+K9e+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Fe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+K9e+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Fe("\\hspace","\\@ifstar\\@hspacer\\@hspace");Fe("\\@hspace","\\hskip #1\\relax");Fe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Fe("\\ordinarycolon",":");Fe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Fe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Fe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Fe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Fe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Fe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Fe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Fe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Fe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Fe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Fe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Fe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Fe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Fe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Fe("∷","\\dblcolon");Fe("∹","\\eqcolon");Fe("≔","\\coloneqq");Fe("≕","\\eqqcolon");Fe("⩴","\\Coloneqq");Fe("\\ratio","\\vcentcolon");Fe("\\coloncolon","\\dblcolon");Fe("\\colonequals","\\coloneqq");Fe("\\coloncolonequals","\\Coloneqq");Fe("\\equalscolon","\\eqqcolon");Fe("\\equalscoloncolon","\\Eqqcolon");Fe("\\colonminus","\\coloneq");Fe("\\coloncolonminus","\\Coloneq");Fe("\\minuscolon","\\eqcolon");Fe("\\minuscoloncolon","\\Eqcolon");Fe("\\coloncolonapprox","\\Colonapprox");Fe("\\coloncolonsim","\\Colonsim");Fe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Fe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Fe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Fe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Fe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");Fe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Fe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Fe("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Fe("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Fe("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Fe("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Fe("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Fe("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Fe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");Fe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");Fe("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");Fe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");Fe("\\nleqq","\\html@mathml{\\@nleqq}{≰}");Fe("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");Fe("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");Fe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");Fe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");Fe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");Fe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");Fe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");Fe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");Fe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");Fe("\\imath","\\html@mathml{\\@imath}{ı}");Fe("\\jmath","\\html@mathml{\\@jmath}{ȷ}");Fe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");Fe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");Fe("⟦","\\llbracket");Fe("⟧","\\rrbracket");Fe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");Fe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");Fe("⦃","\\lBrace");Fe("⦄","\\rBrace");Fe("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");Fe("⦵","\\minuso");Fe("\\darr","\\downarrow");Fe("\\dArr","\\Downarrow");Fe("\\Darr","\\Downarrow");Fe("\\lang","\\langle");Fe("\\rang","\\rangle");Fe("\\uarr","\\uparrow");Fe("\\uArr","\\Uparrow");Fe("\\Uarr","\\Uparrow");Fe("\\N","\\mathbb{N}");Fe("\\R","\\mathbb{R}");Fe("\\Z","\\mathbb{Z}");Fe("\\alef","\\aleph");Fe("\\alefsym","\\aleph");Fe("\\Alpha","\\mathrm{A}");Fe("\\Beta","\\mathrm{B}");Fe("\\bull","\\bullet");Fe("\\Chi","\\mathrm{X}");Fe("\\clubs","\\clubsuit");Fe("\\cnums","\\mathbb{C}");Fe("\\Complex","\\mathbb{C}");Fe("\\Dagger","\\ddagger");Fe("\\diamonds","\\diamondsuit");Fe("\\empty","\\emptyset");Fe("\\Epsilon","\\mathrm{E}");Fe("\\Eta","\\mathrm{H}");Fe("\\exist","\\exists");Fe("\\harr","\\leftrightarrow");Fe("\\hArr","\\Leftrightarrow");Fe("\\Harr","\\Leftrightarrow");Fe("\\hearts","\\heartsuit");Fe("\\image","\\Im");Fe("\\infin","\\infty");Fe("\\Iota","\\mathrm{I}");Fe("\\isin","\\in");Fe("\\Kappa","\\mathrm{K}");Fe("\\larr","\\leftarrow");Fe("\\lArr","\\Leftarrow");Fe("\\Larr","\\Leftarrow");Fe("\\lrarr","\\leftrightarrow");Fe("\\lrArr","\\Leftrightarrow");Fe("\\Lrarr","\\Leftrightarrow");Fe("\\Mu","\\mathrm{M}");Fe("\\natnums","\\mathbb{N}");Fe("\\Nu","\\mathrm{N}");Fe("\\Omicron","\\mathrm{O}");Fe("\\plusmn","\\pm");Fe("\\rarr","\\rightarrow");Fe("\\rArr","\\Rightarrow");Fe("\\Rarr","\\Rightarrow");Fe("\\real","\\Re");Fe("\\reals","\\mathbb{R}");Fe("\\Reals","\\mathbb{R}");Fe("\\Rho","\\mathrm{P}");Fe("\\sdot","\\cdot");Fe("\\sect","\\S");Fe("\\spades","\\spadesuit");Fe("\\sub","\\subset");Fe("\\sube","\\subseteq");Fe("\\supe","\\supseteq");Fe("\\Tau","\\mathrm{T}");Fe("\\thetasym","\\vartheta");Fe("\\weierp","\\wp");Fe("\\Zeta","\\mathrm{Z}");Fe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Fe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Fe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Fe("\\bra","\\mathinner{\\langle{#1}|}");Fe("\\ket","\\mathinner{|{#1}\\rangle}");Fe("\\braket","\\mathinner{\\langle{#1}\\rangle}");Fe("\\Bra","\\left\\langle#1\\right|");Fe("\\Ket","\\left|#1\\right\\rangle");var J9e=t=>e=>{var n=e.consumeArg().tokens,a=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.consumeArg().tokens,o=e.macros.get("|"),s=e.macros.get("\\|");e.macros.beginGroup();var l=p=>A=>{t&&(A.macros.set("|",o),r.length&&A.macros.set("\\|",s));var m=p;if(!p&&r.length){var g=A.future();g.text==="|"&&(A.popToken(),m=!0)}return{tokens:m?r:a,numArgs:0}};e.macros.set("|",l(!1)),r.length&&e.macros.set("\\|",l(!0));var u=e.consumeArg().tokens,d=e.expandTokens([...i,...u,...n]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Fe("\\bra@ket",J9e(!1));Fe("\\bra@set",J9e(!0));Fe("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Fe("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Fe("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Fe("\\angln","{\\angl n}");Fe("\\blue","\\textcolor{##6495ed}{#1}");Fe("\\orange","\\textcolor{##ffa500}{#1}");Fe("\\pink","\\textcolor{##ff00af}{#1}");Fe("\\red","\\textcolor{##df0030}{#1}");Fe("\\green","\\textcolor{##28ae7b}{#1}");Fe("\\gray","\\textcolor{gray}{#1}");Fe("\\purple","\\textcolor{##9d38bd}{#1}");Fe("\\blueA","\\textcolor{##ccfaff}{#1}");Fe("\\blueB","\\textcolor{##80f6ff}{#1}");Fe("\\blueC","\\textcolor{##63d9ea}{#1}");Fe("\\blueD","\\textcolor{##11accd}{#1}");Fe("\\blueE","\\textcolor{##0c7f99}{#1}");Fe("\\tealA","\\textcolor{##94fff5}{#1}");Fe("\\tealB","\\textcolor{##26edd5}{#1}");Fe("\\tealC","\\textcolor{##01d1c1}{#1}");Fe("\\tealD","\\textcolor{##01a995}{#1}");Fe("\\tealE","\\textcolor{##208170}{#1}");Fe("\\greenA","\\textcolor{##b6ffb0}{#1}");Fe("\\greenB","\\textcolor{##8af281}{#1}");Fe("\\greenC","\\textcolor{##74cf70}{#1}");Fe("\\greenD","\\textcolor{##1fab54}{#1}");Fe("\\greenE","\\textcolor{##0d923f}{#1}");Fe("\\goldA","\\textcolor{##ffd0a9}{#1}");Fe("\\goldB","\\textcolor{##ffbb71}{#1}");Fe("\\goldC","\\textcolor{##ff9c39}{#1}");Fe("\\goldD","\\textcolor{##e07d10}{#1}");Fe("\\goldE","\\textcolor{##a75a05}{#1}");Fe("\\redA","\\textcolor{##fca9a9}{#1}");Fe("\\redB","\\textcolor{##ff8482}{#1}");Fe("\\redC","\\textcolor{##f9685d}{#1}");Fe("\\redD","\\textcolor{##e84d39}{#1}");Fe("\\redE","\\textcolor{##bc2612}{#1}");Fe("\\maroonA","\\textcolor{##ffbde0}{#1}");Fe("\\maroonB","\\textcolor{##ff92c6}{#1}");Fe("\\maroonC","\\textcolor{##ed5fa6}{#1}");Fe("\\maroonD","\\textcolor{##ca337c}{#1}");Fe("\\maroonE","\\textcolor{##9e034e}{#1}");Fe("\\purpleA","\\textcolor{##ddd7ff}{#1}");Fe("\\purpleB","\\textcolor{##c6b9fc}{#1}");Fe("\\purpleC","\\textcolor{##aa87ff}{#1}");Fe("\\purpleD","\\textcolor{##7854ab}{#1}");Fe("\\purpleE","\\textcolor{##543b78}{#1}");Fe("\\mintA","\\textcolor{##f5f9e8}{#1}");Fe("\\mintB","\\textcolor{##edf2df}{#1}");Fe("\\mintC","\\textcolor{##e0e5cc}{#1}");Fe("\\grayA","\\textcolor{##f6f7f7}{#1}");Fe("\\grayB","\\textcolor{##f0f1f2}{#1}");Fe("\\grayC","\\textcolor{##e3e5e6}{#1}");Fe("\\grayD","\\textcolor{##d6d8da}{#1}");Fe("\\grayE","\\textcolor{##babec2}{#1}");Fe("\\grayF","\\textcolor{##888d93}{#1}");Fe("\\grayG","\\textcolor{##626569}{#1}");Fe("\\grayH","\\textcolor{##3b3e40}{#1}");Fe("\\grayI","\\textcolor{##21242c}{#1}");Fe("\\kaBlue","\\textcolor{##314453}{#1}");Fe("\\kaGreen","\\textcolor{##71B307}{#1}");var eRe={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class i2t{constructor(e,n,a){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=n,this.expansionCount=0,this.feed(e),this.macros=new a2t(r2t,n.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new nfe(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 n,a,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:r,end:a}=this.consumeArg(["]"])}else({tokens:r,start:n,end:a}=this.consumeArg());return this.pushToken(new Sh("EOF",a.loc)),this.pushTokens(r),n.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var n=[],a=e&&e.length>0;a||this.consumeSpaces();var r=this.future(),i,o=0,s=0;do{if(i=this.popToken(),n.push(i),i.text==="{")++o;else if(i.text==="}"){if(--o,o===-1)throw new On("Extra }",i)}else if(i.text==="EOF")throw new On("Unexpected end of input in a macro argument, expected '"+(e&&a?e[s]:"}")+"'",i);if(e&&a)if((o===0||o===1&&e[s]==="{")&&i.text===e[s]){if(++s,s===e.length){n.splice(-s,s);break}}else s=0}while(o!==0||a);return r.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:r,end:i}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new On("The length of delimiters doesn't match the number of args!");for(var a=n[0],r=0;rthis.settings.maxExpand)throw new On("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var n=this.popToken(),a=n.text,r=n.noexpand?null:this._getExpansion(a);if(r==null||e&&r.unexpandable){if(e&&r==null&&a[0]==="\\"&&!this.isDefined(a))throw new On("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var i=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var s=i.length-1;s>=0;--s){var l=i[s];if(l.text==="#"){if(s===0)throw new On("Incomplete placeholder at end of macro body",l);if(l=i[--s],l.text==="#")i.splice(s+1,1);else if(/^[1-9]$/.test(l.text))i.splice(s,2,...o[+l.text-1]);else throw new On("Not a valid argument number",l)}}}return this.pushTokens(i),i.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 Sh(e)]):void 0}expandTokens(e){var n=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),n.push(r)}return this.countExpansion(n.length),n}expandMacroAsText(e){var n=this.expandMacro(e);return n&&n.map(a=>a.text).join("")}_getExpansion(e){var n=this.macros.get(e);if(n==null)return n;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var r=typeof n=="function"?n(this):n;if(typeof r=="string"){var i=0;if(r.indexOf("#")!==-1)for(var o=r.replace(/##/g,"");o.indexOf("#"+(i+1))!==-1;)++i;for(var s=new nfe(r,this.settings),l=[],u=s.lex();u.text!=="EOF";)l.push(u),u=s.lex();l.reverse();var d={tokens:l,numArgs:i};return d}return r}isDefined(e){return this.macros.has(e)||T0.hasOwnProperty(e)||Ji.math.hasOwnProperty(e)||Ji.text.hasOwnProperty(e)||eRe.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:T0.hasOwnProperty(e)&&!T0[e].primitive}}var ife=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,vT=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),WU={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ofe={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};let tRe=class nRe{constructor(e,n){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 i2t(e,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(e,n){if(n===void 0&&(n=!0),this.fetch().text!==e)throw new On("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());n&&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 n=this.nextToken;this.consume(),this.gullet.pushToken(new Sh("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,a}parseExpression(e,n){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var r=this.fetch();if(nRe.endOfExpression.indexOf(r.text)!==-1||n&&r.text===n||e&&T0[r.text]&&T0[r.text].infix)break;var i=this.parseAtom(n);if(i){if(i.type==="internal")continue}else break;a.push(i)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var n=-1,a,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var s=Ji[this.mode][n].group,l=kp.range(e),u;if(WBt.hasOwnProperty(s)){var d=s;u={type:"atom",mode:this.mode,family:d,loc:l,text:n}}else u={type:s,mode:this.mode,loc:l,text:n};o=u}else if(n.charCodeAt(0)>=128)this.settings.strict&&(c9e(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:kp.range(e),text:n};else return null;if(this.consume(),i)for(var p=0;p=55296&&d<=57343?r+="���":r+=String.fromCharCode(d),i+=6;continue}}if((s&248)===240&&i+91114111?r+="����":(p-=65536,r+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),i+=9;continue}}r+="�"}return r})}oB.defaultChars=";/?:@&=+$,#";oB.componentChars="";const cfe={};function s2t(t){let e=cfe[t];if(e)return e;e=cfe[t]=[];for(let n=0;n<128;n++){const a=String.fromCharCode(n);/^[0-9a-z]$/i.test(a)?e.push(a):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const a=s2t(e);let r="";for(let i=0,o=t.length;i=55296&&s<=57343){if(s>=55296&&s<=56319&&i+1=56320&&l<=57343){r+=encodeURIComponent(t[i]+t[i+1]),i++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(t[i])}return r}j$.defaultChars=";/?:@&=+$,-_.!~*'()#";j$.componentChars="-_.!~*'()";function joe(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function YR(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const c2t=/^([a-z0-9.+-]+:)/i,l2t=/:[0-9]*$/,u2t=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d2t=["<",">",'"',"`"," ","\r",` `," "],p2t=["{","}","|","\\","^","`"].concat(d2t),A2t=["'"].concat(p2t),lfe=["%","/","?",";","#"].concat(A2t),ufe=["/","?","#"],m2t=255,dfe=/^[+a-z0-9A-Z_-]{0,63}$/,g2t=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pfe={javascript:!0,"javascript:":!0},Afe={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Uoe(t,e){if(t&&t instanceof YR)return t;const n=new YR;return n.parse(t,e),n}YR.prototype.parse=function(t,e){let n,a,r,i=t;if(i=i.trim(),!e&&t.split("#").length===1){const u=u2t.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let o=c2t.exec(i);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,i=i.substr(o.length)),(e||o||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=i.substr(0,2)==="//",r&&!(o&&pfe[o])&&(i=i.substr(2),this.slashes=!0)),!pfe[o]&&(r||o&&!Afe[o])){let u=-1;for(let g=0;g127?y+="x":y+=b[w];if(!y.match(dfe)){const w=g.slice(0,h),v=g.slice(h+1),k=b.match(g2t);k&&(w.push(k[1]),v.unshift(k[2])),v.length&&(i=v.join(".")+i),this.hostname=w.join(".");break}}}}this.hostname.length>m2t&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=i.indexOf("#");s!==-1&&(this.hash=i.substr(s),i=i.slice(0,s));const l=i.indexOf("?");return l!==-1&&(this.search=i.substr(l),i=i.slice(0,l)),i&&(this.pathname=i),Afe[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};YR.prototype.parseHost=function(t){let e=l2t.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const h2t=Object.freeze(Object.defineProperty({__proto__:null,decode:oB,encode:j$,format:joe,parse:Uoe},Symbol.toStringTag,{value:"Module"})),lRe=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uRe=/[\0-\x1F\x7F-\x9F]/,f2t=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Goe=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,dRe=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,pRe=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,b2t=Object.freeze(Object.defineProperty({__proto__:null,Any:lRe,Cc:uRe,Cf:f2t,P:Goe,S:dRe,Z:pRe},Symbol.toStringTag,{value:"Module"})),y2t=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),w2t=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var YU;const v2t=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),k2t=(YU=String.fromCodePoint)!==null&&YU!==void 0?YU:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function x2t(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=v2t.get(t))!==null&&e!==void 0?e:t}var Kc;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(Kc||(Kc={}));const O2t=32;var P0;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(P0||(P0={}));function SK(t){return t>=Kc.ZERO&&t<=Kc.NINE}function C2t(t){return t>=Kc.UPPER_A&&t<=Kc.UPPER_F||t>=Kc.LOWER_A&&t<=Kc.LOWER_F}function _2t(t){return t>=Kc.UPPER_A&&t<=Kc.UPPER_Z||t>=Kc.LOWER_A&&t<=Kc.LOWER_Z||SK(t)}function B2t(t){return t===Kc.EQUALS||_2t(t)}var Gc;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Gc||(Gc={}));var x0;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(x0||(x0={}));class E2t{constructor(e,n,a){this.decodeTree=e,this.emitCodePoint=n,this.errors=a,this.state=Gc.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=x0.Strict}startEntity(e){this.decodeMode=e,this.state=Gc.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Gc.EntityStart:return e.charCodeAt(n)===Kc.NUM?(this.state=Gc.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Gc.NamedEntity,this.stateNamedEntity(e,n));case Gc.NumericStart:return this.stateNumericStart(e,n);case Gc.NumericDecimal:return this.stateNumericDecimal(e,n);case Gc.NumericHex:return this.stateNumericHex(e,n);case Gc.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|O2t)===Kc.LOWER_X?(this.state=Gc.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Gc.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,a,r){if(n!==a){const i=a-n;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(n,i),r),this.consumed+=i}}stateNumericHex(e,n){const a=n;for(;n>14;for(;n>14,i!==0){if(o===Kc.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==x0.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:a}=this,r=(a[n]&P0.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,a){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[e]&~P0.VALUE_LENGTH:r[e+1],a),n===3&&this.emitCodePoint(r[e+2],a),a}end(){var e;switch(this.state){case Gc.NamedEntity:return this.result!==0&&(this.decodeMode!==x0.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Gc.NumericDecimal:return this.emitNumericEntity(0,2);case Gc.NumericHex:return this.emitNumericEntity(0,3);case Gc.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Gc.EntityStart:return 0}}}function ARe(t){let e="";const n=new E2t(t,a=>e+=k2t(a));return function(r,i){let o=0,s=0;for(;(s=r.indexOf("&",s))>=0;){e+=r.slice(o,s),n.startEntity(i);const u=n.write(r,s+1);if(u<0){o=s+n.end();break}o=s+u,s=u===0?o+1:o}const l=e+r.slice(o);return e="",l}}function Q2t(t,e,n,a){const r=(e&P0.BRANCH_LENGTH)>>7,i=e&P0.JUMP_TABLE;if(r===0)return i!==0&&a===i?n:-1;if(i){const l=a-i;return l<0||l>=r?-1:t[n+l]-1}let o=n,s=o+r-1;for(;o<=s;){const l=o+s>>>1,u=t[l];if(ua)s=l-1;else return t[l+r]}return-1}const S2t=ARe(y2t);ARe(w2t);function mRe(t,e=x0.Legacy){return S2t(t,e)}function I2t(t){return Object.prototype.toString.call(t)}function Hoe(t){return I2t(t)==="[object String]"}const D2t=Object.prototype.hasOwnProperty;function $2t(t,e){return D2t.call(t,e)}function CM(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(a){t[a]=n[a]})}}),t}function gRe(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function Woe(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function XR(t){if(t>65535){t-=65536;const e=55296+(t>>10),n=56320+(t&1023);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const hRe=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,T2t=/&([a-z#][a-z0-9]{1,31});/gi,P2t=new RegExp(hRe.source+"|"+T2t.source,"gi"),F2t=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function R2t(t,e){if(e.charCodeAt(0)===35&&F2t.test(e)){const a=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Woe(a)?XR(a):t}const n=mRe(t);return n!==t?n:t}function L2t(t){return t.indexOf("\\")<0?t:t.replace(hRe,"$1")}function sB(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(P2t,function(e,n,a){return n||R2t(e,a)})}const N2t=/[&<>"]/,M2t=/[&<>"]/g,z2t={"&":"&","<":"<",">":">",'"':"""};function q2t(t){return z2t[t]}function Ow(t){return N2t.test(t)?t.replace(M2t,q2t):t}const j2t=/[.?*+^$[\]\\(){}|-]/g;function U2t(t){return t.replace(j2t,"\\$&")}function Ki(t){switch(t){case 9:case 32:return!0}return!1}function G4(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function H4(t){return Goe.test(t)||dRe.test(t)}function W4(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function _M(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const G2t={mdurl:h2t,ucmicro:b2t},H2t=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:gRe,assign:CM,escapeHtml:Ow,escapeRE:U2t,fromCodePoint:XR,has:$2t,isMdAsciiPunct:W4,isPunctChar:H4,isSpace:Ki,isString:Hoe,isValidEntityCode:Woe,isWhiteSpace:G4,lib:G2t,normalizeReference:_M,unescapeAll:sB,unescapeMd:L2t},Symbol.toStringTag,{value:"Module"}));function W2t(t,e,n){let a,r,i,o;const s=t.posMax,l=t.pos;for(t.pos=e+1,a=1;t.pos32))return i;if(a===41){if(o===0)break;o--}r++}return e===r||o!==0||(i.str=sB(t.slice(e,r)),i.pos=r,i.ok=!0),i}function X2t(t,e,n,a){let r,i=e;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(a)o.str=a.str,o.marker=a.marker;else{if(i>=n)return o;let s=t.charCodeAt(i);if(s!==34&&s!==39&&s!==40)return o;e++,i++,s===40&&(s=41),o.marker=s}for(;i"+Ow(i.content)+""};Jh.code_block=function(t,e,n,a,r){const i=t[e];return""+Ow(t[e].content)+` `};Jh.fence=function(t,e,n,a,r){const i=t[e],o=i.info?sB(i.info).trim():"";let s="",l="";if(o){const d=o.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let u;if(n.highlight?u=n.highlight(i.content,s,l)||Ow(i.content):u=Ow(i.content),u.indexOf("${u} `}return`
    ${u}
    `};Jh.image=function(t,e,n,a,r){const i=t[e];return i.attrs[i.attrIndex("alt")][1]=r.renderInlineAsText(i.children,n,a),r.renderToken(t,e,n)};Jh.hardbreak=function(t,e,n){return n.xhtmlOut?`
    `:`
    `};Jh.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`
    `:`
    `:` `};Jh.text=function(t,e){return Ow(t[e].content)};Jh.html_block=function(t,e){return t[e].content};Jh.html_inline=function(t,e){return t[e].content};function dE(){this.rules=CM({},Jh)}dE.prototype.renderAttrs=function(e){let n,a,r;if(!e.attrs)return"";for(r="",n=0,a=e.attrs.length;n `:">",i};dE.prototype.renderInline=function(t,e,n){let a="";const r=this.rules;for(let i=0,o=t.length;i=0&&(a=this.attrs[n][1]),a};yg.prototype.attrJoin=function(e,n){const a=this.attrIndex(e);a<0?this.attrPush([e,n]):this.attrs[a][1]=this.attrs[a][1]+" "+n};function fRe(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}fRe.prototype.Token=yg;const Z2t=/\r\n?|\n/g,K2t=/\0/g;function J2t(t){let e;e=t.src.replace(Z2t,` `),e=e.replace(K2t,"�"),t.src=e}function eQt(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function tQt(t){const e=t.tokens;for(let n=0,a=e.length;n\s]/i.test(t)}function aQt(t){return/^<\/a\s*>/i.test(t)}function rQt(t){const e=t.tokens;if(t.md.options.linkify)for(let n=0,a=e.length;n=0;o--){const s=r[o];if(s.type==="link_close"){for(o--;r[o].level!==s.level&&r[o].type!=="link_open";)o--;continue}if(s.type==="html_inline"&&(nQt(s.content)&&i>0&&i--,aQt(s.content)&&i++),!(i>0)&&s.type==="text"&&t.md.linkify.test(s.content)){const l=s.content;let u=t.md.linkify.match(l);const d=[];let p=s.level,A=0;u.length>0&&u[0].index===0&&o>0&&r[o-1].type==="text_special"&&(u=u.slice(1));for(let m=0;mA){const k=new t.Token("text","",0);k.content=l.slice(A,b),k.level=p,d.push(k)}const y=new t.Token("link_open","a",1);y.attrs=[["href",h]],y.level=p++,y.markup="linkify",y.info="auto",d.push(y);const w=new t.Token("text","",0);w.content=f,w.level=p,d.push(w);const v=new t.Token("link_close","a",-1);v.level=--p,v.markup="linkify",v.info="auto",d.push(v),A=u[m].lastIndex}if(A=0;n--){const a=t[n];a.type==="text"&&!e&&(a.content=a.content.replace(oQt,cQt)),a.type==="link_open"&&a.info==="auto"&&e--,a.type==="link_close"&&a.info==="auto"&&e++}}function uQt(t){let e=0;for(let n=t.length-1;n>=0;n--){const a=t[n];a.type==="text"&&!e&&bRe.test(a.content)&&(a.content=a.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),a.type==="link_open"&&a.info==="auto"&&e--,a.type==="link_close"&&a.info==="auto"&&e++}}function dQt(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(iQt.test(t.tokens[e].content)&&lQt(t.tokens[e].children),bRe.test(t.tokens[e].content)&&uQt(t.tokens[e].children))}const pQt=/['"]/,mfe=/['"]/g,gfe="’";function kT(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function AQt(t,e){let n;const a=[];for(let r=0;r=0&&!(a[n].level<=o);n--);if(a.length=n+1,i.type!=="text")continue;let s=i.content,l=0,u=s.length;e:for(;l=0)g=s.charCodeAt(d.index-1);else for(n=r-1;n>=0&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n--)if(t[n].content){g=t[n].content.charCodeAt(t[n].content.length-1);break}let h=32;if(l=48&&g<=57&&(A=p=!1),p&&A&&(p=f,A=b),!p&&!A){m&&(i.content=kT(i.content,d.index,gfe));continue}if(A)for(n=a.length-1;n>=0;n--){let v=a[n];if(a[n].level=0;e--)t.tokens[e].type!=="inline"||!pQt.test(t.tokens[e].content)||AQt(t.tokens[e].children,t)}function gQt(t){let e,n;const a=t.tokens,r=a.length;for(let i=0;i0&&this.level++,this.tokens.push(a),a};ef.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};ef.prototype.skipEmptyLines=function(e){for(let n=this.lineMax;en;)if(!Ki(this.src.charCodeAt(--e)))return e+1;return e};ef.prototype.skipChars=function(e,n){for(let a=this.src.length;ea;)if(n!==this.src.charCodeAt(--e))return e+1;return e};ef.prototype.getLines=function(e,n,a,r){if(e>=n)return"";const i=new Array(n-e);for(let o=0,s=e;sa?i[o]=new Array(l-a+1).join(" ")+this.src.slice(d,p):i[o]=this.src.slice(d,p)}return i.join("")};ef.prototype.Token=yg;const hQt=65536;function VU(t,e){const n=t.bMarks[e]+t.tShift[e],a=t.eMarks[e];return t.src.slice(n,a)}function hfe(t){const e=[],n=t.length;let a=0,r=t.charCodeAt(a),i=!1,o=0,s="";for(;an)return!1;let r=e+1;if(t.sCount[r]=4)return!1;let i=t.bMarks[r]+t.tShift[r];if(i>=t.eMarks[r])return!1;const o=t.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58||i>=t.eMarks[r])return!1;const s=t.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58&&!Ki(s)||o===45&&Ki(s))return!1;for(;i=4)return!1;u=hfe(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const p=u.length;if(p===0||p!==d.length)return!1;if(a)return!0;const A=t.parentType;t.parentType="table";const m=t.md.block.ruler.getRules("blockquote"),g=t.push("table_open","table",1),h=[e,0];g.map=h;const f=t.push("thead_open","thead",1);f.map=[e,e+1];const b=t.push("tr_open","tr",1);b.map=[e,e+1];for(let v=0;v=4||(u=hfe(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),w+=p-u.length,w>hQt))break;if(r===e+2){const _=t.push("tbody_open","tbody",1);_.map=y=[e+2,0]}const k=t.push("tr_open","tr",1);k.map=[r,r+1];for(let _=0;_=4){a++,r=a;continue}break}t.line=r;const i=t.push("code_block","code",0);return i.content=t.getLines(e,r,4+t.blkIndent,!1)+` `,i.map=[e,t.line],!0}function yQt(t,e,n,a){let r=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||r+3>i)return!1;const o=t.src.charCodeAt(r);if(o!==126&&o!==96)return!1;let s=r;r=t.skipChars(r,o);let l=r-s;if(l<3)return!1;const u=t.src.slice(s,r),d=t.src.slice(r,i);if(o===96&&d.indexOf(String.fromCharCode(o))>=0)return!1;if(a)return!0;let p=e,A=!1;for(;p++,!(p>=n||(r=s=t.bMarks[p]+t.tShift[p],i=t.eMarks[p],r=4)&&(r=t.skipChars(r,o),!(r-s=4||t.src.charCodeAt(r)!==62)return!1;if(a)return!0;const s=[],l=[],u=[],d=[],p=t.md.block.ruler.getRules("blockquote"),A=t.parentType;t.parentType="blockquote";let m=!1,g;for(g=e;g=i)break;if(t.src.charCodeAt(r++)===62&&!w){let k=t.sCount[g]+1,_,x;t.src.charCodeAt(r)===32?(r++,k++,x=!1,_=!0):t.src.charCodeAt(r)===9?(_=!0,(t.bsCount[g]+k)%4===3?(r++,k++,x=!1):x=!0):_=!1;let C=k;for(s.push(t.bMarks[g]),t.bMarks[g]=r;r=i,l.push(t.bsCount[g]),t.bsCount[g]=t.sCount[g]+1+(_?1:0),u.push(t.sCount[g]),t.sCount[g]=C-k,d.push(t.tShift[g]),t.tShift[g]=r-t.bMarks[g];continue}if(m)break;let v=!1;for(let k=0,_=p.length;k<_;k++)if(p[k](t,g,n,!0)){v=!0;break}if(v){t.lineMax=g,t.blkIndent!==0&&(s.push(t.bMarks[g]),l.push(t.bsCount[g]),d.push(t.tShift[g]),u.push(t.sCount[g]),t.sCount[g]-=t.blkIndent);break}s.push(t.bMarks[g]),l.push(t.bsCount[g]),d.push(t.tShift[g]),u.push(t.sCount[g]),t.sCount[g]=-1}const h=t.blkIndent;t.blkIndent=0;const f=t.push("blockquote_open","blockquote",1);f.markup=">";const b=[e,0];f.map=b,t.md.block.tokenize(t,e,g);const y=t.push("blockquote_close","blockquote",-1);y.markup=">",t.lineMax=o,t.parentType=A,b[1]=t.line;for(let w=0;w=4)return!1;let i=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;i=a)return-1;let i=t.src.charCodeAt(r++);if(i<48||i>57)return-1;for(;;){if(r>=a)return-1;if(i=t.src.charCodeAt(r++),i>=48&&i<=57){if(r-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return r=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(d=!0);let p,A,m;if((m=bfe(t,l))>=0){if(p=!0,o=t.bMarks[l]+t.tShift[l],A=Number(t.src.slice(o,m-1)),d&&A!==1)return!1}else if((m=ffe(t,l))>=0)p=!1;else return!1;if(d&&t.skipSpaces(m)>=t.eMarks[l])return!1;if(a)return!0;const g=t.src.charCodeAt(m-1),h=t.tokens.length;p?(s=t.push("ordered_list_open","ol",1),A!==1&&(s.attrs=[["start",A]])):s=t.push("bullet_list_open","ul",1);const f=[l,0];s.map=f,s.markup=String.fromCharCode(g);let b=!1;const y=t.md.block.ruler.getRules("list"),w=t.parentType;for(t.parentType="list";l=r?x=1:x=k-v,x>4&&(x=1);const C=v+x;s=t.push("list_item_open","li",1),s.markup=String.fromCharCode(g);const B=[l,0];s.map=B,p&&(s.info=t.src.slice(o,m-1));const I=t.tight,E=t.tShift[l],S=t.sCount[l],P=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=C,t.tight=!0,t.tShift[l]=_-t.bMarks[l],t.sCount[l]=k,_>=r&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),(!t.tight||b)&&(u=!1),b=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=P,t.tShift[l]=E,t.sCount[l]=S,t.tight=I,s=t.push("list_item_close","li",-1),s.markup=String.fromCharCode(g),l=t.line,B[1]=l,l>=n||t.sCount[l]=4)break;let O=!1;for(let T=0,D=y.length;T=4||t.src.charCodeAt(r)!==91)return!1;function s(y){const w=t.lineMax;if(y>=w||t.isEmpty(y))return null;let v=!1;if(t.sCount[y]-t.blkIndent>3&&(v=!0),t.sCount[y]<0&&(v=!0),!v){const x=t.md.block.ruler.getRules("reference"),C=t.parentType;t.parentType="reference";let B=!1;for(let I=0,E=x.length;I"u"&&(t.env.references={}),typeof t.env.references[b]>"u"&&(t.env.references[b]={title:f,href:p}),t.line=o),!0):!1}const CQt=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],_Qt="[a-zA-Z_:][a-zA-Z0-9:._-]*",BQt="[^\"'=<>`\\x00-\\x20]+",EQt="'[^']*'",QQt='"[^"]*"',SQt="(?:"+BQt+"|"+EQt+"|"+QQt+")",IQt="(?:\\s+"+_Qt+"(?:\\s*=\\s*"+SQt+")?)",yRe="<[A-Za-z][A-Za-z0-9\\-]*"+IQt+"*\\s*\\/?>",wRe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",DQt="",$Qt="<[?][\\s\\S]*?[?]>",TQt="]*>",PQt="",FQt=new RegExp("^(?:"+yRe+"|"+wRe+"|"+DQt+"|"+$Qt+"|"+TQt+"|"+PQt+")"),RQt=new RegExp("^(?:"+yRe+"|"+wRe+")"),$O=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(RQt.source+"\\s*$"),/^$/,!1]];function LQt(t,e,n,a){let r=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(r)!==60)return!1;let o=t.src.slice(r,i),s=0;for(;s<$O.length&&!$O[s][0].test(o);s++);if(s===$O.length)return!1;if(a)return $O[s][2];let l=e+1;if(!$O[s][1].test(o)){for(;l=4)return!1;let o=t.src.charCodeAt(r);if(o!==35||r>=i)return!1;let s=1;for(o=t.src.charCodeAt(++r);o===35&&r6||rr&&Ki(t.src.charCodeAt(l-1))&&(i=l),t.line=e+1;const u=t.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[e,t.line];const d=t.push("inline","",0);d.content=t.src.slice(r,i).trim(),d.map=[e,t.line],d.children=[];const p=t.push("heading_close","h"+String(s),-1);return p.markup="########".slice(0,s),!0}function MQt(t,e,n){const a=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const r=t.parentType;t.parentType="paragraph";let i=0,o,s=e+1;for(;s3)continue;if(t.sCount[s]>=t.blkIndent){let m=t.bMarks[s]+t.tShift[s];const g=t.eMarks[s];if(m=g))){i=o===61?1:2;break}}if(t.sCount[s]<0)continue;let A=!1;for(let m=0,g=a.length;m3||t.sCount[i]<0)continue;let u=!1;for(let d=0,p=a.length;d=n||t.sCount[o]=i){t.line=n;break}const l=t.line;let u=!1;for(let d=0;d=t.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),o=t.line,o0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(r),a};U$.prototype.scanDelims=function(t,e){const n=this.posMax,a=this.src.charCodeAt(t),r=t>0?this.src.charCodeAt(t-1):32;let i=t;for(;i0)return!1;const n=t.pos,a=t.posMax;if(n+3>a||t.src.charCodeAt(n)!==58||t.src.charCodeAt(n+1)!==47||t.src.charCodeAt(n+2)!==47)return!1;const r=t.pending.match(UQt);if(!r)return!1;const i=r[1],o=t.md.linkify.matchAtStart(t.src.slice(n-i.length));if(!o)return!1;let s=o.url;if(s.length<=i.length)return!1;s=s.replace(/\*+$/,"");const l=t.md.normalizeLink(s);if(!t.md.validateLink(l))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const u=t.push("link_open","a",1);u.attrs=[["href",l]],u.markup="linkify",u.info="auto";const d=t.push("text","",0);d.content=t.md.normalizeLinkText(s);const p=t.push("link_close","a",-1);p.markup="linkify",p.info="auto"}return t.pos+=s.length-i.length,!0}function HQt(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==10)return!1;const a=t.pending.length-1,r=t.posMax;if(!e)if(a>=0&&t.pending.charCodeAt(a)===32)if(a>=1&&t.pending.charCodeAt(a-1)===32){let i=a-1;for(;i>=1&&t.pending.charCodeAt(i-1)===32;)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(t){Xoe[t.charCodeAt(0)]=1});function WQt(t,e){let n=t.pos;const a=t.posMax;if(t.src.charCodeAt(n)!==92||(n++,n>=a))return!1;let r=t.src.charCodeAt(n);if(r===10){for(e||t.push("hardbreak","br",0),n++;n=55296&&r<=56319&&n+1=56320&&s<=57343&&(i+=t.src[n+1],n++)}const o="\\"+i;if(!e){const s=t.push("text_special","",0);r<256&&Xoe[r]!==0?s.content=i:s.content=o,s.markup=o,s.info="escape"}return t.pos=n+1,!0}function YQt(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==96)return!1;const r=n;n++;const i=t.posMax;for(;n=0;a--){const r=e[a];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const i=e[r.end],o=a>0&&e[a-1].end===r.end+1&&e[a-1].marker===r.marker&&e[a-1].token===r.token-1&&e[r.end+1].token===i.token+1,s=String.fromCharCode(r.marker),l=t.tokens[r.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?s+s:s,l.content="";const u=t.tokens[i.token];u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?s+s:s,u.content="",o&&(t.tokens[e[a-1].token].content="",t.tokens[e[r.end+1].token].content="",a--)}}function KQt(t){const e=t.tokens_meta,n=t.tokens_meta.length;wfe(t,t.delimiters);for(let a=0;a=p)return!1;if(l=g,r=t.md.helpers.parseLinkDestination(t.src,g,t.posMax),r.ok){for(o=t.md.normalizeLink(r.str),t.md.validateLink(o)?g=r.pos:o="",l=g;g=p||t.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof t.env.references>"u")return!1;if(g=0?a=t.src.slice(l,g++):g=m+1):g=m+1,a||(a=t.src.slice(A,m)),i=t.env.references[_M(a)],!i)return t.pos=d,!1;o=i.href,s=i.title}if(!e){t.pos=A,t.posMax=m;const h=t.push("link_open","a",1),f=[["href",o]];h.attrs=f,s&&f.push(["title",s]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=g,t.posMax=p,!0}function eSt(t,e){let n,a,r,i,o,s,l,u,d="";const p=t.pos,A=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;const m=t.pos+2,g=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(g<0)return!1;if(i=g+1,i=A)return!1;for(u=i,s=t.md.helpers.parseLinkDestination(t.src,i,t.posMax),s.ok&&(d=t.md.normalizeLink(s.str),t.md.validateLink(d)?i=s.pos:d=""),u=i;i=A||t.src.charCodeAt(i)!==41)return t.pos=p,!1;i++}else{if(typeof t.env.references>"u")return!1;if(i=0?r=t.src.slice(u,i++):i=g+1):i=g+1,r||(r=t.src.slice(m,g)),o=t.env.references[_M(r)],!o)return t.pos=p,!1;d=o.href,l=o.title}if(!e){a=t.src.slice(m,g);const h=[];t.md.inline.parse(a,t.md,t.env,h);const f=t.push("image","img",0),b=[["src",d],["alt",""]];f.attrs=b,f.children=h,f.content=a,l&&b.push(["title",l])}return t.pos=i,t.posMax=A,!0}const tSt=/^([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])?)*)$/,nSt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function aSt(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==60)return!1;const a=t.pos,r=t.posMax;for(;;){if(++n>=r)return!1;const o=t.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}const i=t.src.slice(a+1,n);if(nSt.test(i)){const o=t.md.normalizeLink(i);if(!t.md.validateLink(o))return!1;if(!e){const s=t.push("link_open","a",1);s.attrs=[["href",o]],s.markup="autolink",s.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(i);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=i.length+2,!0}if(tSt.test(i)){const o=t.md.normalizeLink("mailto:"+i);if(!t.md.validateLink(o))return!1;if(!e){const s=t.push("link_open","a",1);s.attrs=[["href",o]],s.markup="autolink",s.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(i);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=i.length+2,!0}return!1}function rSt(t){return/^\s]/i.test(t)}function iSt(t){return/^<\/a\s*>/i.test(t)}function oSt(t){const e=t|32;return e>=97&&e<=122}function sSt(t,e){if(!t.md.options.html)return!1;const n=t.posMax,a=t.pos;if(t.src.charCodeAt(a)!==60||a+2>=n)return!1;const r=t.src.charCodeAt(a+1);if(r!==33&&r!==63&&r!==47&&!oSt(r))return!1;const i=t.src.slice(a).match(FQt);if(!i)return!1;if(!e){const o=t.push("html_inline","",0);o.content=i[0],rSt(o.content)&&t.linkLevel++,iSt(o.content)&&t.linkLevel--}return t.pos+=i[0].length,!0}const cSt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,lSt=/^&([a-z][a-z0-9]{1,31});/i;function uSt(t,e){const n=t.pos,a=t.posMax;if(t.src.charCodeAt(n)!==38||n+1>=a)return!1;if(t.src.charCodeAt(n+1)===35){const i=t.src.slice(n).match(cSt);if(i){if(!e){const o=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),s=t.push("text_special","",0);s.content=Woe(o)?XR(o):XR(65533),s.markup=i[0],s.info="entity"}return t.pos+=i[0].length,!0}}else{const i=t.src.slice(n).match(lSt);if(i){const o=mRe(i[0]);if(o!==i[0]){if(!e){const s=t.push("text_special","",0);s.content=o,s.markup=i[0],s.info="entity"}return t.pos+=i[0].length,!0}}}return!1}function vfe(t){const e={},n=t.length;if(!n)return;let a=0,r=-2;const i=[];for(let o=0;ol;u-=i[u]+1){const p=t[u];if(p.marker===s.marker&&p.open&&p.end<0){let A=!1;if((p.close||s.open)&&(p.length+s.length)%3===0&&(p.length%3!==0||s.length%3!==0)&&(A=!0),!A){const m=u>0&&!t[u-1].open?i[u-1]+1:0;i[o]=o-u+m,i[u]=m,s.open=!1,p.end=o,p.close=!1,d=-1,r=-2;break}}}d!==-1&&(e[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function dSt(t){const e=t.tokens_meta,n=t.tokens_meta.length;vfe(t.delimiters);for(let a=0;a0&&a++,r[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;o||t.pos++,i[e]=t.pos};G$.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,a=t.posMax,r=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(t.pos>=a)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};G$.prototype.parse=function(t,e,n,a){const r=new this.State(t,e,n,a);this.tokenize(r);const i=this.ruler2.getRules(""),o=i.length;for(let s=0;s|$))",e.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function IK(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(a){t[a]=n[a]})}),t}function EM(t){return Object.prototype.toString.call(t)}function mSt(t){return EM(t)==="[object String]"}function gSt(t){return EM(t)==="[object Object]"}function hSt(t){return EM(t)==="[object RegExp]"}function kfe(t){return EM(t)==="[object Function]"}function fSt(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const xRe={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function bSt(t){return Object.keys(t||{}).reduce(function(e,n){return e||xRe.hasOwnProperty(n)},!1)}const ySt={"http:":{validate:function(t,e,n){const a=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(a)?a.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){const a=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(a)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:a.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){const a=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(a)?a.match(n.re.mailto)[0].length:0}}},wSt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",vSt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function kSt(t){t.__index__=-1,t.__text_cache__=""}function xSt(t){return function(e,n){const a=e.slice(n);return t.test(a)?a.match(t)[0].length:0}}function xfe(){return function(t,e){e.normalize(t)}}function VR(t){const e=t.re=ASt(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push(wSt),n.push(e.src_xn),e.src_tlds=n.join("|");function a(s){return s.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(a(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(a(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(a(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(a(e.tpl_host_fuzzy_test),"i");const r=[];t.__compiled__={};function i(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(t.__schemas__).forEach(function(s){const l=t.__schemas__[s];if(l===null)return;const u={validate:null,link:null};if(t.__compiled__[s]=u,gSt(l)){hSt(l.validate)?u.validate=xSt(l.validate):kfe(l.validate)?u.validate=l.validate:i(s,l),kfe(l.normalize)?u.normalize=l.normalize:l.normalize?i(s,l):u.normalize=xfe();return}if(mSt(l)){r.push(s);return}i(s,l)}),r.forEach(function(s){t.__compiled__[t.__schemas__[s]]&&(t.__compiled__[s].validate=t.__compiled__[t.__schemas__[s]].validate,t.__compiled__[s].normalize=t.__compiled__[t.__schemas__[s]].normalize)}),t.__compiled__[""]={validate:null,normalize:xfe()};const o=Object.keys(t.__compiled__).filter(function(s){return s.length>0&&t.__compiled__[s]}).map(fSt).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+o+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+o+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),kSt(t)}function OSt(t,e){const n=t.__index__,a=t.__last_index__,r=t.__text_cache__.slice(n,a);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=a+e,this.raw=r,this.text=r,this.url=r}function DK(t,e){const n=new OSt(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function zp(t,e){if(!(this instanceof zp))return new zp(t,e);e||bSt(t)&&(e=t,t={}),this.__opts__=IK({},xRe,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=IK({},ySt,t),this.__compiled__={},this.__tlds__=vSt,this.__tlds_replaced__=!1,this.re={},VR(this)}zp.prototype.add=function(e,n){return this.__schemas__[e]=n,VR(this),this};zp.prototype.set=function(e){return this.__opts__=IK(this.__opts__,e),this};zp.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let n,a,r,i,o,s,l,u,d;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(e))!==null;)if(i=this.testSchemaAt(e,n[2],l.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u=0&&(r=e.match(this.re.email_fuzzy))!==null&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||othis.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s))),this.__index__>=0};zp.prototype.pretest=function(e){return this.re.pretest.test(e)};zp.prototype.testSchemaAt=function(e,n,a){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(e,a,this):0};zp.prototype.match=function(e){const n=[];let a=0;this.__index__>=0&&this.__text_cache__===e&&(n.push(DK(this,a)),a=this.__last_index__);let r=a?e.slice(a):e;for(;this.test(r);)n.push(DK(this,a)),r=r.slice(this.__last_index__),a+=this.__last_index__;return n.length?n:null};zp.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const n=this.re.schema_at_start.exec(e);if(!n)return null;const a=this.testSchemaAt(e,n[2],n[0].length);return a?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+a,DK(this,0)):null};zp.prototype.tlds=function(e,n){return e=Array.isArray(e)?e:[e],n?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(a,r,i){return a!==i[r-1]}).reverse(),VR(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,VR(this),this)};zp.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};zp.prototype.onCompile=function(){};const v_=2147483647,bh=36,Voe=1,Y4=26,CSt=38,_St=700,ORe=72,CRe=128,_Re="-",BSt=/^xn--/,ESt=/[^\0-\x7F]/,QSt=/[\x2E\u3002\uFF0E\uFF61]/g,SSt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},JU=bh-Voe,yh=Math.floor,eG=String.fromCharCode;function g0(t){throw new RangeError(SSt[t])}function ISt(t,e){const n=[];let a=t.length;for(;a--;)n[a]=e(t[a]);return n}function BRe(t,e){const n=t.split("@");let a="";n.length>1&&(a=n[0]+"@",t=n[1]),t=t.replace(QSt,".");const r=t.split("."),i=ISt(r,e).join(".");return a+i}function ERe(t){const e=[];let n=0;const a=t.length;for(;n=55296&&r<=56319&&nString.fromCodePoint(...t),$St=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:bh},Ofe=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},QRe=function(t,e,n){let a=0;for(t=n?yh(t/_St):t>>1,t+=yh(t/e);t>JU*Y4>>1;a+=bh)t=yh(t/JU);return yh(a+(JU+1)*t/(t+CSt))},SRe=function(t){const e=[],n=t.length;let a=0,r=CRe,i=ORe,o=t.lastIndexOf(_Re);o<0&&(o=0);for(let s=0;s=128&&g0("not-basic"),e.push(t.charCodeAt(s));for(let s=o>0?o+1:0;s=n&&g0("invalid-input");const A=$St(t.charCodeAt(s++));A>=bh&&g0("invalid-input"),A>yh((v_-a)/d)&&g0("overflow"),a+=A*d;const m=p<=i?Voe:p>=i+Y4?Y4:p-i;if(Ayh(v_/g)&&g0("overflow"),d*=g}const u=e.length+1;i=QRe(a-l,u,l==0),yh(a/u)>v_-r&&g0("overflow"),r+=yh(a/u),a%=u,e.splice(a++,0,r)}return String.fromCodePoint(...e)},IRe=function(t){const e=[];t=ERe(t);const n=t.length;let a=CRe,r=0,i=ORe;for(const l of t)l<128&&e.push(eG(l));const o=e.length;let s=o;for(o&&e.push(_Re);s=a&&dyh((v_-r)/u)&&g0("overflow"),r+=(l-a)*u,a=l;for(const d of t)if(dv_&&g0("overflow"),d===a){let p=r;for(let A=bh;;A+=bh){const m=A<=i?Voe:A>=i+Y4?Y4:A-i;if(p=0))try{e.hostname=DRe.toASCII(e.hostname)}catch{}return j$(joe(e))}function USt(t){const e=Uoe(t,!0);if(e.hostname&&(!e.protocol||$Re.indexOf(e.protocol)>=0))try{e.hostname=DRe.toUnicode(e.hostname)}catch{}return oB(joe(e),oB.defaultChars+"%")}function am(t,e){if(!(this instanceof am))return new am(t,e);e||Hoe(t)||(e=t||{},t="default"),this.inline=new G$,this.block=new BM,this.core=new Yoe,this.renderer=new dE,this.linkify=new zp,this.validateLink=qSt,this.normalizeLink=jSt,this.normalizeLinkText=USt,this.utils=H2t,this.helpers=CM({},V2t),this.options={},this.configure(t),e&&this.set(e)}am.prototype.set=function(t){return CM(this.options,t),this};am.prototype.configure=function(t){const e=this;if(Hoe(t)){const n=t;if(t=NSt[n],!t)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this};am.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));const a=t.filter(function(r){return n.indexOf(r)<0});if(a.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+a);return this};am.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));const a=t.filter(function(r){return n.indexOf(r)<0});if(a.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+a);return this};am.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};am.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens};am.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};am.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens};am.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};function QM(t,e,n){function a(A){return A.trim().split(" ",2)[0]===e}function r(A,m,g,h,f){return A[m].nesting===1&&A[m].attrJoin("class",e),f.renderToken(A,m,g,h,f)}n=n||{};const i=3,o=n.marker||":",s=o.charCodeAt(0),l=o.length,u=n.validate||a,d=n.render||r;function p(A,m,g,h){let f,b=!1,y=A.bMarks[m]+A.tShift[m],w=A.eMarks[m];if(s!==A.src.charCodeAt(y))return!1;for(f=y+1;f<=w&&o[(f-y)%l]===A.src[f];f++);const v=Math.floor((f-y)/l);if(v=g||(y=A.bMarks[x]+A.tShift[x],w=A.eMarks[x],y=4)){for(f=y+1;f<=w&&o[(f-y)%l]===A.src[f];f++);if(!(Math.floor((f-y)/l) div { background-color: #4b5563; height: 8px; border-radius: 4px; margin-bottom: 16px; width: 100%; animation: pulse 1.5s ease-in-out infinite; } .skeleton-loader > div:nth-last-child(1) { width: 90%; } .skeleton-loader > div:nth-last-child(2) { width: 95%; } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } } `,HSt=`
    `,WSt=` ${HSt} `,$K=(t,e)=>e.some(n=>t instanceof n);let Cfe,_fe;function YSt(){return Cfe||(Cfe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function XSt(){return _fe||(_fe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const TK=new WeakMap,tG=new WeakMap,SM=new WeakMap;function VSt(t){const e=new Promise((n,a)=>{const r=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{n(ZR(t.result)),r()},o=()=>{a(t.error),r()};t.addEventListener("success",i),t.addEventListener("error",o)});return SM.set(e,t),e}function ZSt(t){if(TK.has(t))return;const e=new Promise((n,a)=>{const r=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{n(),r()},o=()=>{a(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});TK.set(t,e)}let PK={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return TK.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ZR(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function TRe(t){PK=t(PK)}function KSt(t){return XSt().includes(t)?function(...e){return t.apply(FK(this),e),ZR(this.request)}:function(...e){return ZR(t.apply(FK(this),e))}}function JSt(t){return typeof t=="function"?KSt(t):(t instanceof IDBTransaction&&ZSt(t),$K(t,YSt())?new Proxy(t,PK):t)}function ZR(t){if(t instanceof IDBRequest)return VSt(t);if(tG.has(t))return tG.get(t);const e=JSt(t);return e!==t&&(tG.set(t,e),SM.set(e,t)),e}const FK=t=>SM.get(t),eIt=["get","getKey","getAll","getAllKeys","count"],tIt=["put","add","delete","clear"],nG=new Map;function Bfe(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(nG.get(e))return nG.get(e);const n=e.replace(/FromIndex$/,""),a=e!==n,r=tIt.includes(n);if(!(n in(a?IDBIndex:IDBObjectStore).prototype)||!(r||eIt.includes(n)))return;const i=async function(o,...s){const l=this.transaction(o,r?"readwrite":"readonly");let u=l.store;return a&&(u=u.index(s.shift())),(await Promise.all([u[n](...s),r&&l.done]))[0]};return nG.set(e,i),i}TRe(t=>({...t,get:(e,n,a)=>Bfe(e,n)||t.get(e,n,a),has:(e,n)=>!!Bfe(e,n)||t.has(e,n)}));const nIt=["continue","continuePrimaryKey","advance"],Efe={},RK=new WeakMap,PRe=new WeakMap,aIt={get(t,e){if(!nIt.includes(e))return t[e];let n=Efe[e];return n||(n=Efe[e]=function(...a){RK.set(this,PRe.get(this)[e](...a))}),n}};async function*rIt(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,aIt);for(PRe.set(n,e),SM.set(n,FK(e));e;)yield n,e=await(RK.get(n)||e.continue()),RK.delete(n)}function Qfe(t,e){return e===Symbol.asyncIterator&&$K(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&$K(t,[IDBIndex,IDBObjectStore])}TRe(t=>({...t,get(e,n,a){return Qfe(e,n)?rIt:t.get(e,n,a)},has(e,n){return Qfe(e,n)||t.has(e,n)}}));class iIt{constructor(e,n=1){this.dbName=e,this.version=n,this.db=null}async getCurrentVersion(){return new Promise(e=>{const n=indexedDB.open(this.dbName);n.onsuccess=a=>{const r=a.target.result,i=r.version;r.close(),e(i)},n.onerror=()=>{console.error("Error getting current version"),e(1)}})}async initDB(e){return this._lastKnownStores=e,new Promise((n,a)=>{const r=indexedDB.open(this.dbName,this.version);r.onerror=i=>{console.error(`❌ Database error for ${this.dbName}:`,i.target.error),a(i.target.error)},r.onsuccess=i=>{this.db=i.target.result,console.log(`✅ Database ${this.dbName} opened successfully`),console.log("✅ Available stores:",Array.from(this.db.objectStoreNames)),n(this.db)},r.onupgradeneeded=i=>{console.log(`🔄 Database upgrade needed for ${this.dbName}`),console.log(`🔄 Old version: ${i.oldVersion}, New version: ${i.newVersion}`);const o=i.target.result;e.forEach(({name:s,keyPath:l,indexes:u})=>{if(console.log(`🔄 Processing store: ${s}`),o.objectStoreNames.contains(s))console.log(`✅ Store ${s} already exists`);else{console.log(`➕ Creating new store: ${s}`);const d=o.createObjectStore(s,{keyPath:l});u&&u.forEach(({name:p,keyPath:A,unique:m,multiEntry:g})=>{d.indexNames.contains(p)||(console.log(`➕ Creating index: ${p} on ${A}`),d.createIndex(p,A,{unique:m,multiEntry:g}))})}}),console.log(`✅ Database upgrade completed for ${this.dbName}`)}})}async add(e,n){return this.performTransaction(e,"readwrite",a=>a.add(n))}async update(e,n){if(e==="chapterSummaries"&&!n.chapterId)throw new Error("Missing required chapterId for chapterSummaries store");return this.performTransaction(e,"readwrite",a=>a.put(n))}async put(e,n){return this.performTransaction(e,"readwrite",a=>a.put(n))}async get(e,n){return this.performTransaction(e,"readonly",a=>a.get(n))}async delete(e,n){return this.performTransaction(e,"readwrite",a=>a.delete(n))}async getAll(e){return this.performTransaction(e,"readonly",n=>n.getAll())}async getByKey(e,n){return this.performTransaction(e,"readonly",a=>a.get(n))}async getLatest(e){return new Promise((n,a)=>{if(!this.db){console.error("Database not initialized"),a(new Error("Database not initialized"));return}const r=this.db.transaction(e,"readonly"),i=r.objectStore(e);if(!i.indexNames.contains("date")){console.error("Date index not found"),a(new Error("Date index not found in store"));return}const s=i.index("date").openCursor(null,"prev");s.onerror=l=>{console.error("Error in cursor request:",l.target.error),a(s.error)},s.onsuccess=l=>{const u=l.target.result;n(u?u.value:null)},r.oncomplete=()=>{},r.onerror=l=>{console.error("Transaction failed:",l.target.error),a(l.target.error)}})}async performTransaction(e,n,a){let i=0;for(;i<3;)try{return(!this.db||this.db.closed)&&await this.reconnectDB(),new Promise((o,s)=>{const l=this.db.transaction(e,n),u=l.objectStore(e);l.onerror=p=>{console.error("❌ IDB Transaction error:",p.target.error),s(p.target.error)};const d=setTimeout(()=>{console.warn("⏰ IDB Transaction timeout");try{l.abort()}catch(p){console.warn("Could not abort transaction:",p)}s(new Error("Transaction timeout"))},5e3);l.oncomplete=()=>{clearTimeout(d)};try{const p=a(u);p.onsuccess=()=>{clearTimeout(d),o(p.result)},p.onerror=()=>{console.error("💥 IDB Operation error:",p.error),clearTimeout(d),s(p.error)}}catch(p){console.error("🚨 IDB Operation failed:",p),clearTimeout(d),s(p)}})}catch(o){if(i++,console.error(`❌ IDB Attempt ${i} failed:`,o),o.name==="InvalidStateError"&&i<3){const s=1e3*i;await new Promise(l=>setTimeout(l,s));continue}throw o}throw new Error("Failed to perform transaction after 3 attempts")}async reconnectDB(){try{return await this.initDB(this._lastKnownStores||[]),!0}catch(e){return console.error(`Reconnection failed for ${this.dbName}:`,e),!1}}}let Wm={socratiqDB:null};async function IM(){try{const{DB_CONFIGS:t}=await ye(async()=>{const{DB_CONFIGS:o}=await Promise.resolve().then(()=>kde);return{DB_CONFIGS:o}},void 0,import.meta.url);console.log("🔄 Initializing SocratiqDB with version:",t.version),console.log("🔄 Required stores:",t.stores.map(o=>o.name));const e=await new Promise(o=>{const s=indexedDB.open(t.name);s.onsuccess=l=>{const u=l.target.result,d={exists:!0,version:u.version,stores:Array.from(u.objectStoreNames)};console.log("📊 Existing database info:",d),u.close(),o(d)},s.onerror=()=>{console.log("📊 No existing database found"),o({exists:!1})}}),n=e.exists?!t.stores.every(o=>e.stores.includes(o.name)):!0,a=e.exists?e.version:0,r=n?t.version:a;console.log("🔄 Database upgrade needed:",n),console.log("🔄 Current version:",a,"New version:",r);const i=new iIt(t.name,r);return await i.initDB(t.stores),Wm.socratiqDB=i,console.log("✅ SocratiqDB initialized successfully"),console.log("✅ Available stores:",Array.from(i.db.objectStoreNames)),i}catch(t){throw console.error("❌ Failed to initialize Socratiq database:",t),console.error("❌ Error details:",t.message,t.stack),t}}async function Xr(t="socratiqDB"){return Wm.socratiqDB?Wm.socratiqDB:(console.warn("Database instance not found, initializing..."),await IM())}function oIt(t,e="socratiqDB"){return Wm.socratiqDB=t,t}async function sIt(){const t=await Xr();return t&&t.db?Array.from(t.db.objectStoreNames):[]}async function FRe(t){return new Promise((e,n)=>{Wm.socratiqDB&&Wm.socratiqDB.db&&Wm.socratiqDB.db.close();const a=indexedDB.deleteDatabase(t);a.onsuccess=()=>{e(!0)},a.onerror=r=>{console.error(`Error deleting database ${t}:`,r.target.error),n(r.target.error)},a.onblocked=r=>{console.warn("Database deletion blocked, possibly due to open connections"),Wm.socratiqDB&&Wm.socratiqDB.db&&Wm.socratiqDB.db.close()}})}async function Sfe(){try{const{DB_CONFIGS:t}=await ye(async()=>{const{DB_CONFIGS:r}=await Promise.resolve().then(()=>kde);return{DB_CONFIGS:r}},void 0,import.meta.url),e=await Xr().catch(()=>null),n={};if(e)for(const r of t.stores)try{n[r.name]=await e.getAll(r.name)}catch(i){console.warn(`Could not backup store ${r.name}:`,i)}await FRe(t.name);const a=await IM();for(const[r,i]of Object.entries(n))if(i&&i.length>0){const o=a.db.transaction([r],"readwrite").objectStore(r);for(const s of i)await o.put(s)}return a}catch(t){throw console.error("Failed to force initialize database:",t),t}}async function cIt(){try{const{DB_CONFIGS:t}=await ye(async()=>{const{DB_CONFIGS:n}=await Promise.resolve().then(()=>kde);return{DB_CONFIGS:n}},void 0,import.meta.url);return await FRe(t.name),Wm={socratiqDB:null},await(await IM()).initDB(t.stores),!0}catch(t){throw console.error("Failed to reset SocratiQ database:",t),t}}let aG=!1,Ife=0;async function Zoe(t={}){const e=Date.now();if(aG||e-Ife<1e3)return window.pageTOC||[];aG=!0,Ife=e;try{const a={...{contentSelector:"body",headingSelector:"h1, h2, h3, h4, h5, h6",hasInnerContainers:!0,includeHtml:!1,waitTime:100,maxRetries:3},...t},r=u=>{try{let d=u.nextElementSibling,p="",A=0;const m=2;for(;d&&Af.trim().length>0);for(const f of h){if(A>=m)break;const b=f.trim();b.length>10&&(p&&(p+=" "),p+=b,A++,b.match(/[.!?]$/)||(p+="."))}}}d=d.nextElementSibling}if(p=p.trim(),p.length>300){p=p.substring(0,300).trim();const g=p.lastIndexOf(".");g>200&&(p=p.substring(0,g+1))}return p}catch(d){return console.warn("Error extracting content snippet:",d),""}},i=()=>{const u=[],d=a.contentSelector==="body"?document.body:document.querySelector(a.contentSelector);return d?(d.querySelectorAll(a.headingSelector).forEach((A,m)=>{if(A.offsetParent===null)return;const g=a.includeHtml?A.innerHTML:A.textContent.trim();if(!g)return;let h=A.id;h||(h=`heading-${m}-${g.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").substring(0,50)}`,A.id=h);const b=A.getBoundingClientRect().top+window.scrollY,y=parseInt(A.tagName.substring(1)),w=r(A);u.push({id:h,text:g,level:y,position:b,index:m,content:w})}),u):(console.warn("Content element not found:",a.contentSelector),u)};let o=[],s=0;for(;ssetTimeout(u,a.waitTime*(s+1))),s++;const l=Math.random().toString(36).substr(2,9);return console.group(`📚 [${l}] Page Table of Contents (TOC)`),console.log(`📊 [${l}] Total headings found:`,o.length),console.log(`📋 [${l}] TOC Structure:`),o.length===0?(console.log(`❌ [${l}] No headings found on this page`),console.log(`🔍 [${l}] Debug info:`),console.log("- Content selector:",a.contentSelector),console.log("- Heading selector:",a.headingSelector),console.log("- Content element found:",!!document.querySelector(a.contentSelector)),console.log("- All headings in document:",document.querySelectorAll("h1, h2, h3, h4, h5, h6").length)):(o.forEach((u,d)=>{const p=" ".repeat(u.level-1);console.log(`${p}${u.level}. ${u.text} (ID: ${u.id})`)}),console.log(` 📦 [${l}] Full TOC Data:`,o)),console.groupEnd(),o}catch(n){return console.error("Error extracting TOC:",n),[]}finally{aG=!1}}async function LK(t={}){const e={...t,waitTime:200,maxRetries:5},n=Math.random().toString(36).substr(2,9),a=await Zoe(e);if(a.length>0){const r=window.location.href,i=document.title;if(console.log(`🔄 [${n}] About to save TOC data to chapterMap...`),console.log(`📊 [${n}] TOC data:`,{url:r,title:i,headingCount:a.length,firstHeading:a[0]?a[0].text:"N/A"}),console.log(`🔍 [${n}] Testing database connection for TOC operations...`),!await Koe())return console.error(`❌ [${n}] Database test failed, skipping TOC save`),a;const s=await Joe(r);if(console.log(`🔍 [${n}] Should extract TOC:`,s),s)try{await DM(a,r,i)?(console.log(`💾 [${n}] TOC data saved to chapterMap successfully`),console.log(`🔗 [${n}] Normalized URL: ${L1(r)}`)):console.error(`❌ [${n}] TOC data save returned false`)}catch(l){console.error(`❌ [${n}] Failed to save TOC to chapterMap:`,l),console.error(`❌ [${n}] Error stack:`,l.stack)}else console.log(`⏭️ [${n}] TOC extraction skipped - data is fresh`),console.log(`🔗 [${n}] Normalized URL: ${L1(r)}`)}else console.log(`📝 [${n}] No TOC data to save (result.length = ${a.length})`);return a}async function Koe(){try{const t=await Xr();if(!t)return console.error("❌ TOC Database test: No database instance"),!1;if(!t.db)return console.error("❌ TOC Database test: Database connection not established"),!1;const e=Array.from(t.db.objectStoreNames);if(console.log("🔍 TOC Database test: Available stores:",e),!t.db.objectStoreNames.contains("chapterMap"))return console.error("❌ TOC Database test: chapterMap store missing"),!1;try{await t.getAll("chapterMap"),console.log("✅ TOC Database test: Read operation successful")}catch(n){return console.error("❌ TOC Database test: Read operation failed:",n),!1}return console.log("✅ TOC Database test: All tests passed"),!0}catch(t){return console.error("❌ TOC Database test failed:",t),!1}}function L1(t){try{const e=new URL(t);return`${e.protocol}//${e.host}${e.pathname}`}catch(e){return console.warn("Error normalizing URL:",e),t}}async function DM(t,e,n){let a=null;try{if(!t||t.length===0)return console.log("📝 No TOC data to save"),!1;if(a=await Xr(),!a)return console.error("❌ Database not available for saving TOC"),console.error("❌ Database instance:",a),!1;if(!a.db.objectStoreNames.contains("chapterMap"))return console.error("❌ chapterMap store does not exist in database"),console.error("❌ Available stores:",Array.from(a.db.objectStoreNames)),!1;const r=L1(e),i={url:r,originalUrl:e,title:n||document.title||"Untitled",tocData:t,lastUpdated:new Date().toISOString(),headingCount:t.length,pageType:e.includes("socratiq.html")?"socratiq":"external",domain:new URL(e).hostname};console.log("🔄 Attempting to save TOC to chapterMap:",{originalUrl:e,normalizedUrl:r,title:n,headingCount:t.length,storeExists:a.db.objectStoreNames.contains("chapterMap"),entryData:i});const o=await a.put("chapterMap",i);console.log("🔄 Save operation result:",o);const s=await a.get("chapterMap",r);return console.log("🔍 Verification read result:",s),s?(console.log(`💾 TOC saved to chapterMap for normalized URL: ${r}`),console.log(`📊 Saved ${t.length} headings for "${n}"`),console.log(`🔗 Original URL: ${e}`),!0):(console.error("❌ TOC save verification failed - data not found after save"),!1)}catch(r){return console.error("❌ Error saving TOC to chapterMap:",r),console.error("❌ Error details:",r.message,r.stack),console.error("❌ Database state:",{hasDB:!!a,hasDBInstance:!!a?.db,storeNames:a?.db?Array.from(a.db.objectStoreNames):"N/A"}),!1}}async function H$(t){try{const e=await Xr();return e?e.db.objectStoreNames.contains("chapterMap")?await e.get("chapterMap",t)||null:(console.error("❌ chapterMap store does not exist in database for retrieval"),console.error("❌ Available stores:",Array.from(e.db.objectStoreNames)),null):(console.error("❌ Database not available for retrieving TOC"),null)}catch(e){return console.error("❌ Error retrieving TOC from chapterMap:",e),console.error("❌ Error details:",e.message,e.stack),null}}async function Lb(){try{const t=await Xr();return t?t.db.objectStoreNames.contains("chapterMap")?await t.getAll("chapterMap")||[]:(console.error("❌ chapterMap store does not exist in database for getAll"),console.error("❌ Available stores:",Array.from(t.db.objectStoreNames)),[]):(console.error("❌ Database not available for retrieving chapter map"),[])}catch(t){return console.error("❌ Error retrieving all chapter map entries:",t),console.error("❌ Error details:",t.message,t.stack),[]}}async function Joe(t,e=24){try{const n=L1(t),a=await H$(n);if(!a)return console.log(`🆕 No existing TOC found for normalized URL: ${n}`),!0;const r=new Date(a.lastUpdated),o=(new Date-r)/(1e3*60*60);return o>e?(console.log(`⏰ TOC is ${o.toFixed(1)} hours old, re-extracting for normalized URL: ${n}`),!0):(console.log(`✅ TOC is fresh (${o.toFixed(1)} hours old), skipping extraction for normalized URL: ${n}`),!1)}catch(n){return console.error("❌ Error checking TOC age:",n),!0}}async function RRe(){console.log("🧪 Starting TOC save function test...");try{const t=await Xr();if(console.log("✅ Test 1 - Database instance:",{hasDB:!!t,hasDBInstance:!!t?.db,storeNames:t?.db?Array.from(t.db.objectStoreNames):"N/A",chapterMapExists:t?.db?t.db.objectStoreNames.contains("chapterMap"):!1}),!t||!t.db){console.error("❌ Database not available");return}if(!t.db.objectStoreNames.contains("chapterMap")){console.error("❌ chapterMap store does not exist");return}console.log("✅ Test 2 - chapterMap store exists");const e=[{id:"test-heading-1",text:"Test Heading 1",level:1,position:100,index:0},{id:"test-heading-2",text:"Test Heading 2",level:2,position:200,index:1}],n="https://test.example.com/test-page",a="Test Page Title";console.log("✅ Test 3 - Test data created:",{tocDataLength:e.length,url:n,title:a}),console.log("🔄 Test 4 - Attempting to save test data...");const r=await DM(e,n,a);console.log("✅ Test 4 - Save result:",r),console.log("🔄 Test 5 - Verifying saved data...");const i=await H$(n);console.log("✅ Test 5 - Retrieved data:",i),console.log("🔄 Test 6 - Getting all chapter map entries...");const o=await Lb();console.log("✅ Test 6 - All entries:",o),console.log("🔄 Test 7 - Cleaning up test data..."),await t.delete("chapterMap",n),console.log("✅ Test 7 - Test data cleaned up"),console.log("🎉 All tests completed successfully!")}catch(t){console.error("❌ Test failed:",t),console.error("❌ Error details:",t.message,t.stack)}}async function LRe(){console.log("🧹 Starting cleanup of duplicate chapterMap entries...");try{const t=await Xr();if(!t)return console.error("❌ Database not available for cleanup"),{success:!1,error:"Database not available"};const e=await Lb();console.log(`📊 Found ${e.length} total entries to analyze`);const n={},a=[];e.forEach(s=>{const l=L1(s.url);n[l]||(n[l]=[]),n[l].push(s),n[l].length>1&&a.push(l)}),console.log(`🔍 Found ${a.length} normalized URLs with duplicates`);let r=0,i=0;for(const s of a){const l=n[s];console.log(`🔄 Processing ${l.length} entries for: ${s}`),l.sort((p,A)=>new Date(A.lastUpdated)-new Date(p.lastUpdated));const u=l[0],d=l.slice(1);console.log(`✅ Keeping: ${u.url} (${u.lastUpdated})`),console.log(`🗑️ Deleting: ${d.map(p=>p.url).join(", ")}`);for(const p of d)await t.delete("chapterMap",p.url),r++;if(u.url!==s){const p={...u,url:s,originalUrl:u.url};await t.put("chapterMap",p),console.log(`🔄 Updated entry to use normalized URL: ${s}`)}i++}const o={success:!0,totalEntries:e.length,duplicatesFound:a.length,entriesCleaned:r,entriesKept:i,duplicatesProcessed:a};return console.log("🎉 Cleanup completed:",o),o}catch(t){return console.error("❌ Cleanup failed:",t),{success:!1,error:t.message}}}async function NRe(){console.log("🔄 Manually triggering TOC extraction and save...");try{const t=window.location.href,e=document.title;console.log("📊 Current page info:",{url:t,title:e}),console.log("🔄 Extracting TOC...");const n=await Zoe();if(console.log("✅ TOC extracted:",{headingCount:n.length,headings:n.map(a=>({text:a.text,level:a.level}))}),n.length>0)if(console.log("🔄 Saving TOC to chapterMap..."),await DM(n,t,e)){console.log("✅ TOC saved successfully!"),console.log("🔄 Verifying save...");const r=await H$(t);r?console.log("✅ Verification successful:",{url:r.url,title:r.title,headingCount:r.headingCount,lastUpdated:r.lastUpdated}):console.error("❌ Verification failed - data not found")}else console.error("❌ TOC save failed");else console.log("📝 No headings found on this page")}catch(t){console.error("❌ Manual TOC extraction failed:",t),console.error("❌ Error details:",t.message,t.stack)}}typeof window<"u"&&(window.testTOCSaveFunction=RRe,window.forceTOCExtractionAndSave=NRe,window.cleanupDuplicateChapterMapEntries=LRe,window.normalizeUrl=L1);const lIt=Object.freeze(Object.defineProperty({__proto__:null,cleanupDuplicateChapterMapEntries:LRe,extractPageTOC:Zoe,extractTOCWithDebug:LK,forceTOCExtractionAndSave:NRe,getAllChapterMapEntries:Lb,getTOCFromChapterMap:H$,normalizeUrl:L1,saveTOCToChapterMap:DM,shouldExtractTOC:Joe,testTOCDatabaseConnection:Koe,testTOCSaveFunction:RRe},Symbol.toStringTag,{value:"Module"}));function MRe(t,e=3){const n=t.toLowerCase().replace(/[^a-z0-9]/g,"");if(n.length100?n.substring(Math.floor(a/2),Math.floor(a/2)+20).toLowerCase():"",s=`${r}${o}${i}${a}`,l=Dfe(s);let u=`p-${Math.abs(l).toString(36)}`,d=u,p=1;for(;e.has(d);)d=`${u}-${p}`,p++;return d}function Dfe(t){let e=0;for(let n=0;na?Array.from(t).slice(0,a):t;r.forEach(i=>{i.hasAttribute("data-fuzzy-id")&&n.add(i.getAttribute("data-fuzzy-id"))}),r.forEach(i=>{if(!i.hasAttribute("data-fuzzy-id")){const o=i.textContent;if(o.trim().length<10)return;const s=uIt(o,n),l=MRe(o);n.add(s),i.setAttribute("data-fuzzy-id",s),i.setAttribute("data-fingerprint",l.toString()),e.push({fingerprint:l,id:s,text:o})}}),e.length>0&&(window.textMap.initialized?window.textMap.sortedEntries=mIt(window.textMap.sortedEntries,e.sort((i,o)=>i.fingerprint-o.fingerprint)):(window.textMap.sortedEntries=e.sort((i,o)=>i.fingerprint-o.fingerprint),window.textMap.initialized=!0))}function pIt(t,e=10){const n=window.textMap.sortedEntries;if(!n.length)return[];let a=0,r=n.length-1,i=0;for(;a<=r;){const u=Math.floor((a+r)/2);if(n[u].fingerprint===t){i=u;break}n[u].fingerprint=0||l=0?Math.abs(n[s].fingerprint-t):1/0,d=l{const u=l.toLowerCase().replace(/[^a-z0-9]/g,""),d=new Set;for(let p=0;p<=u.length-n;p++)d.add(u.substring(p,p+n));return d},r=a(t),i=a(e);if(r.size===0&&i.size===0)return 1;if(r.size===0||i.size===0)return 0;const o=new Set([...r].filter(l=>i.has(l))),s=new Set([...r,...i]);return o.size/s.size}async function $M(t,e=5){const n=MRe(t);console.time("Finding rough matches");const a=pIt(n,15);console.timeEnd("Finding rough matches"),console.time("N-gram similarity calculation");const r=[];for(const i of a){const o=document.querySelector(`[data-fuzzy-id="${i.id}"]`);if(!o)continue;const s=AIt(t,i.text);r.push({selector:`[data-fuzzy-id="${i.id}"]`,element:o,text:i.text,similarity:s})}return console.timeEnd("N-gram similarity calculation"),r.sort((i,o)=>o.similarity-i.similarity).slice(0,e)}function mIt(t,e){const n=[];let a=0,r=0;for(;ar&&(o=r-10,s=`translate(-100%, ${i-a.height<0?"0":"-100%"})`),o-a.width/2<0&&(o=10,s=`translate(0, ${i-a.height<0?"0":"-100%"})`),t.style.left=`${o}px`,t.style.top=`${i}px`,t.style.transform=s}function Tfe(t){const e=t.target,n=e.getAttribute("data-tooltip-text-socratiQ");if(!n)return;let a=document.querySelector(".tooltip-container-socratiQ");a||(a=hIt()),a.textContent=n,a.style.display="block",requestAnimationFrame(()=>{fIt(a,e),a.style.opacity="1"})}function Pfe(){const t=document.querySelector(".tooltip-container-socratiQ");t&&(t.style.opacity="0",setTimeout(()=>{t.style.display="none"},200))}function Mo(t,e,n){t&&($fe||($fe=n,gIt(n)),t.removeEventListener("mouseenter",Tfe),t.removeEventListener("mouseleave",Pfe),t.setAttribute("data-tooltip-text-socratiQ",e),t.addEventListener("mouseenter",Tfe),t.addEventListener("mouseleave",Pfe),t.style.cursor="pointer")}class bIt{constructor(e){this.modal=e,this.shadowRoot=e.shadowRoot}setupEventListeners(){try{requestAnimationFrame(()=>{this.setupModalControls(),this.setupFormControls(),this.setupKeyboardShortcuts(),this.setupChapterControls()})}catch(e){console.error("Failed to setup event listeners:",e)}}setupModalControls(){const e=this.shadowRoot.querySelector("#closeSpacedRepModal"),n=this.shadowRoot.querySelector("#toggleStats"),a=this.shadowRoot.querySelector("#toggleViz");e&&e.addEventListener("click",()=>this.modal.hide()),n&&n.addEventListener("click",()=>{const r=this.shadowRoot.querySelector("#statsSection"),i=n.querySelector(".show-stats-text"),o=n.querySelector(".hide-stats-text");r?.classList.toggle("hidden"),i?.classList.toggle("hidden"),o?.classList.toggle("hidden")}),a&&a.addEventListener("click",()=>{const r=this.shadowRoot.querySelector("#flashcardViz"),i=a.querySelector(".show-viz-text"),o=a.querySelector(".hide-viz-text");r?.classList.toggle("hidden"),i?.classList.toggle("hidden"),o?.classList.toggle("hidden")})}setupFormControls(){const e=this.shadowRoot.querySelector("#showAddCard"),n=this.shadowRoot.querySelector("#cancelAdd"),a=this.shadowRoot.querySelector("#addCardForm");e&&a&&e.addEventListener("click",()=>{a.classList.remove("hidden"),this.shadowRoot.querySelector("#questionInput")?.focus()}),n&&n.addEventListener("click",()=>{this.modal.clearInputs(),a?.classList.add("hidden")})}setupKeyboardShortcuts(){document.addEventListener("keydown",e=>{if(e.key==="Enter"&&!e.shiftKey){const n=this.shadowRoot.querySelector("#addCardForm");n&&!n.classList.contains("hidden")&&(e.preventDefault(),this.modal.saveNewCard())}if(e.key==="Escape"){const n=this.shadowRoot.querySelector("#addCardForm");n&&!n.classList.contains("hidden")&&(n.classList.add("hidden"),this.modal.clearInputs())}})}setupChapterControls(){const e=this.shadowRoot.querySelector("#chapterList");e&&e.addEventListener("click",n=>{const a=n.target.closest("[data-chapter]");if(a){const r=parseInt(a.dataset.chapter);this.modal.setCurrentChapter({chapter:r,title:this.modal.getChapterTitle(r)})}})}}class yIt{constructor(e){this.modal=e,this.shadowRoot=e.shadowRoot,this.storageHandler=e.storageHandler,this.themeManager=e.themeManager;const a=["#chapterList","#tagList","#progressBar","#progressText","#showStats","#showViz","#startReview","#showAddCard"].filter(s=>!this.shadowRoot.querySelector(s));if(a.length>0)throw console.error("Missing required elements:",a),new Error("Required UI elements not found");const r=this.shadowRoot.querySelector("#sr-sidebar");r&&(r.style.cssText=` overflow-y: auto; overflow-x: hidden; height: 100%; `);const i=this.shadowRoot.querySelector("#chapterList");i&&(i.style.cssText=` max-height: calc(60vh - 4rem); /* Adjust as needed */ overflow-y: auto; overflow-x: hidden; `);const o=this.shadowRoot.querySelector("#tagList");o&&(o.style.cssText=` max-height: calc(30vh - 4rem); /* Adjust as needed */ overflow-y: auto; overflow-x: hidden; `),this.setupEventListeners(),this.initializeWithRetry()}async initializeWithRetry(e=0){try{const r=await this.storageHandler.getAllChapters();if(console.log("Retrieved chapters:",r),(!r||!Array.isArray(r))&&e<5){setTimeout(()=>this.initializeWithRetry(e+1),200);return}}catch(r){if(e<5){setTimeout(()=>this.initializeWithRetry(e+1),200);return}console.error("Failed to initialize after retries:",r)}}setupEventListeners(){const e=this.shadowRoot.querySelector('[data-dropdown="chapters"]'),n=this.shadowRoot.querySelector('[data-dropdown="tags"]'),a=this.shadowRoot.querySelector("#chapterList"),r=this.shadowRoot.querySelector("#tagList");e?.closest("button").addEventListener("click",()=>{a.classList.toggle("hidden"),e.style.transform=a.classList.contains("hidden")?"rotate(0deg)":"rotate(180deg)"}),n?.closest("button").addEventListener("click",()=>{r.classList.toggle("hidden"),n.style.transform=r.classList.contains("hidden")?"rotate(0deg)":"rotate(180deg)"}),this.shadowRoot.querySelector("#showStats")?.addEventListener("click",()=>{this.modal.showStats()}),this.shadowRoot.querySelector("#showViz")?.addEventListener("click",()=>{this.modal.showVisualizations()}),this.shadowRoot.querySelector("#startReview")?.addEventListener("click",()=>{const i=this.modal.currentChapter?.chapter;i&&this.modal.showCard(i,0)}),this.shadowRoot.querySelector("#showAddCard")?.addEventListener("click",()=>{const i=this.shadowRoot.querySelector("#addCardForm");i&&i.classList.remove("hidden")})}render(){this.renderChapters(),this.renderTags(),this.updateProgress()}updateProgress(){const e=this.shadowRoot.querySelector("#progressBar"),n=this.shadowRoot.querySelector("#progressText");if(!e||!n){console.error("Progress elements not found");return}const a=this.storageHandler.getCurrentChapterStats(),r=a.percentage;e.style.width=`${r}%`,n.textContent=`${a.learned}/${a.total} Cards Learned`,r>=80?(e.classList.add("bg-green-500"),e.classList.remove("bg-blue-500","bg-yellow-500")):r>=50?(e.classList.add("bg-blue-500"),e.classList.remove("bg-green-500","bg-yellow-500")):(e.classList.add("bg-yellow-500"),e.classList.remove("bg-green-500","bg-blue-500"))}async renderChapters(){const e=this.shadowRoot.querySelector("#chapterList");if(!e){console.error("Chapter list element not found");return}try{const a=await this.storageHandler.getAllChapters();if(console.log("Retrieved chapters:",a),!Array.isArray(a)){console.warn("Chapters is not an array, initializing empty array");return}const r=this.storageHandler.inMemoryData?.currentChapter,i=this.themeManager?.getThemeClasses()||{buttonActive:"bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",buttonHover:"hover:bg-gray-100 dark:hover:bg-zinc-700"};e.innerHTML=a.map(o=>` `).join(""),e.innerHTML+=`
    `}catch(a){console.error("Error getting chapters:",a)}e.querySelectorAll("button[data-chapter]").forEach(a=>{a.addEventListener("click",async()=>{const r=parseInt(a.dataset.chapter),i=await this.modal.storageHandler.switchActiveChapter(r);if(i&&i.currentChapter)this.modal.setCurrentChapter(i.currentChapter);else{const s=(await this.modal.storageHandler.getAllChapters()).find(l=>l.chapter===r);s&&this.modal.setCurrentChapter({chapter:s.chapter,title:s.title||`Chapter ${s.chapter}`})}})});const n=e.querySelector("#newDeckBtn");n&&n.addEventListener("click",a=>{a.preventDefault(),console.log("New Deck button clicked!"),this.modal.deckCreationHandler.showModal()})}async renderTags(){const e=this.shadowRoot.querySelector("#tagList");if(!e){console.error("Tag list element not found");return}let n;try{n=await this.storageHandler.getAllTags(),console.log("Retrieved tags:",n),Array.isArray(n)||(console.warn("Tags is not an array, initializing empty array"),n=[])}catch(o){console.error("Error getting tags:",o),n=[]}const a=this.storageHandler.inMemoryData?.currentTag,r=this.themeManager?.getThemeClasses()||{buttonActive:"bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",buttonHover:"hover:bg-gray-100 dark:hover:bg-zinc-700"},i=await Promise.all(n.map(async o=>{const s=await this.getTagCount(o);return` `}));e.innerHTML=i.join(""),e.querySelectorAll("button").forEach(o=>{o.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();const l=o.dataset.tag;console.log(`[UI Handler] Tag clicked: "${l}"`),this.modal?(console.log(`[UI Handler] Calling modal.switchTag("${l}")`),this.modal.switchTag(l)):console.error("[UI Handler] Modal reference is missing")})})}async getTagCount(e){try{const n=await this.storageHandler.getCardsByTag(e);return Array.isArray(n)?n.length:0}catch(n){return console.error("Error getting tag count:",n),0}}updateTheme(){this.themeManager&&(this.renderChapters(),this.renderTags())}}class wIt{constructor(e){this.shadowRoot=e,this.width=600,this.height=400,this.margin={top:20,right:20,bottom:30,left:40},this.svg=null,this.tooltip=null,this.simulation=null,this.initialized=!1,this.currentView="network",this.chapterSets=null,this.reviewData=null,this.isDark=!1}getTextColor(){return this.isDark?"#9ca3af":"#6b7280"}updateTheme(){const n=this.shadowRoot.host?.getAttribute("data-socratiq-theme")||"light";this.isDark=n==="dark"}showNetworkView(){this.currentView="network",this.updateTheme(),this.chapterSets&&(this.svg.selectAll("*").remove(),this.drawNetworkGraph())}showHeatmapView(){this.currentView="heatmap",this.updateTheme(),this.reviewData&&(this.svg.selectAll("*").remove(),this.drawHeatmap())}update(e){!this.initialized&&!this.initialize()||(this.updateTheme(),this.currentView==="network"?(this.chapterSets=e,this.drawNetworkGraph()):(this.reviewData=e,this.drawHeatmap()))}drawHeatmap(){if(!this.reviewData)return;const e=10,n=2,a=new Date,r=e+n,i=new Date(a);i.setMonth(a.getMonth()-6),i.setDate(1);const o=new Date(a);o.setMonth(a.getMonth()+6),this.svg.selectAll("*").remove();const s=this.svg.append("g").attr("transform",`translate(${this.margin.left+30}, ${this.margin.top+20})`);s.append("text").attr("class","text-xs font-mono").attr("x",0).attr("y",-30).attr("fill",this.getTextColor()).text("Daily review activity (centered on current month)");const l=[];let u=-6;for(;u<=6;){const y=new Date(a);y.setMonth(a.getMonth()+u),l.push({month:y.toLocaleString("default",{month:"short"}),x:(u+6)*4.5*r,current:u===0}),u++}s.selectAll(".month-label").data(l).enter().append("text").attr("class",y=>`month-label text-xs font-mono ${y.current?"font-bold":""}`).attr("x",y=>y.x).attr("y",-5).attr("fill",this.getTextColor()).text(y=>y.month);const d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];s.selectAll(".day-label").data(d).enter().append("text").attr("class","day-label text-xs font-mono").attr("x",-25).attr("y",(y,w)=>w*(e+n)+e).attr("fill",this.getTextColor()).style("text-anchor","start").text(y=>y);const p=_3e().domain([0,10]).range(["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"]),A=[],m=_4("%Y-%m-%d");for(let y=new Date(i);y<=o;y.setDate(y.getDate()+1)){const w=m(y);A.push({date:new Date(y),count:this.reviewData[w]||0,dateStr:w})}s.selectAll(".day").data(A).enter().append("rect").attr("class","day").attr("width",e).attr("height",e).attr("rx",2).attr("x",y=>JB.count(i,y.date)*r).attr("y",y=>y.date.getDay()*(e+n)).attr("fill",y=>p(y.count)).append("title").text(y=>`${y.date.toDateString()} ${y.count} reviews`);const g=7*(e+n)+20,h=s.append("g").attr("transform",`translate(${this.width-250}, ${g})`);h.append("text").attr("class","text-xs font-mono").attr("x",0).attr("y",8).attr("fill",this.getTextColor()).text("Less");const f=p.range();f.forEach((y,w)=>{h.append("rect").attr("x",35+w*25).attr("y",0).attr("width",20).attr("height",10).attr("fill",y)}),h.append("text").attr("class","text-xs font-mono").attr("x",35+f.length*25+5).attr("y",8).attr("fill",this.getTextColor()).text("More"),s.append("g").attr("transform",`translate(0, ${g+40})`).append("text").attr("class","text-xs font-mono").attr("x",0).attr("y",0).attr("fill",this.getTextColor()).selectAll("tspan").data(["How to use this heatmap:","• Darker colors indicate more review sessions","• Look for patterns in your study habits","• Regular, spaced practice (consistent color) is better than cramming (dark spots)","• Aim for consistent daily reviews rather than long gaps"]).enter().append("tspan").attr("x",0).attr("dy",(y,w)=>w===0?0:"1.2em").text(y=>y)}initialize(){console.log("Initializing visualization...");try{const e=this.shadowRoot.querySelector("#visualization-container");if(!e)return console.error("Visualization container not found"),!1;const a=this.shadowRoot.host?.getAttribute("data-socratiq-theme")||"light";this.isDark=a==="dark",e.innerHTML="";const r=en(e).append("svg").attr("width","100%").attr("height","100%").attr("viewBox",`0 0 ${this.width} ${this.height}`).attr("class","rounded-lg shadow-lg").style("background-color",this.isDark?"#0d1117":"#ffffff"),i=CZ().scaleExtent([.1,4]).on("zoom",s=>{o.attr("transform",s.transform)});r.call(i);const o=r.append("g");return this.svg=o,this.tooltip=en(e).append("div").attr("class","absolute hidden p-2 rounded shadow-lg text-sm z-50").style("pointer-events","none").style("background-color",this.isDark?"#0d1117":"#ffffff").style("color",this.isDark?"#e6edf3":"#1f2328").style("border",`1px solid ${this.isDark?"#30363d":"#d0d7de"}`),this.simulation=VAt().force("link",Lme().id(s=>s.id).distance(100)).force("charge",Mme().strength(-400)).force("center",Tme(this.width/2,this.height/4)).force("collision",Fme().radius(s=>s.radius+5)),this.initialized=!0,console.log("Visualization initialized successfully"),!0}catch(e){return console.error("Error initializing visualization:",e),!1}}drawNetworkGraph(){console.log("Drawing network graph with chapters:",this.chapterSets),this.simulation&&this.simulation.stop();const e=this.svg.append("g").attr("transform",`translate(${this.margin.left}, ${this.margin.top})`),n=[],a=[];for(const[u,d]of this.chapterSets)n.push({id:`chapter-${u}`,type:"chapter",name:`Chapter ${u}`,radius:30,chapter:u,cardCount:d.length}),d.forEach(p=>{n.push({id:`card-${p.id}`,type:"card",card:p,radius:8,quality:p.quality||0,chapter:u}),a.push({source:`chapter-${u}`,target:`card-${p.id}`})});console.log("Processed nodes:",n);const r=e.append("g").attr("class","links").lower().selectAll("line").data(a).enter().append("line").attr("stroke","#999").attr("stroke-opacity",.3).attr("stroke-width",1),i=e.append("g").attr("class","nodes").selectAll("g").data(n).enter().append("g").attr("class","node-group").style("cursor","pointer").on("click",(u,d)=>{if(console.log("Node clicked:",d),d.type==="chapter")console.log("Chapter node clicked:",{chapter:d.chapter,name:d.name,cardCount:d.cardCount});else{console.log("Card node clicked:",{question:d.card.question,quality:d.quality,chapter:d.chapter});const p=new CustomEvent("show-card",{detail:{chapterNum:d.chapter,cardIndex:d.index-1,card:d.card},bubbles:!0,composed:!0});this.shadowRoot.dispatchEvent(p)}});i.append("circle").attr("r",u=>u.radius).attr("fill",u=>this.getNodeColor(u)),i.append("text").attr("class","text-[10px] fill-gray-600 dark:fill-gray-300 pointer-events-none").attr("dy",u=>u.type==="chapter"?"0.35em":"1.5em").attr("text-anchor","middle").text(u=>{if(u.type==="chapter")return this.truncateText(`Chapter ${u.chapter} (${u.cardCount})`,20);{const d=u.card.question.replace(/#\w+/g,"").trim();return this.truncateText(d,30)}});const o=this.svg.append("g").attr("transform",`translate(${this.margin.left}, ${this.height-160})`);o.append("text").attr("class","text-xs font-mono").attr("y",-20).attr("fill",this.getTextColor()).text("Flashcard network: Chapters (large) connected to their cards (small)");const s=[{label:"Not Started",quality:0},{label:"Just Started",quality:1},{label:"Learning",quality:2},{label:"Almost Done",quality:3}],l=25;s.forEach((u,d)=>{const p=o.append("g").attr("transform",`translate(0, ${d*l})`);p.append("circle").attr("r",6).attr("fill",this.getNodeColor({type:"card",quality:u.quality})),p.append("text").attr("class","text-[10px]").attr("x",15).attr("y",4).attr("fill",this.getTextColor()).text(u.label)}),this.simulation.nodes(n).force("link",Lme(a).id(u=>u.id).distance(100)).force("charge",Mme().strength(-400)).force("center",Tme(this.width/2,this.height/3)).force("collision",Fme().radius(u=>u.radius+5)).force("y",ZAt(u=>u.type==="chapter"?this.height/4:this.height/2).strength(.1)).on("tick",()=>{r.attr("x1",u=>u.source.x).attr("y1",u=>u.source.y).attr("x2",u=>u.target.x).attr("y2",u=>u.target.y),i.attr("transform",u=>`translate(${u.x},${u.y})`)}),this.simulation.alpha(1).restart(),i.call(_dt().on("start",this.dragstarted.bind(this)).on("drag",this.dragged.bind(this)).on("end",this.dragended.bind(this)))}getNodeColor(e){if(e.type==="chapter")return"rgba(75, 85, 99, 0.7)";const n={0:"rgba(219, 234, 254, 0.8)",1:"rgba(147, 197, 253, 0.8)",2:"rgba(59, 130, 246, 0.8)",3:"rgba(29, 78, 216, 0.8)",4:"rgba(30, 58, 138, 0.8)"};return n[e.quality]||n[0]}dragstarted(e,n){e.active||this.simulation.alphaTarget(.3).restart(),n.fx=n.x,n.fy=n.y}dragged(e,n){n.fx=e.x,n.fy=e.y}dragended(e,n){e.active||this.simulation.alphaTarget(0),n.fx=null,n.fy=null}getQualityColor(e,n=1){const a={0:`rgba(239, 68, 68, ${n})`,1:`rgba(249, 115, 22, ${n})`,2:`rgba(234, 179, 8, ${n})`,3:`rgba(59, 130, 246, ${n})`,4:`rgba(99, 102, 241, ${n})`,5:`rgba(34, 197, 94, ${n})`};return a[e]||a[0]}getQualityLabel(e){return{0:"Not Started",1:"Just Started",2:"Learning",3:"Reviewing",4:"Almost Learned",5:"Learned"}[e]||"Not Started"}truncateText(e,n){return e.length>n?e.substring(0,n-3)+"...":e}updateTodayReview(e){if(this.currentView==="heatmap"){const n=new Date().toDateString(),a=e&&e[n.split("T")[0]]||0,r=this.svg.select(`.day[data-date="${n}"]`);r.node()&&r.attr("data-count",a).transition().duration(300).attr("fill",this.colorScale(a))}}getChapterTitle(e){return JSON.parse(localStorage.getItem("chapter_card_sets")||"{}"),`Deck ${e}`}updateHeatmapData(e){this.reviewData=e,this.currentView==="heatmap"&&this.drawHeatmap()}}class ZC{static QUALITY={BLACKOUT:0,INCORRECT:1,INCORRECT_EASY:2,DIFFICULT:3,HESITANT:4,PERFECT:5};constructor(e,n){this.question=e,this.answer=n,this.repetitions=0,this.easeFactor=2.5,this.interval=0,this.nextReviewDate=new Date,this.reviewHistory=[],this.id=crypto.randomUUID(),this.lastReviewQuality=0}static fromData(e){const n=new ZC(e.question,e.answer);return Object.assign(n,e),n.nextReviewDate=new Date(e.nextReviewDate),n}edit(e,n){return this.question=e,this.answer=n,this}review(e){if(this.reviewHistory.push({date:new Date,quality:e,interval:this.interval,easeFactor:this.easeFactor}),e<3?(this.repetitions=0,e===0&&(this.easeFactor=Math.max(1.3,this.easeFactor-.3))):this.repetitions+=1,this.easeFactor=Math.max(1.3,this.easeFactor+(.1-(5-e)*(.08+(5-e)*.02))),this.repetitions===0)this.interval=1;else if(this.repetitions===1)this.interval=e<3?1:3;else if(this.repetitions===2)this.interval=e<3?3:7;else{const n=e<3?.75:e===5?1.2:1;this.interval=Math.round(this.interval*this.easeFactor*n)}this.nextReviewDate=new Date,this.nextReviewDate.setDate(this.nextReviewDate.getDate()+this.interval),this.lastReviewQuality=e}getReviewStats(){return{totalReviews:this.reviewHistory.length,averageQuality:this.reviewHistory.reduce((e,n)=>e+n.quality,0)/this.reviewHistory.length||0,lastReview:this.reviewHistory[this.reviewHistory.length-1]?.date||null}}}const Ua={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ffe(this.context.count)},getNextContextId(){return Ffe(this.context.count++)}};function Ffe(t){const e=String(t),n=e.length-1;return Ua.context.id+(n?String.fromCharCode(96+n):"")+e}function NK(t){Ua.context=t}function vIt(){return{...Ua.context,id:Ua.getNextContextId(),count:0}}const kIt=(t,e)=>t===e,MK=Symbol("solid-proxy"),xIt=typeof Proxy=="function",OIt=Symbol("solid-track"),KR={equals:kIt};let zRe=YRe;const rv=1,JR=2,qRe={owned:null,cleanups:null,context:null,owner:null};var vo=null;let rG=null,CIt=null,Us=null,fu=null,Nb=null,TM=0;function AF(t,e){const n=Us,a=vo,r=t.length===0,i=e===void 0?a:e,o=r?qRe:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=r?t:()=>t(()=>Nh(()=>X4(o)));vo=o,Us=null;try{return Y$(s,!0)}finally{Us=n,vo=a}}function F0(t,e){e=e?Object.assign({},KR,e):KR;const n={value:t,observers:null,observerSlots:null,comparator:e.equals||void 0},a=r=>(typeof r=="function"&&(r=r(n.value)),WRe(n,r));return[HRe.bind(n),a]}function ny(t,e,n){const a=ese(t,e,!1,rv);W$(a)}function jRe(t,e,n){zRe=IIt;const a=ese(t,e,!1,rv);a.user=!0,Nb?Nb.push(a):W$(a)}function N1(t,e,n){n=n?Object.assign({},KR,n):KR;const a=ese(t,e,!0,0);return a.observers=null,a.observerSlots=null,a.comparator=n.equals||void 0,W$(a),HRe.bind(a)}function Nh(t){if(Us===null)return t();const e=Us;Us=null;try{return t()}finally{Us=e}}function URe(t){jRe(()=>Nh(t))}function GRe(t){return vo===null||(vo.cleanups===null?vo.cleanups=[t]:vo.cleanups.push(t)),t}function _It(t,e){const n=Symbol("context");return{id:n,Provider:$It(n),defaultValue:t}}function BIt(t){let e;return vo&&vo.context&&(e=vo.context[t.id])!==void 0?e:t.defaultValue}function EIt(t){const e=N1(t),n=N1(()=>zK(e()));return n.toArray=()=>{const a=n();return Array.isArray(a)?a:a!=null?[a]:[]},n}function HRe(){if(this.sources&&this.state)if(this.state===rv)W$(this);else{const t=fu;fu=null,Y$(()=>tL(this),!1),fu=t}if(Us){const t=this.observers?this.observers.length:0;Us.sources?(Us.sources.push(this),Us.sourceSlots.push(t)):(Us.sources=[this],Us.sourceSlots=[t]),this.observers?(this.observers.push(Us),this.observerSlots.push(Us.sources.length-1)):(this.observers=[Us],this.observerSlots=[Us.sources.length-1])}return this.value}function WRe(t,e,n){let a=t.value;return(!t.comparator||!t.comparator(a,e))&&(t.value=e,t.observers&&t.observers.length&&Y$(()=>{for(let r=0;r1e6)throw fu=[],new Error},!1)),e}function W$(t){if(!t.fn)return;X4(t);const e=TM;QIt(t,t.value,e)}function QIt(t,e,n){let a;const r=vo,i=Us;Us=vo=t;try{a=t.fn(e)}catch(o){return t.pure&&(t.state=rv,t.owned&&t.owned.forEach(X4),t.owned=null),t.updatedAt=n+1,VRe(o)}finally{Us=i,vo=r}(!t.updatedAt||t.updatedAt<=n)&&(t.updatedAt!=null&&"observers"in t?WRe(t,a):t.value=a,t.updatedAt=n)}function ese(t,e,n,a=rv,r){const i={fn:t,state:a,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:vo,context:vo?vo.context:null,pure:n};return vo===null||vo!==qRe&&(vo.owned?vo.owned.push(i):vo.owned=[i]),i}function eL(t){if(t.state===0)return;if(t.state===JR)return tL(t);if(t.suspense&&Nh(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt=0;n--)if(t=e[n],t.state===rv)W$(t);else if(t.state===JR){const a=fu;fu=null,Y$(()=>tL(t,e[0]),!1),fu=a}}function Y$(t,e){if(fu)return t();let n=!1;e||(fu=[]),Nb?n=!0:Nb=[],TM++;try{const a=t();return SIt(n),a}catch(a){n||(Nb=null),fu=null,VRe(a)}}function SIt(t){if(fu&&(YRe(fu),fu=null),t)return;const e=Nb;Nb=null,e.length&&Y$(()=>zRe(e),!1)}function YRe(t){for(let e=0;e=0;e--)X4(t.tOwned[e]);delete t.tOwned}if(t.owned){for(e=t.owned.length-1;e>=0;e--)X4(t.owned[e]);t.owned=null}if(t.cleanups){for(e=t.cleanups.length-1;e>=0;e--)t.cleanups[e]();t.cleanups=null}t.state=0}function DIt(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function VRe(t,e=vo){throw DIt(t)}function zK(t){if(typeof t=="function"&&!t.length)return zK(t());if(Array.isArray(t)){const e=[];for(let n=0;nr=Nh(()=>(vo.context={...vo.context,[t]:a.value},EIt(()=>a.children))),void 0),r}}const TIt=Symbol("fallback");function Rfe(t){for(let e=0;e1?[]:null;return GRe(()=>Rfe(i)),()=>{let l=t()||[],u=l.length,d,p;return l[OIt],Nh(()=>{let m,g,h,f,b,y,w,v,k;if(u===0)o!==0&&(Rfe(i),i=[],a=[],r=[],o=0,s&&(s=[])),n.fallback&&(a=[TIt],r[0]=AF(_=>(i[0]=_,n.fallback())),o=1);else if(o===0){for(r=new Array(u),p=0;p=y&&v>=y&&a[w]===l[v];w--,v--)h[v]=r[w],f[v]=i[w],s&&(b[v]=s[w]);for(m=new Map,g=new Array(v+1),p=v;p>=y;p--)k=l[p],d=m.get(k),g[p]=d===void 0?-1:d,m.set(k,p);for(d=y;d<=w;d++)k=a[d],p=m.get(k),p!==void 0&&p!==-1?(h[p]=r[d],f[p]=i[d],s&&(b[p]=s[d]),p=g[p],m.set(k,p)):i[d]();for(p=y;pt(e||{}));return NK(n),a}return Nh(()=>t(e||{}))}function OT(){return!0}const RIt={get(t,e,n){return e===MK?n:t.get(e)},has(t,e){return e===MK?!0:t.has(e)},set:OT,deleteProperty:OT,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:OT,deleteProperty:OT}},ownKeys(t){return t.keys()}};function iG(t){return(t=typeof t=="function"?t():t)?t:{}}function LIt(){for(let t=0,e=this.length;t=0;s--){const l=iG(t[s])[o];if(l!==void 0)return l}},has(o){for(let s=t.length-1;s>=0;s--)if(o in iG(t[s]))return!0;return!1},keys(){const o=[];for(let s=0;s=0;o--){const s=t[o];if(!s)continue;const l=Object.getOwnPropertyNames(s);for(let u=l.length-1;u>=0;u--){const d=l[u];if(d==="__proto__"||d==="constructor")continue;const p=Object.getOwnPropertyDescriptor(s,d);if(!a[d])a[d]=p.get?{enumerable:!0,configurable:!0,get:LIt.bind(n[d]=[p.get.bind(s)])}:p.value!==void 0?p:void 0;else{const A=n[d];A&&(p.get?A.push(p.get.bind(s)):p.value!==void 0&&A.push(()=>p.value))}}}const r={},i=Object.keys(a);for(let o=i.length-1;o>=0;o--){const s=i[o],l=a[s];l&&l.get?Object.defineProperty(r,s,l):r[s]=l?l.value:void 0}return r}const MIt=t=>`Stale read from <${t}>.`;function zIt(t){const e="fallback"in t&&{fallback:()=>t.fallback};return N1(PIt(()=>t.each,t.children,e||void 0))}function Po(t){const e=t.keyed,n=N1(()=>t.when,void 0,{equals:(a,r)=>e?a===r:!a==!r});return N1(()=>{const a=n();if(a){const r=t.children;return typeof r=="function"&&r.length>0?Nh(()=>r(e?a:()=>{if(!Nh(n))throw MIt("Show");return t.when})):r}return t.fallback},void 0,void 0)}const qIt=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],jIt=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...qIt]),UIt=new Set(["innerHTML","textContent","innerText","children"]),GIt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),HIt=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function WIt(t,e){const n=HIt[t];return typeof n=="object"?n[e]?n.$:void 0:n}const YIt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);function XIt(t,e,n){let a=n.length,r=e.length,i=a,o=0,s=0,l=e[r-1].nextSibling,u=null;for(;od-s){const g=e[o];for(;s{r=i,e===document?t():ki(e,t(),e.firstChild?null:void 0,n)},a.owner),()=>{r(),e.textContent=""}}function to(t,e,n){let a;const r=()=>{const o=document.createElement("template");return o.innerHTML=t,o.content.firstChild},i=()=>(a||(a=r())).cloneNode(!0);return i.cloneNode=i,i}function tse(t,e=window.document){const n=e[Lfe]||(e[Lfe]=new Set);for(let a=0,r=t.length;ar.call(t,n[1],i))}else t.addEventListener(e,n,typeof n!="function"&&n)}function JIt(t,e,n={}){const a=Object.keys(e||{}),r=Object.keys(n);let i,o;for(i=0,o=r.length;itypeof e.ref=="function"&&ase(e.ref,t)),ny(()=>n4t(t,e,n,!0,r,!0)),r}function ase(t,e,n){return Nh(()=>t(e,n))}function ki(t,e,n,a){if(n!==void 0&&!a&&(a=[]),typeof e!="function")return nL(t,e,a,n);ny(r=>nL(t,e(),r,n),a)}function n4t(t,e,n,a,r={},i=!1){e||(e={});for(const o in r)if(!(o in e)){if(o==="children")continue;r[o]=Mfe(t,o,null,r[o],n,i,e)}for(const o in e){if(o==="children")continue;const s=e[o];r[o]=Mfe(t,o,s,r[o],n,i,e)}}function a4t(t,e,n={}){if(globalThis._$HY.done)return qK(t,e,[...e.childNodes],n);Ua.completed=globalThis._$HY.completed,Ua.events=globalThis._$HY.events,Ua.load=a=>globalThis._$HY.r[a],Ua.has=a=>a in globalThis._$HY.r,Ua.gather=a=>qfe(e,a),Ua.registry=new Map,Ua.context={id:n.renderId||"",count:0};try{return qfe(e,n.renderId),qK(t,e,[...e.childNodes],n)}finally{Ua.context=null}}function vi(t){let e,n;return!iv()||!(e=Ua.registry.get(n=i4t()))?t():(Ua.completed&&Ua.completed.add(e),Ua.registry.delete(n),e)}function yo(t){let e=t,n=0,a=[];if(iv(t))for(;e;){if(e.nodeType===8){const r=e.nodeValue;if(r==="$")n++;else if(r==="/"){if(n===0)return[e,a];n--}}a.push(e),e=e.nextSibling}return[e,a]}function rse(){Ua.events&&!Ua.events.queued&&(queueMicrotask(()=>{const{completed:t,events:e}=Ua;if(e){for(e.queued=!1;e.length;){const[n,a]=e[0];if(!t.has(n))return;e.shift(),KRe(a)}Ua.done&&(Ua.events=_$HY.events=null,Ua.completed=_$HY.completed=null)}}),Ua.events.queued=!0)}function iv(t){return!!Ua.context&&!Ua.done&&(!t||t.isConnected)}function r4t(t){return t.toLowerCase().replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function Nfe(t,e,n){const a=e.trim().split(/\s+/);for(let r=0,i=a.length;ru===t))return;let e=t.target;const n=`$$${t.type}`,a=t.target,r=t.currentTarget,i=l=>Object.defineProperty(t,"target",{configurable:!0,value:l}),o=()=>{const l=e[n];if(l&&!e.disabled){const u=e[`${n}Data`];if(u!==void 0?l.call(e,u,t):l.call(e,t),t.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(t.target)&&i(e.host),!0},s=()=>{for(;o()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return e||document}}),Ua.registry&&!Ua.done&&(Ua.done=_$HY.done=!0),t.composedPath){const l=t.composedPath();i(l[0]);for(let u=0;u{let l=e();for(;typeof l=="function";)l=l();n=nL(t,l,n,a)}),()=>n;if(Array.isArray(e)){const l=[],u=n&&Array.isArray(n);if(jK(l,e,n,r))return ny(()=>n=nL(t,l,n,a,!0)),()=>n;if(i){if(!l.length)return n;if(a===void 0)return n=[...t.childNodes];let d=l[0];if(d.parentNode!==t)return n;const p=[d];for(;(d=d.nextSibling)!==a;)p.push(d);return n=p}if(l.length===0){if(n=TO(t,n,a),s)return n}else u?n.length===0?zfe(t,l,a):XIt(t,n,l):(n&&TO(t),zfe(t,l));n=l}else if(e.nodeType){if(i&&e.parentNode)return n=s?[e]:e;if(Array.isArray(n)){if(s)return n=TO(t,n,a,e);TO(t,n,null,e)}else n==null||n===""||!t.firstChild?t.appendChild(e):t.replaceChild(e,t.firstChild);n=e}}return n}function jK(t,e,n,a){let r=!1;for(let i=0,o=e.length;i=0;o--){const s=e[o];if(r!==s){const l=s.parentNode===t;!i&&!o?l?t.replaceChild(r,s):t.insertBefore(r,n):l&&s.remove()}else i=!0}}else t.insertBefore(r,n);return[r]}function qfe(t,e){const n=t.querySelectorAll("*[data-hk]");for(let a=0;a(FIt(),a4t(...t)),JRe=1024;let s4t=0,NA=class{constructor(e,n){this.from=e,this.to=n}};class Ga{constructor(e={}){this.id=s4t++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=nc.match(e)),n=>{let a=e(n);return a===void 0?null:[this,a]}}}Ga.closedBy=new Ga({deserialize:t=>t.split(" ")});Ga.openedBy=new Ga({deserialize:t=>t.split(" ")});Ga.group=new Ga({deserialize:t=>t.split(" ")});Ga.isolate=new Ga({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Ga.contextHash=new Ga({perNode:!0});Ga.lookAhead=new Ga({perNode:!0});Ga.mounted=new Ga({perNode:!0});class Z4{constructor(e,n,a){this.tree=e,this.overlay=n,this.parser=a}static get(e){return e&&e.props&&e.props[Ga.mounted.id]}}const c4t=Object.create(null);class nc{constructor(e,n,a,r=0){this.name=e,this.props=n,this.id=a,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):c4t,a=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new nc(e.name||"",n,e.id,a);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(r)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Ga.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let a in e)for(let r of a.split(" "))n[r]=e[a];return a=>{for(let r=a.prop(Ga.group),i=-1;i<(r?r.length:0);i++){let o=n[i<0?a.name:r[i]];if(o)return o}}}}nc.none=new nc("",Object.create(null),0,8);class pE{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(o|Di.IncludeAnonymous);;){let u=!1;if(l.from<=i&&l.to>=r&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&a&&(s||!l.type.isAnonymous)&&a(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:sse(nc.none,this.children,this.positions,0,this.children.length,0,this.length,(n,a,r)=>new yr(this.type,n,a,r,this.propValues),e.makeTree||((n,a,r)=>new yr(nc.none,n,a,r)))}static build(e){return p4t(e)}}yr.empty=new yr(nc.none,[],[],0);class ise{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ise(this.buffer,this.index)}}class Cw{constructor(e,n,a){this.buffer=e,this.length=n,this.set=a}get type(){return nc.none}toString(){let e=[];for(let n=0;n0));l=o[l+3]);return s}slice(e,n,a){let r=this.buffer,i=new Uint16Array(n-e),o=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&a>e;case 2:return a>e;case 4:return!0}}function K4(t,e,n,a){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=u;e+=n){let d=s[e],p=l[e]+o.from;if(eLe(r,a,p,p+d.length)){if(d instanceof Cw){if(i&Di.ExcludeBuffers)continue;let A=d.findChild(0,d.buffer.length,n,a-p,r);if(A>-1)return new wh(new l4t(o,d,e,p),null,A)}else if(i&Di.IncludeAnonymous||!d.type.isAnonymous||ose(d)){let A;if(!(i&Di.IgnoreMounts)&&(A=Z4.get(d))&&!A.overlay)return new bu(A.tree,p,e,o);let m=new bu(d,p,e,o);return i&Di.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(n<0?d.children.length-1:0,n,a,r)}}}if(i&Di.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,a=0){let r;if(!(a&Di.IgnoreOverlays)&&(r=Z4.get(this._tree))&&r.overlay){let i=e-this.from;for(let{from:o,to:s}of r.overlay)if((n>0?o<=i:o=i:s>i))return new bu(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,a)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Ufe(t,e,n,a){let r=t.cursor(),i=[];if(!r.firstChild())return i;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return i}for(;;){if(a!=null&&r.type.is(a))return i;if(r.type.is(e)&&i.push(r.node),!r.nextSibling())return a==null?i:[]}}function UK(t,e,n=e.length-1){for(let a=t;n>=0;a=a.parent){if(!a)return!1;if(!a.type.isAnonymous){if(e[n]&&e[n]!=a.name)return!1;n--}}return!0}class l4t{constructor(e,n,a,r){this.parent=e,this.buffer=n,this.index=a,this.start=r}}class wh extends tLe{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,a){super(),this.context=e,this._parent=n,this.index=a,this.type=e.buffer.set.types[e.buffer.buffer[a]]}child(e,n,a){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,a);return i<0?null:new wh(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,a=0){if(a&Di.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return i<0?null:new wh(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new wh(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new wh(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:a}=this.context,r=this.index+4,i=a.buffer[this.index+3];if(i>r){let o=a.buffer[this.index+1];e.push(a.slice(r,i,o)),n.push(0)}return new yr(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function nLe(t){if(!t.length)return null;let e=0,n=t[0];for(let i=1;in.from||o.to=e){let s=new bu(o.tree,o.overlay[0].from+i.from,-1,i);(r||(r=[a])).push(K4(s,e,n,!1))}}return r?nLe(r):a}class aL{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof bu)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let a=e._parent;a;a=a._parent)this.stack.unshift(a.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:a,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=a+r.buffer[e+1],this.to=a+r.buffer[e+2],!0}yield(e){return e?e instanceof bu?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,a){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,a,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,a);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,a=this.mode){return this.buffer?a&Di.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,a))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Di.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Di.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,a=this.stack.length-1;if(e<0){let r=a<0?0:this.stack[a]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(a<0?n.buffer.length:n.buffer[this.stack[a]+3]))return this.yieldBuf(r)}return a<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,a,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let i=n+e,o=e<0?-1:a._tree.children.length;i!=o;i+=e){let s=a._tree.children[i];if(this.mode&Di.IncludeAnonymous||s instanceof Cw||!s.type.isAnonymous||ose(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,a=i+1;break e}r=this.stack[--i]}for(let r=a;r=0;i--){if(i<0)return UK(this._tree,e,r);let o=a[n.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function ose(t){return t.children.some(e=>e instanceof Cw||!e.type.isAnonymous||ose(e))}function p4t(t){var e;let{buffer:n,nodeSet:a,maxBufferLength:r=JRe,reused:i=[],minRepeatType:o=a.types.length}=t,s=Array.isArray(n)?new ise(n,n.length):n,l=a.types,u=0,d=0;function p(k,_,x,C,B,I){let{id:E,start:S,end:P,size:O}=s,T=d,D=u;for(;O<0;)if(s.next(),O==-1){let M=i[E];x.push(M),C.push(S-k);return}else if(O==-3){u=E;return}else if(O==-4){d=E;return}else throw new RangeError(`Unrecognized record size: ${O}`);let $=l[E],F,L,q=S-k;if(P-S<=r&&(L=f(s.pos-_,B))){let M=new Uint16Array(L.size-L.skip),R=s.pos-L.size,j=M.length;for(;s.pos>R;)j=b(L.start,M,j);F=new Cw(M,P-L.start,a),q=L.start-k}else{let M=s.pos-O;s.next();let R=[],j=[],W=E>=o?E:-1,G=0,X=P;for(;s.pos>M;)W>=0&&s.id==W&&s.size>=0?(s.end<=X-r&&(g(R,j,S,G,s.end,X,W,T,D),G=R.length,X=s.end),s.next()):I>2500?A(S,M,R,j):p(S,M,R,j,W,I+1);if(W>=0&&G>0&&G-1&&G>0){let ne=m($,D);F=sse($,R,j,0,R.length,0,P-S,ne,ne)}else F=h($,R,j,P-S,T-P,D)}x.push(F),C.push(q)}function A(k,_,x,C){let B=[],I=0,E=-1;for(;s.pos>_;){let{id:S,start:P,end:O,size:T}=s;if(T>4)s.next();else{if(E>-1&&P=0;O-=3)S[T++]=B[O],S[T++]=B[O+1]-P,S[T++]=B[O+2]-P,S[T++]=T;x.push(new Cw(S,B[2]-P,a)),C.push(P-k)}}function m(k,_){return(x,C,B)=>{let I=0,E=x.length-1,S,P;if(E>=0&&(S=x[E])instanceof yr){if(!E&&S.type==k&&S.length==B)return S;(P=S.prop(Ga.lookAhead))&&(I=C[E]+S.length+P)}return h(k,x,C,B,I,_)}}function g(k,_,x,C,B,I,E,S,P){let O=[],T=[];for(;k.length>C;)O.push(k.pop()),T.push(_.pop()+x-B);k.push(h(a.types[E],O,T,I-B,S-I,P)),_.push(B-x)}function h(k,_,x,C,B,I,E){if(I){let S=[Ga.contextHash,I];E=E?[S].concat(E):[S]}if(B>25){let S=[Ga.lookAhead,B];E=E?[S].concat(E):[S]}return new yr(k,_,x,C,E)}function f(k,_){let x=s.fork(),C=0,B=0,I=0,E=x.end-r,S={size:0,start:0,skip:0};e:for(let P=x.pos-k;x.pos>P;){let O=x.size;if(x.id==_&&O>=0){S.size=C,S.start=B,S.skip=I,I+=4,C+=4,x.next();continue}let T=x.pos-O;if(O<0||T=o?4:0,$=x.start;for(x.next();x.pos>T;){if(x.size<0)if(x.size==-3)D+=4;else break e;else x.id>=o&&(D+=4);x.next()}B=$,C+=O,I+=D}return(_<0||C==k)&&(S.size=C,S.start=B,S.skip=I),S.size>4?S:void 0}function b(k,_,x){let{id:C,start:B,end:I,size:E}=s;if(s.next(),E>=0&&C4){let P=s.pos-(E-4);for(;s.pos>P;)x=b(k,_,x)}_[--x]=S,_[--x]=I-k,_[--x]=B-k,_[--x]=C}else E==-3?u=C:E==-4&&(d=C);return x}let y=[],w=[];for(;s.pos>0;)p(t.start||0,t.bufferStart||0,y,w,-1,0);let v=(e=t.length)!==null&&e!==void 0?e:y.length?w[0]+y[0].length:0;return new yr(l[t.topID],y.reverse(),w.reverse(),v)}const Gfe=new WeakMap;function mF(t,e){if(!t.isAnonymous||e instanceof Cw||e.type!=t)return 1;let n=Gfe.get(e);if(n==null){n=1;for(let a of e.children){if(a.type!=t||!(a instanceof yr)){n=1;break}n+=mF(t,a)}Gfe.set(e,n)}return n}function sse(t,e,n,a,r,i,o,s,l){let u=0;for(let g=a;g=d)break;_+=x}if(w==v+1){if(_>d){let x=g[v];m(x.children,x.positions,0,x.children.length,h[v]+y);continue}p.push(g[v])}else{let x=h[w-1]+g[w-1].length-k;p.push(sse(t,g,h,v,w,k,x,null,l))}A.push(k+y-i)}}return m(e,n,a,r,0),(s||l)(p,A,o)}class PM{constructor(){this.map=new WeakMap}setBuffer(e,n,a){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,a)}getBuffer(e,n){let a=this.map.get(e);return a&&a.get(n)}set(e,n){e instanceof wh?this.setBuffer(e.context.buffer,e.index,n):e instanceof bu&&this.map.set(e.tree,n)}get(e){return e instanceof wh?this.getBuffer(e.context.buffer,e.index):e instanceof bu?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Mb{constructor(e,n,a,r,i=!1,o=!1){this.from=e,this.to=n,this.tree=a,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],a=!1){let r=[new Mb(0,e.length,e,0,!1,a)];for(let i of n)i.to>e.length&&r.push(i);return r}static applyChanges(e,n,a=128){if(!n.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let d=s=a)for(;o&&o.from=A.from||p<=A.to||u){let m=Math.max(A.from,l)-u,g=Math.min(A.to,p)-u;A=m>=g?null:new Mb(m,g,A.tree,A.offset+u,s>0,!!d)}if(A&&r.push(A),o.to>p)break;o=inew NA(r.from,r.to)):[new NA(0,0)]:[new NA(0,e.length)],this.createParse(e,n||[],a)}parse(e,n,a){let r=this.startParse(e,n,a);for(;;){let i=r.advance();if(i)return i}}};class A4t{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function wg(t){return(e,n,a,r)=>new g4t(e,t,n,a,r)}class Hfe{constructor(e,n,a,r,i){this.parser=e,this.parse=n,this.overlay=a,this.target=r,this.from=i}}function Wfe(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class m4t{constructor(e,n,a,r,i,o,s){this.parser=e,this.predicate=n,this.mounts=a,this.index=r,this.start=i,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const GK=new Ga({perNode:!0});class g4t{constructor(e,n,a,r,i){this.nest=n,this.input=a,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let a=this.baseParse.advance();if(!a)return null;if(this.baseParse=null,this.baseTree=a,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let a=this.baseTree;return this.stoppedAt!=null&&(a=new yr(a.type,a.children,a.positions,a.length,a.propValues.concat([[GK,this.stoppedAt]]))),a}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let a=Object.assign(Object.create(null),e.target.props);a[Ga.mounted.id]=new Z4(n,e.overlay,e.parser),e.target.props=a}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(n){let u=n.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(u)for(let d of u.mount.overlay){let p=d.from+u.pos,A=d.to+u.pos;p>=r.from&&A<=r.to&&!n.ranges.some(m=>m.fromp)&&n.ranges.push({from:p,to:A})}}s=!1}else if(a&&(o=h4t(a.ranges,r.from,r.to)))s=o!=2;else if(!r.type.isAnonymous&&(i=this.nest(r,this.input))&&(r.fromnew NA(p.from-r.from,p.to-r.from)):null,r.tree,d.length?d[0].from:r.from)),i.overlay?d.length&&(a={ranges:d,depth:0,prev:a}):s=!1}}else if(n&&(l=n.predicate(r))&&(l===!0&&(l=new NA(r.from,r.to)),l.from=0&&n.ranges[u].to==l.from?n.ranges[u]={from:n.ranges[u].from,to:l.to}:n.ranges.push(l)}if(s&&r.firstChild())n&&n.depth++,a&&a.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let u=Vfe(this.ranges,n.ranges);u.length&&(Wfe(u),this.inner.splice(n.index,0,new Hfe(n.parser,n.parser.startParse(this.input,Zfe(n.mounts,u),u),n.ranges.map(d=>new NA(d.from-n.start,d.to-n.start)),n.target,u[0].from))),n=n.prev}a&&!--a.depth&&(a=a.prev)}}}}function h4t(t,e,n){for(let a of t){if(a.from>=n)break;if(a.to>e)return a.from<=e&&a.to>=n?2:1}return 0}function Yfe(t,e,n,a,r,i){if(e=e&&n.enter(a,1,Di.IgnoreOverlays|Di.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof yr)n=n.children[0];else break}return!1}}let b4t=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let a=this.curFrag=e[0];this.curTo=(n=a.tree.prop(GK))!==null&&n!==void 0?n:a.to,this.inner=new Xfe(a.tree,-a.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(GK))!==null&&e!==void 0?e:n.to,this.inner=new Xfe(n.tree,-n.offset)}}findMounts(e,n){var a;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let i=this.inner.cursor.node;i;i=i.parent){let o=(a=i.tree)===null||a===void 0?void 0:a.prop(Ga.mounted);if(o&&o.parser==n)for(let s=this.fragI;s=i.to)break;l.tree==this.curFrag.tree&&r.push({frag:l,pos:i.from-l.offset,mount:o})}}}return r}};function Vfe(t,e){let n=null,a=e;for(let r=1,i=0;r=s)break;l.to<=o||(n||(a=n=e.slice()),l.froms&&n.splice(i+1,0,new NA(s,l.to))):l.to>s?n[i--]=new NA(s,l.to):n.splice(i--,1))}}return a}function y4t(t,e,n,a){let r=0,i=0,o=!1,s=!1,l=-1e9,u=[];for(;;){let d=r==t.length?1e9:o?t[r].to:t[r].from,p=i==e.length?1e9:s?e[i].to:e[i].from;if(o!=s){let A=Math.max(l,n),m=Math.min(d,p,a);Anew NA(A.from+a,A.to+a)),p=y4t(e,d,l,u);for(let A=0,m=l;;A++){let g=A==p.length,h=g?u:p[A].from;if(h>m&&n.push(new Mb(m,h,r.tree,-o,i.from>=m||i.openStart,i.to<=h||i.openEnd)),g)break;m=p[A].to}}else n.push(new Mb(l,u,r.tree,-o,i.from>=o||i.openStart,i.to<=s||i.openEnd))}return n}let HK=[],aLe=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=aLe[a])e=a+1;else return!0;if(e==n)return!1}}function Kfe(t){return t>=127462&&t<=127487}const Jfe=8205;function v4t(t,e,n=!0,a=!0){return(n?rLe:k4t)(t,e,a)}function rLe(t,e,n){if(e==t.length)return e;e&&iLe(t.charCodeAt(e))&&oLe(t.charCodeAt(e-1))&&e--;let a=oG(t,e);for(e+=ebe(a);e=0&&Kfe(oG(t,o));)i++,o-=2;if(i%2==0)break;e+=2}else break}return e}function k4t(t,e,n){for(;e>0;){let a=rLe(t,e-2,n);if(a=56320&&t<57344}function oLe(t){return t>=55296&&t<56320}function ebe(t){return t<65536?1:2}let ni=class sLe{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,a){[e,n]=cB(this,e,n);let r=[];return this.decompose(0,e,r,2),a.length&&a.decompose(0,a.length,r,3),this.decompose(n,this.length,r,1),gF.from(r,this.length-(n-e)+a.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=cB(this,e,n);let a=[];return this.decompose(e,n,a,0),gF.from(a,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),a=this.length-this.scanIdentical(e,-1),r=new SI(this),i=new SI(e);for(let o=n,s=n;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(s+=r.value.length,r.done||s>=a)return!0}}iter(e=1){return new SI(this,e)}iterRange(e,n=this.length){return new cLe(this,e,n)}iterLines(e,n){let a;if(e==null)a=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;a=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new lLe(a)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?sLe.empty:e.length<=32?new ys(e):gF.from(ys.split(e,[]))}};class ys extends ni{constructor(e,n=x4t(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,a,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((n?a:s)>=e)return new O4t(r,s,a,o);r=s+1,a++}}decompose(e,n,a,r){let i=e<=0&&n>=this.length?this:new ys(tbe(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=a.pop(),s=hF(i.text,o.text.slice(),0,i.length);if(s.length<=32)a.push(new ys(s,o.length+i.length));else{let l=s.length>>1;a.push(new ys(s.slice(0,l)),new ys(s.slice(l)))}}else a.push(i)}replace(e,n,a){if(!(a instanceof ys))return super.replace(e,n,a);[e,n]=cB(this,e,n);let r=hF(this.text,hF(a.text,tbe(this.text,0,e)),n),i=this.length+a.length-(n-e);return r.length<=32?new ys(r,i):gF.from(ys.split(r,[]),i)}sliceString(e,n=this.length,a=` `){[e,n]=cB(this,e,n);let r="";for(let i=0,o=0;i<=n&&oe&&o&&(r+=a),ei&&(r+=s.slice(Math.max(0,e-i),n-i)),i=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let a=[],r=-1;for(let i of e)a.push(i),r+=i.length+1,a.length==32&&(n.push(new ys(a,r)),a=[],r=-1);return r>-1&&n.push(new ys(a,r)),n}}let gF=class QC extends ni{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let a of e)this.lines+=a.lines}lineInner(e,n,a,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,l=a+o.lines-1;if((n?l:s)>=e)return o.lineInner(e,n,a,r);r=s+1,a=l+1}}decompose(e,n,a,r){for(let i=0,o=0;o<=n&&i=o){let u=r&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!u?a.push(s):s.decompose(e-o,n-o,a,u)}o=l+1}}replace(e,n,a){if([e,n]=cB(this,e,n),a.lines=i&&n<=s){let l=o.replace(e-i,n-i,a),u=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let d=this.children.slice();return d[r]=l,new QC(d,this.length-(n-e)+a.length)}return super.replace(i,s,l)}i=s+1}return super.replace(e,n,a)}sliceString(e,n=this.length,a=` `){[e,n]=cB(this,e,n);let r="";for(let i=0,o=0;ie&&i&&(r+=a),eo&&(r+=s.sliceString(e-o,n-o,a)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof QC))return 0;let a=0,[r,i,o,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,i+=n){if(r==o||i==s)return a;let l=this.children[r],u=e.children[i];if(l!=u)return a+l.scanIdentical(u,n);a+=l.length+1}}static from(e,n=e.reduce((a,r)=>a+r.length+1,-1)){let a=0;for(let m of e)a+=m.lines;if(a<32){let m=[];for(let g of e)g.flatten(m);return new ys(m,n)}let r=Math.max(32,a>>5),i=r<<1,o=r>>1,s=[],l=0,u=-1,d=[];function p(m){let g;if(m.lines>i&&m instanceof QC)for(let h of m.children)p(h);else m.lines>o&&(l>o||!l)?(A(),s.push(m)):m instanceof ys&&l&&(g=d[d.length-1])instanceof ys&&m.lines+g.lines<=32?(l+=m.lines,u+=m.length+1,d[d.length-1]=new ys(g.text.concat(m.text),g.length+1+m.length)):(l+m.lines>r&&A(),l+=m.lines,u+=m.length+1,d.push(m))}function A(){l!=0&&(s.push(d.length==1?d[0]:QC.from(d,u)),u=-1,l=d.length=0)}for(let m of e)p(m);return A(),s.length==1?s[0]:new QC(s,n)}};ni.empty=new ys([""],0);function x4t(t){let e=-1;for(let n of t)e+=n.length+1;return e}function hF(t,e,n=0,a=1e9){for(let r=0,i=0,o=!0;i=n&&(l>a&&(s=s.slice(0,a-r)),r0?1:(e instanceof ys?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let a=this.nodes.length-1,r=this.nodes[a],i=this.offsets[a],o=i>>1,s=r instanceof ys?r.text.length:r.children.length;if(o==(n>0?s:0)){if(a==0)return this.done=!0,this.value="",this;n>0&&this.offsets[a-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(n>0?0:1)){if(this.offsets[a]+=n,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(r instanceof ys){let l=r.text[o+(n<0?-1:0)];if(this.offsets[a]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[a]+=n):(n<0&&this.offsets[a]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof ys?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class cLe{constructor(e,n,a){this.value="",this.done=!1,this.cursor=new SI(e,n>a?-1:1),this.pos=n>a?e.length:0,this.from=Math.min(n,a),this.to=Math.max(n,a)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let a=n<0?this.pos-this.from:this.to-this.pos;e>a&&(e=a),a-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=a?r:n<0?r.slice(r.length-a):r.slice(0,a),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class lLe{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:a,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):a?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ni.prototype[Symbol.iterator]=function(){return this.iter()},SI.prototype[Symbol.iterator]=cLe.prototype[Symbol.iterator]=lLe.prototype[Symbol.iterator]=function(){return this});let O4t=class{constructor(e,n,a,r){this.from=e,this.to=n,this.number=a,this.text=r}get length(){return this.to-this.from}};function cB(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Bl(t,e,n=!0,a=!0){return v4t(t,e,n,a)}function C4t(t){return t>=56320&&t<57344}function _4t(t){return t>=55296&&t<56320}function Ym(t,e){let n=t.charCodeAt(e);if(!_4t(n)||e+1==t.length)return n;let a=t.charCodeAt(e+1);return C4t(a)?(n-55296<<10)+(a-56320)+65536:n}function cse(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ab(t){return t<65536?1:2}const WK=/\r\n?|\n/;var Jc=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Jc||(Jc={}));class Ih{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return i+(e-r);i+=s}else{if(a!=Jc.Simple&&u>=e&&(a==Jc.TrackDel&&re||a==Jc.TrackBefore&&re))return null;if(u>e||u==e&&n<0&&!s)return e==r||n<0?i:i+l;i+=l}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,n=e){for(let a=0,r=0;a=0&&r<=n&&s>=e)return rn?"cover":!0;r=s}return!1}toString(){let e="";for(let n=0;n=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ih(e)}static create(e){return new Ih(e)}}class vc extends Ih{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return YK(this,(n,a,r,i,o)=>e=e.replace(r,r+(a-n),o),!1),e}mapDesc(e,n=!1){return XK(this,e,n,!0)}invert(e){let n=this.sections.slice(),a=[];for(let r=0,i=0;r=0){n[r]=s,n[r+1]=o;let l=r>>1;for(;a.length0&&R0(a,n,i.text),i.forward(d),s+=d}let u=e[o++];for(;s>1].toJSON()))}return e}static of(e,n,a){let r=[],i=[],o=0,s=null;function l(d=!1){if(!d&&!r.length)return;oA||p<0||A>n)throw new RangeError(`Invalid change range ${p} to ${A} (in doc of length ${n})`);let g=m?typeof m=="string"?ni.of(m.split(a||WK)):m:ni.empty,h=g.length;if(p==A&&h==0)return;po&&nu(r,p-o,-1),nu(r,A-p,h),R0(i,r,g),o=A}}return u(e),l(!s),s}static empty(e){return new vc(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],a=[];for(let r=0;rs&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)n.push(i[0],0);else{for(;a.length=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:a?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function R0(t,e,n){if(n.length==0)return;let a=e.length-2>>1;if(a>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)s=t.sections[o++],l=t.sections[o++];e(r,u,i,d,p),r=u,i=d}}}function XK(t,e,n,a=!1){let r=[],i=a?[]:null,o=new J4(t),s=new J4(e);for(let l=-1;;){if(o.done&&s.len||s.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&s.ins==-1){let u=Math.min(o.len,s.len);nu(r,u,-1),o.forward(u),s.forward(u)}else if(s.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(s.len=0&&l=0){let u=0,d=o.len;for(;d;)if(s.ins==-1){let p=Math.min(d,s.len);u+=p,d-=p,s.forward(p)}else if(s.ins==0&&s.lenl||o.ins>=0&&o.len>l)&&(s||a.length>u),i.forward2(l),o.forward(l)}}}}class J4{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?ni.empty:e[n]}textBit(e){let{inserted:n}=this.set,a=this.i-2>>1;return a>=n.length&&!e?ni.empty:n[a].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}let eS=class VK{constructor(e,n,a){this.from=e,this.to=n,this.flags=a}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let a,r;return this.empty?a=r=e.mapPos(this.from,n):(a=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),a==this.from&&r==this.to?this:new VK(a,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Kt.range(e,n);let a=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Kt.range(this.anchor,a)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Kt.range(e.anchor,e.head)}static create(e,n,a){return new VK(e,n,a)}};class Kt{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Kt.create(this.ranges.map(a=>a.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let a=0;ae.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Kt(e.ranges.map(n=>eS.fromJSON(n)),e.main)}static single(e,n=e){return new Kt([Kt.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let a=0,r=0;re?8:0)|i)}static normalized(e,n=0){let a=e[n];e.sort((r,i)=>r.from-i.from),n=e.indexOf(a);for(let r=1;ri.head?Kt.range(l,s):Kt.range(s,l))}}return new Kt(e,n)}}function dLe(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let lse=0;class da{constructor(e,n,a,r,i){this.combine=e,this.compareInput=n,this.compare=a,this.isStatic=r,this.id=lse++,this.default=e([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(e={}){return new da(e.combine||(n=>n),e.compareInput||((n,a)=>n===a),e.compare||(e.combine?(n,a)=>n===a:use),!!e.static,e.enables)}of(e){return new fF([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new fF(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new fF(e,this,2,n)}from(e,n){return n||(n=a=>a),this.compute([e],a=>n(a.field(e)))}}function use(t,e){return t==e||t.length==e.length&&t.every((n,a)=>n===e[a])}class fF{constructor(e,n,a,r){this.dependencies=e,this.facet=n,this.type=a,this.value=r,this.id=lse++}dynamicSlot(e){var n;let a=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=this.type==2,l=!1,u=!1,d=[];for(let p of this.dependencies)p=="doc"?l=!0:p=="selection"?u=!0:((n=e[p.id])!==null&&n!==void 0?n:1)&1||d.push(e[p.id]);return{create(p){return p.values[o]=a(p),1},update(p,A){if(l&&A.docChanged||u&&(A.docChanged||A.selection)||ZK(p,d)){let m=a(p);if(s?!nbe(m,p.values[o],r):!r(m,p.values[o]))return p.values[o]=m,1}return 0},reconfigure:(p,A)=>{let m,g=A.config.address[i];if(g!=null){let h=iL(A,g);if(this.dependencies.every(f=>f instanceof da?A.facet(f)===p.facet(f):f instanceof sc?A.field(f,!1)==p.field(f,!1):!0)||(s?nbe(m=a(p),h,r):r(m=a(p),h)))return p.values[o]=h,0}else m=a(p);return p.values[o]=m,1}}}}function nbe(t,e,n){if(t.length!=e.length)return!1;for(let a=0;at[l.id]),r=n.map(l=>l.type),i=a.filter(l=>!(l&1)),o=t[e.id]>>1;function s(l){let u=[];for(let d=0;da===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(abe).find(a=>a.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:a=>(a.values[n]=this.create(a),1),update:(a,r)=>{let i=a.values[n],o=this.updateF(i,r);return this.compareF(i,o)?0:(a.values[n]=o,1)},reconfigure:(a,r)=>r.config.address[this.id]!=null?(a.values[n]=r.field(this),0):(a.values[n]=this.create(a),1)}}init(e){return[this,abe.of({field:this,create:e})]}get extension(){return this}}const Pk={lowest:4,low:3,default:2,high:1,highest:0};function M2(t){return e=>new pLe(e,t)}const Ey={highest:M2(Pk.highest),high:M2(Pk.high),default:M2(Pk.default),low:M2(Pk.low),lowest:M2(Pk.lowest)};class pLe{constructor(e,n){this.inner=e,this.prec=n}}class Ix{of(e){return new KK(this,e)}reconfigure(e){return Ix.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class KK{constructor(e,n){this.compartment=e,this.inner=n}}class rL{constructor(e,n,a,r,i,o){for(this.base=e,this.compartments=n,this.dynamicSlots=a,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,a){let r=[],i=Object.create(null),o=new Map;for(let A of E4t(e,n,o))A instanceof sc?r.push(A):(i[A.facet.id]||(i[A.facet.id]=[])).push(A);let s=Object.create(null),l=[],u=[];for(let A of r)s[A.id]=u.length<<1,u.push(m=>A.slot(m));let d=a?.config.facets;for(let A in i){let m=i[A],g=m[0].facet,h=d&&d[A]||[];if(m.every(f=>f.type==0))if(s[g.id]=l.length<<1|1,use(h,m))l.push(a.facet(g));else{let f=g.combine(m.map(b=>b.value));l.push(a&&g.compare(f,a.facet(g))?a.facet(g):f)}else{for(let f of m)f.type==0?(s[f.id]=l.length<<1|1,l.push(f.value)):(s[f.id]=u.length<<1,u.push(b=>f.dynamicSlot(b)));s[g.id]=u.length<<1,u.push(f=>B4t(f,g,m))}}let p=u.map(A=>A(s));return new rL(e,o,p,s,l,i)}}function E4t(t,e,n){let a=[[],[],[],[],[]],r=new Map;function i(o,s){let l=r.get(o);if(l!=null){if(l<=s)return;let u=a[l].indexOf(o);u>-1&&a[l].splice(u,1),o instanceof KK&&n.delete(o.compartment)}if(r.set(o,s),Array.isArray(o))for(let u of o)i(u,s);else if(o instanceof KK){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;n.set(o.compartment,u),i(u,s)}else if(o instanceof pLe)i(o.inner,o.prec);else if(o instanceof sc)a[s].push(o),o.provides&&i(o.provides,s);else if(o instanceof fF)a[s].push(o),o.facet.extensions&&i(o.facet.extensions,Pk.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(u,s)}}return i(t,Pk.default),a.reduce((o,s)=>o.concat(s))}function II(t,e){if(e&1)return 2;let n=e>>1,a=t.status[n];if(a==4)throw new Error("Cyclic dependency between fields and/or facets");if(a&2)return a;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function iL(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const ALe=da.define(),JK=da.define({combine:t=>t.some(e=>e),static:!0}),mLe=da.define({combine:t=>t.length?t[0]:void 0,static:!0}),gLe=da.define(),hLe=da.define(),fLe=da.define(),bLe=da.define({combine:t=>t.length?t[0]:!1});class Qy{constructor(e,n){this.type=e,this.value=n}static define(){return new Q4t}}class Q4t{of(e){return new Qy(this,e)}}class S4t{constructor(e){this.map=e}of(e){return new gr(this,e)}}class gr{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new gr(this.type,n)}is(e){return this.type==e}static define(e={}){return new S4t(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let a=[];for(let r of e){let i=r.map(n);i&&a.push(i)}return a}}gr.reconfigure=gr.define();gr.appendConfig=gr.define();class Zs{constructor(e,n,a,r,i,o){this.startState=e,this.changes=n,this.selection=a,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,a&&dLe(a,n.newLength),i.some(s=>s.type==Zs.time)||(this.annotations=i.concat(Zs.time.of(Date.now())))}static create(e,n,a,r,i,o){return new Zs(e,n,a,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Zs.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Zs.time=Qy.define();Zs.userEvent=Qy.define();Zs.addToHistory=Qy.define();Zs.remote=Qy.define();function I4t(t,e){let n=[];for(let a=0,r=0;;){let i,o;if(a=t[a]))i=t[a++],o=t[a++];else if(r=0;r--){let i=a[r](t);i instanceof Zs?t=i:Array.isArray(i)&&i.length==1&&i[0]instanceof Zs?t=i[0]:t=wLe(e,k_(i),!1)}return t}function $4t(t){let e=t.startState,n=e.facet(fLe),a=t;for(let r=n.length-1;r>=0;r--){let i=n[r](t);i&&Object.keys(i).length&&(a=yLe(a,eJ(e,i,t.changes.newLength),!0))}return a==t?t:Zs.create(e,t.changes,t.selection,a.effects,a.annotations,a.scrollIntoView)}const T4t=[];function k_(t){return t==null?T4t:Array.isArray(t)?t:[t]}var Ks=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Ks||(Ks={}));const P4t=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let tJ;try{tJ=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function F4t(t){if(tJ)return tJ.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||P4t.test(n)))return!0}return!1}function R4t(t){return e=>{if(!/\S/.test(e))return Ks.Space;if(F4t(e))return Ks.Word;for(let n=0;n-1)return Ks.Word;return Ks.Other}}class Mr{constructor(e,n,a,r,i,o){this.config=e,this.doc=n,this.selection=a,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let s=0;sr.set(u,l)),n=null),r.set(s.value.compartment,s.value.extension)):s.is(gr.reconfigure)?(n=null,a=s.value):s.is(gr.appendConfig)&&(n=null,a=k_(a).concat(s.value));let i;n?i=e.startState.values.slice():(n=rL.resolve(a,r,this),i=new Mr(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(JK)?e.newSelection:e.newSelection.asSingle();new Mr(n,e.newDoc,o,i,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Kt.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,a=e(n.ranges[0]),r=this.changes(a.changes),i=[a.range],o=k_(a.effects);for(let s=1;so.spec.fromJSON(s,l)))}}return Mr.create({doc:e.doc,selection:Kt.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=rL.resolve(e.extensions||[],new Map),a=e.doc instanceof ni?e.doc:ni.of((e.doc||"").split(n.staticFacet(Mr.lineSeparator)||WK)),r=e.selection?e.selection instanceof Kt?e.selection:Kt.single(e.selection.anchor,e.selection.head):Kt.single(0);return dLe(r,a.length),n.staticFacet(JK)||(r=r.asSingle()),new Mr(n,a,r,n.dynamicSlots.map(()=>null),(i,o)=>o.create(i),null)}get tabSize(){return this.facet(Mr.tabSize)}get lineBreak(){return this.facet(Mr.lineSeparator)||` `}get readOnly(){return this.facet(bLe)}phrase(e,...n){for(let a of this.facet(Mr.phrases))if(Object.prototype.hasOwnProperty.call(a,e)){e=a[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(a,r)=>{if(r=="$")return"$";let i=+(r||1);return!i||i>n.length?a:n[i-1]})),e}languageDataAt(e,n,a=-1){let r=[];for(let i of this.facet(ALe))for(let o of i(this,n,a))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return R4t(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:a,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-a,s=e-a;for(;o>0;){let l=Bl(n,o,!1);if(i(n.slice(l,o))!=Ks.Word)break;o=l}for(;st.length?t[0]:4});Mr.lineSeparator=mLe;Mr.readOnly=bLe;Mr.phrases=da.define({compare(t,e){let n=Object.keys(t),a=Object.keys(e);return n.length==a.length&&n.every(r=>t[r]==e[r])}});Mr.languageData=ALe;Mr.changeFilter=gLe;Mr.transactionFilter=hLe;Mr.transactionExtender=fLe;Ix.reconfigure=gr.define();function X$(t,e,n={}){let a={};for(let r of t)for(let i of Object.keys(r)){let o=r[i],s=a[i];if(s===void 0)a[i]=o;else if(!(s===o||o===void 0))if(Object.hasOwnProperty.call(n,i))a[i]=n[i](s,o);else throw new Error("Config merge conflict for field "+i)}for(let r in e)a[r]===void 0&&(a[r]=e[r]);return a}class M1{eq(e){return this==e}range(e,n=e){return nJ.create(e,n,this)}}M1.prototype.startSide=M1.prototype.endSide=0;M1.prototype.point=!1;M1.prototype.mapMode=Jc.TrackDel;let nJ=class vLe{constructor(e,n,a){this.from=e,this.to=n,this.value=a}static create(e,n,a){return new vLe(e,n,a)}};function aJ(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class dse{constructor(e,n,a,r){this.from=e,this.to=n,this.value=a,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,a,r=0){let i=a?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let l=o+s>>1,u=i[l]-e||(a?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return u>=0?o:s;u>=0?s=l:o=l+1}}between(e,n,a,r){for(let i=this.findIndex(n,-1e9,!0),o=this.findIndex(a,1e9,!1,i);im||A==m&&u.startSide>0&&u.endSide<=0)continue;(m-A||u.endSide-u.startSide)<0||(o<0&&(o=A),u.point&&(s=Math.max(s,m-A)),a.push(u),r.push(A-o),i.push(m-o))}return{mapped:a.length?new dse(r,i,a,s):null,pos:o}}}class ti{constructor(e,n,a,r){this.chunkPos=e,this.chunk=n,this.nextLayer=a,this.maxPoint=r}static create(e,n,a,r){return new ti(e,n,a,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:a=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(a&&(n=n.slice().sort(aJ)),this.isEmpty)return n.length?ti.of(n):this;let s=new kLe(this,null,-1).goto(0),l=0,u=[],d=new ay;for(;s.value||l=0){let p=n[l++];d.addInner(p.from,p.to,p.value)||u.push(p)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||is.to||i=i&&e<=i+o.length&&o.between(i,e-i,n-i,a)===!1)return}this.nextLayer.between(e,n,a)}}iter(e=0){return eD.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return eD.from(e).goto(n)}static compare(e,n,a,r,i=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=i),s=n.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=i),l=rbe(o,s,a),u=new z2(o,l,i),d=new z2(s,l,i);a.iterGaps((p,A,m)=>ibe(u,p,d,A,m,r)),a.empty&&a.length==0&&ibe(u,0,d,0,0,r)}static eq(e,n,a=0,r){r==null&&(r=999999999);let i=e.filter(d=>!d.isEmpty&&n.indexOf(d)<0),o=n.filter(d=>!d.isEmpty&&e.indexOf(d)<0);if(i.length!=o.length)return!1;if(!i.length)return!0;let s=rbe(i,o),l=new z2(i,s,0).goto(a),u=new z2(o,s,0).goto(a);for(;;){if(l.to!=u.to||!rJ(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>r)return!0;l.next(),u.next()}}static spans(e,n,a,r,i=-1){let o=new z2(e,null,i).goto(n),s=n,l=o.openStart;for(;;){let u=Math.min(o.to,a);if(o.point){let d=o.activeForPoint(o.to),p=o.pointFroms&&(r.span(s,u,o.active,l),l=o.openEnd(u));if(o.to>a)return l+(o.point&&o.to>a?1:0);s=o.to,o.next()}}static of(e,n=!1){let a=new ay;for(let r of e instanceof nJ?[e]:n?L4t(e):e)a.add(r.from,r.to,r.value);return a.finish()}static join(e){if(!e.length)return ti.empty;let n=e[e.length-1];for(let a=e.length-2;a>=0;a--)for(let r=e[a];r!=ti.empty;r=r.nextLayer)n=new ti(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}ti.empty=new ti([],[],null,-1);function L4t(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(aJ);e=a}return t}ti.empty.nextLayer=ti.empty;class ay{finishChunk(e){this.chunks.push(new dse(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,a){this.addInner(e,n,a)||(this.nextLayer||(this.nextLayer=new ay)).add(e,n,a)}addInner(e,n,a){let r=e-this.lastTo||a.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||a.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=a,this.lastFrom=e,this.lastTo=n,this.value.push(a),a.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let a=n.value.length-1;return this.last=n.value[a],this.lastFrom=n.from[a]+e,this.lastTo=n.to[a]+e,!0}finish(){return this.finishInner(ti.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=ti.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function rbe(t,e,n){let a=new Map;for(let i of t)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=a&&r.push(new kLe(o,n,a,i));return r.length==1?r[0]:new eD(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let a of this.heap)a.goto(e,n);for(let a=this.heap.length>>1;a>=0;a--)sG(this.heap,a);return this.next(),this}forward(e,n){for(let a of this.heap)a.forward(e,n);for(let a=this.heap.length>>1;a>=0;a--)sG(this.heap,a);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),sG(this.heap,0)}}}function sG(t,e){for(let n=t[e];;){let a=(e<<1)+1;if(a>=t.length)break;let r=t[a];if(a+1=0&&(r=t[a+1],a++),n.compare(r)<0)break;t[a]=n,t[e]=r,e=a}}class z2{constructor(e,n,a){this.minPoint=a,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=eD.from(e,n,a)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){_T(this.active,e),_T(this.activeTo,e),_T(this.activeRank,e),this.minActive=obe(this.active,this.activeTo)}addActive(e){let n=0,{value:a,to:r,rank:i}=this.cursor;for(;n0;)n++;BT(this.active,n,a),BT(this.activeTo,n,r),BT(this.activeRank,n,i),e&&BT(e,n,this.cursor.from),this.minActive=obe(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let a=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),a&&_T(a,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(a),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&a[r]=0&&!(this.activeRank[a]e||this.activeTo[a]==e&&this.active[a].endSide>=this.point.endSide)&&n.push(this.active[a]);return n.reverse()}openEnd(e){let n=0;for(let a=this.activeTo.length-1;a>=0&&this.activeTo[a]>e;a--)n++;return n}}function ibe(t,e,n,a,r,i){t.goto(e),n.goto(a);let o=a+r,s=a,l=a-e;for(;;){let u=t.to+l-n.to,d=u||t.endSide-n.endSide,p=d<0?t.to+l:n.to,A=Math.min(p,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&rJ(t.activeForPoint(t.to),n.activeForPoint(n.to))||i.comparePoint(s,A,t.point,n.point):A>s&&!rJ(t.active,n.active)&&i.compareRange(s,A,t.active,n.active),p>o)break;(u||t.openEnd!=n.openEnd)&&i.boundChange&&i.boundChange(p),s=p,d<=0&&t.next(),d>=0&&n.next()}}function rJ(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;a--)t[a+1]=t[a];t[e]=n}function obe(t,e){let n=-1,a=1e9;for(let r=0;r=e)return r;if(r==t.length)break;i+=t.charCodeAt(r)==9?n-i%n:1,r=Bl(t,r)}return a===!0?-1:t.length}const iJ="ͼ",sbe=typeof Symbol>"u"?"__"+iJ:Symbol.for(iJ),oJ=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),cbe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class _w{constructor(e,n){this.rules=[];let{finish:a}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function i(o,s,l,u){let d=[],p=/^@(\w+)\b/.exec(o[0]),A=p&&p[1]=="keyframes";if(p&&s==null)return l.push(o[0]+";");for(let m in s){let g=s[m];if(/&/.test(m))i(m.split(/,\s*/).map(h=>o.map(f=>h.replace(/&/,f))).reduce((h,f)=>h.concat(f)),g,l);else if(g&&typeof g=="object"){if(!p)throw new RangeError("The value of a property ("+m+") should be a primitive value.");i(r(m),g,d,A)}else g!=null&&d.push(m.replace(/_.*/,"").replace(/[A-Z]/g,h=>"-"+h.toLowerCase())+": "+g+";")}(d.length||A)&&l.push((a&&!p&&!u?o.map(a):o).join(", ")+" {"+d.join(" ")+"}")}for(let o in e)i(r(o),e[o],this.rules)}getRules(){return this.rules.join(` `)}static newName(){let e=cbe[sbe]||1;return cbe[sbe]=e+1,iJ+e.toString(36)}static mount(e,n,a){let r=e[oJ],i=a&&a.nonce;r?i&&r.setNonce(i):r=new M4t(e,i),r.mount(Array.isArray(n)?n:[n],e)}}let lbe=new Map;class M4t{constructor(e,n){let a=e.ownerDocument||e,r=a.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let i=lbe.get(a);if(i)return e[oJ]=i;this.sheet=new r.CSSStyleSheet,lbe.set(a,this)}else this.styleTag=a.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[oJ]=this}mount(e,n){let a=this.sheet,r=0,i=0;for(let o=0;o-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,s),a)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},z4t=typeof navigator<"u"&&/Mac/.test(navigator.platform),q4t=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Cl=0;Cl<10;Cl++)Bw[48+Cl]=Bw[96+Cl]=String(Cl);for(var Cl=1;Cl<=24;Cl++)Bw[Cl+111]="F"+Cl;for(var Cl=65;Cl<=90;Cl++)Bw[Cl]=String.fromCharCode(Cl+32),tD[Cl]=String.fromCharCode(Cl);for(var cG in Bw)tD.hasOwnProperty(cG)||(tD[cG]=Bw[cG]);function j4t(t){var e=z4t&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||q4t&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?tD:Bw)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function nD(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function sJ(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function bF(t,e){if(!e.anchorNode)return!1;try{return sJ(t,e.anchorNode)}catch{return!1}}function lB(t){return t.nodeType==3?q1(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function DI(t,e,n,a){return n?ube(t,e,n,a,-1)||ube(t,e,n,a,1):!1}function z1(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function oL(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function ube(t,e,n,a,r){for(;;){if(t==n&&e==a)return!0;if(e==(r<0?0:Mh(t))){if(t.nodeName=="DIV")return!1;let i=t.parentNode;if(!i||i.nodeType!=1)return!1;e=z1(t)+(r<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?Mh(t):0}else return!1}}function Mh(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function V$(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function U4t(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function xLe(t,e){let n=e.width/t.offsetWidth,a=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(a>.995&&a<1.005||!isFinite(a)||Math.abs(e.height-t.offsetHeight)<1)&&(a=1),{scaleX:n,scaleY:a}}function G4t(t,e,n,a,r,i,o,s){let l=t.ownerDocument,u=l.defaultView||window;for(let d=t,p=!1;d&&!p;)if(d.nodeType==1){let A,m=d==l.body,g=1,h=1;if(m)A=U4t(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(p=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let y=d.getBoundingClientRect();({scaleX:g,scaleY:h}=xLe(d,y)),A={left:y.left,right:y.left+d.clientWidth*g,top:y.top,bottom:y.top+d.clientHeight*h}}let f=0,b=0;if(r=="nearest")e.top0&&e.bottom>A.bottom+b&&(b=e.bottom-A.bottom+b+o)):e.bottom>A.bottom&&(b=e.bottom-A.bottom+o,n<0&&e.top-b0&&e.right>A.right+f&&(f=e.right-A.right+f+i)):e.right>A.right&&(f=e.right-A.right+i,n<0&&e.leftr.clientHeight&&(a=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:a}}class W4t{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:a}=e;this.set(n,Math.min(e.anchorOffset,n?Mh(n):0),a,Math.min(e.focusOffset,a?Mh(a):0))}set(e,n,a,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=a,this.focusOffset=r}}let PO=null;function OLe(t){if(t.setActive)return t.setActive();if(PO)return t.focus(PO);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(PO==null?{get preventScroll(){return PO={preventScroll:!0},!0}}:void 0),!PO){PO=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function BLe(t,e){for(let n=t,a=e;;){if(n.nodeType==3&&a>0)return{node:n,offset:a};if(n.nodeType==1&&a>0){if(n.contentEditable=="false")return null;n=n.childNodes[a-1],a=Mh(n)}else if(n.parentNode&&!oL(n))a=z1(n),n=n.parentNode;else return null}}function ELe(t,e){for(let n=t,a=e;;){if(n.nodeType==3&&an)return p.domBoundsAround(e,n,u);if(A>=e&&r==-1&&(r=l,i=u),u>n&&p.dom.parentNode==this.dom){o=l,s=d;break}d=A,u=A+p.breakAfter}return{from:i,to:s<0?a+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,a=pse){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let a=this.children[--this.i];this.pos-=a.length+a.breakAfter}}}function SLe(t,e,n,a,r,i,o,s,l){let{children:u}=t,d=u.length?u[e]:null,p=i.length?i[i.length-1]:null,A=p?p.breakAfter:o;if(!(e==a&&d&&!o&&!A&&i.length<2&&d.merge(n,r,i.length?p:null,n==0,s,l))){if(a0&&(!o&&i.length&&d.merge(n,d.length,i[0],!1,s,0)?d.breakAfter=i.shift().breakAfter:(n2);var Hn={mac:gbe||/Mac/.test(Ed.platform),windows:/Win/.test(Ed.platform),linux:/Linux|X11/.test(Ed.platform),ie:RM,ie_version:DLe?cJ.documentMode||6:uJ?+uJ[1]:lJ?+lJ[1]:0,gecko:Abe,gecko_version:Abe?+(/Firefox\/(\d+)/.exec(Ed.userAgent)||[0,0])[1]:0,chrome:!!lG,chrome_version:lG?+lG[1]:0,ios:gbe,android:/Android\b/.test(Ed.userAgent),webkit:mbe,safari:$Le,webkit_version:mbe?+(/\bAppleWebKit\/(\d+)/.exec(Ed.userAgent)||[0,0])[1]:0,tabSize:cJ.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const V4t=256;class pg extends Li{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,a){return this.flags&8||a&&(!(a instanceof pg)||this.length-(n-e)+a.length>V4t||a.flags&8)?!1:(this.text=this.text.slice(0,e)+(a?a.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new pg(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new su(this.dom,e)}domBoundsAround(e,n,a){return{from:a,to:a+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return Z4t(this.dom,e,n)}}class iy extends Li{constructor(e,n=[],a=0){super(),this.mark=e,this.children=n,this.length=a;for(let r of n)r.setParent(this)}setAttrs(e){if(CLe(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,a,r,i,o){return a&&(!(a instanceof iy&&a.mark.eq(this.mark))||e&&i<=0||ne&&n.push(a=e&&(r=i),a=l,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new iy(this.mark,n,o)}domAtPos(e){return TLe(this,e)}coordsAt(e,n){return FLe(this,e,n)}}function Z4t(t,e,n){let a=t.nodeValue.length;e>a&&(e=a);let r=e,i=e,o=0;e==0&&n<0||e==a&&n>=0?Hn.chrome||Hn.gecko||(e?(r--,o=1):i=0)?0:s.length-1];return Hn.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),o?V$(l,o<0):l||null}class Zk extends Li{static create(e,n,a){return new Zk(e,n,a)}constructor(e,n,a){super(),this.widget=e,this.length=n,this.side=a,this.prevWidget=null}split(e){let n=Zk.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,a,r,i,o){return a&&(!(a instanceof Zk)||!this.widget.compare(a.widget)||e>0&&i<=0||n0)?su.before(this.dom):su.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let a=this.widget.coordsAt(this.dom,e,n);if(a)return a;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let s=o?r.length-1:0;i=r[s],!(e>0?s==0:s==r.length-1||i.top0?su.before(this.dom):su.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ni.empty}get isHidden(){return!0}}pg.prototype.children=Zk.prototype.children=uB.prototype.children=pse;function TLe(t,e){let n=t.dom,{children:a}=t,r=0;for(let i=0;ri&&e0;i--){let o=a[i-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let i=r;i0&&e instanceof iy&&r.length&&(a=r[r.length-1])instanceof iy&&a.mark.eq(e.mark)?PLe(a,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function FLe(t,e,n){let a=null,r=-1,i=null,o=-1;function s(u,d){for(let p=0,A=0;p=d&&(m.children.length?s(m,d-A):(!i||i.isHidden&&n>0)&&(g>d||A==g&&m.getSide()>0)?(i=m,o=d-A):(A-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let i of a)if(i!=n&&(r.indexOf(i)==-1||t[i]!==e[i]))return!1;return!0}function pJ(t,e,n){let a=!1;if(e)for(let r in e)n&&r in n||(a=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(a=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return a}function J4t(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Ew(e,n,n,a,e.widget||null,!1)}static replace(e){let n=!!e.block,a,r;if(e.isBlockGap)a=-5e8,r=4e8;else{let{start:i,end:o}=RLe(e,n);a=(i?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new Ew(e,a,r,n,e.widget||null,!0)}static line(e){return new K$(e)}static set(e,n=!1){return ti.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}na.none=ti.empty;class Z$ extends na{constructor(e){let{start:n,end:a}=RLe(e);super(n?-1:5e8,a?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,a;return this==e||e instanceof Z$&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((a=e.attrs)===null||a===void 0?void 0:a.class))&&sL(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Z$.prototype.point=!1;class K$ extends na{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof K$&&this.spec.class==e.spec.class&&sL(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}K$.prototype.mapMode=Jc.TrackBefore;K$.prototype.point=!0;class Ew extends na{constructor(e,n,a,r,i,o){super(n,a,i,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?Jc.TrackBefore:Jc.TrackAfter:Jc.TrackDel}get type(){return this.startSide!=this.endSide?Dh.WidgetRange:this.startSide<=0?Dh.WidgetBefore:Dh.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ew&&eDt(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Ew.prototype.point=!0;function RLe(t,e=!1){let{inclusiveStart:n,inclusiveEnd:a}=t;return n==null&&(n=t.inclusive),a==null&&(a=t.inclusive),{start:n??e,end:a??e}}function eDt(t,e){return t==e||!!(t&&e&&t.compare(e))}function yF(t,e,n,a=0){let r=n.length-1;r>=0&&n[r]+a>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class Gs extends Li{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,a,r,i,o){if(a){if(!(a instanceof Gs))return!1;this.dom||a.transferDOM(this)}return r&&this.setDeco(a?a.attrs:null),ILe(this,e,n,a?a.children.slice():[],i,o),!0}split(e){let n=new Gs;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:a,off:r}=this.childPos(e);r&&(n.append(this.children[a].split(r),0),this.children[a].merge(r,this.children[a].length,null,!1,0,0),a++);for(let i=a;i0&&this.children[a-1].length==0;)this.children[--a].destroy();return this.children.length=a,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){sL(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){PLe(this,e,n)}addLineDeco(e){let n=e.spec.attributes,a=e.spec.class;n&&(this.attrs=dJ(n,this.attrs||{})),a&&(this.attrs=dJ({class:a},this.attrs||{}))}domAtPos(e){return TLe(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var a;this.dom?this.flags&4&&(CLe(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(pJ(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&Li.get(r)instanceof iy;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((a=Li.get(r))===null||a===void 0?void 0:a.isEditable)==!1&&(!Hn.ios||!this.children.some(i=>i instanceof pg))){let i=document.createElement("BR");i.cmIgnore=!0,this.dom.appendChild(i)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let a of this.children){if(!(a instanceof pg)||/[^ -~]/.test(a.text))return null;let r=lB(a.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let a=FLe(this,e,n);if(!this.children.length&&a&&this.parent){let{heightOracle:r}=this.parent.view.viewState,i=a.bottom-a.top;if(Math.abs(i-r.lineHeight)<2&&r.textHeight=n){if(i instanceof Gs)return i;if(o>n)break}r=o+i.breakAfter}return null}}class zb extends Li{constructor(e,n,a){super(),this.widget=e,this.length=n,this.deco=a,this.breakAfter=0,this.prevWidget=null}merge(e,n,a,r,i,o){return a&&(!(a instanceof zb)||!this.widget.compare(a.widget)||e>0&&i<=0||n0}}class AJ extends ov{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class $I{constructor(e,n,a,r){this.doc=e,this.pos=n,this.end=a,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof zb&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Gs),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ET(new uB(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof zb)&&this.getLine()}buildText(e,n,a){for(;e>0;){if(this.textOff==this.text.length){let{value:i,lineBreak:o,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=i,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-a)),this.getLine().append(ET(new pg(this.text.slice(this.textOff,this.textOff+r)),n),a),this.atCursorPos=!0,this.textOff+=r,e-=r,a=0}}span(e,n,a,r){this.buildText(n-e,a,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,a,r,i,o){if(this.disallowBlockEffectsFor[o]&&a instanceof Ew){if(a.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(a instanceof Ew)if(a.block)a.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new zb(a.widget||dB.block,s,a));else{let l=Zk.create(a.widget||dB.inline,s,s?0:a.startSide),u=this.atCursorPos&&!l.isEditable&&i<=r.length&&(e0),d=!l.isEditable&&(er.length||a.startSide<=0),p=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(p.append(ET(new uB(1),r),i),i=r.length+Math.max(0,i-r.length)),p.append(ET(l,r),i),this.atCursorPos=d,this.pendingBuffer=d?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(a);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=i)}static build(e,n,a,r,i){let o=new $I(e,n,a,i);return o.openEnd=ti.spans(r,n,a,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function ET(t,e){for(let n of e)t=new iy(n,[t],t.length);return t}class dB extends ov{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}dB.inline=new dB("span");dB.block=new dB("div");var Bs=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Bs||(Bs={}));const j1=Bs.LTR,Ase=Bs.RTL;function LLe(t){let e=[];for(let n=0;n=n){if(s.level==a)return o;(i<0||(r!=0?r<0?s.fromn:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}function MLe(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;h-=3)if(qg[h+1]==-m){let f=qg[h+2],b=f&2?r:f&4?f&1?i:r:0;b&&(Ri[p]=Ri[qg[h]]=b),s=h;break}}else{if(qg.length==189)break;qg[s++]=p,qg[s++]=A,qg[s++]=l}else if((g=Ri[p])==2||g==1){let h=g==r;l=h?0:1;for(let f=s-3;f>=0;f-=3){let b=qg[f+2];if(b&2)break;if(h)qg[f+2]|=2;else{if(b&4)break;qg[f+2]|=4}}}}}function oDt(t,e,n,a){for(let r=0,i=a;r<=n.length;r++){let o=r?n[r-1].to:t,s=rl;)g==f&&(g=n[--h].from,f=h?n[h-1].to:t),Ri[--g]=m;l=d}else i=u,l++}}}function gJ(t,e,n,a,r,i,o){let s=a%2?2:1;if(a%2==r%2)for(let l=e,u=0;ll&&o.push(new L0(l,h.from,m));let f=h.direction==j1!=!(m%2);hJ(t,f?a+1:a,r,h.inner,h.from,h.to,o),l=h.to}g=h.to}else{if(g==n||(d?Ri[g]!=s:Ri[g]==s))break;g++}A?gJ(t,l,g,a+1,r,A,o):le;){let d=!0,p=!1;if(!u||l>i[u-1].to){let h=Ri[l-1];h!=s&&(d=!1,p=h==16)}let A=!d&&s==1?[]:null,m=d?a:a+1,g=l;e:for(;;)if(u&&g==i[u-1].to){if(p)break e;let h=i[--u];if(!d)for(let f=h.from,b=u;;){if(f==e)break e;if(b&&i[b-1].to==f)f=i[--b].from;else{if(Ri[f-1]==s)break e;break}}if(A)A.push(h);else{h.toRi.length;)Ri[Ri.length]=256;let a=[],r=e==j1?0:1;return hJ(t,r,r,n,0,t.length,a),a}function zLe(t){return[new L0(0,t,0)]}let qLe="";function cDt(t,e,n,a,r){var i;let o=a.head-t.from,s=L0.find(e,o,(i=a.bidiLevel)!==null&&i!==void 0?i:-1,a.assoc),l=e[s],u=l.side(r,n);if(o==u){let A=s+=r?1:-1;if(A<0||A>=e.length)return null;l=e[s=A],o=l.side(!r,n),u=l.side(r,n)}let d=Bl(t.text,o,l.forward(r,n));(dl.to)&&(d=u),qLe=t.text.slice(Math.min(o,d),Math.max(o,d));let p=s==(r?e.length-1:0)?null:e[s+(r?1:-1)];return p&&d==u&&p.level+(r?0:1)t.some(e=>e)}),uDt=da.define({combine:t=>t.some(e=>e)}),VLe=da.define();class O_{constructor(e,n="nearest",a="nearest",r=5,i=5,o=!1){this.range=e,this.y=n,this.x=a,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new O_(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new O_(Kt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const QT=gr.define({map:(t,e)=>t.map(e)}),ZLe=gr.define();function $p(t,e,n){let a=t.facet(HLe);a.length?a[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const mb=da.define({combine:t=>t.length?t[0]:!0});let dDt=0;const tS=da.define();class wu{constructor(e,n,a,r,i){this.id=e,this.create=n,this.domEventHandlers=a,this.domEventObservers=r,this.extension=i(this)}static define(e,n){const{eventHandlers:a,eventObservers:r,provide:i,decorations:o}=n||{};return new wu(dDt++,e,a,r,s=>{let l=[tS.of(s)];return o&&l.push(aD.of(u=>{let d=u.plugin(s);return d?o(d):na.none})),i&&l.push(i(s)),l})}static fromClass(e,n){return wu.define(a=>new e(a),n)}}class uG{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(a){if($p(n.state,a,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){$p(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(a){$p(e.state,a,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const KLe=da.define(),hse=da.define(),aD=da.define(),JLe=da.define(),fse=da.define(),e7e=da.define();function fbe(t,e){let n=t.state.facet(e7e);if(!n.length)return n;let a=n.map(i=>i instanceof Function?i(t):i),r=[];return ti.spans(a,e.from,e.to,{point(){},span(i,o,s,l){let u=i-e.from,d=o-e.from,p=r;for(let A=s.length-1;A>=0;A--,l--){let m=s[A].spec.bidiIsolate,g;if(m==null&&(m=lDt(e.text,u,d)),l>0&&p.length&&(g=p[p.length-1]).to==u&&g.direction==m)g.to=d,p=g.inner;else{let h={from:u,to:d,direction:m,inner:[]};p.push(h),p=h.inner}}}}),r}const t7e=da.define();function bse(t){let e=0,n=0,a=0,r=0;for(let i of t.state.facet(t7e)){let o=i(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(a=Math.max(a,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:a,bottom:r}}const nS=da.define();class WA{constructor(e,n,a,r){this.fromA=e,this.toA=n,this.fromB=a,this.toB=r}join(e){return new WA(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,a=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>a.toA)){if(r.toAd)break;i+=2}if(!l)return a;new WA(l.fromA,l.toA,l.fromB,l.toB).addToSet(a),o=l.toA,s=l.toB}}}class cL{constructor(e,n,a){this.view=e,this.state=n,this.transactions=a,this.flags=0,this.startState=e.state,this.changes=vc.empty(this.startState.doc.length);for(let i of a)this.changes=this.changes.compose(i.changes);let r=[];this.changes.iterChangedRanges((i,o,s,l)=>r.push(new WA(i,o,s,l))),this.changedRanges=r}static create(e,n,a){return new cL(e,n,a)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class bbe extends Li{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=na.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Gs],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new WA(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let a=e.changedRanges;this.minWidth>0&&a.length&&(a.every(({fromA:u,toA:d})=>dthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!bDt(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let i=r>-1?ADt(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:d}=this.hasComposition;a=new WA(u,d,e.changes.mapPos(u,-1),e.changes.mapPos(d,1)).addToSet(a.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(Hn.ie||Hn.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,s=this.updateDeco(),l=hDt(o,s,e.changes);return a=WA.extendWithRanges(a,l),!(this.flags&7)&&a.length==0?!1:(this.updateInner(a,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,a){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,a);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=Hn.chrome||Hn.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||r.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to=0?r[o]:null;if(!s)break;let{fromA:l,toA:u,fromB:d,toB:p}=s,A,m,g,h;if(a&&a.range.fromBd){let v=$I.build(this.view.state.doc,d,a.range.fromB,this.decorations,this.dynamicDecorationMap),k=$I.build(this.view.state.doc,a.range.toB,p,this.decorations,this.dynamicDecorationMap);m=v.breakAtStart,g=v.openStart,h=k.openEnd;let _=this.compositionView(a);k.breakAtStart?_.breakAfter=1:k.content.length&&_.merge(_.length,_.length,k.content[0],!1,k.openStart,0)&&(_.breakAfter=k.content[0].breakAfter,k.content.shift()),v.content.length&&_.merge(0,0,v.content[v.content.length-1],!0,0,v.openEnd)&&v.content.pop(),A=v.content.concat(_).concat(k.content)}else({content:A,breakAtStart:m,openStart:g,openEnd:h}=$I.build(this.view.state.doc,d,p,this.decorations,this.dynamicDecorationMap));let{i:f,off:b}=i.findPos(u,1),{i:y,off:w}=i.findPos(l,-1);SLe(this,y,w,f,b,A,m,g,h)}a&&this.fixCompositionDOM(a)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let a of n.effects)a.is(ZLe)&&(this.editContextFormatting=a.value)}compositionView(e){let n=new pg(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new iy(r,[n],n.length);let a=new Gs;return a.append(n,0),a}fixCompositionDOM(e){let n=(i,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let s=Li.get(i);s&&s!=o&&(s.dom=null),o.setDOM(i)},a=this.childPos(e.range.fromB,1),r=this.children[a.i];n(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)a=r.childPos(a.off,1),r=r.children[a.i],n(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let a=this.view.root.activeElement,r=a==this.dom,i=!r&&!(this.view.state.facet(mb)||this.dom.tabIndex>-1)&&bF(this.dom,this.view.observer.selectionRange)&&!(a&&this.dom.contains(a));if(!(r||n||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Hn.gecko&&s.empty&&!this.hasComposition&&pDt(l)){let p=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(p,l.node.childNodes[l.offset]||null)),l=u=new su(p,0),o=!0}let d=this.view.observer.selectionRange;(o||!d.focusNode||(!DI(l.node,l.offset,d.anchorNode,d.anchorOffset)||!DI(u.node,u.offset,d.focusNode,d.focusOffset))&&!this.suppressWidgetCursorChange(d,s))&&(this.view.observer.ignore(()=>{Hn.android&&Hn.chrome&&this.dom.contains(d.focusNode)&&fDt(d.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let p=nD(this.view.root);if(p)if(s.empty){if(Hn.gecko){let A=mDt(l.node,l.offset);if(A&&A!=3){let m=(A==1?BLe:ELe)(l.node,l.offset);m&&(l=new su(m.node,m.offset))}}p.collapse(l.node,l.offset),s.bidiLevel!=null&&p.caretBidiLevel!==void 0&&(p.caretBidiLevel=s.bidiLevel)}else if(p.extend){p.collapse(l.node,l.offset);try{p.extend(u.node,u.offset)}catch{}}else{let A=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),A.setEnd(u.node,u.offset),A.setStart(l.node,l.offset),p.removeAllRanges(),p.addRange(A)}i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),a&&a.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new su(d.anchorNode,d.anchorOffset),this.impreciseHead=u.precise?null:new su(d.focusNode,d.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&DI(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,a=nD(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!a||!n.empty||!n.assoc||!a.modify)return;let o=Gs.find(this,n.head);if(!o)return;let s=o.posAtStart;if(n.head==s||n.head==s+o.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let d=this.domAtPos(n.head+n.assoc);a.collapse(d.node,d.offset),a.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=n.from&&a.collapse(r,i)}moveToLine(e){let n=this.dom,a;if(e.node!=n)return e;for(let r=e.offset;!a&&r=0;r--){let i=Li.get(n.childNodes[r]);i instanceof Gs&&(a=i.domAtPos(i.length))}return a?new su(a.node,a.offset,!0):e}nearest(e){for(let n=e;n;){let a=Li.get(n);if(a&&a.rootView==this)return a;n=n.parentNode}return null}posFromDOM(e,n){let a=this.nearest(e);if(!a)throw new RangeError("Trying to find position for a DOM position outside of the document");return a.localPosFromDOM(e,n)+a.posAtStart}domAtPos(e){let{i:n,off:a}=this.childCursor().findPos(e,-1);for(;n=0;o--){let s=this.children[o],l=i-s.breakAfter,u=l-s.length;if(le||s.covers(1))&&(!a||s instanceof Gs&&!(a instanceof Gs&&n>=0)))a=s,r=u;else if(a&&u==e&&l==e&&s instanceof zb&&Math.abs(n)<2){if(s.deco.startSide<0)break;o&&(a=null)}i=u}return a?a.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:a}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Gs))return null;for(;r.children.length;){let{i:s,off:l}=r.childPos(a,1);for(;;s++){if(s==r.children.length)return null;if((r=r.children[s]).length)break}a=l}if(!(r instanceof pg))return null;let i=Bl(r.text,a);if(i==a)return null;let o=q1(r.dom,a,i).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==Bs.LTR;for(let u=0,d=0;dr)break;if(u>=a){let m=p.dom.getBoundingClientRect();if(n.push(m.height),o){let g=p.dom.lastChild,h=g?lB(g):[];if(h.length){let f=h[h.length-1],b=l?f.right-m.left:m.right-f.left;b>s&&(s=b,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=A)}}}u=A+p.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Bs.RTL:Bs.LTR}measureTextSize(){for(let i of this.children)if(i instanceof Gs){let o=i.measureTextSize();if(o)return o}let e=document.createElement("div"),n,a,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let i=lB(e.firstChild)[0];n=e.getBoundingClientRect().height,a=i?i.width/27:7,r=i?i.height:n,e.remove()}),{lineHeight:n,charWidth:a,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new QLe(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let a=0,r=0;;r++){let i=r==n.viewports.length?null:n.viewports[r],o=i?i.from-1:this.length;if(o>a){let s=(n.lineBlockAt(o).bottom-n.lineBlockAt(a).top)/this.view.scaleY;e.push(na.replace({widget:new AJ(s),block:!0,inclusive:!0,isBlockGap:!0}).range(a,o))}if(!i)break;a=i.to+1}return na.set(e)}updateDeco(){let e=1,n=this.view.state.facet(aD).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),a=!1,r=this.view.state.facet(JLe).map((i,o)=>{let s=typeof i=="function";return s&&(a=!0),s?i(this.view):i});for(r.length&&(this.dynamicDecorationMap[e++]=a,n.push(ti.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),r;if(!a)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});let i=bse(this.view),o={left:a.left-i.left,top:a.top-i.top,right:a.right+i.right,bottom:a.bottom+i.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;G4t(this.view.scrollDOM,o,n.head{ae.from&&(n=!0)}),n}function yDt(t,e,n=1){let a=t.charCategorizer(e),r=t.doc.lineAt(e),i=e-r.from;if(r.length==0)return Kt.cursor(e);i==0?n=1:i==r.length&&(n=-1);let o=i,s=i;n<0?o=Bl(r.text,i,!1):s=Bl(r.text,i);let l=a(r.text.slice(o,s));for(;o>0;){let u=Bl(r.text,o,!1);if(a(r.text.slice(u,o))!=l)break;o=u}for(;st?e.left-t:Math.max(0,t-e.right)}function vDt(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function dG(t,e){return t.tope.top+1}function ybe(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function bJ(t,e,n){let a,r,i,o,s=!1,l,u,d,p;for(let g=t.firstChild;g;g=g.nextSibling){let h=lB(g);for(let f=0;fw||o==w&&i>y){a=g,r=b,i=y,o=w;let v=w?n0?f0)}y==0?n>b.bottom&&(!d||d.bottomb.top)&&(u=g,p=b):d&&dG(d,b)?d=wbe(d,b.bottom):p&&dG(p,b)&&(p=ybe(p,b.top))}}if(d&&d.bottom>=n?(a=l,r=d):p&&p.top<=n&&(a=u,r=p),!a)return{node:t,offset:0};let A=Math.max(r.left,Math.min(r.right,e));if(a.nodeType==3)return vbe(a,A,n);if(s&&a.contentEditable!="false")return bJ(a,A,n);let m=Array.prototype.indexOf.call(t.childNodes,a)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:m}}function vbe(t,e,n){let a=t.nodeValue.length,r=-1,i=1e9,o=0;for(let s=0;sn?d.top-n:n-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&p=(d.left+d.right)/2,m=A;if((Hn.chrome||Hn.gecko)&&q1(t,s).getBoundingClientRect().left==d.right&&(m=!A),p<=0)return{node:t,offset:s+(m?1:0)};r=s+(m?1:0),i=p}}}return{node:t,offset:r>-1?r:o>0?t.nodeValue.length:0}}function a7e(t,e,n,a=-1){var r,i;let o=t.contentDOM.getBoundingClientRect(),s=o.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:d,y:p}=e,A=p-s;if(A<0)return 0;if(A>u)return t.state.doc.length;for(let v=t.viewState.heightOracle.textHeight/2,k=!1;l=t.elementAtHeight(A),l.type!=Dh.Text;)for(;A=a>0?l.bottom+v:l.top-v,!(A>=0&&A<=u);){if(k)return n?null:0;k=!0,a=-a}p=s+A;let m=l.from;if(mt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:kbe(t,o,l,d,p);let g=t.dom.ownerDocument,h=t.root.elementFromPoint?t.root:g,f=h.elementFromPoint(d,p);f&&!t.contentDOM.contains(f)&&(f=null),f||(d=Math.max(o.left+1,Math.min(o.right-1,d)),f=h.elementFromPoint(d,p),f&&!t.contentDOM.contains(f)&&(f=null));let b,y=-1;if(f&&((r=t.docView.nearest(f))===null||r===void 0?void 0:r.isEditable)!=!1){if(g.caretPositionFromPoint){let v=g.caretPositionFromPoint(d,p);v&&({offsetNode:b,offset:y}=v)}else if(g.caretRangeFromPoint){let v=g.caretRangeFromPoint(d,p);v&&({startContainer:b,startOffset:y}=v,(!t.contentDOM.contains(b)||Hn.safari&&kDt(b,y,d)||Hn.chrome&&xDt(b,y,d))&&(b=void 0))}b&&(y=Math.min(Mh(b),y))}if(!b||!t.docView.dom.contains(b)){let v=Gs.find(t.docView,m);if(!v)return A>l.top+l.height/2?l.to:l.from;({node:b,offset:y}=bJ(v.dom,d,p))}let w=t.docView.nearest(b);if(!w)return null;if(w.isWidget&&((i=w.dom)===null||i===void 0?void 0:i.nodeType)==1){let v=w.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-s)*.5)/s);i+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+N4t(o,i,t.state.tabSize)}function kDt(t,e,n){let a;if(t.nodeType!=3||e!=(a=t.nodeValue.length))return!1;for(let r=t.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return q1(t,a-1,a).getBoundingClientRect().left>n}function xDt(t,e,n){if(e!=0)return!1;for(let r=t;;){let i=r.parentNode;if(!i||i.nodeType!=1||i.firstChild!=r)return!1;if(i.classList.contains("cm-line"))break;r=i}let a=t.nodeType==1?t.getBoundingClientRect():q1(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-a.left>5}function ODt(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let a of n.type)if(a.to>e||a.to==e&&(a.to==n.to||a.type==Dh.Text))return a}return n}function CDt(t,e,n,a){let r=ODt(t,e.head),i=!a||r.type!=Dh.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(i){let o=t.dom.getBoundingClientRect(),s=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(s==Bs.LTR)?o.right-1:o.left+1,y:(i.top+i.bottom)/2});if(l!=null)return Kt.cursor(l,n?-1:1)}return Kt.cursor(n?r.to:r.from,n?-1:1)}function xbe(t,e,n,a){let r=t.state.doc.lineAt(e.head),i=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let s=e,l=null;;){let u=cDt(r,i,o,s,n),d=qLe;if(!u){if(r.number==(n?t.state.doc.lines:1))return s;d=` `,r=t.state.doc.line(r.number+(n?1:-1)),i=t.bidiSpans(r),u=t.visualLineSide(r,!n)}if(l){if(!l(d))return s}else{if(!a)return u;l=a(d)}s=u}}function _Dt(t,e,n){let a=t.state.charCategorizer(e),r=a(n);return i=>{let o=a(i);return r==Ks.Space&&(r=o),r==o}}function BDt(t,e,n,a){let r=e.head,i=n?1:-1;if(r==(n?t.state.doc.length:0))return Kt.cursor(r,e.assoc);let o=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||-1),d=t.documentTop;if(u)o==null&&(o=u.left-l.left),s=i<0?u.top:u.bottom;else{let m=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-m.from))),s=(i<0?m.top:m.bottom)+d}let p=l.left+o,A=a??t.viewState.heightOracle.textHeight>>1;for(let m=0;;m+=10){let g=s+(A+m)*i,h=a7e(t,{x:p,y:g},!1,i);if(gl.bottom||(i<0?hr)){let f=t.docView.coordsForChar(h),b=!f||g{if(e>i&&er(t)),n.from,e.head>n.from?-1:1);return a==n.from?n:Kt.cursor(a,ai)&&this.lineBreak(),r=o}return this.findPointBefore(a,n),this}readTextNode(e){let n=e.nodeValue;for(let a of this.points)a.node==e&&(a.pos=this.text.length+Math.min(a.offset,n.length));for(let a=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,o=1,s;if(this.lineSeparator?(i=n.indexOf(this.lineSeparator,a),o=this.lineSeparator.length):(s=r.exec(n))&&(i=s.index,o=s[0].length),this.append(n.slice(a,i<0?n.length:i)),i<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);a=i+o}}readNode(e){if(e.cmIgnore)return;let n=Li.get(e),a=n&&n.overrideDOMText;if(a!=null){this.findPointInside(e,a.length);for(let r=a.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let a of this.points)a.node==e&&e.childNodes[a.offset]==n&&(a.pos=this.text.length)}findPointInside(e,n){for(let a of this.points)(e.nodeType==3?a.node==e:e.contains(a.node))&&(a.pos=this.text.length+(QDt(e,a.node,a.offset)?n:0))}}function QDt(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:i,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,a,0))){let s=i||o?[]:$Dt(e),l=new EDt(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=TDt(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=i&&i.node==s.focusNode&&i.offset==s.focusOffset||!sJ(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=o&&o.node==s.anchorNode&&o.offset==s.anchorOffset||!sJ(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),d=e.viewport;if((Hn.ios||Hn.chrome)&&e.state.selection.main.empty&&l!=u&&(d.from>0||d.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:s}=e.bounds,l=r.from,u=null;(i===8||Hn.android&&e.text.length=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:(Hn.mac||Hn.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(a&&n.insert.length==2&&(a=Kt.single(a.main.anchor-1,a.main.head-1)),n={from:r.from,to:r.to,insert:ni.of([" "])}):Hn.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==` `&&t.lineWrapping&&(a&&(a=Kt.single(a.main.anchor-1,a.main.head-1)),n={from:r.from,to:r.to,insert:ni.of([" "])}),n)return yse(t,n,a,i);if(a&&!a.main.eq(r)){let o=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:a,scrollIntoView:o,userEvent:s}),!0}else return!1}function yse(t,e,n,a=-1){if(Hn.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(Hn.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&x_(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||a==8&&e.insert.lengthr.head)&&x_(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&x_(t.contentDOM,"Delete",46)))return!0;let i=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,s=()=>o||(o=IDt(t,e,n));return t.state.facet(WLe).some(l=>l(t,e.from,e.to,i,s))||t.dispatch(s()),!0}function IDt(t,e,n){let a,r=t.state,i=r.selection.main;if(e.from>=i.from&&e.to<=i.to&&e.to-e.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=i.frome.to?r.sliceDoc(e.to,i.to):"";a=r.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=r.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(r.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=i.to&&e.to>=i.to-10){let u=t.state.sliceDoc(e.from,e.to),d,p=n&&n7e(t,n.main.head);if(p){let g=e.insert.length-(e.to-e.from);d={from:p.from,to:p.to-g}}else d=t.state.doc.lineAt(i.head);let A=i.to-e.to,m=i.to-i.from;a=r.changeByRange(g=>{if(g.from==i.from&&g.to==i.to)return{changes:s,range:l||g.map(s)};let h=g.to-A,f=h-u.length;if(g.to-g.from!=m||t.state.sliceDoc(f,h)!=u||g.to>=d.from&&g.from<=d.to)return{range:g};let b=r.changes({from:f,to:h,insert:e.insert}),y=g.to-i.to;return{changes:b,range:l?Kt.range(Math.max(0,l.anchor+y),Math.max(0,l.head+y)):g.map(b)}})}else a={changes:s,selection:l&&r.selection.replaceRange(l)}}let o="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,o+=".compose",t.inputState.compositionFirstChange&&(o+=".start",t.inputState.compositionFirstChange=!1)),r.update(a,{userEvent:o,scrollIntoView:!0})}function DDt(t,e,n,a){let r=Math.min(t.length,e.length),i=0;for(;i0&&s>0&&t.charCodeAt(o-1)==e.charCodeAt(s-1);)o--,s--;if(a=="end"){let l=Math.max(0,i-Math.min(o,s));n-=o+l-i}if(o=o?i-n:0;i-=l,s=i+(s-o),o=i}else if(s=s?i-n:0;i-=l,o=i+(o-s),s=i}return{from:i,toA:o,toB:s}}function $Dt(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:a,focusNode:r,focusOffset:i}=t.observer.selectionRange;return n&&(e.push(new Obe(n,a)),(r!=n||i!=a)&&e.push(new Obe(r,i))),e}function TDt(t,e){if(t.length==0)return null;let n=t[0].pos,a=t.length==2?t[1].pos:n;return n>-1&&a>-1?Kt.single(n+e,a+e):null}class PDt{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Hn.safari&&e.contentDOM.addEventListener("input",()=>null),Hn.gecko&&ZDt(e.contentDOM.ownerDocument)}handleEvent(e){!jDt(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let a=this.handlers[e];if(a){for(let r of a.observers)r(this.view,n);for(let r of a.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=FDt(e),a=this.handlers,r=this.view.contentDOM;for(let i in n)if(i!="scroll"){let o=!n[i].handlers.length,s=a[i];s&&o!=!s.handlers.length&&(r.removeEventListener(i,this.handleEvent),s=null),s||r.addEventListener(i,this.handleEvent,{passive:o})}for(let i in a)i!="scroll"&&!n[i]&&r.removeEventListener(i,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&o7e.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Hn.android&&Hn.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Hn.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=i7e.find(a=>a.keyCode==e.keyCode))&&!e.ctrlKey||RDt.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:Hn.safari&&!Hn.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Cbe(t,e){return(n,a)=>{try{return e.call(t,a,n)}catch(r){$p(n.state,r)}}}function FDt(t){let e=Object.create(null);function n(a){return e[a]||(e[a]={observers:[],handlers:[]})}for(let a of t){let r=a.spec;if(r&&r.domEventHandlers)for(let i in r.domEventHandlers){let o=r.domEventHandlers[i];o&&n(i).handlers.push(Cbe(a.value,o))}if(r&&r.domEventObservers)for(let i in r.domEventObservers){let o=r.domEventObservers[i];o&&n(i).observers.push(Cbe(a.value,o))}}for(let a in Ag)n(a).handlers.push(Ag[a]);for(let a in rm)n(a).observers.push(rm[a]);return e}const i7e=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],RDt="dthko",o7e=[16,17,18,20,91,92,224,225],ST=6;function IT(t){return Math.max(0,t)*.7+8}function LDt(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class NDt{constructor(e,n,a,r){this.view=e,this.startEvent=n,this.style=a,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=H4t(e.contentDOM),this.atoms=e.state.facet(fse).map(o=>o(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Mr.allowMultipleSelections)&&MDt(e,n),this.dragging=qDt(e,n)&&l7e(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&LDt(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,a=0,r=0,i=0,o=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=bse(this.view);e.clientX-l.left<=r+ST?n=-IT(r-e.clientX):e.clientX+l.right>=o-ST&&(n=IT(e.clientX-o)),e.clientY-l.top<=i+ST?a=-IT(i-e.clientY):e.clientY+l.bottom>=s-ST&&(a=IT(e.clientY-s)),this.setScrollSpeed(n,a)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let a=0;an.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MDt(t,e){let n=t.state.facet(jLe);return n.length?n[0](e):Hn.mac?e.metaKey:e.ctrlKey}function zDt(t,e){let n=t.state.facet(ULe);return n.length?n[0](e):Hn.mac?!e.altKey:!e.ctrlKey}function qDt(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let a=nD(t.root);if(!a||a.rangeCount==0)return!0;let r=a.getRangeAt(0).getClientRects();for(let i=0;i=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function jDt(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,a;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(a=Li.get(n))&&a.ignoreEvent(e))return!1;return!0}const Ag=Object.create(null),rm=Object.create(null),s7e=Hn.ie&&Hn.ie_version<15||Hn.ios&&Hn.webkit_version<604;function UDt(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),c7e(t,n.value)},50)}function LM(t,e,n){for(let a of t.facet(e))n=a(n,t);return n}function c7e(t,e){e=LM(t.state,mse,e);let{state:n}=t,a,r=1,i=n.toText(e),o=i.lines==n.selection.ranges.length;if(yJ!=null&&n.selection.ranges.every(l=>l.empty)&&yJ==i.toString()){let l=-1;a=n.changeByRange(u=>{let d=n.doc.lineAt(u.from);if(d.from==l)return{range:u};l=d.from;let p=n.toText((o?i.line(r++).text:e)+n.lineBreak);return{changes:{from:d.from,insert:p},range:Kt.cursor(u.from+p.length)}})}else o?a=n.changeByRange(l=>{let u=i.line(r++);return{changes:{from:l.from,to:l.to,insert:u.text},range:Kt.cursor(l.from+u.length)}}):a=n.replaceSelection(i);t.dispatch(a,{userEvent:"input.paste",scrollIntoView:!0})}rm.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Ag.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);rm.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};rm.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Ag.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let a of t.state.facet(GLe))if(n=a(t,e),n)break;if(!n&&e.button==0&&(n=WDt(t,e)),n){let a=!t.hasFocus;t.inputState.startMouseSelection(new NDt(t,e,n,a)),a&&t.observer.ignore(()=>{OLe(t.contentDOM);let i=t.root.activeElement;i&&!i.contains(t.contentDOM)&&i.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function _be(t,e,n,a){if(a==1)return Kt.cursor(e,n);if(a==2)return yDt(t.state,e,n);{let r=Gs.find(t.docView,e),i=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:i.from,s=r?r.posAtEnd:i.to;return se>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function GDt(t,e,n,a){let r=Gs.find(t.docView,e);if(!r)return 1;let i=e-r.posAtStart;if(i==0)return 1;if(i==r.length)return-1;let o=r.coordsAt(i,-1);if(o&&Bbe(n,a,o))return-1;let s=r.coordsAt(i,1);return s&&Bbe(n,a,s)?1:o&&o.bottom>=a?-1:1}function Ebe(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:GDt(t,n,e.clientX,e.clientY)}}const HDt=Hn.ie&&Hn.ie_version<=11;let Qbe=null,Sbe=0,Ibe=0;function l7e(t){if(!HDt)return t.detail;let e=Qbe,n=Ibe;return Qbe=t,Ibe=Date.now(),Sbe=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Sbe+1)%3:1}function WDt(t,e){let n=Ebe(t,e),a=l7e(e),r=t.state.selection;return{update(i){i.docChanged&&(n.pos=i.changes.mapPos(n.pos),r=r.map(i.changes))},get(i,o,s){let l=Ebe(t,i),u,d=_be(t,l.pos,l.bias,a);if(n.pos!=l.pos&&!o){let p=_be(t,n.pos,n.bias,a),A=Math.min(p.from,d.from),m=Math.max(p.to,d.to);d=A1&&(u=YDt(r,l.pos))?u:s?r.addRange(d):Kt.create([d])}}}function YDt(t,e){for(let n=0;n=e)return Kt.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Ag.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let i=r.posAtStart,o=i+r.length;(i>=n.to||o<=n.from)&&(n=Kt.range(i,o))}}let{inputState:a}=t;return a.mouseSelection&&(a.mouseSelection.dragging=!0),a.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",LM(t.state,gse,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Ag.dragend=t=>(t.inputState.draggedContent=null,!1);function Dbe(t,e,n,a){if(n=LM(t.state,mse,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:i}=t.inputState,o=a&&i&&zDt(t,e)?{from:i.from,to:i.to}:null,s={from:r,insert:n},l=t.state.changes(o?[o,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Ag.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let a=Array(n.length),r=0,i=()=>{++r==n.length&&Dbe(t,e,a.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(a[o]=s.result),i()},s.readAsText(n[o])}return!0}else{let a=e.dataTransfer.getData("Text");if(a)return Dbe(t,e,a,!0),!0}return!1};Ag.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=s7e?null:e.clipboardData;return n?(c7e(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(UDt(t),!1)};function XDt(t,e){let n=t.dom.parentNode;if(!n)return;let a=n.appendChild(document.createElement("textarea"));a.style.cssText="position: fixed; left: -10000px; top: 10px",a.value=e,a.focus(),a.selectionEnd=e.length,a.selectionStart=0,setTimeout(()=>{a.remove(),t.focus()},50)}function VDt(t){let e=[],n=[],a=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:i}of t.selection.ranges){let o=t.doc.lineAt(i);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}a=!0}return{text:LM(t,gse,e.join(t.lineBreak)),ranges:n,linewise:a}}let yJ=null;Ag.copy=Ag.cut=(t,e)=>{let{text:n,ranges:a,linewise:r}=VDt(t.state);if(!n&&!r)return!1;yJ=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:a,scrollIntoView:!0,userEvent:"delete.cut"});let i=s7e?null:e.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(XDt(t,n),!1)};const u7e=Qy.define();function d7e(t,e){let n=[];for(let a of t.facet(YLe)){let r=a(t,e);r&&n.push(r)}return n?t.update({effects:n,annotations:u7e.of(!0)}):null}function p7e(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=d7e(t.state,e);n?t.dispatch(n):t.update([])}},10)}rm.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),p7e(t)};rm.blur=t=>{t.observer.clearSelectionRange(),p7e(t)};rm.compositionstart=rm.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};rm.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Hn.chrome&&Hn.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};rm.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Ag.beforeinput=(t,e)=>{var n,a;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let i=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(i&&o.length){let s=o[0],l=t.posAtDOM(s.startContainer,s.startOffset),u=t.posAtDOM(s.endContainer,s.endOffset);return yse(t,{from:l,to:u,insert:t.state.toText(i)},null),!0}}let r;if(Hn.chrome&&Hn.android&&(r=i7e.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Hn.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Hn.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>rm.compositionend(t,e),20),!1};const $be=new Set;function ZDt(t){$be.has(t)||($be.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Tbe=["pre-wrap","normal","pre-line","break-spaces"];let pB=!1;function Pbe(){pB=!1}class KDt{constructor(e){this.lineWrapping=e,this.doc=ni.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let a=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(a+=Math.max(0,Math.ceil((n-e-a*this.lineLength*.5)/this.lineLength))),this.lineHeight*a}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Tbe.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let a=0;a-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=a,this.textHeight=r,this.lineLength=i,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>vF&&(pB=!0),this.height=e)}replace(e,n,a){return Ju.of(a)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,a,r){let i=this,o=a.doc;for(let s=r.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:d,toB:p}=r[s],A=i.lineAt(l,ro.ByPosNoHeight,a.setDoc(n),0,0),m=A.to>=u?A:i.lineAt(u,ro.ByPosNoHeight,a,0,0);for(p+=m.to-u,u=m.to;s>0&&A.from<=r[s-1].toA;)l=r[s-1].fromA,d=r[s-1].fromB,s--,li*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),a+=1+s.break,r-=s.size}else if(i>r*2){let s=e[a];s.break?e.splice(a,1,s.left,null,s.right):e.splice(a,1,s.left,s.right),a+=2+s.break,i-=s.size}else break;else if(r=i&&o(this.blockAt(0,a,r,i))}updateHeight(e,n=0,a=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class vp extends A7e{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,a,r){return new mh(r,this.length,a,this.height,this.breaks)}replace(e,n,a){let r=a[0];return a.length==1&&(r instanceof vp||r instanceof vl&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof vl?r=new vp(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Ju.of(a)}updateHeight(e,n=0,a=!1,r){return r&&r.from<=n&&r.more?this.setHeight(r.heights[r.index++]):(a||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class vl extends Ju{constructor(e){super(e,0)}heightMetrics(e,n){let a=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,i=r-a+1,o,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*i);o=l/i,this.length>i+1&&(s=(this.height-l)/(this.length-i-1))}else o=this.height/i;return{firstLine:a,lastLine:r,perLine:o,perChar:s}}blockAt(e,n,a,r){let{firstLine:i,lastLine:o,perLine:s,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(e0){let i=a[a.length-1];i instanceof vl?a[a.length-1]=new vl(i.length+r):a.push(null,new vl(r-1))}if(e>0){let i=a[0];i instanceof vl?a[0]=new vl(e+i.length):a.unshift(new vl(e-1),null)}return Ju.of(a)}decomposeLeft(e,n){n.push(new vl(e-1),null)}decomposeRight(e,n){n.push(null,new vl(this.length-e-1))}updateHeight(e,n=0,a=!1,r){let i=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],s=Math.max(n,r.from),l=-1;for(r.from>n&&o.push(new vl(r.from-n-1).updateHeight(e,n));s<=i&&r.more;){let d=e.doc.lineAt(s).length;o.length&&o.push(null);let p=r.heights[r.index++];l==-1?l=p:Math.abs(p-l)>=vF&&(l=-2);let A=new vp(d,p);A.outdated=!1,o.push(A),s+=d+1}s<=i&&o.push(null,new vl(i-s).updateHeight(e,s));let u=Ju.of(o);return(l<0||Math.abs(u.height-this.height)>=vF||Math.abs(l-this.heightMetrics(e,n).perLine)>=vF)&&(pB=!0),lL(this,u)}else(a||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class e$t extends Ju{constructor(e,n,a){super(e.length+n+a.length,e.height+a.height,n|(e.outdated||a.outdated?2:0)),this.left=e,this.right=a,this.size=e.size+a.size}get break(){return this.flags&1}blockAt(e,n,a,r){let i=a+this.left.height;return es))return u;let d=n==ro.ByPosNoHeight?ro.ByPosNoHeight:ro.ByPos;return l?u.join(this.right.lineAt(s,d,a,o,s)):this.left.lineAt(s,d,a,r,i).join(u)}forEachLine(e,n,a,r,i,o){let s=r+this.left.height,l=i+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,a,s,l,o);else{let u=this.lineAt(l,ro.ByPos,a,r,i);e=e&&u.from<=n&&o(u),n>u.to&&this.right.forEachLine(u.to+1,n,a,s,l,o)}}replace(e,n,a){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,a));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let s of a)i.push(s);if(e>0&&Fbe(i,o-1),n=a&&n.push(null)),e>a&&this.right.decomposeLeft(e-a,n)}decomposeRight(e,n){let a=this.left.length,r=a+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e2*n.size||n.size>2*e.size?Ju.of(this.break?[e,null,n]:[e,n]):(this.left=lL(this.left,e),this.right=lL(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,a=!1,r){let{left:i,right:o}=this,s=n+i.length+this.break,l=null;return r&&r.from<=n+i.length&&r.more?l=i=i.updateHeight(e,n,a,r):i.updateHeight(e,n,a),r&&r.from<=s+o.length&&r.more?l=o=o.updateHeight(e,s,a,r):o.updateHeight(e,s,a),l?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Fbe(t,e){let n,a;t[e]==null&&(n=t[e-1])instanceof vl&&(a=t[e+1])instanceof vl&&t.splice(e-1,3,new vl(n.length+1+a.length))}const t$t=5;class wse{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let a=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof vp?r.length+=a-this.pos:(a>this.pos||!this.isCovered)&&this.nodes.push(new vp(a-this.pos,-1)),this.writtenTo=a,n>a&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,a){if(e=t$t)&&this.addLineDeco(r,i,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new vp(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let a=new vl(n-e);return this.oracle.doc.lineAt(e).to==n&&(a.flags|=4),a}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof vp)return e;let n=new vp(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,a){let r=this.ensureLine();r.length+=a,r.collapsed+=a,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+a}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof vp)&&!this.isCovered?this.nodes.push(new vp(0,-1)):(this.writtenTod.clientHeight||d.scrollWidth>d.clientWidth)&&p.overflow!="visible"){let A=d.getBoundingClientRect();i=Math.max(i,A.left),o=Math.min(o,A.right),s=Math.max(s,A.top),l=Math.min(u==t.parentNode?r.innerHeight:l,A.bottom)}u=p.position=="absolute"||p.position=="fixed"?d.offsetParent:d.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:i-n.left,right:Math.max(i,o)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function i$t(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class AG{constructor(e,n,a,r){this.from=e,this.to=n,this.size=a,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let a=0;atypeof a!="function"&&a.class=="cm-lineWrapping");this.heightOracle=new KDt(n),this.stateDeco=e.facet(aD).filter(a=>typeof a!="function"),this.heightMap=Ju.empty().applyChanges(this.stateDeco,ni.empty,this.heightOracle.setDoc(e.doc),[new WA(0,0,0,e.doc.length)]);for(let a=0;a<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());a++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=na.set(this.lineGaps.map(a=>a.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let a=0;a<=1;a++){let r=a?n.head:n.anchor;if(!e.some(({from:i,to:o})=>r>=i&&r<=o)){let{from:i,to:o}=this.lineBlockAt(r);e.push(new DT(i,o))}}return this.viewports=e.sort((a,r)=>a.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Lbe:new vse(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(rS(e,this.scaler))})}update(e,n=null){this.state=e.state;let a=this.stateDeco;this.stateDeco=this.state.facet(aD).filter(d=>typeof d!="function");let r=e.changedRanges,i=WA.extendWithRanges(r,n$t(a,this.stateDeco,e?e.changes:vc.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Pbe(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=o||pB)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(uDt)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,a=window.getComputedStyle(n),r=this.heightOracle,i=a.whiteSpace;this.defaultTextDirection=a.direction=="rtl"?Bs.RTL:Bs.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,d=0;if(s.width&&s.height){let{scaleX:v,scaleY:k}=xLe(n,s);(v>.005&&Math.abs(this.scaleX-v)>.005||k>.005&&Math.abs(this.scaleY-k)>.005)&&(this.scaleX=v,this.scaleY=k,u|=16,o=l=!0)}let p=(parseInt(a.paddingTop)||0)*this.scaleY,A=(parseInt(a.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=A)&&(this.paddingTop=p,this.paddingBottom=A,u|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=16);let m=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=m&&(this.scrollAnchorHeight=-1,this.scrollTop=m),this.scrolledToBottom=_Le(e.scrollDOM);let g=(this.printing?i$t:r$t)(n,this.paddingTop),h=g.top-this.pixelViewport.top,f=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let y=s.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=16),l){let v=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(v)&&(o=!0),o||r.lineWrapping&&Math.abs(y-this.contentDOMWidth)>r.charWidth){let{lineHeight:k,charWidth:_,textHeight:x}=e.docView.measureTextSize();o=k>0&&r.refresh(i,k,_,x,y/_,v),o&&(e.docView.minWidth=0,u|=16)}h>0&&f>0?d=Math.max(h,f):h<0&&f<0&&(d=Math.min(h,f)),Pbe();for(let k of this.viewports){let _=k.from==this.viewport.from?v:e.docView.measureVisibleLineHeights(k);this.heightMap=(o?Ju.empty().applyChanges(this.stateDeco,ni.empty,this.heightOracle,[new WA(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new JDt(k.from,_))}pB&&(u|=2)}let w=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return w&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),u|=this.updateForViewport()),(u&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let a=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,l=new DT(r.lineAt(o-a*1e3,ro.ByHeight,i,0,0).from,r.lineAt(s+(1-a)*1e3,ro.ByHeight,i,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=r.lineAt(u,ro.ByPos,i,0,0),A;n.y=="center"?A=(p.top+p.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&u=s+Math.max(10,Math.min(a,250)))&&r>o-2*1e3&&i>1,o=r<<1;if(this.defaultTextDirection!=Bs.LTR&&!a)return[];let s=[],l=(d,p,A,m)=>{if(p-dd&&bb.from>=A.from&&b.to<=A.to&&Math.abs(b.from-d)b.fromy));if(!f){if(pw.from<=p&&w.to>=p)){let w=n.moveToLineBoundary(Kt.cursor(p),!1,!0).head;w>d&&(p=w)}let b=this.gapSize(A,d,p,m),y=a||b<2e6?b:2e6;f=new AG(d,p,b,y)}s.push(f)},u=d=>{if(d.length2e6)for(let _ of e)_.from>=d.from&&_.fromd.from&&l(d.from,m,d,p),gn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let a=[];ti.spans(n,this.viewport.from,this.viewport.to,{span(i,o){a.push({from:i,to:o})},point(){}},20);let r=0;if(a.length!=this.visibleRanges.length)r=12;else for(let i=0;i=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||rS(this.heightMap.lineAt(e,ro.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||rS(this.heightMap.lineAt(this.scaler.fromDOM(e),ro.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return rS(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class DT{constructor(e,n){this.from=e,this.to=n}}function s$t(t,e,n){let a=[],r=t,i=0;return ti.spans(n,t,e,{span(){},point(o,s){o>r&&(a.push({from:r,to:o}),i+=o-r),r=s}},20),r=1)return e[e.length-1].to;let a=Math.floor(t*n);for(let r=0;;r++){let{from:i,to:o}=e[r],s=o-i;if(a<=s)return i+a;a-=s}}function TT(t,e){let n=0;for(let{from:a,to:r}of t.ranges){if(e<=r){n+=e-a;break}n+=r-a}return n/t.total}function c$t(t,e){for(let n of t)if(e(n))return n}const Lbe={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class vse{constructor(e,n,a){let r=0,i=0,o=0;this.viewports=a.map(({from:s,to:l})=>{let u=n.lineAt(s,ro.ByPos,e,0,0).top,d=n.lineAt(l,ro.ByPos,e,0,0).bottom;return r+=d-u,{from:s,to:l,top:u,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let s of this.viewports)s.domTop=o+(s.top-i)*this.scale,o=s.domBottom=s.domTop+(s.bottom-s.top),i=s.bottom}toDOM(e){for(let n=0,a=0,r=0;;n++){let i=nn.from==e.viewports[a].from&&n.to==e.viewports[a].to):!1}}function rS(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),a=e.toDOM(t.bottom);return new mh(t.from,t.length,n,a-n,Array.isArray(t._content)?t._content.map(r=>rS(r,e)):t._content)}const PT=da.define({combine:t=>t.join(" ")}),wJ=da.define({combine:t=>t.indexOf(!0)>-1}),vJ=_w.newName(),m7e=_w.newName(),g7e=_w.newName(),h7e={"&light":"."+m7e,"&dark":"."+g7e};function kJ(t,e,n){return new _w(e,{finish(a){return/&/.test(a)?a.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+a}})}const l$t=kJ("."+vJ,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},h7e),u$t={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mG=Hn.ie&&Hn.ie_version<=11;class d$t{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new W4t,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let a of n)this.queue.push(a);(Hn.ie&&Hn.ie_version<=11||Hn.ios&&e.composing)&&n.some(a=>a.type=="childList"&&a.removedNodes.length||a.type=="characterData"&&a.oldValue.length>a.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Hn.chrome&&Hn.chrome_version<126)&&(this.editContext=new A$t(e),e.state.facet(mb)&&(e.contentDOM.editContext=this.editContext.editContext)),mG&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,a)=>n!=e[a]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:a}=this,r=this.selectionRange;if(a.state.facet(mb)?a.root.activeElement!=this.dom:!bF(this.dom,r))return;let i=r.anchorNode&&a.docView.nearest(r.anchorNode);if(i&&i.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Hn.ie&&Hn.ie_version<=11||Hn.android&&Hn.chrome)&&!a.state.selection.main.empty&&r.focusNode&&DI(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=nD(e.root);if(!n)return!1;let a=Hn.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&p$t(this.view,n)||n;if(!a||this.selectionRange.eq(a))return!1;let r=bF(this.dom,a);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&x_(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,a=-1,r=!1;for(let i of e){let o=this.readMutation(i);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:a}=o:(n=Math.min(o.from,n),a=Math.max(o.to,a)))}return{from:n,to:a,typeOver:r}}readChange(){let{from:e,to:n,typeOver:a}=this.processRecords(),r=this.selectionChanged&&bF(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new SDt(this.view,e,n,a);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let a=this.view.state,r=r7e(this.view,n);return this.view.state==a&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let a=Nbe(n,e.previousSibling||e.target.previousSibling,-1),r=Nbe(n,e.nextSibling||e.target.nextSibling,1);return{from:a?n.posAfter(a):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(mb)!=e.state.facet(mb)&&(e.view.contentDOM.editContext=e.state.facet(mb)?this.editContext.editContext:null))}destroy(){var e,n,a;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(a=this.resizeScroll)===null||a===void 0||a.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Nbe(t,e,n){for(;e;){let a=Li.get(e);if(a&&a.parent==t)return a;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function Mbe(t,e){let n=e.startContainer,a=e.startOffset,r=e.endContainer,i=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return DI(o.node,o.offset,r,i)&&([n,a,r,i]=[r,i,n,a]),{anchorNode:n,anchorOffset:a,focusNode:r,focusOffset:i}}function p$t(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return Mbe(t,r)}let n=null;function a(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",a,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",a,!0),n?Mbe(t,n):null}class A$t{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=a=>{let{anchor:r}=e.state.selection.main,i=this.toEditorPos(a.updateRangeStart),o=this.toEditorPos(a.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:a.updateRangeStart,editorBase:i,drifted:!1});let s={from:i,to:o,insert:ni.of(a.text.split(` `))};if(s.from==this.from&&rthis.to&&(s.to=r),!(s.from==s.to&&!s.insert.length)){if(this.pendingContextChange=s,!e.state.readOnly){let l=this.to-this.from+(s.to-s.from+s.insert.length);yse(e,s,Kt.single(this.toEditorPos(a.selectionStart,l),this.toEditorPos(a.selectionEnd,l)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))}},this.handlers.characterboundsupdate=a=>{let r=[],i=null;for(let o=this.toEditorPos(a.rangeStart),s=this.toEditorPos(a.rangeEnd);o{let r=[];for(let i of a.getTextFormats()){let o=i.underlineStyle,s=i.underlineThickness;if(o!="None"&&s!="None"){let l=this.toEditorPos(i.rangeStart),u=this.toEditorPos(i.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:a}=this.composing;this.composing=null,a&&this.reset(e.state)}};for(let a in this.handlers)n.addEventListener(a,this.handlers[a]);this.measureReq={read:a=>{this.editContext.updateControlBounds(a.contentDOM.getBoundingClientRect());let r=nD(a.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,a=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,o,s,l,u)=>{if(a)return;let d=u.length-(o-i);if(r&&o>=r.to)if(r.from==i&&r.to==o&&r.insert.eq(u)){r=this.pendingContextChange=null,n+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(i+=n,o+=n,o<=this.from)this.from+=d,this.to+=d;else if(ithis.to||this.to-this.from+u.length>3e4){a=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(o),u.toString()),this.to+=d}n+=d}),r&&!a&&this.revertPending(e.state),!a}update(e){let n=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(a=>!a.isUserEvent("input.type")&&a.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,a=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=a||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(a,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let a=this.composing;return a&&a.drifted?a.editorBase+(e-a.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Sn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:a}=e;this.dispatchTransactions=e.dispatchTransactions||a&&(r=>r.forEach(i=>a(i,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Y4t(e.parent)||document,this.viewState=new Rbe(e.state||Mr.create(e)),e.scrollTo&&e.scrollTo.is(QT)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(tS).map(r=>new uG(r));for(let r of this.plugins)r.update(this);this.observer=new d$t(this),this.inputState=new PDt(this),this.inputState.ensureHandlers(this.plugins),this.docView=new bbe(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Zs?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,a=!1,r,i=this.state;for(let A of e){if(A.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=A.state}if(this.destroyed){this.viewState.state=i;return}let o=this.hasFocus,s=0,l=null;e.some(A=>A.annotation(u7e))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=d7e(i,o),l||(s=1));let u=this.observer.delayedAndroidKey,d=null;if(u?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(d=null)):this.observer.clear(),i.facet(Mr.phrases)!=this.state.facet(Mr.phrases))return this.setState(i);r=cL.create(this,i,e),r.flags|=s;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let A of e){if(p&&(p=p.map(A.changes)),A.scrollIntoView){let{main:m}=A.state.selection;p=new O_(m.empty?m:Kt.cursor(m.head,m.head>m.anchor?-1:1))}for(let m of A.effects)m.is(QT)&&(p=m.value.clip(this.state))}this.viewState.update(r,p),this.bidiCache=uL.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(nS)!=this.styleModules&&this.mountStyles(),a=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(A=>A.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(PT)!=r.state.facet(PT)&&(this.viewState.mustMeasureContent=!0),(n||a||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let A of this.state.facet(fJ))try{A(r)}catch(m){$p(this.state,m,"update listener")}(l||d)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),d&&!r7e(this,d)&&u.force&&x_(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let a of this.plugins)a.destroy(this);this.viewState=new Rbe(e),this.plugins=e.facet(tS).map(a=>new uG(a)),this.pluginMap.clear();for(let a of this.plugins)a.update(this);this.docView.destroy(),this.docView=new bbe(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(tS),a=e.state.facet(tS);if(n!=a){let r=[];for(let i of a){let o=n.indexOf(i);if(o<0)r.push(new uG(i));else{let s=this.plugins[o];s.mustUpdate=e,r.push(s)}}for(let i of this.plugins)i.mustUpdate!=e&&i.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,a=this.scrollDOM,r=a.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(o<0)if(_Le(a))i=-1,o=this.viewState.heightMap.height;else{let m=this.viewState.scrollAnchorAt(r);i=m.from,o=m.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let d=u.map(m=>{try{return m.read(this)}catch(g){return $p(this.state,g),zbe}}),p=cL.create(this,this.state,[]),A=!1;p.flags|=l,n?n.flags|=l:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),A=this.docView.update(p),A&&this.docViewUpdate());for(let m=0;m1||g<-1){r=r+g,a.scrollTop=r/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(fJ))s(n)}get themeClasses(){return vJ+" "+(this.state.facet(wJ)?g7e:m7e)+" "+this.state.facet(PT)}updateAttrs(){let e=qbe(this,KLe,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(mb)?"true":"false",class:"cm-content",style:`${Hn.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),qbe(this,hse,n);let a=this.observer.ignore(()=>{let r=pJ(this.contentDOM,this.contentAttrs,n),i=pJ(this.dom,this.editorAttrs,e);return r||i});return this.editorAttrs=e,this.contentAttrs=n,a}showAnnouncements(e){let n=!0;for(let a of e)for(let r of a.effects)if(r.is(Sn.announce)){n&&(this.announceDOM.textContent=""),n=!1;let i=this.announceDOM.appendChild(document.createElement("div"));i.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(nS);let e=this.state.facet(Sn.cspNonce);_w.mount(this.root,this.styleModules.concat(l$t).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;na.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,a){return pG(this,e,xbe(this,e,n,a))}moveByGroup(e,n){return pG(this,e,xbe(this,e,n,a=>_Dt(this,e.head,a)))}visualLineSide(e,n){let a=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=a[n?a.length-1:0];return Kt.cursor(i.side(n,r)+e.from,i.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,a=!0){return CDt(this,e,n,a)}moveVertically(e,n,a){return pG(this,e,BDt(this,e,n,a))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),a7e(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let a=this.docView.coordsAt(e,n);if(!a||a.left==a.right)return a;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r),o=i[L0.find(i,e-r.from,-1,n)];return V$(a,o.dir==Bs.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(XLe)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>m$t)return zLe(e.length);let n=this.textDirectionAt(e.from),a;for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n&&(i.fresh||MLe(i.isolates,a=fbe(this,e))))return i.order;a||(a=fbe(this,e));let r=sDt(e.text,n,a);return this.bidiCache.push(new uL(e.from,e.to,n,a,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Hn.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{OLe(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return QT.of(new O_(typeof e=="number"?Kt.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,a=this.viewState.scrollAnchorAt(e);return QT.of(new O_(Kt.cursor(a.from),"start","start",a.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return wu.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return wu.define(()=>({}),{eventObservers:e})}static theme(e,n){let a=_w.newName(),r=[PT.of(a),nS.of(kJ(`.${a}`,e))];return n&&n.dark&&r.push(wJ.of(!0)),r}static baseTheme(e){return Ey.lowest(nS.of(kJ("."+vJ,e,h7e)))}static findFromDOM(e){var n;let a=e.querySelector(".cm-content"),r=a&&Li.get(a)||Li.get(e);return((n=r?.rootView)===null||n===void 0?void 0:n.view)||null}}Sn.styleModule=nS;Sn.inputHandler=WLe;Sn.clipboardInputFilter=mse;Sn.clipboardOutputFilter=gse;Sn.scrollHandler=VLe;Sn.focusChangeEffect=YLe;Sn.perLineTextDirection=XLe;Sn.exceptionSink=HLe;Sn.updateListener=fJ;Sn.editable=mb;Sn.mouseSelectionStyle=GLe;Sn.dragMovesSelection=ULe;Sn.clickAddsSelectionRange=jLe;Sn.decorations=aD;Sn.outerDecorations=JLe;Sn.atomicRanges=fse;Sn.bidiIsolatedRanges=e7e;Sn.scrollMargins=t7e;Sn.darkTheme=wJ;Sn.cspNonce=da.define({combine:t=>t.length?t[0]:""});Sn.contentAttributes=hse;Sn.editorAttributes=KLe;Sn.lineWrapping=Sn.contentAttributes.of({class:"cm-lineWrapping"});Sn.announce=gr.define();const m$t=4096,zbe={};class uL{constructor(e,n,a,r,i,o){this.from=e,this.to=n,this.dir=a,this.isolates=r,this.fresh=i,this.order=o}static update(e,n){if(n.empty&&!e.some(i=>i.fresh))return e;let a=[],r=e.length?e[e.length-1].dir:Bs.LTR;for(let i=Math.max(0,e.length-10);i=0;r--){let i=a[r],o=typeof i=="function"?i(t):i;o&&dJ(o,n)}return n}const g$t=Hn.mac?"mac":Hn.windows?"win":Hn.linux?"linux":"key";function h$t(t,e){const n=t.split(/-(?!$)/);let a=n[n.length-1];a=="Space"&&(a=" ");let r,i,o,s;for(let l=0;la.concat(r),[]))),n}function b7e(t,e,n){return y7e(f7e(t.state),e,t,n)}let O0=null;const b$t=4e3;function y$t(t,e=g$t){let n=Object.create(null),a=Object.create(null),r=(o,s)=>{let l=a[o];if(l==null)a[o]=s;else if(l!=s)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},i=(o,s,l,u,d)=>{var p,A;let m=n[o]||(n[o]=Object.create(null)),g=s.split(/ (?!$)/).map(b=>h$t(b,e));for(let b=1;b{let v=O0={view:w,prefix:y,scope:o};return setTimeout(()=>{O0==v&&(O0=null)},b$t),!0}]})}let h=g.join(" ");r(h,!1);let f=m[h]||(m[h]={preventDefault:!1,stopPropagation:!1,run:((A=(p=m._any)===null||p===void 0?void 0:p.run)===null||A===void 0?void 0:A.slice())||[]});l&&f.run.push(l),u&&(f.preventDefault=!0),d&&(f.stopPropagation=!0)};for(let o of t){let s=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of s){let d=n[u]||(n[u]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=o;for(let A in d)d[A].run.push(m=>p(m,xJ))}let l=o[e]||o.key;if(l)for(let u of s)i(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&i(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let xJ=null;function y7e(t,e,n,a){xJ=e;let r=j4t(e),i=Ym(r,0),o=Ab(i)==r.length&&r!=" ",s="",l=!1,u=!1,d=!1;O0&&O0.view==n&&O0.scope==a&&(s=O0.prefix+" ",o7e.indexOf(e.keyCode)<0&&(u=!0,O0=null));let p=new Set,A=f=>{if(f){for(let b of f.run)if(!p.has(b)&&(p.add(b),b(n)))return f.stopPropagation&&(d=!0),!0;f.preventDefault&&(f.stopPropagation&&(d=!0),u=!0)}return!1},m=t[a],g,h;return m&&(A(m[s+FT(r,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Hn.windows&&e.ctrlKey&&e.altKey)&&(g=Bw[e.keyCode])&&g!=r?(A(m[s+FT(g,e,!0)])||e.shiftKey&&(h=tD[e.keyCode])!=r&&h!=g&&A(m[s+FT(h,e,!1)]))&&(l=!0):o&&e.shiftKey&&A(m[s+FT(r,e,!0)])&&(l=!0),!l&&A(m._any)&&(l=!0)),u&&(l=!0),l&&d&&e.stopPropagation(),xJ=null,l}const w$t=!(Hn.ios&&Hn.webkit&&Hn.webkit_version<534),v$t=da.define({combine(t){return X$(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function k$t(t){return t.facet(v$t)}const Ube={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};w$t&&(Ube[".cm-line"].caretColor=Ube[".cm-content"].caretColor="transparent !important");class x$t extends ov{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?n.setAttribute("aria-label","placeholder "+this.content):n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?lB(e.firstChild):[];if(!n.length)return null;let a=window.getComputedStyle(e.parentNode),r=V$(n[0],a.direction!="rtl"),i=parseInt(a.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}function O$t(t){return wu.fromClass(class{constructor(e){this.view=e,this.placeholder=t?na.set([na.widget({widget:new x$t(t),side:1}).range(0)]):na.none}get decorations(){return this.view.state.doc.length?na.none:this.placeholder}},{decorations:e=>e.decorations})}const q2="-10000px";class C$t{constructor(e,n,a,r){this.facet=n,this.createTooltipView=a,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let i=null;this.tooltipViews=this.tooltips.map(o=>i=a(o,i))}update(e,n){var a;let r=e.state.facet(this.facet),i=r.filter(l=>l);if(r===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],s=n?[]:null;for(let l=0;ln[u]=l),n.length=s.length),this.input=r,this.tooltips=i,this.tooltipViews=o,!0}}function _$t(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const gG=da.define({combine:t=>{var e,n,a;return{position:Hn.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((a=t.find(r=>r.tooltipSpace))===null||a===void 0?void 0:a.tooltipSpace)||_$t}}}),Gbe=new WeakMap,w7e=wu.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(gG);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new C$t(t,v7e,(n,a)=>this.createTooltip(n,a),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,a=t.state.facet(gG);if(a.position!=this.position&&!this.madeAbsolute){this.position=a.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(a.parent!=this.parent){this.parent&&this.container.remove(),this.parent=a.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),a=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=q2,n.dom.style.left="0px",this.container.insertBefore(n.dom,a),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let a of this.manager.tooltipViews)a.dom.remove(),(t=a.destroy)===null||t===void 0||t.call(a);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Hn.gecko)n=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==q2&&i.style.left=="0px"){let o=i.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(n||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(t=i.width/this.parent.offsetWidth,e=i.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let a=this.view.scrollDOM.getBoundingClientRect(),r=bse(this.view);return{visible:{left:a.left+r.left,top:a.top+r.top,right:a.right-r.right,bottom:a.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((i,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(gG).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:a,scaleX:r,scaleY:i}=t,o=[];for(let s=0;s=Math.min(n.bottom,a.bottom)||p.rightMath.min(n.right,a.right)+.1)){d.style.top=q2;continue}let m=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,g=m?7:0,h=A.right-A.left,f=(e=Gbe.get(u))!==null&&e!==void 0?e:A.bottom-A.top,b=u.offset||E$t,y=this.view.textDirection==Bs.LTR,w=A.width>a.right-a.left?y?a.left:a.right-A.width:y?Math.max(a.left,Math.min(p.left-(m?14:0)+b.x,a.right-h)):Math.min(Math.max(a.left,p.left-h+(m?14:0)-b.x),a.right-h),v=this.above[s];!l.strictSide&&(v?p.top-f-g-b.ya.bottom)&&v==a.bottom-p.bottom>p.top-a.top&&(v=this.above[s]=!v);let k=(v?p.top-a.top:a.bottom-p.bottom)-g;if(kw&&C.top<_+f&&C.bottom>_&&(_=v?C.top-f-2-g:C.bottom+g+2);if(this.position=="absolute"?(d.style.top=(_-t.parent.top)/i+"px",Hbe(d,(w-t.parent.left)/r)):(d.style.top=_/i+"px",Hbe(d,w/r)),m){let C=p.left+(y?b.x:-b.x)-(w+14-7);m.style.left=C/r+"px"}u.overlap!==!0&&o.push({left:w,top:_,right:x,bottom:_+f}),d.classList.toggle("cm-tooltip-above",v),d.classList.toggle("cm-tooltip-below",!v),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=q2}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Hbe(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const B$t=Sn.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),E$t={x:0,y:0},v7e=da.define({enables:[w7e,B$t]});function k7e(t,e){let n=t.plugin(w7e);if(!n)return null;let a=n.manager.tooltips.indexOf(e);return a<0?null:n.manager.tooltipViews[a]}const Wbe=da.define({combine(t){let e,n;for(let a of t)e=e||a.topContainer,n=n||a.bottomContainer;return{topContainer:e,bottomContainer:n}}});function dL(t,e){let n=t.plugin(x7e),a=n?n.specs.indexOf(e):-1;return a>-1?n.panels[a]:null}const x7e=wu.fromClass(class{constructor(t){this.input=t.state.facet(AB),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Wbe);this.top=new RT(t,!0,e.topContainer),this.bottom=new RT(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Wbe);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new RT(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new RT(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(AB);if(n!=this.input){let a=n.filter(l=>l),r=[],i=[],o=[],s=[];for(let l of a){let u=this.specs.indexOf(l),d;u<0?(d=l(t.view),s.push(d)):(d=this.panels[u],d.update&&d.update(t)),r.push(d),(d.top?i:o).push(d)}this.specs=a,this.panels=r,this.top.sync(i),this.bottom.sync(o);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let a of this.panels)a.update&&a.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Sn.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class RT{constructor(e,n,a){this.view=e,this.top=n,this.container=a,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Ybe(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Ybe(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Ybe(t){let e=t.nextSibling;return t.remove(),e}const AB=da.define({enables:x7e});class mB extends M1{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}mB.prototype.elementClass="";mB.prototype.toDOM=void 0;mB.prototype.mapMode=Jc.TrackBefore;mB.prototype.startSide=mB.prototype.endSide=-1;mB.prototype.point=!0;let Q$t=0,Xm=class OJ{constructor(e,n,a,r){this.name=e,this.set=n,this.base=a,this.modified=r,this.id=Q$t++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let a=typeof e=="string"?e:"?";if(e instanceof OJ&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let r=new OJ(a,[],null,[]);if(r.set.push(r),n)for(let i of n.set)r.set.push(i);return r}static defineModifier(e){let n=new pL(e);return a=>a.modified.indexOf(n)>-1?a:pL.get(a.base||a,a.modified.concat(n).sort((r,i)=>r.id-i.id))}},S$t=0;class pL{constructor(e){this.name=e,this.instances=[],this.id=S$t++}static get(e,n){if(!n.length)return e;let a=n[0].instances.find(s=>s.base==e&&I$t(n,s.modified));if(a)return a;let r=[],i=new Xm(e.name,r,e,n);for(let s of n)s.instances.push(i);let o=D$t(n);for(let s of e.set)if(!s.modified.length)for(let l of o)r.push(pL.get(s,l));return i}}function I$t(t,e){return t.length==e.length&&t.every((n,a)=>n==e[a])}function D$t(t){let e=[[]];for(let n=0;na.length-n.length)}function Go(t){let e=Object.create(null);for(let n in t){let a=t[n];Array.isArray(a)||(a=[a]);for(let r of n.split(" "))if(r){let i=[],o=2,s=r;for(let p=0;;){if(s=="..."&&p>0&&p+3==r.length){o=1;break}let A=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!A)throw new RangeError("Invalid path: "+r);if(i.push(A[0]=="*"?"":A[0][0]=='"'?JSON.parse(A[0]):A[0]),p+=A[0].length,p==r.length)break;let m=r[p++];if(p==r.length&&m=="!"){o=0;break}if(m!="/")throw new RangeError("Invalid path: "+r);s=r.slice(p)}let l=i.length-1,u=i[l];if(!u)throw new RangeError("Invalid path: "+r);let d=new AL(a,o,l>0?i.slice(0,l):null);e[u]=d.sort(e[u])}}return O7e.add(e)}const O7e=new Ga;let AL=class{constructor(e,n,a,r){this.tags=e,this.mode=n,this.context=a,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=r;for(let s of i)for(let l of s.set){let u=n[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:a}}function $$t(t,e){let n=null;for(let a of t){let r=a.style(e);r&&(n=n?n+" "+r:r)}return n}function T$t(t,e,n,a=0,r=t.length){let i=new P$t(a,Array.isArray(e)?e:[e],n);i.highlightRange(t.cursor(),a,r,"",i.highlighters),i.flush(r)}class P$t{constructor(e,n,a){this.at=e,this.highlighters=n,this.span=a,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,a,r,i){let{type:o,from:s,to:l}=e;if(s>=a||l<=n)return;o.isTop&&(i=this.highlighters.filter(m=>!m.scope||m.scope(o)));let u=r,d=F$t(e)||AL.empty,p=$$t(i,d.tags);if(p&&(u&&(u+=" "),u+=p,d.mode==1&&(r+=(r?" ":"")+p)),this.startSpan(Math.max(n,s),u),d.opaque)return;let A=e.tree&&e.tree.prop(Ga.mounted);if(A&&A.overlay){let m=e.node.enter(A.overlay[0].from+s,1),g=this.highlighters.filter(f=>!f.scope||f.scope(A.tree.type)),h=e.firstChild();for(let f=0,b=s;;f++){let y=f=w||!e.nextSibling())););if(!y||w>a)break;b=y.to+s,b>n&&(this.highlightRange(m.cursor(),Math.max(n,y.from+s),Math.min(a,b),"",g),this.startSpan(Math.min(a,b),u))}h&&e.parent()}else if(e.firstChild()){A&&(r="");do if(!(e.to<=n)){if(e.from>=a)break;this.highlightRange(e,n,a,r,i),this.startSpan(Math.min(a,e.to),u)}while(e.nextSibling());e.parent()}}}function F$t(t){let e=t.type.prop(O7e);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Fn=Xm.define,LT=Fn(),h0=Fn(),Xbe=Fn(h0),Vbe=Fn(h0),f0=Fn(),NT=Fn(f0),hG=Fn(f0),ah=Fn(),qv=Fn(ah),jg=Fn(),Ug=Fn(),CJ=Fn(),j2=Fn(CJ),MT=Fn(),K={comment:LT,lineComment:Fn(LT),blockComment:Fn(LT),docComment:Fn(LT),name:h0,variableName:Fn(h0),typeName:Xbe,tagName:Fn(Xbe),propertyName:Vbe,attributeName:Fn(Vbe),className:Fn(h0),labelName:Fn(h0),namespace:Fn(h0),macroName:Fn(h0),literal:f0,string:NT,docString:Fn(NT),character:Fn(NT),attributeValue:Fn(NT),number:hG,integer:Fn(hG),float:Fn(hG),bool:Fn(f0),regexp:Fn(f0),escape:Fn(f0),color:Fn(f0),url:Fn(f0),keyword:jg,self:Fn(jg),null:Fn(jg),atom:Fn(jg),unit:Fn(jg),modifier:Fn(jg),operatorKeyword:Fn(jg),controlKeyword:Fn(jg),definitionKeyword:Fn(jg),moduleKeyword:Fn(jg),operator:Ug,derefOperator:Fn(Ug),arithmeticOperator:Fn(Ug),logicOperator:Fn(Ug),bitwiseOperator:Fn(Ug),compareOperator:Fn(Ug),updateOperator:Fn(Ug),definitionOperator:Fn(Ug),typeOperator:Fn(Ug),controlOperator:Fn(Ug),punctuation:CJ,separator:Fn(CJ),bracket:j2,angleBracket:Fn(j2),squareBracket:Fn(j2),paren:Fn(j2),brace:Fn(j2),content:ah,heading:qv,heading1:Fn(qv),heading2:Fn(qv),heading3:Fn(qv),heading4:Fn(qv),heading5:Fn(qv),heading6:Fn(qv),contentSeparator:Fn(ah),list:Fn(ah),quote:Fn(ah),emphasis:Fn(ah),strong:Fn(ah),link:Fn(ah),monospace:Fn(ah),strikethrough:Fn(ah),inserted:Fn(),deleted:Fn(),changed:Fn(),invalid:Fn(),meta:MT,documentMeta:Fn(MT),annotation:Fn(MT),processingInstruction:Fn(MT),definition:Xm.defineModifier("definition"),constant:Xm.defineModifier("constant"),function:Xm.defineModifier("function"),standard:Xm.defineModifier("standard"),local:Xm.defineModifier("local"),special:Xm.defineModifier("special")};for(let t in K){let e=K[t];e instanceof Xm&&(e.name=t)}C7e([{tag:K.link,class:"tok-link"},{tag:K.heading,class:"tok-heading"},{tag:K.emphasis,class:"tok-emphasis"},{tag:K.strong,class:"tok-strong"},{tag:K.keyword,class:"tok-keyword"},{tag:K.atom,class:"tok-atom"},{tag:K.bool,class:"tok-bool"},{tag:K.url,class:"tok-url"},{tag:K.labelName,class:"tok-labelName"},{tag:K.inserted,class:"tok-inserted"},{tag:K.deleted,class:"tok-deleted"},{tag:K.literal,class:"tok-literal"},{tag:K.string,class:"tok-string"},{tag:K.number,class:"tok-number"},{tag:[K.regexp,K.escape,K.special(K.string)],class:"tok-string2"},{tag:K.variableName,class:"tok-variableName"},{tag:K.local(K.variableName),class:"tok-variableName tok-local"},{tag:K.definition(K.variableName),class:"tok-variableName tok-definition"},{tag:K.special(K.variableName),class:"tok-variableName2"},{tag:K.definition(K.propertyName),class:"tok-propertyName tok-definition"},{tag:K.typeName,class:"tok-typeName"},{tag:K.namespace,class:"tok-namespace"},{tag:K.className,class:"tok-className"},{tag:K.macroName,class:"tok-macroName"},{tag:K.propertyName,class:"tok-propertyName"},{tag:K.operator,class:"tok-operator"},{tag:K.comment,class:"tok-comment"},{tag:K.meta,class:"tok-meta"},{tag:K.invalid,class:"tok-invalid"},{tag:K.punctuation,class:"tok-punctuation"}]);var fG;const N0=new Ga;function NM(t){return da.define({combine:t?e=>e.concat(t):void 0})}const kse=new Ga;class Td{constructor(e,n,a=[],r=""){this.data=e,this.name=r,Mr.prototype.hasOwnProperty("tree")||Object.defineProperty(Mr.prototype,"tree",{get(){return Ar(this)}}),this.parser=n,this.extension=[hB.of(this),Mr.languageData.of((i,o,s)=>{let l=Zbe(i,o,s),u=l.type.prop(N0);if(!u)return[];let d=i.facet(u),p=l.type.prop(kse);if(p){let A=l.resolve(o-l.from,s);for(let m of p)if(m.test(A,i)){let g=i.facet(m.facet);return m.type=="replace"?g:g.concat(d)}}return d})].concat(a)}isActiveAt(e,n,a=-1){return Zbe(e,n,a).type.prop(N0)==this.data}findRegions(e){let n=e.facet(hB);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let a=[],r=(i,o)=>{if(i.prop(N0)==this.data){a.push({from:o,to:o+i.length});return}let s=i.prop(Ga.mounted);if(s){if(s.tree.prop(N0)==this.data){if(s.overlay)for(let l of s.overlay)a.push({from:l.from+o,to:l.to+o});else a.push({from:o,to:o+i.length});return}else if(s.overlay){let l=a.length;if(r(s.tree,s.overlay[0].from+o),a.length>l)return}}for(let l=0;la.isTop?n:void 0)]}),e.name)}configure(e,n){return new jo(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ar(t){let e=t.field(Td.state,!1);return e?e.tree:yr.empty}function _7e(t,e,n=50){var a;let r=(a=t.field(Td.state,!1))===null||a===void 0?void 0:a.context;if(!r)return null;let i=r.viewport;r.updateViewport({from:0,to:e});let o=r.isDone(e)||r.work(n,e)?r.tree:null;return r.updateViewport(i),o}class R$t{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let a=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-a,n-a)}}let U2=null;class U1{constructor(e,n,a=[],r,i,o,s,l){this.parser=e,this.state=n,this.fragments=a,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,a){return new U1(e,n,[],yr.empty,0,a,[],null)}startParse(){return this.parser.startParse(new R$t(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=yr.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var a;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Mb.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=U2;U2=this;try{return e()}finally{U2=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Kbe(e,n.from,n.to);return e}changes(e,n){let{fragments:a,tree:r,treeLen:i,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,d,p,A)=>l.push({fromA:u,toA:d,fromB:p,toB:A})),a=Mb.applyChanges(a,l),r=yr.empty,i=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let d=e.mapPos(u.from,1),p=e.mapPos(u.to,-1);de.from&&(this.fragments=Kbe(this.fragments,r,i),this.skipped.splice(a--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends FM{createParse(n,a,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let l=U2;if(l){for(let u of r)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new yr(nc.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return U2}}function Kbe(t,e,n){return Mb.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class gB{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),a=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,a)||n.takeTree(),new gB(n)}static init(e){let n=Math.min(3e3,e.doc.length),a=U1.create(e.facet(hB).parser,e,{from:0,to:n});return a.work(20,n)||a.takeTree(),new gB(a)}}Td.state=sc.define({create:gB.init,update(t,e){for(let n of e.effects)if(n.is(Td.setState))return n.value;return e.startState.facet(hB)!=e.state.facet(hB)?gB.init(e.state):t.apply(e)}});let B7e=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(B7e=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const bG=typeof navigator<"u"&&(!((fG=navigator.scheduling)===null||fG===void 0)&&fG.isInputPending)?()=>navigator.scheduling.isInputPending():null,L$t=wu.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Td.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Td.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=B7e(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,l=i.context.work(()=>bG&&bG()||Date.now()>o,r+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Td.setState.of(new gB(i.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>$p(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),hB=da.define({combine(t){return t.length?t[0]:null},enables:t=>[Td.state,L$t,Sn.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class _o{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class Mt{constructor(e,n,a,r,i,o=void 0){this.name=e,this.alias=n,this.extensions=a,this.filename=r,this.loadFunc=i,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:a}=e;if(!n){if(!a)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(a)}return new Mt(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,a)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let a=/\.([^.]+)$/.exec(n);if(a){for(let r of e)if(r.extensions.indexOf(a[1])>-1)return r}return null}static matchLanguageName(e,n,a=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(i=>i==n))return r;if(a)for(let r of e)for(let i of r.alias){let o=n.indexOf(i);if(o>-1&&(i.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+i.length])))return r}return null}}const N$t=da.define(),G1=da.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function H1(t){let e=t.facet(G1);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function mL(t,e){let n="",a=t.tabSize,r=t.facet(G1)[0];if(r==" "){for(;e>=a;)n+=" ",e-=a;r=" "}for(let i=0;i=e?M$t(t,n,e):null}class MM{constructor(e,n={}){this.state=e,this.options=n,this.unit=H1(e)}lineAt(e,n=1){let a=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=a.from&&r<=a.to?i&&r==e?{text:"",from:e}:(n<0?r-1&&(i+=o-this.countColumn(a,a.search(/\S|$/))),i}countColumn(e,n=e.length){return ry(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:a,from:r}=this.lineAt(e,n),i=this.options.overrideIndentation;if(i){let o=i(r);if(o>-1)return o}return this.countColumn(a,a.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Qs=new Ga;function M$t(t,e,n){let a=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=a.node){let i=[];for(let o=r;o&&!(o.from==a.node.from&&o.type==a.node.type);o=o.parent)i.push(o);for(let o=i.length-1;o>=0;o--)a={node:i[o],next:a}}return Q7e(a,t,n)}function Q7e(t,e,n){for(let a=t;a;a=a.next){let r=q$t(a.node);if(r)return r(xse.create(e,n,a))}return 0}function z$t(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function q$t(t){let e=t.type.prop(Qs);if(e)return e;let n=t.firstChild,a;if(n&&(a=n.type.prop(Ga.closedBy))){let r=t.lastChild,i=r&&a.indexOf(r.name)>-1;return o=>S7e(o,!0,1,void 0,i&&!z$t(o)?r.from:void 0)}return t.parent==null?j$t:null}function j$t(){return 0}class xse extends MM{constructor(e,n,a){super(e.state,e.options),this.base=e,this.pos=n,this.context=a}get node(){return this.context.node}static create(e,n,a){return new xse(e,n,a)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let a=e.resolve(n.from);for(;a.parent&&a.parent.from==a.from;)a=a.parent;if(U$t(a,e))break;n=this.state.doc.lineAt(a.from)}return this.lineIndent(n.from)}continue(){return Q7e(this.context.next,this.base,this.pos)}}function U$t(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function G$t(t){let e=t.node,n=e.childAfter(e.from),a=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,i=t.state.doc.lineAt(n.from),o=r==null||r<=i.from?i.to:Math.min(i.to,r);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==a)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let u=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+u}}s=l.to}}function YA({closing:t,align:e=!0,units:n=1}){return a=>S7e(a,e,n,t)}function S7e(t,e,n,a,r){let i=t.textAfter,o=i.match(/^\s*/)[0].length,s=a&&i.slice(o,o+a.length)==a||r==t.pos+o,l=e?G$t(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const zM=t=>t.baseIndent;function rs({except:t,units:e=1}={}){return n=>{let a=t&&t.test(n.textAfter);return n.baseIndent+(a?0:e*n.unit)}}const I7e=da.define(),Ss=new Ga;function Wp(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(i&&s.from=e&&u.to>n&&(i=u)}}return i}function W$t(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Y$t(t,e,n){for(let a of t.facet(I7e)){let r=a(t,e,n);if(r)return r}return H$t(t,e,n)}function D7e(t,e){let n=e.mapPos(t.from,1),a=e.mapPos(t.to,-1);return n>=a?void 0:{from:n,to:a}}const $7e=gr.define({map:D7e}),T7e=gr.define({map:D7e});function X$t(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(a=>a.from<=n&&a.to>=n)||e.push(t.lineBlockAt(n));return e}const Ose=sc.define({create(){return na.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is($7e)&&!Z$t(t,n.value.from,n.value.to)){let{preparePlaceholder:a}=e.state.facet(P7e),r=a?na.replace({widget:new a3t(a(e.state,n.value))}):Jbe;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(T7e)&&(t=t.update({filter:(a,r)=>n.value.from!=a||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:a}=e.selection.main;t.between(a,a,(r,i)=>{ra&&(n=!0)}),n&&(t=t.update({filterFrom:a,filterTo:a,filter:(r,i)=>i<=a||r>=a}))}return t},provide:t=>Sn.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(a,r)=>{n.push(a,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!r||r.from>i)&&(r={from:i,to:o})}),r}function Z$t(t,e,n){let a=!1;return t.between(e,e,(r,i)=>{r==e&&i==n&&(a=!0)}),a}function K$t(t,e){return t.field(Ose,!1)?e:e.concat(gr.appendConfig.of(n3t()))}const J$t=t=>{for(let e of X$t(t)){let n=Y$t(t.state,e.from,e.to);if(n)return t.dispatch({effects:K$t(t.state,[$7e.of(n),e3t(t,n)])}),!0}return!1};function e3t(t,e,n=!0){let a=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Sn.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${a} ${t.state.phrase("to")} ${r}.`)}const t3t={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},P7e=da.define({combine(t){return X$(t,t3t)}});function n3t(t){return[Ose,r3t]}function F7e(t,e){let{state:n}=t,a=n.facet(P7e),r=o=>{let s=t.lineBlockAt(t.posAtDOM(o.target)),l=V$t(t.state,s.from,s.to);l&&t.dispatch({effects:T7e.of(l)}),o.preventDefault()};if(a.placeholderDOM)return a.placeholderDOM(t,r,e);let i=document.createElement("span");return i.textContent=a.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}const Jbe=na.replace({widget:new class extends ov{toDOM(t){return F7e(t,null)}}});class a3t extends ov{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return F7e(e,this.value)}}const r3t=Sn.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class AE{constructor(e,n){this.specs=e;let a;function r(s){let l=_w.newName();return(a||(a=Object.create(null)))["."+l]=s,l}const i=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof Td?s=>s.prop(N0)==o.data:o?s=>s==o:void 0,this.style=C7e(e.map(s=>({tag:s.tag,class:s.class||r(Object.assign({},s,{tag:null}))})),{all:i}).style,this.module=a?new _w(a):null,this.themeType=n.themeType}static define(e,n){return new AE(e,n||{})}}const _J=da.define(),i3t=da.define({combine(t){return t.length?[t[0]]:null}});function yG(t){let e=t.facet(_J);return e.length?e:t.facet(i3t)}function R7e(t,e){let n=[s3t],a;return t instanceof AE&&(t.module&&n.push(Sn.styleModule.of(t.module)),a=t.themeType),a?n.push(_J.computeN([Sn.darkTheme],r=>r.facet(Sn.darkTheme)==(a=="dark")?[t]:[])):n.push(_J.of(t)),n}class o3t{constructor(e){this.markCache=Object.create(null),this.tree=Ar(e.state),this.decorations=this.buildDeco(e,yG(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Ar(e.state),a=yG(e.state),r=a!=yG(e.startState),{viewport:i}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,a),this.decoratedTo=i.to)}buildDeco(e,n){if(!n||!this.tree.length)return na.none;let a=new ay;for(let{from:r,to:i}of e.visibleRanges)T$t(this.tree,n,(o,s,l)=>{a.add(o,s,this.markCache[l]||(this.markCache[l]=na.mark({class:l})))},r,i);return a.finish()}}const s3t=Ey.high(wu.fromClass(o3t,{decorations:t=>t.decorations}));K.meta,K.link,K.heading,K.emphasis,K.strong,K.strikethrough,K.keyword,K.atom,K.bool,K.url,K.contentSeparator,K.labelName,K.literal,K.inserted,K.string,K.deleted,K.regexp,K.escape,K.string,K.variableName,K.variableName,K.typeName,K.namespace,K.className,K.variableName,K.macroName,K.propertyName,K.comment,K.invalid;const c3t=1e4,l3t="()[]{}",Cse=new Ga;function BJ(t,e,n){let a=t.prop(e<0?Ga.openedBy:Ga.closedBy);if(a)return a;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function EJ(t){let e=t.type.prop(Cse);return e?e(t.node):t}function M0(t,e,n,a={}){let r=a.maxScanDistance||c3t,i=a.brackets||l3t,o=Ar(t),s=o.resolveInner(e,n);for(let l=s;l;l=l.parent){let u=BJ(l.type,n,i);if(u&&l.from0?e>=d.from&&ed.from&&e<=d.to))return u3t(t,e,n,l,d,u,i)}}return d3t(t,e,n,o,s.type,r,i)}function u3t(t,e,n,a,r,i,o){let s=a.parent,l={from:r.from,to:r.to},u=0,d=s?.cursor();if(d&&(n<0?d.childBefore(a.from):d.childAfter(a.to)))do if(n<0?d.to<=a.from:d.from>=a.to){if(u==0&&i.indexOf(d.type.name)>-1&&d.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},d=t.doc.iterRange(e,n>0?t.doc.length:0),p=0;for(let A=0;!d.next().done&&A<=i;){let m=d.value;n<0&&(A+=m.length);let g=e+A*n;for(let h=n>0?0:m.length-1,f=n>0?m.length:-1;h!=f;h+=n){let b=o.indexOf(m[h]);if(!(b<0||a.resolveInner(g+h,1).type!=r))if(b%2==0==n>0)p++;else{if(p==1)return{start:u,end:{from:g+h,to:g+h+1},matched:b>>1==l>>1};p--}}n>0&&(A+=m.length)}return d.done?{start:u,matched:!1}:null}function eye(t,e,n,a=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let i=r;for(let o=a;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosa?o.toLowerCase():o,i=this.string.substr(this.pos,e.length);return r(i)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function p3t(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||A3t,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||Qse}}function A3t(t){if(typeof t!="object")return t;let e={};for(let n in t){let a=t[n];e[n]=a instanceof Array?a.slice():a}return e}const tye=new WeakMap;class Bse extends Td{constructor(e){let n=NM(e.languageData),a=p3t(e),r,i=new class extends FM{createParse(o,s,l){return new g3t(r,o,s,l)}};super(n,i,[],e.name),this.topNode=b3t(n,this),r=this,this.streamParser=a,this.stateAfter=new Ga({perNode:!0}),this.tokenTable=e.tokenTable?new z7e(a.tokenTable):f3t}static define(e){return new Bse(e)}getIndent(e){let n,{overrideIndentation:a}=e.options;a&&(n=tye.get(e.state),n!=null&&n1e4)return null;for(;i=a&&n+e.length<=r&&e.prop(t.stateAfter);if(i)return{state:t.streamParser.copyState(i),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let s=e.children[o],l=n+e.positions[o],u=s instanceof yr&&l=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let i=e.children.length-1;i>=0;i--){let o=e.positions[i],s=e.children[i],l;if(on&&Ese(t,i.tree,0-i.offset,n,s),u;if(l&&l.pos<=a&&(u=L7e(t,i.tree,n+i.offset,l.pos+i.offset,!1)))return{state:l.state,tree:u}}return{state:t.streamParser.startState(r?H1(r):4),tree:yr.empty}}let g3t=class{constructor(e,n,a,r){this.lang=e,this.input=n,this.fragments=a,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let i=U1.get(),o=r[0].from,{state:s,tree:l}=m3t(e,a,o,this.to,i?.state);this.state=s,this.parsedPos=this.chunkStart=o+l.length;for(let u=0;uu.from<=i.viewport.from&&u.to>=i.viewport.from)&&(this.state=this.lang.streamParser.startState(H1(i.state)),i.skipUntilInView(this.parsedPos,i.viewport.from),this.parsedPos=i.viewport.from),this.moveRangeIndex()}advance(){let e=U1.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),a=Math.min(n,this.chunkStart+2048);for(e&&(a=Math.min(a,e.viewport.to));this.parsedPos=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==` `&&(n="");else{let a=n.indexOf(` `);a>-1&&(n=n.slice(0,a))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),a=e+n.length;for(let r=this.rangeIndex;;){let i=this.ranges[r].to;if(i>=a||(n=n.slice(0,i-(a-n.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,s=this.lineAfter(o);n+=s,a=o+s.length}return{line:n,end:a}}skipGapsTo(e,n,a){for(;;){let r=this.ranges[this.rangeIndex].to,i=e+n;if(a>0?r>i:r>=i)break;let o=this.ranges[++this.rangeIndex].from;n+=o-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(n,r,1),n+=r;let s=this.chunk.length;r=this.skipGapsTo(a,r,-1),a+=r,i+=this.chunk.length-s}let o=this.chunk.length-4;return i==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=a:this.chunk.push(e,n,a,i),r}parseLine(e){let{line:n,end:a}=this.nextLine(),r=0,{streamParser:i}=this.lang,o=new _se(n,e?e.state.tabSize:4,e?H1(e.state):2);if(o.eol())i.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let s=N7e(i.token,o,this.state);if(s&&(r=this.emitToken(this.lang.tokenTable.resolve(s),this.parsedPos+o.start,this.parsedPos+o.pos,r)),o.start>1e4)break}this.parsedPos=a,this.moveRangeIndex(),this.parsedPose.start)return r}throw new Error("Stream parser failed to advance stream.")}const Qse=Object.create(null),rD=[nc.none],h3t=new pE(rD),nye=[],aye=Object.create(null),M7e=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])M7e[t]=q7e(Qse,e);class z7e{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),M7e)}resolve(e){return e?this.table[e]||(this.table[e]=q7e(this.extra,e)):0}}const f3t=new z7e(Qse);function wG(t,e){nye.indexOf(t)>-1||(nye.push(t),console.warn(e))}function q7e(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let u of s.split(".")){let d=t[u]||K[u];d?typeof d=="function"?l.length?l=l.map(d):wG(u,`Modifier ${u} used at start of tag`):l.length?wG(u,`Tag ${u} used as modifier`):l=Array.isArray(d)?d:[d]:wG(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let a=e.replace(/ /g,"_"),r=a+" "+n.map(s=>s.id),i=aye[r];if(i)return i.id;let o=aye[r]=nc.define({id:rD.length,name:a,props:[Go({[a]:n})]});return rD.push(o),o.id}function b3t(t,e){let n=nc.define({id:rD.length,name:"Document",props:[N0.add(()=>t),Qs.add(()=>a=>e.getIndent(a))],top:!0});return rD.push(n),n}Bs.RTL,Bs.LTR;const y3t=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),a=Ise(t.state,n.from);return a.line?w3t(t):a.block?k3t(t):!1};function Sse(t,e){return({state:n,dispatch:a})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(a(n.update(r)),!0):!1}}const w3t=Sse(C3t,0),v3t=Sse(j7e,0),k3t=Sse((t,e)=>j7e(t,e,O3t(e)),0);function Ise(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const G2=50;function x3t(t,{open:e,close:n},a,r){let i=t.sliceDoc(a-G2,a),o=t.sliceDoc(r,r+G2),s=/\s*$/.exec(i)[0].length,l=/^\s*/.exec(o)[0].length,u=i.length-s;if(i.slice(u-e.length,u)==e&&o.slice(l,l+n.length)==n)return{open:{pos:a-s,margin:s&&1},close:{pos:r+l,margin:l&&1}};let d,p;r-a<=2*G2?d=p=t.sliceDoc(a,r):(d=t.sliceDoc(a,a+G2),p=t.sliceDoc(r-G2,r));let A=/^\s*/.exec(d)[0].length,m=/\s*$/.exec(p)[0].length,g=p.length-m-n.length;return d.slice(A,A+e.length)==e&&p.slice(g,g+n.length)==n?{open:{pos:a+A+e.length,margin:/\s/.test(d.charAt(A+e.length))?1:0},close:{pos:r-m-n.length,margin:/\s/.test(p.charAt(g-1))?1:0}}:null}function O3t(t){let e=[];for(let n of t.selection.ranges){let a=t.doc.lineAt(n.from),r=n.to<=a.to?a:t.doc.lineAt(n.to);r.from>a.from&&r.from==n.to&&(r=n.to==a.to+1?a:t.doc.lineAt(n.to-1));let i=e.length-1;i>=0&&e[i].to>a.from?e[i].to=r.to:e.push({from:a.from+/^\s*/.exec(a.text)[0].length,to:r.to})}return e}function j7e(t,e,n=e.selection.ranges){let a=n.map(i=>Ise(e,i.from).block);if(!a.every(i=>i))return null;let r=n.map((i,o)=>x3t(e,a[o],i.from,i.to));if(t!=2&&!r.every(i=>i))return{changes:e.changes(n.map((i,o)=>r[o]?[]:[{from:i.from,insert:a[o].open+" "},{from:i.to,insert:" "+a[o].close}]))};if(t!=1&&r.some(i=>i)){let i=[];for(let o=0,s;or&&(i==o||o>p.from)){r=p.from;let A=/^\s*/.exec(p.text)[0].length,m=A==p.length,g=p.text.slice(A,A+u.length)==u?A:-1;Ai.comment<0&&(!i.empty||i.single))){let i=[];for(let{line:s,token:l,indent:u,empty:d,single:p}of a)(p||!d)&&i.push({from:s.from+u,insert:l+" "});let o=e.changes(i);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&a.some(i=>i.comment>=0)){let i=[];for(let{line:o,comment:s,token:l}of a)if(s>=0){let u=o.from+s,d=u+l.length;o.text[d-o.from]==" "&&d++,i.push({from:u,to:d})}return{changes:i}}return null}const QJ=Qy.define(),_3t=Qy.define(),B3t=da.define(),U7e=da.define({combine(t){return X$(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(a,r)=>e(a,r)||n(a,r)})}}),G7e=sc.define({create(){return vh.empty},update(t,e){let n=e.state.facet(U7e),a=e.annotation(QJ);if(a){let l=Pd.fromTransaction(e,a.selection),u=a.side,d=u==0?t.undone:t.done;return l?d=hL(d,d.length,n.minDepth,l):d=W7e(d,e.startState.selection),new vh(u==0?a.rest:d,u==0?d:a.rest)}let r=e.annotation(_3t);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Zs.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let i=Pd.fromTransaction(e),o=e.annotation(Zs.time),s=e.annotation(Zs.userEvent);return i?t=t.addChanges(i,o,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,s,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new vh(t.done.map(Pd.fromJSON),t.undone.map(Pd.fromJSON))}});function E3t(t={}){return[G7e,U7e.of(t),Sn.domEventHandlers({beforeinput(e,n){let a=e.inputType=="historyUndo"?Dse:e.inputType=="historyRedo"?gL:null;return a?(e.preventDefault(),a(n)):!1}})]}function qM(t,e){return function({state:n,dispatch:a}){if(!e&&n.readOnly)return!1;let r=n.field(G7e,!1);if(!r)return!1;let i=r.pop(t,n,e);return i?(a(i),!0):!1}}const Dse=qM(0,!1),gL=qM(1,!1),Q3t=qM(0,!0),S3t=qM(1,!0);class Pd{constructor(e,n,a,r,i){this.changes=e,this.effects=n,this.mapped=a,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new Pd(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,a;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(a=this.startSelection)===null||a===void 0?void 0:a.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Pd(e.changes&&vc.fromJSON(e.changes),[],e.mapped&&Ih.fromJSON(e.mapped),e.startSelection&&Kt.fromJSON(e.startSelection),e.selectionsAfter.map(Kt.fromJSON))}static fromTransaction(e,n){let a=MA;for(let r of e.startState.facet(B3t)){let i=r(e);i.length&&(a=a.concat(i))}return!a.length&&e.changes.empty?null:new Pd(e.changes.invert(e.startState.doc),a,void 0,n||e.startState.selection,MA)}static selection(e){return new Pd(void 0,MA,void 0,void 0,e)}}function hL(t,e,n,a){let r=e+1>n+20?e-n-1:0,i=t.slice(r,e);return i.push(a),i}function I3t(t,e){let n=[],a=!1;return t.iterChangedRanges((r,i)=>n.push(r,i)),e.iterChangedRanges((r,i,o,s)=>{for(let l=0;l=u&&o<=d&&(a=!0)}}),a}function D3t(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,a)=>n.empty!=e.ranges[a].empty).length===0}function H7e(t,e){return t.length?e.length?t.concat(e):t:e}const MA=[],$3t=200;function W7e(t,e){if(t.length){let n=t[t.length-1],a=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-$3t));return a.length&&a[a.length-1].eq(e)?t:(a.push(e),hL(t,t.length-1,1e9,n.setSelAfter(a)))}else return[Pd.selection([e])]}function T3t(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function vG(t,e){if(!t.length)return t;let n=t.length,a=MA;for(;n;){let r=P3t(t[n-1],e,a);if(r.changes&&!r.changes.empty||r.effects.length){let i=t.slice(0,n);return i[n-1]=r,i}else e=r.mapped,n--,a=r.selectionsAfter}return a.length?[Pd.selection(a)]:MA}function P3t(t,e,n){let a=H7e(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):MA,n);if(!t.changes)return Pd.selection(a);let r=t.changes.map(e),i=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(i):i;return new Pd(r,gr.mapEffects(t.effects,e),o,t.startSelection.map(i),a)}const F3t=/^(input\.type|delete)($|\.)/;class vh{constructor(e,n,a=0,r=void 0){this.done=e,this.undone=n,this.prevTime=a,this.prevUserEvent=r}isolate(){return this.prevTime?new vh(this.done,this.undone):this}addChanges(e,n,a,r,i){let o=this.done,s=o[o.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!a||F3t.test(a))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):jM(n,e))}function _u(t){return t.textDirectionAt(t.state.selection.main.head)==Bs.LTR}const Tse=t=>$se(t,!_u(t)),Y7e=t=>$se(t,_u(t)),L3t=t=>$se(t,!1);function X7e(t,e){return vg(t,n=>n.empty?t.moveByGroup(n,e):jM(n,e))}const N3t=t=>X7e(t,!_u(t)),M3t=t=>X7e(t,_u(t));function z3t(t,e,n){if(e.type.prop(n))return!0;let a=e.to-e.from;return a&&(a>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function UM(t,e,n){let a=Ar(t).resolveInner(e.head),r=n?Ga.closedBy:Ga.openedBy;for(let l=e.head;;){let u=n?a.childAfter(l):a.childBefore(l);if(!u)break;z3t(t,u,r)?a=u:l=n?u.to:u.from}let i=a.type.prop(r),o,s;return i&&(o=n?M0(t,a.from,1):M0(t,a.to,-1))&&o.matched?s=n?o.end.to:o.end.from:s=n?a.to:a.from,Kt.cursor(s,n?-1:1)}const q3t=t=>vg(t,e=>UM(t.state,e,!_u(t))),j3t=t=>vg(t,e=>UM(t.state,e,_u(t)));function V7e(t,e){return vg(t,n=>{if(!n.empty)return jM(n,e);let a=t.moveVertically(n,e);return a.head!=n.head?a:t.moveToLineBoundary(n,e)})}const Z7e=t=>V7e(t,!1),K7e=t=>V7e(t,!0);function J7e(t){let e=t.scrollDOM.clientHeighto.empty?t.moveVertically(o,e,n.height):jM(o,e));if(r.eq(a.selection))return!1;let i;if(n.selfScroll){let o=t.coordsAtPos(a.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,u=s.bottom-n.marginBottom;o&&o.top>l&&o.bottomeNe(t,!1),SJ=t=>eNe(t,!0);function sv(t,e,n){let a=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?a.to:a.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==a.from&&a.length){let i=/^\s*/.exec(t.state.sliceDoc(a.from,Math.min(a.from+100,a.to)))[0].length;i&&e.head!=a.from+i&&(r=Kt.cursor(a.from+i))}return r}const tNe=t=>vg(t,e=>sv(t,e,!0)),nNe=t=>vg(t,e=>sv(t,e,!1)),U3t=t=>vg(t,e=>sv(t,e,!_u(t))),G3t=t=>vg(t,e=>sv(t,e,_u(t))),H3t=t=>vg(t,e=>Kt.cursor(t.lineBlockAt(e.head).from,1)),W3t=t=>vg(t,e=>Kt.cursor(t.lineBlockAt(e.head).to,-1));function Y3t(t,e,n){let a=!1,r=mE(t.selection,i=>{let o=M0(t,i.head,-1)||M0(t,i.head,1)||i.head>0&&M0(t,i.head-1,1)||i.headY3t(t,e);function cm(t,e){let n=mE(t.state.selection,a=>{let r=e(a);return Kt.range(a.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(tf(t.state,n)),!0)}function aNe(t,e){return cm(t,n=>t.moveByChar(n,e))}const rNe=t=>aNe(t,!_u(t)),iNe=t=>aNe(t,_u(t));function oNe(t,e){return cm(t,n=>t.moveByGroup(n,e))}const V3t=t=>oNe(t,!_u(t)),Z3t=t=>oNe(t,_u(t)),K3t=t=>cm(t,e=>UM(t.state,e,!_u(t))),J3t=t=>cm(t,e=>UM(t.state,e,_u(t)));function sNe(t,e){return cm(t,n=>t.moveVertically(n,e))}const cNe=t=>sNe(t,!1),lNe=t=>sNe(t,!0);function uNe(t,e){return cm(t,n=>t.moveVertically(n,e,J7e(t).height))}const iye=t=>uNe(t,!1),oye=t=>uNe(t,!0),e5t=t=>cm(t,e=>sv(t,e,!0)),t5t=t=>cm(t,e=>sv(t,e,!1)),n5t=t=>cm(t,e=>sv(t,e,!_u(t))),a5t=t=>cm(t,e=>sv(t,e,_u(t))),r5t=t=>cm(t,e=>Kt.cursor(t.lineBlockAt(e.head).from)),i5t=t=>cm(t,e=>Kt.cursor(t.lineBlockAt(e.head).to)),sye=({state:t,dispatch:e})=>(e(tf(t,{anchor:0})),!0),cye=({state:t,dispatch:e})=>(e(tf(t,{anchor:t.doc.length})),!0),lye=({state:t,dispatch:e})=>(e(tf(t,{anchor:t.selection.main.anchor,head:0})),!0),uye=({state:t,dispatch:e})=>(e(tf(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),o5t=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),s5t=({state:t,dispatch:e})=>{let n=GM(t).map(({from:a,to:r})=>Kt.range(a,Math.min(r+1,t.doc.length)));return e(t.update({selection:Kt.create(n),userEvent:"select"})),!0},c5t=({state:t,dispatch:e})=>{let n=mE(t.selection,a=>{let r=Ar(t),i=r.resolveStack(a.from,1);if(a.empty){let o=r.resolveStack(a.from,-1);o.node.from>=i.node.from&&o.node.to<=i.node.to&&(i=o)}for(let o=i;o;o=o.next){let{node:s}=o;if((s.from=a.to||s.to>a.to&&s.from<=a.from)&&o.next)return Kt.range(s.to,s.from)}return a});return n.eq(t.selection)?!1:(e(tf(t,n)),!0)},l5t=({state:t,dispatch:e})=>{let n=t.selection,a=null;return n.ranges.length>1?a=Kt.create([n.main]):n.main.empty||(a=Kt.create([Kt.cursor(n.main.head)])),a?(e(tf(t,a)),!0):!1};function J$(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:a}=t,r=a.changeByRange(i=>{let{from:o,to:s}=i;if(o==s){let l=e(i);lo&&(n="delete.forward",l=zT(t,l,!0)),o=Math.min(o,l),s=Math.max(s,l)}else o=zT(t,o,!1),s=zT(t,s,!0);return o==s?{range:i}:{changes:{from:o,to:s},range:Kt.cursor(o,or(t)))a.between(e,e,(r,i)=>{re&&(e=n?i:r)});return e}const dNe=(t,e,n)=>J$(t,a=>{let r=a.from,{state:i}=t,o=i.doc.lineAt(r),s,l;if(n&&!e&&r>o.from&&rdNe(t,!1,!0),pNe=t=>dNe(t,!0,!1),ANe=(t,e)=>J$(t,n=>{let a=n.head,{state:r}=t,i=r.doc.lineAt(a),o=r.charCategorizer(a);for(let s=null;;){if(a==(e?i.to:i.from)){a==n.head&&i.number!=(e?r.doc.lines:1)&&(a+=e?1:-1);break}let l=Bl(i.text,a-i.from,e)+i.from,u=i.text.slice(Math.min(a,l)-i.from,Math.max(a,l)-i.from),d=o(u);if(s!=null&&d!=s)break;(u!=" "||a!=n.head)&&(s=d),a=l}return a}),mNe=t=>ANe(t,!1),u5t=t=>ANe(t,!0),d5t=t=>J$(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headJ$(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),A5t=t=>J$(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(a=>({changes:{from:a.from,to:a.to,insert:ni.of(["",""])},range:Kt.cursor(a.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},g5t=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(a=>{if(!a.empty||a.from==0||a.from==t.doc.length)return{range:a};let r=a.from,i=t.doc.lineAt(r),o=r==i.from?r-1:Bl(i.text,r-i.from,!1)+i.from,s=r==i.to?r+1:Bl(i.text,r-i.from,!0)+i.from;return{changes:{from:o,to:s,insert:t.doc.slice(r,s).append(t.doc.slice(o,r))},range:Kt.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function GM(t){let e=[],n=-1;for(let a of t.selection.ranges){let r=t.doc.lineAt(a.from),i=t.doc.lineAt(a.to);if(!a.empty&&a.to==i.from&&(i=t.doc.lineAt(a.to-1)),n>=r.number){let o=e[e.length-1];o.to=i.to,o.ranges.push(a)}else e.push({from:r.from,to:i.to,ranges:[a]});n=i.number+1}return e}function gNe(t,e,n){if(t.readOnly)return!1;let a=[],r=[];for(let i of GM(t)){if(n?i.to==t.doc.length:i.from==0)continue;let o=t.doc.lineAt(n?i.to+1:i.from-1),s=o.length+1;if(n){a.push({from:i.to,to:o.to},{from:i.from,insert:o.text+t.lineBreak});for(let l of i.ranges)r.push(Kt.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{a.push({from:o.from,to:i.from},{from:i.to,insert:t.lineBreak+o.text});for(let l of i.ranges)r.push(Kt.range(l.anchor-s,l.head-s))}}return a.length?(e(t.update({changes:a,scrollIntoView:!0,selection:Kt.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const h5t=({state:t,dispatch:e})=>gNe(t,e,!1),f5t=({state:t,dispatch:e})=>gNe(t,e,!0);function hNe(t,e,n){if(t.readOnly)return!1;let a=[];for(let r of GM(t))n?a.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):a.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:a,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const b5t=({state:t,dispatch:e})=>hNe(t,e,!1),y5t=({state:t,dispatch:e})=>hNe(t,e,!0),w5t=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(GM(e).map(({from:r,to:i})=>(r>0?r--:i{let i;if(t.lineWrapping){let o=t.lineBlockAt(r.head),s=t.coordsAtPos(r.head,r.assoc||1);s&&(i=o.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,i)}).map(n);return t.dispatch({changes:n,selection:a,scrollIntoView:!0,userEvent:"delete.line"}),!0};function v5t(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ar(t).resolveInner(e),a=n.childBefore(e),r=n.childAfter(e),i;return a&&r&&a.to<=e&&r.from>=e&&(i=a.type.prop(Ga.closedBy))&&i.indexOf(r.name)>-1&&t.doc.lineAt(a.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(a.to,r.from))?{from:a.to,to:r.from}:null}const DJ=fNe(!1),k5t=fNe(!0);function fNe(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let a=e.changeByRange(r=>{let{from:i,to:o}=r,s=e.doc.lineAt(i),l=!t&&i==o&&v5t(e,i);t&&(i=o=(o<=s.to?s:e.doc.lineAt(o)).to);let u=new MM(e,{simulateBreak:i,simulateDoubleBreak:!!l}),d=E7e(u,i);for(d==null&&(d=ry(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));os.from&&i{let r=[];for(let o=a.from;o<=a.to;){let s=t.doc.lineAt(o);s.number>n&&(a.empty||a.to>s.from)&&(e(s,r,a),n=s.number),o=s.to+1}let i=t.changes(r);return{changes:r,range:Kt.range(i.mapPos(a.anchor,1),i.mapPos(a.head,1))}})}const bNe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),a=new MM(t,{overrideIndentation:i=>{let o=n[i];return o??-1}}),r=Pse(t,(i,o,s)=>{let l=E7e(a,i.from);if(l==null)return;/\S/.test(i.text)||(l=0);let u=/^\s*/.exec(i.text)[0],d=mL(t,l);(u!=d||s.fromt.readOnly?!1:(e(t.update(Pse(t,(n,a)=>{a.push({from:n.from,insert:t.facet(G1)})}),{userEvent:"input.indent"})),!0),Rse=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Pse(t,(n,a)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let i=ry(r,t.tabSize),o=0,s=mL(t,Math.max(0,i-H1(t)));for(;o(t.setTabFocusMode(),!0),O5t=[{key:"Ctrl-b",run:Tse,shift:rNe,preventDefault:!0},{key:"Ctrl-f",run:Y7e,shift:iNe},{key:"Ctrl-p",run:Z7e,shift:cNe},{key:"Ctrl-n",run:K7e,shift:lNe},{key:"Ctrl-a",run:H3t,shift:r5t},{key:"Ctrl-e",run:W3t,shift:i5t},{key:"Ctrl-d",run:pNe},{key:"Ctrl-h",run:IJ},{key:"Ctrl-k",run:d5t},{key:"Ctrl-Alt-h",run:mNe},{key:"Ctrl-o",run:m5t},{key:"Ctrl-t",run:g5t},{key:"Ctrl-v",run:SJ}],C5t=[{key:"ArrowLeft",run:Tse,shift:rNe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:N3t,shift:V3t,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:U3t,shift:n5t,preventDefault:!0},{key:"ArrowRight",run:Y7e,shift:iNe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:M3t,shift:Z3t,preventDefault:!0},{mac:"Cmd-ArrowRight",run:G3t,shift:a5t,preventDefault:!0},{key:"ArrowUp",run:Z7e,shift:cNe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:sye,shift:lye},{mac:"Ctrl-ArrowUp",run:rye,shift:iye},{key:"ArrowDown",run:K7e,shift:lNe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cye,shift:uye},{mac:"Ctrl-ArrowDown",run:SJ,shift:oye},{key:"PageUp",run:rye,shift:iye},{key:"PageDown",run:SJ,shift:oye},{key:"Home",run:nNe,shift:t5t,preventDefault:!0},{key:"Mod-Home",run:sye,shift:lye},{key:"End",run:tNe,shift:e5t,preventDefault:!0},{key:"Mod-End",run:cye,shift:uye},{key:"Enter",run:DJ,shift:DJ},{key:"Mod-a",run:o5t},{key:"Backspace",run:IJ,shift:IJ},{key:"Delete",run:pNe},{key:"Mod-Backspace",mac:"Alt-Backspace",run:mNe},{key:"Mod-Delete",mac:"Alt-Delete",run:u5t},{mac:"Mod-Backspace",run:p5t},{mac:"Mod-Delete",run:A5t}].concat(O5t.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),_5t=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:q3t,shift:K3t},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:j3t,shift:J3t},{key:"Alt-ArrowUp",run:h5t},{key:"Shift-Alt-ArrowUp",run:b5t},{key:"Alt-ArrowDown",run:f5t},{key:"Shift-Alt-ArrowDown",run:y5t},{key:"Escape",run:l5t},{key:"Mod-Enter",run:k5t},{key:"Alt-l",mac:"Ctrl-l",run:s5t},{key:"Mod-i",run:c5t,preventDefault:!0},{key:"Mod-[",run:Rse},{key:"Mod-]",run:Fse},{key:"Mod-Alt-\\",run:bNe},{key:"Shift-Mod-k",run:w5t},{key:"Shift-Mod-\\",run:X3t},{key:"Mod-/",run:y3t},{key:"Alt-A",run:v3t},{key:"Ctrl-m",mac:"Shift-Alt-m",run:x5t}].concat(C5t);class Lse{constructor(e,n,a,r){this.state=e,this.pos=n,this.explicit=a,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Ar(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),a=Math.max(n.from,this.pos-250),r=n.text.slice(a-n.from,this.pos-n.from),i=r.search(yNe(e,!1));return i<0?null:{from:a+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,a){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),a&&a.onDocChange&&(this.abortOnDocChange=!0))}}function dye(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function B5t(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let i=1;itypeof r=="string"?{label:r}:r),[n,a]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:B5t(e);return r=>{let i=r.matchBefore(a);return i||r.explicit?{from:i?i.from:r.pos,options:e,validFor:n}:null}}function HM(t,e){return n=>{for(let a=Ar(n.state).resolveInner(n.pos,-1);a;a=a.parent){if(t.indexOf(a.name)>-1)return null;if(a.type.isTop)break}return e(n)}}let pye=class{constructor(e,n,a,r){this.completion=e,this.source=n,this.match=a,this.score=r}};function A1(t){return t.selection.main.from}function yNe(t,e){var n;let{source:a}=t,r=e&&a[0]!="^",i=a[a.length-1]!="$";return!r&&!i?t:new RegExp(`${r?"^":""}(?:${a})${i?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const Nse=Qy.define();function E5t(t,e,n,a){let{main:r}=t.selection,i=n-r.from,o=a-r.from;return Object.assign(Object.assign({},t.changeByRange(s=>{if(s!=r&&n!=a&&t.sliceDoc(s.from+i,s.from+o)!=t.sliceDoc(n,a))return{range:s};let l=t.toText(e);return{changes:{from:s.from+i,to:a==r.from?s.to:s.from+o,insert:l},range:Kt.cursor(s.from+i+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const Aye=new WeakMap;function Q5t(t){if(!Array.isArray(t))return t;let e=Aye.get(t);return e||Aye.set(t,e=e3(t)),e}const fL=gr.define(),iD=gr.define();class S5t{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(_=cse(k))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!y||x==1&&f||v==0&&x!=0)&&(n[p]==k||a[p]==k&&(A=!0)?o[p++]=y:o.length&&(b=!1)),v=x,y+=Ab(k)}return p==l&&o[0]==0&&b?this.result(-100+(A?-200:0),o,e):m==l&&g==0?this.ret(-200-e.length+(h==e.length?0:-100),[0,h]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):m==l?this.ret(-900-e.length,[g,h]):p==l?this.result(-100+(A?-200:0)+-700+(b?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,a){let r=[],i=0;for(let o of n){let s=o+(this.astral?Ab(Ym(a,o)):1);i&&r[i-1]==o?r[i-1]=s:(r[i++]=o,r[i++]=s)}return this.ret(e-a.length,r)}}class I5t{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:D5t,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>a=>mye(e(a),n(a)),optionClass:(e,n)=>a=>mye(e(a),n(a)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function mye(t,e){return t?e?t+" "+e:t:e}function D5t(t,e,n,a,r,i){let o=t.textDirection==Bs.RTL,s=o,l=!1,u="top",d,p,A=e.left-r.left,m=r.right-e.right,g=a.right-a.left,h=a.bottom-a.top;if(s&&A=h||y>e.top?d=n.bottom-e.top:(u="bottom",d=e.bottom-n.top)}let f=(e.bottom-e.top)/i.offsetHeight,b=(e.right-e.left)/i.offsetWidth;return{style:`${u}: ${d/f}px; max-width: ${p/b}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":s?"left":"right")}}function $5t(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let a=document.createElement("div");return a.classList.add("cm-completionIcon"),n.type&&a.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),a.setAttribute("aria-hidden","true"),a},position:20}),e.push({render(n,a,r,i){let o=document.createElement("span");o.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let u=0;ul&&o.appendChild(document.createTextNode(s.slice(l,d)));let A=o.appendChild(document.createElement("span"));A.appendChild(document.createTextNode(s.slice(d,p))),A.className="cm-completionMatchedText",l=p}return ln.position-a.position).map(n=>n.render)}function kG(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let a=Math.floor((t-e)/n);return{from:t-(a+1)*n,to:t-a*n}}class T5t{constructor(e,n,a){this.view=e,this.stateField=n,this.applyCompletion=a,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:i,selected:o}=r.open,s=e.state.facet(el);this.optionContent=$5t(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=kG(i.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let d=l.target,p;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(p=/-(\d+)$/.exec(d.id))&&+p[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(el).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:iD.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let a=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),a!=r){let{options:i,selected:o,disabled:s}=a.open;(!r.open||r.open.options!=i)&&(this.range=kG(i.length,o,e.state.facet(el).maxRenderedOptions),this.showOptions(i,a.id)),this.updateSel(),s!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let a of this.currentClass.split(" "))a&&this.dom.classList.remove(a);for(let a of n.split(" "))a&&this.dom.classList.add(a);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=kG(n.options.length,n.selected,this.view.state.facet(el).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:a}=n.options[n.selected],{info:r}=a;if(!r)return;let i=typeof r=="string"?document.createTextNode(r):r(a);if(!i)return;"then"in i?i.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,a)}).catch(o=>$p(this.view.state,o,"completion info")):this.addInfoPane(i,a)}}addInfoPane(e,n){this.destroyInfo();let a=this.info=document.createElement("div");if(a.className="cm-tooltip cm-completionInfo",e.nodeType!=null)a.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:i}=e;a.appendChild(r),this.infoDestroy=i||null}this.dom.appendChild(a),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let a=this.list.firstChild,r=this.range.from;a;a=a.nextSibling,r++)a.nodeName!="LI"||!a.id?r--:r==e?a.hasAttribute("aria-selected")||(a.setAttribute("aria-selected","true"),n=a):a.hasAttribute("aria-selected")&&a.removeAttribute("aria-selected");return n&&F5t(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),a=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let o=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return r.top>Math.min(i.bottom,n.bottom)-10||r.bottoma.from||a.from==0))if(i=A,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let m=r.appendChild(document.createElement("completion-section"));m.textContent=A}}const d=r.appendChild(document.createElement("li"));d.id=n+"-"+o,d.setAttribute("role","option");let p=this.optionClass(s);p&&(d.className=p);for(let A of this.optionContent){let m=A(s,this.view.state,this.view,l);m&&d.appendChild(m)}}return a.from&&r.classList.add("cm-completionListIncompleteTop"),a.tonew T5t(n,t,e)}function F5t(t,e){let n=t.getBoundingClientRect(),a=e.getBoundingClientRect(),r=n.height/t.offsetHeight;a.topn.bottom&&(t.scrollTop+=(a.bottom-n.bottom)/r)}function gye(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function R5t(t,e){let n=[],a=null,r=u=>{n.push(u);let{section:d}=u.completion;if(d){a||(a=[]);let p=typeof d=="string"?d:d.name;a.some(A=>A.name==p)||a.push(typeof d=="string"?{name:p}:d)}},i=e.facet(el);for(let u of t)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let p of u.result.options)r(new pye(p,u.source,d?d(p):[],1e9-n.length));else{let p=e.sliceDoc(u.from,u.to),A,m=i.filterStrict?new I5t(p):new S5t(p);for(let g of u.result.options)if(A=m.match(g.label)){let h=g.displayLabel?d?d(g,A.matched):[]:A.matched;r(new pye(g,u.source,h,A.score+(g.boost||0)))}}}if(a){let u=Object.create(null),d=0,p=(A,m)=>{var g,h;return((g=A.rank)!==null&&g!==void 0?g:1e9)-((h=m.rank)!==null&&h!==void 0?h:1e9)||(A.namep.score-d.score||l(d.completion,p.completion))){let d=u.completion;!s||s.label!=d.label||s.detail!=d.detail||s.type!=null&&d.type!=null&&s.type!=d.type||s.apply!=d.apply||s.boost!=d.boost?o.push(u):gye(u.completion)>gye(s)&&(o[o.length-1]=u),s=u.completion}return o}class KC{constructor(e,n,a,r,i,o){this.options=e,this.attrs=n,this.tooltip=a,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new KC(this.options,hye(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,a,r,i,o){if(r&&!o&&e.some(u=>u.isPending))return r.setDisabled();let s=R5t(e,n);if(!s.length)return r&&e.some(u=>u.isPending)?r.setDisabled():null;let l=n.facet(el).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let u=r.options[r.selected].completion;for(let d=0;dd.hasResult()?Math.min(u,d.from):u,1e8),create:j5t,above:i.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new KC(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new KC(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class bL{constructor(e,n,a){this.active=e,this.id=n,this.open=a}static start(){return new bL(z5t,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,a=n.facet(el),i=(a.override||n.languageDataAt("autocomplete",A1(n)).map(Q5t)).map(l=>(this.active.find(d=>d.source==l)||new zA(l,this.active.some(d=>d.state!=0)?1:0)).update(e,a));i.length==this.active.length&&i.every((l,u)=>l==this.active[u])&&(i=this.active);let o=this.open,s=e.effects.some(l=>l.is(Mse));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||i.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!L5t(i,this.active)||s?o=KC.build(i,n,this.id,o,a,s):o&&o.disabled&&!i.some(l=>l.isPending)&&(o=null),!o&&i.every(l=>!l.isPending)&&i.some(l=>l.hasResult())&&(i=i.map(l=>l.hasResult()?new zA(l.source,0):l));for(let l of e.effects)l.is(vNe)&&(o=o&&o.setSelected(l.value,this.id));return i==this.active&&o==this.open?this:new bL(i,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?N5t:M5t}}function L5t(t,e){if(t==e)return!0;for(let n=0,a=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const z5t=[];function wNe(t,e){if(t.isUserEvent("input.complete")){let a=t.annotation(Nse);if(a&&e.activateOnCompletion(a))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class zA{constructor(e,n,a=!1){this.source=e,this.state=n,this.explicit=a}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let a=wNe(e,n),r=this;(a&8||a&16&&this.touches(e))&&(r=new zA(r.source,0)),a&4&&r.state==0&&(r=new zA(this.source,1)),r=r.updateFor(e,a);for(let i of e.effects)if(i.is(fL))r=new zA(r.source,1,i.value);else if(i.is(iD))r=new zA(r.source,0);else if(i.is(Mse))for(let o of i.value)o.source==r.source&&(r=o);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(A1(e.state))}}class C_ extends zA{constructor(e,n,a,r,i,o){super(e,3,n),this.limit=a,this.result=r,this.from=i,this.to=o}hasResult(){return!0}updateFor(e,n){var a;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=A1(e.state);if(s>o||!r||n&2&&(A1(e.startState)==this.from||sn.map(e))}}),vNe=gr.define(),Qd=sc.define({create(){return bL.start()},update(t,e){return t.update(e)},provide:t=>[v7e.from(t,e=>e.tooltip),Sn.contentAttributes.from(t,e=>e.attrs)]});function zse(t,e){const n=e.completion.apply||e.completion.label;let a=t.state.field(Qd).active.find(r=>r.source==e.source);return a instanceof C_?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},E5t(t.state,n,a.from,a.to)),{annotations:Nse.of(e.completion)})):n(t,e.completion,a.from,a.to),!0):!1}const j5t=P5t(Qd,zse);function qT(t,e="option"){return n=>{let a=n.state.field(Qd,!1);if(!a||!a.open||a.open.disabled||Date.now()-a.open.timestamp-1?a.open.selected+r*(t?1:-1):t?0:o-1;return s<0?s=e=="page"?0:o-1:s>=o&&(s=e=="page"?o-1:0),n.dispatch({effects:vNe.of(s)}),!0}}const U5t=t=>{let e=t.state.field(Qd,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Qd,!1)?(t.dispatch({effects:fL.of(!0)}),!0):!1,G5t=t=>{let e=t.state.field(Qd,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:iD.of(null)}),!0)};class H5t{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const W5t=50,Y5t=1e3,X5t=wu.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Qd).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Qd),n=t.state.facet(el);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Qd)==e)return;let a=t.transactions.some(i=>{let o=wNe(i,n);return o&8||(i.selection||i.docChanged)&&!(o&3)});for(let i=0;iW5t&&Date.now()-o.time>Y5t){for(let s of o.context.abortListeners)try{s()}catch(l){$p(this.view.state,l)}o.context.abortListeners=null,this.running.splice(i--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(i=>i.effects.some(o=>o.is(fL)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(i=>i.isPending&&!this.running.some(o=>o.active.source==i.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let i of t.transactions)i.isUserEvent("input.type")?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Qd);for(let n of e.active)n.isPending&&!this.running.some(a=>a.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(el).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=A1(e),a=new Lse(e,n,t.explicit,this.view),r=new H5t(t,a);this.running.push(r),Promise.resolve(t.source(a)).then(i=>{r.context.aborted||(r.done=i||null,this.scheduleAccept())},i=>{this.view.dispatch({effects:iD.of(null)}),$p(this.view.state,i)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(el).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(el),a=this.view.state.field(Qd);for(let r=0;rs.source==i.active.source);if(o&&o.isPending)if(i.done==null){let s=new zA(i.active.source,0);for(let l of i.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(o)}(e.length||a.open&&a.open.disabled)&&this.view.dispatch({effects:Mse.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Qd,!1);if(e&&e.tooltip&&this.view.state.facet(el).closeOnBlur){let n=e.open&&k7e(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:iD.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:fL.of(!1)}),20),this.composing=0}}}),V5t=typeof navigator=="object"&&/Win/.test(navigator.platform),Z5t=Ey.highest(Sn.domEventHandlers({keydown(t,e){let n=e.state.field(Qd,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(V5t&&t.altKey)||t.metaKey)return!1;let a=n.open.options[n.open.selected],r=n.active.find(o=>o.source==a.source),i=a.completion.commitCharacters||r.result.commitCharacters;return i&&i.indexOf(t.key)>-1&&zse(e,a),!1}})),kNe=Sn.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class K5t{constructor(e,n,a,r){this.field=e,this.line=n,this.from=a,this.to=r}}class qse{constructor(e,n,a){this.field=e,this.from=n,this.to=a}map(e){let n=e.mapPos(this.from,-1,Jc.TrackDel),a=e.mapPos(this.to,1,Jc.TrackDel);return n==null||a==null?null:new qse(this.field,n,a)}}class jse{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let a=[],r=[n],i=e.doc.lineAt(n),o=/^\s*/.exec(i.text)[0];for(let l of this.lines){if(a.length){let u=o,d=/^\t*/.exec(l)[0].length;for(let p=0;pnew qse(l.field,r[l.line]+l.from,r[l.line]+l.to));return{text:a,ranges:s}}static parse(e){let n=[],a=[],r=[],i;for(let o of e.split(/\r\n?|\n/)){for(;i=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let s=i[1]?+i[1]:null,l=i[2]||i[3]||"",u=-1,d=l.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p=u&&A.field++}r.push(new K5t(u,a.length,i.index,i.index+d.length)),o=o.slice(0,i.index)+l+o.slice(i.index+i[0].length)}o=o.replace(/\\([{}])/g,(s,l,u)=>{for(let d of r)d.line==a.length&&d.from>u&&(d.from--,d.to--);return l}),a.push(o)}return new jse(a,r)}}let J5t=na.widget({widget:new class extends ov{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),eTt=na.mark({class:"cm-snippetField"});class gE{constructor(e,n){this.ranges=e,this.active=n,this.deco=na.set(e.map(a=>(a.from==a.to?J5t:eTt).range(a.from,a.to)))}map(e){let n=[];for(let a of this.ranges){let r=a.map(e);if(!r)return null;n.push(r)}return new gE(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(a=>a.field==this.active&&a.from<=n.from&&a.to>=n.to))}}const t3=gr.define({map(t,e){return t&&t.map(e)}}),tTt=gr.define(),oD=sc.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(t3))return n.value;if(n.is(tTt)&&t)return new gE(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Sn.decorations.from(t,e=>e?e.deco:na.none)});function Use(t,e){return Kt.create(t.filter(n=>n.field==e).map(n=>Kt.range(n.from,n.to)))}function nTt(t){let e=jse.parse(t);return(n,a,r,i)=>{let{text:o,ranges:s}=e.instantiate(n.state,r),{main:l}=n.state.selection,u={changes:{from:r,to:i==l.from?l.to:i,insert:ni.of(o)},scrollIntoView:!0,annotations:a?[Nse.of(a),Zs.userEvent.of("input.complete")]:void 0};if(s.length&&(u.selection=Use(s,0)),s.some(d=>d.field>0)){let d=new gE(s,0),p=u.effects=[t3.of(d)];n.state.field(oD,!1)===void 0&&p.push(gr.appendConfig.of([oD,sTt,cTt,kNe]))}n.dispatch(n.state.update(u))}}function xNe(t){return({state:e,dispatch:n})=>{let a=e.field(oD,!1);if(!a||t<0&&a.active==0)return!1;let r=a.active+t,i=t>0&&!a.ranges.some(o=>o.field==r+t);return n(e.update({selection:Use(a.ranges,r),effects:t3.of(i?null:new gE(a.ranges,r)),scrollIntoView:!0})),!0}}const aTt=({state:t,dispatch:e})=>t.field(oD,!1)?(e(t.update({effects:t3.of(null)})),!0):!1,rTt=xNe(1),iTt=xNe(-1),oTt=[{key:"Tab",run:rTt,shift:iTt},{key:"Escape",run:aTt}],bye=da.define({combine(t){return t.length?t[0]:oTt}}),sTt=Ey.highest(Dx.compute([bye],t=>t.facet(bye)));function mr(t,e){return Object.assign(Object.assign({},e),{apply:nTt(t)})}const cTt=Sn.domEventHandlers({mousedown(t,e){let n=e.state.field(oD,!1),a;if(!n||(a=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(i=>i.from<=a&&i.to>=a);return!r||r.field==n.active?!1:(e.dispatch({selection:Use(n.ranges,r.field),effects:t3.of(n.ranges.some(i=>i.field>r.field)?new gE(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),yL={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Kk=gr.define({map(t,e){let n=e.mapPos(t,-1,Jc.TrackAfter);return n??void 0}}),Gse=new class extends M1{};Gse.startSide=1;Gse.endSide=-1;const ONe=sc.define({create(){return ti.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:a=>a>=n.from&&a<=n.to})}for(let n of e.effects)n.is(Kk)&&(t=t.update({add:[Gse.range(n.value,n.value+1)]}));return t}});function lTt(){return[ATt,ONe]}const xG="()[]{}<>";function uTt(t){for(let e=0;e{if((pTt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(a.length>2||a.length==2&&Ab(Ym(a,0))==1||e!=r.from||n!=r.to)return!1;let i=mTt(t.state,a);return i?(t.dispatch(i),!0):!1});function mTt(t,e){let n=dTt(t,t.selection.main.head),a=n.brackets||yL.brackets;for(let r of a){let i=uTt(Ym(r,0));if(e==r)return i==r?fTt(t,r,a.indexOf(r+r+r)>-1,n):gTt(t,r,i,n.before||yL.before);if(e==i&&CNe(t,t.selection.main.from))return hTt(t,r,i)}return null}function CNe(t,e){let n=!1;return t.field(ONe).between(0,t.doc.length,a=>{a==e&&(n=!0)}),n}function Hse(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Ab(Ym(n,0)))}function gTt(t,e,n,a){let r=null,i=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Kk.of(o.to+e.length),range:Kt.range(o.anchor+e.length,o.head+e.length)};let s=Hse(t.doc,o.head);return!s||/\s/.test(s)||a.indexOf(s)>-1?{changes:{insert:e+n,from:o.head},effects:Kk.of(o.head+e.length),range:Kt.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function hTt(t,e,n){let a=null,r=t.changeByRange(i=>i.empty&&Hse(t.doc,i.head)==n?{changes:{from:i.head,to:i.head+n.length,insert:n},range:Kt.cursor(i.head+n.length)}:a={range:i});return a?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function fTt(t,e,n,a){let r=a.stringPrefixes||yL.stringPrefixes,i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Kk.of(s.to+e.length),range:Kt.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=Hse(t.doc,l),d;if(u==e){if(yye(t,l))return{changes:{insert:e+e,from:l},effects:Kk.of(l+e.length),range:Kt.cursor(l+e.length)};if(CNe(t,l)){let A=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+A.length,insert:A},range:Kt.cursor(l+A.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(d=wye(t,l-2*e.length,r))>-1&&yye(t,d))return{changes:{insert:e+e+e+e,from:l},effects:Kk.of(l+e.length),range:Kt.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Ks.Word&&wye(t,l,r)>-1&&!bTt(t,l,e,r))return{changes:{insert:e+e,from:l},effects:Kk.of(l+e.length),range:Kt.cursor(l+e.length)}}return{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function yye(t,e){let n=Ar(t).resolveInner(e+1);return n.parent&&n.from==e}function bTt(t,e,n,a){let r=Ar(t).resolveInner(e,-1),i=a.reduce((o,s)=>Math.max(o,s.length),0);for(let o=0;o<5;o++){let s=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+i)),l=s.indexOf(n);if(!l||l>-1&&a.indexOf(s.slice(0,l))>-1){let d=r.firstChild;for(;d&&d.from==r.from&&d.to-d.from>n.length+l;){if(t.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function wye(t,e,n){let a=t.charCategorizer(e);if(a(t.sliceDoc(e-1,e))!=Ks.Word)return e;for(let r of n){let i=e-r.length;if(t.sliceDoc(i,e)==r&&a(t.sliceDoc(i-1,i))!=Ks.Word)return i}return-1}function yTt(t={}){return[Z5t,Qd,el.of(t),X5t,vTt,kNe]}const wTt=[{key:"Ctrl-Space",run:fye},{mac:"Alt-`",run:fye},{key:"Escape",run:G5t},{key:"ArrowDown",run:qT(!0)},{key:"ArrowUp",run:qT(!1)},{key:"PageDown",run:qT(!0,"page")},{key:"PageUp",run:qT(!1,"page")},{key:"Enter",run:U5t}],vTt=Ey.highest(Dx.computeN([el],t=>t.facet(el).defaultKeymap?[wTt]:[]));class wL{static create(e,n,a,r,i){let o=r+(r<<8)+e+(n<<4)|0;return new wL(e,n,a,o,i,[],[])}constructor(e,n,a,r,i,o,s){this.type=e,this.value=n,this.from=a,this.hash=r,this.end=i,this.children=o,this.positions=s,this.hashProp=[[Ga.contextHash,r]]}addChild(e,n){e.prop(Ga.contextHash)!=this.hash&&(e=new yr(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let a=this.children.length-1;return a>=0&&(n=Math.max(n,this.positions[a]+this.children[a].length+this.from)),new yr(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,i,o)=>new yr(nc.none,r,i,o,this.hashProp)})}}var Bn;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(Bn||(Bn={}));class kTt{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class xTt{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return TI(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,a=0){for(let r=n;r=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let a=(t.type==Bn.OrderedList?Xse:Yse)(n,e,!1);return a>0&&(t.type!=Bn.BulletList||Wse(n,e,!1)<0)&&n.text.charCodeAt(n.pos+a-1)==t.value}const _Ne={[Bn.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push($r(Bn.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(lm(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[Bn.ListItem](t,e,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[Bn.OrderedList]:vye,[Bn.BulletList]:vye,[Bn.Document](){return!0}};function lm(t){return t==32||t==9||t==10||t==13}function TI(t,e=0){for(;en&&lm(t.charCodeAt(e-1));)e--;return e}function BNe(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(PNe.SetextHeading)>-1||a<3?-1:1}function QNe(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Yse(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||lm(t.text.charCodeAt(t.pos+1)))&&(!n||QNe(e,Bn.BulletList)||t.skipSpace(t.pos+2)=48&&r<=57;){a++;if(a==t.text.length)return-1;r=t.text.charCodeAt(a)}return a==t.pos||a>t.pos+9||r!=46&&r!=41||at.pos+1||t.next!=49)?-1:a+1-t.pos}function SNe(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e6?-1:n}function INe(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e/,$Ne=/\?>/,TJ=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(a);if(i)return t.append($r(Bn.Comment,n,n+1+i[0].length));let o=/^\?[^]*?\?>/.exec(a);if(o)return t.append($r(Bn.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(a);return s?t.append($r(Bn.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let a=n+1;for(;t.char(a)==e;)a++;let r=t.slice(n-1,n),i=t.slice(a,a+1),o=cD.test(r),s=cD.test(i),l=/\s|^$/.test(r),u=/\s|^$/.test(i),d=!u&&(!s||l||o),p=!l&&(!o||u||s),A=d&&(e==42||!p||o),m=p&&(e==42||!d||s);return t.append(new BA(e==95?MNe:zNe,n,a,(A?1:0)|(m?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append($r(Bn.HardBreak,n,n+2));if(e==32){let a=n+1;for(;t.char(a)==32;)a++;if(t.char(a)==10&&a>=n+2)return t.append($r(Bn.HardBreak,n,a+1))}return-1},Link(t,e,n){return e==91?t.append(new BA(SC,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new BA(FJ,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let a=t.parts.length-1;a>=0;a--){let r=t.parts[a];if(r instanceof BA&&(r.type==SC||r.type==FJ)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[a]=null,-1;let i=t.takeContent(a),o=t.parts[a]=QTt(t,i,r.type==SC?Bn.Link:Bn.Image,r.from,n+1);if(r.type==SC)for(let s=0;se?$r(Bn.URL,e+n,i+n):i==t.length?null:!1}}function jNe(t,e,n){let a=t.charCodeAt(e);if(a!=39&&a!=34&&a!=40)return!1;let r=a==40?41:a;for(let i=e+1,o=!1;i=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,a,r,i){return this.append(new BA(e,n,a,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof BA&&(n.type==SC||n.type==FJ))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let a=e;a=e;l--){let h=this.parts[l];if(h instanceof BA&&h.side&1&&h.type==r.type&&!(i&&(r.side&1||h.side&2)&&(h.to-h.from+o)%3==0&&((h.to-h.from)%3||o%3))){s=h;break}}if(!s)continue;let u=r.type.resolve,d=[],p=s.from,A=r.to;if(i){let h=Math.min(2,s.to-s.from,o);p=s.to-h,A=r.from+h,u=h==1?"Emphasis":"StrongEmphasis"}s.type.mark&&d.push(this.elt(s.type.mark,p,s.to));for(let h=l+1;h=0;n--){let a=this.parts[n];if(a instanceof BA&&a.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return TI(this.text,e-this.offset)+this.offset}elt(e,n,a,r){return typeof e=="string"?$r(this.parser.getNodeType(e),n,a,r):new NNe(e,n)}}function RJ(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),a=0;for(let r of e){for(;a(e?e-1:0))return!1;if(this.fragmentEnd<0){let i=this.fragment.to;for(;i>0&&this.input.read(i-1,i)!=` `;)i--;this.fragmentEnd=i?i-1:0}let a=this.cursor;a||(a=this.cursor=this.fragment.tree.cursor(),a.firstChild());let r=e+this.fragment.offset;for(;a.to<=r;)if(!a.parent())return!1;for(;;){if(a.from>=r)return this.fragment.from<=n;if(!a.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Ga.contextHash)==e}takeNodes(e){let n=this.cursor,a=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,o=i,s=e.block.children.length,l=o,u=s;for(;;){if(n.to-a>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let d=GNe(n.from-a,e.ranges);if(n.to-a<=e.ranges[e.rangeI].to)e.addNode(n.tree,d);else{let p=new yr(e.parser.nodeSet.types[Bn.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,n.tree),e.addNode(p,d)}if(n.type.is("Block")&&(ITt.indexOf(n.type.id)<0?(o=n.to-a,s=e.block.children.length):(o=l,s=u,l=n.to-a,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return o-i}};function GNe(t,e){let n=t;for(let a=1;ajT[t]),Object.keys(jT).map(t=>PNe[t]),Object.keys(jT),_Tt,_Ne,Object.keys(CG).map(t=>CG[t]),Object.keys(CG),[]);function PTt(t,e,n){let a=[];for(let r=t.firstChild,i=e;;r=r.nextSibling){let o=r?r.from:n;if(o>i&&a.push({from:i,to:o}),!r)break;i=r.to}return a}function FTt(t){let{codeParser:e,htmlParser:n}=t;return{wrap:wg((r,i)=>{let o=r.type.id;if(e&&(o==Bn.CodeBlock||o==Bn.FencedCode)){let s="";if(o==Bn.FencedCode){let u=r.node.getChild(Bn.CodeInfo);u&&(s=i.read(u.from,u.to))}let l=e(s);if(l)return{parser:l,overlay:u=>u.type.id==Bn.CodeText}}else if(n&&(o==Bn.HTMLBlock||o==Bn.HTMLTag))return{parser:n,overlay:PTt(r.node,r.from,r.to)};return null})}}const RTt={resolve:"Strikethrough",mark:"StrikethroughMark"},LTt={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":K.strikethrough}},{name:"StrikethroughMark",style:K.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let a=t.slice(n-1,n),r=t.slice(n+2,n+3),i=/\s|^$/.test(a),o=/\s|^$/.test(r),s=cD.test(a),l=cD.test(r);return t.addDelimiter(RTt,n,n+2,!o&&(!l||i||s),!i&&(!s||o||l))},after:"Emphasis"}]};function PI(t,e,n=0,a,r=0){let i=0,o=!0,s=-1,l=-1,u=!1,d=()=>{a.push(t.elt("TableCell",r+s,r+l,t.parser.parseInline(e.slice(s,l),r+s)))};for(let p=n;p-1)&&i++,o=!1,a&&(s>-1&&d(),a.push(t.elt("TableDelimiter",p+r,p+r+1))),s=l=-1):(u||A!=32&&A!=9)&&(s<0&&(s=p),l=p+1),u=!u&&A==92}return s>-1&&(i++,a&&d()),i}function Cye(t,e){for(let n=e;nr instanceof _ye)||!Cye(e.text,e.basePos))return!1;let a=t.scanLine(t.absoluteLineEnd+1).text;return HNe.test(a)&&PI(t,e.text,e.basePos)==PI(t,a,e.basePos)},before:"SetextHeading"}]};class MTt{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const zTt={defineNodes:[{name:"Task",block:!0,style:K.list},{name:"TaskMarker",style:K.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new MTt:null},after:"SetextHeading"}]},Bye=/(www\.)|(https?:\/\/)|([\w.+-]{,100}@)|(mailto:|xmpp:)/gy,Eye=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,qTt=/[\w-]+\.[\w-]+($|\/)/,Qye=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Sye=/\/[a-zA-Z\d@.]+/gy;function Iye(t,e,n,a){let r=0;for(let i=e;i-1)return-1;let a=e+n[0].length;for(;;){let r=t[a-1],i;if(/[?!.,:*_~]/.test(r)||r==")"&&Iye(t,e,a,")")>Iye(t,e,a,"("))a--;else if(r==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,a))))a=e+i.index;else break}return a}function Dye(t,e){Qye.lastIndex=e;let n=Qye.exec(t);if(!n)return-1;let a=n[0][n[0].length-1];return a=="_"||a=="-"?-1:e+n[0].length-(a=="."?1:0)}const UTt={parseInline:[{name:"Autolink",parse(t,e,n){let a=n-t.offset;if(a&&/\w/.test(t.text[a-1]))return-1;Bye.lastIndex=a;let r=Bye.exec(t.text),i=-1;if(!r)return-1;if(r[1]||r[2]){if(i=jTt(t.text,a+r[0].length),i>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(a,i));i=a+o[0].length}}else r[3]?i=Dye(t.text,a):(i=Dye(t.text,a+r[0].length),i>-1&&r[0]=="xmpp:"&&(Sye.lastIndex=i,r=Sye.exec(t.text),r&&(i=r.index+r[0].length)));return i<0?-1:(t.addElement(t.elt("URL",n,i+t.offset)),i+t.offset)}}]},GTt=[NTt,zTt,LTt,UTt];function WNe(t,e,n){return(a,r,i)=>{if(r!=t||a.char(i+1)==t)return-1;let o=[a.elt(n,i,i+1)];for(let s=i+1;sn%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,a=0){let r=e.parser.context;return new vL(e,[],n,a,a,0,[],0,r?new Tye(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let a=e>>19,r=e&65535,{parser:i}=this.p,o=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(r,u)}storeNode(e,n,a,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[s-4]==0&&o.buffer[s-1]>-1){if(n==a)return;if(o.buffer[s-2]>=n){o.buffer[s-2]=a;return}}}if(!i||this.pos==a)this.buffer.push(e,n,a,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let s=!1;for(let l=o;l>0&&this.buffer[l-2]>a;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;o>0&&this.buffer[o-2]>a;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=a,this.buffer[o+3]=r}}shift(e,n,a,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,a),n<=this.p.parser.maxNode&&this.buffer.push(n,a,r,4);else{let i=e,{parser:o}=this.p;(r>this.pos||n<=o.maxNode)&&(this.pos=r,o.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,a),this.shiftContext(n,a),n<=o.maxNode&&this.buffer.push(n,a,r,4)}}apply(e,n,a,r){e&65536?this.reduce(e):this.shift(e,n,a,r)}useNode(e,n){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=e)&&(this.p.reused.push(e),a++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(a,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let a=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new vL(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let a=e<=this.p.parser.maxNode;a&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,a?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new XTt(this);;){let a=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(a==0)return!1;if(!(a&65536))return!0;n.reduce(a)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let i=0,o;il&1&&s==o)||r.push(n[i],o)}n=r}let a=[];for(let r=0;r>19,r=n&65535,i=this.stack.length-a*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],a=(r,i)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let s=(o>>19)-i;if(s>1){let l=o&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=a(o,i+1);if(s!=null)return s}})};return a(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Tye{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class XTt{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,a=e>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class kL{constructor(e,n,a){this.stack=e,this.pos=n,this.index=a,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new kL(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new kL(this.stack,this.pos,this.index)}}function iS(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let a=0,r=0;a=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,s=!0),i+=l,s)break;i*=46}n?n[r++]=i:n=new e(i)}return n}class kF{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Pye=new kF;class VTt{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Pye,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let a=this.range,r=this.rangeIndex,i=this.pos+e;for(;ia.to:i>=a.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];i+=o.from-a.to,a=o}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,a,r;if(n>=0&&n=this.chunk2Pos&&as.to&&(this.chunk2=this.chunk2.slice(0,s.to-a)),r=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),r}acceptToken(e,n=0){let a=n?this.resolveOffset(n,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Pye,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let a="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(a+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return a}}class __{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:a}=n.p;YNe(this.data,e,n,this.id,a.data,a.tokenPrecTable)}}__.prototype.contextual=__.prototype.fallback=__.prototype.extend=!1;class Vm{constructor(e,n,a){this.precTable=n,this.elseToken=a,this.data=typeof e=="string"?iS(e):e}token(e,n){let a=e.pos,r=0;for(;;){let i=e.next<0,o=e.resolveOffset(1,1);if(YNe(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(i||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(a,e.token),e.acceptToken(this.elseToken,r))}}Vm.prototype.contextual=__.prototype.fallback=__.prototype.extend=!1;class ja{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function YNe(t,e,n,a,r,i){let o=0,s=1<0){let g=t[m];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||ZTt(g,e.token.value,r,i))){e.acceptToken(g);break}}let d=e.next,p=0,A=t[o+2];if(e.next<0&&A>p&&t[u+A*3-3]==65535){o=t[u+A*3-1];continue e}for(;p>1,g=u+m+(m<<1),h=t[g],f=t[g+1]||65536;if(d=f)p=m+1;else{o=t[g+2],e.advance();continue e}}break}}function Fye(t,e,n){for(let a=e,r;(r=t[a])!=65535;a++)if(r==n)return a-e;return-1}function ZTt(t,e,n,a){let r=Fye(n,a,e);return r<0||Fye(n,a,t)e)&&!a.type.isError)return n<0?Math.max(0,Math.min(a.to-1,e-25)):Math.min(t.length,Math.max(a.from+1,e+25));if(n<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return n<0?0:t.length}}class KTt{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Rye(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Rye(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(i instanceof yr){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+i.length}}}class JTt{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(a=>new kF)}getActions(e){let n=0,a=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;up.end+25&&(l=Math.max(p.lookAhead,l)),p.value!=0)){let A=n;if(p.extended>-1&&(n=this.addActions(e,p.extended,p.end,n)),n=this.addActions(e,p.value,p.end,n),!d.extend&&(a=p,n>A))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!a&&e.pos==this.stream.end&&(a=new kF,a.value=e.p.parser.eofTerm,a.start=a.end=e.pos,n=this.addActions(e,a.value,a.end,n)),this.mainToken=a,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new kF,{pos:a,p:r}=e;return n.start=a,n.end=Math.min(a+1,r.stream.end),n.value=a==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,a){let r=this.stream.clipPos(a.pos);if(n.token(this.stream.reset(r,e),a),e.value>-1){let{parser:i}=a.p;for(let o=0;o=0&&a.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,a,r){for(let i=0;ie.bufferLength*4?new KTt(a,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,a=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;on)a.push(s);else{if(this.advanceStack(s,a,e))continue;{r||(r=[],i=[]),r.push(s);let l=this.tokens.getMainToken(s);i.push(l.value,l.end)}}break}}if(!a.length){let o=r&&n8t(r);if(o)return cp&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw cp&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,a);if(o)return cp&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(a.length>o)for(a.sort((s,l)=>l.score-s.score);a.length>o;)a.pop();a.some(s=>s.reducePos>n)&&this.recovering--}else if(a.length>1){e:for(let o=0;o500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)a.splice(l--,1);else{a.splice(o--,1);continue e}}}a.length>12&&a.splice(12,a.length-12)}this.minStackPos=a[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,d=u?e.curContext.hash:0;for(let p=this.fragments.nodeAt(r);p;){let A=this.parser.nodeSet.types[p.type.id]==p.type?i.getGoto(e.state,p.type.id):-1;if(A>-1&&p.length&&(!u||(p.prop(Ga.contextHash)||0)==d))return e.useNode(p,A),cp&&console.log(o+this.stackID(e)+` (via reuse of ${i.getName(p.type.id)})`),!0;if(!(p instanceof yr)||p.children.length==0||p.positions[0]>0)break;let m=p.children[0];if(m instanceof yr&&p.positions[0]==0)p=m;else break}}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),cp&&console.log(o+this.stackID(e)+` (via always-reduce ${i.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ur?n.push(g):a.push(g)}return!1}advanceFully(e,n){let a=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>a)return Lye(e,n),!0}}runRecovery(e,n,a){let r=null,i=!1;for(let o=0;o ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),cp&&console.log(d+this.stackID(s)+" (restarted)"),this.advanceFully(s,a))))continue;let p=s.split(),A=d;for(let m=0;p.forceReduce()&&m<10&&(cp&&console.log(A+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,a));m++)cp&&(A=this.stackID(p)+" -> ");for(let m of s.recoverByInsert(l))cp&&console.log(d+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,a);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),cp&&console.log(d+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Lye(s,a)):(!r||r.scoret;class $x{constructor(e){this.start=e.start,this.shift=e.shift||BG,this.reduce=e.reduce||BG,this.reuse=e.reuse||BG,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Uo extends FM{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),r=[];for(let s=0;s=0)i(d,l,s[u++]);else{let p=s[u+-d];for(let A=-d;A>0;A--)i(s[u++],l,p);u++}}}this.nodeSet=new pE(n.map((s,l)=>nc.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:r[l],top:a.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=JRe;let o=iS(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new __(o,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,a){let r=new e8t(this,e,n,a);for(let i of this.wrappers)r=i(r,e,n,a);return r}getGoto(e,n,a=!1){let r=this.goto;if(n>=r[0])return-1;for(let i=r[n+1];;){let o=r[i++],s=o&1,l=r[i++];if(s&&a)return l;for(let u=i+(o>>1);i0}validAction(e,n){return!!this.allActions(e,a=>a==n?!0:null)}allActions(e,n){let a=this.stateSlot(e,4),r=a?n(a):void 0;for(let i=this.stateSlot(e,1);r==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=cb(this.data,i+2);else break;r=n(cb(this.data,i+1))}return r}nextStates(e){let n=[];for(let a=this.stateSlot(e,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=cb(this.data,a+2);else break;if(!(this.data[a+2]&1)){let r=this.data[a+1];n.some((i,o)=>o&1&&i==r)||n.push(this.data[a],r)}}return n}configure(e){let n=Object.assign(Object.create(Uo.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let a=this.topRules[e.top];if(!a)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=a}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(a=>{let r=e.tokenizers.find(i=>i.from==a);return r?r.to:a})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((a,r)=>{let i=e.specializers.find(s=>s.from==a.external);if(!i)return a;let o=Object.assign(Object.assign({},a),{external:i.to});return n.specializers[r]=Nye(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),a=n.map(()=>!1);if(e)for(let i of e.split(" ")){let o=n.indexOf(i);o>=0&&(a[o]=!0)}let r=null;for(let i=0;ia)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,a)<<1|e}return t.get}const a8t=54,r8t=1,i8t=55,o8t=2,s8t=56,c8t=3,Mye=4,l8t=5,xL=6,XNe=7,VNe=8,ZNe=9,KNe=10,u8t=11,d8t=12,p8t=13,EG=57,A8t=14,zye=58,JNe=20,m8t=22,eMe=23,g8t=24,LJ=26,tMe=27,h8t=28,f8t=31,b8t=34,y8t=36,w8t=37,v8t=0,k8t=1,x8t={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},O8t={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},qye={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function C8t(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function nMe(t){return t==9||t==10||t==13||t==32}let jye=null,Uye=null,Gye=0;function NJ(t,e){let n=t.pos+e;if(Gye==n&&Uye==t)return jye;let a=t.peek(e);for(;nMe(a);)a=t.peek(++e);let r="";for(;C8t(a);)r+=String.fromCharCode(a),a=t.peek(++e);return Uye=t,Gye=n,jye=r?r.toLowerCase():a==_8t||a==B8t?void 0:null}const aMe=60,OL=62,Vse=47,_8t=63,B8t=33,E8t=45;function Hye(t,e){this.name=t,this.parent=e}const Q8t=[xL,KNe,XNe,VNe,ZNe],S8t=new $x({start:null,shift(t,e,n,a){return Q8t.indexOf(e)>-1?new Hye(NJ(a,1)||"",t):t},reduce(t,e){return e==JNe&&t?t.parent:t},reuse(t,e,n,a){let r=e.type.id;return r==xL||r==y8t?new Hye(NJ(a,1)||"",t):t},strict:!1}),I8t=new ja((t,e)=>{if(t.next!=aMe){t.next<0&&e.context&&t.acceptToken(EG);return}t.advance();let n=t.next==Vse;n&&t.advance();let a=NJ(t,0);if(a===void 0)return;if(!a)return t.acceptToken(n?A8t:xL);let r=e.context?e.context.name:null;if(n){if(a==r)return t.acceptToken(u8t);if(r&&O8t[r])return t.acceptToken(EG,-2);if(e.dialectEnabled(v8t))return t.acceptToken(d8t);for(let i=e.context;i;i=i.parent)if(i.name==a)return;t.acceptToken(p8t)}else{if(a=="script")return t.acceptToken(XNe);if(a=="style")return t.acceptToken(VNe);if(a=="textarea")return t.acceptToken(ZNe);if(x8t.hasOwnProperty(a))return t.acceptToken(KNe);r&&qye[r]&&qye[r][a]?t.acceptToken(EG,-1):t.acceptToken(xL)}},{contextual:!0}),D8t=new ja(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(zye);break}if(t.next==E8t)e++;else if(t.next==OL&&e>=2){n>=3&&t.acceptToken(zye,-2);break}else e=0;t.advance()}});function $8t(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const T8t=new ja((t,e)=>{if(t.next==Vse&&t.peek(1)==OL){let n=e.dialectEnabled(k8t)||$8t(e.context);t.acceptToken(n?l8t:Mye,2)}else t.next==OL&&t.acceptToken(Mye,1)});function Zse(t,e,n){let a=2+t.length;return new ja(r=>{for(let i=0,o=0,s=0;;s++){if(r.next<0){s&&r.acceptToken(e);break}if(i==0&&r.next==aMe||i==1&&r.next==Vse||i>=2&&io?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&s){r.acceptToken(e,1);break}else i=o=0;r.advance()}})}const P8t=Zse("script",a8t,r8t),F8t=Zse("style",i8t,o8t),R8t=Zse("textarea",s8t,c8t),L8t=Go({"Text RawText":K.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":K.angleBracket,TagName:K.tagName,"MismatchedCloseTag/TagName":[K.tagName,K.invalid],AttributeName:K.attributeName,"AttributeValue UnquotedAttributeValue":K.attributeValue,Is:K.definitionOperator,"EntityReference CharacterReference":K.character,Comment:K.blockComment,ProcessingInst:K.processingInstruction,DoctypeDecl:K.documentMeta}),N8t=Uo.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:S8t,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[L8t],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=s.type.id;if(u==h8t)return QG(s,l,n);if(u==f8t)return QG(s,l,a);if(u==b8t)return QG(s,l,r);if(u==JNe&&i.length){let d=s.node,p=d.firstChild,A=p&&Wye(p,l),m;if(A){for(let g of i)if(g.tag==A&&(!g.attrs||g.attrs(m||(m=rMe(p,l))))){let h=d.lastChild,f=h.type.id==w8t?h.from:d.to;if(f>p.to)return{parser:g.parser,overlay:[{from:p.to,to:f}]}}}}if(o&&u==eMe){let d=s.node,p;if(p=d.firstChild){let A=o[l.read(p.from,p.to)];if(A)for(let m of A){if(m.tagName&&m.tagName!=Wye(d.parent,l))continue;let g=d.lastChild;if(g.type.id==LJ){let h=g.from+1,f=g.lastChild,b=g.to-(f&&f.isError?0:1);if(b>h)return{parser:m.parser,overlay:[{from:h,to:b}]}}else if(g.type.id==tMe)return{parser:m.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const M8t=99,Yye=1,z8t=100,q8t=101,Xye=2,oMe=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],j8t=58,U8t=40,sMe=95,G8t=91,xF=45,H8t=46,W8t=35,Y8t=37,X8t=38,V8t=92,Z8t=10;function lD(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function cMe(t){return t>=48&&t<=57}const K8t=new ja((t,e)=>{for(let n=!1,a=0,r=0;;r++){let{next:i}=t;if(lD(i)||i==xF||i==sMe||n&&cMe(i))!n&&(i!=xF||r>0)&&(n=!0),a===r&&i==xF&&a++,t.advance();else if(i==V8t&&t.peek(1)!=Z8t)t.advance(),t.next>-1&&t.advance(),n=!0;else{n&&t.acceptToken(i==U8t?z8t:a==2&&e.canShift(Xye)?Xye:q8t);break}}}),J8t=new ja(t=>{if(oMe.includes(t.peek(-1))){let{next:e}=t;(lD(e)||e==sMe||e==W8t||e==H8t||e==G8t||e==j8t&&lD(t.peek(1))||e==xF||e==X8t)&&t.acceptToken(M8t)}}),ePt=new ja(t=>{if(!oMe.includes(t.peek(-1))){let{next:e}=t;if(e==Y8t&&(t.advance(),t.acceptToken(Yye)),lD(e)){do t.advance();while(lD(t.next)||cMe(t.next));t.acceptToken(Yye)}}}),tPt=Go({"AtKeyword import charset namespace keyframes media supports":K.definitionKeyword,"from to selector":K.keyword,NamespaceName:K.namespace,KeyframeName:K.labelName,KeyframeRangeName:K.operatorKeyword,TagName:K.tagName,ClassName:K.className,PseudoClassName:K.constant(K.className),IdName:K.labelName,"FeatureName PropertyName":K.propertyName,AttributeName:K.attributeName,NumberLiteral:K.number,KeywordQuery:K.keyword,UnaryQueryOp:K.operatorKeyword,"CallTag ValueName":K.atom,VariableName:K.variableName,Callee:K.operatorKeyword,Unit:K.unit,"UniversalSelector NestingSelector":K.definitionOperator,MatchOp:K.compareOperator,"ChildOp SiblingOp, LogicOp":K.logicOperator,BinOp:K.arithmeticOperator,Important:K.modifier,Comment:K.blockComment,ColorLiteral:K.color,"ParenthesizedContent StringLiteral":K.string,":":K.punctuation,"PseudoOp #":K.derefOperator,"; ,":K.separator,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace}),nPt={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},aPt={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},rPt={__proto__:null,not:132,only:132},iPt=Uo.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO-kQdO,59}O-{Q[O'#E^O.YQWO,5;_O.YQWO,5;_POOO'#EV'#EVP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/iQ`O1G/^O0SQXO1G/aO0jQXO1G/cO1QQXO1G/dO1hQWO,59|O1mQ[O'#DSO1tQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1{QpO,59]OOQS,59_,59_O${QdO,59aO2TQWO1G/mOOQS,59c,59cO2YQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2eQ[O,59jOOQS,59j,59jO2mQWO'#DjO2xQWO,5:VO2}QWO,5:]O&`Q[O,5:XO&`Q[O'#E_O3VQWO,5;`O3bQWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3sQWO1G0OO3xQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO4TQtO1G/iOOQO1G/i1G/iOOQO,5:x,5:xO4kQ[O,5:xOOQO-E8[-E8[O4xQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO5TQXO'#ErO5[QWO,59nO5aQtO'#EXO6XQdO'#EoO6cQWO,59ZO6hQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XOOQS1G/P1G/PO6pQWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6uQWO,5:yOOQO-E8]-E8]O7TQXO1G/xOOQS7+%j7+%jO7[QYO'#CsOOQO'#EQ'#EQO7gQ`O'#EPOOQO'#EP'#EPO7rQWO'#E`O7zQdO,5:jOOQS,5:j,5:jO8VQtO'#E]O${QdO'#E]O9WQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9kQpO<OAN>OO;]QdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[J8t,ePt,K8t,1,2,3,4,new Vm("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>nPt[t]||-1},{term:58,get:t=>aPt[t]||-1},{term:101,get:t=>rPt[t]||-1}],tokenPrec:1219});let SG=null;function IG(){if(!SG&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let a in t)a!="cssText"&&a!="cssFloat"&&typeof t[a]=="string"&&(/[A-Z]/.test(a)&&(a=a.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(a)||(e.push(a),n.add(a)));SG=e.sort().map(a=>({type:"property",label:a,apply:a+": "}))}return SG||[]}const Vye=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Zye=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),oPt=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),sPt=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),Ef=/^(\w[\w-]*|-\w[\w-]*|)$/,cPt=/^-(-[\w-]*)?$/;function lPt(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let a=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return a?.name!="Callee"?!1:e.sliceString(a.from,a.to)=="var"}const Kye=new PM,uPt=["Declaration"];function dPt(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function lMe(t,e,n){if(e.to-e.from>4096){let a=Kye.get(e);if(a)return a;let r=[],i=new Set,o=e.cursor(Di.IncludeAnonymous);if(o.firstChild())do for(let s of lMe(t,o.node,n))i.has(s.label)||(i.add(s.label),r.push(s));while(o.nextSibling());return Kye.set(e,r),r}else{let a=[],r=new Set;return e.cursor().iterate(i=>{var o;if(n(i)&&i.matchContext(uPt)&&((o=i.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let s=t.sliceString(i.from,i.to);r.has(s)||(r.add(s),a.push({label:s,type:"variable"}))}}),a}}const YM=t=>e=>{let{state:n,pos:a}=e,r=Ar(n).resolveInner(a,-1),i=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(i||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:IG(),validFor:Ef};if(r.name=="ValueName")return{from:r.from,options:Zye,validFor:Ef};if(r.name=="PseudoClassName")return{from:r.from,options:Vye,validFor:Ef};if(t(r)||(e.explicit||i)&&lPt(r,n.doc))return{from:t(r)||i?r.from:a,options:lMe(n.doc,dPt(r),t),validFor:cPt};if(r.name=="TagName"){for(let{parent:l}=r;l;l=l.parent)if(l.name=="Block")return{from:r.from,options:IG(),validFor:Ef};return{from:r.from,options:oPt,validFor:Ef}}if(r.name=="AtKeyword")return{from:r.from,options:sPt,validFor:Ef};if(!e.explicit)return null;let o=r.resolve(a),s=o.childBefore(a);return s&&s.name==":"&&o.name=="PseudoClassSelector"?{from:a,options:Vye,validFor:Ef}:s&&s.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:a,options:Zye,validFor:Ef}:o.name=="Block"||o.name=="Styles"?{from:a,options:IG(),validFor:Ef}:null},uMe=YM(t=>t.name=="VariableName"),uD=jo.define({name:"css",parser:iPt.configure({props:[Qs.add({Declaration:rs()}),Ss.add({"Block KeyframeList":Wp})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function dMe(){return new _o(uD,uD.data.of({autocomplete:uMe}))}const pPt=Object.freeze(Object.defineProperty({__proto__:null,css:dMe,cssCompletionSource:uMe,cssLanguage:uD,defineCSSCompletionSource:YM},Symbol.toStringTag,{value:"Module"})),APt=314,mPt=315,Jye=1,gPt=2,hPt=3,fPt=4,bPt=316,yPt=318,wPt=319,vPt=5,kPt=6,xPt=0,MJ=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],pMe=125,OPt=59,zJ=47,CPt=42,_Pt=43,BPt=45,EPt=60,QPt=44,SPt=63,IPt=46,DPt=91,$Pt=new $x({start:!1,shift(t,e){return e==vPt||e==kPt||e==yPt?t:e==wPt},strict:!1}),TPt=new ja((t,e)=>{let{next:n}=t;(n==pMe||n==-1||e.context)&&t.acceptToken(bPt)},{contextual:!0,fallback:!0}),PPt=new ja((t,e)=>{let{next:n}=t,a;MJ.indexOf(n)>-1||n==zJ&&((a=t.peek(1))==zJ||a==CPt)||n!=pMe&&n!=OPt&&n!=-1&&!e.context&&t.acceptToken(APt)},{contextual:!0}),FPt=new ja((t,e)=>{t.next==DPt&&!e.context&&t.acceptToken(mPt)},{contextual:!0}),RPt=new ja((t,e)=>{let{next:n}=t;if(n==_Pt||n==BPt){if(t.advance(),n==t.next){t.advance();let a=!e.context&&e.canShift(Jye);t.acceptToken(a?Jye:gPt)}}else n==SPt&&t.peek(1)==IPt&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(hPt))},{contextual:!0});function DG(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const LPt=new ja((t,e)=>{if(t.next!=EPt||!e.dialectEnabled(xPt)||(t.advance(),t.next==zJ))return;let n=0;for(;MJ.indexOf(t.next)>-1;)t.advance(),n++;if(DG(t.next,!0)){for(t.advance(),n++;DG(t.next,!1);)t.advance(),n++;for(;MJ.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==QPt)return;for(let a=0;;a++){if(a==7){if(!DG(t.next,!0))return;break}if(t.next!="extends".charCodeAt(a))break;t.advance(),n++}}t.acceptToken(fPt,-n)}),NPt=Go({"get set async static":K.modifier,"for while do if else switch try catch finally return throw break continue default case":K.controlKeyword,"in of await yield void typeof delete instanceof":K.operatorKeyword,"let var const using function class extends":K.definitionKeyword,"import export from":K.moduleKeyword,"with debugger as new":K.keyword,TemplateString:K.special(K.string),super:K.atom,BooleanLiteral:K.bool,this:K.self,null:K.null,Star:K.modifier,VariableName:K.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":K.function(K.variableName),VariableDefinition:K.definition(K.variableName),Label:K.labelName,PropertyName:K.propertyName,PrivatePropertyName:K.special(K.propertyName),"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),"FunctionDeclaration/VariableDefinition":K.function(K.definition(K.variableName)),"ClassDeclaration/VariableDefinition":K.definition(K.className),"NewExpression/VariableName":K.className,PropertyDefinition:K.definition(K.propertyName),PrivatePropertyDefinition:K.definition(K.special(K.propertyName)),UpdateOp:K.updateOperator,"LineComment Hashbang":K.lineComment,BlockComment:K.blockComment,Number:K.number,String:K.string,Escape:K.escape,ArithOp:K.arithmeticOperator,LogicOp:K.logicOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,RegExp:K.regexp,Equals:K.definitionOperator,Arrow:K.function(K.punctuation),": Spread":K.punctuation,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,"InterpolationStart InterpolationEnd":K.special(K.brace),".":K.derefOperator,", ;":K.separator,"@":K.meta,TypeName:K.typeName,TypeDefinition:K.definition(K.typeName),"type enum interface implements namespace module declare":K.definitionKeyword,"abstract global Privacy readonly override":K.modifier,"is keyof unique infer asserts":K.operatorKeyword,JSXAttributeValue:K.attributeValue,JSXText:K.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":K.angleBracket,"JSXIdentifier JSXNameSpacedName":K.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":K.attributeName,"JSXBuiltin/JSXIdentifier":K.standard(K.tagName)}),MPt={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},zPt={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},qPt={__proto__:null,"<":189},jPt=Uo.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#GzO;zQ`O'#G{O;zQ`O'#G}O9aQ`O'#HQOYQ`O'#CeO>jQ`O'#HaO>rQ`O'#HgO>rQ`O'#HiO`QlO'#HkO>rQ`O'#HmO>rQ`O'#HpO>wQ`O'#HvO>|Q!0LsO'#H|O%[QlO'#IOO?XQ!0LsO'#IQO?dQ!0LsO'#ISO9kQ!0LrO'#IUO?oQ!0MxO'#CiO@qQpO'#DjQOQ`OOO%[QlO'#EOOAXQ`O'#ERO:YQMhO'#ElOAdQ`O'#ElOAoQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Do'#DoOOQ!0Lb'#Jt'#JtO%[QlO'#JtOOQO'#Jw'#JwOOQO'#If'#IfOBoQpO'#EeOOQ!0Lb'#Ed'#EdOOQ!0Lb'#J{'#J{OCkQ!0MSO'#EeOCuQpO'#EUOOQO'#Jv'#JvODZQpO'#JwOEhQpO'#EUOCuQpO'#EePEuO&2DjO'#CbPOOO)CD{)CD{OOOO'#I^'#I^OFQO#tO,59UOOQ!0Lh,59U,59UOOOO'#I_'#I_OF`O&jO,59UOFnQ!L^O'#DaOOOO'#Ia'#IaOFuO#@ItO,59yOOQ!0Lf,59y,59yOGTQlO'#IbOGhQ`O'#JrOIgQ!fO'#JrO+}QlO'#JrOInQ`O,5:POJUQ`O'#EnOJcQ`O'#KROJnQ`O'#KQOJnQ`O'#KQOJvQ`O,5;[OJ{Q`O'#KPOOQ!0Ln,5:[,5:[OKSQlO,5:[OMQQ!0MxO,5:dOMqQ`O,5:lON[Q!0LrO'#KOONcQ`O'#J}O9ZQ`O'#J}ONwQ`O'#J}O! PQ`O,5;ZO! UQ`O'#J}O!#ZQ!fO'#JqOOQ!0Lh'#Ci'#CiO%[QlO'#EQO!#yQ!fO,5:qOOQS'#Jx'#JxOOQO-ErOOQ['#Jf'#JfOOQ[,5>s,5>sOOQ[-EbQ!0MxO,5:hO%[QlO,5:hO!@xQ!0MxO,5:jOOQO,5@x,5@xO!AiQMhO,5=^O!AwQ!0LrO'#JgO9UQ`O'#JgO!BYQ!0LrO,59ZO!BeQpO,59ZO!BmQMhO,59ZO:YQMhO,59ZO!BxQ`O,5;XO!CQQ`O'#H`O!CfQ`O'#KbO%[QlO,5;|O!9lQpO,5wQ`O'#HVO9aQ`O'#HXO!D}Q`O'#HXO:YQMhO'#HZO!ESQ`O'#HZOOQ[,5=o,5=oO!EXQ`O'#H[O!EjQ`O'#CoO!EoQ`O,59PO!EyQ`O,59PO!HOQlO,59POOQ[,59P,59PO!H`Q!0LrO,59PO%[QlO,59PO!JkQlO'#HcOOQ['#Hd'#HdOOQ['#He'#HeO`QlO,5={O!KRQ`O,5={O`QlO,5>RO`QlO,5>TO!KWQ`O,5>VO`QlO,5>XO!K]Q`O,5>[O!KbQlO,5>bOOQ[,5>h,5>hO%[QlO,5>hO9kQ!0LrO,5>jOOQ[,5>l,5>lO# lQ`O,5>lOOQ[,5>n,5>nO# lQ`O,5>nOOQ[,5>p,5>pO#!YQpO'#D]O%[QlO'#JtO#!{QpO'#JtO##VQpO'#DkO##hQpO'#DkO#%yQlO'#DkO#&QQ`O'#JsO#&YQ`O,5:UO#&_Q`O'#ErO#&mQ`O'#KSO#&uQ`O,5;]O#&zQpO'#DkO#'XQpO'#ETOOQ!0Lf,5:m,5:mO%[QlO,5:mO#'`Q`O,5:mO>wQ`O,5;WO!BeQpO,5;WO!BmQMhO,5;WO:YQMhO,5;WO#'hQ`O,5@`O#'mQ07dO,5:qOOQO-E|O+}QlO,5>|OOQO,5?S,5?SO#*uQlO'#IbOOQO-E<`-E<`O#+SQ`O,5@^O#+[Q!fO,5@^O#+cQ`O,5@lOOQ!0Lf1G/k1G/kO%[QlO,5@mO#+kQ`O'#IhOOQO-ErQ`O1G3qO$4rQlO1G3sO$8vQlO'#HrOOQ[1G3v1G3vO$9TQ`O'#HxO>wQ`O'#HzOOQ[1G3|1G3|O$9]QlO1G3|O9kQ!0LrO1G4SOOQ[1G4U1G4UOOQ!0Lb'#G^'#G^O9kQ!0LrO1G4WO9kQ!0LrO1G4YO$=dQ`O,5@`O!(yQlO,5;^O9ZQ`O,5;^O>wQ`O,5:VO!(yQlO,5:VO!BeQpO,5:VO$=iQ?MtO,5:VOOQO,5;^,5;^O$=sQpO'#IcO$>ZQ`O,5@_OOQ!0Lf1G/p1G/pO$>cQpO'#IiO$>mQ`O,5@nOOQ!0Lb1G0w1G0wO##hQpO,5:VOOQO'#Ie'#IeO$>uQpO,5:oOOQ!0Ln,5:o,5:oO#'cQ`O1G0XOOQ!0Lf1G0X1G0XO%[QlO1G0XOOQ!0Lf1G0r1G0rO>wQ`O1G0rO!BeQpO1G0rO!BmQMhO1G0rOOQ!0Lb1G5z1G5zO!BYQ!0LrO1G0[OOQO1G0k1G0kO%[QlO1G0kO$>|Q!0LrO1G0kO$?XQ!0LrO1G0kO!BeQpO1G0[OCuQpO1G0[O$?gQ!0LrO1G0kOOQO1G0[1G0[O$?{Q!0MxO1G0kPOOO-E|O$@iQ`O1G5xO$@qQ`O1G6WO$@yQ!fO1G6XO9ZQ`O,5?SO$ATQ!0MxO1G6UO%[QlO1G6UO$AeQ!0LrO1G6UO$AvQ`O1G6TO$AvQ`O1G6TO9ZQ`O1G6TO$BOQ`O,5?VO9ZQ`O,5?VOOQO,5?V,5?VO$BdQ`O,5?VO$)iQ`O,5?VOOQO-E^OOQ[,5>^,5>^O%[QlO'#HsO%=zQ`O'#HuOOQ[,5>d,5>dO9ZQ`O,5>dOOQ[,5>f,5>fOOQ[7+)h7+)hOOQ[7+)n7+)nOOQ[7+)r7+)rOOQ[7+)t7+)tO%>PQpO1G5zO%>kQ?MtO1G0xO%>uQ`O1G0xOOQO1G/q1G/qO%?QQ?MtO1G/qO>wQ`O1G/qO!(yQlO'#DkOOQO,5>},5>}OOQO-EwQ`O7+&^O!BeQpO7+&^OOQO7+%v7+%vO$?{Q!0MxO7+&VOOQO7+&V7+&VO%[QlO7+&VO%?[Q!0LrO7+&VO!BYQ!0LrO7+%vO!BeQpO7+%vO%?gQ!0LrO7+&VO%?uQ!0MxO7++pO%[QlO7++pO%@VQ`O7++oO%@VQ`O7++oOOQO1G4q1G4qO9ZQ`O1G4qO%@_Q`O1G4qOOQS7+%{7+%{O#'cQ`O<_OOQ[,5>a,5>aO&=aQ`O1G4OO9ZQ`O7+&dO!(yQlO7+&dOOQO7+%]7+%]O&=fQ?MtO1G6XO>wQ`O7+%]OOQ!0Lf<wQ`O<]Q`O<= ZOOQO7+*]7+*]O9ZQ`O7+*]OOQ[ANAjANAjO&>eQ!fOANAjO!&iQMhOANAjO#'cQ`OANAjO4UQ!fOANAjO&>lQ`OANAjO%[QlOANAjO&>tQ!0MzO7+'yO&AVQ!0MzO,5?_O&CbQ!0MzO,5?aO&EmQ!0MzO7+'{O&HOQ!fO1G4jO&HYQ?MtO7+&_O&J^Q?MvO,5=WO&LeQ?MvO,5=YO&LuQ?MvO,5=WO&MVQ?MvO,5=YO&MgQ?MvO,59sO' mQ?MvO,5wQ`O7+)jO'-]Q`O<|AN>|O%[QlOAN?]OOQO<PPPP!>XHwPPPPPPPPPP!AhP!BuPPHw!DWPHwPHwHwHwHwHwPHw!EjP!HtP!KzP!LO!LY!L^!L^P!HqP!Lb!LbP# hP# lHwPHw# r#$wCV@yP@yP@y@yP#&U@y@y#(h@y#+`@y#-l@y@y#.[#0p#0p#0u#1O#0p#1ZPP#0pP@y#1s@y#5r@y@y6aPPP#9wPPP#:b#:bP#:bP#:x#:bPP#;OP#:uP#:u#;c#:u#;}#R#>X#>c#>i#>s#>y#?Z#?a#@R#@e#@k#@q#AP#Af#CZ#Ci#Cp#E[#Ej#G[#Gj#Gp#Gv#G|#HW#H^#Hd#Hn#IQ#IWPPPPPPPPPPP#I^PPPPPPP#JR#MY#Nr#Ny$ RPPP$&mP$&v$)o$0Y$0]$0`$1_$1b$1i$1qP$1w$1zP$2h$2l$3d$4r$4w$5_PP$5d$5j$5n$5q$5u$5y$6u$7^$7u$7y$7|$8P$8V$8Y$8^$8bR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R < TypeParamList const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:378,context:$Pt,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[NPt],skippedNodes:[0,5,6,276],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(X!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(UpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(UpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Up(X!b'z0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(V#S$h&j'{0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Up(X!b'{0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!n),Q(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(T':f$h&j(X!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(X!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(X!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(X!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Up(X!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(X!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(UpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(UpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Up(X!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!V7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!V7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!V7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(X!b!V7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(X!b!V7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(X!b!V7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(X!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(X!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!e$b$h&j#})Lv(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#P-v$?V_![(CdtBr$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!o7`$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Up(X!b'z0/l$[#t(R,2j(c$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Up(X!b'{0/l$[#t(R,2j(c$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[PPt,FPt,RPt,LPt,2,3,4,5,6,7,8,9,10,11,12,13,14,TPt,new Vm("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOv~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!S~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(a~~",141,338),new Vm("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:t=>MPt[t]||-1},{term:341,get:t=>zPt[t]||-1},{term:93,get:t=>qPt[t]||-1}],tokenPrec:15116}),Kse=[mr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),mr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),mr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),mr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),mr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),mr(`try { \${} } catch (\${error}) { \${} }`,{label:"try",detail:"/ catch block",type:"keyword"}),mr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),mr(`if (\${}) { \${} } else { \${} }`,{label:"if",detail:"/ else block",type:"keyword"}),mr(`class \${name} { constructor(\${params}) { \${} } }`,{label:"class",detail:"definition",type:"keyword"}),mr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),mr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],AMe=Kse.concat([mr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),mr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),mr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),e0e=new PM,mMe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function W2(t){return(e,n)=>{let a=e.node.getChild("VariableDefinition");return a&&n(a,t),!0}}const UPt=["FunctionDeclaration"],GPt={FunctionDeclaration:W2("function"),ClassDeclaration:W2("class"),ClassExpression:()=>!0,EnumDeclaration:W2("constant"),TypeAliasDeclaration:W2("type"),NamespaceDeclaration:W2("namespace"),VariableDefinition(t,e){t.matchContext(UPt)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function gMe(t,e){let n=e0e.get(e);if(n)return n;let a=[],r=!0;function i(o,s){let l=t.sliceString(o.from,o.to);a.push({label:l,type:s})}return e.cursor(Di.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let s=GPt[o.name];if(s&&s(o,i)||mMe.has(o.name))return!1}else if(o.to-o.from>8192){for(let s of gMe(t,o.node))a.push(s);return!1}}),e0e.set(e,a),a}const CL=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Jse=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function hMe(t){let e=Ar(t.state).resolveInner(t.pos,-1);if(Jse.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&CL.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let a=[];for(let r=e;r;r=r.parent)mMe.has(r.name)&&(a=a.concat(gMe(t.state.doc,r)));return{options:a,from:n?e.from:t.pos,validFor:CL}}function $G(t,e,n){var a;let r=[];for(;;){let i=e.firstChild,o;if(i?.name=="VariableName")return r.push(t(i)),{path:r.reverse(),name:n};if(i?.name=="MemberExpression"&&((a=o=i.lastChild)===null||a===void 0?void 0:a.name)=="PropertyName")r.push(t(o)),e=i;else return null}}function fMe(t){let e=a=>t.state.doc.sliceString(a.from,a.to),n=Ar(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?$G(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?$G(e,n.parent,""):Jse.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&CL.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?$G(e,n,""):t.explicit?{path:[],name:""}:null}function HPt(t,e){let n=[],a=new Set;for(let r=0;;r++){for(let o of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||a.has(o))continue;a.add(o);let s;try{s=t[o]}catch{continue}n.push({label:o,type:typeof s=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-r})}let i=Object.getPrototypeOf(t);if(!i)return n;t=i}}function WPt(t){let e=new Map;return n=>{let a=fMe(n);if(!a)return null;let r=t;for(let o of a.path)if(r=r[o],!r)return null;let i=e.get(r);return i||e.set(r,i=HPt(r,!a.path.length)),{from:n.pos-a.name.length,options:i,validFor:CL}}}const ed=jo.define({name:"javascript",parser:jPt.configure({props:[Qs.add({IfStatement:rs({except:/^\s*({|else\b)/}),TryStatement:rs({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:zM,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),a=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:a?1:2)*t.unit},Block:YA({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":rs({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Ss.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Wp,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),bMe={test:t=>/^JSX/.test(t.name),facet:NM({commentTokens:{block:{open:"{/*",close:"*/}"}}})},ece=ed.configure({dialect:"ts"},"typescript"),tce=ed.configure({dialect:"jsx",props:[kse.add(t=>t.isTop?[bMe]:void 0)]}),nce=ed.configure({dialect:"jsx ts",props:[kse.add(t=>t.isTop?[bMe]:void 0)]},"typescript");let yMe=t=>({label:t,type:"keyword"});const wMe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(yMe),YPt=wMe.concat(["declare","implements","private","protected","public"].map(yMe));function vMe(t={}){let e=t.jsx?t.typescript?nce:tce:t.typescript?ece:ed,n=t.typescript?AMe.concat(YPt):Kse.concat(wMe);return new _o(e,[ed.data.of({autocomplete:HM(Jse,e3(n))}),ed.data.of({autocomplete:hMe}),t.jsx?kMe:[]])}function XPt(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function t0e(t,e,n=t.length){for(let a=e?.firstChild;a;a=a.nextSibling)if(a.name=="JSXIdentifier"||a.name=="JSXBuiltin"||a.name=="JSXNamespacedName"||a.name=="JSXMemberExpression")return t.sliceString(a.from,Math.min(a.to,n));return""}const VPt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),kMe=Sn.inputHandler.of((t,e,n,a,r)=>{if((VPt?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||a!=">"&&a!="/"||!ed.isActiveAt(t.state,e,-1))return!1;let i=r(),{state:o}=i,s=o.changeByRange(l=>{var u;let{head:d}=l,p=Ar(o).resolveInner(d-1,-1),A;if(p.name=="JSXStartTag"&&(p=p.parent),!(o.doc.sliceString(d-1,d)!=a||p.name=="JSXAttributeValue"&&p.to>d)){if(a==">"&&p.name=="JSXFragmentTag")return{range:l,changes:{from:d,insert:""}};if(a=="/"&&p.name=="JSXStartCloseTag"){let m=p.parent,g=m.parent;if(g&&m.from==d-2&&((A=t0e(o.doc,g.firstChild,d))||((u=g.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let h=`${A}>`;return{range:Kt.cursor(d+h.length,-1),changes:{from:d,insert:h}}}}else if(a==">"){let m=XPt(p);if(m&&m.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(d,d+2))&&(A=t0e(o.doc,m,d)))return{range:l,changes:{from:d,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([i,o.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function ZPt(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,a)=>{n.meta.docs.recommended&&(e.rules[a]=2)})),n=>{let{state:a}=n,r=[];for(let{from:i,to:o}of ed.findRegions(a)){let s=a.doc.lineAt(i),l={line:s.number-1,col:i-s.from,pos:i};for(let u of t.verify(a.sliceDoc(i,o),e))r.push(KPt(u,a.doc,l))}return r}}function n0e(t,e,n,a){return n.line(t+a.line).from+e+(t==1?a.col-1:-1)}function KPt(t,e,n){let a=n0e(t.line,t.column,e,n),r={from:a,to:t.endLine!=null&&t.endColumn!=1?n0e(t.endLine,t.endColumn,e,n):a,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:i,text:o}=t.fix,s=i[0]+n.pos-a,l=i[1]+n.pos-a;r.actions=[{name:"fix",apply(u,d){u.dispatch({changes:{from:d+s,to:d+l,insert:o},scrollIntoView:!0})}}]}return r}const GT=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:kMe,completionPath:fMe,esLint:ZPt,javascript:vMe,javascriptLanguage:ed,jsxLanguage:tce,localCompletionSource:hMe,scopeCompletionSource:WPt,snippets:Kse,tsxLanguage:nce,typescriptLanguage:ece,typescriptSnippets:AMe},Symbol.toStringTag,{value:"Module"})),Y2=["_blank","_self","_top","_parent"],TG=["ascii","utf-8","utf-16","latin1","latin1"],PG=["get","post","put","delete"],FG=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],lp=["true","false"],sa={},JPt={a:{attrs:{href:null,ping:null,type:null,media:null,target:Y2,hreflang:null}},abbr:sa,address:sa,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:sa,aside:sa,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:sa,base:{attrs:{href:null,target:Y2}},bdi:sa,bdo:sa,blockquote:{attrs:{cite:null}},body:sa,br:sa,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:FG,formmethod:PG,formnovalidate:["novalidate"],formtarget:Y2,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:sa,center:sa,cite:sa,code:sa,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:sa,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:sa,div:sa,dl:sa,dt:sa,em:sa,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:sa,figure:sa,footer:sa,form:{attrs:{action:null,name:null,"accept-charset":TG,autocomplete:["on","off"],enctype:FG,method:PG,novalidate:["novalidate"],target:Y2}},h1:sa,h2:sa,h3:sa,h4:sa,h5:sa,h6:sa,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:sa,hgroup:sa,hr:sa,html:{attrs:{manifest:null}},i:sa,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:FG,formmethod:PG,formnovalidate:["novalidate"],formtarget:Y2,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:sa,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:sa,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:sa,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:TG,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:sa,noscript:sa,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:sa,param:{attrs:{name:null,value:null}},pre:sa,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:sa,rt:sa,ruby:sa,samp:sa,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:TG}},section:sa,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:sa,source:{attrs:{src:null,type:null,media:null}},span:sa,strong:sa,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:sa,summary:sa,sup:sa,table:sa,tbody:sa,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:sa,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:sa,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:sa,time:{attrs:{datetime:null}},title:sa,tr:sa,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:sa,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:sa},xMe={accesskey:null,class:null,contenteditable:lp,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:lp,autocorrect:lp,autocapitalize:lp,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":lp,"aria-autocomplete":["inline","list","both","none"],"aria-busy":lp,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":lp,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":lp,"aria-hidden":lp,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":lp,"aria-multiselectable":lp,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":lp,"aria-relevant":null,"aria-required":lp,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},OMe="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of OMe)xMe[t]=null;class dD{constructor(e,n){this.tags=Object.assign(Object.assign({},JPt),e),this.globalAttrs=Object.assign(Object.assign({},xMe),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}dD.default=new dD;function bB(t,e,n=t.length){if(!e)return"";let a=e.firstChild,r=a&&a.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function yB(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function CMe(t,e,n){let a=n.tags[bB(t,yB(e))];return a?.children||n.allTags}function ace(t,e){let n=[];for(let a=yB(e);a&&!a.type.isTop;a=yB(a.parent)){let r=bB(t,a);if(r&&a.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=a.firstChild.to)&&n.push(r)}return n}const _Me=/^[:\-\.\w\u00b7-\uffff]*$/;function a0e(t,e,n,a,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=yB(n,!0);return{from:a,to:r,options:CMe(t.doc,o,e).map(s=>({label:s,type:"type"})).concat(ace(t.doc,n).map((s,l)=>({label:"/"+s,apply:"/"+s+i,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function r0e(t,e,n,a){let r=/\s*>/.test(t.sliceDoc(a,a+5))?"":">";return{from:n,to:a,options:ace(t.doc,e).map((i,o)=>({label:i,apply:i+r,type:"type",boost:99-o})),validFor:_Me}}function e6t(t,e,n,a){let r=[],i=0;for(let o of CMe(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of ace(t.doc,n))r.push({label:"",type:"type",boost:99-i++});return{from:a,to:a,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function t6t(t,e,n,a,r){let i=yB(n),o=i?e.tags[bB(t.doc,i)]:null,s=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?s:s.length?s.concat(e.globalAttrNames):e.globalAttrNames;return{from:a,to:r,options:l.map(u=>({label:u,type:"property"})),validFor:_Me}}function n6t(t,e,n,a,r){var i;let o=(i=n.parent)===null||i===void 0?void 0:i.getChild("AttributeName"),s=[],l;if(o){let u=t.sliceDoc(o.from,o.to),d=e.globalAttrs[u];if(!d){let p=yB(n),A=p?e.tags[bB(t.doc,p)]:null;d=A?.attrs&&A.attrs[u]}if(d){let p=t.sliceDoc(a,r).toLowerCase(),A='"',m='"';/^['"]/.test(p)?(l=p[0]=='"'?/^[^"]*$/:/^[^']*$/,A="",m=t.sliceDoc(r,r+1)==p[0]?"":p[0],p=p.slice(1),a++):l=/^[^\s<>='"]*$/;for(let g of d)s.push({label:g,apply:A+g+m,type:"constant"})}}return{from:a,to:r,options:s,validFor:l}}function BMe(t,e){let{state:n,pos:a}=e,r=Ar(n).resolveInner(a,-1),i=r.resolve(a);for(let o=a,s;i==r&&(s=r.childBefore(o));){let l=s.lastChild;if(!l||!l.type.isError||l.fromBMe(a,r)}const a6t=ed.parser.configure({top:"SingleExpression"}),SMe=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:ece.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:tce.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:nce.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:a6t},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:ed.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:uD.parser}],IMe=[{name:"style",parser:uD.parser.configure({top:"Styles"})}].concat(OMe.map(t=>({name:t,parser:ed.parser}))),rce=jo.define({name:"html",parser:N8t.configure({props:[Qs.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),FI=rce.configure({wrap:iMe(SMe,IMe)});function hE(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=iMe((t.nestedLanguages||[]).concat(SMe),(t.nestedAttributes||[]).concat(IMe)));let a=n?rce.configure({wrap:n,dialect:e}):e?FI.configure({dialect:e}):FI;return new _o(a,[FI.data.of({autocomplete:QMe(t)}),t.autoCloseTags!==!1?DMe:[],vMe().support,dMe().support])}const i0e=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),DMe=Sn.inputHandler.of((t,e,n,a,r)=>{if(t.composing||t.state.readOnly||e!=n||a!=">"&&a!="/"||!FI.isActiveAt(t.state,e,-1))return!1;let i=r(),{state:o}=i,s=o.changeByRange(l=>{var u,d,p;let A=o.doc.sliceString(l.from-1,l.to)==a,{head:m}=l,g=Ar(o).resolveInner(m,-1),h;if(A&&a==">"&&g.name=="EndTag"){let f=g.parent;if(((d=(u=f.parent)===null||u===void 0?void 0:u.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(h=bB(o.doc,f.parent,m))&&!i0e.has(h)){let b=m+(o.doc.sliceString(m,m+1)===">"?1:0),y=``;return{range:l,changes:{from:m,to:b,insert:y}}}}else if(A&&a=="/"&&g.name=="IncompleteCloseTag"){let f=g.parent;if(g.from==m-2&&((p=f.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(h=bB(o.doc,f,m))&&!i0e.has(h)){let b=m+(o.doc.sliceString(m,m+1)===">"?1:0),y=`${h}>`;return{range:Kt.cursor(m+y.length,-1),changes:{from:m,to:b,insert:y}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([i,o.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),r6t=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:DMe,html:hE,htmlCompletionSource:EMe,htmlCompletionSourceWith:QMe,htmlLanguage:FI,htmlPlain:rce},Symbol.toStringTag,{value:"Module"})),$Me=NM({commentTokens:{block:{open:""}}}),TMe=new Ga,PMe=TTt.configure({props:[Ss.add(t=>!t.is("Block")||t.is("Document")||qJ(t)!=null||i6t(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),TMe.add(qJ),Qs.add({Document:()=>null}),N0.add({Document:$Me})]});function qJ(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function i6t(t){return t.name=="OrderedList"||t.name=="BulletList"}function o6t(t,e){let n=t;for(;;){let a=n.nextSibling,r;if(!a||(r=qJ(a.type))!=null&&r<=e)break;n=a}return n.to}const s6t=I7e.of((t,e,n)=>{for(let a=Ar(t).resolveInner(n,-1);a&&!(a.fromn)return{from:n,to:i}}return null});function ice(t){return new Td($Me,t,[s6t],"markdown")}const FMe=ice(PMe),c6t=PMe.configure([GTt,WTt,HTt,YTt,{props:[Ss.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),n3=ice(c6t);function l6t(t,e){return n=>{if(n&&t){let a=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?a=t(n):a=Mt.matchLanguageName(t,n,!0),a instanceof Mt)return a.support?a.support.language.parser:U1.getSkippingParser(a.load());if(a)return a.parser}return e?e.parser:null}}let HT=class{constructor(e,n,a,r,i,o,s){this.node=e,this.from=n,this.to=a,this.spaceBefore=r,this.spaceAfter=i,this.type=o,this.item=s}blank(e,n=!0){let a=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;a.length0;r--)a+=" ";return a+(n?this.spaceAfter:"")}}marker(e,n){let a=this.node.name=="OrderedList"?String(+LMe(this.item,e)[2]+n):"";return this.spaceBefore+a+this.type+this.spaceAfter}};function RMe(t,e){let n=[];for(let r=t;r;r=r.parent)(r.name=="ListItem"||r.name=="Blockquote"||r.name=="FencedCode")&&n.push(r);let a=[];for(let r=n.length-1;r>=0;r--){let i=n[r],o,s=e.lineAt(i.from),l=i.from-s.from;if(i.name=="FencedCode")a.push(new HT(i,l,l,"","","",null));else if(i.name=="Blockquote"&&(o=/^ *>( ?)/.exec(s.text.slice(l))))a.push(new HT(i,l,l+o[0].length,"",o[1],">",null));else if(i.name=="ListItem"&&i.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(s.text.slice(l)))){let u=o[3],d=o[0].length;u.length>=4&&(u=u.slice(0,u.length-4),d-=4),a.push(new HT(i.parent,l,l+d,o[1],u,o[2],i))}else if(i.name=="ListItem"&&i.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(s.text.slice(l)))){let u=o[4],d=o[0].length;u.length>4&&(u=u.slice(0,u.length-4),d-=4);let p=o[2];o[3]&&(p+=o[3].replace(/[xX]/," ")),a.push(new HT(i.parent,l,l+d,o[1],u,p,i))}}return a}function LMe(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function RG(t,e,n,a=0){for(let r=-1,i=t;;){if(i.name=="ListItem"){let s=LMe(i,e),l=+s[2];if(r>=0){if(l!=r+1)return;n.push({from:i.from+s[1].length,to:i.from+s[0].length,insert:String(r+2+a)})}r=l}let o=i.nextSibling;if(!o)break;i=o}}function oce(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(G1)!=" ")return t;let a=ry(t,4,n),r="";for(let i=a;i>0;)i>=4?(r+=" ",i-=4):(r+=" ",i--);return r+t.slice(n)}const NMe=({state:t,dispatch:e})=>{let n=Ar(t),{doc:a}=t,r=null,i=t.changeByRange(o=>{if(!o.empty||!n3.isActiveAt(t,o.from,0))return r={range:o};let s=o.from,l=a.lineAt(s),u=RMe(n.resolveInner(s,-1),a);for(;u.length&&u[u.length-1].from>s-l.from;)u.pop();if(!u.length)return r={range:o};let d=u[u.length-1];if(d.to-d.spaceAfter.length>s-l.from)return r={range:o};let p=s>=d.to-d.spaceAfter.length&&!/\S/.test(l.text.slice(d.to));if(d.item&&p){let f=d.node.firstChild,b=d.node.getChild("ListItem","ListItem");if(f.to>=s||b&&b.to0&&!/[^\s>]/.test(a.lineAt(l.from-1).text)){let y=u.length>1?u[u.length-2]:null,w,v="";y&&y.item?(w=l.from+y.from,v=y.marker(a,1)):w=l.from+(y?y.to:0);let k=[{from:w,to:s,insert:v}];return d.node.name=="OrderedList"&&RG(d.item,a,k,-2),y&&y.node.name=="OrderedList"&&RG(y.item,a,k),{range:Kt.cursor(w+v.length),changes:k}}else{let y=s0e(u,t,l);return{range:Kt.cursor(s+y.length+1),changes:{from:l.from,insert:y+t.lineBreak}}}}if(d.node.name=="Blockquote"&&p&&l.from){let f=a.lineAt(l.from-1),b=/>\s*$/.exec(f.text);if(b&&b.index==d.from){let y=t.changes([{from:f.from+b.index,to:f.to},{from:l.from+d.from,to:l.to}]);return{range:o.map(y),changes:y}}}let A=[];d.node.name=="OrderedList"&&RG(d.item,a,A);let m=d.item&&d.item.from]*/.exec(l.text)[0].length>=d.to)for(let f=0,b=u.length-1;f<=b;f++)g+=f==b&&!m?u[f].marker(a,1):u[f].blank(fl.from&&/\s/.test(l.text.charAt(h-l.from-1));)h--;return g=oce(g,t),u6t(d.node,t.doc)&&(g=s0e(u,t,l)+t.lineBreak+g),A.push({from:h,to:s,insert:t.lineBreak+g}),{range:Kt.cursor(h+g.length+1),changes:A}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0)};function o0e(t){return t.name=="QuoteMark"||t.name=="ListMark"}function u6t(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,a=t.getChild("ListItem","ListItem");if(!a)return!1;let r=e.lineAt(n.to),i=e.lineAt(a.from),o=/^[\s>]*$/.test(r.text);return r.number+(o?0:1){let n=Ar(t),a=null,r=t.changeByRange(i=>{let o=i.from,{doc:s}=t;if(i.empty&&n3.isActiveAt(t,i.from)){let l=s.lineAt(o),u=RMe(d6t(n,o),s);if(u.length){let d=u[u.length-1],p=d.to-d.spaceAfter.length+(d.spaceAfter?1:0);if(o-l.from>p&&!/\S/.test(l.text.slice(p,o-l.from)))return{range:Kt.cursor(l.from+p),changes:{from:l.from+p,to:o}};if(o-l.from==p&&(!d.item||l.from<=d.item.from||!/\S/.test(l.text.slice(0,d.to)))){let A=l.from+d.from;if(d.item&&d.node.fromPromise.resolve().then(()=>bqn),void 0,import.meta.url).then(e=>e.sql({dialect:e[t]}))}const jMe=[Mt.of({name:"C",extensions:["c","h","ino"],load(){return ye(()=>Promise.resolve().then(()=>HEe),void 0,import.meta.url).then(t=>t.cpp())}}),Mt.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return ye(()=>Promise.resolve().then(()=>HEe),void 0,import.meta.url).then(t=>t.cpp())}}),Mt.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Ky("Cassandra")}}),Mt.of({name:"CSS",extensions:["css"],load(){return ye(()=>Promise.resolve().then(()=>pPt),void 0,import.meta.url).then(t=>t.css())}}),Mt.of({name:"Go",extensions:["go"],load(){return ye(()=>Promise.resolve().then(()=>fjn),void 0,import.meta.url).then(t=>t.go())}}),Mt.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return ye(()=>Promise.resolve().then(()=>r6t),void 0,import.meta.url).then(t=>t.html())}}),Mt.of({name:"Java",extensions:["java"],load(){return ye(()=>Promise.resolve().then(()=>kjn),void 0,import.meta.url).then(t=>t.java())}}),Mt.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return ye(()=>Promise.resolve().then(()=>GT),void 0,import.meta.url).then(t=>t.javascript())}}),Mt.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return ye(()=>Promise.resolve().then(()=>Ejn),void 0,import.meta.url).then(t=>t.json())}}),Mt.of({name:"JSX",extensions:["jsx"],load(){return ye(()=>Promise.resolve().then(()=>GT),void 0,import.meta.url).then(t=>t.javascript({jsx:!0}))}}),Mt.of({name:"LESS",extensions:["less"],load(){return ye(()=>Promise.resolve().then(()=>Mjn),void 0,import.meta.url).then(t=>t.less())}}),Mt.of({name:"Liquid",extensions:["liquid"],load(){return ye(()=>Promise.resolve().then(()=>cUn),void 0,import.meta.url).then(t=>t.liquid())}}),Mt.of({name:"MariaDB SQL",load(){return Ky("MariaSQL")}}),Mt.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return ye(()=>Promise.resolve().then(()=>m6t),void 0,import.meta.url).then(t=>t.markdown())}}),Mt.of({name:"MS SQL",load(){return Ky("MSSQL")}}),Mt.of({name:"MySQL",load(){return Ky("MySQL")}}),Mt.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return ye(()=>Promise.resolve().then(()=>DGn),void 0,import.meta.url).then(t=>t.php())}}),Mt.of({name:"PLSQL",extensions:["pls"],load(){return Ky("PLSQL")}}),Mt.of({name:"PostgreSQL",load(){return Ky("PostgreSQL")}}),Mt.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return ye(()=>Promise.resolve().then(()=>YHn),void 0,import.meta.url).then(t=>t.python())}}),Mt.of({name:"Rust",extensions:["rs"],load(){return ye(()=>Promise.resolve().then(()=>gWn),void 0,import.meta.url).then(t=>t.rust())}}),Mt.of({name:"Sass",extensions:["sass"],load(){return ye(()=>Promise.resolve().then(()=>O2e),void 0,import.meta.url).then(t=>t.sass({indented:!0}))}}),Mt.of({name:"SCSS",extensions:["scss"],load(){return ye(()=>Promise.resolve().then(()=>O2e),void 0,import.meta.url).then(t=>t.sass())}}),Mt.of({name:"SQL",extensions:["sql"],load(){return Ky("StandardSQL")}}),Mt.of({name:"SQLite",load(){return Ky("SQLite")}}),Mt.of({name:"TSX",extensions:["tsx"],load(){return ye(()=>Promise.resolve().then(()=>GT),void 0,import.meta.url).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),Mt.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return ye(()=>Promise.resolve().then(()=>GT),void 0,import.meta.url).then(t=>t.javascript({typescript:!0}))}}),Mt.of({name:"WebAssembly",extensions:["wat","wast"],load(){return ye(()=>Promise.resolve().then(()=>JWn),void 0,import.meta.url).then(t=>t.wast())}}),Mt.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return ye(()=>Promise.resolve().then(()=>kYn),void 0,import.meta.url).then(t=>t.xml())}}),Mt.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return ye(()=>Promise.resolve().then(()=>tXn),void 0,import.meta.url).then(t=>t.yaml())}}),Mt.of({name:"APL",extensions:["dyalog","apl"],load(){return ye(()=>Promise.resolve().then(()=>uXn),void 0,import.meta.url).then(t=>un(t.apl))}}),Mt.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return ye(()=>Promise.resolve().then(()=>pXn),void 0,import.meta.url).then(t=>un(t.asciiArmor))}}),Mt.of({name:"ASN.1",extensions:["asn","asn1"],load(){return ye(()=>Promise.resolve().then(()=>mXn),void 0,import.meta.url).then(t=>un(t.asn1({})))}}),Mt.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return ye(()=>Promise.resolve().then(()=>wXn),void 0,import.meta.url).then(t=>un(t.asterisk))}}),Mt.of({name:"Brainfuck",extensions:["b","bf"],load(){return ye(()=>Promise.resolve().then(()=>xXn),void 0,import.meta.url).then(t=>un(t.brainfuck))}}),Mt.of({name:"Cobol",extensions:["cob","cpy"],load(){return ye(()=>Promise.resolve().then(()=>FXn),void 0,import.meta.url).then(t=>un(t.cobol))}}),Mt.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.csharp))}}),Mt.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return ye(()=>Promise.resolve().then(()=>HY),void 0,import.meta.url).then(t=>un(t.clojure))}}),Mt.of({name:"ClojureScript",extensions:["cljs"],load(){return ye(()=>Promise.resolve().then(()=>HY),void 0,import.meta.url).then(t=>un(t.clojure))}}),Mt.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return ye(()=>Promise.resolve().then(()=>kVn),void 0,import.meta.url).then(t=>un(t.gss))}}),Mt.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return ye(()=>Promise.resolve().then(()=>_Vn),void 0,import.meta.url).then(t=>un(t.cmake))}}),Mt.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return ye(()=>Promise.resolve().then(()=>MVn),void 0,import.meta.url).then(t=>un(t.coffeeScript))}}),Mt.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return ye(()=>Promise.resolve().then(()=>WVn),void 0,import.meta.url).then(t=>un(t.commonLisp))}}),Mt.of({name:"Cypher",extensions:["cyp","cypher"],load(){return ye(()=>Promise.resolve().then(()=>eZn),void 0,import.meta.url).then(t=>un(t.cypher))}}),Mt.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return ye(()=>Promise.resolve().then(()=>iZn),void 0,import.meta.url).then(t=>un(t.cython))}}),Mt.of({name:"Crystal",extensions:["cr"],load(){return ye(()=>Promise.resolve().then(()=>bZn),void 0,import.meta.url).then(t=>un(t.crystal))}}),Mt.of({name:"D",extensions:["d"],load(){return ye(()=>Promise.resolve().then(()=>_Zn),void 0,import.meta.url).then(t=>un(t.d))}}),Mt.of({name:"Dart",extensions:["dart"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.dart))}}),Mt.of({name:"diff",extensions:["diff","patch"],load(){return ye(()=>Promise.resolve().then(()=>EZn),void 0,import.meta.url).then(t=>un(t.diff))}}),Mt.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return ye(()=>Promise.resolve().then(()=>qZn),void 0,import.meta.url).then(t=>un(t.dockerFile))}}),Mt.of({name:"DTD",extensions:["dtd"],load(){return ye(()=>Promise.resolve().then(()=>HZn),void 0,import.meta.url).then(t=>un(t.dtd))}}),Mt.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return ye(()=>Promise.resolve().then(()=>KZn),void 0,import.meta.url).then(t=>un(t.dylan))}}),Mt.of({name:"EBNF",load(){return ye(()=>Promise.resolve().then(()=>eKn),void 0,import.meta.url).then(t=>un(t.ebnf))}}),Mt.of({name:"ECL",extensions:["ecl"],load(){return ye(()=>Promise.resolve().then(()=>lKn),void 0,import.meta.url).then(t=>un(t.ecl))}}),Mt.of({name:"edn",extensions:["edn"],load(){return ye(()=>Promise.resolve().then(()=>HY),void 0,import.meta.url).then(t=>un(t.clojure))}}),Mt.of({name:"Eiffel",extensions:["e"],load(){return ye(()=>Promise.resolve().then(()=>hKn),void 0,import.meta.url).then(t=>un(t.eiffel))}}),Mt.of({name:"Elm",extensions:["elm"],load(){return ye(()=>Promise.resolve().then(()=>EKn),void 0,import.meta.url).then(t=>un(t.elm))}}),Mt.of({name:"Erlang",extensions:["erl"],load(){return ye(()=>Promise.resolve().then(()=>JKn),void 0,import.meta.url).then(t=>un(t.erlang))}}),Mt.of({name:"Esper",load(){return ye(()=>Promise.resolve().then(()=>mJn),void 0,import.meta.url).then(t=>un(t.esper))}}),Mt.of({name:"Factor",extensions:["factor"],load(){return ye(()=>Promise.resolve().then(()=>hJn),void 0,import.meta.url).then(t=>un(t.factor))}}),Mt.of({name:"FCL",load(){return ye(()=>Promise.resolve().then(()=>kJn),void 0,import.meta.url).then(t=>un(t.fcl))}}),Mt.of({name:"Forth",extensions:["forth","fth","4th"],load(){return ye(()=>Promise.resolve().then(()=>_Jn),void 0,import.meta.url).then(t=>un(t.forth))}}),Mt.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return ye(()=>Promise.resolve().then(()=>TJn),void 0,import.meta.url).then(t=>un(t.fortran))}}),Mt.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return ye(()=>Promise.resolve().then(()=>nX),void 0,import.meta.url).then(t=>un(t.fSharp))}}),Mt.of({name:"Gas",extensions:["s"],load(){return ye(()=>Promise.resolve().then(()=>MJn),void 0,import.meta.url).then(t=>un(t.gas))}}),Mt.of({name:"Gherkin",extensions:["feature"],load(){return ye(()=>Promise.resolve().then(()=>qJn),void 0,import.meta.url).then(t=>un(t.gherkin))}}),Mt.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return ye(()=>Promise.resolve().then(()=>VJn),void 0,import.meta.url).then(t=>un(t.groovy))}}),Mt.of({name:"Haskell",extensions:["hs"],load(){return ye(()=>Promise.resolve().then(()=>rea),void 0,import.meta.url).then(t=>un(t.haskell))}}),Mt.of({name:"Haxe",extensions:["hx"],load(){return ye(()=>Promise.resolve().then(()=>_Qe),void 0,import.meta.url).then(t=>un(t.haxe))}}),Mt.of({name:"HXML",extensions:["hxml"],load(){return ye(()=>Promise.resolve().then(()=>_Qe),void 0,import.meta.url).then(t=>un(t.hxml))}}),Mt.of({name:"HTTP",load(){return ye(()=>Promise.resolve().then(()=>Qea),void 0,import.meta.url).then(t=>un(t.http))}}),Mt.of({name:"IDL",extensions:["pro"],load(){return ye(()=>Promise.resolve().then(()=>Rea),void 0,import.meta.url).then(t=>un(t.idl))}}),Mt.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return ye(()=>Promise.resolve().then(()=>zea),void 0,import.meta.url).then(t=>un(t.jsonld))}}),Mt.of({name:"Jinja2",extensions:["j2","jinja","jinja2"],load(){return ye(()=>Promise.resolve().then(()=>Hea),void 0,import.meta.url).then(t=>un(t.jinja2))}}),Mt.of({name:"Julia",extensions:["jl"],load(){return ye(()=>Promise.resolve().then(()=>bta),void 0,import.meta.url).then(t=>un(t.julia))}}),Mt.of({name:"Kotlin",extensions:["kt","kts"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.kotlin))}}),Mt.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return ye(()=>Promise.resolve().then(()=>xta),void 0,import.meta.url).then(t=>un(t.liveScript))}}),Mt.of({name:"Lua",extensions:["lua"],load(){return ye(()=>Promise.resolve().then(()=>Dta),void 0,import.meta.url).then(t=>un(t.lua))}}),Mt.of({name:"mIRC",extensions:["mrc"],load(){return ye(()=>Promise.resolve().then(()=>Nta),void 0,import.meta.url).then(t=>un(t.mirc))}}),Mt.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return ye(()=>Promise.resolve().then(()=>Yta),void 0,import.meta.url).then(t=>un(t.mathematica))}}),Mt.of({name:"Modelica",extensions:["mo"],load(){return ye(()=>Promise.resolve().then(()=>ina),void 0,import.meta.url).then(t=>un(t.modelica))}}),Mt.of({name:"MUMPS",extensions:["mps"],load(){return ye(()=>Promise.resolve().then(()=>fna),void 0,import.meta.url).then(t=>un(t.mumps))}}),Mt.of({name:"Mbox",extensions:["mbox"],load(){return ye(()=>Promise.resolve().then(()=>Sna),void 0,import.meta.url).then(t=>un(t.mbox))}}),Mt.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return ye(()=>Promise.resolve().then(()=>Fna),void 0,import.meta.url).then(t=>un(t.nginx))}}),Mt.of({name:"NSIS",extensions:["nsh","nsi"],load(){return ye(()=>Promise.resolve().then(()=>Lna),void 0,import.meta.url).then(t=>un(t.nsis))}}),Mt.of({name:"NTriples",extensions:["nt","nq"],load(){return ye(()=>Promise.resolve().then(()=>Mna),void 0,import.meta.url).then(t=>un(t.ntriples))}}),Mt.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.objectiveC))}}),Mt.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.objectiveCpp))}}),Mt.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return ye(()=>Promise.resolve().then(()=>nX),void 0,import.meta.url).then(t=>un(t.oCaml))}}),Mt.of({name:"Octave",extensions:["m"],load(){return ye(()=>Promise.resolve().then(()=>Kna),void 0,import.meta.url).then(t=>un(t.octave))}}),Mt.of({name:"Oz",extensions:["oz"],load(){return ye(()=>Promise.resolve().then(()=>daa),void 0,import.meta.url).then(t=>un(t.oz))}}),Mt.of({name:"Pascal",extensions:["p","pas"],load(){return ye(()=>Promise.resolve().then(()=>baa),void 0,import.meta.url).then(t=>un(t.pascal))}}),Mt.of({name:"Perl",extensions:["pl","pm"],load(){return ye(()=>Promise.resolve().then(()=>waa),void 0,import.meta.url).then(t=>un(t.perl))}}),Mt.of({name:"Pig",extensions:["pig"],load(){return ye(()=>Promise.resolve().then(()=>Baa),void 0,import.meta.url).then(t=>un(t.pig))}}),Mt.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return ye(()=>Promise.resolve().then(()=>Uaa),void 0,import.meta.url).then(t=>un(t.powerShell))}}),Mt.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return ye(()=>Promise.resolve().then(()=>Haa),void 0,import.meta.url).then(t=>un(t.properties))}}),Mt.of({name:"ProtoBuf",extensions:["proto"],load(){return ye(()=>Promise.resolve().then(()=>Kaa),void 0,import.meta.url).then(t=>un(t.protobuf))}}),Mt.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return ye(()=>Promise.resolve().then(()=>Mra),void 0,import.meta.url).then(t=>un(t.pug))}}),Mt.of({name:"Puppet",extensions:["pp"],load(){return ye(()=>Promise.resolve().then(()=>Ura),void 0,import.meta.url).then(t=>un(t.puppet))}}),Mt.of({name:"Q",extensions:["q"],load(){return ye(()=>Promise.resolve().then(()=>Jra),void 0,import.meta.url).then(t=>un(t.q))}}),Mt.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return ye(()=>Promise.resolve().then(()=>sia),void 0,import.meta.url).then(t=>un(t.r))}}),Mt.of({name:"RPM Changes",load(){return ye(()=>Promise.resolve().then(()=>ZQe),void 0,import.meta.url).then(t=>un(t.rpmChanges))}}),Mt.of({name:"RPM Spec",extensions:["spec"],load(){return ye(()=>Promise.resolve().then(()=>ZQe),void 0,import.meta.url).then(t=>un(t.rpmSpec))}}),Mt.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return ye(()=>Promise.resolve().then(()=>Eia),void 0,import.meta.url).then(t=>un(t.ruby))}}),Mt.of({name:"SAS",extensions:["sas"],load(){return ye(()=>Promise.resolve().then(()=>$ia),void 0,import.meta.url).then(t=>un(t.sas))}}),Mt.of({name:"Scala",extensions:["scala"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.scala))}}),Mt.of({name:"Scheme",extensions:["scm","ss"],load(){return ye(()=>Promise.resolve().then(()=>Yia),void 0,import.meta.url).then(t=>un(t.scheme))}}),Mt.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return ye(()=>Promise.resolve().then(()=>Jia),void 0,import.meta.url).then(t=>un(t.shell))}}),Mt.of({name:"Sieve",extensions:["siv","sieve"],load(){return ye(()=>Promise.resolve().then(()=>ioa),void 0,import.meta.url).then(t=>un(t.sieve))}}),Mt.of({name:"Smalltalk",extensions:["st"],load(){return ye(()=>Promise.resolve().then(()=>loa),void 0,import.meta.url).then(t=>un(t.smalltalk))}}),Mt.of({name:"Solr",load(){return ye(()=>Promise.resolve().then(()=>foa),void 0,import.meta.url).then(t=>un(t.solr))}}),Mt.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return ye(()=>Promise.resolve().then(()=>nX),void 0,import.meta.url).then(t=>un(t.sml))}}),Mt.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return ye(()=>Promise.resolve().then(()=>Coa),void 0,import.meta.url).then(t=>un(t.sparql))}}),Mt.of({name:"Spreadsheet",alias:["excel","formula"],load(){return ye(()=>Promise.resolve().then(()=>Boa),void 0,import.meta.url).then(t=>un(t.spreadsheet))}}),Mt.of({name:"Squirrel",extensions:["nut"],load(){return ye(()=>Promise.resolve().then(()=>ik),void 0,import.meta.url).then(t=>un(t.squirrel))}}),Mt.of({name:"Stylus",extensions:["styl"],load(){return ye(()=>Promise.resolve().then(()=>Xoa),void 0,import.meta.url).then(t=>un(t.stylus))}}),Mt.of({name:"Swift",extensions:["swift"],load(){return ye(()=>Promise.resolve().then(()=>hsa),void 0,import.meta.url).then(t=>un(t.swift))}}),Mt.of({name:"sTeX",load(){return ye(()=>Promise.resolve().then(()=>gSe),void 0,import.meta.url).then(t=>un(t.stex))}}),Mt.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return ye(()=>Promise.resolve().then(()=>gSe),void 0,import.meta.url).then(t=>un(t.stex))}}),Mt.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return ye(()=>Promise.resolve().then(()=>bSe),void 0,import.meta.url).then(t=>un(t.verilog))}}),Mt.of({name:"Tcl",extensions:["tcl"],load(){return ye(()=>Promise.resolve().then(()=>Qsa),void 0,import.meta.url).then(t=>un(t.tcl))}}),Mt.of({name:"Textile",extensions:["textile"],load(){return ye(()=>Promise.resolve().then(()=>Tsa),void 0,import.meta.url).then(t=>un(t.textile))}}),Mt.of({name:"TiddlyWiki",load(){return ye(()=>Promise.resolve().then(()=>nca),void 0,import.meta.url).then(t=>un(t.tiddlyWiki))}}),Mt.of({name:"Tiki wiki",load(){return ye(()=>Promise.resolve().then(()=>uca),void 0,import.meta.url).then(t=>un(t.tiki))}}),Mt.of({name:"TOML",extensions:["toml"],load(){return ye(()=>Promise.resolve().then(()=>pca),void 0,import.meta.url).then(t=>un(t.toml))}}),Mt.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return ye(()=>Promise.resolve().then(()=>hca),void 0,import.meta.url).then(t=>un(t.troff))}}),Mt.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return ye(()=>Promise.resolve().then(()=>Fca),void 0,import.meta.url).then(t=>un(t.ttcn))}}),Mt.of({name:"TTCN_CFG",extensions:["cfg"],load(){return ye(()=>Promise.resolve().then(()=>Gca),void 0,import.meta.url).then(t=>un(t.ttcnCfg))}}),Mt.of({name:"Turtle",extensions:["ttl"],load(){return ye(()=>Promise.resolve().then(()=>Xca),void 0,import.meta.url).then(t=>un(t.turtle))}}),Mt.of({name:"Web IDL",extensions:["webidl"],load(){return ye(()=>Promise.resolve().then(()=>mla),void 0,import.meta.url).then(t=>un(t.webIDL))}}),Mt.of({name:"VB.NET",extensions:["vb"],load(){return ye(()=>Promise.resolve().then(()=>Sla),void 0,import.meta.url).then(t=>un(t.vb))}}),Mt.of({name:"VBScript",extensions:["vbs"],load(){return ye(()=>Promise.resolve().then(()=>$la),void 0,import.meta.url).then(t=>un(t.vbScript))}}),Mt.of({name:"Velocity",extensions:["vtl"],load(){return ye(()=>Promise.resolve().then(()=>Nla),void 0,import.meta.url).then(t=>un(t.velocity))}}),Mt.of({name:"Verilog",extensions:["v"],load(){return ye(()=>Promise.resolve().then(()=>bSe),void 0,import.meta.url).then(t=>un(t.verilog))}}),Mt.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return ye(()=>Promise.resolve().then(()=>Hla),void 0,import.meta.url).then(t=>un(t.vhdl))}}),Mt.of({name:"XQuery",extensions:["xy","xquery"],load(){return ye(()=>Promise.resolve().then(()=>aua),void 0,import.meta.url).then(t=>un(t.xQuery))}}),Mt.of({name:"Yacas",extensions:["ys"],load(){return ye(()=>Promise.resolve().then(()=>mua),void 0,import.meta.url).then(t=>un(t.yacas))}}),Mt.of({name:"Z80",extensions:["z80"],load(){return ye(()=>Promise.resolve().then(()=>fua),void 0,import.meta.url).then(t=>un(t.z80))}}),Mt.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return ye(()=>Promise.resolve().then(()=>BX),void 0,import.meta.url).then(t=>un(t.mscgen))}}),Mt.of({name:"Xù",extensions:["xu"],load(){return ye(()=>Promise.resolve().then(()=>BX),void 0,import.meta.url).then(t=>un(t.xu))}}),Mt.of({name:"MsGenny",extensions:["msgenny"],load(){return ye(()=>Promise.resolve().then(()=>BX),void 0,import.meta.url).then(t=>un(t.msgenny))}}),Mt.of({name:"Vue",extensions:["vue"],load(){return ye(()=>Promise.resolve().then(()=>Dua),void 0,import.meta.url).then(t=>t.vue())}}),Mt.of({name:"Angular Template",load(){return ye(()=>Promise.resolve().then(()=>Kua),void 0,import.meta.url).then(t=>t.angular())}})],g6t="data-ink-mde-ssr-hydration-marker",h6t=`[${g6t}]`,f6t=()=>({}),b6t=([t])=>{const{editor:e}=t();e.destroy()},jJ=([t])=>{const{editor:e}=t();e.hasFocus||e.focus()};var _L=(t=>(t.Auto="auto",t.Dark="dark",t.Light="light",t))(_L||{}),Fo=(t=>(t.Bold="bold",t.Code="code",t.CodeBlock="code_block",t.Heading="heading",t.Image="image",t.Italic="italic",t.Link="link",t.List="list",t.OrderedList="ordered_list",t.Quote="quote",t.TaskList="task_list",t))(Fo||{}),UJ=(t=>(t.End="end",t.Start="start",t))(UJ||{});const c0e={auto:"auto",dark:"dark",light:"light"},Qw={completion:"completion",default:"default",grammar:"grammar",language:"language"},UMe=t=>{const e=t.map(n=>eS.fromJSON({anchor:n.start,head:n.end}));return Kt.create(e)},GMe=t=>t.ranges.map(e=>({end:e.anchor({block:!1,line:!1,multiline:!1,nodes:[],prefix:"",prefixStates:[],suffix:"",...t}),y6t={[Fo.Bold]:fm({nodes:["StrongEmphasis"],prefix:"**",suffix:"**"}),[Fo.Code]:fm({nodes:["InlineCode"],prefix:"`",suffix:"`"}),[Fo.CodeBlock]:fm({block:!0,nodes:["FencedCode"],prefix:"```\n",suffix:"\n```"}),[Fo.Heading]:fm({multiline:!0,nodes:["ATXHeading1","ATXHeading2","ATXHeading3","ATXHeading4","ATXHeading5","ATXHeading6"],prefix:"# ",prefixStates:["# ","## ","### ","#### ","##### ","###### ",""]}),[Fo.Image]:fm({nodes:["Image"],prefix:"![](",suffix:")"}),[Fo.Italic]:fm({nodes:["Emphasis"],prefix:"*",suffix:"*"}),[Fo.Link]:fm({nodes:["Link"],prefix:"[](",suffix:")"}),[Fo.OrderedList]:fm({line:!0,multiline:!0,nodes:["OrderedList"],prefix:"1. "}),[Fo.Quote]:fm({line:!0,multiline:!0,nodes:["Blockquote"],prefix:"> "}),[Fo.TaskList]:fm({line:!0,multiline:!0,nodes:["BulletList"],prefix:"- [ ] "}),[Fo.List]:fm({line:!0,multiline:!0,nodes:["BulletList"],prefix:"- "})},w6t=({editor:t,selection:e})=>{let n=e.start;const a=[];for(;n<=e.end;){const r=t.lineBlockAt(n),i=Math.max(e.start,r.from),o=Math.min(e.end,r.to);a.push({start:i,end:o}),n=r.to+1}return a},v6t=({editor:t,formatDefinition:e,selection:n})=>{if(!t||!e)return n||{start:0,end:0};const a=n||GMe(t.state.selection).pop()||{start:0,end:0};if(e.block||e.line||e.multiline){const o=t.lineBlockAt(a.start).from,s=t.lineBlockAt(a.end).to;return{start:o,end:s}}const r=t.state.wordAt(a.start)?.from||a.start,i=t.state.wordAt(a.end)?.to||a.end;return{start:r,end:i}},HMe=t=>t.editor.state.sliceDoc(t.selection.start,t.selection.end),k6t=(t,e,n)=>x6t(t,n).find(({type:a})=>e.nodes.includes(a.name)),x6t=(t,e)=>{const n=[];return Ar(t.state).iterate({from:e.start,to:e.end,enter:({type:a,from:r,to:i})=>{n.push({type:a,from:r,to:i})}}),n},cce=t=>{const e=HMe(t),n=t.formatDefinition.prefix.length,a=t.formatDefinition.suffix.length*-1||e.length,r=e.slice(n,a);return[{from:t.selection.start,to:t.selection.end,insert:r}]},O6t=t=>{if(t.node){const e=t.node.from,n=t.node.to;return cce({...t,selection:{start:e,end:n}})}else{const e=t.formatDefinition.prefix,n=t.formatDefinition.suffix;return[{from:t.selection.start,insert:e},{from:t.selection.end,insert:n}]}},C6t=t=>{const e=w6t(t),n=[];return e.forEach(a=>{const r=WMe({...t,selection:a});n.push(...r)}),n},WMe=t=>{const e=t.formatDefinition.prefixStates.length>0,n=HMe(t);if(t.node&&e){const a=t.formatDefinition.prefixStates.find(r=>n.startsWith(r));if(a){const r=t.formatDefinition.prefixStates.indexOf(a),i=t.formatDefinition.prefixStates[r+1],o=n.replace(new RegExp(`^${a}`),i);return[{from:t.selection.start,to:t.selection.end,insert:o}]}}else if(t.node&&n.startsWith(t.formatDefinition.prefix))return cce(t);return[{from:t.selection.start,insert:t.formatDefinition.prefix}]},_6t=t=>{if(t.node){const e=t.node.from,n=t.node.to;return cce({...t,selection:{start:e,end:n}})}else{const{formatDefinition:e,selection:n}=t,a=Array.isArray(e.prefix)?e.prefix[0]:e.prefix,r=e.suffix;return[{from:n.start,insert:a},{from:n.end,insert:r}]}},B6t=t=>t.formatDefinition.block?O6t(t):t.formatDefinition.multiline?C6t(t):t.formatDefinition.line?WMe(t):_6t(t),YMe=([t],e,{selection:n}={})=>{const{editor:a}=t(),r=y6t[e],i=v6t({editor:a,formatDefinition:r,selection:n}),o=k6t(a,r,i),s=B6t({editor:a,formatDefinition:r,node:o,selection:i}),l=s.reduce((d,p)=>{const A=p.insert.length-((p.to||p.from)-p.from);return d+A},0),u=t().editor.state.update({changes:s,selection:{head:i.start,anchor:i.end+l}});t().editor.dispatch(u)},E6t=([t])=>{const{editor:e}=t();return e.state.sliceDoc()},lce=([t])=>{const{editor:e}=t();return GMe(e.state.selection)},XM=([t,e],n,a,r=!1)=>{const{editor:i}=t();let o=a?.start,s=a?.end||a?.start;if(typeof o>"u"){const u=lce([t,e]).pop();o=u.start,s=u.end}const l={changes:{from:o,to:s,insert:n}};if(r){const u=o===s?o+n.length:o,d=o+n.length;Object.assign(l,{selection:{anchor:u,head:d}})}i.dispatch(i.state.update(l))},Q6t={array:"[object Array]",asyncFunction:"[object AsyncFunction]",boolean:"[object Boolean]",function:"[object Function]",null:"[object Null]",number:"[object Number]",object:"[object Object]",promise:"[object Promise]",string:"[object String]",symbol:"[object Symbol]",undefined:"[object Undefined]",window:"[object Window]"},S6t=(t,e)=>Object.prototype.toString.call(e)===t,XMe=t=>S6t(Q6t.promise,t),a3=t=>$6t(t,XMe),I6t=(t,e)=>e.type===t,D6t=(t,e)=>!!t&&t in e,W1=(t,e)=>VMe(e.plugins).reduce((n,a)=>(I6t(t,a)&&(!a.key||D6t(a.key,e)&&e[a.key])&&n.push(a.value),n),[]),VMe=t=>t.reduce((e,n)=>Array.isArray(n)?e.concat(VMe(n)):e.concat(n),[]),$6t=(t,e)=>t.reduce((n,a)=>(e(a)?n[0].push(a):n[1].push(a),n),[[],[]]),T6t=([t,e])=>{const n=[],[a,r]=P6t(t().options),[i,o]=F6t(t().options);return Math.max(a.length,i.length)>0&&t().workQueue.enqueue(async()=>{const s=await VM([t,e]);t().editor.dispatch({effects:s})}),sce({base:n3,codeLanguages:[...jMe,...o],extensions:[...n,...r]})},P6t=t=>a3(W1(Qw.grammar,t)),F6t=t=>a3(W1(Qw.language,t)),R6t=async([t])=>{const e=[],n=await Promise.all(W1(Qw.grammar,t().options)),a=await Promise.all(W1(Qw.language,t().options));return sce({base:n3,codeLanguages:[...jMe,...a],extensions:[...e,...n]})},L6t=()=>{const t=new Ix;return{compartment:t,initialValue:e=>t.of(T6t(e)),reconfigure:async e=>t.reconfigure(await R6t(e))}},l0e=()=>document.createElement("div"),ZMe=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,N6t=t=>t===_L.Dark?!0:t===_L.Light?!1:ZMe(),NG=t=>{const e=[{suffix:"border-radius",default:"0.25rem"},{suffix:"color",default:"currentColor"},{suffix:"flex-direction",default:"column"},{suffix:"font-family",default:"inherit"},{suffix:"block-background-color",default:"#121212",light:"#f5f5f5"},{suffix:"block-background-color-on-hover",default:"#0f0f0f",light:"#e0e0e0"},{suffix:"block-max-height",default:"20rem"},{suffix:"block-padding",default:"0.5rem"},{suffix:"code-background-color",default:"var(--ink-internal-block-background-color)"},{suffix:"code-color",default:"inherit"},{suffix:"code-font-family",default:"'Monaco', Courier, monospace"},{suffix:"editor-font-size",default:"1em"},{suffix:"editor-line-height",default:"2em"},{suffix:"editor-padding",default:"0.5rem"},{suffix:"inline-padding",default:"0.125rem"},{suffix:"modal-position",default:"fixed"},{suffix:"syntax-atom-color",default:"#d19a66"},{suffix:"syntax-comment-color",default:"#abb2bf"},{suffix:"syntax-comment-font-style",default:"italic"},{suffix:"syntax-emphasis-color",default:"inherit"},{suffix:"syntax-emphasis-font-style",default:"italic"},{suffix:"syntax-hashtag-background-color",default:"#222",light:"#eee"},{suffix:"syntax-hashtag-color",default:"inherit"},{suffix:"syntax-heading-color",default:"inherit"},{suffix:"syntax-heading-font-weight",default:"600"},{suffix:"syntax-heading1-color",default:"var(--ink-internal-syntax-heading-color, inherit)"},{suffix:"syntax-heading1-font-size",default:"1.6em"},{suffix:"syntax-heading1-font-weight",default:"600"},{suffix:"syntax-heading2-color",default:"var(--ink-internal-syntax-heading-color, inherit)"},{suffix:"syntax-heading2-font-size",default:"1.5em"},{suffix:"syntax-heading2-font-weight",default:"600"},{suffix:"syntax-heading3-color",default:"var(--ink-internal-syntax-heading-color, inherit)"},{suffix:"syntax-heading3-font-size",default:"1.4em"},{suffix:"syntax-heading3-font-weight",default:"600"},{suffix:"syntax-heading4-color",default:"var(--ink-internal-syntax-heading-color, inherit)"},{suffix:"syntax-heading4-font-size",default:"1.3em"},{suffix:"syntax-heading4-font-weight",default:"600"},{suffix:"syntax-heading5-color",default:"var(--ink-internal-syntax-heading-color, inherit)"},{suffix:"syntax-heading5-font-size",default:"1.2em"},{suffix:"syntax-heading5-font-weight",default:"600"},{suffix:"syntax-heading6-color",default:"var(--ink-internal-syntax-heading-color, inherit)"},{suffix:"syntax-heading6-font-size",default:"1.1em"},{suffix:"syntax-heading6-font-weight",default:"600"},{suffix:"syntax-highlight-background-color",default:"#555555"},{suffix:"syntax-keyword-color",default:"#c678dd"},{suffix:"syntax-link-color",default:"inherit"},{suffix:"syntax-meta-color",default:"#abb2bf"},{suffix:"syntax-monospace-color",default:"var(--ink-internal-code-color)"},{suffix:"syntax-monospace-font-family",default:"var(--ink-internal-code-font-family)"},{suffix:"syntax-name-color",default:"#d19a66"},{suffix:"syntax-name-label-color",default:"#abb2bf"},{suffix:"syntax-name-property-color",default:"#96c0d8"},{suffix:"syntax-name-property-definition-color",default:"#e06c75"},{suffix:"syntax-name-variable-color",default:"#e06c75"},{suffix:"syntax-name-variable-definition-color",default:"#e5c07b"},{suffix:"syntax-name-variable-local-color",default:"#d19a66"},{suffix:"syntax-name-variable-special-color",default:"inherit"},{suffix:"syntax-number-color",default:"#d19a66"},{suffix:"syntax-operator-color",default:"#96c0d8"},{suffix:"syntax-processing-instruction-color",default:"#444444",light:"#bbbbbb"},{suffix:"syntax-punctuation-color",default:"#abb2bf"},{suffix:"syntax-strikethrough-color",default:"inherit"},{suffix:"syntax-strikethrough-text-decoration",default:"line-through"},{suffix:"syntax-string-color",default:"#98c379"},{suffix:"syntax-string-special-color",default:"inherit"},{suffix:"syntax-strong-color",default:"inherit"},{suffix:"syntax-strong-font-weight",default:"600"},{suffix:"syntax-url-color",default:"#aaaaaa",light:"#666666"},{suffix:"toolbar-group-spacing",default:"2rem"},{suffix:"toolbar-item-spacing",default:"0"}],n=!N6t(t.options.interface.appearance);return e.map(a=>{const r=n&&a.light?a.light:a.default;return`--ink-internal-${a.suffix}: var(--ink-${a.suffix}, ${r});`})},M6t=t=>[Sn.theme({".cm-scroller":{fontFamily:"var(--ink-internal-font-family)"}},{dark:t})],z6t=([t,e])=>t().extensions.map(n=>n.initialValue([t,e])),VM=async([t,e])=>await Promise.all(t().extensions.map(async n=>await n.reconfigure([t,e]))),q6t=t=>{const e=new Ix;return{compartment:e,initialValue:n=>e.of(t(n)),reconfigure:n=>e.reconfigure(t(n))}},j6t=t=>{const e=new Ix;return{compartment:e,initialValue:()=>e.of([]),reconfigure:n=>t(n,e)}},U6t=()=>[L6t(),...G6t.map(t=>q6t(t)),...H6t.map(t=>j6t(t))],G6t=[([t])=>{const[e,n]=a3(W1(Qw.default,t().options));return n},([t])=>{const e=t().options.interface.appearance===c0e.dark,n=t().options.interface.appearance===c0e.auto;return M6t(e||n&&ZMe())}],H6t=[async([t],e)=>{const[n]=a3(W1(Qw.default,t().options));return n.length>0?e.reconfigure(await Promise.all(n)):e.reconfigure([])},async([t],e)=>{if(t().options.interface.autocomplete){const{autocomplete:n}=await ye(async()=>{const{autocomplete:a}=await Promise.resolve().then(()=>eda);return{autocomplete:a}},void 0,import.meta.url);return e.reconfigure(n(t().options))}return e.reconfigure([])},async([t],e)=>{if(t().options.interface.images){const{images:n}=await ye(async()=>{const{images:a}=await Promise.resolve().then(()=>ada);return{images:a}},void 0,import.meta.url);return e.reconfigure(n())}return e.reconfigure([])},async([t],e)=>{const{keybindings:n,trapTab:a}=t().options,r=a??n.tab,i=a??n.shiftTab;if(r||i){const{indentWithTab:o}=await ye(async()=>{const{indentWithTab:s}=await Promise.resolve().then(()=>ida);return{indentWithTab:s}},void 0,import.meta.url);return e.reconfigure(o({tab:r,shiftTab:i}))}return e.reconfigure([])},async([t],e)=>{const{options:n}=t();if(n.lists||n.interface.lists){const{lists:a}=await ye(async()=>{const{lists:s}=await Promise.resolve().then(()=>mda);return{lists:s}},void 0,import.meta.url);let r=!0,i=!0,o=!0;return typeof n.lists=="object"&&(r=typeof n.lists.bullet>"u"?!1:n.lists.bullet,i=typeof n.lists.number>"u"?!1:n.lists.number,o=typeof n.lists.task>"u"?!1:n.lists.task),e.reconfigure(a({bullet:r,number:i,task:o}))}return e.reconfigure([])},async([t],e)=>{if(t().options.placeholder){const{placeholder:n}=await ye(async()=>{const{placeholder:a}=await Promise.resolve().then(()=>gda);return{placeholder:a}},void 0,import.meta.url);return e.reconfigure(n(t().options.placeholder))}return e.reconfigure([])},async([t],e)=>{if(t().options.interface.readonly){const{readonly:n}=await ye(async()=>{const{readonly:a}=await Promise.resolve().then(()=>fda);return{readonly:a}},void 0,import.meta.url);return e.reconfigure(n())}return e.reconfigure([])},async([t],e)=>{if(t().options.search){const{search:n}=await ye(async()=>{const{search:a}=await Promise.resolve().then(()=>Mda);return{search:a}},void 0,import.meta.url);return e.reconfigure(n())}return e.reconfigure([])},async([t],e)=>{if(t().options.interface.spellcheck){const{spellcheck:n}=await ye(async()=>{const{spellcheck:a}=await Promise.resolve().then(()=>qda);return{spellcheck:a}},void 0,import.meta.url);return e.reconfigure(n())}return e.reconfigure([])},async([t],e)=>{if(t().options.vim){const{vim:n}=await ye(async()=>{const{vim:a}=await Promise.resolve().then(()=>bpa);return{vim:a}},void 0,import.meta.url);return e.reconfigure(n())}return e.reconfigure([])}],W6t=["Blockquote"],Y6t=na.line({attributes:{class:"cm-blockquote"}}),X6t=na.line({attributes:{class:"cm-blockquote-open"}}),V6t=na.line({attributes:{class:"cm-blockquote-close"}}),Z6t=wu.define(t=>({update:()=>K6t(t)}),{decorations:t=>t.update()}),K6t=t=>{const e=new ay,n=Ar(t.state);for(const a of t.visibleRanges)for(let r=a.from;r[Z6t],eFt=["CodeBlock","FencedCode","HTMLBlock","CommentBlock"],fE={"data-enable-grammarly":"false","data-gramm":"false","data-grammarly-skip":"true",spellcheck:"false"},tFt=na.line({attributes:{...fE,class:"cm-codeblock"}}),nFt=na.line({attributes:{...fE,class:"cm-codeblock-open"}}),aFt=na.line({attributes:{...fE,class:"cm-codeblock-close"}}),rFt=na.mark({attributes:{...fE,class:"cm-code"}}),iFt=na.mark({attributes:{...fE,class:"cm-code cm-code-open"}}),oFt=na.mark({attributes:{...fE,class:"cm-code cm-code-close"}}),sFt=wu.define(t=>({update:()=>cFt(t)}),{decorations:t=>t.update()}),cFt=t=>{const e=new ay,n=Ar(t.state);for(const a of t.visibleRanges)for(let r=a.from;r[sFt],uFt=()=>[Sn.editorAttributes.of({class:"ink-mde-container"}),Sn.contentAttributes.of({class:"ink-mde-editor-content"})],dFt=()=>[...uFt()],pFt=()=>Sn.lineWrapping,AFt=()=>[R7e(AE.define([{tag:K.atom,color:"var(--ink-internal-syntax-atom-color)"},{tag:K.meta,color:"var(--ink-internal-syntax-meta-color)"},{tag:K.emphasis,color:"var(--ink-internal-syntax-emphasis-color)",fontStyle:"var(--ink-internal-syntax-emphasis-font-style)"},{tag:K.strong,color:"var(--ink-internal-syntax-strong-color)",fontWeight:"var(--ink-internal-syntax-strong-font-weight)"},{tag:K.strikethrough,color:"var(--ink-internal-syntax-strikethrough-color)",textDecoration:"var(--ink-internal-syntax-strikethrough-text-decoration)"},{tag:K.comment,color:"var(--ink-internal-syntax-comment-color)",fontStyle:"var(--ink-internal-syntax-comment-font-style)"},{tag:K.monospace,color:"var(--ink-internal-syntax-code-color)",fontFamily:"var(--ink-internal-syntax-code-font-family)"},{tag:K.name,color:"var(--ink-internal-syntax-name-color)"},{tag:K.labelName,color:"var(--ink-internal-syntax-name-label-color)"},{tag:K.propertyName,color:"var(--ink-internal-syntax-name-property-color)"},{tag:K.definition(K.propertyName),color:"var(--ink-internal-syntax-name-property-definition-color)"},{tag:K.variableName,color:"var(--ink-internal-syntax-name-variable-color)"},{tag:K.definition(K.variableName),color:"var(--ink-internal-syntax-name-variable-definition-color)"},{tag:K.local(K.variableName),color:"var(--ink-internal-syntax-name-variable-local-color)"},{tag:K.special(K.variableName),color:"var(--ink-internal-syntax-name-variable-special-color)"},{tag:K.heading,color:"var(--ink-internal-syntax-heading-color)",fontWeight:"var(--ink-internal-syntax-heading-font-weight)"},{tag:K.heading1,color:"var(--ink-internal-syntax-heading1-color)",fontSize:"var(--ink-internal-syntax-heading1-font-size)",fontWeight:"var(--ink-internal-syntax-heading1-font-weight)"},{tag:K.heading2,color:"var(--ink-internal-syntax-heading2-color)",fontSize:"var(--ink-internal-syntax-heading2-font-size)",fontWeight:"var(--ink-internal-syntax-heading2-font-weight)"},{tag:K.heading3,color:"var(--ink-internal-syntax-heading3-color)",fontSize:"var(--ink-internal-syntax-heading3-font-size)",fontWeight:"var(--ink-internal-syntax-heading3-font-weight)"},{tag:K.heading4,color:"var(--ink-internal-syntax-heading4-color)",fontSize:"var(--ink-internal-syntax-heading4-font-size)",fontWeight:"var(--ink-internal-syntax-heading4-font-weight)"},{tag:K.heading5,color:"var(--ink-internal-syntax-heading5-color)",fontSize:"var(--ink-internal-syntax-heading5-font-size)",fontWeight:"var(--ink-internal-syntax-heading5-font-weight)"},{tag:K.heading6,color:"var(--ink-internal-syntax-heading6-color)",fontSize:"var(--ink-internal-syntax-heading6-font-size)",fontWeight:"var(--ink-internal-syntax-heading6-font-weight)"},{tag:K.keyword,color:"var(--ink-internal-syntax-keyword-color)"},{tag:K.number,color:"var(--ink-internal-syntax-number-color)"},{tag:K.operator,color:"var(--ink-internal-syntax-operator-color)"},{tag:K.punctuation,color:"var(--ink-internal-syntax-punctuation-color)"},{tag:K.link,color:"var(--ink-internal-syntax-link-color)",wordBreak:"break-all"},{tag:K.url,color:"var(--ink-internal-syntax-url-color)",wordBreak:"break-all"},{tag:K.string,color:"var(--ink-internal-syntax-string-color)"},{tag:K.special(K.string),color:"var(--ink-internal-syntax-string-special-color)"},{tag:K.processingInstruction,color:"var(--ink-internal-syntax-processing-instruction-color)"}]))],mFt=t=>{if(t.length>0)return UMe(t)},KMe=([t,e])=>{const{selections:n}=t().options;return Mr.create({doc:t().options.doc,selection:mFt(n),extensions:[Dx.of([..._5t,...R3t]),J6t(),lFt(),E3t(),dFt(),pFt(),AFt(),...z6t([t,e])]})},gFt=([t,e],n)=>{const a=n?.getRootNode(),r=a?.nodeType===11?a:void 0,i=new Sn({dispatch:o=>{const{options:s}=t(),l=o.newDoc.toString();s.hooks.beforeUpdate(l),i.update([o]),o.docChanged&&(e({...t(),doc:l}),s.hooks.afterUpdate(l))},root:r,state:KMe([t,e])});return i},yk={array:"[object Array]",object:"[object Object]",string:"[object String]",undefined:"[object Undefined]",window:"[object Window]"},hFt=t=>{if(Object.prototype.toString.call(t)===yk.object)return`[object ${t.constructor.name}]`},FO=(t,e)=>hFt(t)===e,fFt=(t,e)=>{const n=new WeakMap,a=(r,i)=>n.get(r)||(FO(r,yk.object)&&n.set(r,!0),FO(i,yk.undefined))?r:FO(r,yk.array)&&FO(i,yk.array)?[...i]:FO(r,yk.object)&&FO(i,yk.object)?Object.keys(r).reduce((o,s)=>(Object.hasOwnProperty.call(i,s)?o[s]=a(r[s],i[s]):o[s]=r[s],o),{}):i;return a(t,e)},r3=(t,e)=>fFt(t,e),bFt=([t,e],n)=>{e(r3(t(),{options:{doc:n}})),t().editor.setState(KMe([t,e]))},yFt=([t])=>t().options,wFt=async([t,e],n)=>{const{workQueue:a}=t();return a.enqueue(async()=>{e(r3(t(),{options:n}));const r=await VM([t,e]);t().editor.dispatch({effects:r})})},JMe=(t,e={})=>{if(e.selections)return eze(t,e.selections);if(e.selection)return GJ(t,e.selection);if(e.at)return vFt(t,e.at)},vFt=(t,e)=>{const[n]=t;if(e===UJ.Start)return GJ(t,{start:0,end:0});if(e===UJ.End){const a=n().editor.state.doc.length;return GJ(t,{start:a,end:a})}},eze=([t],e)=>{const{editor:n}=t();n.dispatch(n.state.update({selection:UMe(e)}))},GJ=(t,e)=>eze(t,[e]),kFt=([t],e)=>{const{editor:n}=t();n.dispatch(n.state.update({changes:{from:0,to:n.state.doc.length,insert:e}}))},xFt=([t,e],{after:n,before:a,selection:r})=>{const{editor:i}=t(),o=r||lce([t,e]).pop()||{start:0,end:0},s=i.state.sliceDoc(o.start,o.end);XM([t,e],`${a}${s}${n}`,o),JMe([t,e],{selections:[{start:o.start+a.length,end:o.end+a.length}]})},OFt=(t,e)=>{const n={callbacks:{fulfilled:[],rejected:[],settled:[]},status:"pending"},a=(s,{resolve:l,reject:u})=>()=>{try{const d=s(n.value);Promise.resolve(d).then(l,u)}catch(d){u(d)}},r=s=>{n.status==="pending"&&(n.status="rejected",n.value=s,n.callbacks.rejected.forEach(l=>l()),n.callbacks.settled.forEach(l=>l()))},i=s=>{n.status==="pending"&&(n.status="fulfilled",n.value=s,n.callbacks.fulfilled.forEach(l=>l()),n.callbacks.settled.forEach(l=>l()))},o=(s,l)=>new Promise((u,d)=>{n.status==="pending"&&(s&&n.callbacks.fulfilled.push(a(s,{resolve:u,reject:d})),l&&n.callbacks.rejected.push(a(l,{resolve:void 0,reject:d}))),n.status==="fulfilled"&&s&&a(s,{resolve:u,reject:d})(),n.status==="rejected"&&l&&a(l,{resolve:void 0,reject:d})()});return queueMicrotask(()=>{try{e(i,r)}catch(s){r(s)}}),{...t,[Symbol.toStringTag]:"awaitable",catch:o.bind(void 0,void 0),finally:s=>new Promise((l,u)=>{n.status==="pending"&&n.callbacks.settled.push(a(s,{resolve:l,reject:u})),n.status==="fulfilled"&&(s(),l(n.value)),n.status==="rejected"&&(s(),u(n.value))}),then:o}},tze=t=>{const e={destroy:b6t.bind(void 0,t),focus:jJ.bind(void 0,t),format:YMe.bind(void 0,t),getDoc:E6t.bind(void 0,t),insert:XM.bind(void 0,t),load:bFt.bind(void 0,t),options:yFt.bind(void 0,t),reconfigure:wFt.bind(void 0,t),select:JMe.bind(void 0,t),selections:lce.bind(void 0,t),update:kFt.bind(void 0,t),wrap:xFt.bind(void 0,t)};return OFt(e,(n,a)=>{try{const[r]=t;r().workQueue.enqueue(()=>n(e))}catch(r){a(r)}})},CFt=t=>aze({block:!0,side:-1,...t}),nze=t=>na.line({...t,type:"line"}),_Ft=t=>na.mark({...t,type:"mark"}),bE=t=>{const e=n=>t.eq?t.eq(n):t.id?t.id===n.id:!1;return{compare:n=>e(n),coordsAt:()=>null,destroy:()=>{},eq:n=>e(n),estimatedHeight:-1,ignoreEvent:()=>!0,lineBreaks:0,toDOM:()=>document.createElement("span"),updateDOM:()=>!1,...t}},aze=t=>na.widget({block:!1,side:0,...t,widget:bE({...t.widget}),type:"widget"}),OF=(t,e)=>{const n=[];return Ar(t).iterate({enter:a=>{if(e.nodes.includes(a.type.name)){const r=e.onMatch(t,a);if(!r)return;Array().concat(r).forEach(i=>{if(i.spec.type==="line"){const o=nze({...i.spec,node:{...a}});for(let s=t.doc.lineAt(a.from);s.froma.from-r.from)},BFt=(t,e,n)=>{const a=[],r=t.iter(),i=[],o=[];for(;r.value;)i.push({...r}),r.next();e.changes.iterChangedRanges((l,u,d,p)=>{i.forEach(m=>{if(m.value){const g=m.value.spec.node.to-m.value.spec.node.from,h=m.from,f=m.from+g;EFt(h,f,d,p)&&o.push(m)}});const A={from:d,to:p};a.push(...OF(e.state,{...n,range:A}))});const s=i.filter(l=>!o.includes(l)).flatMap(l=>{const u=l.value?.range(l.from);return u?[u]:[]});return a.push(...s),a.sort((l,u)=>l.from-u.from)},EFt=(t,e,n,a)=>Math.max(t,n)<=Math.min(e,a),u0e=t=>sc.define({create(e){return ti.of(OF(e,t))},update(e,n){if(n.reconfigured||n.effects.length>0)return ti.of(OF(n.state,t));const a=e.map(n.changes);return n.docChanged?t.optimize?ti.of(BFt(a,n,t)):ti.of(OF(n.state,t)):a},provide(e){return Sn.decorations.from(e)}}),QFt=t=>Xm.define(t),SFt=t=>t.charCodeAt(0),yE=t=>uce(t,[K.processingInstruction]),uce=(t,e=[])=>{const n=QFt();return{node:TFt({name:t,style:[n,...e]}),tag:n}},IFt=t=>t,DFt=t=>t,$Ft=t=>t,TFt=t=>t,oS={dollarSign:SFt("$")},PFt=/\$.*?\$/,FFt=/\$(?.*?)\$/,BL=uce("MathInline"),EL=yE("MathInlineMark"),dce=yE("MathInlineMarkOpen"),pce=yE("MathInlineMarkClose"),RFt=DFt({name:BL.node.name,parse:(t,e,n)=>{if(e!==oS.dollarSign)return-1;const a=t.slice(n,t.end);if(!PFt.test(a))return-1;const r=a.match(FFt);if(!r?.groups?.math)return-1;const i=r.groups.math.length;return t.addElement(t.elt(BL.node.name,n,n+i+2,[t.elt(EL.node.name,n,n+1,[t.elt(dce.node.name,n,n+1)]),t.elt(EL.node.name,n+i+1,n+i+2,[t.elt(pce.node.name,n+i+1,n+i+2)])]))}}),rze=uce("MathBlock"),HJ=yE("MathBlockMark"),ize=yE("MathBlockMarkOpen"),oze=yE("MathBlockMarkClose"),LFt=IFt({name:"MathBlock",parse:(t,e)=>{if(e.next!==oS.dollarSign||e.text.charCodeAt(e.pos+1)!==oS.dollarSign)return!1;const n=t.lineStart+e.pos,a=n+e.text.length;for(;t.nextLine();)if(e.next===oS.dollarSign&&e.text.charCodeAt(e.pos+1)===oS.dollarSign){const r=t.lineStart+e.pos,i=r+e.text.length;t.addElement(t.elt(rze.node.name,n,i,[t.elt(HJ.node.name,n,a,[t.elt(ize.node.name,n,a)]),t.elt(HJ.node.name,r,i,[t.elt(oze.node.name,r,i)])])),t.nextLine();break}return!0}}),NFt=$Ft({defineNodes:[BL.node,EL.node,pce.node,dce.node,rze.node,HJ.node,ize.node,oze.node],parseBlock:[LFt],parseInline:[RFt]}),MFt=()=>[X2({key:"katex",type:Qw.grammar,value:async()=>NFt}),X2({key:"katex",value:async()=>u0e({nodes:["MathBlock","MathBlockMarkClose","MathBlockMarkOpen"],onMatch:(t,e)=>{const n=["ink-mde-line-math-block"];return e.name==="MathBlockMarkOpen"&&n.push("ink-mde-line-math-block-open"),e.name==="MathBlockMarkClose"&&n.push("ink-mde-line-math-block-close"),nze({attributes:{class:n.join(" ")}})},optimize:!1})}),X2({key:"katex",value:async()=>u0e({nodes:["MathBlock"],onMatch:(t,e)=>{const n=t.sliceDoc(e.from,e.to).split(` `).slice(1,-1).join(` `);if(n)return CFt({widget:bE({id:n,toDOM:a=>{const r=document.createElement("div"),i=document.createElement("div");return r.className="ink-mde-block-widget-container",i.className="ink-mde-block-widget ink-mde-katex-target",r.appendChild(i),ye(async()=>{const{default:o}=await Promise.resolve().then(()=>QK);return{default:o}},void 0,import.meta.url).then(({default:o})=>{o.render(n,i,{output:"html",throwOnError:!1}),a.requestMeasure()}),r},updateDOM:(a,r)=>{const i=a.querySelector(".ink-mde-katex-target");return i?(ye(async()=>{const{default:o}=await Promise.resolve().then(()=>QK);return{default:o}},void 0,import.meta.url).then(({default:o})=>{o.render(n,i,{output:"html",throwOnError:!1}),r.requestMeasure()}),!0):!1}})})},optimize:!1})}),X2({key:"katex",value:async()=>R7e(AE.define([{tag:[BL.tag,EL.tag],backgroundColor:"var(--ink-internal-block-background-color)"},{tag:[pce.tag],backgroundColor:"var(--ink-internal-block-background-color)",borderRadius:"0 var(--ink-internal-border-radius) var(--ink-internal-border-radius) 0",paddingRight:"var(--ink-internal-inline-padding)"},{tag:[dce.tag],backgroundColor:"var(--ink-internal-block-background-color)",borderRadius:"var(--ink-internal-border-radius) 0 0 var(--ink-internal-border-radius)",paddingLeft:"var(--ink-internal-inline-padding)"}]))}),X2({key:"katex",value:async()=>Sn.theme({".ink-mde-line-math-block":{backgroundColor:"var(--ink-internal-block-background-color)",padding:"0 var(--ink-internal-block-padding) !important"},".ink-mde-line-math-block-open":{borderRadius:"var(--ink-internal-border-radius) var(--ink-internal-border-radius) 0 0"},".ink-mde-line-math-block-close":{borderRadius:"0 0 var(--ink-internal-border-radius) var(--ink-internal-border-radius)"}})})],zFt=()=>{const t={queue:[],workload:0},e=async()=>{const n=t.queue.pop();n&&(await n(),t.workload--,await e())};return{enqueue:n=>new Promise((a,r)=>{const i=async()=>{try{await n(),a()}catch(o){r(o)}};t.queue.push(i),t.workload++,!(t.workload>1)&&e()})}},WJ=()=>{const t={doc:"",files:{clipboard:!1,dragAndDrop:!1,handler:()=>{},injectMarkup:!0,types:["image/*"]},hooks:{afterUpdate:()=>{},beforeUpdate:()=>{}},interface:{appearance:_L.Auto,attribution:!0,autocomplete:!1,images:!1,lists:!1,readonly:!1,spellcheck:!0,toolbar:!1},katex:!1,keybindings:{tab:!0,shiftTab:!0},lists:!1,placeholder:"",plugins:[MFt()],readability:!1,search:!0,selections:[],toolbar:{bold:!0,code:!0,codeBlock:!0,heading:!0,image:!0,italic:!0,link:!0,list:!0,orderedList:!0,quote:!0,taskList:!0,upload:!1},trapTab:void 0,vim:!1};return{doc:"",editor:{},extensions:U6t(),options:t,root:l0e(),target:l0e(),workQueue:zFt()}},qFt=t=>r3(WJ(),t),sze=(t,e={})=>{const[n,a]=F0(qFt({...e,doc:t.doc||"",options:t}));return[n,a]},Ace=225,jFt=(t,e=Ace)=>{const n=HFt(t,e),a=WFt(t),r=GFt(t),i=UFt(t);return[n,a,r,i].join(" | ")},UFt=t=>`${YFt(t)} chars`,GFt=t=>`${XFt(t)} lines`,HFt=(t,e=Ace)=>{const n=VFt(t,e),a=Math.floor(n),r=Math.floor(n%1*60);return a===0?`${r}s read`:`${a}m ${r}s to read`},WFt=t=>`${cze(t)} words`,YFt=t=>t.length,XFt=t=>t.split(/\n/).length,VFt=(t,e=Ace)=>cze(t)/e,cze=t=>{const e=t.replace(/[']/g,"").replace(/[^\w\d]+/g," ").trim();return e?e.split(/\s+/).length:0};var ZFt=to("
    "),KFt=to(" |"),JFt=to('
     powered by ink-mde'),e9t=to("
    ");const t9t=()=>{const[t]=wE();return(()=>{var e=vi(e9t),n=e.firstChild,a=n.firstChild,r=a.firstChild,[i,o]=yo(r.nextSibling),s=i.nextSibling,[l,u]=yo(s.nextSibling),d=l.nextSibling,[p,A]=yo(d.nextSibling);return ki(a,Ha(Po,{get when(){return t().options.readability},get children(){var m=vi(ZFt),g=m.firstChild;return ki(g,()=>jFt(t().doc)),m}}),i,o),ki(a,Ha(Po,{get when(){return N1(()=>!!t().options.readability)()&&t().options.interface.attribution},get children(){return vi(KFt)}}),l,u),ki(a,Ha(Po,{get when(){return t().options.interface.attribution},get children(){return vi(JFt)}}),p,A),e})()},n9t=".ink-drop-zone{align-items:center;background-color:#00000080;color:var(--ink-internal-color);display:flex;inset:0;justify-content:center;position:var(--ink-internal-modal-position);z-index:100}.ink-drop-zone:not(.visible){display:none}.ink-drop-zone-modal{background-color:var(--ink-internal-block-background-color);border-radius:var(--ink-internal-border-radius);box-sizing:border-box;height:100%;max-height:20rem;max-width:40rem;padding:1rem;position:relative;width:100%}.ink-drop-zone-hide{cursor:pointer;height:1.75rem;position:absolute;right:.25rem;top:.25rem;width:1.75rem}.ink-drop-zone-hide svg{background-color:var(--ink-internal-block-background-color)}.ink-drop-zone-droppable-area{align-items:center;border:.2rem dashed var(--ink-internal-color);border-radius:.125rem;box-sizing:border-box;display:flex;flex-direction:column;font-size:1.25em;gap:1rem;height:100%;justify-content:center;padding:1rem;text-align:center}.ink-drop-zone-file-preview{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;max-width:25.5rem}.ink-drop-zone-file-preview-image{border:.125rem solid #222;border-radius:.125rem;box-sizing:border-box;height:6rem;object-fit:cover;padding:.5rem;width:6rem}";var a9t=to("uploading files..."),r9t=to('
    '),i9t=to(""),o9t=to("drop files here");const s9t=()=>{const[t,e]=F0(0),[n,a]=F0([]),[r,i]=F0(!1),[o,s]=F0(!1),[l,u]=wE(),d=()=>{s(!1)},p=y=>{if(l().options.files.dragAndDrop){y.preventDefault(),y.stopPropagation();const w=y.dataTransfer;w?.files?b(w.files):(e(0),s(!1),a([]))}},A=y=>{l().options.files.dragAndDrop&&(y.preventDefault(),e(t()+1),s(!0))},m=y=>{l().options.files.dragAndDrop&&(y.preventDefault(),e(t()-1),t()===0&&s(!1))},g=y=>{l().options.files.dragAndDrop&&(y.preventDefault(),s(!0))},h=y=>{l().options.files.dragAndDrop&&(y.preventDefault(),e(0),s(!1))},f=y=>{if(l().options.files.clipboard){y.preventDefault();const w=y.clipboardData;w?.files&&w.files.length>0&&b(w.files)}},b=y=>{Array.from(y).forEach(w=>{a([...n(),w])}),i(!0),s(!0),Promise.resolve(l().options.files.handler(y)).then(w=>{if(l().options.files.injectMarkup&&w){const v=`![](${w})`;XM([l,u],v)}}).finally(()=>{e(0),i(!1),s(!1),a([])})};return URe(()=>{document.addEventListener("dragenter",A),document.addEventListener("dragleave",m),document.addEventListener("dragover",g),document.addEventListener("drop",h),l().root.addEventListener("paste",f)}),GRe(()=>{document.removeEventListener("dragenter",A),document.removeEventListener("dragleave",m),document.removeEventListener("dragover",g),document.removeEventListener("drop",h),l().root.removeEventListener("paste",f)}),(()=>{var y=vi(r9t),w=y.firstChild,v=w.nextSibling,k=v.firstChild,_=k.firstChild,x=_.nextSibling,[C,B]=yo(x.nextSibling),I=k.nextSibling;return nse(w,"textContent",n9t),k.addEventListener("drop",p),ki(_,Ha(zIt,{get each(){return n().slice(0,8)},children:E=>(()=>{var S=vi(i9t);return ny(P=>{var O=E.name,T=URL.createObjectURL(E);return O!==P.e&&V4(S,"alt",P.e=O),T!==P.t&&V4(S,"src",P.t=T),P},{e:void 0,t:void 0}),S})()})),ki(k,Ha(Po,{get when(){return r()},get fallback(){return vi(o9t)},get children(){return vi(a9t)}}),C,B),I.$$click=d,ny(()=>y.classList.toggle("visible",!!o())),rse(),y})()};tse(["click"]);const c9t=t=>{const[e,n]=wE(),a=gFt([e,n],t.target),{workQueue:r}=e();return n(r3(e(),{editor:a})),r.enqueue(async()=>{const i=await VM([e,n]);a.dispatch({effects:i})}),a.dom};var l9t=to("
    `;let m8;function Lqt(t){m8=t,t.getElementById("text-selection-menu");const e=t.getElementById("user-input"),n=t.getElementById("enter-btn");e.addEventListener("keydown",r=>{const i=e.value,o=t.querySelector(".at-mentions-dropup");if(r.key==="Enter"&&!r.shiftKey&&!r.ctrlKey&&(o.classList.contains("hidden")||o.style.display==="none")){let s="";dee(i)&&(s=zI(),console.log("CONTAINS DIAGRAM!!"),s=zI(),tve("aiActionCompleted",i,"mermaid_diagram",s)),r.preventDefault(),a(i,"aiActionCompleted","query",s),e.value=""}}),n.addEventListener("click",r=>{r.stopPropagation();const i=e.value;let o="";dee(i)&&(console.log("DIAGRAM FOUND"),o=zI(),tve("aiActionCompleted",i,"mermaid_diagram",o)),a(i,"aiActionCompleted","query",o)});function a(r,i,o,s=""){e.value="";let l=r;Sqt(m8)||(l="given the following content /n"+Fqe(Qqt(m8),Rce)+` Question:`+r,Bqt(m8));const u=new CustomEvent(i,{detail:{text:l,type:o,diagramId:s}});window.dispatchEvent(u)}}function tve(t,e,n,a){const r=new CustomEvent(t,{detail:{text:e,type:n,diagramId:a}});window.dispatchEvent(r)}function zL(t){const e=t.querySelector("#markdown-preview");return e.innerHTML=Rqt,e}const Nqt=["Vectorizing query","Cosine searching vector database","Retrieving relevant sentences","Calling LLM model","Returning results"],Mqt=["Retrieving relevant sentences","Checking conversation history","Calling LLM model","Returning results"],Rqe=["Retrieving relevant sentences from website","Generating possible questions","Calling LLM model","Returning results"],zqt=["Retrieving relevant papers from Arxiv","Generating possible questions","Calling LLM model","Returning results"],qqt=["Checking network status","Analyzing your query","Searching local content","Computing text similarities","Preparing offline response"],jqt="MLSysBook.AI: Principles and Practices of Machine Learning Systems Engineering";let Lqe=`Please try to provide useful, helpful and actionable answers. Stick to topics related to ${jqt}.`;const Nqe=["You are convercing with a Beginner learner: Focus on foundational concepts, definitions, and straightforward applications in machine learning systems, suitable for learners with little to no prior knowledge.","You are convercing with a Intermediate learner: Emphasize problem-solving, system design, and practical implementations, targeting learners with a basic understanding of machine learning principles.","You are convercing with a Advanced learner: Challenge learners to analyze, innovate, and optimize complex machine learning systems, requiring deep expertise and a holistic grasp of advanced techniques.","You are an expert ML teacher using Bloom's Taxonomy: Create responses that progress through Bloom's levels: remember, understand, apply, analyze, evaluate, and create. Guide my learning."],Uqt=` As an ML Systems Engineering professor, analyze this student's learning patterns: Your report should in bullet points, easy to read, concise and point to specific details. CURRENT PROGRESS REPORT: {{progress_report}} PREVIOUS EVALUATION: {{previous_evaluation}} !! End of previous evaluation !! PROGRESS COMPARISON: - Compare performance changes since last evaluation - Highlight improvements and new challenges - Note any shifting patterns in question types - Identify topics that have shown most growth 1. QUESTION PATTERN ANALYSIS - What types of questions do they consistently get right vs wrong? - Are they stronger in: * Theory or practical application? * System design or implementation? * High-level concepts or technical details? - Which topics show repeated mistakes? 2. LEARNING PATTERNS - Identify topics with high success (>80%) - Note areas of struggle (<70%) - Spot any recurring misconceptions - Highlight improvement trends 3. RECOMMENDATIONS - List 3 specific topics to focus on next - Suggest study methods based on their success patterns - Provide targeted practice for weak areas 4. ACTION PLAN - 3 concrete steps to improve understanding - Specific practice exercises for problem areas - Next chapters/sections to tackle Remember to surround key ML terms with double slashes (e.g., \\machine learning\\). Keep feedback encouraging but direct. `,Gqt=`Create a mermaid diagram based on the following description. Your response should follow this format: \`\`\`mermaid [Your mermaid diagram code here] \`\`\` $$ [Your markdown caption explaining the diagram here] $$ Make the diagram clear, well-structured, and ensure it follows mermaid syntax. Additional requirements: - Use appropriate diagram type (flowchart, sequence, class, etc.) - Include clear labels and relationships - Keep the diagram focused and readable - Beneath the diagram code, between two $$$$ add a markdown caption to explain the image. Ensure the diagram grows equally more in height, and is oriented vertically to avoid it being overly wide. Description: `,Hqt=` Create a quiz from a CHAPTER SECTION. The quiz should have 3 questions in JSON format: - Q1 & Q2: Directly related to the quote's content. - Q3: Requires deeper inference. IMPORTANT: For each question, include a "sourceReference" field that contains the exact text from the source content that the question is based on. This helps users understand where the question content originated. Use this JSON template, modifying it as needed: { "questions": [ { "question": "Q1 here?", "sourceReference": "Exact text from source content that this question is based on", "answers": [ {"text": "A1", "correct": true/false, "explanation": "short explanation"}, {"text": "A2", "correct": false, "explanation": "short explanation"}, {"text": "A3", "correct": false, "explanation": "short explanation"}, ] }, {"question": "Q2 here?", "sourceReference": "Source text for Q2", "answers": [/* options */]}, {"question": "Q3 here?", "sourceReference": "Source text for Q3", "answers": [/* options */]} ] } Adjust content for quote, understanding level, questions, and answers. CHAPTER SECTION: `,Wqt=` Create a summative test. The test should have 10 questions in JSON format: - Q1 - Q5: Directly related to the quote's content. - Q5-Q10: Requires deeper inference. IMPORTANT: For each question, include a "sourceReference" field that contains the exact text from the source content that the question is based on. This helps users understand where the question content originated. Use this JSON template, modifying it as needed: { "questions": [ { "question": "Q1 here?", "sourceReference": "Exact text from source content that this question is based on", "answers": [ {"text": "A1", "correct": true/false, "explanation": "short explanation"}, {"text": "A2", "correct": false, "explanation": "short explanation"}, {"text": "A3", "correct": false, "explanation": "short explanation"}, ] }, {"question": "Q2 here?", "sourceReference": "Source text for Q2", "answers": [/* options */]}, {"question": "Q3 here?", "sourceReference": "Source text for Q3", "answers": [/* options */]} ] } Adjust content for quote, understanding level, questions, and answers. CHAPTER SECTION: `,Yqt="Explain the following quote to a beginner, including any necessary background knowledge, in markdown format. Do not repeat the quote or add commentary. At the end of your response, place '%%%' 3 percent signs, and then write 2 to 3 followup questions that the user might ask to expand their knowledge.",Xqt={prompt:Yqt,quote:"",comments:"",background_knowledge:"",power_up:20,understanding:3},Vqt={prompt:Hqt,quote:"",comments:"",power_up:20,understanding:3},Zqt={prompt:Gqt},Kqt=`Given the following BACKGROUND_KNOWLEDGE from the current webpage, and a student's QUESTION, answer the QUESTION. BACKGROUND_KNOWLEDGE: {{background_context}} INSTRUCTIONS: - Use the background knowledge above to inform your response when relevant - Only reference information that directly relates to the user's question - When referencing background content, use the new custom reference syntax: {{ref:target-id:display-text:source-url}} - The target-id should be the paragraph ID from the background knowledge (e.g., p-1757100723082-nx9p0zxmp) - The display-text should be a clean, readable description of what you're referencing - The source-url should be the URL of the page where the referenced content is located - Examples: {{ref:p-1757100723082-nx9p0zxmp:See paragraph 2:https://example.com/page1}}, {{ref:my-section:Go to section:https://example.com/page2}}, {{ref:conclusion:Jump to conclusion:https://example.com/page3}} - If the background knowledge doesn't contain relevant information, rely on your general knowledge - Ensure all references are accurate and properly attributed - You may use the BACKGROUND_KNOWLEDGE as reference. Otherwise, you can be creative and respond in a way that always ensure you MUST answer the question - At the end of your response, place '%%%' 3 percent signs, and then write 2 to 3 followup questions that the user might ask to expand their knowledge - Return as markdown`,Jqt={prompt:Kqt,conversation_history:"",question:"",query:"",quote:"",background_knowledge:"",comments:"",power_up:20,understanding:3},ejt={prompt:Uqt,understanding:3,power_up:20},tjt={prompt:Wqt,quote:"",comments:"",understanding:3,power_up:20};function vE(t="explain"){let e,n;if(t==="explain")e={...Xqt};else if(t==="quiz")e={...Vqt};else if(t==="summative")e={...tjt};else if(t==="query")e={...Jqt};else if(t==="progress_report")e={...ejt};else if(t==="mermaid_diagram")e={...Zqt};else throw new Error(`Unsupported config type: ${t}`);n={...e};function a(l,u){if(n.hasOwnProperty(l))n[l]=u;else throw new Error(`Field ${l} does not exist in config.`)}function r(l){if(n.hasOwnProperty(l))return n[l];throw new Error(`Field ${l} does not exist in config.`)}function i(l,u){n.hasOwnProperty(l)?this.set_field(l,u):n[l]=u}function o(){return n}function s(){n={...e}}return{set_field:a,get_field:r,make_field:i,return_all_fields:o,reset_fields:s}}const nve=` # Getting Started with Your Learning Journey 🚀 ## Welcome to Interactive Learning! It looks like you haven't taken any quizzes yet. Here's how to get the most out of your learning experience: ### How to Find Quizzes 📚 - Look for the **Quiz** button at the end of each section - Every chapter contains multiple interactive quizzes - Start with earlier chapters and progress forward ### Benefits of Taking Quizzes 🎯 - **Reinforce Your Learning**: Test your understanding right after studying - **Track Progress**: Watch your scores improve over time - **Identify Gaps**: Discover which topics need more attention - **Build Confidence**: Master concepts through practice ### Tips for Success 💡 1. Take quizzes right after reading a section 2. Retry quizzes after a few days to test retention 3. Review explanations for incorrect answers 4. Use quiz results to guide your study focus ### Ready to Start? 👉 Head to any chapter section and look for the quiz button at the bottom! --- *Remember: Learning is a journey, not a race. Take your time to understand each concept thoroughly.* `,ave=` # Progress Report Update 📊 ## No New Quiz Activity It looks like you haven't taken any new quizzes since your last progress report. Here are some suggestions to keep your learning momentum: ### Ways to Stay Active 🎯 1. **Review Previous Material** - Retake quizzes from earlier sections - Try to improve your previous scores - Focus on questions you found challenging before 2. **Move Forward** - Explore new chapters and sections - Take quizzes in sections you haven't attempted yet - Challenge yourself with more advanced material ### Quick Tips 💡 - Set a goal to complete at least one new quiz daily - Use the explanation feature to deepen your understanding - Track your progress regularly to stay motivated Ready to jump back in? Pick a section and start a new quiz! --- *Your learning journey continues - keep pushing forward!* `,yD={MAX_TOKENS:3e4,NAV_SELECTORS:["nav","header","footer","aside",".navigation",".nav",".navbar",".menu",".sidebar",".header",".footer",'[role="navigation"]','[role="banner"]','[role="contentinfo"]',".breadcrumb",".pagination",".toc"],CONTENT_SELECTORS:["main","article",".content",".main-content",".post-content",".entry-content",".chapter-content"]},iz={GROQ:{model:"llama-3.1-8b-instant",stream:!0},GEMINI:{model:"gemini-2.5-flash",stream:!0},CEREBRAS:{model:"gpt-oss-120b",stream:!0},SAMBANOVA:{model:"gpt-oss-120b",stream:!0},MISTRAL:{model:"mistral-tiny",stream:!0},OPENAI:{model:"deepseek/deepseek-chat-v3.1:free",stream:!0},HUGGINGFACE:{model:"meta-llama/Llama-3.1-8B-Instruct:featherless-ai",stream:!1},AWAN:{model:"Meta-Llama-3.1-70B-Instruct",stream:!0}};function Lce(t=!1){return t?"https://proxy-worker-streaming.mlsysbook.workers.dev/ai/stream":"https://proxy-worker.mlsysbook.workers.dev/ai"}function mee(t,e=!1){return e?t.choices?.[0]?.delta?.content||"":t.choices?.[0]?.message?.content||t.text||t.message||JSON.stringify(t)}async function njt(t,e,n){const a=iz[e];if(!a)throw new Error(`Unknown provider: ${e}`);const r=[{role:"user",content:t}];td.logTokenUsage(r,`${e} Single Request`),td.wouldExceedLimit(r,td.getSafeGroqLimit())&&(console.warn(`[TOKEN_WARNING] Request too large for ${e}, attempting to optimize...`),t.length>15e3&&(r[0].content=t.substring(0,15e3)+` [Content truncated due to size limits]`));try{const i=Lce(!1),o=Nce(e),s=await fetch(`${i}?url=${encodeURIComponent(o)}&provider=${e.toLowerCase()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:r,model:a.model,temperature:a.temperature||.7,top_p:a.top_p||.9}),signal:n});if(!s.ok){if(s.status===429){const u=await s.text();throw console.error(`[RATE_LIMIT] ${e} rate limit exceeded:`,u),new Error(`Rate limit exceeded for ${e}. Please try again in a moment or reduce your request size.`)}throw new Error(`${e} failed with status ${s.status}: ${s.statusText}`)}const l=await s.json();return mee(l,!1)}catch(i){throw console.error("Error in callProviderSingle:",i),i.name==="AbortError"?new Error("Request was cancelled"):i}}async function*Mqe(t,e,n){const a=iz[e];if(!a)throw new Error(`Unknown provider: ${e}`);const r=[{role:"user",content:t}];td.logTokenUsage(r,`${e} Streaming Request`),td.wouldExceedLimit(r,td.getSafeGroqLimit())&&(console.warn(`[TOKEN_WARNING] Request too large for ${e}, attempting to optimize...`),t.length>15e3&&(r[0].content=t.substring(0,15e3)+` [Content truncated due to size limits]`));try{const i=Lce(!0),o=Nce(e),s=await fetch(`${i}?url=${encodeURIComponent(o)}&provider=${e.toLowerCase()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:r,model:a.model,temperature:a.temperature||.7,top_p:a.top_p||.9}),signal:n});if(!s.ok){if(s.status===429){const m=await s.text();throw console.error(`[RATE_LIMIT] ${e} rate limit exceeded:`,m),new Error(`Rate limit exceeded for ${e}. Please try again in a moment or reduce your request size.`)}throw new Error(`${e} failed with status ${s.status}: ${s.statusText}`)}const l=s.body.getReader(),u=new TextDecoder;let d="",p=!1,A=!1;try{for(;;){const{done:m,value:g}=await l.read();if(m){A=!0;break}const h=u.decode(g,{stream:!0});d+=h;const f=d.split(` `);d=f.pop()||"";for(const b of f)if(b.startsWith("data: ")){const y=b.slice(6).trim();if(y==="[DONE]"){A=!0;return}try{const w=JSON.parse(y),v=mee(w,!0);if(v&&(p=!0,yield v),w.choices?.[0]?.finish_reason){A=!0;return}}catch(w){console.warn("Failed to parse streaming chunk:",w,"Raw:",y)}}}}catch(m){throw console.error("Stream reading error:",m),m}finally{try{l.releaseLock()}catch{}}if(p&&!A)console.warn("Stream ended without proper completion signal");else if(!p)throw new Error("No content received from streaming response");if(d.trim()){const m=d.split(` `);for(const g of m)if(g.startsWith("data: ")){const h=g.slice(6).trim();if(h==="[DONE]")return;try{const f=JSON.parse(h),b=mee(f,!0);b&&(yield b)}catch(f){console.warn("Failed to parse final streaming chunk:",f)}}}}catch(i){throw console.error("Error in callProviderStream:",i),i.name==="AbortError"?new Error("Request was cancelled"):i}}function Nce(t){const e={GROQ:"https://api.groq.com/openai/v1/chat/completions",GEMINI:"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent",CEREBRAS:"https://api.cerebras.ai/v1/chat/completions",SAMBANOVA:"https://api.sambanova.ai/v1/chat/completions",MISTRAL:"https://api.mistral.ai/v1/chat/completions",OPENAI:"https://openrouter.ai/api/v1/chat/completions",HUGGINGFACE:"https://router.huggingface.co/v1/chat/completions",AWAN:"https://api.awanllm.com/v1/chat/completions"};return e[t]||e.GROQ}async function*zqe(t,e,n=!1){const a=ijt();if(a?.customAPI?.endpoint)try{console.log(`[CUSTOM_API] Attempting custom API for streaming: ${a.customAPI.provider}`);const u=XJ.callCustomAPI(t.prompt,a,!0);if(u){yield*u,console.log(`[CUSTOM_API] Successfully completed streaming with custom API: ${a.customAPI.provider}`);return}}catch(u){console.warn("[CUSTOM_API] Custom API failed for streaming, falling back to default providers:",u)}const r=["GROQ","GEMINI","CEREBRAS","SAMBANOVA","MISTRAL","OPENAI","HUGGINGFACE","AWAN"],i=new AbortController,{signal:o}=i,s=setTimeout(()=>{console.warn("Stream timeout reached, aborting request"),i.abort()},6e4);let l=null;for(const u of r)try{console.trace(`[AI_TRACE] cloudflareAgent.js - Trying backup provider: ${u}`,{model:iz[u]?.model||"Unknown model",promptPreview:t.prompt?.substring(0,100)+"..."||"No prompt"});const d=Mqe(t.prompt,u,o);let p=!1;for await(const A of d)p=!0,yield A;if(p){clearTimeout(s);return}else throw new Error(`No content received from ${u}`)}catch(d){if(l=d,console.error(`${u} failed:`,d),d.message==="Request was cancelled")throw clearTimeout(s),d}throw clearTimeout(s),new Error(`All providers failed. Last error: ${l.message}`)}function ajt(t){let e=t.quote;if(e&&e.length>1e4){const a=e.split(/[.!?]+/);let r="";for(const i of a){const o=r+i+". ";if(o.length>1e4)break;r=o}r.trim()?e=r.trim()+` [Chapter section truncated due to size limits]`:e=e.substring(0,1e4)+` [Chapter section truncated due to size limits]`}return{messages:[{role:"user",content:`${t.prompt} CHAPTER SECTION: ${e}`}],model:"llama-3.3-70b-versatile",temperature:.7,metadata:{chapterId:t.chapterId,sectionId:t.sectionId,saveToDb:t.saveToDb,context:t.context}}}function rjt(t,e=null){try{const n=t.choices?.[0]?.message?.content;if(!n)throw console.error("No content found in response:",t),new Error("No content found in response");const a=n.match(/```json\s*([\s\S]*?)\s*```/);if(a){const i=a[1].trim(),o=JSON.parse(i),s=o.questions||o;return Array.isArray(s)&&s.forEach((l,u)=>{!l.sourceReference||l.sourceReference.includes("not provided by AI")?e?(l.sourceReference=`Based on content from "${e.title}" (Question ${u+1})`,l.sourceLabel=e.title,l.sourceUrl=e.url,l.sourcePosition=e.position.scrollY):(l.sourceReference=`Based on content from the current page section (Question ${u+1})`,l.sourceLabel="Current Page Section",l.sourceUrl=window.location.href,l.sourcePosition=window.scrollY):e?(l.sourceLabel=e.title,l.sourceUrl=e.url,l.sourcePosition=e.position.scrollY):(l.sourceLabel="Current Page Section",l.sourceUrl=window.location.href,l.sourcePosition=window.scrollY),l.answers&&Array.isArray(l.answers)&&l.answers.forEach((d,p)=>{d.explanation||(d.explanation=d.correct?"This is the correct answer.":"This is not the correct answer.")})}),s}const r=n.trim();if(r.startsWith("{")||r.startsWith("[")){const i=JSON.parse(r),o=i.questions||i;return Array.isArray(o)&&o.forEach((s,l)=>{!s.sourceReference||s.sourceReference.includes("not provided by AI")?e?(s.sourceReference=`Based on content from "${e.title}" (Question ${l+1})`,s.sourceLabel=e.title,s.sourceUrl=e.url,s.sourcePosition=e.position.scrollY):(s.sourceReference=`Based on content from the current page section (Question ${l+1})`,s.sourceLabel="Current Page Section",s.sourceUrl=window.location.href,s.sourcePosition=window.scrollY):e?(s.sourceLabel=e.title,s.sourceUrl=e.url,s.sourcePosition=e.position.scrollY):(s.sourceLabel="Current Page Section",s.sourceUrl=window.location.href,s.sourcePosition=window.scrollY),s.answers&&Array.isArray(s.answers)&&s.answers.forEach((u,d)=>{u.explanation||(u.explanation=u.correct?"This is the correct answer.":"This is not the correct answer.")})}),o}return console.warn("Could not parse quiz response, returning original response"),console.warn("Content that failed to parse:",n),t}catch(n){return console.error("Error parsing quiz response:",n),console.error("Response that caused error:",t),t}}async function qqe(t,e="groq",n=!1){const a=ajt(t);if(td.logTokenUsage(a.messages,`${e} Legacy Quiz Request`),td.wouldExceedLimit(a.messages,td.getSafeGroqLimit())){console.warn(`[TOKEN_WARNING] Legacy quiz request too large for ${e}, attempting to optimize...`);const i=a.messages[0].content;i.length>15e3&&(a.messages[0].content=i.substring(0,15e3)+` [Content truncated due to size limits]`)}const r={groq:"llama-3.1-8b-instant",gemini:"gemini-2.5-flash",cerebras:"gpt-oss-120b",sambanova:"gpt-oss-120b",mistral:"mistral-tiny",openai:"deepseek/deepseek-chat-v3.1:free",huggingface:"meta-llama/Llama-3.1-8B-Instruct:featherless-ai",awan:"Meta-Llama-3.1-70B-Instruct"};if(a.model=r[e.toLowerCase()]||r.groq,n)return Mqe(a.messages[0].content,e,null);{if(!iz[e.toUpperCase()])throw new Error(`Unknown provider: ${e}`);const o=Lce(!1),s=Nce(e),l=await fetch(`${o}?url=${encodeURIComponent(s)}&provider=${e.toLowerCase()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:a.messages,model:a.model,temperature:a.temperature})});if(!l.ok){if(l.status===429){const d=await l.text();throw console.error(`[RATE_LIMIT] ${e} rate limit exceeded in legacy format:`,d),new Error(`Rate limit exceeded for ${e}. Please try again in a moment or reduce your request size.`)}throw new Error(`${e} failed with status ${l.status}: ${l.statusText}`)}const u=await l.json();return rjt(u,a.metadata?.context)}}function ijt(){try{const t=localStorage.getItem("userSettings");return t?JSON.parse(t):{}}catch(t){return console.error("[CUSTOM_API] Error loading settings:",t),{}}}async function*jqe(t,e,n=!1,a=!1){console.log("[AI_TRACE] chat_agent_yield.js - PRIMARY AGENT DEACTIVATED - Using backup system directly",{isMorePowerful:n,conversational:a,queryPreview:t?.prompt?.substring(0,100)+"..."||"No prompt"});try{const r=t.prompt||"",i={prompt:r,messages:[{role:"user",content:r}]};console.log("Calling backup with formatted prompt:",i);const o=zqe(i,null,!0);let s=!1;for await(const l of o)s=!0,yield l;if(!s)throw new Error("No content received from any providers")}catch(r){throw console.error("Complete backup system failure:",r),r}}async function Uqe(t){try{return await qqe(t,"groq",!1)}catch(e){throw console.error("Failed to fetch from GROQ:",e),e}}async function Gqe(t){try{return await qqe(t,"gemini",!1)}catch(e){throw console.error("Failed to fetch from Gemini:",e),e}}class ojt{constructor(e){this.modal=e,this.shadowRoot=e?.shadowRoot,this.activeNotifications=new Map,this.createNotificationContainer()}createNotificationContainer(){const e=this.shadowRoot||document.body;if(e.querySelector("#sr-notification-container"))console.warn("Notification container already exists");else{const n=document.createElement("div");n.id="sr-notification-container",n.style.cssText=` position: fixed; bottom: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; `,e.appendChild(n)}}showSavingNotification(e="Saving..."){const n=document.createElement("div"),a="notification-"+Date.now();return n.id=a,n.style.cssText=` background: white; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 12px 16px; display: flex; align-items: center; gap: 8px; min-width: 200px; animation: slideIn 0.3s ease-out; `,n.innerHTML=`
    ${e} `,(this.shadowRoot||document).querySelector("#sr-notification-container").appendChild(n),a}updateNotification(e,n,a="success"){if(!e)return;this.activeNotifications.has(e)&&(clearTimeout(this.activeNotifications.get(e)),this.activeNotifications.delete(e));const r=(this.shadowRoot||document).getElementById(e);if(r){const i=a==="success"?"#dcfce7":a==="error"?"#fee2e2":"#fff",o=a==="success"?"#166534":a==="error"?"#991b1b":"#4b5563",s=a==="success"?'':a==="error"?'':"";r.style.background=i,r.innerHTML=`
    ${s} ${n}
    `;const l=setTimeout(()=>{this.removeLoadingState(e)},3e3);this.activeNotifications.set(e,l)}}showLoadingState(e="Loading..."){const n=(this.shadowRoot||document).querySelector("#sr-notification-container");if(!n)return console.error("No notification container found"),null;const a="loading-state-"+Date.now(),r=document.createElement("div");r.id=a,r.className="sr-notification loading",r.style.cssText=` background: white; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 12px 16px; display: flex; align-items: center; gap: 8px; min-width: 200px; animation: slideIn 0.3s ease-out; `,r.innerHTML=`
    ${e} `,n.appendChild(r);const i=setTimeout(()=>{this.removeLoadingState(a)},1e4);return this.activeNotifications.set(a,i),a}removeLoadingState(e){this.activeNotifications.has(e)&&(clearTimeout(this.activeNotifications.get(e)),this.activeNotifications.delete(e));const n=(this.shadowRoot||document).getElementById(e);n&&(n.style.animation="slideOut 0.3s ease-in forwards",setTimeout(()=>n.remove(),300))}}class Hqe extends EventTarget{constructor(e){super(),this.modal=e,this.saveQueue=[],this.processingQueue=!1,this.inMemoryData={currentChapter:null,currentDeck:[],allTags:new Set},this.notificationHandler=new ojt(e),this.debouncedProcessQueue=this.debounce(this.processQueue.bind(this),1e3),this.isFirstLoad=!0,this.currentSaveNotificationId=null}getChapterTitle(e){try{const n=localStorage.getItem("chapter_progress_data");if(n)return JSON.parse(n).find(i=>i.chapter===e)?.title||`Chapter ${e}`}catch(n){console.error("Error getting chapter title:",n)}return`Chapter ${e}`}loadChapter(e){try{const{currentDeck:n}=this.switchActiveChapter(e);return n}catch(n){return console.error("Failed to load chapter:",n),[]}}async getAllChapters(){try{const e=localStorage.getItem("chapter_card_sets"),n=localStorage.getItem("chapter_progress_data");let a=[];if(e)try{a=JSON.parse(e),Array.isArray(a)||(console.warn("Saved chapters is not an array, resetting"),a=[])}catch(o){console.error("Error parsing saved chapters:",o),a=[]}const r=n?JSON.parse(n):[];return a.map(o=>{const s=r.find(l=>l.chapter===o.chapter);return{chapter:o.chapter,title:s?.title||`Chapter ${o.chapter}`,cardCount:o.cards?.length||0,cards:o.cards}}).sort((o,s)=>o.chapter-s.chapter)}catch(e){return console.error("Failed to get chapters:",e),[]}}async saveToLocalStorage(e=null){if(window.dispatchEvent(new CustomEvent("sr-save-started")),await new Promise(n=>setTimeout(n,0)),!this.inMemoryData.currentChapter)throw console.error("Cannot save: No current chapter selected"),new Error("No current chapter selected");try{this.checkAndPruneDuplicates();const n=localStorage.getItem("chapter_card_sets");let a=n?JSON.parse(n):[];if(e)a=Array.from(e).map(([i,o])=>({chapter:parseInt(i),cards:o}));else{const i=a.findIndex(o=>o.chapter===this.inMemoryData.currentChapter.chapter);i>=0?a[i].cards=[...this.inMemoryData.currentDeck]:a.push({chapter:this.inMemoryData.currentChapter.chapter,cards:[...this.inMemoryData.currentDeck]})}a.sort((i,o)=>i.chapter-o.chapter);const r=JSON.stringify(a);return localStorage.setItem("chapter_card_sets",r),window.dispatchEvent(new CustomEvent("sr-save-card-completed",{detail:{success:!0}})),!0}catch(n){throw console.error("Failed to save to localStorage:",n),window.dispatchEvent(new CustomEvent("sr-save-card-completed",{detail:{success:!1,error:n}})),n}}updateCard(e){if(!this.inMemoryData.currentChapter)throw console.error("No current chapter selected"),new Error("No current chapter selected");return this.inMemoryData.currentDeck||(this.inMemoryData.currentDeck=[]),this.inMemoryData.currentDeck.push(e),e.tags&&e.tags.forEach(a=>this.inMemoryData.allTags.add(a)),this.saveToLocalStorage().catch(a=>console.error("Save failed:",a)),{currentDeck:this.inMemoryData.currentDeck,allTags:Array.from(this.inMemoryData.allTags),stats:this.getCurrentChapterStats(),currentChapter:this.inMemoryData.currentChapter}}getCurrentChapterData(){return{chapter:this.inMemoryData.currentChapter,deck:this.inMemoryData.currentDeck,stats:this.getCurrentChapterStats(),tags:Array.from(this.inMemoryData.allTags)}}queueSave(){this.currentSaveNotificationId||(this.currentSaveNotificationId=this.notificationHandler.showLoadingState("Saving...")),this.saveQueue.push({timestamp:Date.now(),notificationId:this.currentSaveNotificationId}),this.debouncedProcessQueue()}async processQueue(){if(!(this.processingQueue||this.saveQueue.length===0)){this.processingQueue=!0,this.saveQueue[this.saveQueue.length-1],this.saveQueue=[];try{this.currentSaveNotificationId||(this.currentSaveNotificationId=this.notificationHandler.showLoadingState("Saving...")),await this.saveToLocalStorage(),this.notificationHandler.updateNotification(this.currentSaveNotificationId,"Saved successfully!","success")}catch(e){console.error("Failed to process save queue:",e),this.notificationHandler.updateNotification(this.currentSaveNotificationId,"Failed to save","error")}finally{this.currentSaveNotificationId=null,this.processingQueue=!1,this.saveQueue.length>0&&this.debouncedProcessQueue()}}}debounce(e,n){let a;return function(...i){const o=()=>{clearTimeout(a),e(...i)};clearTimeout(a),a=setTimeout(o,n)}}getAllTags(){try{const e=localStorage.getItem("chapter_card_sets"),n=e?JSON.parse(e):[],a=new Set;return n.forEach(r=>{r.cards.forEach(i=>{i.tags&&i.tags.forEach(o=>a.add(o))})}),Array.from(a)}catch(e){return console.error("Failed to get tags:",e),[]}}getCurrentChapterStats(){try{if(!this.inMemoryData.currentDeck)return{total:0,learned:0,percentage:0};const e=this.inMemoryData.currentDeck.length;let n=0;this.inMemoryData.currentDeck.forEach(i=>{let o=0;const s=i.lastReviewQuality>=3?(i.lastReviewQuality-2)/3:0;let l=0;if(i.reviewHistory&&i.reviewHistory.length>0){const p=i.reviewHistory.slice(-5);l=p.reduce((m,g)=>m+(g.quality>=3?(g.quality-2)/3:0),0)/p.length}const u=Math.min(i.repetitions/5,1),d=i.interval>0?Math.min(Math.log(i.interval)/Math.log(30),1):0;o=s*.5+l*.3+(u+d)/2*.2,n+=o});const a=Math.round(n),r=e>0?n/e*100:0;return{total:e,learned:a,percentage:Math.round(r*10)/10}}catch(e){return console.error("Error calculating chapter stats:",e),{total:0,learned:0,percentage:0}}}getAllChapterStats(){try{const e=localStorage.getItem("chapter_card_sets");return(e?JSON.parse(e):[]).map(a=>({chapter:a.chapter,total:a.cards.length,learned:a.cards.filter(r=>r.interval>0).length}))}catch(e){return console.error("Failed to get chapter stats:",e),[]}}getCardsByTag(e){try{const n=localStorage.getItem("chapter_card_sets"),a=n?JSON.parse(n):[],r=[];return a.forEach(i=>{i.cards.forEach(o=>{o.tags&&o.tags.includes(e)&&r.push({...o,chapter:i.chapter})})}),r}catch(n){return console.error("Failed to get cards by tag:",n),[]}}initializeFromStorage(){try{const e=localStorage.getItem("current_chapter"),n=localStorage.getItem("chapter_card_sets"),a=localStorage.getItem("chapter_progress_data"),r=n?JSON.parse(n):[],i=a?JSON.parse(a):[];if(this.inMemoryData.currentChapter=e?JSON.parse(e):null,this.inMemoryData.currentChapter){const o=r.find(s=>s.chapter===this.inMemoryData.currentChapter.chapter);this.inMemoryData.currentDeck=o?.cards||[]}return{currentChapter:this.inMemoryData.currentChapter,chapterSets:this.getAllChapters(),flashcards:this.inMemoryData.currentDeck,tags:Array.from(this.inMemoryData.allTags),stats:this.getCurrentChapterStats()}}catch(e){return console.error("Failed to initialize from storage:",e),{currentChapter:null,chapterSets:[],flashcards:[],tags:[],stats:{total:0,learned:0,percentage:0}}}}ensureCurrentChapterExists(){try{const e=localStorage.getItem("current_chapter");if(!e)return;const n=JSON.parse(e),a=localStorage.getItem("chapter_card_sets");return(a?JSON.parse(a):[]).some(o=>o.chapter===n.chapter)||(this.inMemoryData.currentChapter=n,this.inMemoryData.currentDeck=[]),!0}catch(e){return console.error("Failed to ensure chapter exists:",e),!1}}async loadFromLocalStorage(){let e;this.isFirstLoad||(e=this.notificationHandler.showLoadingState());let n=new Map;try{await new Promise(o=>setTimeout(o,100));const a=localStorage.getItem("current_chapter");a&&(this.inMemoryData.currentChapter=JSON.parse(a));const r=localStorage.getItem("chapter_card_sets");r&&JSON.parse(r).forEach(s=>{const l=s.cards.map(u=>({...u,nextReviewDate:u.nextReviewDate?new Date(u.nextReviewDate):null,reviewHistory:(u.reviewHistory||[]).map(d=>({...d,date:new Date(d.date)}))}));n.set(s.chapter,l),this.inMemoryData.currentChapter&&s.chapter===this.inMemoryData.currentChapter.chapter&&(this.inMemoryData.currentDeck=l),l.forEach(u=>{u.tags&&u.tags.forEach(d=>this.inMemoryData.allTags.add(d))})});const i=localStorage.getItem("review_activity");return i?this.inMemoryData.reviewHistory=JSON.parse(i):this.inMemoryData.reviewHistory={},this.isFirstLoad||this.notificationHandler.removeLoadingState(e),this.isFirstLoad=!1,{currentChapter:this.inMemoryData.currentChapter,chapterSets:n,flashcards:this.inMemoryData.currentDeck,allTags:Array.from(this.inMemoryData.allTags),reviewHistory:this.inMemoryData.reviewHistory}}catch(a){return console.error("Failed to load from localStorage:",a),this.isFirstLoad||(this.notificationHandler.removeLoadingState(e),this.notificationHandler.updateNotification(e,"Failed to load flashcards","error")),this.isFirstLoad=!1,this.inMemoryData={currentChapter:null,currentDeck:[],allTags:new Set,reviewHistory:{}},{currentChapter:null,chapterSets:new Map,flashcards:[],allTags:[],reviewHistory:{}}}}addReviewToHistory(){try{const e=this.notificationHandler.showLoadingState(),n=new Date().toISOString().split("T")[0];let a=this.inMemoryData.reviewHistory||{};return a[n]=(a[n]||0)+1,this.inMemoryData.reviewHistory=a,localStorage.setItem("review_activity",JSON.stringify(a)),this.notificationHandler.removeLoadingState(e),this.notificationHandler.updateNotification(e,"Progress saved","success"),a}catch(e){return console.error("Failed to update review history:",e),this.notificationHandler.updateNotification("review-error","Failed to save progress","error"),null}}async mergeImportedData(e){try{if(!e.chapter_card_sets)throw new Error("Invalid import data structure");const n=JSON.parse(localStorage.getItem("chapter_card_sets")||"[]"),a=new Map(n.map(i=>[i.chapter,i]));e.chapter_card_sets.forEach(i=>{if(a.has(i.chapter)){const o=a.get(i.chapter),s=new Map(o.cards.map(l=>[l.id,l]));i.cards.forEach(l=>{s.has(l.id)||o.cards.push(l)})}else a.set(i.chapter,i)});const r=Array.from(a.values());return localStorage.setItem("chapter_card_sets",JSON.stringify(r)),this.inMemoryData.currentChapter&&(this.loadChapter(this.inMemoryData.currentChapter.chapter),this.checkAndPruneDuplicates()),!0}catch(n){throw console.error("Error merging imported data:",n),n}}async addFlashcardsFromText2(e){const n=this.notificationHandler.showLoadingState("Processing flashcards...");try{const a=e.replace(//gi,"").replace(//gi,"").replace(/data:image\/[^;]+;base64[^"']+/gi,"").replace(/]+>/gi,"").replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"").replace(/\s{2,}/g," ").trim(),r=localStorage.getItem("current_chapter");if(!r)throw new Error("No chapter selected");const i=JSON.parse(r);this.loadChapter(i.chapter);const s=(await z0.getInstance()).generateFlashcards(a);let l="";for await(const p of s)l+=p;let u;try{u=JSON.parse(l)}catch{const p=/\[[\s\S]*?\](?=\s*$)/,A=l.match(p);if(A)try{const m=hze(A[0]);u=JSON.parse(m)}catch(m){throw console.error("Failed to repair/parse JSON:",m),this.notificationHandler.updateNotification(n,"Failed to process JSON","error"),new Error("Failed to repair JSON array")}else throw this.notificationHandler.updateNotification(n,"No valid JSON found","error"),new Error("No valid JSON array found in content")}if(!Array.isArray(u))throw new Error("Parsed content is not an array");const d=u.map(p=>({...p,id:crypto.randomUUID(),tags:["AI-Generated"],created:new Date().toISOString(),repetitions:0,easeFactor:2.5,interval:0,nextReviewDate:null,reviewHistory:[]}));if(this.inMemoryData.currentDeck=[...this.inMemoryData.currentDeck,...d],this.checkAndPruneDuplicates(),await this.saveToLocalStorage(),this.modal){this.modal.flashcards||(this.modal.flashcards=[]),this.modal.flashcards=[...this.modal.flashcards,...d];const p=this.inMemoryData.currentChapter.chapter;this.modal.chapterSets.has(p)||this.modal.chapterSets.set(p,[]);const A=this.modal.chapterSets.get(p);this.modal.chapterSets.set(p,[...A,...d]),requestAnimationFrame(()=>{this.modal.renderChapters(),this.modal.renderTags(),this.modal.uiHandler&&this.modal.uiHandler.updateProgress()})}else console.warn("Modal not available for update");return this.notificationHandler.updateNotification(n,"Cards added successfully!","success"),{success:!0,flashcards:d}}catch(a){throw console.error("Failed to add flashcards from text:",a),this.notificationHandler.updateNotification(n,"Failed to add flashcards","error"),a}}switchActiveChapter(e){try{const n=localStorage.getItem("chapter_card_sets"),r=(n?JSON.parse(n):[]).find(i=>i.chapter===e);return this.inMemoryData.currentChapter={chapter:e,title:this.getChapterTitle(e)},this.inMemoryData.currentDeck=r?r.cards:[],localStorage.setItem("current_chapter",JSON.stringify(this.inMemoryData.currentChapter)),{currentChapter:this.inMemoryData.currentChapter,currentDeck:this.inMemoryData.currentDeck}}catch(n){throw console.error("Failed to switch chapter:",n),n}}async createNewCard(e,n,a=[]){if(!this.inMemoryData.currentChapter)throw console.error("No current chapter selected"),new Error("No current chapter selected");const r={question:e,answer:n,id:crypto.randomUUID(),tags:a,created:new Date().toISOString(),repetitions:0,easeFactor:2.5,interval:0,nextReviewDate:new Date(Date.now()+24*60*60*1e3).toISOString(),reviewHistory:[],lastReviewQuality:0};this.inMemoryData.currentDeck||(this.inMemoryData.currentDeck=[]),this.inMemoryData.currentDeck=[...this.inMemoryData.currentDeck,r];try{return await this.saveToLocalStorage(),this.dispatchEvent(new CustomEvent("data-updated",{detail:{type:"card-added",card:r}})),r}catch(i){throw console.error("Failed to save new card:",i),this.inMemoryData.currentDeck=this.inMemoryData.currentDeck.filter(o=>o.id!==r.id),i}}checkAndPruneDuplicates(){if(!this.inMemoryData.currentDeck)return;const e=new Set,n=new Set,a=[],r={byId:[],byContent:[]};return this.inMemoryData.currentDeck.forEach(i=>{const o=`${i.question}|||${i.answer}`.toLowerCase().trim();if(e.has(i.id)){console.warn("Duplicate card ID found:",i.id),r.byId.push(i);return}if(n.has(o)){console.warn("Duplicate card content found:",{question:i.question,answer:i.answer}),r.byContent.push(i);return}e.add(i.id),n.add(o),a.push(i)}),(r.byId.length>0||r.byContent.length>0)&&(console.warn("Found and removed duplicates:",{duplicateIds:r.byId.length,duplicateContent:r.byContent.length,originalCount:this.inMemoryData.currentDeck.length,newCount:a.length}),this.inMemoryData.currentDeck=a,this.saveToLocalStorage().catch(i=>console.error("Failed to save after removing duplicates:",i)),this.dispatchEvent(new CustomEvent("data-updated",{detail:{type:"duplicates-removed",removedCount:{byId:r.byId.length,byContent:r.byContent.length}}}))),{uniqueCards:a,duplicates:r,totalRemoved:r.byId.length+r.byContent.length}}addReviewActivity(){try{const e=new Date().toISOString().split("T")[0],n=JSON.parse(localStorage.getItem("sr_review_activity")||"{}");return n[e]=(n[e]||0)+1,localStorage.setItem("sr_review_activity",JSON.stringify(n)),n}catch(e){return console.error("Error updating review activity:",e),{}}}getReviewActivity(){try{const e=JSON.parse(localStorage.getItem("sr_review_activity")||"{}");return console.log("Retrieved review activity data:",e),e}catch(e){return console.error("Error getting review activity:",e),{}}}async createChapter(e){throw console.warn("createChapter not implemented in this storage handler"),new Error("createChapter method not implemented")}async addChapter(e){return this.createChapter(e)}async saveInitialDeckAndCards(e,n){throw console.warn("saveInitialDeckAndCards not implemented in this storage handler"),new Error("saveInitialDeckAndCards method not implemented")}}let Ms,rH;async function sjt(){if(Ms&&Sqe(Ms),rH)await rH();else{const{saveChatHistory:t}=await ye(async()=>{const{saveChatHistory:e}=await Promise.resolve().then(()=>qUe);return{saveChatHistory:e}},void 0,import.meta.url);rH=t,await t()}}function IC(t,e,n){const a=document.createElement("button");return a.className="w-6 h-6 flex items-center justify-center hover:text-blue-700 transition-colors duration-200",a.id=n,a.innerHTML=` `,Ms&&Mo(a,e,Ms),a}function cjt(t,e){const n="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z",a=t.innerHTML;t.innerHTML=` `,setTimeout(()=>{t.innerHTML=a},2e3)}function ljt(){return IC("M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3","Back to original reading location","back-btn-group")}function Mce(t){Ms||(Ms=t);const e=document.createElement("div");e.className="flex justify-end space-x-2 mt-4 quiz-btn-group";const n=IC("m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z","Search this text for similar content","highlight-search-btn"),a=IC("M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z","spaced repetition","sr-btn-group"),r=IC("M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z","Share","share-btn-group"),i=IC("M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75","Copy","copy-btn-group"),o=IC("M7.498 15.25H4.372c-1.026 0-1.945-.694-2.054-1.715a12.137 12.137 0 0 1-.068-1.285c0-2.848.992-5.464 2.649-7.521C5.287 4.247 5.886 4 6.504 4h4.016a4.5 4.5 0 0 1 1.423.23l3.114 1.04a4.5 4.5 0 0 0 1.423.23h1.294M7.498 15.25c.618 0 .991.724.725 1.282A7.471 7.471 0 0 0 7.5 19.75 2.25 2.25 0 0 0 9.75 22a.75.75 0 0 0 .75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 0 0 2.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384m-10.253 1.5H9.7m8.075-9.75c.01.05.027.1.05.148.593 1.2.925 2.55.925 3.977 0 1.487-.36 2.89-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398-.306.774-1.086 1.227-1.918 1.227h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 0 0 .303-.54","Rate this question negatively","thumbs-down-btn");o.getAttribute("data-last-score")==="-1"&&(o.classList.add("text-red-500"),Mo(o,"Click again to remove negative rating",Ms)),o.dataset.selected="false",o.addEventListener("click",async u=>{u.preventDefault(),u.stopPropagation();const d=o.closest("#quiz-form");if(!d)return;d.contains(u.target)&&u.preventDefault();const A=o.getAttribute("data-last-score")==="-1";A?(o.removeAttribute("data-last-score"),o.classList.remove("text-red-500"),Mo(o,"Rate this question negatively",Ms),Sa(Ms,"Negative rating removed","info",3e3)):(o.setAttribute("data-last-score","-1"),o.classList.add("text-red-500"),Mo(o,"Click again to remove negative rating",Ms),Sa(Ms,"Thanks for the feedback! We'll improve this question.","success",3e3));try{const m=JSON.parse(d.getAttribute("data-quiz")||"[]");if(m.length===0)return;const g=m[0].id,h=d.getAttribute("chapter-title"),f=d.getAttribute("data-quiz-title"),b=d.closest("[data-difficulty]"),w=b&&{0:"beginner",1:"intermediate",2:"advanced",3:"blooms-taxonomy"}[b.getAttribute("data-difficulty")]||"intermediate";await ujt(g,A,h,f,w),await new Promise(v=>setTimeout(v,2e3)),Sqe(Ms),await sjt()}catch(m){console.error("Failed to submit score:",m),A?(o.setAttribute("data-last-score","-1"),o.classList.add("text-red-500"),Mo(o,"Click again to remove negative rating",Ms)):(o.removeAttribute("data-last-score"),o.classList.remove("text-red-500"),Mo(o,"Rate this question negatively",Ms)),Sa(Ms,"Failed to update rating","error",3e3)}return!1}),n.addEventListener("click",async u=>{u.preventDefault();const d=n.innerHTML;if(n.disabled=!0,n.innerHTML=` `,n.dataset.matches&&n.dataset.matches!=="[]"){const m=parseInt(n.dataset.currentIndex||"0");n.innerHTML=d,n.disabled=!1,LL(n,m);return}const p=n.closest(".quiz-btn-group"),A=n.closest("[data-prompt]");await l(n,p,A,d),n.disabled=!1});async function l(u,d,p,A){if(!d){console.error("Button group not found"),u.innerHTML=A;return}if(d.dataset.initialScrollY=window.scrollY,!d.querySelector("#back-btn-group")){const g=ljt();g.addEventListener("click",h=>{h.preventDefault();const f=parseInt(d.dataset.initialScrollY||"0");window.scrollTo({top:f,behavior:"smooth"})}),d.appendChild(g)}const m=p?.getAttribute("data-prompt");if(!m){u.innerHTML=A;return}document.querySelectorAll(".fuzzy-highlight").forEach(g=>{g.classList.remove("fuzzy-highlight"),g.style.animation=""});try{const g=await $M(m);if(g.length>0){if(u.dataset.matches=JSON.stringify(g),u.dataset.currentIndex="0",!document.getElementById("highlight-styles")){const h=document.createElement("style");h.id="highlight-styles",h.textContent=` @keyframes highlightFade { 0% { background-color: rgba(59, 130, 246, 0.2); } 50% { background-color: rgba(59, 130, 246, 0.4); } 100% { background-color: rgba(59, 130, 246, 0.1); } } .fuzzy-highlight { background-color: rgba(59, 130, 246, 0.1); scroll-margin-top: 100px; } .fuzzy-highlight.animate { animation: highlightFade 2s ease-out; } `,document.head.appendChild(h)}LL(u,0)}else Sa(Ms,"No similar text found in document","info",3e3),u.innerHTML=A}catch(g){console.error("Error in fuzzy matching:",g),u.innerHTML=A,Sa(Ms,"Error finding similar text","error",3e3)}}return r.addEventListener("click",u=>{u.preventDefault();const d=u.currentTarget.closest("#markdown-preview");if(d){const p=d.innerText||d.textContent,A="Shared Content",m=encodeURIComponent(p),g=`mailto:?subject=${encodeURIComponent(A)}&body=${m}`;window.open(g,"_blank")}else console.warn("Share button clicked - No markdown preview found")}),a.addEventListener("click",async u=>{u.preventDefault();const d=a.innerHTML;requestAnimationFrame(()=>{a.innerHTML=` `});try{const p=u.currentTarget.closest("#markdown-preview"),A=p.innerText||p.textContent,g=await new Hqe().addFlashcardsFromText2(A);g.success?Sa(Ms,`Created ${g.flashcards.length} flashcards!`,"success",3e3):Sa(Ms,"Failed to create flashcards","error",3e3)}catch(p){console.error("Failed to create flashcards:",p),Sa(Ms,"Error creating flashcards","error",3e3)}finally{setTimeout(()=>{a.innerHTML=d},2e3)}}),i.addEventListener("click",async u=>{u.preventDefault();const d=u.currentTarget.closest("#markdown-preview");if(d)try{const p=d.innerText||d.textContent;await navigator.clipboard.writeText(p);const A=i.querySelector("path").getAttribute("d");cjt(i,A)}catch(p){console.error("Failed to copy content:",p)}}),e.appendChild(o),e.appendChild(n),e.appendChild(a),e.appendChild(r),e.appendChild(i),e}async function ujt(t,e,n,a,r){try{const i=await fetch(Tqt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chapterId:n,sectionId:a,questionId:t,difficulty:r,scoreChange:e?1:-1})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch(i){throw console.error("Error submitting score:",i),i}}function Wqe(t){t.querySelectorAll(".quiz-btn-group").forEach(n=>{const a=Mce(t);n.parentNode.replaceChild(a,n)})}function djt(t){try{const e=new URL(t);return`${e.protocol}//${e.host}${e.pathname}`.replace(/\/$/,"")}catch(e){return console.warn("Error normalizing URL for cumulative quiz:",e),t}}async function pjt(t){const e=t.correct===t.total,n=parseInt(localStorage.getItem("quizStreak")||"0");e?localStorage.setItem("quizStreak",n+1):localStorage.setItem("quizStreak","0")}function Ajt(){const t=parseInt(localStorage.getItem("totalQuizzes")||"0");localStorage.setItem("totalQuizzes",t+1)}async function nf(){try{const t=await Xr();if(!t||!t.db)throw new Error("Database not properly initialized");return t}catch(t){throw console.error("Error initializing database:",t),t}}async function mjt(t,e){if(!t)throw new Error("Quiz title is required for updating high score");try{const n=await nf(),a={quizTitle:t,score:e,percentageScore:(e.correct/e.total*100).toFixed(2),achievedAt:new Date().toISOString()};await n.update("quizHighScores",a)}catch(n){throw console.error("Error updating high score:",n),n}}async function gjt(){try{return await(await nf()).getAll("quizHighScores")}catch(t){throw console.error("Error getting all high scores:",t),t}}async function hjt(t,e){try{const n=await nf(),a={...e,id:e.id||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`};return t==="quizStats"&&(a.id=a.id||`quiz-${Date.now()}`,a.date=a.date||new Date().toISOString().split("T")[0],a.score=a.score||0),await n.add(t,a)}catch(n){throw console.error("Error saving to indexDB:",n),n}}async function fjt(){try{const t=await nf(),e=new Date().toISOString().split("T")[0],a=(await t.getAll("quizAttempts")).find(r=>r.date===e);a?(a.attempts+=1,await t.update("quizAttempts",a)):await t.add("quizAttempts",{date:e,attempts:1})}catch(t){throw console.error("Error updating quiz attempts:",t),t}}async function bjt(t){try{const e=await nf(),n="ongoingIncorrectQuestions",a=await e.getByKey(n,"current");if(a){const r=new Map;a.questions.forEach(o=>{r.set(o.question,o)}),t.forEach(o=>{r.set(o.question,o)});const i=Array.from(r.values());await e.update(n,{id:"current",questions:i,date:new Date().toISOString(),lastUpdated:new Date().toISOString()})}else await e.add(n,{id:"current",questions:t,date:new Date().toISOString(),lastUpdated:new Date().toISOString()})}catch(e){throw console.error("Error updating incorrect questions:",e),e}}async function yjt(t,e,n,a="section"){if(!n){console.error("Quiz title is required");return}const r=new Date().toISOString(),i=r.split("T")[0],o=a==="cumulative"||n.toLowerCase().includes("cumulative");try{await Promise.all([bjt(t),mjt(n,e),hjt("quizStats",{id:`quiz-${Date.now()}`,date:i,timestamp:r,title:n,score:e,percentageScore:(e.correct/e.total*100).toFixed(2),quizType:o?"cumulative":"section",isCumulative:o})]);const s=window.location.href;await kjt(n,e,s,a),o&&await xjt(n,e)}catch(s){throw console.error("Error in saveQuizResult:",s),s}}function Yqe(t,e,n){return async function(r){r.preventDefault();let i=n;if(i)localStorage.setItem("lastQuizTaken",i);else if(i=localStorage.getItem("lastQuizTaken"),!i){console.error("Quiz title is missing"),Sa(e,"Quiz results not saved - missing quiz title","error");return}const o=e.querySelectorAll('input[type="radio"]:checked'),s=e.querySelectorAll("div.mb-8").length;let l=0,u=[];const d=Array.from(e.querySelectorAll("div.mb-8")).map(m=>{const g=m.querySelector("h4");return g?{question:g.textContent,answers:Array.from(m.querySelectorAll('input[type="radio"]')).map(h=>{const f=h.nextElementSibling,b=h.closest("li")?.querySelector(".explanation");return!f||!b?(console.warn("Missing elements for input:",{nextElement:!!f,explanationElement:!!b}),null):{text:f.textContent,correct:h.dataset.correct==="true",explanation:b.textContent}}).filter(h=>h!==null)}:(console.warn("Question element not found in div:",m),null)}).filter(m=>m!==null);o.forEach(m=>{const g=m.dataset.correct==="true",h=m.closest(".mb-8");if(g)l++;else{const f=h.querySelector("h4");f?u.push({question:f.textContent,answers:Array.from(h.querySelectorAll('input[type="radio"]')).map(b=>{const y=b.nextElementSibling,w=b.closest("li")?.querySelector(".explanation");return!y||!w?(console.warn("Missing elements for incorrect answer input:",{nextElement:!!y,explanationElement:!!w}),null):{text:y.textContent,correct:b.dataset.correct==="true",explanation:w.textContent}}).filter(b=>b!==null)}):console.warn("Question element not found for incorrect answer:",h)}});const p={correct:l,total:s,timestamp:new Date().toISOString()},A=i.toLowerCase().includes("cumulative")?"cumulative":"section";try{await Promise.all([yjt(u,p,i,A),fjt(),vjt(i,d,o)]),pjt(p),Ajt()}catch(m){console.error("Error saving quiz results:",m),Sa(e,"Error saving quiz results","error")}t.call(this,r)}}async function wjt(){try{const t=await nf(),e=await t.getAll("quizStats");return{attempts:(await t.getAll("quizAttempts")).length,totalCorrect:e.reduce((a,r)=>a+r.score.correct,0),totalQuestions:e.reduce((a,r)=>a+r.score.total,0),recentScores:e.slice(-5),allStats:e}}catch(t){throw console.error("Error getting quiz stats:",t),t}}async function Xqe(){try{const{getChapterProgress:t}=await ye(async()=>{const{getChapterProgress:e}=await Promise.resolve().then(()=>aUe);return{getChapterProgress:e}},void 0,import.meta.url);return await t()}catch(t){throw console.error("Error getting chapter progress:",t),t}}async function vjt(t,e,n){try{const a=await nf(),r={id:t,quizTitle:t,attempts:[]},i=await a.getByKey("quizHistory",t),o={date:new Date().toISOString(),answers:Array.from(n).map(s=>{const l=s.closest(".mb-8");if(!l)return console.warn("Question div not found for answer:",s),null;const u=l.querySelector("h4"),d=s.nextElementSibling,p=Array.from(l.querySelectorAll('input[type="radio"]')).find(m=>m.dataset.correct==="true"),A=s.closest("li")?.querySelector(".explanation");return!u||!d||!p||!A?(console.warn("Missing DOM elements for answer:",{questionElement:!!u,nextElement:!!d,correctInput:!!p,explanationElement:!!A}),null):{question:u.textContent,selectedAnswerText:d.textContent,selectedAnswerIndex:parseInt(s.value),wasCorrect:s.dataset.correct==="true",correctAnswer:p.nextElementSibling?.textContent||"Unknown",explanation:A.textContent}}).filter(s=>s!==null),score:{correct:Array.from(n).filter(s=>s.dataset.correct==="true").length,total:e.length},quizData:e};return i?(i.attempts.push(o),await a.update("quizHistory",i)):(r.attempts.push(o),await a.add("quizHistory",r)),o}catch(a){throw console.error("Error saving quiz history:",a),a}}async function rve(t){try{return(await(await nf()).getByKey("quizHistory",t))?.attempts||[]}catch(e){throw console.error("Error getting quiz history:",e),e}}async function kjt(t,e,n,a){try{const r=await nf(),i=djt(n),o=parseFloat((e.correct/e.total*100).toFixed(1)),s=o>=60,l=a==="cumulative",u=await r.getByKey("cumulativeQuizScores",i);let d;u?(d={...u,lastQuizTitle:t,lastQuizType:a,lastQuizScore:{correct:e.correct,total:e.total,percentage:o,passed:s},lastUpdated:new Date().toISOString(),quizHistory:u.quizHistory||[],completedByCumulativeQuiz:l&&s,cumulativeQuizTitle:l?t:u.cumulativeQuizTitle},d.quizHistory.push({quizTitle:t,quizType:a,score:{correct:e.correct,total:e.total,percentage:o,passed:s},completedAt:new Date().toISOString()})):d={normalizedUrl:i,originalUrl:n,pageTitle:document.title||"Untitled",domain:new URL(n).hostname,lastQuizTitle:t,lastQuizType:a,lastQuizScore:{correct:e.correct,total:e.total,percentage:o,passed:s},completedByCumulativeQuiz:l&&s,cumulativeQuizTitle:l?t:null,quizHistory:[{quizTitle:t,quizType:a,score:{correct:e.correct,total:e.total,percentage:o,passed:s},completedAt:new Date().toISOString()}],firstQuizAt:new Date().toISOString(),lastUpdated:new Date().toISOString()},await r.update("cumulativeQuizScores",d),console.log(`✅ Quiz score recorded for: ${i} (${a}, ${o}%)`)}catch(r){console.error("Error updating quiz score in enhanced table:",r)}}async function xjt(t,e){try{const n=await nf();if(!(parseFloat((e.correct/e.total*100).toFixed(2))>=60)){console.log("Cumulative quiz not passed, no page completion update");return}const r=t.replace(/^Cumulative Quiz - /i,"").trim(),{getAllChapterMapEntries:i}=await ye(async()=>{const{getAllChapterMapEntries:l}=await Promise.resolve().then(()=>lIt);return{getAllChapterMapEntries:l}},void 0,import.meta.url),s=(await i()).find(l=>l.title.toLowerCase().includes(r.toLowerCase())||r.toLowerCase().includes(l.title.toLowerCase()));if(s){const l={id:`completion-${s.url}`,pageUrl:s.url,pageTitle:s.title,completedByCumulativeQuiz:!0,cumulativeQuizTitle:t,completedAt:new Date().toISOString(),score:e};await n.update("pageCompletions",l),console.log(`✅ Page completion recorded for: ${s.title}`)}else console.warn(`⚠️ No matching page found for cumulative quiz: ${t}`)}catch(n){console.error("Error updating page completion from cumulative quiz:",n)}}async function Vqe(t,e){return console.log("Quiz results API submission disabled - results saved to IndexedDB only"),{success:!0,message:"API submission disabled"}}class zce{constructor(){this.tooltip=null,this.isVisible=!1,this.currentSourceData=null}show(e,n){if(!e||!e.getBoundingClientRect){console.error("Invalid element provided to tooltip.show");return}this.hide(),this.currentSourceData=n,this.tooltip=this.createTooltip(n),this.positionTooltip(e),this.addEventListeners(),document.body.appendChild(this.tooltip),this.isVisible=!0,this.tooltip.classList.add("tooltip-visible"),this.tooltip.style.opacity="1",this.tooltip.style.transform="translateY(0)"}hide(){this.tooltip&&(this.tooltip.classList.remove("tooltip-visible"),this.tooltip.style.opacity="0",this.tooltip.style.transform="translateY(-10px)",setTimeout(()=>{this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),this.tooltip=null,this.isVisible=!1,this.currentSourceData=null},100))}createTooltip(e){const n=document.createElement("div");n.id="reference-tooltip",n.className="reference-tooltip";const{sourceReference:a,sourceLabel:r,sourceUrl:i,sourcePosition:o}=e;return n.innerHTML=`
    Source Reference
    From: ${r}
    ${this.truncateText(a,200)}
    `,n}positionTooltip(e){const n=e.getBoundingClientRect(),a=this.tooltip.getBoundingClientRect(),r=window.innerWidth,i=window.innerHeight;n.left,r-n.right;let o,s=n.top-a.height-5;o=n.left-a.width-5,o<0&&(o=0),s<10&&(s=n.bottom+5,s+a.height>i-10&&(s=n.top-a.height-5)),s+a.height>i-10&&(s=i-a.height-10),this.tooltip.style.position="fixed",this.tooltip.style.left=`${o}px`,this.tooltip.style.top=`${s}px`,this.tooltip.style.zIndex="9999"}addEventListeners(){this.tooltip.querySelector(".tooltip-close").addEventListener("click",()=>this.hide()),this.tooltip.querySelector(".go-to-source").addEventListener("click",i=>{const o=i.target.closest(".go-to-source").dataset.url,s=i.target.closest(".go-to-source").dataset.position;this.goToSource(o,s)});const a=i=>{i.key==="Escape"&&(this.hide(),document.removeEventListener("keydown",a))};document.addEventListener("keydown",a);const r=i=>{this.tooltip&&!this.tooltip.contains(i.target)&&!i.target.closest(".reference-number")&&(this.hide(),document.removeEventListener("click",r))};setTimeout(()=>{document.addEventListener("click",r)},100),this.tooltip.addEventListener("mouseleave",()=>{this.hide()})}goToSource(e,n){this.hide();const a=new CustomEvent("navigateToSource",{detail:{url:e,position:parseFloat(n)||0,sourceData:this.currentSourceData},bubbles:!0,composed:!0});document.dispatchEvent(a)}truncateText(e,n=200){return e?e.length<=n?e:e.substring(0,n).trim()+"...":"No source reference available"}static addStyles(){if(document.getElementById("reference-tooltip-styles"))return;const e=document.createElement("style");e.id="reference-tooltip-styles",e.textContent=` .reference-tooltip { background: white; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); max-width: 300px; min-width: 250px; width: max-content; opacity: 0; transform: translateY(-10px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: auto; display: block !important; visibility: visible !important; word-wrap: break-word; overflow-wrap: break-word; } .reference-tooltip.tooltip-visible { opacity: 1; transform: translateY(0); } .tooltip-content { padding: 16px; } .tooltip-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f3f4f6; } .tooltip-title { font-weight: 600; color: #374151; font-size: 14px; } .tooltip-close { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background-color 0.2s; } .tooltip-close:hover { background-color: #f3f4f6; color: #374151; } .tooltip-section { margin-bottom: 12px; } .tooltip-label { font-size: 12px; color: #6b7280; font-weight: 500; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; } .tooltip-text { color: #374151; font-size: 13px; line-height: 1.5; margin: 0; } .tooltip-actions { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 8px; border-top: 1px solid #f3f4f6; } .tooltip-action-btn { background: #3b82f6; border: none; border-radius: 6px; color: white; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 6px 12px; transition: background-color 0.2s; } .tooltip-action-btn:hover { background: #2563eb; } .tooltip-action-btn svg { width: 14px; height: 14px; } .reference-number { background: #f3f4f6; border: none; border-radius: 12px; color: #374151; cursor: help; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; height: 20px; min-width: 20px; padding: 0 6px; margin-left: 6px; opacity: 0.8; transition: all 0.2s ease; vertical-align: middle; } .reference-number:hover { background: #6b7280; color: white; opacity: 1; transform: scale(1.05); } `,document.head.appendChild(e)}}zce.addStyles();typeof window<"u"&&window.addEventListener("load",()=>{zce.addStyles()});class Ojt{constructor(){this.tooltip=null,this.initialized=!1,this.init()}init(){this.initialized||(this.tooltip=new zce,this.initializeTooltips(),this.observeContentChanges(),this.setupNavigationListeners(),this.initialized=!0)}initializeTooltips(){const e=document.querySelectorAll(".reference-number"),n=this.findAllReferenceNumbersInShadowDOMs();[...e,...n].forEach((r,i)=>{(r.getAttribute("data-source-reference")||r.getAttribute("data-source-label")||r.getAttribute("data-source-url"))&&this.attachTooltipToElement(r,i)})}findAllReferenceNumbersInShadowDOMs(){const e=[];return document.querySelectorAll("*").forEach(a=>{if(a.shadowRoot){const r=a.shadowRoot.querySelectorAll(".reference-number");e.push(...r)}}),e}attachTooltipToElement(e,n){if(e._tooltipMouseEnter)return;const a=e.getAttribute("data-source-url")||"",r=e.getAttribute("data-source-label")||(a?new URL(a).origin:window.location.origin),i={sourceReference:e.getAttribute("data-source-reference")||"No source reference available",sourceLabel:r,sourceUrl:a,sourcePosition:parseFloat(e.getAttribute("data-source-position"))||0},o=l=>{this.tooltip.show(l.target,i)},s=()=>{setTimeout(()=>{this.tooltip.isVisible||this.tooltip.hide()},100)};e._tooltipMouseEnter=o,e._tooltipMouseLeave=s,e._tooltipMouseEnter&&e.removeEventListener("mouseenter",e._tooltipMouseEnter),e._tooltipMouseLeave&&e.removeEventListener("mouseleave",e._tooltipMouseLeave),e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",s)}observeContentChanges(){new MutationObserver(n=>{n.forEach(a=>{a.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE){r.classList&&r.classList.contains("reference-number")&&(r.getAttribute("data-source-reference")||r.getAttribute("data-source-label")||r.getAttribute("data-source-url"))&&this.attachTooltipToElement(r,0);const i=r.querySelectorAll&&r.querySelectorAll(".reference-number");if(i&&i.length>0&&i.forEach((o,s)=>{(o.getAttribute("data-source-reference")||o.getAttribute("data-source-label")||o.getAttribute("data-source-url"))&&this.attachTooltipToElement(o,s)}),r.shadowRoot){const o=r.shadowRoot.querySelectorAll(".reference-number");o.length>0&&o.forEach((s,l)=>{(s.getAttribute("data-source-reference")||s.getAttribute("data-source-label")||s.getAttribute("data-source-url"))&&this.attachTooltipToElement(s,l)})}}})})}).observe(document.body,{childList:!0,subtree:!0})}setupNavigationListeners(){window.addEventListener("navigateToSource",e=>{const{url:n,position:a,sourceData:r}=e.detail;window.location.href===n?this.scrollToPosition(a):this.navigateToSourceWithPosition(n,a)})}scrollToPosition(e){if(e&&e>0){const n=document.documentElement.scrollHeight-window.innerHeight,a=Math.min(e,n);window.scrollTo({top:a,behavior:"smooth"})}}navigateToSourceWithPosition(e,n){if(n&&n>0){const a=new URL(e);a.searchParams.set("scrollTo",n.toString()),e=a.toString()}n&&n>0&&sessionStorage.setItem("scrollToPosition",n.toString()),window.location.href=e}reinitialize(){this.initializeTooltips()}}let QF=null;function qce(){QF?QF.reinitialize():QF=new Ojt}function Zqe(){return QF}function Cjt(){const t=document.querySelector(".reference-number");if(!t){console.error("No reference number found for testing");return}const e=Zqe();if(!e){console.error("No persistent tooltip manager found");return}const n={sourceReference:"This is a test reference text",sourceLabel:"Test Source",sourceUrl:"http://example.com",sourcePosition:100};try{e.tooltip.show(t,n),console.log("Tooltip test completed")}catch(a){console.error("Tooltip test failed:",a)}}function _jt(){const t=document.querySelectorAll(".socratiq-quiz"),e=document.querySelectorAll(".ai-message-chat"),n=document.querySelectorAll(".reference-number"),a=document.querySelectorAll("h4"),r=document.querySelectorAll('[class*="quiz"], [class*="question"], [class*="answer"]');return{quizForms:t.length,aiMessages:e.length,referenceNumbers:n.length,questions:a.length,potentialQuizContent:r.length}}function Bjt(){const t=Zqe();if(!t){qce();return}t.reinitialize()}typeof window<"u"&&(window.testTooltip=Cjt,window.checkPageState=_jt,window.reinitializeTooltips=Bjt);let iH=null;async function Ejt(){if(iH)await iH();else{const{saveChatHistory:t}=await ye(async()=>{const{saveChatHistory:e}=await Promise.resolve().then(()=>qUe);return{saveChatHistory:e}},void 0,import.meta.url);iH=t,await t()}}async function eg(t,e,n,a,r="",i=null,o=null){const s=t.querySelector("#quiz-form"),l=t.querySelector("#submit-quiz-btn");r&&r["final-review"]&&s.classList.add("final-review-quiz");const u=()=>{const f=new Date().getTime(),b=Math.random().toString(36).substring(2,15);return`${f}-${b}`},d=`submit-quiz-btn-${u()}`;l.id=d,l.classList.add("socratiq-quiz-submit");const p=document.createElement("style");p.textContent=` #${d} { margin-top: 1rem; width: 100%; background-color: black; color: white; padding: 0.5rem 1rem; border-radius: 0.25rem; transition: background-color 0.2s; margin-bottom: 10px; } #${d}:hover { background-color: #333; } .final-review-quiz { background-color: #EFE4D4; /* Lighter version of #E0C9A6 */ padding: 20px; border-radius: 8px; } .reference-number { background: #f3f4f6; border: none; border-radius: 12px; color: #374151; cursor: help; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; height: 20px; min-width: 20px; padding: 0 6px; margin-left: 6px; opacity: 0.8; transition: all 0.2s ease; vertical-align: middle; } .reference-number:hover { background: #6b7280; color: white; opacity: 1; transform: scale(1.05); } `,t.appendChild(p);function A(f){if(s.innerHTML="",s.classList.add("socratiq-quiz"),s.setAttribute("data-quiz",JSON.stringify(f)),s.setAttribute("chapter-title",a),s.setAttribute("data-quiz-title",n),o&&(s.setAttribute("data-context-url",o.url),s.setAttribute("data-context-title",o.title),s.setAttribute("data-context-content-length",o.content.totalLength),s.setAttribute("data-context-source-count",o.content.sourceCount),s.setAttribute("data-context-scroll-position",o.position.scrollPercentage.y),s.setAttribute("data-context-timestamp",o.timestamp)),!f||!Array.isArray(f)){console.error("❌ Invalid quiz data received:",f),console.error("❌ Quiz data type:",typeof f),console.error("❌ Quiz data value:",f);let b="Error: Invalid quiz data received";f==null?b="Error: No quiz data received from AI":typeof f=="string"?b=`Error: AI returned text instead of quiz data: "${f.substring(0,100)}..."`:typeof f=="object"&&!Array.isArray(f)&&(b=`Error: AI returned object instead of quiz array: ${JSON.stringify(f).substring(0,100)}...`),s.innerHTML=`
    ${b}
    `;return}f.forEach((b,y)=>{if(!b||typeof b!="object"){console.error("Invalid question object:",b);return}if(!b.question){console.error("Question missing text:",b);return}const w=document.createElement("div");w.classList.add("mb-8");const v=document.createElement("div");v.classList.add("flex","items-start","gap-2");const k=document.createElement("h4");if(k.classList.add("text-lg","font-semibold","mb-2","flex-1"),k.textContent=b.question,b.sourceReference){const x=document.createElement("span");x.classList.add("reference-number"),x.textContent=`${y+1}`;const C=i&&i[y]?i[y].pageUrl:"",B=i&&i[y]?i[y].label:C?new URL(C).origin:window.location.origin,I={sourceReference:b.sourceReference,sourceLabel:B,sourceUrl:C,sourcePosition:i&&i[y]?i[y].position:0};x.setAttribute("data-source-reference",I.sourceReference),x.setAttribute("data-source-label",I.sourceLabel),x.setAttribute("data-source-url",I.sourceUrl),x.setAttribute("data-source-position",I.sourcePosition.toString()),x.setAttribute("data-tooltip-enabled","true"),k.appendChild(x)}v.appendChild(k),w.appendChild(v);const _=document.createElement("ul");_.classList.add("list-none","space-y-2"),b.answers.forEach((x,C)=>{const B=document.createElement("li"),I=document.createElement("div");I.classList.add("answer-option","flex","items-center");const E=document.createElement("input");E.type="radio";const S=u();E.id=S,E.name=`question${y}`,E.value=C,E.classList.add("mr-2"),E.dataset.correct=x.correct;const P=document.createElement("label");P.htmlFor=S,P.textContent=x.text,P.classList.add("flex-1");const O=document.createElement("div");if(O.classList.add("explains_wrapper","hidden"),x.correct){O.classList.add("relative","mt-2","rounded-lg","border-2","border-green-500","p-3");const D=document.createElement("div");D.classList.add("absolute","-top-3","left-2","rounded-lg","border-2","border-green-500","bg-white","px-2","text-xs","text-green-500"),D.textContent="Correct",O.appendChild(D)}const T=document.createElement("p");T.textContent=x.explanation,T.classList.add("explanation","text-sm","text-purple-500"),O.appendChild(T),I.appendChild(E),I.appendChild(P),B.append(I),B.appendChild(O),_.appendChild(B)}),w.appendChild(_),s.appendChild(w)}),qce()}function m(f){f.preventDefault();const b=s.querySelector(".quiz-btn-group");b&&b.remove();const y=s.querySelectorAll('input[type="radio"]:checked'),w=s.querySelectorAll(".explains_wrapper");let v=0;y.forEach(x=>{const C=x.dataset.correct==="true",B=x.closest("li");C?(v++,B.classList.add("correct-answer")):B.classList.add("wrong-answer")}),w.forEach(x=>{x.classList.remove("hidden")});const k=`You got ${v} out of ${e.length} questions correct.`;t.querySelector("#result").textContent=k,l.setAttribute("data-quiz-results",s.textContent),Vqe().catch(x=>console.error("Failed to submit quiz results:",x)),l.textContent="Explain in more detail",l.removeEventListener("click",m),l.addEventListener("click",g);const _=Mce(t);s.appendChild(_),window.dispatchEvent(new CustomEvent("quizSubmitted"))}function g(){const f=new CustomEvent("aiActionCompleted",{detail:{text:l.dataset.quizResults,type:"query"}});window.dispatchEvent(f)}const h=Yqe(m.bind(null),s,n);l.addEventListener("click",h),A(e),await Ejt()}async function Qjt(t,e,n){t.preventDefault(),t.stopPropagation();try{const a=JSON.parse(e.getAttribute("data-quiz"));return Yqe(async i=>{const o=e.querySelectorAll('input[type="radio"]:checked'),s=e.querySelectorAll(".explains_wrapper");let l=0;o.forEach((b,y)=>{const w=b.dataset.correct==="true",v=b.closest("li");w?(l++,v.classList.add("correct-answer")):v.classList.add("wrong-answer")}),s.forEach(b=>{b.classList.remove("hidden")});const u=`You got ${l} out of ${a.length} questions correct.`,d=e.closest("#quiz"),p=d.querySelector("#result");p.textContent=u;const A=d.querySelector(".socratiq-quiz-submit");if(!A){console.error("Submit button not found");return}A.setAttribute("data-quiz-results",e.textContent),Vqe(e,o).catch(b=>console.error("Failed to submit quiz results:",b));const m=A.querySelector("svg");A.textContent="Explain in more detail",m&&A.insertBefore(m,A.firstChild);const g=e.querySelector(".quiz-btn-group");g&&g.remove();const h=Mce(e.getRootNode());e.appendChild(h);const f=A.cloneNode(!0);A.parentNode.replaceChild(f,A),f.addEventListener("click",()=>{Sjt(e)},{once:!0}),window.dispatchEvent(new CustomEvent("quizSubmitted"))},e,n)(t)}catch(a){throw console.error("Error in handleReinitializedQuizSubmit:",a,{stack:a.stack,formData:e?{hasQuizAttr:e.hasAttribute("data-quiz"),quizAttrValue:e.getAttribute("data-quiz"),title:n}:"No form"}),a}}async function Sjt(t){const e=t.textContent,n=new CustomEvent("aiActionCompleted",{detail:{text:e,type:"query"}});window.dispatchEvent(n)}function Kqe(t){t.querySelectorAll(".ai-message-chat").forEach((n,a)=>{const r=n.querySelector(".socratiq-quiz"),i=n.querySelector(".socratiq-quiz-submit");if(console.log(`Processing message ${a+1}:`,{hasQuizForm:!!r,hasSubmitButton:!!i}),!(!r||!i))try{const o=r.getAttribute("data-quiz-title"),s=i.cloneNode(!0);if(i.parentNode.replaceChild(s,i),s.hasAttribute("data-quiz-results")){s.textContent="Explain in more detail";const u=()=>{const d=new CustomEvent("aiActionCompleted",{detail:{text:s.getAttribute("data-quiz-results"),type:"query"}});window.dispatchEvent(d)};s.addEventListener("click",u,{once:!0})}else{const u=d=>{try{return Qjt(d,r,o)}catch(p){throw console.error("Error in submit handler:",p),p}};s.addEventListener("click",u,{once:!0})}}catch(o){console.error("Error reinitializing quiz button:",o,{quizForm:r,submitButton:i,stack:o.stack})}}),qce()}const Ijt=Object.freeze(Object.defineProperty({__proto__:null,ini_quiz:eg,reinitializeQuizButtons:Kqe},Symbol.toStringTag,{value:"Module"}));class Jqe{constructor(e){this.shadowRoot=e}handleDifficultySelection(e,n,a){const r=e.closest(".ai-message-chat");if(!r){console.error("Could not find parent AI message");return}const i=r.getAttribute("data-prompt"),o=r.getAttribute("data-type"),s=r.getAttribute("data-title");if(!i||!o){console.error("Missing required attributes on AI message");return}r.setAttribute("data-difficulty",n);const l=Nqe[n],u=`$${i}`,d=new CustomEvent("aiActionCompleted",{detail:{type:o,text:u,ele:r,tempDifficultyLevel:l,quizTitle:s}});window.dispatchEvent(d)}}class Djt{constructor(e,n=!1){this.allShadow=e,this.isNoSlider=n,this.isInitializing=!0,n||(this.shadowEle=e.querySelector("#modal1"),this.settings={sliderValue:1,selectedDropdownValue:"",checkboxes:{},modalDisplayed:!1,pushContent:!1,customAPI:{provider:"",endpoint:"",model:"",apiKey:"",saveLocally:!1,enabled:!1}},this.loadSettings(),this.initializeMenuBehavior()),this.isInitializing=!1}init(){if(this.isNoSlider)this.allShadow.querySelectorAll(".difficulty-dropdown").forEach(n=>{this.initializeSingleDropdown(n,!0)});else{const e=this.shadowEle.querySelector("#understanding-slider");e&&(e.addEventListener("input",a=>{this.updateSlider(a.target.value)}),this.updateSlider(e.value)),this.shadowEle.querySelectorAll('input[type="checkbox"]').forEach(a=>{a.addEventListener("change",r=>{this.updateCheckbox(a.id,r.target.checked)}),this.updateCheckbox(a.id,a.checked)}),this.initializeDifficultyDropdown(),this.initializeDifficultyDropdownToggle(),this.initializeCustomAPISettings(),this.dispatchAndUpdate("init",!0),this.dispatchAndUpdate_settings("init",!0)}}dispatchHighlightMenuEvent(e){const n=new CustomEvent("highlight-menu-starts",{detail:{enabled:e}});window.dispatchEvent(n)}dispatchAndUpdate(e,n){const a=new CustomEvent("aiActionCompleted",{detail:{type:"system_prompt",text:this.generateSystemPrompt()}});window.dispatchEvent(a)}dispatchAndUpdate_settings(e,n){const a=new CustomEvent("aiActionCompleted",{detail:{settings:this.generateSettings(),type:"settings"}});if(window.dispatchEvent(a),e!=="init"){let r=n;typeof n=="object"&&n!==null&&(e==="customAPI"&&n.provider?r=`${n.provider} API`:r=JSON.stringify(n)),Sa(this.shadowEle,"setting "+e+" with value "+r+" is updated","success")}}updateSlider(e){if(this.settings.sliderValue=parseInt(e,10),this.saveSettings(),window.current_difficulty=this.settings.sliderValue,!this.isInitializing){const i=new CustomEvent("aiActionCompleted",{detail:{type:"system_prompt",text:Nqe[this.settings.sliderValue]}});window.dispatchEvent(i)}const n=["🚲 Beginner","🚗 Intermediate","🚁 Advanced","🛸 Bloom's Taxonomy"];this.allShadow.querySelectorAll(".current-difficulty-level").forEach(i=>{i.textContent=n[e]}),this.shadowEle.querySelectorAll(".difficulty-level").forEach((i,o)=>{o===this.settings.sliderValue?i.classList.add("bg-blue-50","dark:bg-zinc-700","p-2","rounded"):i.classList.remove("bg-blue-50","dark:bg-zinc-700","p-2","rounded")})}updateDropdown(e){this.settings.selectedDropdownValue=e}updateCheckbox(e,n){this.settings.checkboxes[e]=n,this.saveSettings(),e==="Show answers"?this.dispatchAndUpdate(e,n):this.dispatchAndUpdate_settings(e,n)}generateSystemPrompt(){const e=["Beginner: Focus on foundational concepts, definitions, and straightforward applications in machine learning systems, suitable for learners with little to no prior knowledge.","Intermediate: Emphasize problem-solving, system design, and practical implementations, targeting learners with a basic understanding of machine learning principles.","Advanced: Challenge learners to analyze, innovate, and optimize complex machine learning systems, requiring deep expertise and a holistic grasp of advanced techniques.","requesting Bloom's Taxonomy: You are an expert ML teacher using Bloom's Taxonomy: Create responses that progress through Bloom's levels: remember, understand, apply, analyze, evaluate, and create."],n=e[this.settings.sliderValue]||"unknown level";this.shadowEle.querySelectorAll(".difficulty-level").forEach((o,s)=>{s===this.settings.sliderValue?o.classList.add("bg-blue-50","dark:bg-zinc-700","p-2","rounded"):o.classList.remove("bg-blue-50","dark:bg-zinc-700","p-2","rounded")}),this.settings.checkboxes["Show answers"];const r=this.settings.checkboxes["Apply-blooms-taxonomy"],i="";return Sa(this.shadowEle,"Question difficulty level: "+e[this.settings.sliderValue].split(":")[0],"success"),`Tailor your response for a: ${n}. ${i} ${r?"Apply Bloom's Taxonomy in your response structure.":""}`}generateSettings(){const e=this.settings.selectedDropdownValue,n=this.settings.checkboxes["Show chain of thought"];return{llm_model:e,show_progress:n,customAPI:this.settings.customAPI}}saveSettings(){localStorage.setItem("userSettings",JSON.stringify(this.settings))}loadSettings(){const e=localStorage.getItem("userSettings");e&&(this.settings=JSON.parse(e)),window.current_difficulty=this.settings.sliderValue;const n=this.shadowEle.querySelector("#understanding-slider");n&&(n.value=this.settings.sliderValue,this.shadowEle.querySelectorAll(".difficulty-level").forEach((r,i)=>{i===this.settings.sliderValue?r.classList.add("bg-blue-50","dark:bg-zinc-700","p-2","rounded"):r.classList.remove("bg-blue-50","dark:bg-zinc-700","p-2","rounded")}))}initializeDifficultyDropdown(){const e=this.allShadow.querySelectorAll(".difficulty-dropdown");e.forEach(n=>{}),e.forEach(n=>{if(!n.dataset.initialized){const a=n.querySelector(".current-difficulty-level"),r=["🚲 Beginner","🚗 Intermediate","🚁 Advanced","🛸 Bloom's Taxonomy"];a&&(a.textContent=r[this.settings.sliderValue].slice(2).trim());const i=n.querySelector("button"),o=n.querySelector(".difficulty-options");i&&i.addEventListener("click",s=>{s.stopPropagation(),o.classList.toggle("hidden")}),n.dataset.initialized=!0,document.addEventListener("click",()=>{o.classList.add("hidden")})}})}initializeSingleDropdown(e,n=!1){const a=new Jqe(this.allShadow),r=e.querySelector(".current-difficulty-level"),i=["🚲 Beginner","🚗 Intermediate","🚁 Advanced","🛸 Bloom's Taxonomy"];r&&!n&&!this.isNoSlider&&(r.textContent=i[this.settings.sliderValue].slice(2).trim());const o=e.querySelector("button");Mo(o,"Redo this AI response with this a new learner understanding level",this.allShadow);const s=e.querySelector(".difficulty-options");o&&o.addEventListener("click",u=>{u.stopPropagation(),s.classList.toggle("hidden")}),e.querySelectorAll(".difficulty-option").forEach((u,d)=>{u.addEventListener("click",()=>{r.textContent=i[d].slice(2).trim(),s.classList.add("hidden");const p=e.closest(".ai-message-chat");if(!p){console.error("Could not find parent AI message component");return}const A=document.createElement("div");A.id="progress";const m=p.querySelector(".markdown-preview-container"),g=p.querySelector(".copy-paste-share-btn-container");if(g&&g.remove(),m)m.parentNode.insertBefore(A,m),m.id="markdown-preview";else{console.error("Could not find content container in AI message");return}a.handleDifficultySelection(e,d,p)})}),e.dataset.initialized=!0,document.addEventListener("click",u=>{e.contains(u.target)||s.classList.add("hidden")})}updatePushContent(e){this.settings.pushContent=e,this.saveSettings();const n=this.allShadow.querySelector("#text-selection-menu");n&&n.classList.contains("translate-x-0")&&(document.body.style.marginRight=e?"400px":"0",document.body.style.transition="margin-right 0.3s ease-in-out")}initializeMenuBehavior(){document.querySelector("#mybody"),this.allShadow.querySelector("#text-selection-menu");const e=this.shadowEle.querySelector("#push-content-toggle");if(!e){console.warn("Push content toggle not found");return}const n=this.settings.pushContent||!1;e.checked=n,document.body.classList.toggle("push-content-enabled",n),document.body.classList.toggle("push-content-disabled",!n),e.addEventListener("change",r=>{const i=r.target.checked;this.updatePushContent(i)}),window.addEventListener("menuDisplayModeChanged",r=>{const i=r.detail.pushContent;document.body.classList.toggle("push-content-enabled",i),document.body.classList.toggle("push-content-disabled",!i)});const a=this.allShadow.querySelector("#menu-toggle");a&&a.addEventListener("change",r=>{document.body.classList.toggle("menu-open",r.target.checked)})}initializeDifficultyDropdownToggle(){const e=this.shadowEle.querySelector("#difficulty-dropdown-toggle"),n=this.shadowEle.querySelector("#difficulty-content");if(!e||!n){console.warn("Difficulty dropdown elements not found");return}n.classList.add("difficulty-content-collapsed"),n.classList.remove("difficulty-content-expanded"),e.addEventListener("click",()=>{n.classList.contains("difficulty-content-collapsed")?(n.classList.remove("difficulty-content-collapsed"),n.classList.add("difficulty-content-expanded"),e.classList.add("rotated")):(n.classList.remove("difficulty-content-expanded"),n.classList.add("difficulty-content-collapsed"),e.classList.remove("rotated"))})}initializeCustomAPISettings(){const e=this.shadowEle.querySelector("#custom-api-toggle"),n=this.shadowEle.querySelector("#custom-api-config"),a=this.shadowEle.querySelector("#default-api-info"),r=this.shadowEle.querySelector("#ai-provider"),i=this.shadowEle.querySelector("#api-model"),o=this.shadowEle.querySelector("#api-endpoint"),s=this.shadowEle.querySelector("#api-key"),l=this.shadowEle.querySelector("#save-locally"),u=this.shadowEle.querySelector("#reset-custom-api");if(!e||!n||!a||!r||!i||!o||!s||!l||!u){console.warn("Custom API elements not found in settings modal");return}this.settings.customAPI&&(e.checked=this.settings.customAPI.enabled||!1,r.value=this.settings.customAPI.provider||"",i.value=this.settings.customAPI.model||"",o.value=this.settings.customAPI.endpoint||"",s.value=this.settings.customAPI.apiKey||"",l.checked=this.settings.customAPI.saveLocally||!1),this.updateCustomAPIUI(e.checked,n,a),e.addEventListener("change",d=>{this.updateCustomAPIUI(d.target.checked,n,a),this.updateCustomAPI(r.value,o.value,i.value,s.value,l.checked,d.target.checked)}),r.addEventListener("change",d=>{this.handleProviderChange(d.target.value,i,o),this.updateCustomAPI(d.target.value,o.value,i.value,s.value,l.checked,e.checked)}),i.addEventListener("input",d=>{this.updateCustomAPI(r.value,o.value,d.target.value,s.value,l.checked,e.checked)}),o.addEventListener("input",d=>{this.updateCustomAPI(r.value,d.target.value,i.value,s.value,l.checked,e.checked)}),s.addEventListener("input",d=>{this.updateCustomAPI(r.value,o.value,i.value,d.target.value,l.checked,e.checked)}),l.addEventListener("change",d=>{this.updateCustomAPI(r.value,o.value,i.value,s.value,d.target.checked,e.checked)}),u.addEventListener("click",d=>{this.resetCustomAPISettings(r,i,o,s,l,e)})}handleProviderChange(e,n,a){const r={"google-gemini":{endpoint:"https://generativelanguage.googleapis.com/v1beta",model:"gemini-2.5-flash"},ollama:{endpoint:"http://localhost:11434/api/generate",model:"gemma3:270m"},openai:{endpoint:"https://api.openai.com/v1/chat/completions",model:"gpt-3.5-turbo"},"open-router":{endpoint:"https://openrouter.ai/api/v1/chat/completions",model:"meta-llama/llama-4-scout:free"},groq:{endpoint:"https://api.groq.com/openai/v1/chat/completions",model:"llama-3.1-8b-instant"},anthropic:{endpoint:"https://api.anthropic.com/v1/messages",model:"claude-3-sonnet-20240229"}};if(e&&r[e]){const i=r[e];a.value=i.endpoint,n.value=i.model,console.log(`[AUTO_FILL] Provider changed to ${e}:`,i)}else e===""&&(a.value="",n.value="")}updateCustomAPIUI(e,n,a){e?(n.classList.remove("hidden"),a.classList.add("hidden")):(n.classList.add("hidden"),a.classList.remove("hidden"))}resetCustomAPISettings(e,n,a,r,i,o){e.value="",n.value="",a.value="",r.value="",i.checked=!1,o.checked=!1,this.settings.customAPI={provider:"",endpoint:"",model:"",apiKey:"",saveLocally:!1,enabled:!1},this.saveSettings(),this.dispatchAndUpdate_settings("customAPI",this.settings.customAPI),this.updateCustomAPIUI(!1,this.shadowEle.querySelector("#custom-api-config"),this.shadowEle.querySelector("#default-api-info")),Sa(this.shadowEle,"Custom API settings reset to defaults","success")}updateCustomAPI(e,n,a,r,i,o){this.settings.customAPI={provider:e||"",endpoint:n||"",model:a||"",apiKey:r||"",saveLocally:i||!1,enabled:o||!1},this.saveSettings(),this.dispatchAndUpdate_settings("customAPI",this.settings.customAPI),o&&e&&n?Sa(this.shadowEle,`Custom API configured: ${e}`,"success"):o||Sa(this.shadowEle,"Using SocratiQ default AI providers","success")}}function $jt(t){const e=t.querySelector("#modal1"),n=t.querySelector("#settings-btn");Mo(n,"Open settings",t);const a=e.querySelector("#close-btn"),r=document.createElement("div");r.classList.add("settings-modal-overlay"),r.style.cssText=` position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.5); z-index: 99999; /* Increased z-index to be higher than the menu */ display: none; pointer-events: auto; /* Ensure clicks are captured */ `,e.style.cssText=` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 100000; /* Higher than overlay */ display: none; max-height: 90vh; overflow-y: auto; border-radius: 0.5rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); pointer-events: auto; `,t.appendChild(r);const i=()=>{const s=e.style.display==="block";e.style.display=s?"none":"block",r.style.display=s?"none":"block",s?document.body.style.overflow="":(document.body.style.overflow="hidden",r.style.position="fixed",r.style.zIndex="99999")},o=()=>{e.style.display="none",r.style.display="none",document.body.style.overflow=""};return n.addEventListener("click",i),a.addEventListener("click",o),r.addEventListener("click",o),e.addEventListener("click",s=>{s.stopPropagation()}),window.addEventListener("keydown",s=>{s.key==="Escape"&&e.style.display==="block"&&o()}),()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}}let Tjt={one:{},two:{},three:{},four:{}},Pjt={one:{},two:{},three:{}},Fjt={},Rjt=[];const gee={methods:Tjt,model:Pjt,compute:Fjt,hooks:Rjt},Ljt=t=>Object.prototype.toString.call(t)==="[object Array]",Njt={compute:function(t){const{world:e}=this,n=e.compute;return typeof t=="string"&&n.hasOwnProperty(t)?n[t](this):Ljt(t)?t.forEach(a=>{e.compute.hasOwnProperty(a)?n[a](this):console.warn("no compute:",t)}):typeof t=="function"?t(this):console.warn("no compute:",t),this}},Mjt=function(t){return this.fullPointer.forEach((n,a)=>{let r=this.update([n]);t(r,a)}),this},zjt=function(t,e){let a=this.fullPointer.map((i,o)=>{let s=this.update([i]),l=t(s,o);return l===void 0?this.none():l});if(a.length===0)return e||this.update([]);if(a[0]!==void 0&&(typeof a[0]=="string"||typeof a[0]=="object"&&(a[0]===null||!a[0].isView)))return a;let r=[];return a.forEach(i=>{r=r.concat(i.fullPointer)}),this.toView(r)},qjt=function(t){let e=this.fullPointer;return e=e.filter((a,r)=>{let i=this.update([a]);return t(i,r)}),this.update(e)},jjt=function(t){let n=this.fullPointer.find((a,r)=>{let i=this.update([a]);return t(i,r)});return this.update([n])},Ujt=function(t){return this.fullPointer.some((n,a)=>{let r=this.update([n]);return t(r,a)})},Gjt=function(t=1){let e=this.fullPointer,n=Math.floor(Math.random()*e.length);return n+t>this.length&&(n=this.length-t,n=n<0?0:n),e=e.slice(n,n+t),this.update(e)},Hjt={forEach:Mjt,map:zjt,filter:qjt,find:jjt,some:Ujt,random:Gjt},mg={termList:function(){return this.methods.one.termList(this.docs)},terms:function(t){let e=this.match(".");return typeof t=="number"?e.eq(t):e},groups:function(t){if(t||t===0)return this.update(this._groups[t]||[]);let e={};return Object.keys(this._groups).forEach(n=>{e[n]=this.update(this._groups[n])}),e},eq:function(t){let e=this.pointer;return e||(e=this.docs.map((n,a)=>[a])),e[t]?this.update([e[t]]):this.none()},first:function(){return this.eq(0)},last:function(){let t=this.fullPointer.length-1;return this.eq(t)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(t,e){let n=this.pointer||this.docs.map((a,r)=>[r]);return n=n.slice(t,e),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let t=this.fullPointer.map(e=>[e[0]]);return this.update(t).toView()},none:function(){return this.update([])},isDoc:function(t){if(!t||!t.isView)return!1;let e=this.fullPointer,n=t.fullPointer;return!e.length===n.length?!1:e.every((a,r)=>n[r]?a[0]===n[r][0]&&a[1]===n[r][1]&&a[2]===n[r][2]:!1)},wordCount:function(){return this.docs.reduce((t,e)=>(t+=e.filter(n=>n.text!=="").length,t),0)},isFull:function(){let t=this.pointer;if(!t)return!0;if(t.length===0||t[0][0]!==0)return!1;let e=0,n=0;return this.document.forEach(a=>e+=a.length),this.docs.forEach(a=>n+=a.length),e===n},getNth:function(t){return typeof t=="number"?this.eq(t):typeof t=="string"?this.if(t):this}};mg.group=mg.groups;mg.fullSentence=mg.fullSentences;mg.sentence=mg.fullSentences;mg.lastTerm=mg.lastTerms;mg.firstTerm=mg.firstTerms;const hee=Object.assign({},mg,Njt,Hjt);hee.get=hee.eq;class cw{constructor(e,n,a={}){[["document",e],["world",gee],["_groups",a],["_cache",null],["viewType","View"]].forEach(i=>{Object.defineProperty(this,i[0],{value:i[1],writable:!0})}),this.ptrs=n}get docs(){let e=this.document;return this.ptrs&&(e=gee.methods.one.getDoc(this.ptrs,this.document)),e}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:e,ptrs:n,document:a}=this;return(n||e.map((i,o)=>[o])).map(i=>{let[o,s,l,u,d]=i;return s=s||0,l=l||(a[o]||[]).length,a[o]&&a[o][s]&&(u=u||a[o][s].id,a[o][l-1]&&(d=d||a[o][l-1].id)),[o,s,l,u,d]})}update(e){let n=new cw(this.document,e);if(this._cache&&e&&e.length>0){let a=[];e.forEach((r,i)=>{let[o,s,l]=r;r.length===1?a[i]=this._cache[o]:s===0&&this.document[o].length===l&&(a[i]=this._cache[o])}),a.length>0&&(n._cache=a)}return n.world=this.world,n}toView(e){return new cw(this.document,e||this.pointer)}fromText(e){const{methods:n}=this;let a=n.one.tokenize.fromString(e,this.world),r=new cw(a);return r.world=this.world,r.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&r.compute("preTagger"),r.compute("unfreeze"),r}clone(){let e=this.document.slice(0);e=e.map(a=>a.map(r=>(r=Object.assign({},r),r.tags=new Set(r.tags),r)));let n=this.update(this.pointer);return n.document=e,n._cache=this._cache,n}}Object.assign(cw.prototype,hee);const Wjt="14.14.3",ive=function(t){return t&&typeof t=="object"&&!Array.isArray(t)};function eje(t,e){if(ive(e))for(const n in e)ive(e[n])?(t[n]||Object.assign(t,{[n]:{}}),eje(t[n],e[n])):Object.assign(t,{[n]:e[n]});return t}function Yjt(t,e){for(const n in e)t[n]=t[n]||{},Object.assign(t[n],e[n]);return t}const Xjt=function(t,e){let n=t.two.models||{};Object.keys(e).forEach(a=>{e[a].pastTense&&(n.toPast&&(n.toPast.ex[a]=e[a].pastTense),n.fromPast&&(n.fromPast.ex[e[a].pastTense]=a)),e[a].presentTense&&(n.toPresent&&(n.toPresent.ex[a]=e[a].presentTense),n.fromPresent&&(n.fromPresent.ex[e[a].presentTense]=a)),e[a].gerund&&(n.toGerund&&(n.toGerund.ex[a]=e[a].gerund),n.fromGerund&&(n.fromGerund.ex[e[a].gerund]=a)),e[a].comparative&&(n.toComparative&&(n.toComparative.ex[a]=e[a].comparative),n.fromComparative&&(n.fromComparative.ex[e[a].comparative]=a)),e[a].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[a]=e[a].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[e[a].superlative]=a))})},Vjt=function(t,e,n,a){const{methods:r,model:i,compute:o,hooks:s}=e;t.methods&&Yjt(r,t.methods),t.model&&eje(i,t.model),t.irregulars&&Xjt(i,t.irregulars),t.compute&&Object.assign(o,t.compute),s&&(e.hooks=s.concat(t.hooks||[])),t.api&&t.api(n),t.lib&&Object.keys(t.lib).forEach(l=>a[l]=t.lib[l]),t.tags&&a.addTags(t.tags),t.words&&a.addWords(t.words),t.frozen&&a.addWords(t.frozen,!0),t.mutate&&t.mutate(e,a)};var ove={};const Zjt=function(t){const e=typeof process>"u"||!ove?self.env||{}:ove;return e.DEBUG_TAGS=t==="tagger"||t===!0?!0:"",e.DEBUG_MATCH=t==="match"||t===!0?!0:"",e.DEBUG_CHUNKS=t==="chunker"||t===!0?!0:"",this},Kjt=t=>Object.prototype.toString.call(t)==="[object Object]",fee=function(t){return Object.prototype.toString.call(t)==="[object Array]"},Jjt=function(t){return t.map(e=>e.terms.map(n=>(fee(n.tags)&&(n.tags=new Set(n.tags)),n)))},eUt=function(t){return t.map(e=>e.map(n=>({text:n,normal:n,pre:"",post:" ",tags:new Set})))},tje=function(t,e,n){const{methods:a}=n;let r=new e([]);if(r.world=n,typeof t=="number"&&(t=String(t)),!t)return r;if(typeof t=="string"){let i=a.one.tokenize.fromString(t,n);return new e(i)}if(Kjt(t)&&t.isView)return new e(t.document,t.ptrs);if(fee(t)){if(fee(t[0])){let o=eUt(t);return new e(o)}let i=Jjt(t);return new e(i)}return r};let qL=Object.assign({},gee);const Fa=function(t,e){e&&Fa.addWords(e);let n=tje(t,cw,qL);return t&&n.compute(qL.hooks),n};Object.defineProperty(Fa,"_world",{value:qL,writable:!0});Fa.tokenize=function(t,e){const{compute:n}=this._world;e&&Fa.addWords(e);let a=tje(t,cw,qL);return n.contractions&&a.compute(["alias","normal","machine","contractions"]),a};Fa.plugin=function(t){return Vjt(t,this._world,cw,this),this};Fa.extend=Fa.plugin;Fa.world=function(){return this._world};Fa.model=function(){return this._world.model};Fa.methods=function(){return this._world.methods};Fa.hooks=function(){return this._world.hooks};Fa.verbose=Zjt;Fa.version=Wjt;const tUt=function(t){return t.map(n=>{let a=new Set;return n.forEach(r=>{r.normal!==""&&a.add(r.normal),r.switch&&a.add(`%${r.switch}%`),r.implicit&&a.add(r.implicit),r.machine&&a.add(r.machine),r.root&&a.add(r.root),r.alias&&r.alias.forEach(o=>a.add(o));let i=Array.from(r.tags);for(let o=0;o{t.text=t.text.toLowerCase()}),this},toUpperCase:function(){return this.termList().forEach(t=>{t.text=t.text.toUpperCase()}),this},toTitleCase:function(){return this.termList().forEach(t=>{t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,e=>e.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(t=>{t.forEach((e,n)=>{n!==0&&(e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,a=>a.toUpperCase())),n!==t.length-1&&(e.post="")})}),this}},sve=t=>/^\p{Lu}[\p{Ll}'’]/u.test(t)||/^\p{Lu}$/u.test(t),cUt=t=>t.replace(/^\p{Ll}/u,e=>e.toUpperCase()),lUt=t=>t.replace(/^\p{Lu}/u,e=>e.toLowerCase()),nje=(t,e,n)=>{if(n.forEach(a=>a.dirty=!0),t){let a=[e,0].concat(n);Array.prototype.splice.apply(t,a)}return t},JC=function(t){const e=/ $/,n=/[-–—]/;let a=t[t.length-1];a&&!e.test(a.post)&&!n.test(a.post)&&(a.post+=" ")},cve=(t,e,n)=>{const a=/[-.?!,;:)–—'"]/g;let r=t[e-1];if(!r)return;let i=r.post;if(a.test(i)){let o=i.match(a).join(""),s=n[n.length-1];s.post=o+s.post,r.post=r.post.replace(a,"")}},uUt=function(t,e,n){let a=t[e];if(e!==0||!sve(a.text))return;n[0].text=cUt(n[0].text);let r=t[e];r.tags.has("ProperNoun")||r.tags.has("Acronym")||sve(r.text)&&r.text.length>1&&(r.text=lUt(r.text))},dUt=function(t,e,n,a){let[r,i,o]=e;i===0||o===a[r].length?JC(n):(JC(n),JC([t[e[1]]])),uUt(t,i,n),nje(t,i,n)},pUt=function(t,e,n,a){let[r,,i]=e,o=(a[r]||[]).length;i(t=t.length<3?"0"+t:t,t.length<3?"0"+t:t),aje=function(t){let[e,n]=t.index||[0,0];nQ+=1,nQ=nQ>46655?0:nQ,e=e>46655?0:e,n=n>1294?0:n;let a=lve(nQ.toString(36));a+=lve(e.toString(36));let r=n.toString(36);r=r.length<2?"0"+r:r,a+=r;let i=parseInt(Math.random()*36,10);return a+=i.toString(36),t.normal+"|"+a.toUpperCase()},uve=function(t){t.has("@hasContraction")&&typeof t.contractions=="function"&&t.grow("@hasContraction").contractions().expand()},dve=t=>Object.prototype.toString.call(t)==="[object Array]",AUt=function(t){return t=t.map(e=>(e.id=aje(e),e)),t},mUt=function(t,e){const{methods:n}=e;return typeof t=="string"?n.one.tokenize.fromString(t,e)[0]:typeof t=="object"&&t.isView?t.clone().docs[0]||[]:dve(t)?dve(t[0])?t[0]:t:[]},pve=function(t,e,n){const{document:a,world:r}=e;e.uncache();let i=e.fullPointer,o=e.fullPointer;e.forEach((l,u)=>{let d=l.fullPointer[0],[p]=d,A=a[p],m=mUt(t,r);m.length!==0&&(m=AUt(m),n?(uve(e.update([d]).firstTerm()),dUt(A,d,m,a)):(uve(e.update([d]).lastTerm()),pUt(A,d,m,a)),a[p]&&a[p][d[1]]&&(d[3]=a[p][d[1]].id),o[u]=d,d[2]+=m.length,i[u]=d)});let s=e.toView(i);return e.ptrs=o,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},V1={insertAfter:function(t){return pve(t,this,!1)},insertBefore:function(t){return pve(t,this,!0)}};V1.append=V1.insertAfter;V1.prepend=V1.insertBefore;V1.insert=V1.insertAfter;const gUt=/\$[0-9a-z]+/g,jce={},hUt=t=>/^\p{Lu}[\p{Ll}'’]/u.test(t)||/^\p{Lu}$/u.test(t),fUt=t=>t.replace(/^\p{Ll}/u,e=>e.toUpperCase()),bUt=t=>t.replace(/^\p{Lu}/u,e=>e.toLowerCase()),yUt=function(t,e,n){return t.forEach(a=>{let r=e(a);a.replaceWith(r,n)}),t},wUt=function(t,e){if(typeof t!="string")return t;let n=e.groups();return t=t.replace(gUt,a=>{let r=a.replace(/\$/,"");return n.hasOwnProperty(r)?n[r].text():a}),t};jce.replaceWith=function(t,e={}){let n=this.fullPointer,a=this;if(this.uncache(),typeof t=="function")return yUt(a,t,e);let r=a.docs[0];if(!r)return a;let i=e.possessives&&r[r.length-1].tags.has("Possessive"),o=e.case&&hUt(r[0].text);t=wUt(t,a);let s=this.update(n);n=n.map(A=>A.slice(0,3));let l=(s.docs[0]||[]).map(A=>Array.from(A.tags)),u=s.docs[0][0].pre,d=s.docs[0][s.docs[0].length-1].post;if(typeof t=="string"&&(t=this.fromText(t).compute("id")),a.insertAfter(t),s.has("@hasContraction")&&a.contractions&&a.grow("@hasContraction+").contractions().expand(),a.delete(s),i){let A=a.docs[0],m=A[A.length-1];m.tags.has("Possessive")||(m.text+="'s",m.normal+="'s",m.tags.add("Possessive"))}if(u&&a.docs[0]&&(a.docs[0][0].pre=u),d&&a.docs[0]){let A=a.docs[0][a.docs[0].length-1];A.post.trim()||(A.post=d)}let p=a.toView(n).compute(["index","freeze","lexicon"]);if(p.world.compute.preTagger&&p.compute("preTagger"),p.compute("unfreeze"),e.tags&&p.terms().forEach((A,m)=>{A.tagSafe(l[m])}),!p.docs[0]||!p.docs[0][0])return p;if(e.case){let A=o?fUt:bUt;p.docs[0][0].text=A(p.docs[0][0].text)}return p};jce.replace=function(t,e,n){if(t&&!e)return this.replaceWith(t,n);let a=this.match(t);return a.found?(this.soften(),a.replaceWith(e,n)):this};const vUt=function(t,e){let n=t.length-1,a=t[n],r=t[n-e];r&&a&&(r.post+=a.post,r.post=r.post.replace(/ +([.?!,;:])/,"$1"),r.post=r.post.replace(/[,;:]+([.?!])/,"$1"))},kUt=function(t,e){e.forEach(n=>{let[a,r,i]=n,o=i-r;t[a]&&(i===t[a].length&&i>1&&vUt(t[a],o),t[a].splice(r,o))});for(let n=t.length-1;n>=0;n-=1)if(t[n].length===0&&(t.splice(n,1),n===t.length&&t[n-1])){let a=t[n-1],r=a[a.length-1];r&&(r.post=r.post.trimEnd())}return t},xUt=function(t,e){return t=t.map(n=>{let[a]=n;return e[a]&&e[a].forEach(r=>{let i=r[2]-r[1];n[1]<=r[1]&&n[2]>=r[2]&&(n[2]-=i)}),n}),t.forEach((n,a)=>{if(n[1]===0&&n[2]==0)for(let r=a+1;rn[2]-n[1]>0),t=t.map(n=>(n[3]=null,n[4]=null,n)),t},bee={remove:function(t){const{indexN:e}=this.methods.one.pointer;this.uncache();let n=this.all(),a=this;t&&(n=this,a=this.match(t));let r=!n.ptrs;a.has("@hasContraction")&&a.contractions&&a.grow("@hasContraction").contractions().expand();let i=n.fullPointer,o=a.fullPointer.reverse(),s=kUt(this.document,o),l=e(o);return i=xUt(i,l),n.ptrs=i,n.document=s,n.compute("index"),r&&(n.ptrs=void 0),t?n.toView(i):(this.ptrs=[],n.none())}};bee.delete=bee.remove;const wD={pre:function(t,e){return t===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(n=>{let a=n[0];e===!0?a.pre+=t:a.pre=t}),this)},post:function(t,e){if(t===void 0){let n=this.docs[this.docs.length-1];return n[n.length-1].post}return this.docs.forEach(n=>{let a=n[n.length-1];e===!0?a.post+=t:a.post=t}),this},trim:function(){if(!this.found)return this;let t=this.docs,e=t[0][0];e.pre=e.pre.trimStart();let n=t[t.length-1],a=n[n.length-1];return a.post=a.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(t=>{t.forEach((e,n)=>{n!==0&&(e.pre=""),t[n+1]&&(e.post="-")})}),this},dehyphenate:function(){const t=/[-–—]/;return this.docs.forEach(e=>{e.forEach(n=>{t.test(n.post)&&(n.post=" ")})}),this},toQuotations:function(t,e){return t=t||'"',e=e||'"',this.docs.forEach(n=>{n[0].pre=t+n[0].pre;let a=n[n.length-1];a.post=e+a.post}),this},toParentheses:function(t,e){return t=t||"(",e=e||")",this.docs.forEach(n=>{n[0].pre=t+n[0].pre;let a=n[n.length-1];a.post=e+a.post}),this}};wD.deHyphenate=wD.dehyphenate;wD.toQuotation=wD.toQuotations;const OUt=(t,e)=>t.normale.normal?1:0,CUt=(t,e)=>{let n=t.normal.trim().length,a=e.normal.trim().length;return na?-1:0},_Ut=(t,e)=>t.wordse.words?-1:0,BUt=(t,e)=>t[0]e[0]?-1:t[1]>e[1]?1:-1,EUt=function(t){let e={};return t.forEach(n=>{e[n.normal]=e[n.normal]||0,e[n.normal]+=1}),t.sort((n,a)=>{let r=e[n.normal],i=e[a.normal];return ri?-1:0}),t},oH={alpha:OUt,length:CUt,wordCount:_Ut,sequential:BUt,byFreq:EUt},QUt=new Set(["index","sequence","seq","sequential","chron","chronological"]),SUt=new Set(["freq","frequency","topk","repeats"]),IUt=new Set(["alpha","alphabetical"]),DUt=function(t,e){let n=t.fullPointer;return n=n.sort((a,r)=>(a=t.update([a]),r=t.update([r]),e(a,r))),t.ptrs=n,t},$Ut=function(t){let{docs:e,pointer:n}=this;if(this.uncache(),typeof t=="function")return DUt(this,t);t=t||"alpha";let a=n||e.map((i,o)=>[o]),r=e.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:a[o]}));return QUt.has(t)&&(t="sequential"),IUt.has(t)&&(t="alpha"),SUt.has(t)?(r=oH.byFreq(r),this.update(r.map(i=>i.pointer))):typeof oH[t]=="function"?(r=r.sort(oH[t]),this.update(r.map(i=>i.pointer))):this},TUt=function(){let t=this.pointer||this.docs.map((e,n)=>[n]);return t=[].concat(t),t=t.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(t)},PUt=function(){let t=new Set;return this.filter(n=>{let a=n.text("machine");return t.has(a)?!1:(t.add(a),!0)})},FUt={unique:PUt,reverse:TUt,sort:$Ut},RUt=t=>Object.prototype.toString.call(t)==="[object Array]",rje=function(t,e){if(t.length>0){let n=t[t.length-1],a=n[n.length-1];/ /.test(a.post)===!1&&(a.post+=" ")}return t=t.concat(e),t},LUt=function(t,e){if(t.document===e.document){let a=t.fullPointer.concat(e.fullPointer);return t.toView(a).compute("index")}return e.fullPointer.forEach(a=>{a[0]+=t.document.length}),t.document=rje(t.document,e.docs),t.all()},NUt={concat:function(t){if(typeof t=="string"){let e=this.fromText(t);if(!this.found||!this.ptrs)this.document=this.document.concat(e.document);else{let n=this.fullPointer,a=n[n.length-1][0];this.document.splice(a,0,...e.document)}return this.all().compute("index")}if(typeof t=="object"&&t.isView)return LUt(this,t);if(RUt(t)){let e=rje(this.document,t);return this.document=e,this.all()}return this}},MUt=function(){return this.ptrs=this.fullPointer,this},zUt=function(){let t=this.ptrs;return!t||t.length<1?this:(t=t.map(e=>e.slice(0,3)),this.ptrs=t,this)},qUt={harden:MUt,soften:zUt},jUt=Object.assign({},sUt,V1,jce,bee,wD,FUt,NUt,qUt),UUt=function(t){Object.assign(t.prototype,jUt)},GUt={id:function(t){let e=t.docs;for(let n=0;n(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[a,r+o],i)),n[0]&&(n[0].pre=t[a][r].pre,n[n.length-1].post=t[a][r].post,n[0].text=t[a][r].text,n[0].normal=t[a][r].normal),t[a].splice(r,1,...n))},VUt=/'/,ZUt=new Set(["what","how","when","where","why"]),KUt=new Set(["be","go","start","think","need"]),JUt=new Set(["been","gone"]),eGt=function(t,e){let n=t[e].normal.split(VUt)[0];if(ZUt.has(n))return[n,"did"];if(t[e+1]){if(JUt.has(t[e+1].normal))return[n,"had"];if(KUt.has(t[e+1].normal))return[n,"would"]}return null},tGt=function(t,e){return t[e].normal==="ain't"||t[e].normal==="aint"?null:[t[e].normal.replace(/n't/,""),"not"]},Uce=/'/,nGt=/(e|é|aison|sion|tion)$/,aGt=/(age|isme|acle|ege|oire)$/,rGt=(t,e)=>{let n=t[e].normal.split(Uce)[1];return n&&n.endsWith("e")?["la",n]:["le",n]},iGt=(t,e)=>{let n=t[e].normal.split(Uce)[1];return n&&nGt.test(n)&&!aGt.test(n)?["du",n]:n&&n.endsWith("s")?["des",n]:["de",n]},oGt=(t,e)=>["je",t[e].normal.split(Uce)[1]],cH={preJ:oGt,preL:rGt,preD:iGt},sGt=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,cGt=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,lGt=/^[0-9]{3}-[0-9]{4}$/,uGt=function(t,e){let n=t[e],a=n.text.match(sGt);return a!==null?n.tags.has("PhoneNumber")===!0||lGt.test(n.text)?null:[a[1],"to",a[2]]:(a=n.text.match(cGt),a!==null?[a[1],"to",a[4]]:null)},dGt=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,pGt=function(t,e,n){const a=n.model.one.numberSuffixes||{};let i=t[e].text.match(dGt);if(i!==null){let o=i[2].toLowerCase().trim();return a.hasOwnProperty(o)?null:[i[1],o]}return null},Ave=/'/,AGt=/^[0-9][^-–—]*[-–—].*?[0-9]/,mve=function(t,e,n,a){let r=e.update();r.document=[t];let i=n+a;n>0&&(n-=1),t[i]&&(i+=1),r.ptrs=[[0,n,i]]},gve={t:(t,e)=>tGt(t,e),d:(t,e)=>eGt(t,e)},hve={j:(t,e)=>cH.preJ(t,e),l:(t,e)=>cH.preL(t,e),d:(t,e)=>cH.preD(t,e)},mGt=function(t,e,n,a){for(let r=0;r2)return i.out.concat(a)}return null},lH=function(t,e){let n=e.fromText(t.join(" "));return n.compute(["id","alias"]),n.docs[0]},gGt=function(t,e){for(let n=e+1;n<5&&t[n];n+=1)if(t[n].normal==="been")return["there","has"];return["there","is"]},hGt=t=>{let{world:e,document:n}=t;const{model:a,methods:r}=e;let i=a.one.contractions||[];n.forEach((o,s)=>{for(let l=o.length-1;l>=0;l-=1){let u=null,d=null;if(Ave.test(o[l].normal)===!0){let A=o[l].normal.split(Ave);u=A[0],d=A[1]}let p=mGt(i,o[l],u,d);if(!p&&gve.hasOwnProperty(d)&&(p=gve[d](o,l,e)),!p&&hve.hasOwnProperty(u)&&(p=hve[u](o,l)),u==="there"&&d==="s"&&(p=gGt(o,l)),p){p=lH(p,t),sH(n,[s,l],p),mve(n[s],t,l,p.length);continue}if(AGt.test(o[l].normal)){p=uGt(o,l),p&&(p=lH(p,t),sH(n,[s,l],p),r.one.setTag(p,"NumberRange",e),p[2]&&p[2].tags.has("Time")&&r.one.setTag([p[0]],"Time",e,null,"time-range"),mve(n[s],t,l,p.length));continue}p=pGt(o,l,e),p&&(p=lH(p,t),sH(n,[s,l],p),r.one.setTag([p[1]],"Unit",e,null,"contraction-unit"))}})},fGt={contractions:hGt},bGt={model:XUt,compute:fGt,hooks:["contractions"]},fve=function(t){const e=t.world,{model:n,methods:a}=t.world,r=a.one.setTag,{frozenLex:i}=n.one,o=n.one._multiCache||{};t.docs.forEach(s=>{for(let l=0;ll;A-=1){let m=s.slice(l,A+1),g=m.map(h=>h.machine||h.normal).join(" ");if(i.hasOwnProperty(g)===!0){r(m,i[g],e,!1,"1-frozen-multi-lexicon"),m.forEach(h=>h.frozen=!0);continue}}}if(i[d]!==void 0&&i.hasOwnProperty(d)){r([u],i[d],e,!1,"1-freeze-lexicon"),u.frozen=!0;continue}}})},yGt=function(t){return t.docs.forEach(e=>{e.forEach(n=>{delete n.frozen})}),t},wGt={frozen:fve,freeze:fve,unfreeze:yGt},bve=t=>"\x1B[34m"+t+"\x1B[0m",yve=t=>"\x1B[3m\x1B[2m"+t+"\x1B[0m",wve=function(t){t.docs.forEach(e=>{console.log(bve(` ┌─────────`)),e.forEach(n=>{let a=` ${yve("│")} `,r=n.implicit||n.text||"-";n.frozen===!0?a+=`${bve(r)} ❄️`:a+=yve(r),console.log(a)})})},vGt={compute:wGt,mutate:t=>{const e=t.methods.one;e.termMethods.isFrozen=n=>n.frozen===!0,e.debug.freeze=wve,e.debug.frozen=wve},api:function(t){t.prototype.freeze=function(){return this.docs.forEach(e=>{e.forEach(n=>{n.frozen=!0})}),this},t.prototype.unfreeze=function(){this.compute("unfreeze")},t.prototype.isFrozen=function(){return this.match("@isFrozen+")}},hooks:["freeze"]},kGt=function(t,e,n){const{model:a,methods:r}=n,i=r.one.setTag,o=a.one._multiCache||{},{lexicon:s}=a.one||{};let l=t[e],u=l.machine||l.normal;if(o[u]!==void 0&&t[e+1]){let d=e+o[u]-1;for(let p=d;p>e;p-=1){let A=t.slice(e,p+1);if(A.length<=1)return!1;let m=A.map(g=>g.machine||g.normal).join(" ");if(s.hasOwnProperty(m)===!0){let g=s[m];return i(A,g,n,!1,"1-multi-lexicon"),g&&g.length===2&&(g[0]==="PhrasalVerb"||g[1]==="PhrasalVerb")&&i([A[1]],"Particle",n,!1,"1-phrasal-particle"),!0}}return!1}return null},vve=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,xGt=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),OGt=function(t,e,n){const{model:a,methods:r}=n,i=r.one.setTag,{lexicon:o}=a.one;let s=t[e],l=s.machine||s.normal;if(o[l]!==void 0&&o.hasOwnProperty(l))return i([s],o[l],n,!1,"1-lexicon"),!0;if(s.alias){let u=s.alias.find(d=>o.hasOwnProperty(d));if(u)return i([s],o[u],n,!1,"1-lexicon-alias"),!0}if(vve.test(l)===!0){let u=l.replace(vve,"");if(o.hasOwnProperty(u)&&u.length>3&&xGt.has(o[u]))return i([s],o[u],n,!1,"1-lexicon-prefix"),!0}return null},CGt=function(t){const e=t.world;t.docs.forEach(n=>{for(let a=0;a{let r=t[a];a=a.toLowerCase().trim(),a=a.replace(/'s\b/,"");let i=a.split(/ /);i.length>1&&(n[i[0]]===void 0||i.length>n[i[0]])&&(n[i[0]]=i.length),e[a]=e[a]||r}),delete e[""],delete e[null],delete e[" "],{lex:e,_multi:n}},EGt={one:{expandLexicon:BGt}},QGt=function(t,e=!1){const n=this.world(),{methods:a,model:r}=n;if(!t)return;if(Object.keys(t).forEach(s=>{typeof t[s]=="string"&&t[s].startsWith("#")&&(t[s]=t[s].replace(/^#/,""))}),e===!0){let{lex:s,_multi:l}=a.one.expandLexicon(t,n);Object.assign(r.one._multiCache,l),Object.assign(r.one.frozenLex,s);return}if(a.two.expandLexicon){let{lex:s,_multi:l}=a.two.expandLexicon(t,n);Object.assign(r.one.lexicon,s),Object.assign(r.one._multiCache,l)}let{lex:i,_multi:o}=a.one.expandLexicon(t,n);Object.assign(r.one.lexicon,i),Object.assign(r.one._multiCache,o)},SGt={addWords:QGt},IGt={one:{lexicon:{},_multiCache:{},frozenLex:{}}},DGt={model:IGt,methods:EGt,compute:_Gt,lib:SGt,hooks:["lexicon"]},$Gt=function(t,e){const{methods:n,model:a}=e;return n.one.tokenize.splitTerms(t,a).map(i=>n.one.tokenize.splitWhitespace(i,a)).map(i=>i.text.toLowerCase())},ije=function(t,e){let n=[{}],a=[null],r=[0],i=[],o=0;t.forEach(function(s){let l=0,u=$Gt(s,e);for(let d=0;d0&&!n[o].hasOwnProperty(d);)o=r[o];if(n.hasOwnProperty(o)){let A=n[o][d];r[p]=A,a[A]&&(a[p]=a[p]||[],a[p]=a[p].concat(a[A]))}else r[p]=0}}return{goNext:n,endAs:a,failTo:r}},TGt=function(t,e,n){let a=0,r=[];for(let i=0;i0&&(e.goNext[a]===void 0||!e.goNext[a].hasOwnProperty(o));)a=e.failTo[a]||0;if(e.goNext[a].hasOwnProperty(o)&&(a=e.goNext[a][o],e.endAs[a])){let s=e.endAs[a];for(let l=0;l0&&(a=a.concat(l))}return t.update(a)},RGt=t=>Object.prototype.toString.call(t)==="[object Object]";function LGt(t){t.prototype.lookup=function(e,n={}){if(!e)return this.none();typeof e=="string"&&(e=[e]);let a=RGt(e)?e:ije(e,this.world),r=FGt(this,a,n);return r=r.settle(),r}}const uH=(t,e)=>{for(let n=t.length-1;n>=0;n-=1)if(t[n]!==e)return t=t.slice(0,n+1),t;return t},NGt=function(t){return t.goNext=t.goNext.map(e=>{if(Object.keys(e).length!==0)return e}),t.goNext=uH(t.goNext,void 0),t.failTo=uH(t.failTo,0),t.endAs=uH(t.endAs,null),t},yee={buildTrie:function(t){const e=ije(t,this.world());return NGt(e)}};yee.compile=yee.buildTrie;const MGt={api:LGt,lib:yee},kve=function(t,e){return e&&t.forEach(n=>{let a=n[0];e[a]&&(n[0]=e[a][0],n[1]+=e[a][1],n[2]+=e[a][1])}),t},oje=function(t,e){let{ptrs:n,byGroup:a}=t;return n=kve(n,e),Object.keys(a).forEach(r=>{a[r]=kve(a[r],e)}),{ptrs:n,byGroup:a}},p3=function(t,e,n){const a=n.methods.one;return typeof t=="number"&&(t=String(t)),typeof t=="string"&&(t=a.killUnicode(t,n),t=a.parseMatch(t,e,n)),t},sje=t=>Object.prototype.toString.call(t)==="[object Object]",A3=t=>t&&sje(t)&&t.isView===!0,m3=t=>t&&sje(t)&&t.isNet===!0,zGt=function(t,e,n){const a=this.methods.one;if(A3(t))return this.intersection(t);if(m3(t))return this.sweep(t,{tagger:!1}).view.settle();t=p3(t,n,this.world);let r={regs:t,group:e},i=a.match(this.docs,r,this._cache),{ptrs:o,byGroup:s}=oje(i,this.fullPointer),l=this.toView(o);return l._groups=s,l},qGt=function(t,e,n){const a=this.methods.one;if(A3(t))return this.intersection(t).eq(0);if(m3(t))return this.sweep(t,{tagger:!1,matchOne:!0}).view;t=p3(t,n,this.world);let r={regs:t,group:e,justOne:!0},i=a.match(this.docs,r,this._cache),{ptrs:o,byGroup:s}=oje(i,this.fullPointer),l=this.toView(o);return l._groups=s,l},jGt=function(t,e,n){const a=this.methods.one;if(A3(t))return this.intersection(t).fullPointer.length>0;if(m3(t))return this.sweep(t,{tagger:!1}).view.found;t=p3(t,n,this.world);let r={regs:t,group:e,justOne:!0};return a.match(this.docs,r,this._cache).ptrs.length>0},UGt=function(t,e,n){const a=this.methods.one;if(A3(t))return this.filter(l=>l.intersection(t).found);if(m3(t)){let l=this.sweep(t,{tagger:!1}).view.settle();return this.if(l)}t=p3(t,n,this.world);let r={regs:t,group:e,justOne:!0},i=this.fullPointer,o=this._cache||[];i=i.filter((l,u)=>{let d=this.update([l]);return a.match(d.docs,r,o[u]).ptrs.length>0});let s=this.update(i);return this._cache&&(s._cache=i.map(l=>o[l[0]])),s},GGt=function(t,e,n){const{methods:a}=this,r=a.one;if(A3(t))return this.filter(s=>!s.intersection(t).found);if(m3(t)){let s=this.sweep(t,{tagger:!1}).view.settle();return this.ifNo(s)}t=p3(t,n,this.world);let i=this._cache||[],o=this.filter((s,l)=>{let u={regs:t,group:e,justOne:!0};return r.match(s.docs,u,i[l]).ptrs.length===0});return this._cache&&(o._cache=o.ptrs.map(s=>i[s[0]])),o},HGt={matchOne:qGt,match:zGt,has:jGt,if:UGt,ifNo:GGt},WGt=function(t,e,n){const{indexN:a}=this.methods.one.pointer;let r=[],i=a(this.fullPointer);Object.keys(i).forEach(s=>{let l=i[s].sort((u,d)=>u[1]>d[1]?1:-1)[0];l[1]>0&&r.push([l[0],0,l[1]])});let o=this.toView(r);return t?o.match(t,e,n):o},YGt=function(t,e,n){const{indexN:a}=this.methods.one.pointer;let r=[],i=a(this.fullPointer),o=this.document;Object.keys(i).forEach(l=>{let u=i[l].sort((A,m)=>A[1]>m[1]?-1:1)[0],[d,,p]=u;p{let o=r.before(t,e);if(o.found){let s=o.terms();a[i][1]-=s.length,a[i][3]=s.docs[0][0].id}}),this.update(a)},VGt=function(t,e,n){typeof t=="string"&&(t=this.world.methods.one.parseMatch(t,n,this.world)),t[0].start=!0;let a=this.fullPointer;return this.forEach((r,i)=>{let o=r.after(t,e);if(o.found){let s=o.terms();a[i][2]+=s.length,a[i][4]=null}}),this.update(a)},ZGt=function(t,e,n){return this.growRight(t,e,n).growLeft(t,e,n)},KGt={before:WGt,after:YGt,growLeft:XGt,growRight:VGt,grow:ZGt},cje=function(t,e){return[t[0],t[1],e[2]]},JGt=function(t){return Object.prototype.toString.call(t)==="[object Array]"},Gce=(t,e,n)=>typeof t=="string"||JGt(t)?e.match(t,n):t||e.none(),Hce=function(t,e){let[n,a,r]=t;return e.document[n]&&e.document[n][a]&&(t[3]=t[3]||e.document[n][a].id,e.document[n][r-1]&&(t[4]=t[4]||e.document[n][r-1].id)),t},xB={};xB.splitOn=function(t,e){const{splitAll:n}=this.methods.one.pointer;let a=Gce(t,this,e).fullPointer,r=n(this.fullPointer,a),i=[];return r.forEach(o=>{i.push(o.passthrough),i.push(o.before),i.push(o.match),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>Hce(o,this)),this.update(i)};xB.splitBefore=function(t,e){const{splitAll:n}=this.methods.one.pointer;let a=Gce(t,this,e).fullPointer,r=n(this.fullPointer,a);for(let o=0;o{i.push(o.passthrough),i.push(o.before),o.match&&o.after?i.push(cje(o.match,o.after)):i.push(o.match)}),i=i.filter(o=>o),i=i.map(o=>Hce(o,this)),this.update(i)};xB.splitAfter=function(t,e){const{splitAll:n}=this.methods.one.pointer;let a=Gce(t,this,e).fullPointer,r=n(this.fullPointer,a),i=[];return r.forEach(o=>{i.push(o.passthrough),o.before&&o.match?i.push(cje(o.before,o.match)):(i.push(o.before),i.push(o.match)),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>Hce(o,this)),this.update(i)};xB.split=xB.splitAfter;const eHt=function(t,e){return!t||!e||t[0]!==e[0]?!1:t[2]===e[1]},xve=function(t,e,n){const a=t.world,r=a.methods.one.parseMatch;e=e||".$",n=n||"^.";let i=r(e,{},a),o=r(n,{},a);i[i.length-1].end=!0,o[0].start=!0;let s=t.fullPointer,l=[s[0]];for(let u=1;u)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,rHt=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,iHt=/ /g,oHt=t=>/^[![^]*(<[^<]*>)?\(/.test(t)&&/\)[?\]+*$~]*$/.test(t),Ove=t=>/^[![^]*(<[^<]*>)?\//.test(t)&&/\/[?\]+*$~]*$/.test(t),Cve=function(t){return t=t.map(e=>e.trim()),t=t.filter(e=>e),t},sHt=function(t){let e=t.split(aHt),n=[];e.forEach(r=>{if(Ove(r)){n.push(r);return}n=n.concat(r.split(rHt))}),n=Cve(n);let a=[];return n.forEach(r=>{oHt(r)||Ove(r)?a.push(r):a=a.concat(r.split(iHt))}),a=Cve(a),a},_ve=/\{([0-9]+)?(, *[0-9]*)?\}/,Bve=/&&/,cHt=new RegExp(/^<\s*(\S+)\s*>/),Eve=t=>t.charAt(0).toUpperCase()+t.substring(1),AA=t=>t.charAt(t.length-1),dp=t=>t.charAt(0),DC=t=>t.substring(1),$C=t=>t.substring(0,t.length-1),aQ=function(t){return t=DC(t),t=$C(t),t},lje=function(t,e){let n={};for(let a=0;a<2;a+=1){if(AA(t)==="$"&&(n.end=!0,t=$C(t)),dp(t)==="^"&&(n.start=!0,t=DC(t)),AA(t)==="?"&&(n.optional=!0,t=$C(t)),(dp(t)==="["||AA(t)==="]")&&(n.group=null,dp(t)==="["&&(n.groupStart=!0),AA(t)==="]"&&(n.groupEnd=!0),t=t.replace(/^\[/,""),t=t.replace(/\]$/,""),dp(t)==="<")){const r=cHt.exec(t);r.length>=2&&(n.group=r[1],t=t.replace(r[0],""))}if(AA(t)==="+"&&(n.greedy=!0,t=$C(t)),t!=="*"&&AA(t)==="*"&&t!=="\\*"&&(n.greedy=!0,t=$C(t)),dp(t)==="!"&&(n.negative=!0,t=DC(t)),dp(t)==="~"&&AA(t)==="~"&&t.length>2&&(t=aQ(t),n.fuzzy=!0,n.min=e.fuzzy||.85,/\(/.test(t)===!1))return n.word=t,n;if(dp(t)==="/"&&AA(t)==="/")return t=aQ(t),e.caseSensitive&&(n.use="text"),n.regex=new RegExp(t),n;if(_ve.test(t)===!0&&(t=t.replace(_ve,(r,i,o)=>(o===void 0?(n.min=Number(i),n.max=Number(i)):(o=o.replace(/, */,""),i===void 0?(n.min=0,n.max=Number(o)):(n.min=Number(i),n.max=Number(o||999))),n.greedy=!0,n.min||(n.optional=!0),""))),dp(t)==="("&&AA(t)===")"){Bve.test(t)?(n.choices=t.split(Bve),n.operator="and"):(n.choices=t.split("|"),n.operator="or"),n.choices[0]=DC(n.choices[0]);let r=n.choices.length-1;n.choices[r]=$C(n.choices[r]),n.choices=n.choices.map(i=>i.trim()),n.choices=n.choices.filter(i=>i),n.choices=n.choices.map(i=>i.split(/ /g).map(o=>lje(o,e))),t=""}if(dp(t)==="{"&&AA(t)==="}"){if(t=aQ(t),n.root=t,/\//.test(t)){let r=n.root.split(/\//);n.root=r[0],n.pos=r[1],n.pos==="adj"&&(n.pos="Adjective"),n.pos=n.pos.charAt(0).toUpperCase()+n.pos.substr(1).toLowerCase(),r[2]!==void 0&&(n.sense=r[2])}return n}if(dp(t)==="<"&&AA(t)===">")return t=aQ(t),n.chunk=Eve(t),n.greedy=!0,n;if(dp(t)==="%"&&AA(t)==="%")return t=aQ(t),n.switch=t,n}return dp(t)==="#"?(n.tag=DC(t),n.tag=Eve(n.tag),n):dp(t)==="@"?(n.method=DC(t),n):t==="."?(n.anything=!0,n):t==="*"?(n.anything=!0,n.greedy=!0,n.optional=!0,n):(t&&(t=t.replace("\\*","*"),t=t.replace("\\.","."),e.caseSensitive?n.use="text":t=t.toLowerCase(),n.word=t),n)},lHt=/[a-z0-9][-–—][a-z]/i,uHt=function(t,e){let n=e.model.one.prefixes;for(let a=t.length-1;a>=0;a-=1){let r=t[a];if(r.word&&lHt.test(r.word)){let i=r.word.split(/[-–—]/g);if(n.hasOwnProperty(i[0]))continue;i=i.filter(o=>o).reverse(),t.splice(a,1),i.forEach(o=>{let s=Object.assign({},r);s.word=o,t.splice(a,0,s)})}}return t},Qve=function(t,e){let{all:n}=e.methods.two.transform.verb||{},a=t.root;return n?n(a,e.model):[]},Sve=function(t,e){let{all:n}=e.methods.two.transform.noun||{};return n?n(t.root,e.model):[t.root]},Ive=function(t,e){let{all:n}=e.methods.two.transform.adjective||{};return n?n(t.root,e.model):[t.root]},dHt=function(t,e){return t=t.map(n=>{if(n.root)if(e.methods.two&&e.methods.two.transform){let a=[];n.pos?n.pos==="Verb"?a=a.concat(Qve(n,e)):n.pos==="Noun"?a=a.concat(Sve(n,e)):n.pos==="Adjective"&&(a=a.concat(Ive(n,e))):(a=a.concat(Qve(n,e)),a=a.concat(Sve(n,e)),a=a.concat(Ive(n,e))),a=a.filter(r=>r),a.length>0&&(n.operator="or",n.fastOr=new Set(a))}else n.machine=n.root,delete n.id,delete n.root;return n}),t},pHt=function(t){let e=0,n=null;for(let a=0;a{if(e.choices!==void 0){if(e.operator!=="or"||e.fuzzy===!0)return e;e.choices.every(a=>{if(a.length!==1)return!1;let r=a[0];return r.fuzzy===!0||r.start||r.end?!1:r.word!==void 0&&r.negative!==!0&&r.optional!==!0&&r.method!==!0})===!0&&(e.fastOr=new Set,e.choices.forEach(a=>{e.fastOr.add(a[0].word)}),delete e.choices)}return e})},mHt=function(t){return t.map(e=>(e.fuzzy&&e.choices&&e.choices.forEach(n=>{n.length===1&&n[0].word&&(n[0].fuzzy=!0,n[0].min=e.min)}),e))},gHt=function(t){return t=pHt(t),t=AHt(t),t=mHt(t),t},hHt=function(t,e,n){if(t==null||t==="")return[];e=e||{},typeof t=="number"&&(t=String(t));let a=sHt(t);return a=a.map(r=>lje(r,e)),a=uHt(a,n),a=dHt(a,n),a=gHt(a),a},fHt=function(t,e){for(let n of e)if(t.has(n))return!0;return!1},bHt=function(t,e){for(let n=0;nn?a:n)+1;if(Math.abs(n-a)>(r||100))return r||100;let i=[];for(let A=0;A4)return n;l=e[o-1],u=s===l?0:1,d=i[A-1][o]+1,(p=i[A][o-1]+1)1&&o>1&&s===e[o-2]&&t[A-2]===l&&(p=i[A-2][o-2]+u)t.post.indexOf(e)!==-1,vD={hasQuote:t=>vHt.test(t.pre)||kHt.test(t.post),hasComma:t=>Gg(t,","),hasPeriod:t=>Gg(t,".")===!0&&Gg(t,"...")===!1,hasExclamation:t=>Gg(t,"!"),hasQuestionMark:t=>Gg(t,"?")||Gg(t,"¿"),hasEllipses:t=>Gg(t,"..")||Gg(t,"…"),hasSemicolon:t=>Gg(t,";"),hasColon:t=>Gg(t,":"),hasSlash:t=>/\//.test(t.text),hasHyphen:t=>Dve.test(t.post)||Dve.test(t.pre),hasDash:t=>$ve.test(t.post)||$ve.test(t.pre),hasContraction:t=>!!t.implicit,isAcronym:t=>t.tags.has("Acronym"),isKnown:t=>t.tags.size>0,isTitleCase:t=>/^\p{Lu}[a-z'\u00C0-\u00FF]/u.test(t.text),isUpperCase:t=>/^\p{Lu}+$/u.test(t.text)};vD.hasQuotation=vD.hasQuote;let nl=function(){};const xHt=function(t,e,n,a){if(e.anything===!0)return!0;if(e.start===!0&&n!==0||e.end===!0&&n!==a-1)return!1;if(e.id!==void 0&&e.id===t.id)return!0;if(e.word!==void 0)return e.use?e.word===t[e.use]:t.machine!==null&&t.machine===e.word||t.alias!==void 0&&t.alias.hasOwnProperty(e.word)||e.fuzzy===!0&&(e.word===t.root||wHt(e.word,t.normal)>=e.min)||t.alias&&t.alias.some(r=>r===e.word)?!0:e.word===t.text||e.word===t.normal;if(e.tag!==void 0)return t.tags.has(e.tag)===!0;if(e.method!==void 0)return typeof vD[e.method]=="function"&&vD[e.method](t)===!0;if(e.pre!==void 0)return t.pre&&t.pre.includes(e.pre);if(e.post!==void 0)return t.post&&t.post.includes(e.post);if(e.regex!==void 0){let r=t.normal;return e.use&&(r=t[e.use]),e.regex.test(r)}if(e.chunk!==void 0)return t.chunk===e.chunk;if(e.switch!==void 0)return t.switch===e.switch;if(e.machine!==void 0)return t.normal===e.machine||t.machine===e.machine||t.root===e.machine;if(e.sense!==void 0)return t.sense===e.sense;if(e.fastOr!==void 0){if(e.pos&&!t.tags.has(e.pos))return null;let r=t.root||t.implicit||t.machine||t.normal;return e.fastOr.has(r)||e.fastOr.has(t.text)}return e.choices!==void 0?e.operator==="and"?e.choices.every(r=>nl(t,r,n,a)):e.choices.some(r=>nl(t,r,n,a)):!1};nl=function(t,e,n,a){let r=xHt(t,e,n,a);return e.negative===!0?!r:r};const OHt=function(t,e){let n=Object.assign({},t.regs[t.r],{start:!1,end:!1}),a=t.t;for(;t.tn.max)return t.t=t.t+n.max,!0;if(t.hasGroup===!0){const r=oz(t,t.t);r.length=a-t.t}return t.t=a,!0},EHt=function(t){return Object.prototype.toString.call(t)==="[object Array]"},uje=function(t,e=0){let n=t.regs[t.r],a=!1;for(let r=0;r{let l=0,u=t.t+s+e+l;if(t.terms[u]===void 0)return!1;let d=nl(t.terms[u],o,u+t.start_i,t.phrase_length);if(d===!0&&o.greedy===!0)for(let p=1;p{let i=r.every((o,s)=>{let l=t.t+s;return t.terms[l]===void 0?!1:nl(t.terms[l],o,l,t.phrase_length)});return i===!0&&r.length>e&&(e=r.length),i})===!0?e:!1},SHt=function(t){const{regs:e}=t;let n=e[t.r],a=uje(t);if(a){if(n.negative===!0)return null;if(t.hasGroup===!0){const r=oz(t,t.t);r.length+=a}if(n.end===!0){let r=t.phrase_length;if(t.t+t.start_i+a!==r)return null}return t.t+=a,!0}else if(!n.optional)return null;return!0},IHt=function(t){const{regs:e}=t;let n=e[t.r],a=QHt(t);if(a){if(n.negative===!0)return null;if(t.hasGroup===!0){const r=oz(t,t.t);r.length+=a}if(n.end===!0){let r=t.phrase_length-1;if(t.t+t.start_i!==r)return null}return t.t+=a,!0}else if(!n.optional)return null;return!0},DHt=function(t,e,n){let a=0;for(let r=t.t;ra?!1:(t.t+=a,!0)},$Ht=function(t){const{regs:e}=t;let n=e[t.r],a=Object.assign({},n);if(a.negative=!1,nl(t.terms[t.t],a,t.start_i+t.t,t.phrase_length))return!1;if(n.optional){let i=e[t.r+1];i&&(nl(t.terms[t.t],i,t.start_i+t.t,t.phrase_length)?t.r+=1:i.optional&&e[t.r+2]&&nl(t.terms[t.t],e[t.r+2],t.start_i+t.t,t.phrase_length)&&(t.r+=2))}return n.greedy?DHt(t,a,e[t.r+1]):(t.t+=1,!0)},THt=function(t){const{regs:e}=t;let n=e[t.r],a=t.terms[t.t],r=nl(a,e[t.r+1],t.start_i+t.t,t.phrase_length);if(n.negative||r){let i=t.terms[t.t+1];(!i||!nl(i,e[t.r+1],t.start_i+t.t,t.phrase_length))&&(t.r+=1)}},PHt=function(t){const{regs:e,phrase_length:n}=t;let a=e[t.r];return t.t=OHt(t,e[t.r+1]),t.t===null||a.min&&a.min>t.t||a.end===!0&&t.start_i+t.t!==n?null:!0},FHt=function(t){let e=t.terms[t.t],n=t.regs[t.r];if(e.implicit&&t.terms[t.t+1]){if(!t.terms[t.t+1].implicit)return;n.word===e.normal&&(t.t+=1),n.method==="hasContraction"&&(t.t+=1)}},RHt=function(t,e){let n=t.regs[t.r];const a=oz(t,e);t.t>1&&n.greedy?a.length+=t.t-e:a.length++},dH=function(t){const{regs:e}=t;let n=e[t.r],a=t.terms[t.t],r=t.t;return n.optional&&e[t.r+1]&&n.negative?!0:(n.optional&&e[t.r+1]&&THt(t),a.implicit&&t.terms[t.t+1]&&FHt(t),t.t+=1,n.end===!0&&t.t!==t.terms.length&&n.greedy!==!0||n.greedy===!0&&!PHt(t)?null:(t.hasGroup===!0&&RHt(t,r),!0))},Wce=function(t,e,n,a){if(t.length===0||e.length===0)return null;let r={t:0,terms:t,r:0,regs:e,groups:{},start_i:n,phrase_length:a,inGroup:null};for(;r.r!d.optional)===!1)break;return null}if(s.anything===!0&&s.greedy===!0){if(!BHt(r))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!SHt(r))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!IHt(r))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!dH(r))return null;continue}if(_Ht(s,r)===!0){if(!dH(r))return null;continue}if(s.negative){if(!$Ht(r))return null;continue}if(nl(r.terms[r.t],s,r.start_i+r.t,r.phrase_length)===!0){if(!dH(r))return null;continue}if(s.optional!==!0)return null}let i=[null,n,r.t+n];if(i[1]===i[2])return null;let o={};return Object.keys(r.groups).forEach(s=>{let l=r.groups[s],u=n+l.start;o[s]=[null,u,u+l.length]}),{pointer:i,groups:o}},LHt=function(t,e){let n=[],a={};return t.length===0?{ptrs:n,byGroup:a}:(typeof e=="number"&&(e=String(e)),e?t.forEach(r=>{r.groups[e]&&n.push(r.groups[e])}):t.forEach(r=>{n.push(r.pointer),Object.keys(r.groups).forEach(i=>{a[i]=a[i]||[],a[i].push(r.groups[i])})}),{ptrs:n,byGroup:a})},NHt=function(t,e,n){return t=t.filter(a=>{let[r,i,o]=a.pointer,s=n[r].slice(i,o);for(let l=0;l{t.groups[n][0]=e}),t},MHt=function(t,e,n){let a=Wce(t,e,0,t.length);return a?(a=dje(a,n),a):null},zHt=function(t,e,n){n=n||[];let{regs:a,group:r,justOne:i}=e,o=[];if(!a||a.length===0)return{ptrs:[],byGroup:{}};const s=a.filter(l=>l.optional!==!0&&l.negative!==!0).length;e:for(let l=0;ld&&(d=Math.abs(m-1))}}}}return a[a.length-1].end===!0&&(o=o.filter(l=>{let u=l.pointer[0];return t[u].length===l.pointer[2]})),e.notIf&&(o=NHt(o,e.notIf,t)),o=LHt(o,r),o.ptrs.forEach(l=>{let[u,d,p]=l;l[3]=t[u][d].id,l[4]=t[u][p-1].id}),o},qHt={one:{termMethods:vD,parseMatch:hHt,match:zHt}},jHt={parseMatch:function(t,e){const n=this.world();let a=n.methods.one.killUnicode;return a&&(t=a(t,n)),n.methods.one.parseMatch(t,e,n)}},UHt={api:nHt,methods:qHt,lib:jHt},GHt=/^\../,HHt=/^#./,WHt=t=>(t=t.replace(/&/g,"&"),t=t.replace(//g,">"),t=t.replace(/"/g,"""),t=t.replace(/'/g,"'"),t),YHt=function(t){let e="",n="";return t=WHt(t),GHt.test(t)?e=``),e+=">",{start:e,end:n}},XHt=function(t,e){let n={},a={};return Object.keys(e).forEach(r=>{let i=e[r],o=YHt(r);typeof i=="string"&&(i=t.match(i)),i.docs.forEach(s=>{if(s.every(d=>d.implicit))return;let l=s[0].id;n[l]=n[l]||[],n[l].push(o.start);let u=s[s.length-1].id;a[u]=a[u]||[],a[u].push(o.end)})}),{starts:n,ends:a}},VHt=function(t){let{starts:e,ends:n}=XHt(this,t),a="";return this.docs.forEach(r=>{for(let i=0;i{let i=r.pre||"",o=r.post||"";e.punctuation==="some"&&(i=i.replace(wee,""),JHt.test(o)&&(o=" "),o=o.replace(KHt,""),o=o.replace(/\?!+/,"?"),o=o.replace(/!+/,"!"),o=o.replace(/\?+/,"?"),o=o.replace(/\.{2,}/,""),r.tags.has("Abbreviation")&&(o=o.replace(/\./,""))),e.whitespace==="some"&&(i=i.replace(/\s/,""),o=o.replace(/\s+/," ")),e.keepPunct||(i=i.replace(wee,""),o==="-"?o=" ":o=o.replace(pje,""));let s=r[e.form||"text"]||r.normal||"";e.form==="implicit"&&(s=r.implicit||r.text),e.form==="root"&&r.implicit&&(s=r.root||r.implicit||r.normal),(e.form==="machine"||e.form==="implicit"||e.form==="root")&&r.implicit&&(!o||!eWt.test(o))&&(o+=" "),a+=i+s+o}),n===!1&&(a=a.trim()),e.lowerCase===!0&&(a=a.toLowerCase()),a},tWt=function(t,e){let n="";if(!t||!t[0]||!t[0][0])return n;for(let a=0;a>2]|=o.charCodeAt(s)<<8*s--;for(Jk=o=0;Jk>4]+Aje[o]+~~i[Jk|[o,5*o+1,3*o+5,7*o][s]&15])<<(s=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*s+o++%4])|a>>>-s),e,n])e=s[1]|0,n=s[2];for(o=4;o;)r[--o]+=s[o]}for(t="";o<32;)t+=(r[o>>3]>>(1^o++)*4&15).toString(16);return t},nWt={text:!0,terms:!0};let Tve={case:"none",unicode:"some",form:"machine",punctuation:"some"};const pH=function(t,e){return Object.assign({},t,e)},oy={text:t=>kk(t,{keepPunct:!0},!1),normal:t=>kk(t,pH($w.normal,{keepPunct:!0}),!1),implicit:t=>kk(t,pH($w.implicit,{keepPunct:!0}),!1),machine:t=>kk(t,Tve,!1),root:t=>kk(t,pH(Tve,{form:"root"}),!1),hash:t=>Yce(kk(t,{keepPunct:!0},!1)),offset:t=>{let e=oy.text(t).length;return{index:t[0].offset.index,start:t[0].offset.start,length:e}},terms:t=>t.map(e=>{let n=Object.assign({},e);return n.tags=Array.from(e.tags),n}),confidence:(t,e,n)=>e.eq(n).confidence(),syllables:(t,e,n)=>e.eq(n).syllables(),sentence:(t,e,n)=>e.eq(n).fullSentence().text(),dirty:t=>t.some(e=>e.dirty===!0)};oy.sentences=oy.sentence;oy.clean=oy.normal;oy.reduced=oy.root;const aWt=function(t,e){return e=e||{},typeof e=="string"&&(e={}),e=Object.assign({},nWt,e),e.offset&&t.compute("offset"),t.docs.map((n,a)=>{let r={};return Object.keys(e).forEach(i=>{e[i]&&oy[i]&&(r[i]=oy[i](n,t,a))}),r})},vee={json:function(t){let e=aWt(this,t);return typeof t=="number"?e[t]:e}};vee.data=vee.json;const rWt=()=>typeof window<"u"&&window.document,iWt=function(t){let e=this.methods.one.debug||{};return t&&e.hasOwnProperty(t)?(e[t](this),this):rWt()?(e.clientSide(this),this):(e.tags(this),this)},oWt=function(t){let e=t.pre||"",n=t.post||"";return e+t.text+n},sWt=function(t,e){let n={};return Object.keys(e).forEach(a=>{t.match(a).fullPointer.forEach(i=>{n[i[3]]={fn:e[a],end:i[2]}})}),n},mje=function(t,e){let n=sWt(t,e),a="";return t.docs.forEach((r,i)=>{for(let o=0;oObject.prototype.toString.call(t)==="[object Object]",lWt=function(t){let e={};return t.forEach(a=>{e[a]=e[a]||0,e[a]+=1}),Object.keys(e).map(a=>({normal:a,count:e[a]})).sort((a,r)=>a.count>r.count?-1:0)},uWt=function(t){if(cWt(t))return mje(this,t);if(t==="text")return this.text();if(t==="normal")return this.text("normal");if(t==="root")return this.text("root");if(t==="machine"||t==="reduced")return this.text("machine");if(t==="hash"||t==="md5")return Yce(this.text());if(t==="json")return this.json();if(t==="offset"||t==="offsets")return this.compute("offset"),this.json({offset:!0});if(t==="array")return this.docs.map(n=>n.reduce((a,r)=>a+r.pre+r.text+r.post,"").trim()).filter(n=>n);if(t==="freq"||t==="frequency"||t==="topk")return lWt(this.json({normal:!0}).map(e=>e.normal));if(t==="terms"){let e=[];return this.docs.forEach(n=>{let a=n.map(r=>r.text);a=a.filter(r=>r),e=e.concat(a)}),e}return t==="tags"?this.docs.map(e=>e.reduce((n,a)=>(n[a.implicit||a.normal]=Array.from(a.tags),n),{})):t==="debug"?this.debug():this.text()},dWt={debug:iWt,out:uWt,wrap:function(t){return mje(this,t)}},pWt=t=>Object.prototype.toString.call(t)==="[object Object]",AWt={text:function(t){let e={};if(t&&typeof t=="string"&&$w.hasOwnProperty(t)?e=Object.assign({},$w[t]):t&&pWt(t)&&(e=Object.assign({},t)),e.keepSpace===void 0&&!this.isFull()&&(e.keepSpace=!1),e.keepEndPunct===void 0&&this.pointer){let n=this.pointer[0];n&&n[1]?e.keepEndPunct=!1:e.keepEndPunct=!0}return e.keepPunct===void 0&&(e.keepPunct=!0),e.keepSpace===void 0&&(e.keepSpace=!0),tWt(this.docs,e)}},mWt=Object.assign({},dWt,AWt,vee,ZHt),gWt=function(t){Object.assign(t.prototype,mWt)},hWt=function(t){console.log("%c -=-=- ","background-color:#6699cc;"),t.forEach(e=>{console.groupCollapsed(e.text());let a=e.docs[0].map(r=>{let i=r.text||"-";r.implicit&&(i="["+r.implicit+"]");let o="["+Array.from(r.tags).join(", ")+"]";return{text:i,tags:o}});console.table(a,["text","tags"]),console.groupEnd()})},Sf="\x1B[0m",Op={green:t=>"\x1B[32m"+t+Sf,red:t=>"\x1B[31m"+t+Sf,blue:t=>"\x1B[34m"+t+Sf,magenta:t=>"\x1B[35m"+t+Sf,cyan:t=>"\x1B[36m"+t+Sf,yellow:t=>"\x1B[33m"+t+Sf,black:t=>"\x1B[30m"+t+Sf,dim:t=>"\x1B[2m"+t+Sf,i:t=>"\x1B[3m"+t+Sf},fWt=function(t,e){return e.one.tagSet&&(t=t.map(n=>{if(!e.one.tagSet.hasOwnProperty(n))return n;const a=e.one.tagSet[n].color||"blue";return Op[a](n)})),t.join(", ")},bWt=function(t){let{docs:e,model:n}=t;e.length===0&&console.log(Op.blue(` ──────`)),e.forEach(a=>{console.log(Op.blue(` ┌─────────`)),a.forEach(r=>{let i=[...r.tags||[]],o=r.text||"-";r.sense&&(o=`{${r.normal}/${r.sense}}`),r.implicit&&(o="["+r.implicit+"]"),o=Op.yellow(o);let s="'"+o+"'";if(r.reference){let u=t.update([r.reference]).text("normal");s+=` - ${Op.dim(Op.i("["+u+"]"))}`}s=s.padEnd(18);let l=Op.blue(" │ ")+Op.i(s)+" - "+fWt(i,n);console.log(l)})}),console.log(` `)},yWt=function(t){let{docs:e}=t;console.log(""),e.forEach(n=>{let a=[];n.forEach(r=>{r.chunk==="Noun"?a.push(Op.blue(r.implicit||r.normal)):r.chunk==="Verb"?a.push(Op.green(r.implicit||r.normal)):r.chunk==="Adjective"?a.push(Op.yellow(r.implicit||r.normal)):r.chunk==="Pivot"?a.push(Op.red(r.implicit||r.normal)):a.push(r.implicit||r.normal)}),console.log(a.join(" "),` `)}),console.log(` `)},wWt=(t,e,n)=>{let a=n*9,r=e.start+a,i=r+e.length,o=t.substring(0,r),s=t.substring(r,i),l=t.substring(i,t.length);return[o,s,l]},vWt=function(t,e,n){let a=wWt(t,e,n);return`${a[0]}${Op.blue(a[1])}${a[2]}`},kWt=function(t){if(!t.found)return;let e={};t.fullPointer.forEach(n=>{e[n[0]]=e[n[0]]||[],e[n[0]].push(n)}),Object.keys(e).forEach(n=>{let r=t.update([[Number(n)]]).text();t.update(e[n]).json({offset:!0}).forEach((s,l)=>{r=vWt(r,s.offset,l)}),console.log(r)}),console.log(` `)},xWt={tags:bWt,clientSide:hWt,chunks:yWt,highlight:kWt},OWt={api:gWt,methods:{one:{hash:Yce,debug:xWt}}},gje=function(t,e){if(t[0]!==e[0])return!1;let[,n,a]=t,[,r,i]=e;return n<=r&&a>r||r<=n&&i>n},CWt=function(t){let e=t[0][1],n=t[0][2];return t.forEach(a=>{a[1]n&&(n=a[2])}),[t[0][0],e,n]},sz=function(t){let e={};return t.forEach(n=>{e[n[0]]=e[n[0]]||[],e[n[0]].push(n)}),e},_Wt=function(t){let e={};for(let n=0;ni&&(o.after=[n,i,t[2]]),o},EWt=function(t,e){return t[1]<=e[1]&&e[2]<=t[2]},hje=function(t,e){let n=sz(e),a=[];return t.forEach(r=>{let[i]=r,o=n[i]||[];if(o=o.filter(l=>EWt(r,l)),o.length===0){a.push({passthrough:r});return}o=o.sort((l,u)=>l[1]-u[1]);let s=r;o.forEach((l,u)=>{let d=BWt(s,l);o[u+1]?(a.push({before:d.before,match:d.match}),d.after&&(s=d.after)):a.push(d)})}),a},QWt=20,SWt=function(t,e,n){for(let a=0;ai.id===t);if(r!==-1)return[n-a,r]}if(e[n+a]){let r=e[n+a].findIndex(i=>i.id===t);if(r!==-1)return[n+a,r]}}return null},IWt=function(t,e){let[n,a,,,r]=t,i=e[n],o=i.findIndex(s=>s.id===r);return o===-1?(t[2]=e[n].length,t[4]=i.length?i[i.length-1].id:null):t[2]=o,e[n].slice(a,t[2]+1)},DWt=function(t,e){let n=[];return t.forEach((a,r)=>{if(!a)return;let[i,o,s,l,u]=a,d=e[i]||[];if(o===void 0&&(o=0),s===void 0&&(s=d.length),l&&(!d[o]||d[o].id!==l)){let p=SWt(l,e,i);if(p!==null){let A=s-o;d=e[p[0]].slice(p[1],p[1]+A);let m=d[0]?d[0].id:null;t[r]=[p[0],p[1],p[1]+A,m]}}else d=d.slice(o,s);d.length!==0&&o!==s&&(u&&d[d.length-1].id!==u&&(d=IWt(a,e)),n.push(d))}),n=n.filter(a=>a.length>0),n},$Wt=function(t){let e=[];for(let n=0;n{let[o]=i;if(a[o].length===1){r.push(i);return}let s=a[o].filter(u=>gje(i,u));s.push(i);let l=CWt(s);r.push(l)}),r=_Wt(r),r},bje=function(t,e){let n=[];return hje(t,e).forEach(r=>{r.passthrough&&n.push(r.passthrough),r.before&&n.push(r.before),r.after&&n.push(r.after)}),n},PWt=function(t,e){let n=t[1]e[2]?e[2]:t[2];return n{let i=n[r[0]]||[];i=i.filter(o=>gje(r,o)),i.length!==0&&i.forEach(o=>{let s=PWt(r,o);s&&a.push(s)})}),a},RWt=function(t){return Object.prototype.toString.call(t)==="[object Array]"},Xce=(t,e)=>typeof t=="string"||RWt(t)?e.match(t):t||e.none(),g3=function(t,e){return t.map(n=>{let[a,r]=n;return e[a]&&e[a][r]&&(n[3]=e[a][r].id),n})},zh={};zh.union=function(t){t=Xce(t,this);let e=fje(this.fullPointer,t.fullPointer);return e=g3(e,this.document),this.toView(e)};zh.and=zh.union;zh.intersection=function(t){t=Xce(t,this);let e=FWt(this.fullPointer,t.fullPointer);return e=g3(e,this.document),this.toView(e)};zh.not=function(t){t=Xce(t,this);let e=bje(this.fullPointer,t.fullPointer);return e=g3(e,this.document),this.toView(e)};zh.difference=zh.not;zh.complement=function(){let t=this.all(),e=bje(t.fullPointer,this.fullPointer);return e=g3(e,this.document),this.toView(e)};zh.settle=function(){let t=this.fullPointer;return t.forEach(e=>{t=fje(t,[e])}),t=g3(t,this.document),this.update(t)};const LWt=function(t){Object.assign(t.prototype,zh)},NWt={methods:TWt,api:LWt},MWt={buildNet:function(t){let n=this.methods().one.buildNet(t,this.world());return n.isNet=!0,n}},zWt=function(t){t.prototype.sweep=function(e,n={}){const{world:a,docs:r}=this,{methods:i}=a;let o=i.one.bulkMatch(r,e,this.methods,n);n.tagger!==!1&&i.one.bulkTagger(o,r,this.world),o=o.map(l=>{let u=l.pointer,d=r[u[0]][u[1]],p=u[2]-u[1];return d.index&&(l.pointer=[d.index[0],d.index[1],u[1]+p]),l});let s=o.map(l=>l.pointer);return o=o.map(l=>(l.view=this.update([l.pointer]),delete l.regs,delete l.needs,delete l.pointer,delete l._expanded,l)),{view:this.update(s),found:o}}},kee=function(t){return t.optional===!0||t.negative===!0?null:t.tag?"#"+t.tag:t.word?t.word:t.switch?`%${t.switch}%`:null},qWt=function(t){let e=[];return t.forEach(n=>{e.push(kee(n)),n.operator==="and"&&n.choices&&n.choices.forEach(a=>{a.forEach(r=>{e.push(kee(r))})})}),e.filter(n=>n)},jWt=function(t){let e=[],n=0;return t.forEach(a=>{a.operator==="or"&&!a.optional&&!a.negative&&(a.fastOr&&Array.from(a.fastOr).forEach(r=>{e.push(r)}),a.choices&&a.choices.forEach(r=>{r.forEach(i=>{let o=kee(i);o&&e.push(o)})}),n+=1)}),{wants:e,count:n}},UWt=function(t,e){const n=e.methods.one.parseMatch;return t.forEach(a=>{a.regs=n(a.match,{},e),typeof a.ifNo=="string"&&(a.ifNo=[a.ifNo]),a.notIf&&(a.notIf=n(a.notIf,{},e)),a.needs=qWt(a.regs);let{wants:r,count:i}=jWt(a.regs);a.wants=r,a.minWant=i,a.minWords=a.regs.filter(o=>!o.optional).length}),t},GWt=function(t,e){t=UWt(t,e);let n={};t.forEach(r=>{r.needs.forEach(i=>{n[i]=Array.isArray(n[i])?n[i]:[],n[i].push(r)}),r.wants.forEach(i=>{n[i]=Array.isArray(n[i])?n[i]:[],n[i].push(r)})}),Object.keys(n).forEach(r=>{let i={};n[r]=n[r].filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0))});let a=t.filter(r=>r.needs.length===0&&r.wants.length===0);return{hooks:n,always:a}},HWt=function(t,e){return t.map((n,a)=>{let r=[];Object.keys(e).forEach(o=>{t[a].has(o)&&(r=r.concat(e[o]))});let i={};return r=r.filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0)),r})},WWt=function(t,e){return t.map((n,a)=>{let r=e[a];return n=n.filter(i=>i.needs.every(o=>r.has(o))),n=n.filter(i=>!(i.ifNo!==void 0&&i.ifNo.some(o=>r.has(o))===!0)),n=n.filter(i=>i.wants.length===0?!0:i.wants.filter(s=>r.has(s)).length>=i.minWant),n})},YWt=function(t,e,n,a,r){let i=[];for(let o=0;o0&&(u.ptrs.forEach(d=>{d[0]=o;let p=Object.assign({},l,{pointer:d});l.unTag!==void 0&&(p.unTag=l.unTag),i.push(p)}),r.matchOne===!0))return[i[0]]}return i},XWt=function(t,e){return t.map((n,a)=>{let r=e[a].length;return n=n.filter(i=>r>=i.minWords),n})},VWt=function(t,e,n,a={}){let r=n.one.cacheDoc(t),i=HWt(r,e.hooks);return i=WWt(i,r),e.always.length>0&&(i=i.map(s=>s.concat(e.always))),i=XWt(i,t),YWt(i,t,r,n,a)},ZWt=function(t,e,n){let a=n.one.tagSet;if(!a.hasOwnProperty(e))return!0;let r=a[e].not||[];for(let i=0;i"u"||!Pve?self.env||{}:Pve).DEBUG_TAGS&&console.log(` \x1B[32m→ ${t.length} post-tagger:\x1B[0m`),t.map(d=>{if(!d.tag&&!d.chunk&&!d.unTag)return;let p=d.reason||d.match,A=i([d.pointer],e)[0];if(!(d.safe===!0&&(ZWt(A,d.tag,a)===!1||A[A.length-1].post==="-"))){if(d.tag!==void 0){if(o(A,d.tag,n,d.safe,`[post] '${p}'`),d.tag==="Noun"&&l){let m=A[A.length-1];l(m.text)?o([m],"Plural",n,d.safe,"quick-plural"):o([m],"Singular",n,d.safe,"quick-singular")}d.freeze===!0&&A.forEach(m=>m.frozen=!0)}d.unTag!==void 0&&s(A,d.unTag,n,d.safe,p),d.chunk&&A.forEach(m=>m.chunk=d.chunk)}}))},JWt={buildNet:GWt,bulkMatch:VWt,bulkTagger:KWt},eYt={lib:MWt,api:zWt,methods:{one:JWt}};var Fve={};const yje=/ /,Rve=function(t,e){e==="Noun"&&(t.chunk=e),e==="Verb"&&(t.chunk=e)},wje=function(t,e,n,a){if(t.tags.has(e)===!0||e===".")return null;t.frozen===!0&&(a=!0);let r=n[e];if(r){if(r.not&&r.not.length>0)for(let i=0;i0)for(let i=0;i{let s=r[o];s&&(s=s.replace(/^#/,""),wje(i,s,n,a))})},nYt=function(t){return Object.prototype.toString.call(t)==="[object Array]"},aYt=(t,e,n="")=>{const a=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",r=o=>"\x1B[3m"+o+"\x1B[0m";let i=t.map(o=>o.text||"["+o.implicit+"]").join(" ");typeof e!="string"&&e.length>2&&(e=e.slice(0,2).join(", #")+" +"),e=typeof e!="string"?e.join(", #"):e,console.log(` ${a(i).padEnd(24)} \x1B[32m→\x1B[0m #${e.padEnd(22)} ${r(n)}`)},vje=function(t,e,n={},a,r){const i=n.model.one.tagSet||{};if(!e)return;const o=typeof process>"u"||!Fve?self.env||{}:Fve;if(o&&o.DEBUG_TAGS&&aYt(t,e,r),nYt(e)===!0){e.forEach(s=>vje(t,s,n,a));return}if(typeof e!="string"){console.warn(`compromise: Invalid tag '${e}'`);return}if(e=e.trim(),yje.test(e)){tYt(t,e,i,a);return}e=e.replace(/^#/,"");for(let s=0;s0)for(let o=0;o/),n=[];e.forEach(r=>{n=n.concat(function(i){if(!(i=i.trim()))return null;if(/^\[/.test(i)&&/\]$/.test(i)){let o=(i=(i=i.replace(/^\[/,"")).replace(/\]$/,"")).split(/,/);return o=o.map(s=>s.trim()).filter(s=>s),o=o.map(s=>G0({id:s})),o}return[G0({id:i})]}(r))}),n=n.filter(r=>r);let a=n[0];for(let r=1;r{let n=[],a=[t];for(;a.length>0;){let r=a.pop();n.push(r),r.children&&r.children.forEach(i=>{e&&e(r,i),a.push(i)})}return n},Vce=t=>Object.prototype.toString.call(t)==="[object Array]",g8=t=>(t=t||"").trim(),cYt=function(t=[]){return typeof t=="string"?function(n){let a=n.split(/\r?\n/),r=[];a.forEach(o=>{if(!o.trim()||oYt.test(o))return;let s=(l=>{const u=/^( {2}|\t)/;let d=0;for(;u.test(l);)l=l.replace(u,""),d+=1;return d})(o);r.push({indent:s,node:sYt(o)})});let i=function(o){let s={children:[]};return o.forEach((l,u)=>{l.indent===0?s.children=s.children.concat(l.node):o[u-1]&&function(d,p){let A=d[p].indent;for(;p>=0;p-=1)if(d[p].indent{a[i.id]=i});let r=G0({});return n.forEach(i=>{if((i=G0(i)).parent)if(a.hasOwnProperty(i.parent)){let o=a[i.parent];delete i.parent,o.children.push(i)}else console.warn(`[Grad] - missing node '${i.parent}'`);else r.children.push(i)}),r}(t):(gb(e=t).forEach(G0),e);var e},lYt=t=>"\x1B[31m"+t+"\x1B[0m",uYt=t=>"\x1B[2m"+t+"\x1B[0m",xee=function(t,e){let n="-> ";e&&(n=uYt("→ "));let a="";return gb(t).forEach((r,i)=>{let o=r.id||"";if(e&&(o=lYt(o)),i===0&&!r.id)return;let s=r._cache.parents.length;a+=" ".repeat(s)+n+o+` `}),a},Lve=function(t){let e=gb(t);e.forEach(a=>{delete(a=Object.assign({},a)).children});let n=e[0];return n&&!n.id&&Object.keys(n.props).length===0&&e.shift(),e},Nve={text:xee,txt:xee,array:Lve,flat:Lve},Mve=function(t,e){return e==="nested"||e==="json"?t:e==="debug"?(console.log(xee(t,!0)),null):Nve.hasOwnProperty(e)?Nve[e](t):t},AH=t=>{gb(t,(e,n)=>{e.id&&(e._cache.parents=e._cache.parents||[],n._cache.parents=e._cache.parents.concat([e.id]))})},dYt=(t,e)=>(Object.keys(e).forEach(n=>{if(e[n]instanceof Set){let a=t[n]||new Set;t[n]=new Set([...a,...e[n]])}else if((a=>a&&typeof a=="object"&&!Array.isArray(a))(e[n])){let a=t[n]||{};t[n]=Object.assign({},e[n],a)}else Vce(e[n])?t[n]=e[n].concat(t[n]||[]):t[n]===void 0&&(t[n]=e[n])}),t),pYt=/\//;let AYt=class SF{constructor(e={}){Object.defineProperty(this,"json",{enumerable:!1,value:e,writable:!0})}get children(){return this.json.children}get id(){return this.json.id}get found(){return this.json.id||this.json.children.length>0}props(e={}){let n=this.json.props||{};return typeof e=="string"&&(n[e]=!0),this.json.props=Object.assign(n,e),this}get(e){if(e=g8(e),!pYt.test(e)){let a=this.json.children.find(r=>r.id===e);return new SF(a)}let n=((a,r)=>{let i=(o=>typeof o!="string"?o:(o=o.replace(/^\//,"")).split(/\//))(r=r||"");for(let o=0;ol.id===i[o]);if(!s)return null;a=s}return a})(this.json,e)||G0({});return new SF(n)}add(e,n={}){if(Vce(e))return e.forEach(r=>this.add(g8(r),n)),this;e=g8(e);let a=G0({id:e,props:n});return this.json.children.push(a),new SF(a)}remove(e){return e=g8(e),this.json.children=this.json.children.filter(n=>n.id!==e),this}nodes(){return gb(this.json).map(e=>(delete(e=Object.assign({},e)).children,e))}cache(){return(e=>{let n=gb(e,(r,i)=>{r.id&&(r._cache.parents=r._cache.parents||[],r._cache.children=r._cache.children||[],i._cache.parents=r._cache.parents.concat([r.id]))}),a={};n.forEach(r=>{r.id&&(a[r.id]=r)}),n.forEach(r=>{r._cache.parents.forEach(i=>{a.hasOwnProperty(i)&&a[i]._cache.children.push(r.id)})}),e._cache.children=Object.keys(a)})(this.json),this}list(){return gb(this.json)}fillDown(){var e;return e=this.json,gb(e,(n,a)=>{a.props=dYt(a.props,n.props)}),this}depth(){AH(this.json);let e=gb(this.json),n=e.length>1?1:0;return e.forEach(a=>{if(a._cache.parents.length===0)return;let r=a._cache.parents.length+1;r>n&&(n=r)}),n}out(e){return AH(this.json),Mve(this.json,e)}debug(){return AH(this.json),Mve(this.json,"debug"),this}};const kje=function(t){let e=cYt(t);return new AYt(e)};kje.prototype.plugin=function(t){t(this)};const zO={Noun:"blue",Verb:"green",Negative:"green",Date:"red",Value:"red",Adjective:"magenta",Preposition:"cyan",Conjunction:"cyan",Determiner:"cyan",Hyphenated:"cyan",Adverb:"cyan"},mYt=function(t){if(zO.hasOwnProperty(t.id))return zO[t.id];if(zO.hasOwnProperty(t.is))return zO[t.is];let e=t._cache.parents.find(n=>zO[n]);return zO[e]},gYt=function(t){const e={};return t.forEach(n=>{let{not:a,also:r,is:i,novel:o}=n.props,s=n._cache.parents;r&&(s=s.concat(r)),e[n.id]={is:i,not:a,novel:o,also:r,parents:s,children:n._cache.children,color:mYt(n)}}),Object.keys(e).forEach(n=>{let a=new Set(e[n].not);e[n].not.forEach(r=>{e[r]&&e[r].children.forEach(i=>a.add(i))}),e[n].not=Array.from(a)}),e},zve=function(t){return t?typeof t=="string"?[t]:t:[]},hYt=function(t,e){return Object.keys(t).forEach(n=>{t[n].isA&&(t[n].is=t[n].isA),t[n].notA&&(t[n].not=t[n].notA),t[n].is&&typeof t[n].is=="string"&&!e.hasOwnProperty(t[n].is)&&!t.hasOwnProperty(t[n].is)&&(t[t[n].is]={}),t[n].not&&typeof t[n].not=="string"&&!t.hasOwnProperty(t[n].not)&&!e.hasOwnProperty(t[n].not)&&!t.hasOwnProperty(t[n].not)&&(t[t[n].not]={})}),t},fYt=function(t,e){return t=hYt(t,e),Object.keys(t).forEach(n=>{t[n].children=zve(t[n].children),t[n].not=zve(t[n].not)}),Object.keys(t).forEach(n=>{(t[n].not||[]).forEach(r=>{t[r]&&t[r].not&&t[r].not.push(n)})}),t},bYt=function(t){const e=Object.keys(t).map(a=>{let r=t[a];const i={not:new Set(r.not),also:r.also,is:r.is,novel:r.novel};return{id:a,parent:r.is,props:i,children:[]}});return kje(e).cache().fillDown().out("array")},yYt=function(t){return Object.keys(t).forEach(e=>{t[e]=Object.assign({},t[e]),t[e].novel=!0}),t},wYt=function(t,e){Object.keys(e).length>0&&(t=yYt(t)),t=fYt(t,e);let n=Object.assign({},e,t);const a=bYt(n);return gYt(a)},vYt={one:{setTag:vje,unTag:rYt,addTags:wYt,canBe:iYt}},qve=function(t){return Object.prototype.toString.call(t)==="[object Array]"},kYt={tag:function(t,e="",n){if(!this.found||!t)return this;let a=this.termList();if(a.length===0)return this;const{methods:r,verbose:i,world:o}=this;return i===!0&&console.log(" + ",t,e||""),qve(t)?t.forEach(s=>r.one.setTag(a,s,o,n,e)):r.one.setTag(a,t,o,n,e),this.uncache(),this},tagSafe:function(t,e=""){return this.tag(t,e,!0)},unTag:function(t,e){if(!this.found||!t)return this;let n=this.termList();if(n.length===0)return this;const{methods:a,verbose:r,model:i}=this;r===!0&&console.log(" - ",t,e||"");let o=i.one.tagSet;return qve(t)?t.forEach(s=>a.one.unTag(n,s,o)):a.one.unTag(n,t,o),this.uncache(),this},canBe:function(t){t=t.replace(/^#/,"");let e=this.model.one.tagSet,n=this.methods.one.canBe,a=[];this.document.forEach((i,o)=>{i.forEach((s,l)=>{n(s,t,e)||a.push([o,l,l+1])})});let r=this.update(a);return this.difference(r)}},xYt=function(t){Object.assign(t.prototype,kYt)},OYt=function(t){const{model:e,methods:n}=this.world(),a=e.one.tagSet,r=n.one.addTags;let i=r(t,a);return e.one.tagSet=i,this},CYt={addTags:OYt},jve=new Set(["Auxiliary","Possessive"]),_Yt=function(t,e){return t=t.sort((n,a)=>{if(jve.has(n)||!e.hasOwnProperty(a))return 1;if(jve.has(a)||!e.hasOwnProperty(n))return-1;let r=e[n].children||[],i=r.length;r=e[a].children||[];let o=r.length;return i-o}),t},BYt=function(t){const{document:e,world:n}=t,a=n.model.one.tagSet;e.forEach(r=>{r.forEach(i=>{let o=Array.from(i.tags);i.tagRank=_Yt(o,a)})})},EYt={model:{one:{tagSet:{}}},compute:{tagRank:BYt},methods:vYt,api:xYt,lib:CYt},QYt=/([.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s)/g,SYt=/^[.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s$/,IYt=/((?:\r?\n|\r)+)/,DYt=function(t){let e=[],n=t.split(IYt);for(let a=0;a0&&(r.push(o),t[i]="")}return r},Uve=280,xje={'"':'"',""":""","“":"”","‟":"”","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","〟":"〞"},RYt=RegExp("["+Object.keys(xje).join("")+"]","g"),LYt=RegExp("["+Object.values(xje).join("")+"]","g"),Gve=function(t){if(!t)return!1;let e=t.match(LYt);return e!==null&&e.length===1},NYt=function(t){let e=[];for(let n=0;n(t[e]=!0,t),{});const JYt=function(t){return Object.prototype.toString.call(t)==="[object Array]"},eXt=function(t,e){let n=[],a=[];if(t=t||"",typeof t=="number"&&(t=String(t)),JYt(t))return t;const r=t.split(KYt);for(let o=0;o0?(n[n.length-1]+=i,n.push(s)):n.push(i+s),i=""):i+=s}return i&&(n.length===0&&(n[0]=""),n[n.length-1]+=i),n=XYt(n),n=WYt(n),n=n.filter(o=>o),n},Yve=/\p{Letter}/u,h8=/[\p{Number}\p{Currency_Symbol}]/u,tXt=/^[a-z]\.([a-z]\.)+/i,nXt=/[sn]['’]$/,aXt=function(t,e){let{prePunctuation:n,postPunctuation:a,emoticons:r}=e.one,i=t,o="",s="",l=Array.from(t);if(r.hasOwnProperty(t.trim()))return{str:t.trim(),pre:o,post:" "};let u=l.length;for(let d=0;d(s=d||"","")),t=i,o=""),{str:t,pre:o,post:s}},rXt=(t,e)=>{let{str:n,pre:a,post:r}=aXt(t,e);return{text:n,pre:a,post:r,tags:new Set}},iXt=function(t,e){const n=e.model.one.unicode||{};t=t||"";let a=t.split("");return a.forEach((r,i)=>{n[r]&&(a[i]=n[r])}),a.join("")},oXt=function(t){t=t||"",t=t.toLowerCase(),t=t.trim();let e=t;return t=t.replace(/[,;.!?]+$/,""),t=t.replace(/\u2026/g,"..."),t=t.replace(/\u2013/g,"-"),/^[:;]/.test(t)===!1&&(t=t.replace(/\.{3,}$/g,""),t=t.replace(/[",.!:;?)]+$/g,""),t=t.replace(/^['"(]+/g,"")),t=t.replace(/[\u200B-\u200D\uFEFF]/g,""),t=t.trim(),t===""&&(t=e),t=t.replace(/([0-9]),([0-9])/g,"$1$2"),t},sXt=/([A-Z]\.)+[A-Z]?,?$/,cXt=/^[A-Z]\.,?$/,lXt=/[A-Z]{2,}('s|,)?$/,uXt=/([a-z]\.)+[a-z]\.?$/,dXt=function(t){return sXt.test(t)===!0||uXt.test(t)===!0||cXt.test(t)===!0||lXt.test(t)===!0},pXt=function(t){return dXt(t)&&(t=t.replace(/\./g,"")),t},Oje=function(t,e){const n=e.methods.one.killUnicode;let a=t.text||"";a=oXt(a),a=n(a,e),a=pXt(a),t.normal=a},AXt=function(t,e){const{methods:n,model:a}=e,{splitSentences:r,splitTerms:i,splitWhitespace:o}=n.one.tokenize;return t=t||"",t=r(t,e).map(l=>{let u=i(l,a);return u=u.map(d=>o(d,a)),u.forEach(d=>{Oje(d,e)}),u}),t},mXt=/[ .][A-Z]\.? *$/i,gXt=/(?:\u2026|\.{2,}) *$/,hXt=/\p{L}/u,fXt=/\. *$/,bXt=/^[A-Z]\. $/,yXt=function(t,e){if(hXt.test(t)===!1||mXt.test(t)===!0||t.length===3&&bXt.test(t)||gXt.test(t)===!0)return!1;let a=t.replace(/[.!?\u203D\u2E18\u203C\u2047-\u2049] *$/,"").split(" "),r=a[a.length-1].toLowerCase();return!(e.hasOwnProperty(r)===!0&&fXt.test(t)===!0)},wXt={one:{killUnicode:iXt,tokenize:{splitSentences:UYt,isSentence:yXt,splitTerms:eXt,splitWhitespace:rXt,fromString:AXt}}},vXt={"&":"and","@":"at","%":"percent",plz:"please",bein:"being"},kXt=["approx","apt","bc","cyn","eg","esp","est","etc","ex","exp","prob","pron","gal","min","pseud","fig","jd","lat","lng","vol","fm","def","misc","plz","ea","ps","sec","pt","pref","pl","pp","qt","fr","sq","nee","ss","tel","temp","vet","ver","fem","masc","eng","adj","vb","rb","inf","situ","vivo","vitro","wr"],xXt=["adj","adm","adv","asst","atty","bldg","brig","capt","cmdr","comdr","cpl","det","dr","esq","gen","gov","hon","jr","llb","lt","maj","messrs","mlle","mme","mr","mrs","ms","mstr","phd","prof","pvt","rep","reps","res","rev","sen","sens","sfc","sgt","sir","sr","supt","surg"],OXt=["jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec"],CXt=["ad","al","arc","ba","bl","ca","cca","col","corp","ft","fy","ie","lit","ma","md","pd","tce"],_Xt=["dept","univ","assn","bros","inc","ltd","co"],BXt=["rd","st","dist","mt","ave","blvd","cl","cres","hwy","ariz","cal","calif","colo","conn","fla","fl","ga","ida","ia","kan","kans","minn","neb","nebr","okla","penna","penn","pa","dak","tenn","tex","ut","vt","va","wis","wisc","wy","wyo","usafa","alta","ont","que","sask"],EXt=["dl","ml","gal","qt","pt","tbl","tsp","tbsp","km","dm","cm","mm","mi","td","hr","hrs","kg","hg","dg","cg","mg","µg","lb","oz","sq ft","hz","mps","mph","kmph","kb","mb","tb","lx","lm","fl oz","yb"];let QXt=[[kXt],[EXt,"Unit"],[CXt,"Noun"],[xXt,"Honorific"],[OXt,"Month"],[_Xt,"Organization"],[BXt,"Place"]],Cje={},IF={};QXt.forEach(t=>{t[0].forEach(e=>{Cje[e]=!0,IF[e]="Abbreviation",t[1]!==void 0&&(IF[e]=[IF[e],t[1]])})});const SXt=["anti","bi","co","contra","de","extra","infra","inter","intra","macro","micro","mis","mono","multi","peri","pre","pro","proto","pseudo","re","sub","supra","trans","tri","un","out","ex"].reduce((t,e)=>(t[e]=!0,t),{}),IXt={like:!0,ish:!0,less:!0,able:!0,elect:!0,type:!0,designate:!0};let Xve={"!":"¡","?":"¿Ɂ",'"':'“”"❝❞',"'":"‘‛❛❜’","-":"—–",a:"ªÀÁÂÃÄÅàáâãäåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧȺΆΑΔΛάαλАаѦѧӐӑӒӓƛæ",b:"ßþƀƁƂƃƄƅɃΒβϐϦБВЪЬвъьѢѣҌҍ",c:"¢©ÇçĆćĈĉĊċČčƆƇƈȻȼͻͼϲϹϽϾСсєҀҁҪҫ",d:"ÐĎďĐđƉƊȡƋƌ",e:"ÈÉÊËèéêëĒēĔĕĖėĘęĚěƐȄȅȆȇȨȩɆɇΈΕΞΣέεξϵЀЁЕеѐёҼҽҾҿӖӗễ",f:"ƑƒϜϝӺӻҒғſ",g:"ĜĝĞğĠġĢģƓǤǥǦǧǴǵ",h:"ĤĥĦħƕǶȞȟΉΗЂЊЋНнђћҢңҤҥҺһӉӊ",I:"ÌÍÎÏ",i:"ìíîïĨĩĪīĬĭĮįİıƖƗȈȉȊȋΊΐΪίιϊІЇіїi̇",j:"ĴĵǰȷɈɉϳЈј",k:"ĶķĸƘƙǨǩΚκЌЖКжкќҚқҜҝҞҟҠҡ",l:"ĹĺĻļĽľĿŀŁłƚƪǀǏǐȴȽΙӀӏ",m:"ΜϺϻМмӍӎ",n:"ÑñŃńŅņŇňʼnŊŋƝƞǸǹȠȵΝΠήηϞЍИЙЛПийлпѝҊҋӅӆӢӣӤӥπ",o:"ÒÓÔÕÖØðòóôõöøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱΌΘΟθοσόϕϘϙϬϴОФоѲѳӦӧӨөӪӫ",p:"ƤΡρϷϸϼРрҎҏÞ",q:"Ɋɋ",r:"ŔŕŖŗŘřƦȐȑȒȓɌɍЃГЯгяѓҐґ",s:"ŚśŜŝŞşŠšƧƨȘșȿЅѕ",t:"ŢţŤťŦŧƫƬƭƮȚțȶȾΓΤτϮТт",u:"ÙÚÛÜùúûüŨũŪūŬŭŮůŰűŲųƯưƱƲǓǔǕǖǗǘǙǚǛǜȔȕȖȗɄΰυϋύ",v:"νѴѵѶѷ",w:"ŴŵƜωώϖϢϣШЩшщѡѿ",x:"×ΧχϗϰХхҲҳӼӽӾӿ",y:"ÝýÿŶŷŸƳƴȲȳɎɏΎΥΫγψϒϓϔЎУучўѰѱҮүҰұӮӯӰӱӲӳ",z:"ŹźŻżŽžƵƶȤȥɀΖ"},_je={};Object.keys(Xve).forEach(function(t){Xve[t].split("").forEach(function(e){_je[e]=t})});const DXt={"#":!0,"@":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},$Xt={"%":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},TXt={"<3":!0,"{i=i.trim(),i!==""&&(t.alias=t.alias||[],t.alias.push(i))})}return t},NXt=/^\p{Letter}+-\p{Letter}+$/u,MXt=function(t){let e=t.implicit||t.normal||t.text;e=e.replace(/['’]s$/,""),e=e.replace(/s['’]$/,"s"),e=e.replace(/([aeiou][ktrp])in'$/,"$1ing"),NXt.test(e)&&(e=e.replace(/-/g,"")),e=e.replace(/^[#@]/,""),e!==t.normal&&(t.machine=e)},zXt=function(t){let e=t.docs,n={};for(let a=0;amH(t,LXt),machine:t=>mH(t,MXt),normal:t=>mH(t,Oje),freq:zXt,offset:qXt,index:jXt,wordCount:UXt},HXt={compute:GXt,methods:wXt,model:PXt,hooks:["alias","machine","index","id"]},WXt=function(t){const e=t.model.one.typeahead,n=t.docs;if(n.length===0||Object.keys(e).length===0)return;let a=n[n.length-1]||[],r=a[a.length-1];if(!r.post&&e.hasOwnProperty(r.normal)){let i=e[r.normal];r.implicit=i,r.machine=i,r.typeahead=!0,t.compute.preTagger&&t.last().unTag("*").compute(["lexicon","preTagger"])}},YXt={typeahead:WXt},XXt=function(){const t=this.docs;if(t.length===0)return this;let e=t[t.length-1]||[],n=e[e.length-1];return n.typeahead===!0&&n.machine&&(n.text=n.machine,n.normal=n.machine),this},VXt=function(t){t.prototype.autoFill=XXt},ZXt=function(t,e,n){let a={},r=[],i=n.prefixes||{};return t.forEach(o=>{o=o.toLowerCase().trim();let s=o.length;e.max&&s>e.max&&(s=e.max);for(let l=e.min;l{delete a[o]}),a},KXt=t=>Object.prototype.toString.call(t)==="[object Object]",JXt={safe:!0,min:3},eVt=function(t=[],e={}){let n=this.model();e=Object.assign({},JXt,e),KXt(t)&&(Object.assign(n.one.lexicon,t),t=Object.keys(t));let a=ZXt(t,e,this.world());return Object.keys(a).forEach(r=>{if(n.one.typeahead.hasOwnProperty(r)){delete n.one.typeahead[r];return}n.one.typeahead[r]=a[r]}),this},tVt={typeahead:eVt},nVt={one:{typeahead:{}}},aVt={model:nVt,api:VXt,lib:tVt,compute:YXt,hooks:["typeahead"]};Fa.extend(HUt);Fa.extend(OWt);Fa.extend(UHt);Fa.extend(NWt);Fa.extend(EYt);Fa.plugin(bGt);Fa.extend(HXt);Fa.extend(vGt);Fa.plugin(oUt);Fa.extend(MGt);Fa.extend(aVt);Fa.extend(DGt);Fa.extend(eYt);const Bje={addendum:"addenda",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",opus:"opera",ovum:"ova",phenomenon:"phenomena",referendum:"referenda",alga:"algae",alumna:"alumnae",antenna:"antennae",formula:"formulae",larva:"larvae",nebula:"nebulae",vertebra:"vertebrae",analysis:"analyses",axis:"axes",diagnosis:"diagnoses",parenthesis:"parentheses",prognosis:"prognoses",synopsis:"synopses",thesis:"theses",neurosis:"neuroses",appendix:"appendices",index:"indices",matrix:"matrices",ox:"oxen",sex:"sexes",alumnus:"alumni",bacillus:"bacilli",cactus:"cacti",fungus:"fungi",hippopotamus:"hippopotami",libretto:"libretti",modulus:"moduli",nucleus:"nuclei",octopus:"octopi",radius:"radii",stimulus:"stimuli",syllabus:"syllabi",cookie:"cookies",calorie:"calories",auntie:"aunties",movie:"movies",pie:"pies",rookie:"rookies",tie:"ties",zombie:"zombies",leaf:"leaves",loaf:"loaves",thief:"thieves",foot:"feet",goose:"geese",tooth:"teeth",beau:"beaux",chateau:"chateaux",tableau:"tableaux",bus:"buses",gas:"gases",circus:"circuses",crisis:"crises",virus:"viruses",database:"databases",excuse:"excuses",abuse:"abuses",avocado:"avocados",barracks:"barracks",child:"children",clothes:"clothes",echo:"echoes",embargo:"embargoes",epoch:"epochs",deer:"deer",halo:"halos",man:"men",woman:"women",mosquito:"mosquitoes",mouse:"mice",person:"people",quiz:"quizzes",rodeo:"rodeos",shoe:"shoes",sombrero:"sombreros",stomach:"stomachs",tornado:"tornados",tuxedo:"tuxedos",volcano:"volcanoes"},Zve={Comparative:"true¦bett1f0;arth0ew0in0;er",Superlative:"true¦earlier",PresentTense:"true¦bests,sounds",Condition:"true¦lest,unless",PastTense:"true¦began,came,d4had,kneel3l2m0sa4we1;ea0sg2;nt;eap0i0;ed;id",Participle:"true¦0:09;a06b01cZdXeat0fSgQhPoJprov0rHs7t6u4w1;ak0ithdra02o2r1;i02uY;k0v0;nd1pr04;ergoJoJ;ak0hHo3;e9h7lain,o6p5t4un3w1;o1um;rn;g,k;ol0reS;iQok0;ught,wn;ak0o1runk;ne,wn;en,wn;ewriNi1uJ;dd0s0;ut3ver1;do4se0t1;ak0h2;do2g1;roG;ne;ast0i7;iv0o1;ne,tt0;all0loBor1;bi3g2s1;ak0e0;iv0o9;dd0;ove,r1;a5eamt,iv0;hos0lu1;ng;e4i3lo2ui1;lt;wn;tt0;at0en,gun;r2w1;ak0ok0;is0;en",Gerund:"true¦accord0be0doin,go0result0stain0;ing",Expression:"true¦a0Yb0Uc0Sd0Oe0Mfarew0Lg0FhZjeez,lWmVnToOpLsJtIuFvEw7y0;a5e3i1u0;ck,p;k04p0;ee,pee;a0p,s;!h;!a,h,y;a5h2o1t0;af,f;rd up,w;atsoever,e1o0;a,ops;e,w;hoo,t;ery w06oi0L;gh,h0;! 0h,m;huh,oh;here nPsk,ut tut;h0ic;eesh,hh,it,oo;ff,h1l0ow,sst;ease,s,z;ew,ooey;h1i,mg,o0uch,w,y;h,o,ps;! 0h;hTmy go0wT;d,sh;a7evertheless,o0;!pe;eh,mm;ah,eh,m1ol0;!s;ao,fao;aCeBi9o2u0;h,mph,rra0zzC;h,y;l1o0;r6y9;la,y0;! 0;c1moCsmok0;es;ow;!p hip hoor0;ay;ck,e,llo,y;ha1i,lleluj0;ah;!ha;ah,ee4o1r0;eat scott,r;l1od0sh; grief,bye;ly;! whiz;ell;e0h,t cetera,ureka,ww,xcuse me;k,p;'oh,a0rat,uh;m0ng;mit,n0;!it;mon,o0;ngratulations,wabunga;a2oo1r0tw,ye;avo,r;!ya;h,m; 1h0ka,las,men,rgh,ye;!a,em,h,oy;la",Negative:"true¦n0;ever,o0;n,t",QuestionWord:"true¦how3wh0;at,e1ich,o0y;!m,se;n,re; come,'s",Reflexive:"true¦h4it5my5o1the0your2;ir1m1;ne3ur0;sel0;f,ves;er0im0;self",Plural:"true¦dick0gre0ones,records;ens","Unit|Noun":"true¦cEfDgChBinchAk9lb,m6newt5oz,p4qt,t1y0;ardEd;able1b0ea1sp;!l,sp;spo1;a,t,x;on9;!b,g,i1l,m,p0;h,s;!les;!b,elvin,g,m;!es;g,z;al,b;eet,oot,t;m,up0;!s",Value:"true¦a few",Imperative:"true¦bewa0come he0;re","Plural|Verb":"true¦leaves",Demonym:"true¦0:15;1:12;a0Vb0Oc0Dd0Ce08f07g04h02iYjVkTlPmLnIomHpEqatari,rCs7t5u4v3welAz2;am0Gimbabwe0;enezuel0ietnam0I;gAkrai1;aiwTex0hai,rinida0Ju2;ni0Prkmen;a5cotti4e3ingapoOlovak,oma0Spaniard,udRw2y0W;ede,iss;negal0Cr09;sh;mo0uT;o5us0Jw2;and0;a2eru0Fhilippi0Nortugu07uerto r0S;kist3lesti1na2raguay0;ma1;ani;ami00i2orweP;caragu0geri2;an,en;a3ex0Lo2;ngo0Drocc0;cedo1la2;gasy,y07;a4eb9i2;b2thua1;e0Cy0;o,t01;azakh,eny0o2uwaiI;re0;a2orda1;ma0Ap2;anO;celandic,nd4r2sraeli,ta01vo05;a2iB;ni0qi;i0oneU;aiAin2ondur0unO;di;amEe2hanai0reek,uatemal0;or2rm0;gi0;ilipino,ren8;cuadoVgyp4mira3ngli2sto1thiopi0urope0;shm0;ti;ti0;aPominUut3;a9h6o4roat3ub0ze2;ch;!i0;lom2ngol5;bi0;a6i2;le0n2;ese;lifor1m2na3;bo2eroo1;di0;angladeshi,el6o4r3ul2;gaE;azi9it;li2s1;vi0;aru2gi0;si0;fAl7merBngol0r5si0us2;sie,tr2;a2i0;li0;genti2me1;ne;ba1ge2;ri0;ni0;gh0r2;ic0;an",Organization:"true¦0:4Q;a3Tb3Bc2Od2He2Df27g1Zh1Ti1Pj1Nk1Ll1Gm12n0Po0Mp0Cqu0Br02sTtHuCv9w3xiaomi,y1;amaha,m1Bou1w1B;gov,tu3C;a4e2iki1orld trade organizati33;leaRped0O;lls fargo,st1;fie2Hinghou2R;l1rner br3U;gree3Jl street journ2Im1E;an halOeriz2Xisa,o1;dafo2Yl1;kswagMvo;b4kip,n2ps,s1;a tod3Aps;es3Mi1;lev3Fted natio3C;er,s; mobi32aco beRd bOe9gi frida3Lh3im horto3Amz,o1witt3D;shi49y1;ota,s r 05;e 1in lizzy;b3carpen3Jdaily ma3Dguess w2holli0s1w2;mashing pumpki35uprem0;ho;ea1lack eyed pe3Xyr0Q;ch bo3Dtl0;l2n3Qs1xas instrumen1U;co,la m1F;efoni0Kus;a8cientology,e5ieme2Ymirnoff,np,o3pice gir6quare0Ata1ubaru;rbuc1to34;ks;ny,undgard1;en;a2x pisto1;ls;g1Wrs;few2Minsbur31lesfor03msu2E;adiohead,b8e4o1yana3C;man empi1Xyal 1;b1dutch she4;ank;a3d 1max,vl20;bu1c2Ahot chili peppe2Ylobst2N;ll;ders dige1Ll madrid;c,s;ant3Aizn2Q;a8bs,e5fiz2Ihilip4i3r1;emier 1udenti1D;leagTo2K;nk floyd,zza hut; morrBs;psi2tro1uge0E;br33chi0Tn33;!co;lant2Un1yp16; 2ason27da2P;ld navy,pec,range juli2xf1;am;us;aAb9e6fl,h5i4o1sa,vid3wa;k2tre dame,vart1;is;ia;ke,ntendo,ss0QvZ;l,s;c,st1Otflix,w1; 1sweek;kids on the block,york0D;a,c;nd22s2t1;ional aca2Po,we0U;a,c02d0S;aDcdonalCe9i6lb,o3tv,y1;spa1;ce;b1Tnsanto,ody blu0t1;ley cr1or0T;ue;c2t1;as,subisO;helin,rosoft;dica2rcedes benz,talli1;ca;id,re;ds;cs milk,tt19z24;a3e1g,ittle caesa1P; ore09novo,x1;is,mark,us; 1bour party;pres0Dz boy;atv,fc,kk,lm,m1od1O;art;iffy lu0Roy divisi0Jpmorgan1sa;! cha09;bm,hop,k3n1tv;g,te1;l,rpol;ea;a5ewlett pack1Vi3o1sbc,yundai;me dep1n1P;ot;tac1zbollah;hi;lliburt08sbro;eneral 6hq,ithub,l5mb,o2reen d0Ou1;cci,ns n ros0;ldman sachs,o1;dye1g0H;ar;axo smith kli04encoW;electr0Nm1;oto0Z;a5bi,c barcelo4da,edex,i2leetwood m03o1rito l0G;rd,xcY;at,fa,nancial1restoZ; tim0;na;cebook,nnie mae;b0Asa,u3xxon1; m1m1;ob0J;!rosceptics;aiml0De5isney,o4u1;nkin donu2po0Zran dur1;an;ts;j,w jon0;a,f lepp12ll,peche mode,r spieg02stiny's chi1;ld;aJbc,hFiDloudflaCnn,o3r1;aigsli5eedence clearwater reviv1ossra09;al;c7inba6l4m1o0Est09;ca2p1;aq;st;dplSg1;ate;se;a c1o chanQ;ola;re;a,sco1tigroup;! systems;ev2i1;ck fil a,na daily;r1y;on;d2pital o1rls jr;ne;bury,ill1;ac;aEbc,eBf9l5mw,ni,o1p,rexiteeU;ei3mbardiIston 1;glo1pizza;be;ng;o2ue c1;roV;ckbuster video,omingda1;le; g1g1;oodriL;cht2e ge0rkshire hathaw1;ay;el;cardi,idu,nana republ3s1xt5y5;f,kin robbi1;ns;ic;bYcTdidSerosmith,iRlKmEnheuser busDol,ppleAr6s4u3v2y1;er;is,on;di,todesk;hland o1sociated E;il;b3g2m1;co;os;ys; compu1be0;te1;rs;ch;c,d,erican3t1;!r1;ak; ex1;pre1;ss; 5catel2ta1;ir;! lu1;ce1;nt;jazeera,qae1;da;g,rbnb;as;/dc,a3er,tivision1;! blizz1;ard;demy of scienc0;es;ba",Possessive:"true¦its,my,our0thy;!s","Noun|Verb":"true¦0:9W;1:AA;2:96;3:A3;4:9R;5:A2;6:9K;7:8N;8:7L;9:A8;A:93;B:8D;C:8X;a9Ob8Qc7Id6Re6Gf5Sg5Hh55i4Xj4Uk4Rl4Em40n3Vo3Sp2Squ2Rr21s0Jt02u00vVwGyFzD;ip,oD;ne,om;awn,e6Fie68;aOeMhJiHoErD;ap,e9Oink2;nd0rDuC;kDry,sh5Hth;!shop;ck,nDpe,re,sh;!d,g;e86iD;p,sD;k,p0t2;aDed,lco8W;r,th0;it,lk,rEsDt4ve,x;h,te;!ehou1ra9;aGen5FiFoD;iDmAte,w;ce,d;be,ew,sA;cuum,l4B;pDr7;da5gra6Elo6A;aReQhrPiOoMrGuEwiDy5Z;n,st;nDrn;e,n7O;aGeFiEoDu6;t,ub2;bu5ck4Jgg0m,p;at,k,nd;ck,de,in,nsDp,v7J;f0i8R;ll,ne,p,r4Yss,t94uD;ch,r;ck,de,e,le,me,p,re;e5Wow,u6;ar,e,ll,mp0st,xt;g,lDng2rg7Ps5x;k,ly;a0Sc0Ne0Kh0Fi0Dk0Cl0Am08n06o05pXquaBtKuFwD;ea88iD;ng,pe,t4;bGit,m,ppErD;fa3ge,pri1v2U;lDo6S;e6Py;!je8;aMeLiKoHrEuDy2;dy,ff,mb2;a85eEiDo5Pugg2;ke,ng;am,ss,t4;ckEop,p,rD;e,m;ing,pi2;ck,nk,t4;er,m,p;ck,ff,ge,in,ke,lEmp,nd,p2rDte,y;!e,t;k,l;aJeIiHlGoFrDur,y;ay,e56inDu3;g,k2;ns8Bt;a5Qit;ll,n,r87te;ed,ll;m,n,rk;b,uC;aDee1Tow;ke,p;a5Je4FiDo53;le,rk;eep,iDou4;ce,p,t;ateboa7Ii;de,gnDl2Vnk,p,ze;!al;aGeFiEoDuff2;ck,p,re,w;ft,p,v0;d,i3Ylt0;ck,de,pe,re,ve;aEed,nDrv1It;se,t2N;l,r4t;aGhedu2oBrD;aEeDibb2o3Z;en,w;pe,t4;le,n,r2M;cDfegua72il,mp2;k,rifi3;aZeHhy6LiGoEuD;b,in,le,n,s5X;a6ck,ll,oDpe,u5;f,t;de,ng,ot,p,s1W;aTcSdo,el,fQgPje8lOmMnLo17pJque6sFturn,vDwa6V;eDi27;al,r1;er74oFpe8tEuD;lt,me;!a55;l71rt;air,eaDly,o53;l,t;dezvo2Zt;aDedy;ke,rk;ea1i4G;a6Iist0r5N;act6Yer1Vo71uD;nd,se;a38o6F;ch,s6G;c1Dge,iEke,lly,nDp1Wt1W;ge,k,t;n,se;es6Biv0;a04e00hYiXlToNrEsy4uD;mp,n4rcha1sh;aKeIiHoDu4O;be,ceFdu3fi2grDje8mi1p,te6;amDe6W;!me;ed,ss;ce,de,nt;sDy;er6Cs;cti3i1;iHlFoEp,re,sDuCw0;e,i5Yt;l,p;iDl;ce,sh;nt,s5V;aEce,e32uD;g,mp,n7;ce,nDy;!t;ck,le,n17pe,tNvot;a1oD;ne,tograph;ak,eFnErDt;fu55mA;!c32;!l,r;ckJiInHrFsEtDu1y;ch,e9;s,te;k,tD;!y;!ic;nt,r,se;!a7;bje8ff0il,oErDutli3Qver4B;bAd0ie9;ze;a4ReFoDur1;d,tD;e,i3;ed,gle8tD;!work;aMeKiIoEuD;rd0;ck,d3Rld,nEp,uDve;nt,th;it5EkD;ey;lk,n4Brr5CsDx;s,ta2B;asuBn4UrDss;ge,it;il,nFp,rk3WsEtD;ch,t0;h,k,t0;da5n0oeuvB;aLeJiHoEuD;mp,st;aEbby,ck,g,oDve;k,t;d,n;cDe,ft,mAnIst;en1k;aDc0Pe4vK;ch,d,k,p,se;bFcEnd,p,t4uD;gh,n4;e,k;el,o2U;eEiDno4E;ck,d,ll,ss;el,y;aEo1OuD;i3mp;m,zz;mpJnEr46ssD;ue;c1Rdex,fluGha2k,se2HteDvoi3;nt,rD;e6fa3viD;ew;en3;a8le2A;aJeHiGoEuD;g,nt;l3Ano2Dok,pDr1u1;!e;ghli1Fke,nt,re,t;aDd7lp;d,t;ck,mGndFrEsh,tDu9;ch,e;bo3Xm,ne4Eve6;!le;!m0;aMear,ift,lKossJrFuD;arDe4Alp,n;antee,d;aFiEoDumb2;uCwth;ll,nd,p;de,sp;ip;aBoDue;ss,w;g,in,me,ng,s,te,ze;aZeWiRlNoJrFuD;ck,el,nDss,zz;c38d;aEoDy;st,wn;cDgme,me,nchi1;tuB;cFg,il,ld,rD;ce,e29mDwa31;!at;us;aFe0Vip,oDy;at,ck,od,wD;!er;g,ke,me,re,sh,vo1E;eGgFlEnDre,sh,t,x;an3i0Q;e,m,t0;ht,uB;ld;aEeDn3;d,l;r,tuB;ce,il,ll,rm,vo2W;cho,d7ffe8nMsKxFyeD;!baD;ll;cGerci1hFpDtra8;eriDo0W;en3me9;au6ibA;el,han7u1;caDtima5;pe;count0d,vy;a01eSiMoJrEuDye;b,el,mp,pli2X;aGeFiEoD;ne,p;ft,ll,nk,p,ve;am,ss;ft,g,in;cEd7ubt,wnloD;ad;k,u0E;ge6p,sFt4vD;e,iDor3;de;char7gui1h,liEpD;at4lay,u5;ke;al,bKcJfeIlGmaCposAsEtaD;il;e07iD;gn,re;ay,ega5iD;ght;at,ct;li04rea1;a5ut;b,ma7n3rDte;e,t;a0Eent0Dh06irc2l03oKrFuD;be,e,rDt;b,e,l,ve;aGeFoEuDy;sh;p,ss,wd;dAep;ck,ft,sh;at,de,in,lTmMnFordina5py,re,st,uDv0;gh,nDp2rt;s01t;ceHdu8fli8glomeIsFtDveN;a8rD;a6ol;e9tru8;ct;ntDrn;ra5;bHfoGmFpD;leDouCromi1;me9;aCe9it,u5;rt;at,iD;ne;lap1oD;r,ur;aEiDoud,ub;ck,p;im,w;aEeDip;at,ck,er;iGllen7nErD;ge,m,t;ge,nD;el;n,r;er,re;ke,ll,mp,noe,pGrXsFtEuDve;se,ti0I;alog,ch;h,t;!tuB;re;a03eZiXlToPrHuEyD;pa11;bb2ck2dgEff0mp,rDst,zz;den,n;et;anJeHiFoadEuD;i1sh;ca6;be,d7;ge;aDed;ch,k;ch,d;aFg,mb,nEoDrd0tt2x,ycott;k,st,t;d,e;rd,st;aFeCiDoYur;nk,tz;nd;me;as,d,ke,nd,opsy,tD;!ch,e;aFef,lt,nDt;d,efA;it;r,t;ck,il,lan3nIrFsEtt2;le;e,h;!gDk;aDe;in;!d,g,k;bu1c05dZge,iYlVnTppQrLsIttGucEwaD;rd;tiD;on;aDempt;ck;k,sD;i6ocia5;st;chFmD;!oD;ur;!iD;ve;eEroa4;ch;al;chDg0sw0;or;aEt0;er;rm;d,m,r;dreHvD;an3oD;ca5;te;ce;ss;cDe,he,t;eFoD;rd,u9;nt;nt,ss;se",Actor:"true¦0:7B;1:7G;2:6A;3:7F;4:7O;5:7K;a6Nb62c4Ud4Be41f3Sg3Bh30i2Uj2Qkin2Pl2Km26n1Zo1Sp0Vqu0Tr0JsQtJuHvEw8yo6;gi,ut6;h,ub0;aAe9i8o7r6;estl0it0;m2rk0;fe,nn0t2Bza2H;atherm2ld0;ge earn0it0nder0rri1;eter7i6oyF;ll5Qp,s3Z;an,ina2U;n6s0;c6Uder03;aoisea23e9herapi5iktok0o8r6ut1yco6S;a6endseLo43;d0mp,nscri0Bvel0;ddl0u1G;a0Qchn7en6na4st0;ag0;i3Oo0D;aiXcUeRhPiMki0mu26oJpGquaFtBu7wee6;p0theart;lt2per7r6;f0ge6Iviv1;h6inten0Ist5Ivis1;ero,um2;a8ep7r6;ang0eam0;bro2Nc2Ofa2Nmo2Nsi20;ff0tesm2;tt0;ec7ir2Do6;kesp59u0M;ia5Jt3;l7me6An,rcere6ul;r,ss;di0oi5;n7s6;sy,t0;g0n0;am2ephe1Iow6;girl,m2r2Q;cretInior cit3Fr6;gea4v6;a4it1;hol4Xi7reen6ulpt1;wr2C;e01on;l1nt;aEe9o8u6;l0nn6;er up,ingE;g40le mod3Zof0;a4Zc8fug2Ppo32searQv6;ere4Uolution6;ary;e6luYru22;ptio3T;bbi,dic5Vpp0;arter6e2Z;back;aYeWhSiRlOoKr8sycho7u6;nk,p31;logi5;aGeDiBo6;d9fess1g7ph47s6;pe2Ktitu51;en6ramm0;it1y;igy,uc0;est4Nme mini0Unce6s3E;!ss;a7si6;de4;ch0;ctiti39nk0P;dca0Oet,li6pula50rnst42;c2Itic6;al scie6i2;nti5;a6umb0;nn0y6;er,ma4Lwright;lgrim,one0;a8iloso7otogra7ra6ysi1V;se;ph0;ntom,rmaci5;r6ssi1T;form0s4O;i3El,nel3Yr8st1tr6wn;i6on;arWot;ent4Wi42tn0;ccupa4ffBp8r7ut6;ca5l0B;ac4Iganiz0ig2Fph2;er3t6;i1Jomet6;ri5;ic0spring;aBe9ie4Xo7u6;n,rser3J;b6mad,vi4V;le2Vo4D;i6mesis,phew;ce,ghb1;nny,rr3t1X;aEeDiAo7u6yst1Y;m8si16;der3gul,m7n6th0;arDk;!my;ni7s6;f02s0Jt0;on,st0;chan1Qnt1rcha4;gi9k0n8rtyr,t6y1;e,riar6;ch;ag0iac;ci2stra3I;a7e2Aieutena4o6;rd,s0v0;bor0d7ndlo6ss,urea3Fwy0ym2;rd;!y;!s28;e8o7u6;ggl0;gg0urna2U;st0;c3Hdol,llu3Ummigra4n6; l9c1Qfa4habi42nov3s7ve6;nt1stig3;pe0Nt6;a1Fig3ru0M;aw;airFeBistoAo8u6ygie1K;man6sba2H;!ita8;bo,st6usekN;age,e3P;ri2;ir,r6;m7o6;!ine;it;dress0sty2C;aLeIhostGirl26ladi3oCrand7u6;e5ru;c9daug0Jfa8m7pa6s2Y;!re4;a,o6;th0;hi1B;al7d6lf0;!de3A;ie,k6te26;eep0;!wr6;it0;isha,n6;i6tl04;us;mbl0rden0;aDella,iAo7r6;eela2Nie1P;e,re6ster pare4;be1Hm2r6st0;unn0;an2ZgZlmm17nanci0r6tt0;e6st la2H; marsh2OfigXm2;rm0th0;conoEdDlectriCm8n7x6;amin0cellency,i2A;emy,trepreneur,vironmenta1J;c8p6;er1loye6;e,r;ee;ci2;it1;mi5;aKeBi8ork,ri7u6we02;de,tche2H;ft0v0;ct3eti7plom2Hre6va;ct1;ci2ti2;aDcor3fencCi0InAput9s7tectLvel6;op0;ce1Ge6ign0;rt0;ee,y;iz6;en;em2;c1Ml0;d8nc0redev7ug6;ht0;il;!dy;a06e04fo,hXitizenWlToBr9u6;r3stomer6;! representat6;ive;e3it6;ic;lJmGnAord9rpor1Nu7w6;boy,ork0;n6ri0;ciTte1Q;in3;fidantAgressSs9t6;e0Kr6;ibut1o6;ll0;tab13ul1O;!e;edi2m6pos0rade;a0EeQissi6;on0;leag8on7um6;ni5;el;ue;e6own;an0r6;ic,k;!s;a9e7i6um;ld;erle6f;ad0;ir7nce6plFract0;ll1;m2wI;lebri6o;ty;dBptAr6shi0;e7pe6;nt0;r,t6;ak0;ain;et;aMeLiJlogg0oErBu6;dd0Fild0rgl9siness6;m2p7w6;om2;ers05;ar;i7o6;!k0th0;cklay0de,gadi0;hemi2oge8y6;!frie6;nd;ym2;an;cyc6sR;li5;atbox0ings;by,nk0r6;b0on7te6;nd0;!e07;c04dWge4nQpLrHsFtAu7yatull6;ah;nt7t6;h1oG;!ie;h8t6;e6orney;nda4;ie5le6;te;sis00tron6;aut,om0;chbis8isto7tis6;an,t;crU;hop;ost9p6;ari6rentiS;ti6;on;le;a9cest1im3nou8y6;bo6;dy;nc0;ly5rc6;hi5;mi8v6;entur0is1;er;ni7r6;al;str3;at1;or;counBquaintanArob9t6;ivi5or,re6;ss;st;at;ce;ta4;nt","Adj|Noun":"true¦0:16;a1Db17c0Ud0Re0Mf0Dg0Ah08i06ju05l02mWnUoSpNrIsBt7u4v1watershed;a1ision0Z;gabo4nilla,ria1;b0Vnt;ndergr1pstairs;adua14ou1;nd;a3e1oken,ri0;en,r1;min0rori13;boo,n;age,e5ilv0Flack,o3quat,ta2u1well;bordina0Xper5;b0Lndard;ciali0Yl1vereign;e,ve16;cret,n1ri0;ior;a4e2ou1ubbiL;nd,tiY;ar,bBl0Wnt0p1side11;resent0Vublican;ci0Qsh;a4eriodic0last0Zotenti0r1;emi2incip0o1;!fession0;er,um;rall4st,tie0U;ff1pposi0Hv0;ens0Oi0C;agg01ov1uts;el;a5e3iniatJo1;bi01der07r1;al,t0;di1tr0N;an,um;le,riG;attOi2u1;sh;ber0ght,qC;stice,veniT;de0mpressioYn1;cumbe0Edividu0no0Dsta0Eterim;alf,o1umdrum;bby,melF;en2old,ra1;ph0Bve;er0ious;a7e5i4l3u1;git03t1;ure;uid;ne;llow,m1;aFiL;ir,t,vo1;riOuriO;l3p00x1;c1ecutUpeV;ess;d1iK;er;ar2e1;mographUrivO;k,l2;hiGlassSo2rude,unn1;ing;m5n1operK;creCstitueOte2vertab1;le;mpor1nt;ary;ic,m2p1;anion,lex;er2u1;ni8;ci0;al;e5lank,o4r1;i2u1;te;ef;ttom,urgeois;st;cadem9d6l2ntarct9r1;ab,ct8;e3tern1;at1;ive;rt;oles1ult;ce1;nt;ic","Adj|Past":"true¦0:4Q;1:4C;2:4H;3:4E;a44b3Tc36d2Je29f20g1Wh1Si1Jj1Gkno1Fl1Am15n12o0Xp0Mqu0Kr08sLtEuAv9w4yellow0;a7ea6o4rinkl0;r4u3Y;n,ri0;k31th3;rp0sh0tZ;ari0e1O;n5p4s0;d1li1Rset;cov3derstood,i4;fi0t0;a8e3Rhr7i6ouTr4urn0wi4C;a4imm0ou2G;ck0in0pp0;ed,r0;eat2Qi37;m0nn0r4;get0ni2T;aOcKeIhGimFm0Hoak0pDt7u4;bsid3Ogge44s4;pe4ta2Y;ct0nd0;a8e7i2Eok0r5u4;ff0mp0nn0;ength2Hip4;ed,p0;am0reotyp0;in0t0;eci4ik0oH;al3Efi0;pRul1;a4ock0ut;d0r0;a4c1Jle2t31;l0s3Ut0;a6or5r4;at4e25;ch0;r0tt3;t4ut0;is2Mur1;aEe5o4;tt0;cAdJf2Bg9je2l8m0Knew0p7qu6s4;eTpe2t4;or0ri2;e3Dir0;e1lac0;at0e2Q;i0Rul1;eiv0o4ycl0;mme2Lrd0v3;in0lli0ti2A;a4ot0;li28;aCer30iBlAo9r5u4;mp0zzl0;e6i2Oo4;ce2Fd4lo1Anou30pos0te2v0;uc0;fe1CocCp0Iss0;i2Kli1L;ann0e2CuS;ck0erc0ss0;ck0i2Hr4st0;allLk0;bse7c6pp13rgan2Dver4;lo4whelm0;ok0;cupi0;rv0;aJe5o4;t0uri1A;ed0gle2;a6e5ix0o4ut0ys1N;di1Nt15u26;as0Clt0;n4rk0;ag0ufact0A;e6i5o4;ad0ck0st,v0;cens0m04st0;ft,v4;el0;tt0wn;a5o15u4;dg0s1B;gg0;llumSmpAn4sol1;br0cre1Ldebt0f8jZspir0t5v4;it0olv0;e4ox0Y;gr1n4re23;d0si15;e2l1o1Wuri1;li0o01r4;ov0;a6e1o4um03;ok0r4;ri0Z;mm3rm0;i6r5u4;a1Bid0;a0Ui0Rown;ft0;aAe9i8l6oc0Ir4;a4i0oz0Y;ctHg19m0;avo0Ju4;st3;ni08tt0x0;ar0;d0il0sc4;in1;dCl1mBn9quipp0s8x4;agger1c6p4te0T;a0Se4os0;ct0rie1D;it0;cap0tabliZ;cha0XgFha1As4;ur0;a0Zbarra0N;i0Buc1;aMeDi5r4;a01i0;gni08miniSre2s4;a9c6grun0Ft4;o4re0Hu17;rt0;iplWou4;nt0r4;ag0;bl0;cBdRf9l8p7ra6t5v4;elop0ot0;ail0ermQ;ng0;re07;ay0ight0;e4in0o0M;rr0;ay0enTor1;m5t0z4;ed,zl0;ag0p4;en0;aPeLhIlHo9r6u4;lt4r0stom03;iv1;a5owd0u4;sh0;ck0mp0;d0loAm7n4ok0v3;centr1f5s4troC;id3olid1;us0;b5pl4;ic1;in0;r0ur0;assi9os0utt3;ar5i4;ll0;g0m0;lebr1n6r4;ti4;fi0;tralJ;g0lcul1;aDewild3iCl9o7r5urn4;ed,t;ok4uis0;en;il0r0t4und;tl0;e5i4;nd0;ss0;as0;ffl0k0laMs0tt3;bPcNdKfIg0lFmaz0nDppBrm0ss9u5wa4;rd0;g5thor4;iz0;me4;nt0;o6u4;m0r0;li0re4;ci1;im1ticip1;at0;a5leg0t3;er0;rm0;fe2;ct0;ju5o7va4;nc0;st0;ce4knowledg0;pt0;and5so4;rb0;on0;ed",Singular:"true¦0:5J;1:5H;2:4W;3:4S;4:52;5:57;6:5L;7:56;8:5B;a52b4Lc3Nd35e2Xf2Og2Jh28in24j23k22l1Um1Ln1Ho1Bp0Rqu0Qr0FsZtMuHvCw9x r58yo yo;a9ha3Po3Q;f3i4Rt0Gy9;! arou39;arCeAideo ga2Qo9;cabu4Jl5C;gOr9t;di4Zt1Y;iety,ni4P;nBp30rAs 9;do43s5E;bani1in0;coordinat3Ader9;estima1to24we41; rex,aKeJhHiFoErBuAv9;! show;m2On2rntLto1D;agedy,ib9o4E;e,u9;n0ta46;ni1p2rq3L;c,er,m9;etF;ing9ree26;!y;am,mp3F;ct2le6x return;aNcMeKhor4QiJkHoGpin off,tDuBy9;ll9ner7st4T;ab2X;b9i1n28per bowl,rro1X;st3Ltot0;atAipe2Go1Lrate7udent9;! lo0I;i39u1;ft ser4Lmeo1I;elet5i9;ll,r3V;b38gn2Tte;ab2Jc9min3B;t,urity gua2N;e6ho2Y;bbatic0la3Jndwi0Qpi5;av5eDhetor2iAo9;de6om,w;tAv9;erb2C;e,u0;bDcBf9publ2r10spi1;er9orm3;e6r0;i9ord label;p2Ht0;a1u46;estion mark,ot2F;aPeMhoLiIlGoErAu9yram1F;ddi3HpErpo1Js3J;eBo9;bl3Zs9;pe3Jta1;dic1Rmi1Fp1Qroga8ss relea1F;p9rt0;py;a9ebisci1;q2Dte;cn2eAg9;!gy;!r;ne call,tocoK;anut,dAr9t0yo1;cen3Jsp3K;al,est0;nop4rAt9;e,hog5;adi11i2V;atme0bj3FcBpia1rde0thers,utspok5ve9wn3;n,r9;ti0Pview;cuAe9;an;pi3;arBitAot9umb3;a2Fhi2R;e,ra1;cot2ra8;aFeCiAo9ur0;nopo4p18rni2Nsq1Rti36uld;c,li11n0As9tt5;chief,si34;dAnu,t9;al,i3;al,ic;gna1mm0nd15rsupi0te9yf4;ri0;aDegCiBu9;ddi1n9;ch;me,p09; Be0M;bor14y9; 9er;up;eyno1itt5;el4ourn0;cBdices,itia8ni25sAtel0Lvert9;eb1J;e28titu1;en8i2T;aIeEighDoAu9;man right,s22;me9rmoFsp1Ftb0K;! r9;un; scho0YriY;a9i1N;d9v5; start,pho9;ne;ndful,sh brown,v5ze;aBelat0Ilaci3r9ul4yp1S;an9enadi3id;a1Cd slam,ny;df4r9;l2ni1I;aGeti1HiFlu1oCrAun9;er0;ee market,i9onti3;ga1;l4ur9;so9;me;ePref4;br2mi4;conoFffi7gg,lecto0Rmbas1EnCpidem2s1Zth2venBxAyel9;id;ampZempl0Nte6;i19t;er7terp9;ri9;se;my;eLiEoBr9ump tru0U;agonf4i9;er,ve thru;cAg7i4or,ssi3wn9;side;to0EumenE;aEgniDnn3sAvide9;nd;conte6incen8p9tri11;osi9;ti0C;ta0H;le0X;athBcAf9ni0terre6;ault 05err0;al,im0;!b9;ed;aWeThMiLlJoDr9;edit caBuc9;ib9;le;rd;efficDke,lCmmuniqLnsApi3rr0t0Xus9yo1;in;erv9uI;ato02;ic,lQ;ie6;er7i9oth;e6n2;ty,vil wM;aDeqCick5ocoBr9;istmas car9ysanthemum;ol;la1;ue;ndeli3racteri9;st2;iAllEr9;e0tifica1;liZ;hi3nFpErCt9ucus;erpi9hedr0;ll9;ar;!bohyd9ri3;ra1;it0;aAe,nib0t9;on;l,ry;aMeLiop2leJoHrDu9;nny,r9tterf4;g9i0;la9;ry;eakAi9;ck;fa9throB;st;dy,ro9wl;ugh;mi9;sh;an,l4;nkiArri3;er;ng;cSdMlInFppeti1rDsBtt2utop9;sy;ic;ce6pe9;ct;r9sen0;ay;ecAoma4tiA;ly;do1;i5l9;er7y;gy;en; hominDjAvan9;tage;ec8;ti9;ve;em;cCeAqui9;tt0;ta1;te;iAru0;al;de6;nt","Person|Noun":"true¦a0Eb07c03dWeUfQgOhLjHkiGlFmCnBolive,p7r4s3trini06v1wa0;ng,rd,tts;an,enus,iol0;a,et;ky,onPumm09;ay,e1o0uby;bin,d,se;ed,x;a2e1o0;l,tt04;aLnJ;dYge,tR;at,orm;a0eloW;t0x,ya;!s;a9eo,iH;ng,tP;a2e1o0;lGy;an,w3;de,smi4y;a0erb,iOolBuntR;ll,z0;el;ail,e0iLuy;ne;a1ern,i0lo;elds,nn;ith,n0;ny;a0dEmir,ula,ve;rl;a4e3i1j,ol0;ly;ck,x0;ie;an,ja;i0wn;sy;am,h0liff,rystal;a0in,ristian;mbers,ri0;ty;a4e3i2o,r0ud;an0ook;dy;ll;nedict,rg;k0nks;er;l0rt;fredo,ma","Actor|Verb":"true¦aCb8c5doctor,engineAfool,g3host,judge,m2nerd,p1recruit,scout,ushAvolunteAwi0;mp,tneA;arent,ilot;an,ime;eek,oof,r0uide;adu8oom;ha1o0;ach,nscript,ok;mpion,uffeur;o2u0;lly,tch0;er;ss;ddi1ffili0rchite1;ate;ct",MaleName:"true¦0:H6;1:FZ;2:DS;3:GQ;4:CZ;5:FV;6:GM;7:FP;8:GW;9:ET;A:C2;B:GD;aF8bE1cCQdBMeASfA1g8Yh88i7Uj6Sk6Bl5Mm48n3So3Ip33qu31r26s1Et0Ru0Ov0CwTxSyHzC;aCor0;cChC1karia,nAT;!hDkC;!aF6;!ar7CeF5;aJevgenBSoEuC;en,rFVsCu3FvEF;if,uf;nDs6OusC;ouf,s6N;aCg;s,tC;an,h0;hli,nCrosE1ss09;is,nC;!iBU;avi2ho5;aPeNiDoCyaEL;jcieBJlfgang,odrFutR;lFnC;f8TsC;lCt1;ow;bGey,frEhe4QlC;aE5iCy;am,e,s;ed8iC;d,ed;eAur;i,ndeD2rn2sC;!l9t1;lDyC;l1ne;lDtC;!er;aCHy;aKernDAiFladDoC;jteB0lodymyr;!iC;mFQsDB;cFha0ktBZnceDrgCOvC;a0ek;!nC;t,zo;!e4StBV;lCnC7sily;!entC;in9J;ghE2lCm70nax,ri,sm0;riCyss87;ch,k;aWeRhNiLoGrEuDyC;!l2roEDs1;n6r6E;avD0eCist0oy,um0;ntCRvBKy;bFdAWmCny;!asDmCoharu;aFFie,y;!z;iA6y;mCt4;!my,othy;adEeoDia0SomC;!as;!dor91;!de4;dFrC;enBKrC;anBJeCy;ll,nBI;!dy;dgh,ha,iCnn2req,tsu5V;cDAka;aYcotWeThPiMlobod0oKpenc2tEurDvenAEyCzym1;ed,lvest2;aj,e9V;anFeDuC;!aA;fan17phEQvCwaA;e77ie;!islaCl9;v,w;lom1rBuC;leymaDHta;dDgmu9UlCm1yabonga;as,v8B;!dhart8Yn9;aEeClo75;lCrm0;d1t1;h9Jne,qu1Jun,wn,yne;aDbastiEDk2Yl5Mpp,rgCth,ymoCU;e1Dio;m4n;!tC;!ie,y;eDPlFmEnCq67tosCMul;dCj2UtiA5;e01ro;!iATkeB6mC4u5;!ik,vato9K;aZeUheC8iRoGuDyC;an,ou;b99dDf4peAssC;!elEG;ol00y;an,bLc7MdJel,geIh0lHmGnEry,sDyC;!ce;ar7Ocoe,s;!aCnBU;ld,n;an,eo;a7Ef;l7Jr;e3Eg2n9olfo,riC;go;bBNeDH;cCl9;ar87c86h54kCo;!ey,ie,y;cFeA3gDid,ubByCza;an8Ln06;g85iC;naC6s;ep;ch8Kfa5hHin2je8HlGmFndEoHpha5sDul,wi36yC;an,mo8O;h9Im4;alDSol3O;iD0on;f,ph;ul;e9CinC;cy,t1;aOeLhilJiFrCyoG;aDeC;m,st1;ka85v2O;eDoC;tr;r8GtC;er,ro;!ipCl6H;!p6U;dCLrcy,tC;ar,e9JrC;!o7;b9Udra8So9UscAHtri62ulCv8I;!ie,o7;ctav6Ji2lImHndrBRrGsDtCum6wB;is,to;aDc6k6m0vCwaBE;al79;ma;i,vR;ar,er;aDeksandr,ivC;er,i2;f,v;aNeLguyBiFoCu3O;aDel,j4l0ma0rC;beAm0;h,m;cFels,g5i9EkDlC;es,s;!au,h96l78olaC;!i,y;hCkCol76;ol75;al,d,il,ls1vC;ilAF;hom,tC;e,hC;anCy;!a5i5;aYeViLoGuDyC;l4Nr1;hamDr84staC;fa,p6E;ed,mG;di10e,hamEis4JntDritz,sCussa;es,he;e,y;ad,ed,mC;ad,ed;cGgu5hai,kFlEnDtchC;!e8O;a9Pik;house,o7t1;ae73eC3ha8Iolaj;ah,hDkC;!ey,y;aDeC;al,l;el,l;hDlv3rC;le,ri8Ev4T;di,met;ay0c00gn4hWjd,ks2NlTmadZnSrKsXtDuric7VxC;imilBKwe8B;eHhEi69tCus,y69;!eo,hCia7;ew,i67;eDiC;as,eu,s;us,w;j,o;cHiGkFlEqu8Qsha83tCv3;iCy;!m,n;in,on;el,o7us;a6Yo7us;!elCin,o7us;!l8o;frAEi5Zny,u5;achDcoCik;lm;ai,y;amDdi,e5VmC;oud;adCm6W;ou;aulCi9P;ay;aWeOiMloyd,oJuDyC;le,nd1;cFdEiDkCth2uk;a7e;gi,s,z;ov7Cv6Hw6H;!as,iC;a6Een;g0nn52renDuCvA4we7D;!iS;!zo;am,n4oC;n5r;a9Yevi,la5KnHoFst2thaEvC;eCi;nte;bo;nCpo8V;!a82el,id;!nC;aAy;mEnd1rDsz73urenCwr6K;ce,t;ry,s;ar,beAont;aOeIhalHiFla4onr63rDu5SylC;e,s;istCzysztof;i0oph2;er0ngsl9p,rC;ilA9k,ollos;ed,id;en0iGnDrmCv4Z;it;!dDnCt1;e2Ny;ri4Z;r,th;cp2j4mEna8BrDsp6them,uC;ri;im,l;al,il;a03eXiVoFuC;an,lCst3;en,iC;an,en,o,us;aQeOhKkub4AnIrGsDzC;ef;eDhCi9Wue;!ua;!f,ph;dCge;i,on;!aCny;h,s,th6J;anDnC;!ath6Hie,n72;!nC;!es;!l,sCy;ph;o,qu3;an,mC;!i,m6V;d,ffFns,rCs4;a7JemDmai7QoCry;me,ni1H;i9Dy;!e73rC;ey,y;cKdBkImHrEsDvi2yC;dBs1;on,p2;ed,oDrCv67;e6Qod;d,s61;al,es5Wis1;a,e,oCub;b,v;ob,qu13;aTbNchiMgLke53lija,nuKonut,rIsEtCv0;ai,suC;ki;aDha0i8XmaCsac;el,il;ac,iaC;h,s;a,vinCw3;!g;k,nngu6X;nac1Xor;ka;ai,rahC;im;aReLoIuCyd6;beAgGmFsC;eyDsC;a3e3;in,n;ber5W;h,o;m2raDsse3wC;a5Pie;c49t1K;a0Qct3XiGnDrC;beAman08;dr7VrC;iCy2N;!k,q1R;n0Tt3S;bKlJmza,nIo,rEsDyC;a5KdB;an,s0;lEo67r2IuCv9;hi5Hki,tC;a,o;an,ey;k,s;!im;ib;a08e00iUlenToQrMuCyorgy;iHnFsC;!taC;f,vC;!e,o;n6tC;er,h2;do,lC;herDlC;auCerQ;me;aEegCov2;!g,orC;!io,y;dy,h7C;dfr9nza3XrDttfC;ri6C;an,d47;!n;acoGlEno,oCuseppe;rgiCvan6O;!o,s;be6Ies,lC;es;mo;oFrC;aDha4HrC;it,y;ld,rd8;ffErgC;!e7iCy;!os;!r9;bElBrCv3;eCla1Nr4Hth,y;th;e,rC;e3YielC;!i4;aXeSiQlOorrest,rCyod2E;aHedFiC;edDtC;s,z;ri18;!d42eri11riC;ck,k;nCs2;cEkC;ie,lC;in,yn;esLisC;!co,z3M;etch2oC;ri0yd;d5lConn;ip;deriFliEng,rC;dinaCg4nan0B;nd8;pe,x;co;bCdi,hd;iEriC;ce,zC;io;an,en,o;benez2dZfrYit0lTmMnJo3rFsteb0th0ugenEvCymBzra;an,eCge4D;ns,re3K;!e;gi,iDnCrol,v3w3;est8ie,st;cCk;!h,k;o0DriCzo;co,qC;ue;aHerGiDmC;aGe3A;lCrh0;!iC;a10o,s;s1y;nu5;beAd1iEliDm2t1viCwood;n,s;ot28s;!as,j5Hot,sC;ha;a3en;!dGg6mFoDua2QwC;a2Pin;arC;do;oZuZ;ie;a04eTiOmitrNoFrag0uEwDylC;an,l0;ay3Hig4D;a3Gdl9nc0st3;minFnDri0ugCvydGy2S;!lF;!a36nCov0;e1Eie,y;go,iDykC;as;cCk;!k;i,y;armuFetDll1mitri7neCon,rk;sh;er,m6riC;ch;id;andLepak,j0lbeAmetri4nIon,rGsEvDwCxt2;ay30ey;en,in;hawn,moC;nd;ek,riC;ck;is,nC;is,y;rt;re;an,le,mKnIrEvC;e,iC;!d;en,iEne0PrCyl;eCin,yl;l45n;n,o,us;!iCny;el,lo;iCon;an,en,on;a0Fe0Ch03iar0lRoJrFuDyrC;il,us;rtC;!is;aEistC;iaCob12;no;ig;dy,lInErC;ey,neliCy;s,us;nEor,rDstaC;nt3;ad;or;by,e,in,l3t1;aHeEiCyde;fCnt,ve;fo0Xt1;menDt4;us;s,t;rFuDyC;!t1;dCs;e,io;enC;ce;aHeGrisC;!toC;phCs;!eC;!r;st2t;d,rCs;b5leC;s,y;cDdrCs6;ic;il;lHmFrC;ey,lDroCy;ll;!o7t1;er1iC;lo;!eb,v3;a09eZiVjorn,laUoSrEuCyr1;ddy,rtKst2;er;aKeFiEuDyC;an,ce,on;ce,no;an,ce;nDtC;!t;dDtC;!on;an,on;dFnC;dDisC;lav;en,on;!foOl9y;bby,gd0rCyd;is;i0Lke;bElDshC;al;al,lL;ek;nIrCshoi;at,nEtC;!raC;m,nd;aDhaCie;rd;rd8;!iDjam3nCs1;ie,y;to;kaMlazs,nHrC;n9rDtC;!holomew;eCy;tt;ey;dCeD;ar,iC;le;ar1Nb1Dd16fon15gust3hm12i0Zja0Yl0Bm07nTputsiSrGsaFugustEveDyCziz;a0kh0;ry;o,us;hi;aMchiKiJjun,mHnEon,tCy0;em,hCie,ur8;ur;aDoC;!ld;ud,v;aCin;an,nd8;!el,ki;baCe;ld;ta;aq;aMdHgel8tCw6;hoFoC;iDnC;!i8y;ne;ny;er7rCy;eDzC;ej;!as,i,j,s,w;!s;s,tolC;iCy;!y;ar,iEmaCos;nu5r;el;ne,r,t;aVbSdBeJfHiGl01onFphonsEt1vC;aPin;on;e,o;so,zo;!sR;!onZrC;ed;c,jaHksFssaHxC;!andC;er,rC;e,os,u;andCei;ar,er,r;ndC;ro;en;eDrecC;ht;rt8;dd3in,n,sC;taC;ir;ni;dDm6;ar;an,en;ad,eC;d,t;in;so;aGi,olErDvC;ik;ian8;f8ph;!o;mCn;!a;dGeFraDuC;!bakr,lfazl;hCm;am;!l;allFel,oulaye,ulC;!lDrahm0;an;ah,o;ah;av,on",Uncountable:"true¦0:2E;1:2L;2:33;a2Ub2Lc29d22e1Rf1Ng1Eh16i11j0Yk0Wl0Rm0Hn0Do0Cp03rZsLt9uran2Jv7w3you gu0E;a5his17i4oo3;d,l;ldlife,ne;rm8t1;apor,ernacul29i3;neg28ol1Otae;eDhBiAo8r4un3yranny;a,gst1B;aff2Oea1Ko4ue nor3;th;o08u3;bleshoot2Ose1Tt;night,othpas1Vwn3;foEsfoE;me off,n;er3und1;e,mod2S;a,nnis;aDcCeBhAi9ki8o7p6t4u3weepstak0;g1Unshi2Hshi;ati08e3;am,el;ace2Keci0;ap,cc1meth2C;n,ttl0;lk;eep,ingl0or1C;lf,na1Gri0;ene1Kisso1C;d0Wfe2l4nd,t3;i0Iurn;m1Ut;abi0e4ic3;e,ke15;c3i01laxa11search;ogni10rea10;a9e8hys7luto,o5re3ut2;amble,mis0s3ten20;en1Zs0L;l3rk;i28l0EyH; 16i28;a24tr0F;nt3ti0M;i0s;bstetri24vercrowd1Qxyg09;a5e4owada3utella;ys;ptu1Ows;il poliZtional securi2;aAe8o5u3;m3s1H;ps;n3o1K;ey,o3;gamy;a3cha0Elancholy,rchandi1Htallurgy;sl0t;chine3g1Aj1Hrs,thema1Q; learn1Cry;aught1e6i5ogi4u3;ck,g12;c,s1M;ce,ghtn18nguis1LteratWv1;ath1isVss;ara0EindergartPn3;icke0Aowled0Y;e3upit1;a3llyfiGwel0G;ns;ce,gnor6mp5n3;forma00ter3;net,sta07;atiSort3rov;an18;a7e6isto09o3ung1;ckey,mework,ne4o3rseradi8spitali2use arrest;ky;s2y;adquarteXre;ir,libut,ppiHs3;hi3te;sh;ene8l6o5r3um,ymnas11;a3eZ;niUss;lf,re;ut3yce0F;en; 3ti0W;edit0Hpo3;ol;aNicFlour,o4urnit3;ure;od,rgive3uri1wl;ness;arCcono0LducaBlectr9n7quip8thi0Pvery6x3;ist4per3;ti0B;en0J;body,o08th07;joy3tertain3;ment;ici2o3;ni0H;tiS;nings,th;emi02i6o4raugh3ynas2;ts;pe,wnstai3;rs;abet0ce,s3;honZrepu3;te;aDelciChAivi07l8o3urrency;al,ld w6mmenta5n3ral,ttIuscoB;fusiHt 3;ed;ry;ar;assi01oth0;es;aos,e3;eMwK;us;d,rO;a8i6lood,owlHread5u3;ntGtt1;er;!th;lliarJs3;on;g3ss;ga3;ge;cKdviJeroGirFmBn6ppeal court,r4spi3thleL;rin;ithmet3sen3;ic;i6y3;o4th3;ing;ne;se;en5n3;es2;ty;ds;craft;bi8d3nau7;yna3;mi6;ce;id,ous3;ti3;cs",Infinitive:"true¦0:9G;1:9T;2:AD;3:90;4:9Z;5:84;6:AH;7:A9;8:92;9:A0;A:AG;B:AI;C:9V;D:8R;E:8O;F:97;G:6H;H:7D;a94b8Hc7Jd68e4Zf4Mg4Gh4Ai3Qj3Nk3Kl3Bm34nou48o2Vp2Equ2Dr1Es0CtZuTvRwI;aOeNiLors5rI;eJiI;ng,te;ak,st3;d5e8TthI;draw,er;a2d,ep;i2ke,nIrn;d1t;aIie;liADniAry;nJpI;ho8Llift;cov1dJear8Hfound8DlIplug,rav82tie,ve94;eaAo3X;erIo;cut,go,staAFvalA3w2G;aSeQhNoMrIu73;aIe72;ffi3Smp3nsI;aBfo7CpI;i8oD;pp3ugh5;aJiJrIwaD;eat5i2;nk;aImA0;ch,se;ck3ilor,keImp1r8L;! paD;a0Ic0He0Fh0Bi0Al08mugg3n07o05p02qu01tUuLwI;aJeeIim;p,t5;ll7Wy;bNccMffLggeCmmKppJrI;mouFpa6Zvi2;o0re6Y;ari0on;er,i4;e7Numb;li9KmJsiIveD;de,st;er9it;aMe8MiKrI;ang3eIi2;ng27w;fIng;f5le;b,gg1rI;t3ve;a4AiA;a4UeJit,l7DoI;il,of;ak,nd;lIot7Kw;icEve;atGeak,i0O;aIi6;m,y;ft,ng,t;aKi6CoJriIun;nk,v6Q;ot,rt5;ke,rp5tt1;eIll,nd,que8Gv1w;!k,m;aven9ul8W;dd5tis1Iy;a0FeKiJoI;am,t,ut;d,p5;a0Ab08c06d05f01group,hea00iZjoi4lXmWnVpTq3MsOtMup,vI;amp,eJiIo3B;sEve;l,rI;e,t;i8rI;ie2ofE;eLiKpo8PtIurfa4;o24rI;aHiBuctu8;de,gn,st;mb3nt;el,hra0lIreseF;a4e71;d1ew,o07;aHe3Fo2;a7eFiIo6Jy;e2nq41ve;mbur0nf38;r0t;inKleBocus,rJuI;el,rbiA;aBeA;an4e;aBu4;ei2k8Bla43oIyc3;gni39nci3up,v1;oot,uI;ff;ct,d,liIp;se,ze;tt3viA;aAenGit,o7;aWerUinpoiFlumm1LoTrLuI;b47ke,niArIt;poDsuI;aFe;eMoI;cKd,fe4XhibEmo7noJpo0sp1tru6vI;e,i6o5L;un4;la3Nu8;aGclu6dJf1occupy,sup0JvI;a6BeF;etermi4TiB;aGllu7rtr5Ksse4Q;cei2fo4NiAmea7plex,sIva6;eve8iCua6;mp1rItrol,ve;a6It6E;bOccuNmEpMutLverIwe;l07sJtu6Yu0wI;helm;ee,h1F;gr5Cnu2Cpa4;era7i4Ipo0;py,r;ey,seItaH;r2ss;aMe0ViJoIultiply;leCu6Pw;micJnIspla4;ce,g3us;!k;iIke,na9;m,ntaH;aPeLiIo0u3N;ke,ng1quIv5;eIi6S;fy;aKnIss5;d,gI;th5;rn,ve;ng2Gu1N;eep,idnJnI;e4Cow;ap;oHuI;gg3xtaI;po0;gno8mVnIrk;cTdRfQgeChPitia7ju8q1CsNtKun6EvI;a6eIo11;nt,rt,st;erJimi6BoxiPrI;odu4u6;aBn,pr03ru6C;iCpi8tIu8;all,il,ruB;abEibE;eCo3Eu0;iIul9;ca7;i7lu6;b5Xmer0pI;aLer4Uin9ly,oJrI;e3Ais6Bo2;rt,se,veI;riA;le,rt;aLeKiIoiCuD;de,jaInd1;ck;ar,iT;mp1ng,pp5raIve;ng5Mss;ath1et,iMle27oLrI;aJeIow;et;b,pp3ze;!ve5A;gg3ve;aTer45i5RlSorMrJuI;lf4Cndrai0r48;eJiIolic;ght5;e0Qsh5;b3XeLfeEgJsI;a3Dee;eIi2;!t;clo0go,shIwa4Z;ad3F;att1ee,i36;lt1st5;a0OdEl0Mm0FnXquip,rWsVtGvTxI;aRcPeDhOiNpJtIu6;ing0Yol;eKi8lIo0un9;aHoI;it,re;ct,di7l;st,t;a3oDu3B;e30lI;a10u6;lt,mi28;alua7oI;ke,l2;chew,pou0tab19;a0u4U;aYcVdTfSgQhan4joy,lPqOrNsuMtKvI;e0YisI;a9i50;er,i4rI;aHenGuC;e,re;iGol0F;ui8;ar9iC;a9eIra2ulf;nd1;or4;ang1oIu8;r0w;irc3lo0ou0ErJuI;mb1;oaGy4D;b3ct;bKer9pI;hasiIow1;ze;aKody,rI;a4oiI;d1l;lm,rk;ap0eBuI;ci40de;rIt;ma0Rn;a0Re04iKo,rIwind3;aw,ed9oI;wn;agno0e,ff1g,mi2Kne,sLvI;eIul9;rIst;ge,t;aWbVcQlod9mant3pNru3TsMtI;iIoDu37;lJngI;uiA;!l;ol2ua6;eJlIo0ro2;a4ea0;n0r0;a2Xe36lKoIu0S;uIv1;ra9;aIo0;im;a3Kur0;b3rm;af5b01cVduBep5fUliTmQnOpMrLsiCtaGvI;eIol2;lop;ch;a20i2;aDiBloIoD;re,y;oIy;te,un4;eJoI;liA;an;mEv1;a4i0Ao06raud,y;ei2iMla8oKrI;ee,yI;!pt;de,mIup3;missi34po0;de,ma7ph1;aJrief,uI;g,nk;rk;mp5rk5uF;a0Dea0h0Ai09l08oKrIurta1G;a2ea7ipp3uI;mb3;ales4e04habEinci6ll03m00nIrro6;cXdUfQju8no7qu1sLtKvI;eIin4;ne,r9y;aHin2Bribu7;er2iLoli2Epi8tJuI;lt,me;itu7raH;in;d1st;eKiJoIroFu0;rm;de,gu8rm;ss;eJoI;ne;mn,n0;eIlu6ur;al,i2;buCe,men4pI;eIi3ly;l,te;eBi6u6;r4xiC;ean0iT;rcumveFte;eJirp,oI;o0p;riAw;ncIre5t1ulk;el;a02eSi6lQoPrKuI;iXrIy;st,y;aLeaKiJoad5;en;ng;stfeLtX;ke;il,l11mba0WrrMth1;eIow;ed;!coQfrie1LgPhMliLqueaKstJtrIwild1;ay;ow;th;e2tt3;a2eJoI;ld;ad;!in,ui3;me;bysEckfi8ff3tI;he;b15c0Rd0Iff0Ggree,l0Cm09n03ppZrXsQttOuMvJwaE;it;eDoI;id;rt;gIto0X;meF;aIeCraB;ch,in;pi8sJtoI;niA;aKeIi04u8;mb3rt,ss;le;il;re;g0Hi0ou0rI;an9i2;eaKly,oiFrI;ai0o2;nt;r,se;aMi0GnJtI;icipa7;eJoIul;un4y;al;ly0;aJu0;se;lga08ze;iKlI;e9oIu6;t,w;gn;ix,oI;rd;a03jNmiKoJsoI;rb;pt,rn;niIt;st1;er;ouJuC;st;rn;cLhie2knowled9quiItiva7;es4re;ce;ge;eQliOoKrJusI;e,tom;ue;mIst;moJpI;any,liA;da7;ma7;te;pt;andPduBet,i6oKsI;coKol2;ve;liArt,uI;nd;sh;de;ct;on",Person:"true¦0:1Q;a29b1Zc1Md1Ee18f15g13h0Ri0Qj0Nk0Jl0Gm09n06o05p00rPsItCusain bolt,v9w4xzibit,y1;anni,oko on2uji,v1;an,es;en,o;a3ednesday adams,i2o1;lfram,o0Q;ll ferrell,z khalifa;lt disn1Qr1;hol,r0G;a2i1oltai06;n dies0Zrginia wo17;lentino rossi,n goG;a4h3i2ripp,u1yra banks;lZpac shakur;ger woods,mba07;eresa may,or;kashi,t1ylor;um,ya1B;a5carlett johanss0h4i3lobodan milosevic,no2ocr1Lpider1uperm0Fwami; m0Em0E;op dogg,w whi1H;egfried,nbad;akespeaTerlock holm1Sia labeouf;ddam hussa16nt1;a cla11ig9;aAe6i5o3u1za;mi,n dmc,paul,sh limbau1;gh;bin hood,d stew16nald1thko;in0Mo;han0Yngo starr,valdo;ese witherspo0i1mbrandt;ll2nh1;old;ey,y;chmaninoff,ffi,iJshid,y roma1H;a4e3i2la16o1uff daddy;cahont0Ie;lar,p19;le,rZ;lm17ris hilt0;leg,prah winfr0Sra;a2e1iles cra1Bostradam0J; yo,l5tt06wmQ;pole0s;a5e4i2o1ubar03;by,lie5net,rriss0N;randa ju1tt romn0M;ly;rl0GssiaB;cklemo1rkov,s0ta hari,ya angelou;re;ady gaga,e1ibera0Pu;bron jam0Xch wale1e;sa;anye west,e3i1obe bryant;d cudi,efer suther1;la0P;ats,sha;a2effers0fk,k rowling,rr tolki1;en;ck the ripp0Mwaharlal nehru,y z;liTnez,ron m7;a7e5i3u1;lk hog5mphrey1sa01;! bog05;l1tl0H;de; m1dwig,nry 4;an;ile selassFlle ber4m3rrison1;! 1;ford;id,mo09;ry;ast0iannis,o1;odwPtye;ergus0lorence nightinga08r1;an1ederic chopN;s,z;ff5m2nya,ustaXzeki1;el;eril lagasse,i1;le zatop1nem;ek;ie;a6e4i2octor w1rake;ho;ck w1ego maradoC;olf;g1mi lovaOnzel washingt0;as;l1nHrth vadR;ai lNt0;a8h5lint0o1thulhu;n1olio;an,fuci1;us;on;aucKop2ristian baMy1;na;in;millo,ptain beefhe4r1;dinal wols2son1;! palmF;ey;art;a8e5hatt,i3oHro1;ck,n1;te;ll g1ng crosby;atB;ck,nazir bhut2rtil,yon1;ce;to;nksy,rack ob1;ama;l 6r3shton kutch2vril lavig8yn ra1;nd;er;chimed2istot1;le;es;capo2paci1;no;ne",Adjective:"true¦0:AI;1:BS;2:BI;3:BA;4:A8;5:84;6:AV;7:AN;8:AF;9:7H;A:BQ;B:AY;C:BC;D:BH;E:9Y;aA2b9Ec8Fd7We79f6Ng6Eh61i4Xj4Wk4Tl4Im41n3Po36p2Oquart7Pr2Ds1Dt14uSvOwFye29;aMeKhIiHoF;man5oFrth7G;dADzy;despreB1n w97s86;acked1UoleF;!sa6;ather1PeFll o70ste1D;!k5;nt1Ist6Ate4;aHeGiFola5T;bBUce versa,gi3Lle;ng67rsa5R;ca1gBSluAV;lt0PnLpHrGsFttermoBL;ef9Ku3;b96ge1; Hb32pGsFtiAH;ca6ide d4R;er,i85;f52to da2;a0Fbeco0Hc0Bd04e02f01gu1XheaBGiXkn4OmUnTopp06pRrNsJtHus0wF;aFiel3K;nt0rra0P;app0eXoF;ld,uS;eHi37o5ApGuF;perv06spec39;e1ok9O;en,ttl0;eFu5;cogn06gul2RlGqu84sF;erv0olv0;at0en33;aFrecede0E;id,rallel0;am0otic0;aFet;rri0tF;ch0;nFq26vers3;sur0terFv7U;eFrupt0;st0;air,inish0orese98;mploy0n7Ov97xpF;ect0lain0;eHisFocume01ue;clFput0;os0;cid0rF;!a8Scov9ha8Jlyi8nea8Gprivileg0sMwF;aFei9I;t9y;hGircumcFonvin2U;is0;aFeck0;lleng0rt0;b20ppea85ssuGttend0uthorF;iz0;mi8;i4Ara;aLeIhoHip 25oGrF;anspare1encha1i2;geth9leADp notch,rpB;rny,ugh6H;ena8DmpGrFs6U;r49tia4;eCo8P;leFst4M;nt0;a0Dc09e07h06i04ki03l01mug,nobbi4XoVpRqueami4XtKuFymb94;bHccinAi generis,pFr5;erFre7N;! dup9b,vi70;du0li7Lp6IsFurb7J;eq9Atanda9X;aKeJi16o2QrGubboFy4Q;rn;aightFin5GungS; fFfF;or7V;adfa9Pri6;lwa6Ftu82;arHeGir6NlendBot Fry;on;c3Qe1S;k5se; call0lImb9phistic16rHuFviV;ndFth1B;proof;dBry;dFub6; o2A;e60ipF;pe4shod;ll0n d7R;g2HnF;ceEg6ist9;am3Se9;co1Zem5lfFn6Are7; suf4Xi43;aGholFient3A;ar5;rlFt4A;et;cr0me,tisfac7F;aOeIheumatoBiGoF;bu8Ztt7Gy3;ghtFv3; 1Sf6X;cJdu8PlInown0pro69sGtF;ard0;is47oF;lu2na1;e1Suc45;alcit8Xe1ondi2;bBci3mpa1;aSePicayu7laOoNrGuF;bl7Tnjabi;eKiIoF;b7VfGmi49pFxi2M;er,ort81;a7uD;maFor,sti7va2;!ry;ciDexis0Ima2CpaB;in55puli8G;cBid;ac2Ynt 3IrFti2;ma40tFv7W;!i3Z;i2YrFss7R;anoBtF; 5XiF;al,s5V;bSffQkPld OnMrLth9utKverF;!aIbMdHhGni75seas,t,wF;ei74rou74;a63e7A;ue;ll;do1Ger,si6A;d3Qg2Aotu5Z; bFbFe on o7g3Uli7;oa80;fashion0school;!ay; gua7XbFha5Uli7;eat;eHligGsF;ce7er0So1C;at0;diFse;a1e1;aOeNiMoGuF;anc0de; moEnHrthFt6V;!eFwe7L;a7Krn;chaGdescri7Iprof30sF;top;la1;ght5;arby,cessa4ighbor5wlyw0xt;k0usiaFv3;ti8;aQeNiLoHuF;dIltiF;facet0p6;deHlGnFot,rbBst;ochro4Xth5;dy;rn,st;ddle ag0nF;dbloZi,or;ag9diocEga,naGrFtropolit4Q;e,ry;ci8;cIgenta,inHj0Fkeshift,mmGnFri4Oscu61ver18;da5Dy;ali4Lo4U;!stream;abEho;aOeLiIoFumberi8;ngFuti1R;stan3RtF;erm,i4H;ghtGteraF;l,ry,te;heart0wei5O;ft JgFss9th3;al,eFi0M;nda4;nguBps0te5;apGind5noF;wi8;ut;ad0itte4uniW;ce co0Hgno6Mll0Cm04nHpso 2UrF;a2releF;va1; ZaYcoWdReQfOgrNhibi4Ri05nMoLsHtFvalu5M;aAeF;nDrdepe2K;a7iGolFuboI;ub6ve1;de,gF;nifica1;rdi5N;a2er;own;eriIiLluenVrF;ar0eq5H;pt,rt;eHiGoFul1O;or;e,reA;fiFpe26termi5E;ni2;mpFnsideCrreA;le2;ccuCdeq5Ene,ppr4J;fFsitu,vitro;ro1;mJpF;arHeGl15oFrop9;li2r11;n2LrfeA;ti3;aGeFi18;d4BnD;tuE;egGiF;c0YteC;al,iF;tiF;ma2;ld;aOelNiLoFuma7;a4meInHrrGsFur5;ti6;if4E;e58o3U; ma3GsF;ick;ghfalut2HspF;an49;li00pf33;i4llow0ndGrdFtM; 05coEworki8;sy,y;aLener44iga3Blob3oKrGuF;il1Nng ho;aFea1Fizzl0;cGtF;ef2Vis;ef2U;ld3Aod;iFuc2D;nf2R;aVeSiQlOoJrF;aGeFil5ug3;q43tf2O;gFnt3S;i6ra1;lk13oHrF; keeps,eFge0Vm9tu41;g0Ei2Ds3R;liF;sh;ag4Mowe4uF;e1or45;e4nF;al,i2;d Gmini7rF;ti6ve1;up;bl0lDmIr Fst pac0ux;oGreacF;hi8;ff;ed,ili0R;aXfVlTmQnOqu3rMthere3veryday,xF;aApIquisi2traHuF;be48lF;ta1;!va2L;edRlF;icF;it;eAstF;whi6; Famor0ough,tiE;rou2sui2;erGiF;ne1;ge1;dFe2Aoq34;er5;ficF;ie1;g9sF;t,ygF;oi8;er;aWeMiHoGrFue;ea4owY;ci6mina1ne,r31ti8ubQ;dact2Jfficult,m,sGverF;ge1se;creGePjoi1paCtF;a1inA;et,te; Nadp0WceMfiLgeneCliJmuEpeIreliAsGvoF;id,ut;pFtitu2ul1L;eCoF;nde1;ca2ghF;tf13;a1ni2;as0;facto;i5ngero0I;ar0Ce09h07i06l05oOrIuF;rmudgeon5stoma4teF;sy;ly;aIeHu1EystalF; cleFli7;ar;epy;fFv17z0;ty;erUgTloSmPnGrpoCunterclVveFy;rt;cLdJgr21jIsHtrF;aFi2;dic0Yry;eq1Yta1;oi1ug3;escenFuN;di8;a1QeFiD;it0;atoDmensuCpF;ass1SulF;so4;ni3ss3;e1niza1;ci1J;ockwiD;rcumspeAvil;eFintzy;e4wy;leGrtaF;in;ba2;diac,ef00;a00ePiLliJoGrFuck nak0;and new,isk,on22;gGldface,naF; fi05fi05;us;nd,tF;he;gGpartisFzarE;an;tiF;me;autifOhiNlLnHsFyoN;iWtselF;li8;eGiFt;gn;aFfi03;th;at0oF;v0w;nd;ul;ckwards,rF;e,rT; priori,b13c0Zd0Tf0Ng0Ihe0Hl09mp6nt06pZrTsQttracti0MuLvIwF;aGkF;wa1B;ke,re;ant garGeraF;ge;de;diIsteEtF;heFoimmu7;nt07;re;to4;hGlFtu2;eep;en;bitIchiv3roHtF;ifiFsy;ci3;ga1;ra4;ry;pFt;aHetizi8rF;oprF;ia2;llFre1;ed,i8;ng;iquFsy;at0e;ed;cohKiJkaHl,oGriFterX;ght;ne,of;li7;ne;ke,ve;olF;ic;ad;ain07gressiIi6rF;eeF;ab6;le;ve;fGraB;id;ectGlF;ue1;ioF;na2; JaIeGvF;erD;pt,qF;ua2;ma1;hoc,infinitum;cuCquiGtu3u2;al;esce1;ra2;erSjeAlPoNrKsGuF;nda1;e1olu2trF;aAuD;se;te;eaGuF;pt;st;aFve;rd;aFe;ze;ct;ra1;nt",Pronoun:"true¦elle,h3i2me,she,th0us,we,you;e0ou;e,m,y;!l,t;e,im",Preposition:"true¦aPbMcLdKexcept,fIinGmid,notwithstandiWoDpXqua,sCt7u4v2w0;/o,hereSith0;! whHin,oW;ersus,i0;a,s a vis;n1p0;!on;like,til;h1ill,oward0;!s;an,ereby,r0;ough0u;!oM;ans,ince,o that,uch G;f1n0ut;!to;!f;! 0to;effect,part;or,r0;om;espite,own,u3;hez,irca;ar1e0oBy;sides,tween;ri7;bo8cross,ft7lo6m4propos,round,s1t0;!op;! 0;a whole,long 0;as;id0ong0;!st;ng;er;ut",SportsTeam:"true¦0:18;1:1E;2:1D;3:14;a1Db15c0Sd0Kfc dallas,g0Ihouston 0Hindiana0Gjacksonville jagua0k0El0Am01new UoRpKqueens parkJreal salt lake,sBt6utah jazz,vancouver whitecaps,w4yW;ashington 4h10;natio1Mredski2wizar0W;ampa bay 7e6o4;ronto 4ttenham hotspur;blue ja0Mrapto0;nnessee tita2xasD;buccanee0ra0K;a8eattle 6porting kansas0Wt4; louis 4oke0V;c1Drams;marine0s4;eah13ounH;cramento Rn 4;antonio spu0diego 4francisco gJjose earthquak1;char08paB; ran07;a9h6ittsburgh 5ortland t4;imbe0rail blaze0;pirat1steele0;il4oenix su2;adelphia 4li1;eagl1philNunE;dr1;akland 4klahoma city thunder,rlando magic;athle0Lrai4;de0;england 8orleans 7york 4;g5je3knYme3red bul0Xy4;anke1;ian3;pelica2sain3;patrio3revolut4;ion;anchEeAi4ontreal impact;ami 8lwaukee b7nnesota 4;t5vi4;kings;imberwolv1wi2;rewe0uc0J;dolphi2heat,marli2;mphis grizz4ts;li1;a6eic5os angeles 4;clippe0dodFlaB;esterV; galaxy,ke0;ansas city 4nF;chiefs,roya0D; pace0polis col3;astr05dynamo,rocke3texa2;olden state warrio0reen bay pac4;ke0;allas 8e4i04od6;nver 6troit 4;lio2pisto2ti4;ge0;broncYnugge3;cowbo5maver4;icZ;ys;arEelLhAincinnati 8leveland 6ol4;orado r4umbus crew sc;api7ocki1;brow2cavalie0guar4in4;dia2;bengaVre4;ds;arlotte horAicago 4;b5cubs,fire,wh4;iteB;ea0ulQ;diff4olina panthe0; city;altimore Alackburn rove0oston 6rooklyn 4uffalo bilN;ne3;ts;cel5red4; sox;tics;rs;oriol1rave2;rizona Ast8tlanta 4;brav1falco2h4;awA;ns;es;on villa,r4;os;c6di4;amondbac4;ks;ardi4;na4;ls",Unit:"true¦a07b04cXdWexVfTgRhePinYjoule0BkMlJmDnan08oCp9quart0Bsq ft,t7volts,w6y2ze3°1µ0;g,s;c,f,n;dVear1o0;ttR; 0s 0;old;att,b;erNon0;!ne02;ascals,e1i0;cXnt00;rcent,tJ;hms,unceY;/s,e4i0m²,²,³;/h,cro2l0;e0liK;!²;grLsR;gCtJ;it1u0;menQx;erPreP;b5elvins,ilo1m0notO;/h,ph,²;!byGgrEmCs;ct0rtzL;aJogrC;allonJb0ig3rB;ps;a0emtEl oz,t4;hrenheit,radG;aby9;eci3m1;aratDe1m0oulombD;²,³;lsius,nti0;gr2lit1m0;et0;er8;am7;b1y0;te5;l,ps;c2tt0;os0;econd1;re0;!s","Noun|Gerund":"true¦0:3O;1:3M;2:3N;3:3D;4:32;5:2V;6:3E;7:3K;8:36;9:3J;A:3B;a3Pb37c2Jd27e23f1Vg1Sh1Mi1Ij1Gk1Dl18m13n11o0Wp0Pques0Sr0EsTtNunderMvKwFyDzB;eroi0oB;ni0o3P;aw2eB;ar2l3;aEed4hispe5i5oCrB;ap8est3i1;n0ErB;ki0r31;i1r2s9tc9;isualizi0oB;lunt1Vti0;stan4ta6;aFeDhin6iCraBy8;c6di0i2vel1M;mi0p8;aBs1;c9si0;l6n2s1;aUcReQhOiMkatKl2Wmo6nowJpeItFuCwB;ea5im37;b35f0FrB;fi0vB;e2Mi2J;aAoryt1KrCuB;d2KfS;etc9ugg3;l3n4;bCi0;ebBi0;oar4;gnBnAt1;a3i0;ip8oB;p8rte2u1;a1r27t1;hCo5reBulp1;a2Qe2;edu3oo3;i3yi0;aKeEi4oCuB;li0n2;oBwi0;fi0;aFcEhear7laxi0nDpor1sB;pon4tructB;r2Iu5;de5;or4yc3;di0so2;p8ti0;aFeacek20laEoCrBublis9;a1Teten4in1oces7;iso2siB;tio2;n2yi0;ckaAin1rB;ki0t1O;fEpeDrganiCvB;erco24ula1;si0zi0;ni0ra1;fe5;avi0QeBur7;gotia1twor6;aDeCi2oB;de3nito5;a2dita1e1ssaA;int0XnBrke1;ifUufactu5;aEeaDiBodAyi0;cen7f1mi1stB;e2i0;r2si0;n4ug9;iCnB;ea4it1;c6l3;ogAuB;dAgg3stif12;ci0llust0VmDnBro2;nova1sp0NterBven1;ac1vie02;agi2plo4;aDea1iCoBun1;l4w3;ki0ri0;nd3rB;roWvB;es1;aCene0Lli4rBui4;ee1ie0N;rde2the5;aHeGiDlCorBros1un4;e0Pmat1;ir1oo4;gh1lCnBs9;anZdi0;i0li0;e3nX;r0Zscina1;a1du01nCxB;erci7plo5;chan1di0ginB;ee5;aLeHiGoub1rCum8wB;el3;aDeCiB;bb3n6vi0;a0Qs7;wi0;rTscoDvi0;ba1coZlBvelo8;eCiB;ve5;ga1;nGti0;aVelebUhSlPoDrBur3yc3;aBos7yi0;f1w3;aLdi0lJmFnBo6pi0ve5;dDsCvinB;ci0;trBul1;uc1;muniDpB;lBo7;ai2;ca1;lBo5;ec1;c9ti0;ap8eaCimToBubT;ni0t9;ni0ri0;aBee5;n1t1;ra1;m8rCs1te5;ri0;vi0;aPeNitMlLoGrDuB;dge1il4llBr8;yi0;an4eat9oadB;cas1;di0;a1mEokB;i0kB;ee8;pi0;bi0;es7oa1;c9i0;gin2lonAt1;gi0;bysit1c6ki0tt3;li0;ki0;bando2cGdverti7gi0pproac9rgDssuCtB;trac1;mi0;ui0;hi0;si0;coun1ti0;ti0;ni0;ng",PhrasalVerb:"true¦0:92;1:96;2:8H;3:8V;4:8A;5:83;6:85;7:98;8:90;9:8G;A:8X;B:8R;C:8U;D:8S;E:70;F:97;G:8Y;H:81;I:7H;J:79;a9Fb7Uc6Rd6Le6Jf5Ig50h4Biron0j47k40l3Em31n2Yo2Wp2Cquiet Hr1Xs0KtZuXvacuu6QwNyammerBzK;ero Dip LonK;e0k0;by,ov9up;aQeMhLiKor0Mrit19;mp0n3Fpe0r5s5;ackAeel Di0S;aLiKn33;gh 3Wrd0;n Dr K;do1in,oJ;it 79k5lk Lrm 69sh Kt83v60;aw3do1o7up;aw3in,oC;rgeBsK;e 2herE;a00eYhViRoQrMuKypP;ckErn K;do1in,oJup;aLiKot0y 30;ckl7Zp F;ck HdK;e 5Y;n7Wp 3Es5K;ck MdLe Kghten 6me0p o0Rre0;aw3ba4do1in,up;e Iy 2;by,oG;ink Lrow K;aw3ba4in,up;ba4ov9up;aKe 77ll62;m 2r 5M;ckBke Llk K;ov9shit,u47;aKba4do1in,leave,o4Dup;ba4ft9pa69w3;a0Vc0Te0Mh0Ii0Fl09m08n07o06p01quar5GtQuOwK;earMiK;ngLtch K;aw3ba4o8K; by;cKi6Bm 2ss0;k 64;aReQiPoNrKud35;aigh2Det75iK;ke 7Sng K;al6Yup;p Krm2F;by,in,oG;c3Ln3Lr 2tc4O;p F;c3Jmp0nd LrKveAy 2O;e Ht 2L;ba4do1up;ar3GeNiMlLrKurB;ead0ingBuc5;a49it 6H;c5ll o3Cn 2;ak Fe1Xll0;a3Bber 2rt0und like;ap 5Vow Duggl5;ash 6Noke0;eep NiKow 6;cLp K;o6Dup;e 68;in,oK;ff,v9;de19gn 4NnKt 6Gz5;gKkE; al6Ale0;aMoKu5W;ot Kut0w 7M;aw3ba4f48oC;c2WdeEk6EveA;e Pll1Nnd Orv5tK; Ktl5J;do1foLin,o7upK;!on;ot,r5Z;aw3ba4do1in,o33up;oCto;al66out0rK;ap65ew 6J;ilAv5;aXeUiSoOuK;b 5Yle0n Kstl5;aLba4do1inKo2Ith4Nu5P;!to;c2Xr8w3;ll Mot LpeAuK;g3Ind17;a2Wf3Po7;ar8in,o7up;ng 68p oKs5;ff,p18;aKelAinEnt0;c6Hd K;o4Dup;c27t0;aZeYiWlToQrOsyc35uK;ll Mn5Kt K;aKba4do1in,oJto47up;pa4Dw3;a3Jdo1in,o21to45up;attleBess KiNop 2;ah2Fon;iLp Kr4Zu1Gwer 6N;do1in,o6Nup;nt0;aLuK;gEmp 6;ce u20y 6D;ck Kg0le 4An 6p5B;oJup;el 5NncilE;c53ir 39n0ss MtLy K;ba4oG; Hc2R;aw3ba4in,oJ;pKw4Y;e4Xt D;aLerd0oK;dAt53;il Hrrow H;aTeQiPoLuK;ddl5ll I;c1FnkeyMp 6uthAve K;aKdo1in,o4Lup;l4Nw3; wi4K;ss0x 2;asur5e3SlLss K;a21up;t 6;ke Ln 6rKs2Ax0;k 6ryA;do,fun,oCsure,up;a02eViQoLuK;ck0st I;aNc4Fg MoKse0;k Kse4D;aft9ba4do1forw37in56o0Zu46;in,oJ;d 6;e NghtMnLsKve 00;ten F;e 2k 2; 2e46;ar8do1in;aMt LvelK; oC;do1go,in,o7up;nEve K;in,oK;pKut;en;c5p 2sh LtchBughAy K;do1o59;in4Po7;eMick Lnock K;do1oCup;oCup;eLy K;in,up;l Ip K;aw3ba4do1f04in,oJto,up;aMoLuK;ic5mpE;ke3St H;c43zz 2;a01eWiToPuK;nLrrKsh 6;y 2;keLt K;ar8do1;r H;lKneErse3K;d Ke 2;ba4dKfast,o0Cup;ear,o1;de Lt K;ba4on,up;aw3o7;aKlp0;d Ml Ir Kt 2;fKof;rom;f11in,o03uW;cPm 2nLsh0ve Kz2P;at,it,to;d Lg KkerP;do1in,o2Tup;do1in,oK;ut,v9;k 2;aZeTive Rloss IoMrLunK; f0S;ab hold,in43ow 2U; Kof 2I;aMb1Mit,oLr8th1IuK;nd9;ff,n,v9;bo7ft9hQw3;aw3bKdo1in,oJrise,up,w3;a4ir2H;ar 6ek0t K;aLb1Fdo1in,oKr8up;ff,n,ut,v9;cLhKl2Fr8t,w3;ead;ross;d aKng 2;bo7;a0Ee07iYlUoQrMuK;ck Ke2N;ar8up;eLighten KownBy 2;aw3oG;eKshe27; 2z5;g 2lMol Krk I;aKwi20;bo7r8;d 6low 2;aLeKip0;sh0;g 6ke0mKrKtten H;e F;gRlPnNrLsKzzle0;h F;e Km 2;aw3ba4up;d0isK;h 2;e Kl 1T;aw3fPin,o7;ht ba4ure0;ePnLsK;s 2;cMd K;fKoG;or;e D;d04l 2;cNll Krm0t1G;aLbKdo1in,o09sho0Eth08victim;a4ehi2O;pa0C;e K;do1oGup;at Kdge0nd 12y5;in,o7up;aOi1HoNrK;aLess 6op KuN;aw3b03in,oC;gBwB; Ile0ubl1B;m 2;a0Ah05l02oOrLut K;aw3ba4do1oCup;ackBeep LoKy0;ss Dwd0;by,do1in,o0Uup;me NoLuntK; o2A;k 6l K;do1oG;aRbQforOin,oNtKu0O;hLoKrue;geth9;rough;ff,ut,v9;th,wK;ard;a4y;paKr8w3;rt;eaLose K;in,oCup;n 6r F;aNeLiK;ll0pE;ck Der Kw F;on,up;t 2;lRncel0rOsMtch LveE; in;o1Nup;h Dt K;doubt,oG;ry LvK;e 08;aw3oJ;l Km H;aLba4do1oJup;ff,n,ut;r8w3;a0Ve0MiteAl0Fo04rQuK;bblNckl05il0Dlk 6ndl05rLsKtMy FzzA;t 00;n 0HsK;t D;e I;ov9;anWeaUiLush K;oGup;ghQng K;aNba4do1forMin,oLuK;nd9p;n,ut;th;bo7lKr8w3;ong;teK;n 2;k K;do1in,o7up;ch0;arTg 6iRn5oPrNssMttlLunce Kx D;aw3ba4;e 6; ar8;e H;do1;k Dt 2;e 2;l 6;do1up;d 2;aPeed0oKurt0;cMw K;aw3ba4do1o7up;ck;k K;in,oC;ck0nk0stA; oQaNef 2lt0nd K;do1ov9up;er;up;r Lt K;do1in,oCup;do1o7;ff,nK;to;ck Pil0nMrgLsK;h D;ainBe D;g DkB; on;in,o7;aw3do1in,oCup;ff,ut;ay;ct FdQir0sk MuctionA; oG;ff;ar8o7;ouK;nd; o7;d K;do1oKup;ff,n;wn;o7up;ut",ProperNoun:"true¦aIbDc8dalhousHe7f5gosford,h4iron maiden,kirby,landsdowne,m2nis,r1s0wembF;herwood,paldiB;iel,othwe1;cgi0ercedes,issy;ll;intBudsB;airview,lorence,ra0;mpt9nco;lmo,uro;a1h0;arlt6es5risti;rl0talina;et4i0;ng;arb3e0;et1nt0rke0;ley;on;ie;bid,jax","Person|Place":"true¦a8d6h4jordan,k3orlando,s1vi0;ctor9rgin9;a0ydney;lvador,mara,ntia4;ent,obe;amil0ous0;ton;arw2ie0;go;lexandr1ust0;in;ia",LastName:"true¦0:BR;1:BF;2:B5;3:BH;4:AX;5:9Y;6:B6;7:BK;8:B0;9:AV;A:AL;B:8Q;C:8G;D:7K;E:BM;F:AH;aBDb9Zc8Wd88e81f7Kg6Wh64i60j5Lk4Vl4Dm39n2Wo2Op25quispe,r1Ls0Pt0Ev03wTxSyKzG;aIhGimmerm6A;aGou,u;ng,o;khar5ytsE;aKeun9BiHoGun;koya32shiBU;!lG;diGmaz;rim,z;maGng;da,g52mo83sGzaC;aChiBV;iao,u;aLeJiHoGright,u;jcA5lff,ng;lGmm0nkl0sniewsC;kiB1liams33s3;bGiss,lt0;b,er,st0;a6Vgn0lHtG;anabe,s3;k0sh,tG;e2Non;aLeKiHoGukD;gt,lk5roby5;dHllalGnogr3Kr1Css0val3S;ba,ob1W;al,ov4;lasHsel8W;lJn dIrgBEsHzG;qu7;ilyEqu7siljE;en b6Aijk,yk;enzueAIverde;aPeix1VhKi2j8ka43oJrIsui,uG;om5UrG;c2n0un1;an,emblA7ynisC;dorAMlst3Km4rrAth;atch0i8UoG;mHrG;are84laci79;ps3sG;en,on;hirDkah9Mnaka,te,varA;a06ch01eYhUiRmOoMtIuHvGzabo;en9Jobod3N;ar7bot4lliv2zuC;aIeHoG;i7Bj4AyanAB;ele,in2FpheBvens25;l8rm0;kol5lovy5re7Tsa,to,uG;ng,sa;iGy72;rn5tG;!h;l71mHnGrbu;at9cla9Egh;moBo7M;aIeGimizu;hu,vchG;en8Luk;la,r1G;gu9infe5YmGoh,pulveA7rra5P;jGyG;on5;evi6iltz,miHneid0roed0uGwarz;be3Elz;dHtG;!t,z;!t;ar4Th8ito,ka4OlJnGr4saCto,unde19v4;ch7dHtGz;a5Le,os;b53e16;as,ihDm4Po0Y;aVeSiPoJuHyG;a6oo,u;bio,iz,sG;so,u;bKc8Fdrigue67ge10j9YmJosevelt,sItHux,wG;e,li6;a9Ch;enb4Usi;a54e4L;erts15i93;bei4JcHes,vGzzo;as,e9;ci,hards12;ag2es,iHut0yG;es,nol5N;s,t0;dImHnGsmu97v6C;tan1;ir7os;ic,u;aUeOhMiJoHrGut8;asad,if6Zochazk27;lishc2GpGrti72u10we76;e3Aov51;cHe45nG;as,to;as70hl0;aGillips;k,m,n6I;a3Hde3Wete0Bna,rJtG;ersHrovGters54;!a,ic;!en,on;eGic,kiBss3;i9ra,tz,z;h86k,padopoulIrk0tHvG;ic,l4N;el,te39;os;bMconn2Ag2TlJnei6PrHsbor6XweBzG;dem7Rturk;ella4DtGwe6N;ega,iz;iGof7Hs8I;vGyn1R;ei9;aSri1;aPeNiJoGune50ym2;rHvGwak;ak4Qik5otn66;odahl,r4S;cholsZeHkolGls4Jx3;ic,ov84;ls1miG;!n1;ils3mG;co4Xec;gy,kaGray2sh,var38;jiGmu9shiG;ma;a07c04eZiWoMuHyeG;rs;lJnIrGssoli6S;atGp03r7C;i,ov4;oz,te58;d0l0;h2lOnNo0RrHsGza1A;er,s;aKeJiIoz5risHtG;e56on;!on;!n7K;au,i9no,t5J;!lA;r1Btgome59;i3El0;cracFhhail5kkeHlG;l0os64;ls1;hmeJiIj30lHn3Krci0ssiGyer2N;!er;n0Po;er,j0;dDti;cartHlG;aughl8e2;hy;dQe7Egnu68i0jer3TkPmNnMrItHyG;er,r;ei,ic,su21thews;iHkDquAroqu8tinG;ez,s;a5Xc,nG;!o;ci5Vn;a5UmG;ad5;ar5e6Kin1;rig77s1;aVeOiLoJuHyG;!nch;k4nGo;d,gu;mbarGpe3Fvr4we;di;!nGu,yana2B;coln,dG;b21holm,strom;bedEfeKhIitn0kaHn8rGw35;oy;!j;m11tG;in1on1;bvGvG;re;iGmmy,ng,rs2Qu,voie,ws3;ne,t1F;aZeYh2iWlUnez50oNrJuHvar2woG;k,n;cerGmar68znets5;a,o34;aHem0isGyeziu;h23t3O;m0sni4Fus3KvG;ch4O;bay57ch,rh0Usk16vaIwalGzl5;czGsC;yk;cIlG;!cGen4K;huk;!ev4ic,s;e8uiveG;rt;eff0kGl4mu9nnun1;ucF;ll0nnedy;hn,llKminsCne,pIrHstra3Qto,ur,yGzl5;a,s0;j0Rls22;l2oG;or;oe;aPenOha6im14oHuG;ng,r4;e32hInHrge32u6vG;anD;es,ss3;anHnsG;en,on,t3;nesGs1R;en,s1;kiBnings,s1;cJkob4EnGrv0E;kDsG;en,sG;en0Ion;ks3obs2A;brahimDglesi5Nke5Fl0Qno07oneIshikHto,vanoG;u,v54;awa;scu;aVeOiNjaltal8oIrist50uG;!aGb0ghAynh;m2ng;a6dz4fIjgaa3Hk,lHpUrGwe,x3X;ak1Gvat;mAt;er,fm3WmG;ann;ggiBtchcock;iJmingw4BnHrGss;nand7re9;deGriks1;rs3;kkiHnG;on1;la,n1;dz4g1lvoQmOns0ZqNrMsJuIwHyG;asFes;kiB;g1ng;anHhiG;mo14;i,ov0J;di6p0r10t;ue;alaG;in1;rs1;aVeorgUheorghe,iSjonRoLrJuGw3;errGnnar3Co,staf3Ctierr7zm2;a,eG;ro;ayli6ee2Lg4iffithGub0;!s;lIme0UnHodGrbachE;e,m2;calvAzale0S;dGubE;bGs0E;erg;aj,i;bs3l,mGordaO;en7;iev3U;gnMlJmaIndFo,rGsFuthi0;cGdn0za;ia;ge;eaHlG;agh0i,o;no;e,on;aVerQiLjeldsted,lKoIrHuG;chs,entAji41ll0;eem2iedm2;ntaGrt8urni0wl0;na;emi6orA;lipIsHtzgeraG;ld;ch0h0;ovG;!ic;hatDnanIrG;arGei9;a,i;deY;ov4;b0rre1D;dKinsJriksIsGvaB;cob3GpGtra3D;inoza,osiQ;en,s3;te8;er,is3warG;ds;aXePiNjurhuMoKrisco15uHvorakG;!oT;arte,boHmitru,nn,rGt3C;and,ic;is;g2he0Omingu7nErd1ItG;to;us;aGcki2Hmitr2Ossanayake,x3;s,z; JbnaIlHmirGrvisFvi,w2;!ov4;gado,ic;th;bo0groot,jo6lHsilGvriA;va;a cruz,e3uG;ca;hl,mcevsCnIt2WviG;dGes,s;ov,s3;ielsGku22;!en;ki;a0Be06hRiobQlarkPoIrGunningh1H;awfo0RivGuz;elli;h1lKntJoIrGs2Nx;byn,reG;a,ia;ke,p0;i,rer2K;em2liB;ns;!e;anu;aOeMiu,oIristGu6we;eGiaG;ns1;i,ng,p9uHwGy;!dH;dGng;huJ;!n,onGu6;!g;kJnIpm2ttHudhGv7;ry;erjee,o14;!d,g;ma,raboG;rty;bJl0Cng4rG;eghetHnG;a,y;ti;an,ota1C;cerAlder3mpbeLrIstGvadi0B;iGro;llo;doHl0Er,t0uGvalho;so;so,zo;ll;a0Fe01hYiXlUoNrKuIyG;rLtyG;qi;chan2rG;ke,ns;ank5iem,oGyant;oks,wG;ne;gdan5nIruya,su,uchaHyKziG;c,n5;rd;darGik;enG;ko;ov;aGond15;nco,zG;ev4;ancFshw16;a08oGuiy2;umGwmG;ik;ckRethov1gu,ktPnNrG;gJisInG;ascoGds1;ni;ha;er,mG;anG;!n;gtGit7nP;ss3;asF;hi;er,hG;am;b4ch,ez,hRiley,kk0ldw8nMrIshHtAu0;es;ir;bInHtlGua;ett;es,i0;ieYosa;dGik;a9yoG;padhyG;ay;ra;k,ng;ic;bb0Acos09d07g04kht05lZnPrLsl2tJyG;aHd8;in;la;chis3kiG;ns3;aImstro6sl2;an;ng;ujo,ya;dJgelHsaG;ri;ovG;!a;ersJov,reG;aGjEws;ss1;en;en,on,s3;on;eksejEiyEmeiIvG;ar7es;ez;da;ev;arwHuilG;ar;al;ams,l0;er;ta;as",Ordinal:"true¦eBf7nin5s3t0zeroE;enDhir1we0;lfCn7;d,t3;e0ixt8;cond,vent7;et0th;e6ie7;i2o0;r0urt3;tie4;ft1rst;ight0lev1;e0h,ie1;en0;th",Cardinal:"true¦bEeBf5mEnine7one,s4t0zero;en,h2rDw0;e0o;lve,n5;irt6ousands,ree;even2ix2;i3o0;r1ur0;!t2;ty;ft0ve;e2y;ight0lev1;!e0y;en;illions",Multiple:"true¦b3hundred,m3qu2se1t0;housand,r2;pt1xt1;adr0int0;illion",City:"true¦0:74;1:61;2:6G;3:6J;4:5S;a68b53c4Id48e44f3Wg3Hh39i31j2Wk2Fl23m1Mn1Co19p0Wq0Ur0Os05tRuQvLwDxiBy9z5;a7h5i4Muri4O;a5e5ongsh0;ng3H;greb,nzib5G;ang2e5okoha3Sunfu;katerin3Hrev0;a5n0Q;m5Hn;arsBeAi6roclBu5;h0xi,zh5P;c7n5;d5nipeg,terth4;hoek,s1L;hi5Zkl3A;l63xford;aw;a8e6i5ladivost5Molgogr6L;en3lni6S;ni22r5;o3saill4N;lenc4Wncouv3Sr3ughn;lan bat1Crumqi,trecht;aFbilisi,eEheDiBo9r7u5;l21n63r5;in,ku;i5ondh62;es51poli;kyo,m2Zron1Pulo5;n,uS;an5jua3l2Tmisoa6Bra3;j4Tshui; hag62ssaloni2H;gucigal26hr0l av1U;briz,i6llinn,mpe56ng5rtu,shk2R;i3Esh0;an,chu1n0p2Eyu0;aEeDh8kopje,owe1Gt7u5;ra5zh4X;ba0Ht;aten is55ockholm,rasbou67uttga2V;an8e6i5;jiazhua1llo1m5Xy0;f50n5;ya1zh4H;gh3Kt4Q;att45o1Vv44;cramen16int ClBn5o paulo,ppo3Rrajevo; 7aa,t5;a 5o domin3E;a3fe,m1M;antonio,die3Cfrancisco,j5ped3Nsalvad0J;o5u0;se;em,t lake ci5Fz25;lou58peters24;a9e8i6o5;me,t59;ga,o5yadh;! de janei3F;cife,ims,nn3Jykjavik;b4Sip4lei2Inc2Pwalpindi;ingdao,u5;ez2i0Q;aFeEhDiCo9r7u6yong5;ya1;eb59ya1;a5etor3M;g52to;rt5zn0; 5la4Co;au prin0Melizabe24sa03;ls3Prae5Atts26;iladelph3Gnom pe1Aoenix;ki1tah tik3E;dua,lerYnaji,r4Ot5;na,r32;ak44des0Km1Mr6s5ttawa;a3Vlo;an,d06;a7ew5ing2Fovosibir1Jyc; 5cast36;del24orlea44taip14;g8iro4Wn5pl2Wshv33v0;ch6ji1t5;es,o1;a1o1;a6o5p4;ya;no,sa0W;aEeCi9o6u5;mb2Ani26sc3Y;gadishu,nt6s5;c13ul;evideo,pelli1Rre2Z;ami,l6n14s5;kolc,sissauga;an,waukee;cca,d5lbour2Mmph41ndo1Cssi3;an,ell2Xi3;cau,drAkass2Sl9n8r5shh4A;aca6ib5rakesh,se2L;or;i1Sy;a4EchFdal0Zi47;mo;id;aDeAi8o6u5vSy2;anMckn0Odhia3;n5s angel26;d2g bea1N;brev2Be3Lma5nz,sb2verpo28;!ss27; ma39i5;c5pzig;est16; p6g5ho2Wn0Cusan24;os;az,la33;aHharFiClaipeBo9rak0Du7y5;iv,o5;to;ala lump4n5;mi1sh0;hi0Hlka2Xpavog4si5wlo2;ce;da;ev,n5rkuk;gst2sha5;sa;k5toum;iv;bHdu3llakuric0Qmpa3Fn6ohsiu1ra5un1Iwaguc0Q;c0Pj;d5o,p4;ah1Ty;a7e6i5ohannesV;l1Vn0;dd36rusalem;ip4k5;ar2H;bad0mph1OnArkutUs7taXz5;mir,tapala5;pa;fah0l6tanb5;ul;am2Zi2H;che2d5;ianap2Mo20;aAe7o5yder2W; chi mi5ms,nolulu;nh;f6lsin5rakli2;ki;ei;ifa,lifax,mCn5rb1Dva3;g8nov01oi;aFdanEenDhCiPlasgBo9raz,u5;a5jr23;dal6ng5yaquil;zh1J;aja2Oupe;ld coa1Bthen5;bu2S;ow;ent;e0Uoa;sk;lw7n5za;dhi5gt1E;nag0U;ay;aisal29es,o8r6ukuya5;ma;ankfu5esno;rt;rt5sh0; wor6ale5;za;th;d5indhov0Pl paso;in5mont2;bur5;gh;aBe8ha0Xisp4o7resd0Lu5;b5esseldorf,nkirk,rb0shanbe;ai,l0I;ha,nggu0rtmu13;hradSl6nv5troit;er;hi;donghIe6k09l5masc1Zr es sala1KugavpiY;i0lU;gu,je2;aJebu,hAleve0Vo5raio02uriti1Q;lo7n6penhag0Ar5;do1Ok;akKst0V;gUm5;bo;aBen8i6ongqi1ristchur5;ch;ang m7ca5ttago1;go;g6n5;ai;du,zho1;ng5ttogr14;ch8sha,zh07;gliari,i9lga8mayenJn6pe town,r5tanO;acCdiff;ber1Ac5;un;ry;ro;aWeNhKirmingh0WoJr9u5;chareTdapeTenos air7r5s0tu0;g5sa;as;es;a9is6usse5;ls;ba6t5;ol;ne;sil8tisla7zzav5;il5;le;va;ia;goZst2;op6ubaneshw5;ar;al;iCl9ng8r5;g6l5n;in;en;aluru,hazi;fa6grade,o horizon5;te;st;ji1rut;ghd0BkFn9ot8r7s6yan n4;ur;el,r07;celo3i,ranquil09;ou;du1g6ja lu5;ka;alo6k5;ok;re;ng;ers5u;field;a05b02cc01ddis aba00gartaZhmedXizawl,lSmPnHqa00rEsBt7uck5;la5;nd;he7l5;an5;ta;ns;h5unci2;dod,gab5;at;li5;ngt2;on;a8c5kaOtwerp;hora6o3;na;ge;h7p5;ol5;is;eim;aravati,m0s5;terd5;am; 7buquerq6eppo,giers,ma5;ty;ue;basrah al qadim5mawsil al jadid5;ah;ab5;ad;la;ba;ra;idj0u dha5;bi;an;lbo6rh5;us;rg",Region:"true¦0:2O;1:2L;2:2U;3:2F;a2Sb2Fc21d1Wes1Vf1Tg1Oh1Ki1Fj1Bk16l13m0Sn09o07pYqVrSsJtEuBverAw6y4zacatec2W;akut0o0Fu4;cat1k09;a5est 4isconsin,yomi1O;bengal,virgin0;rwick3shington4;! dc;acruz,mont;dmurt0t4;ah,tar4; 2Pa12;a6e5laxca1Vripu21u4;scaEva;langa2nnessee,x2J;bas10m4smQtar29;aulip2Hil nadu;a9elang07i7o5taf16u4ylh1J;ff02rr09s1E;me1Gno1Uuth 4;cZdY;ber0c4kkim,naloa;hu1ily;n5rawak,skatchew1xo4;ny; luis potosi,ta catari2;a4hodeA;j4ngp0C;asth1shahi;ingh29u4;e4intana roo;bec,en6retaro;aAe6rince edward4unjab; i4;sl0G;i,n5r4;ak,nambu0F;a0Rnsylv4;an0;ha0Pra4;!na;axa0Zdisha,h4klaho21ntar4reg7ss0Dx0I;io;aLeEo6u4;evo le4nav0X;on;r4tt18va scot0;f9mandy,th4; 4ampton3;c6d5yo4;rk3;ako1O;aroli2;olk;bras1Nva0Dw4; 6foundland4;! and labrad4;or;brunswick,hamp3jers5mexiTyork4;! state;ey;galPyarit;aAeghala0Mi6o4;nta2r4;dov0elos;ch6dlanDn5ss4zor11;issippi,ouri;as geraPneso18;ig1oac1;dhy12harasht0Gine,lac07ni5r4ssachusetts;anhao,i el,ylG;p4toba;ur;anca3e4incoln3ouisI;e4iR;ds;a6e5h4omi;aka06ul2;dah,lant1ntucky,ra01;bardino,lmyk0ns0Qr4;achay,el0nata0X;alis6har4iangxi;kh4;and;co;daho,llino7n4owa;d5gush4;et0;ia2;is;a6ert5i4un1;dalFm0D;ford3;mp3rya2waii;ansu,eorg0lou7oa,u4;an4izhou,jarat;ajuato,gdo4;ng;cester3;lori4uji1;da;sex;ageUe7o5uran4;go;rs4;et;lawaMrby3;aFeaEh9o4rim08umbr0;ahui7l6nnectic5rsi4ventry;ca;ut;i03orado;la;e5hattisgarh,i4uvash0;apRhuahua;chn5rke4;ss0;ya;ra;lGm4;bridge3peche;a9ihar,r8u4;ck4ryat0;ingham3;shi4;re;emen,itish columb0;h0ja cal8lk7s4v7;hkorto4que;st1;an;ar0;iforn0;ia;dygHguascalientes,lBndhr9r5ss4;am;izo2kans5un4;achal 7;as;na;a 4;pradesh;a6ber5t4;ai;ta;ba5s4;ka;ma;ea",Place:"true¦0:4T;1:4V;2:44;3:4B;4:3I;a4Eb3Gc2Td2Ge26f25g1Vh1Ji1Fk1Cl14m0Vn0No0Jp08r04sTtNuLvJw7y5;a5o0Syz;kut1Bngtze;aDeChitBi9o5upatki,ycom2P;ki26o5;d5l1B;b3Ps5;i4to3Y;c0SllowbroCn5;c2Qgh2;by,chur1P;ed0ntw3Gs22;ke6r3St5;erf1f1; is0Gf3V;auxha3Mirgin is0Jost5;ok;laanbaatar,pto5xb3E;n,wn;a9eotihuac43h7ive49o6ru2Nsarskoe selo,u5;l2Dzigo47;nto,rquay,tt2J;am3e 5orn3E;bronx,hamptons;hiti,j mah0Iu1N;aEcotts bluff,eCfo,herbroQoApring9t7u5yd2F;dbu1Wn5;der03set3B;aff1ock2Nr5;atf1oud;hi37w24;ho,uth5; 1Iam1Zwo3E;a5i2O;f2Tt0;int lawrence riv3Pkhal2D;ayleigh,ed7i5oc1Z;chmo1Eo gran4ver5;be1Dfr09si4; s39cliffe,hi2Y;aCe9h8i5ompeii,utn2;c6ne5tcai2T; 2Pc0G;keri13t0;l,x;k,lh2mbr6n5r2J;n1Hzance;oke;cif38pahanaumokuak30r5;k5then0;si4w1K;ak7r6x5;f1l2X;ange county,d,f1inoco;mTw1G;e8i1Uo5;r5tt2N;th5wi0E; 0Sam19;uschwanste1Pw5; eng6a5h2market,po36;rk;la0P;a8co,e6i5uc;dt1Yll0Z;adow5ko0H;lands;chu picchu,gad2Ridsto1Ql8n7ple6r5;kh2; g1Cw11;hatt2Osf2B;ibu,t0ve1Z;a8e7gw,hr,in5owlOynd02;coln memori5dl2C;al;asi4w3;kefr7mbe1On5s,x;ca2Ig5si05;f1l27t0;ont;azan kreml14e6itchen2Gosrae,rasnoyar5ul;sk;ns0Hs1U;ax,cn,lf1n6ps5st;wiN;d5glew0Lverness;ian27ochina;aDeBi6kg,nd,ov5unti2H;d,enweep;gh6llc5;reL;bu03l5;and5;!s;r5yw0C;ef1tf1;libu24mp6r5stings;f1lem,row;stead,t0;aDodavari,r5uelph;avenAe5imsS;at 8en5; 6f1Fwi5;ch;acr3vall1H;brita0Flak3;hur5;st;ng3y villa0W;airhavHco,ra;aAgli9nf17ppi8u7ver6x5;et1Lf1;glad3t0;rope,st0;ng;nt0;rls1Ls5;t 5;e5si4;nd;aCe9fw,ig8o7ryd6u5xb;mfri3nstab00rh2tt0;en;nca18rcKv19wnt0B;by;n6r5vonpo1D;ry;!h2;nu8r5;l6t5;f1moor;ingt0;be;aLdg,eIgk,hClBo5royd0;l6m5rnwa0B;pt0;c7lingw6osse5;um;ood;he0S;earwat0St;a8el6i5uuk;chen itza,mney ro07natSricahua;m0Zt5;enh2;mor5rlottetPth2;ro;dar 5ntervilA;breaks,faZg5;rove;ld9m8r5versh2;lis6rizo pla5;in;le;bLpbellf1;weQ;aZcn,eNingl01kk,lackLolt0r5uckV;aGiAo5;ckt0ok5wns cany0;lyn,s5;i4to5;ne;de;dge6gh5;am,t0;n6t5;own;or5;th;ceb6m5;lNpt0;rid5;ge;bu5pool,wa8;rn;aconsfEdf1lBr9verly7x5;hi5;ll; hi5;lls;wi5;ck; air,l5;ingh2;am;ie5;ld;ltimore,rnsl6tters5;ea;ey;bLct0driadic,frica,ginJlGmFn9rc8s7tl6yleOzor3;es;!ant8;hcroft,ia; de triomphe,t6;adyr,ca8dov9tarct5;ic5; oce5;an;st5;er;ericas,s;be6dersh5hambra,list0;ot;rt0;cou5;rt;bot7i5;ngd0;on;sf1;ord",Country:"true¦0:38;1:2L;2:3B;a2Xb2Ec22d1Ye1Sf1Mg1Ch1Ai14j12k0Zl0Um0Gn05om2pZqat1KrXsKtCu7v5wal4yemTz3;a25imbabwe;es,lis and futu2Y;a3enezue32ietnam;nuatu,tican city;gTk6nited 4ruXs3zbeE; 2Ca,sr;arab emirat0Kkingdom,states3;! of am2Y;!raiV;a8haCimor les0Co7rinidad 5u3;nis0rk3valu;ey,me2Zs and caic1V;and t3t3;oba1L;go,kel10nga;iw2ji3nz2T;ki2V;aDcotl1eCi9lov8o6pa2Dri lanka,u5w3yr0;az3edAitzerl1;il1;d2riname;lomon1Xmal0uth 3;afr2KkMsud2;ak0en0;erra leoFn3;gapo1Yt maart3;en;negLrb0ychellZ;int 3moa,n marino,udi arab0;hele26luc0mart21;epublic of ir0Eom2Euss0w3;an27;a4eIhilippinUitcairn1Mo3uerto riN;l1rtugF;ki2Dl4nama,pua new0Vra3;gu7;au,esti3;ne;aBe9i7or3;folk1Ith4w3;ay; k3ern mariana1D;or0O;caragua,ger3ue;!ia;p3ther1Aw zeal1;al;mib0u3;ru;a7exi6icro0Bo3yanm06;ldova,n3roc5zambA;a4gol0t3;enegro,serrat;co;cAdagasc01l7r5urit4yot3;te;an0i16;shall0Xtin3;ique;a4div3i,ta;es;wi,ys0;ao,ed02;a6e5i3uxembourg;b3echtenste12thu1G;er0ya;ban0Isotho;os,tv0;azakh1Fe4iriba04o3uwait,yrgyz1F;rXsovo;eling0Knya;a3erG;ma16p2;c7nd6r4s3taly,vory coast;le of m2rael;a3el1;n,q;ia,oJ;el1;aiTon3ungary;dur0Ng kong;aBermany,ha0QibraltAre8u3;a6ern5inea3ya0P;! biss3;au;sey;deloupe,m,tema0Q;e3na0N;ce,nl1;ar;bUmb0;a7i6r3;ance,ench 3;guia0Epoly3;nes0;ji,nl1;lklandUroeU;ast tim7cu6gypt,l salv6ngl1quatorial4ritr5st3thiop0;on0; guin3;ea;ad3;or;enmark,jibou5ominica4r con3;go;!n C;ti;aBentral african Ah8o5roat0u4yprRzech3; 9ia;ba,racao;c4lo3morQngo brazzaville,okGsta r04te de ivoiL;mb0;osE;i3ristmasG;le,na;republic;m3naUpe verde,ymanA;bod0ero3;on;aGeDhut2o9r5u3;lgar0r3;kina faso,ma,undi;azil,itish 3unei;virgin3; is3;lands;liv0nai5snia and herzegoviHtswaHuvet3; isl1;and;re;l3n8rmuG;ar3gium,ize;us;h4ngladesh,rbad3;os;am4ra3;in;as;fghaGlDmBn6r4ustr3zerbaij2;al0ia;genti3men0uba;na;dorra,g5t3;arct7igua and barbu3;da;o3uil3;la;er3;ica;b3ger0;an0;ia;ni3;st2;an",FirstName:"true¦aTblair,cQdOfrancoZgabMhinaLilya,jHkClBm6ni4quinn,re3s0;h0umit,yd;ay,e0iloh;a,lby;g9ne;co,ko0;!s;a1el0ina,org6;!okuhF;ds,naia,r1tt0xiB;i,y;ion,lo;ashawn,eif,uca;a3e1ir0rM;an;lsFn0rry;dall,yat5;i,sD;a0essIie,ude;i1m0;ie,mG;me;ta;rie0y;le;arcy,ev0;an,on;as1h0;arl8eyenne;ey,sidy;drien,kira,l4nd1ubr0vi;ey;i,r0;a,e0;a,y;ex2f1o0;is;ie;ei,is",WeekDay:"true¦fri2mon2s1t0wednesd3;hurs1ues1;aturd1und1;!d0;ay0;!s",Month:"true¦dec0february,july,nov0octo1sept0;em0;ber",Date:"true¦ago,on4som4t1week0yesterd5; end,ends;mr1o0;d2morrow;!w;ed0;ay",Duration:"true¦centurAd8h7m5q4se3w1y0;ear8r8;eek0k7;!end,s;ason,c5;tr,uarter;i0onth3;llisecond2nute2;our1r1;ay0ecade0;!s;ies,y",FemaleName:"true¦0:J7;1:JB;2:IJ;3:IK;4:J1;5:IO;6:JS;7:JO;8:HB;9:JK;A:H4;B:I2;C:IT;D:JH;E:IX;F:BA;G:I4;aGTbFLcDRdD0eBMfB4gADh9Ti9Gj8Dk7Cl5Wm48n3Lo3Hp33qu32r29s15t0Eu0Cv02wVxiTyOzH;aLeIineb,oHsof3;e3Sf3la,ra;h2iKlIna,ynH;ab,ep;da,ma;da,h2iHra;nab;aKeJi0FolB7uIvH;et8onDP;i0na;le0sen3;el,gm3Hn,rGLs8W;aoHme0nyi;m5XyAD;aMendDZhiDGiH;dele9lJnH;if48niHo0;e,f47;a,helmi0lHma;a,ow;ka0nB;aNeKiHusa5;ck84kIl8oleAviH;anFenJ4;ky,toriBK;da,lA8rHs0;a,nHoniH9;a,iFR;leHnesH9;nILrH;i1y;g9rHs6xHA;su5te;aYeUhRiNoLrIuHy2;i,la;acJ3iHu0J;c3na,sH;hFta;nHr0F;iFya;aJffaEOnHs6;a,gtiH;ng;!nFSra;aIeHomasi0;a,l9Oo8Ares1;l3ndolwethu;g9Fo88rIssH;!a,ie;eHi,ri7;sa,za;bOlMmKnIrHs6tia0wa0;a60yn;iHya;a,ka,s6;arFe2iHm77ra;!ka;a,iH;a,t6;at6it6;a0Ecarlett,e0AhWiSkye,neza0oQri,tNuIyH;bIGlvi1;ha,mayIJniAsIzH;an3Net8ie,y;anHi7;!a,e,nH;aCe;aIeH;fan4l5Dphan6E;cI5r5;b3fiAAm0LnHphi1;d2ia,ja,ya;er2lJmon1nIobh8QtH;a,i;dy;lETv3;aMeIirHo0risFDy5;a,lDM;ba,e0i5lJrH;iHr6Jyl;!d8Ifa;ia,lDZ;hd,iMki2nJrIu0w0yH;la,ma,na;i,le9on,ron,yn;aIda,ia,nHon;a,on;!ya;k6mH;!aa;lJrItaye82vH;da,inj;e0ife;en1i0ma;anA9bLd5Oh1SiBkKlJmInd2rHs6vannaC;aCi0;ant6i2;lDOma,ome;ee0in8Tu2;in1ri0;a05eZhXiUoHuthDM;bScRghQl8LnPsJwIxH;anB3ie,y;an,e0;aIeHie,lD;ann7ll1marDGtA;!lHnn1;iHyn;e,nH;a,dF;da,i,na;ayy8G;hel67io;bDRerAyn;a,cIkHmas,nFta,ya;ki,o;h8Xki;ea,iannGMoH;da,n1P;an0bJemFgi0iInHta,y0;a8Bee;han86na;a,eH;cHkaC;a,ca;bi0chIe,i0mo0nHquETy0;di,ia;aERelHiB;!e,le;een4ia0;aPeOhMiLoJrHute6A;iHudenCV;scil3LyamvaB;lHrt3;i0ly;a,paluk;ilome0oebe,ylH;is,lis;ggy,nelope,r5t2;ige,m0VnKo5rvaDMtIulH;a,et8in1;ricHt4T;a,e,ia;do2i07;ctav3dIfD3is6ksa0lHphD3umC5yunbileg;a,ga,iv3;eHvAF;l3t8;aWeUiMoIurHy5;!ay,ul;a,eJor,rIuH;f,r;aCeEma;ll1mi;aNcLhariBQkKlaJna,sHta,vi;anHha;ur;!y;a,iDZki;hoGk9YolH;a,e4P;!mh;hir,lHna,risDEsreE;!a,lBV;asuMdLh3i6Dl5nKomi7rgEVtH;aHhal4;lHs6;i1ya;cy,et8;e9iF0ya;nngu2X;a0Ackenz4e02iMoJrignayani,uriDJyH;a,rH;a,iOlNna,tG;bi0i2llBJnH;a,iH;ca,ka,qD9;a,cUdo4ZkaTlOmi,nMrItzi,yH;ar;aJiIlH;anET;am;!l,nB;dy,eHh,n4;nhGrva;aKdJe0iCUlH;iHy;cent,e;red;!gros;!e5;ae5hH;ae5el3Z;ag5DgNi,lKrH;edi7AiIjem,on,yH;em,l;em,sCG;an4iHliCF;nHsCJ;a,da;!an,han;b09cASd07e,g05ha,i04ja,l02n00rLsoum5YtKuIv84xBKyHz4;bell,ra,soBB;d7rH;a,eE;h8Gild1t4;a,cUgQiKjor4l7Un4s6tJwa,yH;!aHbe6Xja9lAE;m,nBL;a,ha,in1;!aJbCGeIja,lDna,sHt63;!a,ol,sa;!l1D;!h,mInH;!a,e,n1;!awit,i;arJeIie,oHr48ueri8;!t;!ry;et46i3B;el4Xi7Cy;dHon,ue5;akranAy;ak,en,iHlo3S;a,ka,nB;a,re,s4te;daHg4;!l3E;alDd4elHge,isDJon0;ei9in1yn;el,le;a0Ne0CiXoQuLyH;d3la,nH;!a,dIe2OnHsCT;!a,e2N;a,sCR;aD4cJel0Pis1lIna,pHz;e,iA;a,u,wa;iHy;a0Se,ja,l2NnB;is,l1UrItt1LuHvel4;el5is1;aKeIi7na,rH;aADi7;lHn1tA;ei;!in1;aTbb9HdSepa,lNnKsJvIzH;!a,be5Ret8z4;!ia;a,et8;!a,dH;a,sHy;ay,ey,i,y;a,iJja,lH;iHy;aA8e;!aH;!nF;ia,ya;!nH;!a,ne;aPda,e0iNjYla,nMoKsJtHx93y5;iHt4;c3t3;e2PlCO;la,nHra;a,ie,o2;a,or1;a,gh,laH;!ni;!h,nH;a,d2e,n5V;cOdon9DiNkes6mi9Gna,rMtJurIvHxmi,y5;ern1in3;a,e5Aie,yn;as6iIoH;nya,ya;fa,s6;a,isA9;a,la;ey,ie,y;a04eZhXiOlASoNrJyH;lHra;a,ee,ie;istHy6I;a,en,iIyH;!na;!e,n5F;nul,ri,urtnB8;aOerNlB7mJrHzzy;a,stH;en,in;!berlImernH;aq;eHi,y;e,y;a,stE;!na,ra;aHei2ongordzol;dij1w5;el7UiKjsi,lJnIrH;a,i,ri;d2na,za;ey,i,lBLs4y;ra,s6;biAcARdiat7MeBAiSlQmPnyakuma1DrNss6NtKviAyH;!e,lH;a,eH;e,i8T;!a6HeIhHi4TlDri0y;ar8Her8Hie,leErBAy;!lyn8Ori0;a,en,iHl5Xoli0yn;!ma,nFs95;a5il1;ei8Mi,lH;e,ie;a,tl6O;a0AeZiWoOuH;anMdLlHst88;es,iH;a8NeHs8X;!n9tH;!a,te;e5Mi3My;a,iA;!anNcelDdMelGhan7VleLni,sIva0yH;a,ce;eHie;fHlDph7Y;a,in1;en,n1;i7y;!a,e,n45;lHng;!i1DlH;!i1C;anNle0nKrJsH;i8JsH;!e,i8I;i,ri;!a,elGif2CnH;a,et8iHy;!e,f2A;a,eJiInH;a,eIiH;e,n1;!t8;cMda,mi,nIque4YsminFvie2y9zH;min7;a7eIiH;ce,e,n1s;!lHs82t0F;e,le;inIk6HlDquelH;in1yn;da,ta;da,lRmPnOo0rNsIvaHwo0zaro;!a0lu,na;aJiIlaHob89;!n9R;do2;belHdo2;!a,e,l3B;a7Ben1i0ma;di2es,gr72ji;a9elBogH;en1;a,e9iHo0se;a0na;aSeOiJoHus7Kyacin2C;da,ll4rten24snH;a,i9U;lImaH;ri;aIdHlaI;a,egard;ry;ath1BiJlInrietArmi9sH;sa,t1A;en2Uga,mi;di;bi2Fil8MlNnMrJsItHwa,yl8M;i5Tt4;n60ti;iHmo51ri53;etH;!te;aCnaC;a,ey,l4;a02eWiRlPoNrKunJwH;enHyne1R;!dolD;ay,el;acieIetHiselB;a,chE;!la;ld1CogooH;sh;adys,enHor3yn2K;a,da,na;aKgi,lIna,ov8EselHta;a,e,le;da,liH;an;!n0;mLnJorgIrH;ald5Si,m3Etrud7;et8i4X;a,eHna;s29vieve;ma;bIle,mHrnet,yG;al5Si5;iIrielH;a,l1;!ja;aTeQiPlorOoz3rH;anJeIiH;da,eB;da,ja;!cH;esIiHoi0P;n1s66;!ca;a,enc3;en,o0;lIn0rnH;anB;ec3ic3;jr,nArKtHy7;emIiHma,oumaA;ha,ma,n;eh;ah,iBrah,za0;cr4Rd0Re0Qi0Pk0Ol07mXn54rUsOtNuMvHwa;aKelIiH;!e,ta;inFyn;!a;!ngel4V;geni1ni47;h5Yien9ta;mLperanKtH;eIhHrel5;er;l31r7;za;a,eralB;iHma,ne4Lyn;cHka,n;a,ka;aPeNiKmH;aHe21ie,y;!li9nuH;elG;lHn1;e7iHy;a,e,ja;lHrald;da,y;!nue5;aWeUiNlMma,no2oKsJvH;a,iH;na,ra;a,ie;iHuiH;se;a,en,ie,y;a0c3da,e,f,nMsJzaH;!betHveA;e,h;aHe,ka;!beH;th;!a,or;anor,nH;!a,i;!in1na;ate1Rta;leEs6;vi;eIiHna,wi0;e,th;l,n;aYeMh3iLjeneKoH;lor5Vminiq4Ln3FrHtt4;a,eEis,la,othHthy;ea,y;ba;an09naCon9ya;anQbPde,eOiMlJmetr3nHsir5M;a,iH;ce,se;a,iIla,orHphi9;es,is;a,l6F;dHrdH;re;!d5Ena;!b2ForaCraC;a,d2nH;!a,e;hl3i0l0GmNnLphn1rIvi1WyH;le,na;a,by,cIia,lH;a,en1;ey,ie;a,et8iH;!ca,el1Aka,z;arHia;is;a0Re0Nh04i02lUoJristIynH;di,th3;al,i0;lPnMrIurH;tn1D;aJd2OiHn2Ori9;!nH;a,e,n1;!l4;cepci5Cn4sH;tanHuelo;ce,za;eHleE;en,t8;aJeoIotH;il54;!pat2;ir7rJudH;et8iH;a,ne;a,e,iH;ce,sZ;a2er2ndH;i,y;aReNloe,rH;isJyH;stH;al;sy,tH;a1Sen,iHy;an1e,n1;deJlseIrH;!i7yl;a,y;li9;nMrH;isKlImH;ai9;a,eHot8;n1t8;!sa;d2elGtH;al,elG;cIlH;es8i47;el3ilH;e,ia,y;itlYlXmilWndVrMsKtHy5;aIeIhHri0;er1IleErDy;ri0;a38sH;a37ie;a,iOlLmeJolIrH;ie,ol;!e,in1yn;lHn;!a,la;a,eIie,otHy;a,ta;ne,y;na,s1X;a0Ii0I;a,e,l1;isAl4;in,yn;a0Ke02iZlXoUrH;andi7eRiJoIyH;an0nn;nwDoke;an3HdgMgiLtH;n31tH;!aInH;ey,i,y;ny;d,t8;etH;!t7;an0e,nH;da,na;bbi7glarIlo07nH;iAn4;ka;ancHythe;a,he;an1Clja0nHsm3M;iAtH;ou;aWcVlinUniArPssOtJulaCvH;!erlH;ey,y;hJsy,tH;e,iHy7;e,na;!anH;ie,y;!ie;nItHyl;ha,ie;adIiH;ce;et8i9;ay,da;ca,ky;!triH;ce,z;rbJyaH;rmH;aa;a2o2ra;a2Ub2Od25g21i1Sj5l18m0Zn0Boi,r06sWtVuPvOwa,yIzH;ra,u0;aKes6gJlIn,seH;!l;in;un;!nH;a,na;a,i2K;drLguJrIsteH;ja;el3;stH;in1;a,ey,i,y;aahua,he0;hIi2Gja,miAs2DtrH;id;aMlIraqHt21;at;eIi7yH;!n;e,iHy;gh;!nH;ti;iJleIo6piA;ta;en,n1t8;aHelG;!n1J;a01dje5eZgViTjRnKohito,toHya;inet8nH;el5ia;te;!aKeIiHmJ;e,ka;!mHtt7;ar4;!belIliHmU;sa;!l1;a,eliH;ca;ka,sHta;a,sa;elHie;a,iH;a,ca,n1qH;ue;!tH;a,te;!bImHstasiMya;ar3;el;aLberKeliJiHy;e,l3naH;!ta;a,ja;!ly;hGiIl3nB;da;a,ra;le;aWba,ePiMlKthJyH;a,c3sH;a,on,sa;ea;iHys0N;e,s0M;a,cIn1sHza;a,e,ha,on,sa;e,ia,ja;c3is6jaKksaKna,sJxH;aHia;!nd2;ia,saH;nd2;ra;ia;i0nIyH;ah,na;a,is,naCoud;la;c6da,leEmNnLsH;haClH;inHyY;g,n;!h;a,o,slH;ey;ee;en;at6g4nIusH;ti0;es;ie;aWdiTelMrH;eJiH;anMenH;a,e,ne;an0;na;!aLeKiIyH;nn;a,n1;a,e;!ne;!iH;de;e,lDsH;on;yn;!lH;i9yn;ne;aKbIiHrL;!e,gaK;ey,i7y;!e;gaH;il;dKliyJradhIs6;ha;ya;ah;a,ya",Honorific:"true¦director1field marsh2lieutenant1rear0sergeant major,vice0; admir1; gener0;al","Adj|Gerund":"true¦0:3F;1:3H;2:31;3:2X;4:35;5:33;6:3C;7:2Z;8:36;9:29;a33b2Tc2Bd1Te1If19g12h0Zi0Rl0Nm0Gnu0Fo0Ap04rYsKtEuBvAw1Ayiel3;ar6e08;nBpA;l1Rs0B;fol3n1Zsett2;aEeDhrBi4ouc7rAwis0;e0Bif2oub2us0yi1;ea1SiA;l2vi1;l2mp0rr1J;nt1Vxi1;aMcreec7enten2NhLkyrocke0lo0Vmi2oJpHtDuBweA;e0Ul2;pp2ArA;gi1pri5roun3;aBea8iAri2Hun9;mula0r4;gge4rA;t2vi1;ark2eAraw2;e3llb2F;aAot7;ki1ri1;i9oc29;dYtisf6;aEeBive0oAus7;a4l2;assu4defi9fres7ig9juve07mai9s0vAwar3;ea2italiAol1G;si1zi1;gi1ll6mb2vi1;a6eDier23lun1VrAun2C;eBoA;mi5vo1Z;ce3s5vai2;n3rpleA;xi1;ffCpWutBverAwi1;arc7lap04p0Pri3whel8;goi1l6st1J;en3sA;et0;m2Jrtu4;aEeDiCoBuAyst0L;mb2;t1Jvi1;s5tiga0;an1Rl0n3smeri26;dAtu4;de9;aCeaBiAo0U;fesa0Tvi1;di1ni1;c1Fg19s0;llumiGmFnArri0R;cDfurHsCtBviA;go23ti1;e1Oimi21oxica0rig0V;pi4ul0;orpo20r0K;po5;na0;eaBorr02umilA;ia0;li1rtwar8;lFrA;atiDipCoBuelA;i1li1;undbrea10wi1;pi1;f6ng;a4ea8;a3etc7it0lEoCrBulfA;il2;ee1FighXust1L;rAun3;ebo3thco8;aCoA;a0wA;e4i1;mi1tte4;lectrJmHnExA;aCci0hBis0pA;an3lo3;aOila1B;c0spe1A;ab2coura0CdBergi13ga0Clive9ric7s02tA;hral2i0J;ea4u4;barras5er09pA;owe4;if6;aQeIiBrA;if0;sAzz6;aEgDhearCsen0tA;rAur11;ac0es5;te9;us0;ppoin0r8;biliGcDfi9gra3ligh0mBpres5sAvasG;erE;an3ea9orA;ali0L;a6eiBli9rA;ea5;vi1;ta0;maPri1s7un0zz2;aPhMlo5oAripp2ut0;mGnArrespon3;cer9fDspi4tA;inBrA;as0ibu0ol2;ui1;lic0u5;ni1;fDmCpA;eAromi5;l2ti1;an3;or0;aAil2;llenAnAr8;gi1;l8ptAri1;iva0;aff2eGin3lFoDrBuA;d3st2;eathtaAui5;ki1;gg2i2o8ri1unA;ci1;in3;co8wiA;lAtc7;de4;bsorVcOgonMlJmHnno6ppea2rFsA;pi4su4toA;nBun3;di1;is7;hi1;res0;li1;aFu5;si1;ar8lu4;ri1;mi1;iAzi1;zi1;cAhi1;eleDomA;moBpan6;yi1;da0;ra0;ti1;bi1;ng",Comparable:"true¦0:3C;1:3Q;2:3F;a3Tb3Cc33d2Te2Mf2Ag1Wh1Li1Fj1Ek1Bl13m0Xn0So0Rp0Iqu0Gr07sHtCug0vAw4y3za0Q;el10ouN;ary,e6hi5i3ry;ck0Cde,l3n1ry,se;d,y;ny,te;a3i3R;k,ry;a3erda2ulgar;gue,in,st;a6en2Xhi5i4ouZr3;anqu2Cen1ue;dy,g36me0ny;ck,rs28;ll,me,rt,wd3I;aRcaPeOhMiLkin0BlImGoEpDt6u4w3;eet,ift;b3dd0Wperfi21rre28;sta26t21;a8e7iff,r4u3;pUr1;a4ict,o3;ng;ig2Vn0N;a1ep,rn;le,rk,te0;e1Si2Vright0;ci1Yft,l3on,re;emn,id;a3el0;ll,rt;e4i3y;g2Mm0Z;ek,nd2T;ck24l0mp1L;a3iRrill,y;dy,l01rp;ve0Jxy;n1Jr3;ce,y;d,fe,int0l1Hv0V;a8e6i5o3ude;mantic,o19sy,u3;gh;pe,t1P;a3d,mo0A;dy,l;gg4iFndom,p3re,w;id;ed;ai2i3;ck,et;hoAi1Fl9o8r5u3;ny,r3;e,p11;egna2ic4o3;fouSud;ey,k0;liXor;ain,easa2;ny;dd,i0ld,ranL;aive,e5i4o3u14;b0Sisy,rm0Ysy;bb0ce,mb0R;a3r1w;r,t;ad,e5ild,o4u3;nda12te;ist,o1;a4ek,l3;low;s0ty;a8e7i6o3ucky;f0Jn4o15u3ve0w10y0N;d,sy;e0g;ke0l,mp,tt0Eve0;e1Qwd;me,r3te;ge;e4i3;nd;en;ol0ui19;cy,ll,n3;secu6t3;e3ima4;llege2rmedia3;te;re;aAe7i6o5u3;ge,m3ng1C;bYid;me0t;gh,l0;a3fXsita2;dy,rWv3;en0y;nd13ppy,r3;d3sh;!y;aFenEhCiBlAoofy,r3;a8e6i5o3ue0Z;o3ss;vy;m,s0;at,e3y;dy,n;nd,y;ad,ib,ooD;a2d1;a3o3;st0;tDuiS;u1y;aCeebBi9l8o6r5u3;ll,n3r0N;!ny;aCesh,iend0;a3nd,rmD;my;at,ir7;erce,nan3;ci9;le;r,ul3;ty;a6erie,sse4v3xtre0B;il;nti3;al;r4s3;tern,y;ly,th0;appZe9i5ru4u3;mb;nk;r5vi4z3;zy;ne;e,ty;a3ep,n9;d3f,r;!ly;agey,h8l7o5r4u3;dd0r0te;isp,uel;ar3ld,mmon,st0ward0zy;se;evKou1;e3il0;ap,e3;sy;aHiFlCoAr5u3;ff,r0sy;ly;a6i3oad;g4llia2;nt;ht;sh,ve;ld,un3;cy;a4o3ue;nd,o1;ck,nd;g,tt3;er;d,ld,w1;dy;bsu6ng5we3;so3;me;ry;rd",Adverb:"true¦a08b05d00eYfSheQinPjustOkinda,likewiZmMnJoEpCquite,r9s5t2u0very,well;ltima01p0; to,wards5;h1iny bit,o0wiO;o,t6;en,us;eldom,o0uch;!me1rt0; of;how,times,w0C;a1e0;alS;ndomRth05;ar excellenEer0oint blank; Lhaps;f3n0utright;ce0ly;! 0;ag05moX; courGten;ewJo0; longWt 0;onHwithstand9;aybe,eanwhiNore0;!ovT;! aboX;deed,steY;lla,n0;ce;or3u0;ck1l9rther0;!moK;ing; 0evK;exampCgood,suH;n mas0vI;se;e0irect2; 2fini0;te0;ly;juAtrop;ackward,y 0;far,no0; means,w; GbroFd nauseam,gEl7ny5part,s4t 2w0;ay,hi0;le;be7l0mo7wor7;arge,ea6; soon,i4;mo0way;re;l 3mo2ongsi1ready,so,togeth0ways;er;de;st;b1t0;hat;ut;ain;ad;lot,posteriori",Conjunction:"true¦aXbTcReNhowMiEjust00noBo9p8supposing,t5wh0yet;e1il0o3;e,st;n1re0thN; if,by,vM;evL;h0il,o;erefOo0;!uU;lus,rovided th9;r0therwiM;! not; mattEr,w0;! 0;since,th4w7;f4n0; 0asmuch;as mIcaForder t0;h0o;at;! 0;only,t0w0;hen;!ev3;ith2ven0;! 0;if,tB;er;o0uz;s,z;e0ut,y the time;cau1f0;ore;se;lt3nd,s 0;far1if,m0soon1t2;uch0; as;hou0;gh",Currency:"true¦$,aud,bQcOdJeurIfHgbp,hkd,iGjpy,kElDp8r7s3usd,x2y1z0¢,£,¥,ден,лв,руб,฿,₡,₨,€,₭,﷼;lotyQł;en,uanP;af,of;h0t5;e0il5;k0q0;elK;oubleJp,upeeJ;e2ound st0;er0;lingG;n0soF;ceEnies;empi7i7;n,r0wanzaCyatC;!onaBw;ls,nr;ori7ranc9;!os;en3i2kk,o0;b0ll2;ra5;me4n0rham4;ar3;e0ny;nt1;aht,itcoin0;!s",Determiner:"true¦aBboth,d9e6few,le5mu8neiDplenty,s4th2various,wh0;at0ich0;evC;a0e4is,ose;!t;everal,ome;!ast,s;a1l0very;!se;ch;e0u;!s;!n0;!o0y;th0;er","Adj|Present":"true¦a07b04cVdQeNfJhollIidRlEmCnarrIoBp9qua8r7s3t2uttFw0;aKet,ro0;ng,u08;endChin;e2hort,l1mooth,our,pa9tray,u0;re,speU;i2ow;cu6da02leSpaN;eplica01i02;ck;aHerfePr0;eseUime,omV;bscu1pen,wn;atu0e3odeH;re;a2e1ive,ow0;er;an;st,y;ow;a2i1oul,r0;ee,inge;rm;iIke,ncy,st;l1mpty,x0;emHpress;abo4ic7;amp,e2i1oub0ry,ull;le;ffu9re6;fu8libe0;raE;alm,l5o0;mpleCn3ol,rr1unterfe0;it;e0u7;ct;juga8sum7;ea1o0;se;n,r;ankru1lu0;nt;pt;li2pproxi0rticula1;ma0;te;ght","Person|Adj":"true¦b3du2earnest,frank,mi2r0san1woo1;an0ich,u1;dy;sty;ella,rown",Modal:"true¦c5lets,m4ought3sh1w0;ill,o5;a0o4;ll,nt;! to,a;ight,ust;an,o0;uld",Verb:"true¦born,cannot,gonna,has,keep tabs,msg","Person|Verb":"true¦b8ch7dr6foster,gra5ja9lan4ma2ni9ollie,p1rob,s0wade;kip,pike,t5ue;at,eg,ier2;ck,r0;k,shal;ce;ce,nt;ew;ase,u1;iff,l1ob,u0;ck;aze,ossom","Person|Date":"true¦a2j0sep;an0une;!uary;p0ugust,v0;ril"},e1=36,Cee="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Kve=Cee.split("").reduce(function(t,e,n){return t[e]=n,t},{}),rVt=function(t){if(Cee[t]!==void 0)return Cee[t];let e=1,n=e1,a="";for(;t>=n;t-=n,e++,n*=e1);for(;e--;){const r=t%e1;a=String.fromCharCode((r<10?48:55)+r)+a,t=(t-r)/e1}return a},iVt=function(t){if(Kve[t]!==void 0)return Kve[t];let e=0,n=1,a=e1,r=1;for(;n=0;i--,r*=e1){let o=t.charCodeAt(i)-48;o>10&&(o-=7),e+=o*r}return e},_ee={toAlphaCode:rVt,fromAlphaCode:iVt},oVt=function(t){const e=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let n=0;n{let i=t.nodes[a];i[0]==="!"&&(e.push(r),i=i.slice(1));const o=i.split(/([A-Z0-9,]+)/g);for(let s=0;s{const i=r.split("¦");return a[i[0]]=i[1],a},{}),n={};return Object.keys(e).forEach(function(a){const r=lVt(e[a]);a==="true"&&(a=!0);for(let i=0;i{let e=uVt(Zve[t]);if(!hVt.test(t)){Object.keys(e).forEach(n=>{kE[n]=t});return}Object.keys(e).forEach(n=>{if(Bee[n]=t,t==="Noun|Verb"){let a=cz(n,fVt);Bee[a]="Plural|Verb"}})});AVt.forEach(t=>kE[t]="Emoticon");delete kE[""];delete kE[null];delete kE[" "];const sn="Singular",Co={beforeTags:{Determiner:sn,Possessive:sn,Acronym:sn,Noun:sn,Adjective:sn,PresentTense:sn,Gerund:sn,PastTense:sn,Infinitive:sn,Date:sn,Ordinal:sn,Demonym:sn},afterTags:{Value:sn,Modal:sn,Copula:sn,PresentTense:sn,PastTense:sn,Demonym:sn,Actor:sn},beforeWords:{the:sn,with:sn,without:sn,of:sn,for:sn,any:sn,all:sn,on:sn,cut:sn,cuts:sn,increase:sn,decrease:sn,raise:sn,drop:sn,save:sn,saved:sn,saves:sn,make:sn,makes:sn,made:sn,minus:sn,plus:sn,than:sn,another:sn,versus:sn,neither:sn,about:sn,favorite:sn,best:sn,daily:sn,weekly:sn,linear:sn,binary:sn,mobile:sn,lexical:sn,technical:sn,computer:sn,scientific:sn,security:sn,government:sn,popular:sn,formal:sn,no:sn,more:sn,one:sn,let:sn,her:sn,his:sn,their:sn,our:sn,us:sn,sheer:sn,monthly:sn,yearly:sn,current:sn,previous:sn,upcoming:sn,last:sn,next:sn,main:sn,initial:sn,final:sn,beginning:sn,end:sn,top:sn,bottom:sn,future:sn,past:sn,major:sn,minor:sn,side:sn,central:sn,peripheral:sn,public:sn,private:sn},afterWords:{of:sn,system:sn,aid:sn,method:sn,utility:sn,tool:sn,reform:sn,therapy:sn,philosophy:sn,room:sn,authority:sn,says:sn,said:sn,wants:sn,wanted:sn,is:sn,did:sn,do:sn,can:sn,wise:sn}},xn="Infinitive",Au={beforeTags:{Modal:xn,Adverb:xn,Negative:xn,Plural:xn},afterTags:{Determiner:xn,Adverb:xn,Possessive:xn,Reflexive:xn,Preposition:xn,Cardinal:xn,Comparative:xn,Superlative:xn},beforeWords:{i:xn,we:xn,you:xn,they:xn,to:xn,please:xn,will:xn,have:xn,had:xn,would:xn,could:xn,should:xn,do:xn,did:xn,does:xn,can:xn,must:xn,us:xn,me:xn,let:xn,even:xn,when:xn,help:xn,he:xn,she:xn,it:xn,being:xn,bi:xn,co:xn,contra:xn,de:xn,inter:xn,intra:xn,mis:xn,pre:xn,out:xn,counter:xn,nobody:xn,somebody:xn,anybody:xn,everybody:xn},afterWords:{the:xn,me:xn,you:xn,him:xn,us:xn,her:xn,his:xn,them:xn,they:xn,it:xn,himself:xn,herself:xn,itself:xn,myself:xn,ourselves:xn,themselves:xn,something:xn,anything:xn,a:xn,an:xn,up:xn,down:xn,by:xn,out:xn,off:xn,under:xn,what:xn,all:xn,to:xn,because:xn,although:xn,how:xn,otherwise:xn,together:xn,though:xn,into:xn,yet:xn,more:xn,here:xn,there:xn,away:xn}},bVt={beforeTags:Object.assign({},Au.beforeTags,Co.beforeTags,{}),afterTags:Object.assign({},Au.afterTags,Co.afterTags,{}),beforeWords:Object.assign({},Au.beforeWords,Co.beforeWords,{}),afterWords:Object.assign({},Au.afterWords,Co.afterWords,{})},Dn="Adjective",Js={beforeTags:{Determiner:Dn,Possessive:Dn,Hyphenated:Dn},afterTags:{Adjective:Dn},beforeWords:{seem:Dn,seemed:Dn,seems:Dn,feel:Dn,feels:Dn,felt:Dn,stay:Dn,appear:Dn,appears:Dn,appeared:Dn,also:Dn,over:Dn,under:Dn,too:Dn,it:Dn,but:Dn,still:Dn,really:Dn,quite:Dn,well:Dn,very:Dn,truly:Dn,how:Dn,deeply:Dn,hella:Dn,profoundly:Dn,extremely:Dn,so:Dn,badly:Dn,mostly:Dn,totally:Dn,awfully:Dn,rather:Dn,nothing:Dn,something:Dn,anything:Dn,not:Dn,me:Dn,is:Dn,face:Dn,faces:Dn,faced:Dn,look:Dn,looks:Dn,looked:Dn,reveal:Dn,reveals:Dn,revealed:Dn,sound:Dn,sounded:Dn,sounds:Dn,remains:Dn,remained:Dn,prove:Dn,proves:Dn,proved:Dn,becomes:Dn,stays:Dn,tastes:Dn,taste:Dn,smells:Dn,smell:Dn,gets:Dn,grows:Dn,as:Dn,rings:Dn,radiates:Dn,conveys:Dn,convey:Dn,conveyed:Dn,of:Dn},afterWords:{too:Dn,also:Dn,or:Dn,enough:Dn,as:Dn}},Pa="Gerund",H0={beforeTags:{Adverb:Pa,Preposition:Pa,Conjunction:Pa},afterTags:{Adverb:Pa,Possessive:Pa,Person:Pa,Pronoun:Pa,Determiner:Pa,Copula:Pa,Preposition:Pa,Conjunction:Pa,Comparative:Pa},beforeWords:{been:Pa,keep:Pa,continue:Pa,stop:Pa,am:Pa,be:Pa,me:Pa,began:Pa,start:Pa,starts:Pa,started:Pa,stops:Pa,stopped:Pa,help:Pa,helps:Pa,avoid:Pa,avoids:Pa,love:Pa,loves:Pa,loved:Pa,hate:Pa,hates:Pa,hated:Pa},afterWords:{you:Pa,me:Pa,her:Pa,him:Pa,his:Pa,them:Pa,their:Pa,it:Pa,this:Pa,there:Pa,on:Pa,about:Pa,for:Pa,up:Pa,down:Pa}},Gr="Gerund",Jy="Adjective",yVt={beforeTags:Object.assign({},Js.beforeTags,H0.beforeTags,{Imperative:Gr,Infinitive:Jy,Plural:Gr}),afterTags:Object.assign({},Js.afterTags,H0.afterTags,{Noun:Jy}),beforeWords:Object.assign({},Js.beforeWords,H0.beforeWords,{is:Jy,are:Gr,was:Jy,of:Jy,suggest:Gr,suggests:Gr,suggested:Gr,recommend:Gr,recommends:Gr,recommended:Gr,imagine:Gr,imagines:Gr,imagined:Gr,consider:Gr,considered:Gr,considering:Gr,resist:Gr,resists:Gr,resisted:Gr,avoid:Gr,avoided:Gr,avoiding:Gr,except:Jy,accept:Jy,assess:Gr,explore:Gr,fear:Gr,fears:Gr,appreciate:Gr,question:Gr,help:Gr,embrace:Gr,with:Jy}),afterWords:Object.assign({},Js.afterWords,H0.afterWords,{to:Gr,not:Gr,the:Gr})},Jve={beforeTags:{Determiner:void 0,Cardinal:"Noun",PhrasalVerb:"Adjective"},afterTags:{}},wVt={beforeTags:Object.assign({},Js.beforeTags,Co.beforeTags,Jve.beforeTags),afterTags:Object.assign({},Js.afterTags,Co.afterTags,Jve.afterTags),beforeWords:Object.assign({},Js.beforeWords,Co.beforeWords,{are:"Adjective",is:"Adjective",was:"Adjective",be:"Adjective",off:"Adjective",out:"Adjective"}),afterWords:Object.assign({},Js.afterWords,Co.afterWords)};let Va="PastTense",rQ="Adjective";const b8={beforeTags:{Adverb:Va,Pronoun:Va,ProperNoun:Va,Auxiliary:Va,Noun:Va},afterTags:{Possessive:Va,Pronoun:Va,Determiner:Va,Adverb:Va,Comparative:Va,Date:Va,Gerund:Va},beforeWords:{be:Va,who:Va,get:rQ,had:Va,has:Va,have:Va,been:Va,it:Va,as:Va,for:rQ,more:rQ,always:rQ},afterWords:{by:Va,back:Va,out:Va,in:Va,up:Va,down:Va,before:Va,after:Va,for:Va,the:Va,with:Va,as:Va,on:Va,at:Va,between:Va,to:Va,into:Va,us:Va,them:Va,his:Va,her:Va,their:Va,our:Va,me:Va,about:rQ}},vVt={beforeTags:Object.assign({},Js.beforeTags,b8.beforeTags),afterTags:Object.assign({},Js.afterTags,b8.afterTags),beforeWords:Object.assign({},Js.beforeWords,b8.beforeWords),afterWords:Object.assign({},Js.afterWords,b8.afterWords)},kVt={afterTags:{Noun:"Adjective",Conjunction:void 0}},xVt={beforeTags:Object.assign({},Js.beforeTags,Au.beforeTags,{Adverb:void 0,Negative:void 0}),afterTags:Object.assign({},Js.afterTags,Au.afterTags,kVt.afterTags),beforeWords:Object.assign({},Js.beforeWords,Au.beforeWords,{have:void 0,had:void 0,not:void 0,went:"Adjective",goes:"Adjective",got:"Adjective",be:"Adjective"}),afterWords:Object.assign({},Js.afterWords,Au.afterWords,{to:void 0,as:"Adjective"})},y8={beforeTags:{Copula:"Gerund",PastTense:"Gerund",PresentTense:"Gerund",Infinitive:"Gerund"},afterTags:{Value:"Gerund"},beforeWords:{are:"Gerund",were:"Gerund",be:"Gerund",no:"Gerund",without:"Gerund",you:"Gerund",we:"Gerund",they:"Gerund",he:"Gerund",she:"Gerund",us:"Gerund",them:"Gerund"},afterWords:{the:"Gerund",this:"Gerund",that:"Gerund",me:"Gerund",us:"Gerund",them:"Gerund"}},OVt={beforeTags:Object.assign({},H0.beforeTags,Co.beforeTags,y8.beforeTags),afterTags:Object.assign({},H0.afterTags,Co.afterTags,y8.afterTags),beforeWords:Object.assign({},H0.beforeWords,Co.beforeWords,y8.beforeWords),afterWords:Object.assign({},H0.afterWords,Co.afterWords,y8.afterWords)},qO="Singular",Zv="Infinitive",CVt={beforeTags:Object.assign({},Au.beforeTags,Co.beforeTags,{Adjective:qO,Particle:qO}),afterTags:Object.assign({},Au.afterTags,Co.afterTags,{ProperNoun:Zv,Gerund:Zv,Adjective:Zv,Copula:qO}),beforeWords:Object.assign({},Au.beforeWords,Co.beforeWords,{is:qO,was:qO,of:qO,have:null}),afterWords:Object.assign({},Au.afterWords,Co.afterWords,{instead:Zv,about:Zv,his:Zv,her:Zv,to:null,by:null,in:null})},ri="Person",ec={beforeTags:{Honorific:ri,Person:ri},afterTags:{Person:ri,ProperNoun:ri,Verb:ri},ownTags:{ProperNoun:ri},beforeWords:{hi:ri,hey:ri,yo:ri,dear:ri,hello:ri},afterWords:{said:ri,says:ri,told:ri,tells:ri,feels:ri,felt:ri,seems:ri,thinks:ri,thought:ri,spends:ri,spendt:ri,plays:ri,played:ri,sing:ri,sang:ri,learn:ri,learned:ri,wants:ri,wanted:ri}},no="Month",_Vt="Person",w8={beforeTags:{Date:no,Value:no},afterTags:{Date:no,Value:no},beforeWords:{by:no,in:no,on:no,during:no,after:no,before:no,between:no,until:no,til:no,sometime:no,of:no,this:no,next:no,last:no,previous:no,following:no,with:_Vt},afterWords:{sometime:no,in:no,of:no,until:no,the:no}},BVt={beforeTags:Object.assign({},ec.beforeTags,w8.beforeTags),afterTags:Object.assign({},ec.afterTags,w8.afterTags),beforeWords:Object.assign({},ec.beforeWords,w8.beforeWords),afterWords:Object.assign({},ec.afterWords,w8.afterWords)},EVt={beforeTags:Object.assign({},Co.beforeTags,ec.beforeTags),afterTags:Object.assign({},Co.afterTags,ec.afterTags),beforeWords:Object.assign({},Co.beforeWords,ec.beforeWords,{i:"Infinitive",we:"Infinitive"}),afterWords:Object.assign({},Co.afterWords,ec.afterWords)},QVt={beforeTags:Object.assign({},Co.beforeTags,ec.beforeTags,Au.beforeTags),afterTags:Object.assign({},Co.afterTags,ec.afterTags,Au.afterTags),beforeWords:Object.assign({},Co.beforeWords,ec.beforeWords,Au.beforeWords),afterWords:Object.assign({},Co.afterWords,ec.afterWords,Au.afterWords)},Al="Place",v8={beforeTags:{Place:Al},afterTags:{Place:Al,Abbreviation:Al},beforeWords:{in:Al,by:Al,near:Al,from:Al,to:Al},afterWords:{in:Al,by:Al,near:Al,from:Al,to:Al,government:Al,council:Al,region:Al,city:Al}},SVt={beforeTags:Object.assign({},v8.beforeTags,ec.beforeTags),afterTags:Object.assign({},v8.afterTags,ec.afterTags),beforeWords:Object.assign({},v8.beforeWords,ec.beforeWords),afterWords:Object.assign({},v8.afterWords,ec.afterWords)},IVt={beforeTags:Object.assign({},ec.beforeTags,Js.beforeTags),afterTags:Object.assign({},ec.afterTags,Js.afterTags),beforeWords:Object.assign({},ec.beforeWords,Js.beforeWords),afterWords:Object.assign({},ec.afterWords,Js.afterWords)};let mA="Unit";const DVt={beforeTags:{Value:mA},afterTags:{},beforeWords:{per:mA,every:mA,each:mA,square:mA,cubic:mA,sq:mA,metric:mA},afterWords:{per:mA,squared:mA,cubed:mA,long:mA}},TC={"Actor|Verb":bVt,"Adj|Gerund":yVt,"Adj|Noun":wVt,"Adj|Past":vVt,"Adj|Present":xVt,"Noun|Verb":CVt,"Noun|Gerund":OVt,"Person|Noun":EVt,"Person|Date":BVt,"Person|Verb":QVt,"Person|Place":SVt,"Person|Adj":IVt,"Unit|Noun":DVt},k8=(t,e)=>{let n=Object.keys(t).reduce((a,r)=>(a[r]=t[r]==="Infinitive"?"PresentTense":"Plural",a),{});return Object.assign(n,e)};TC["Plural|Verb"]={beforeWords:k8(TC["Noun|Verb"].beforeWords,{had:"Plural",have:"Plural"}),afterWords:k8(TC["Noun|Verb"].afterWords,{his:"PresentTense",her:"PresentTense",its:"PresentTense",in:null,to:null,is:"PresentTense",by:"PresentTense"}),beforeTags:k8(TC["Noun|Verb"].beforeTags,{Conjunction:"PresentTense",Noun:void 0,ProperNoun:"PresentTense"}),afterTags:k8(TC["Noun|Verb"].afterTags,{Gerund:"Plural",Noun:"PresentTense",Value:"PresentTense"})};const ii="Adjective",Mc="Infinitive",Kv="PresentTense",or="Singular",zc="PastTense",jO="Adverb",pp="Plural",Do="Actor",x8="Verb",Ll="Noun",$Vt="ProperNoun",wm="LastName",eke="Modal",Ei="Place",gH="Participle",TVt=[null,null,{ea:or,ia:Ll,ic:ii,ly:jO,"'n":x8,"'t":x8},{oed:zc,ued:zc,xed:zc," so":jO,"'ll":eke,"'re":"Copula",azy:ii,eer:Ll,end:x8,ped:zc,ffy:ii,ify:Mc,ing:"Gerund",ize:Mc,ibe:Mc,lar:ii,mum:ii,nes:Kv,nny:ii,ous:ii,que:ii,ger:Ll,ber:Ll,rol:or,sis:or,ogy:or,oid:or,ian:or,zes:Kv,eld:zc,ken:gH,ven:gH,ten:gH,ect:Mc,ict:Mc,ign:Mc,oze:Mc,ful:ii,bal:ii,ton:Ll,pur:Ei},{amed:zc,aped:zc,ched:zc,lked:zc,rked:zc,reed:zc,nded:zc,mned:ii,cted:zc,dged:zc,ield:or,akis:wm,cede:Mc,chuk:wm,czyk:wm,ects:Kv,iend:or,ends:x8,enko:wm,ette:or,iary:or,wner:or,fies:Kv,fore:jO,gate:Mc,gone:ii,ices:pp,ints:pp,ruct:Mc,ines:pp,ions:pp,ners:pp,pers:pp,lers:pp,less:ii,llen:ii,made:ii,nsen:wm,oses:Kv,ould:eke,some:ii,sson:wm,ians:pp,tion:or,tage:Ll,ique:or,tive:ii,tors:Ll,vice:or,lier:or,fier:or,wned:zc,gent:or,tist:Do,pist:Do,rist:Do,mist:Do,yist:Do,vist:Do,ists:Do,lite:or,site:or,rite:or,mite:or,bite:or,mate:or,date:or,ndal:or,vent:or,uist:Do,gist:Do,note:or,cide:or,ence:or,wide:ii,vide:Mc,ract:Mc,duce:Mc,pose:Mc,eive:Mc,lyze:Mc,lyse:Mc,iant:ii,nary:ii,ghty:ii,uent:ii,erer:Do,bury:Ei,dorf:Ll,esty:Ll,wych:Ei,dale:Ei,folk:Ei,vale:Ei,abad:Ei,sham:Ei,wick:Ei,view:Ei},{elist:Do,holic:or,phite:or,tized:zc,urned:zc,eased:zc,ances:pp,bound:ii,ettes:pp,fully:jO,ishes:Kv,ities:pp,marek:wm,nssen:wm,ology:Ll,osome:or,tment:or,ports:pp,rough:ii,tches:Kv,tieth:"Ordinal",tures:pp,wards:jO,where:jO,archy:Ll,pathy:Ll,opoly:Ll,embly:Ll,phate:Ll,ndent:or,scent:or,onist:Do,anist:Do,alist:Do,olist:Do,icist:Do,ounce:Mc,iable:ii,borne:ii,gnant:ii,inant:ii,igent:ii,atory:ii,rient:or,dient:or,maker:Do,burgh:Ei,mouth:Ei,ceter:Ei,ville:Ei,hurst:Ei,stead:Ei,endon:Ei,brook:Ei,shire:Ei,worth:Ll,field:$Vt,ridge:Ei},{auskas:wm,parent:or,cedent:or,ionary:or,cklist:or,brooke:Ei,keeper:Do,logist:Do,teenth:"Value",worker:Do,master:Do,writer:Do,brough:Ei,cester:Ei,ington:Ei,cliffe:Ei,ingham:Ei},{chester:Ei,logists:Do,opoulos:wm,borough:Ei,sdottir:wm}],Ap="Adjective",Qi="Noun",iQ="Verb",PVt=[null,null,{},{neo:Qi,bio:Qi,"de-":iQ,"re-":iQ,"un-":iQ,"ex-":Qi},{anti:Qi,auto:Qi,faux:Ap,hexa:Qi,kilo:Qi,mono:Qi,nano:Qi,octa:Qi,poly:Qi,semi:Ap,tele:Qi,"pro-":Ap,"mis-":iQ,"dis-":iQ,"pre-":Ap},{anglo:Qi,centi:Qi,ethno:Qi,ferro:Qi,grand:Qi,hepta:Qi,hydro:Qi,intro:Qi,macro:Qi,micro:Qi,milli:Qi,nitro:Qi,penta:Qi,quasi:Ap,radio:Qi,tetra:Qi,"omni-":Ap,"post-":Ap},{pseudo:Ap,"extra-":Ap,"hyper-":Ap,"inter-":Ap,"intra-":Ap,"deca-":Ap},{electro:Qi}],go="Adjective",O8="Infinitive",C8="PresentTense",If="Singular",Pu="PastTense",tke="Adverb",Df="Expression",nke="Actor",ake="Verb",rke="Noun",_8="LastName",FVt={a:[[/.[aeiou]na$/,rke,"tuna"],[/.[oau][wvl]ska$/,_8],[/.[^aeiou]ica$/,If,"harmonica"],[/^([hyj]a+)+$/,Df,"haha"]],c:[[/.[^aeiou]ic$/,go]],d:[[/[aeiou](pp|ll|ss|ff|gg|tt|rr|bb|nn|mm)ed$/,Pu,"popped"],[/.[aeo]{2}[bdgmnprvz]ed$/,Pu,"rammed"],[/.[aeiou][sg]hed$/,Pu,"gushed"],[/.[aeiou]red$/,Pu,"hired"],[/.[aeiou]r?ried$/,Pu,"hurried"],[/[^aeiou]ard$/,If,"steward"],[/[aeiou][^aeiou]id$/,go,""],[/.[vrl]id$/,go,"livid"],[/..led$/,Pu,"hurled"],[/.[iao]sed$/,Pu,""],[/[aeiou]n?[cs]ed$/,Pu,""],[/[aeiou][rl]?[mnf]ed$/,Pu,""],[/[aeiou][ns]?c?ked$/,Pu,"bunked"],[/[aeiou]gned$/,Pu],[/[aeiou][nl]?ged$/,Pu],[/.[tdbwxyz]ed$/,Pu],[/[^aeiou][aeiou][tvx]ed$/,Pu],[/.[cdflmnprstv]ied$/,Pu,"emptied"]],e:[[/.[lnr]ize$/,O8,"antagonize"],[/.[^aeiou]ise$/,O8,"antagonise"],[/.[aeiou]te$/,O8,"bite"],[/.[^aeiou][ai]ble$/,go,"fixable"],[/.[^aeiou]eable$/,go,"maleable"],[/.[ts]ive$/,go,"festive"],[/[a-z]-like$/,go,"woman-like"]],h:[[/.[^aeiouf]ish$/,go,"cornish"],[/.v[iy]ch$/,_8,"..ovich"],[/^ug?h+$/,Df,"ughh"],[/^uh[ -]?oh$/,Df,"uhoh"],[/[a-z]-ish$/,go,"cartoon-ish"]],i:[[/.[oau][wvl]ski$/,_8,"polish-male"]],k:[[/^(k){2}$/,Df,"kkkk"]],l:[[/.[gl]ial$/,go,"familial"],[/.[^aeiou]ful$/,go,"fitful"],[/.[nrtumcd]al$/,go,"natal"],[/.[^aeiou][ei]al$/,go,"familial"]],m:[[/.[^aeiou]ium$/,If,"magnesium"],[/[^aeiou]ism$/,If,"schism"],[/^[hu]m+$/,Df,"hmm"],[/^\d+ ?[ap]m$/,"Date","3am"]],n:[[/.[lsrnpb]ian$/,go,"republican"],[/[^aeiou]ician$/,nke,"musician"],[/[aeiou][ktrp]in'$/,"Gerund","cookin'"]],o:[[/^no+$/,Df,"noooo"],[/^(yo)+$/,Df,"yoo"],[/^wo{2,}[pt]?$/,Df,"woop"]],r:[[/.[bdfklmst]ler$/,"Noun"],[/[aeiou][pns]er$/,If],[/[^i]fer$/,O8],[/.[^aeiou][ao]pher$/,nke],[/.[lk]er$/,"Noun"],[/.ier$/,"Comparative"]],t:[[/.[di]est$/,"Superlative"],[/.[icldtgrv]ent$/,go],[/[aeiou].*ist$/,go],[/^[a-z]et$/,ake]],s:[[/.[^aeiou]ises$/,C8],[/.[rln]ates$/,C8],[/.[^z]ens$/,ake],[/.[lstrn]us$/,If],[/.[aeiou]sks$/,C8],[/.[aeiou]kes$/,C8],[/[aeiou][^aeiou]is$/,If],[/[a-z]'s$/,rke],[/^yes+$/,Df]],v:[[/.[^aeiou][ai][kln]ov$/,_8]],y:[[/.[cts]hy$/,go],[/.[st]ty$/,go],[/.[tnl]ary$/,go],[/.[oe]ry$/,If],[/[rdntkbhs]ly$/,tke],[/.(gg|bb|zz)ly$/,go],[/...lly$/,tke],[/.[gk]y$/,go],[/[bszmp]{2}y$/,go],[/.[ai]my$/,go],[/[ea]{2}zy$/,go],[/.[^aeiou]ity$/,If]]},Nl="Verb",Ui="Noun",RVt={leftTags:[["Adjective",Ui],["Possessive",Ui],["Determiner",Ui],["Adverb",Nl],["Pronoun",Nl],["Value",Ui],["Ordinal",Ui],["Modal",Nl],["Superlative",Ui],["Demonym",Ui],["Honorific","Person"]],leftWords:[["i",Nl],["first",Ui],["it",Nl],["there",Nl],["not",Nl],["because",Ui],["if",Ui],["but",Ui],["who",Nl],["this",Ui],["his",Ui],["when",Ui],["you",Nl],["very","Adjective"],["old",Ui],["never",Nl],["before",Ui],["a",Ui],["the",Ui],["been",Nl]],rightTags:[["Copula",Ui],["PastTense",Ui],["Conjunction",Ui],["Modal",Ui]],rightWords:[["there",Nl],["me",Nl],["man","Adjective"],["him",Nl],["it",Nl],["were",Ui],["took",Ui],["himself",Nl],["went",Ui],["who",Ui],["jr","Person"]]},Tx={Comparative:{fwd:"3:ser,ier¦1er:h,t,f,l,n¦1r:e¦2er:ss,or,om",both:"3er:ver,ear,alm¦3ner:hin¦3ter:lat¦2mer:im¦2er:ng,rm,mb¦2ber:ib¦2ger:ig¦1er:w,p,k,d¦ier:y",rev:"1:tter,yer¦2:uer,ver,ffer,oner,eler,ller,iler,ster,cer,uler,sher,ener,gher,aner,adder,nter,eter,rter,hter,rner,fter¦3:oser,ooler,eafer,user,airer,bler,maler,tler,eater,uger,rger,ainer,urer,ealer,icher,pler,emner,icter,nser,iser¦4:arser,viner,ucher,rosser,somer,ndomer,moter,oother,uarer,hiter¦5:nuiner,esser,emier¦ar:urther",ex:"worse:bad¦better:good¦4er:fair,gray,poor¦1urther:far¦3ter:fat,hot,wet¦3der:mad,sad¦3er:shy,fun¦4der:glad¦:¦4r:cute,dire,fake,fine,free,lame,late,pale,rare,ripe,rude,safe,sore,tame,wide¦5r:eerie,stale"},Gerund:{fwd:"1:nning,tting,rring,pping,eing,mming,gging,dding,bbing,kking¦2:eking,oling,eling,eming¦3:velling,siting,uiting,fiting,loting,geting,ialing,celling¦4:graming",both:"1:aing,iing,fing,xing,ying,oing,hing,wing¦2:tzing,rping,izzing,bting,mning,sping,wling,rling,wding,rbing,uping,lming,wning,mping,oning,lting,mbing,lking,fting,hting,sking,gning,pting,cking,ening,nking,iling,eping,ering,rting,rming,cting,lping,ssing,nting,nding,lding,sting,rning,rding,rking¦3:belling,siping,toming,yaking,uaking,oaning,auling,ooping,aiding,naping,euring,tolling,uzzing,ganing,haning,ualing,halling,iasing,auding,ieting,ceting,ouling,voring,ralling,garing,joring,oaming,oaking,roring,nelling,ooring,uelling,eaming,ooding,eaping,eeting,ooting,ooming,xiting,keting,ooking,ulling,airing,oaring,biting,outing,oiting,earing,naling,oading,eeding,ouring,eaking,aiming,illing,oining,eaning,onging,ealing,aining,eading¦4:thoming,melling,aboring,ivoting,weating,dfilling,onoring,eriting,imiting,tialling,rgining,otoring,linging,winging,lleting,louding,spelling,mpelling,heating,feating,opelling,choring,welling,ymaking,ctoring,calling,peating,iloring,laiting,utoring,uditing,mmaking,loating,iciting,waiting,mbating,voiding,otalling,nsoring,nselling,ocusing,itoring,eloping¦5:rselling,umpeting,atrolling,treating,tselling,rpreting,pringing,ummeting,ossoming,elmaking,eselling,rediting,totyping,onmaking,rfeiting,ntrolling¦5e:chmaking,dkeeping,severing,erouting,ecreting,ephoning,uthoring,ravening,reathing,pediting,erfering,eotyping,fringing,entoring,ombining,ompeting¦4e:emaking,eething,twining,rruling,chuting,xciting,rseding,scoping,edoring,pinging,lunging,agining,craping,pleting,eleting,nciting,nfining,ncoding,tponing,ecoding,writing,esaling,nvening,gnoring,evoting,mpeding,rvening,dhering,mpiling,storing,nviting,ploring¦3e:tining,nuring,saking,miring,haling,ceding,xuding,rining,nuting,laring,caring,miling,riding,hoking,piring,lading,curing,uading,noting,taping,futing,paring,hading,loding,siring,guring,vading,voking,during,niting,laning,caping,luting,muting,ruding,ciding,juring,laming,caling,hining,uoting,liding,ciling,duling,tuting,puting,cuting,coring,uiding,tiring,turing,siding,rading,enging,haping,buting,lining,taking,anging,haring,uiring,coming,mining,moting,suring,viding,luding¦2e:tring,zling,uging,oging,gling,iging,vring,fling,lging,obing,psing,pling,ubing,cling,dling,wsing,iking,rsing,dging,kling,ysing,tling,rging,eging,nsing,uning,osing,uming,using,ibing,bling,aging,ising,asing,ating¦2ie:rlying¦1e:zing,uing,cing,ving",rev:"ying:ie¦1ing:se,ke,te,we,ne,re,de,pe,me,le,c,he¦2ing:ll,ng,dd,ee,ye,oe,rg,us¦2ning:un¦2ging:og,ag,ug,ig,eg¦2ming:um¦2bing:ub,ab,eb,ob¦3ning:lan,can,hin,pin,win¦3ring:cur,lur,tir,tar,pur,car¦3ing:ait,del,eel,fin,eat,oat,eem,lel,ool,ein,uin¦3ping:rop,rap,top,uip,wap,hip,hop,lap,rip,cap¦3ming:tem,wim,rim,kim,lim¦3ting:mat,cut,pot,lit,lot,hat,set,pit,put¦3ding:hed,bed,bid¦3king:rek¦3ling:cil,pel¦3bing:rib¦4ning:egin¦4ing:isit,ruit,ilot,nsit,dget,rkel,ival,rcel¦4ring:efer,nfer¦4ting:rmit,mmit,ysit,dmit,emit,bmit,tfit,gret¦4ling:evel,xcel,ivel¦4ding:hred¦5ing:arget,posit,rofit¦5ring:nsfer¦5ting:nsmit,orget,cquit¦5ling:ancel,istil",ex:"3:adding,eating,aiming,aiding,airing,outing,gassing,setting,getting,putting,cutting,winning,sitting,betting,mapping,tapping,letting,bidding,hitting,tanning,netting,popping,fitting,capping,lapping,barring,banning,vetting,topping,rotting,tipping,potting,wetting,pitting,dipping,budding,hemming,pinning,jetting,kidding,padding,podding,sipping,wedding,bedding,donning,warring,penning,gutting,cueing,wadding,petting,ripping,napping,matting,tinning,binning,dimming,hopping,mopping,nodding,panning,rapping,ridding,sinning¦4:selling,falling,calling,waiting,editing,telling,rolling,heating,boating,hanging,beating,coating,singing,tolling,felling,polling,discing,seating,voiding,gelling,yelling,baiting,reining,ruining,seeking,spanning,stepping,knitting,emitting,slipping,quitting,dialing,omitting,clipping,shutting,skinning,abutting,flipping,trotting,cramming,fretting,suiting¦5:bringing,treating,spelling,stalling,trolling,expelling,rivaling,wringing,deterring,singeing,befitting,refitting¦6:enrolling,distilling,scrolling,strolling,caucusing,travelling¦7:installing,redefining,stencilling,recharging,overeating,benefiting,unraveling,programing¦9:reprogramming¦is:being¦2e:using,aging,owing¦3e:making,taking,coming,noting,hiring,filing,coding,citing,doping,baking,coping,hoping,lading,caring,naming,voting,riding,mining,curing,lining,ruling,typing,boring,dining,firing,hiding,piling,taping,waning,baling,boning,faring,honing,wiping,luring,timing,wading,piping,fading,biting,zoning,daring,waking,gaming,raking,ceding,tiring,coking,wining,joking,paring,gaping,poking,pining,coring,liming,toting,roping,wiring,aching¦4e:writing,storing,eroding,framing,smoking,tasting,wasting,phoning,shaking,abiding,braking,flaking,pasting,priming,shoring,sloping,withing,hinging¦5e:defining,refining,renaming,swathing,fringing,reciting¦1ie:dying,tying,lying,vying¦7e:sunbathing"},Participle:{fwd:"1:mt¦2:llen¦3:iven,aken¦:ne¦y:in",both:"1:wn¦2:me,aten¦3:seen,bidden,isen¦4:roven,asten¦3l:pilt¦3d:uilt¦2e:itten¦1im:wum¦1eak:poken¦1ine:hone¦1ose:osen¦1in:gun¦1ake:woken¦ear:orn¦eal:olen¦eeze:ozen¦et:otten¦ink:unk¦ing:ung",rev:"2:un¦oken:eak¦ought:eek¦oven:eave¦1ne:o¦1own:ly¦1den:de¦1in:ay¦2t:am¦2n:ee¦3en:all¦4n:rive,sake,take¦5n:rgive",ex:"2:been¦3:seen,run¦4:given,taken¦5:shaken¦2eak:broken¦1ive:dove¦2y:flown¦3e:hidden,ridden¦1eek:sought¦1ake:woken¦1eave:woven"},PastTense:{fwd:"1:tted,wed,gged,nned,een,rred,pped,yed,bbed,oed,dded,rd,wn,mmed¦2:eed,nded,et,hted,st,oled,ut,emed,eled,lded,ken,rt,nked,apt,ant,eped,eked¦3:eared,eat,eaded,nelled,ealt,eeded,ooted,eaked,eaned,eeted,mited,bid,uit,ead,uited,ealed,geted,velled,ialed,belled¦4:ebuted,hined,comed¦y:ied¦ome:ame¦ear:ore¦ind:ound¦ing:ung,ang¦ep:pt¦ink:ank,unk¦ig:ug¦all:ell¦ee:aw¦ive:ave¦eeze:oze¦old:eld¦ave:ft¦ake:ook¦ell:old¦ite:ote¦ide:ode¦ine:one¦in:un,on¦eal:ole¦im:am¦ie:ay¦and:ood¦1ise:rose¦1eak:roke¦1ing:rought¦1ive:rove¦1el:elt¦1id:bade¦1et:got¦1y:aid¦1it:sat¦3e:lid¦3d:pent",both:"1:aed,fed,xed,hed¦2:sged,xted,wled,rped,lked,kied,lmed,lped,uped,bted,rbed,rked,wned,rled,mped,fted,mned,mbed,zzed,omed,ened,cked,gned,lted,sked,ued,zed,nted,ered,rted,rmed,ced,sted,rned,ssed,rded,pted,ved,cted¦3:cled,eined,siped,ooned,uked,ymed,jored,ouded,ioted,oaned,lged,asped,iged,mured,oided,eiled,yped,taled,moned,yled,lit,kled,oaked,gled,naled,fled,uined,oared,valled,koned,soned,aided,obed,ibed,meted,nicked,rored,micked,keted,vred,ooped,oaded,rited,aired,auled,filled,ouled,ooded,ceted,tolled,oited,bited,aped,tled,vored,dled,eamed,nsed,rsed,sited,owded,pled,sored,rged,osed,pelled,oured,psed,oated,loned,aimed,illed,eured,tred,ioned,celled,bled,wsed,ooked,oiled,itzed,iked,iased,onged,ased,ailed,uned,umed,ained,auded,nulled,ysed,eged,ised,aged,oined,ated,used,dged,doned¦4:ntied,efited,uaked,caded,fired,roped,halled,roked,himed,culed,tared,lared,tuted,uared,routed,pited,naked,miled,houted,helled,hared,cored,caled,tired,peated,futed,ciled,called,tined,moted,filed,sided,poned,iloted,honed,lleted,huted,ruled,cured,named,preted,vaded,sured,talled,haled,peded,gined,nited,uided,ramed,feited,laked,gured,ctored,unged,pired,cuted,voked,eloped,ralled,rined,coded,icited,vided,uaded,voted,mined,sired,noted,lined,nselled,luted,jured,fided,puted,piled,pared,olored,cided,hoked,enged,tured,geoned,cotted,lamed,uiled,waited,udited,anged,luded,mired,uired,raded¦5:modelled,izzled,eleted,umpeted,ailored,rseded,treated,eduled,ecited,rammed,eceded,atrolled,nitored,basted,twined,itialled,ncited,gnored,ploded,xcited,nrolled,namelled,plored,efeated,redited,ntrolled,nfined,pleted,llided,lcined,eathed,ibuted,lloted,dhered,cceded¦3ad:sled¦2aw:drew¦2ot:hot¦2ke:made¦2ow:hrew,grew¦2ose:hose¦2d:ilt¦2in:egan¦1un:ran¦1ink:hought¦1ick:tuck¦1ike:ruck¦1eak:poke,nuck¦1it:pat¦1o:did¦1ow:new¦1ake:woke¦go:went",rev:"3:rst,hed,hut,cut,set¦4:tbid¦5:dcast,eread,pread,erbid¦ought:uy,eek¦1ied:ny,ly,dy,ry,fy,py,vy,by,ty,cy¦1ung:ling,ting,wing¦1pt:eep¦1ank:rink¦1ore:bear,wear¦1ave:give¦1oze:reeze¦1ound:rind,wind¦1ook:take,hake¦1aw:see¦1old:sell¦1ote:rite¦1ole:teal¦1unk:tink¦1am:wim¦1ay:lie¦1ood:tand¦1eld:hold¦2d:he,ge,re,le,leed,ne,reed,be,ye,lee,pe,we¦2ed:dd,oy,or,ey,gg,rr,us,ew,to¦2ame:ecome,rcome¦2ped:ap¦2ged:ag,og,ug,eg¦2bed:ub,ab,ib,ob¦2lt:neel¦2id:pay¦2ang:pring¦2ove:trive¦2med:um¦2ode:rride¦2at:ysit¦3ted:mit,hat,mat,lat,pot,rot,bat¦3ed:low,end,tow,und,ond,eem,lay,cho,dow,xit,eld,ald,uld,law,lel,eat,oll,ray,ank,fin,oam,out,how,iek,tay,haw,ait,vet,say,cay,bow¦3d:ste,ede,ode,ete,ree,ude,ame,oke,ote,ime,ute,ade¦3red:lur,cur,pur,car¦3ped:hop,rop,uip,rip,lip,tep,top¦3ded:bed,rod,kid¦3ade:orbid¦3led:uel¦3ned:lan,can,kin,pan,tun¦3med:rim,lim¦4ted:quit,llot¦4ed:pear,rrow,rand,lean,mand,anel,pand,reet,link,abel,evel,imit,ceed,ruit,mind,peal,veal,hool,head,pell,well,mell,uell,band,hear,weak¦4led:nnel,qual,ebel,ivel¦4red:nfer,efer,sfer¦4n:sake,trew¦4d:ntee¦4ded:hred¦4ned:rpin¦5ed:light,nceal,right,ndear,arget,hread,eight,rtial,eboot¦5d:edite,nvite¦5ted:egret¦5led:ravel",ex:"2:been,upped¦3:added,aged,aided,aimed,aired,bid,died,dyed,egged,erred,eyed,fit,gassed,hit,lied,owed,pent,pied,tied,used,vied,oiled,outed,banned,barred,bet,canned,cut,dipped,donned,ended,feed,inked,jarred,let,manned,mowed,netted,padded,panned,pitted,popped,potted,put,set,sewn,sowed,tanned,tipped,topped,vowed,weed,bowed,jammed,binned,dimmed,hopped,mopped,nodded,pinned,rigged,sinned,towed,vetted¦4:ached,baked,baled,boned,bored,called,caned,cared,ceded,cited,coded,cored,cubed,cured,dared,dined,edited,exited,faked,fared,filed,fined,fired,fuelled,gamed,gelled,hired,hoped,joked,lined,mined,named,noted,piled,poked,polled,pored,pulled,reaped,roamed,rolled,ruled,seated,shed,sided,timed,tolled,toned,voted,waited,walled,waned,winged,wiped,wired,zoned,yelled,tamed,lubed,roped,faded,mired,caked,honed,banged,culled,heated,raked,welled,banded,beat,cast,cooled,cost,dealt,feared,folded,footed,handed,headed,heard,hurt,knitted,landed,leaked,leapt,linked,meant,minded,molded,neared,needed,peaked,plodded,plotted,pooled,quit,read,rooted,sealed,seeded,seeped,shipped,shunned,skimmed,slammed,sparred,stemmed,stirred,suited,thinned,twinned,swayed,winked,dialed,abutted,blotted,fretted,healed,heeded,peeled,reeled¦5:basted,cheated,equalled,eroded,exiled,focused,opined,pleated,primed,quoted,scouted,shored,sloped,smoked,sniped,spelled,spouted,routed,staked,stored,swelled,tasted,treated,wasted,smelled,dwelled,honored,prided,quelled,eloped,scared,coveted,sweated,breaded,cleared,debuted,deterred,freaked,modeled,pleaded,rebutted,speeded¦6:anchored,defined,endured,impaled,invited,refined,revered,strolled,cringed,recast,thrust,unfolded¦7:authored,combined,competed,conceded,convened,excreted,extruded,redefined,restored,secreted,rescinded,welcomed¦8:expedited,infringed¦9:interfered,intervened,persevered¦10:contravened¦eat:ate¦is:was¦go:went¦are:were¦3d:bent,lent,rent,sent¦3e:bit,fled,hid,lost¦3ed:bled,bred¦2ow:blew,grew¦1uy:bought¦2tch:caught¦1o:did¦1ive:dove,gave¦2aw:drew¦2ed:fed¦2y:flew,laid,paid,said¦1ight:fought¦1et:got¦2ve:had¦1ang:hung¦2ad:led¦2ght:lit¦2ke:made¦2et:met¦1un:ran¦1ise:rose¦1it:sat¦1eek:sought¦1each:taught¦1ake:woke,took¦1eave:wove¦2ise:arose¦1ear:bore,tore,wore¦1ind:bound,found,wound¦2eak:broke¦2ing:brought,wrung¦1ome:came¦2ive:drove¦1ig:dug¦1all:fell¦2el:felt¦4et:forgot¦1old:held¦2ave:left¦1ing:rang,sang¦1ide:rode¦1ink:sank¦1ee:saw¦2ine:shone¦4e:slid¦1ell:sold,told¦4d:spent¦2in:spun¦1in:won"},PresentTense:{fwd:"1:oes¦1ve:as",both:"1:xes¦2:zzes,ches,shes,sses¦3:iases¦2y:llies,plies¦1y:cies,bies,ties,vies,nies,pies,dies,ries,fies¦:s",rev:"1ies:ly¦2es:us,go,do¦3es:cho,eto",ex:"2:does,goes¦3:gasses¦5:focuses¦is:are¦3y:relies¦2y:flies¦2ve:has"},Superlative:{fwd:"1st:e¦1est:l,m,f,s¦1iest:cey¦2est:or,ir¦3est:ver",both:"4:east¦5:hwest¦5lest:erful¦4est:weet,lgar,tter,oung¦4most:uter¦3est:ger,der,rey,iet,ong,ear¦3test:lat¦3most:ner¦2est:pt,ft,nt,ct,rt,ht¦2test:it¦2gest:ig¦1est:b,k,n,p,h,d,w¦iest:y",rev:"1:ttest,nnest,yest¦2:sest,stest,rmest,cest,vest,lmest,olest,ilest,ulest,ssest,imest,uest¦3:rgest,eatest,oorest,plest,allest,urest,iefest,uelest,blest,ugest,amest,yalest,ealest,illest,tlest,itest¦4:cerest,eriest,somest,rmalest,ndomest,motest,uarest,tiffest¦5:leverest,rangest¦ar:urthest¦3ey:riciest",ex:"best:good¦worst:bad¦5est:great¦4est:fast,full,fair,dull¦3test:hot,wet,fat¦4nest:thin¦1urthest:far¦3est:gay,shy,ill¦4test:neat¦4st:late,wide,fine,safe,cute,fake,pale,rare,rude,sore,ripe,dire¦6st:severe"},AdjToNoun:{fwd:"1:tistic,eable,lful,sful,ting,tty¦2:onate,rtable,geous,ced,seful,ctful¦3:ortive,ented¦arity:ear¦y:etic¦fulness:begone¦1ity:re¦1y:tiful,gic¦2ity:ile,imous,ilous,ime¦2ion:ated¦2eness:iving¦2y:trious¦2ation:iring¦2tion:vant¦3ion:ect¦3ce:mant,mantic¦3tion:irable¦3y:est,estic¦3m:mistic,listic¦3ess:ning¦4n:utious¦4on:rative,native,vative,ective¦4ce:erant",both:"1:king,wing¦2:alous,ltuous,oyful,rdous¦3:gorous,ectable,werful,amatic¦4:oised,usical,agical,raceful,ocused,lined,ightful¦5ness:stful,lding,itous,nuous,ulous,otous,nable,gious,ayful,rvous,ntous,lsive,peful,entle,ciful,osive,leful,isive,ncise,reful,mious¦5ty:ivacious¦5ties:ubtle¦5ce:ilient,adiant,atient¦5cy:icient¦5sm:gmatic¦5on:sessive,dictive¦5ity:pular,sonal,eative,entic¦5sity:uminous¦5ism:conic¦5nce:mperate¦5ility:mitable¦5ment:xcited¦5n:bitious¦4cy:brant,etent,curate¦4ility:erable,acable,icable,ptable¦4ty:nacious,aive,oyal,dacious¦4n:icious¦4ce:vient,erent,stent,ndent,dient,quent,ident¦4ness:adic,ound,hing,pant,sant,oing,oist,tute¦4icity:imple¦4ment:fined,mused¦4ism:otic¦4ry:dantic¦4ity:tund,eral¦4edness:hand¦4on:uitive¦4lity:pitable¦4sm:eroic,namic¦4sity:nerous¦3th:arm¦3ility:pable,bable,dable,iable¦3cy:hant,nant,icate¦3ness:red,hin,nse,ict,iet,ite,oud,ind,ied,rce¦3ion:lute¦3ity:ual,gal,volous,ial¦3ce:sent,fensive,lant,gant,gent,lent,dant¦3on:asive¦3m:fist,sistic,iastic¦3y:terious,xurious,ronic,tastic¦3ur:amorous¦3e:tunate¦3ation:mined¦3sy:rteous¦3ty:ain¦3ry:ave¦3ment:azed¦2ness:de,on,ue,rn,ur,ft,rp,pe,om,ge,rd,od,ay,ss,er,ll,oy,ap,ht,ld,ad,rt¦2inousness:umous¦2ity:neous,ene,id,ane¦2cy:bate,late¦2ation:ized¦2ility:oble,ible¦2y:odic¦2e:oving,aring¦2s:ost¦2itude:pt¦2dom:ee¦2ance:uring¦2tion:reet¦2ion:oted¦2sion:ending¦2liness:an¦2or:rdent¦1th:ung¦1e:uable¦1ness:w,h,k,f¦1ility:mble¦1or:vent¦1ement:ging¦1tiquity:ncient¦1ment:hed¦verty:or¦ength:ong¦eat:ot¦pth:ep¦iness:y",rev:"",ex:"5:forceful,humorous¦8:charismatic¦13:understanding¦5ity:active¦11ness:adventurous,inquisitive,resourceful¦8on:aggressive,automatic,perceptive¦7ness:amorous,fatuous,furtive,ominous,serious¦5ness:ample,sweet¦12ness:apprehensive,cantankerous,contemptuous,ostentatious¦13ness:argumentative,conscientious¦9ness:assertive,facetious,imperious,inventive,oblivious,rapacious,receptive,seditious,whimsical¦10ness:attractive,expressive,impressive,loquacious,salubrious,thoughtful¦3edom:boring¦4ness:calm,fast,keen,tame¦8ness:cheerful,gracious,specious,spurious,timorous,unctuous¦5sity:curious¦9ion:deliberate¦8ion:desperate¦6e:expensive¦7ce:fragrant¦3y:furious¦9ility:ineluctable¦6ism:mystical¦8ity:physical,proactive,sensitive,vertical¦5cy:pliant¦7ity:positive¦9ity:practical¦12ism:professional¦6ce:prudent¦3ness:red¦6cy:vagrant¦3dom:wise"}},LVt=function(t,e={}){return e.hasOwnProperty(t)?e[t]:null},NVt=function(t,e=[]){for(let n=0;n=1;r-=1){let i=t.length-r,o=t.substring(i,t.length);if(e.hasOwnProperty(o)===!0)return t.slice(0,i)+e[o];if(n.hasOwnProperty(o)===!0)return t.slice(0,i)+n[o]}return e.hasOwnProperty("")?t+=e[""]:n.hasOwnProperty("")?t+=n[""]:null},Tp=function(t="",e={}){let n=LVt(t,e.ex);return n=n||NVt(t,e.same),n=n||MVt(t,e.fwd,e.both),n=n||t,n},ike=function(t){return Object.entries(t).reduce((e,n)=>(e[n[1]]=n[0],e),{})},xE=function(t={}){return{reversed:!0,both:ike(t.both),ex:ike(t.ex),fwd:t.rev||{}}},oke=/^([0-9]+)/,zVt=function(t){let e={};return t.split("¦").forEach(n=>{let[a,r]=n.split(":");r=(r||"").split(","),r.forEach(i=>{e[i]=a})}),e},qVt=function(t="",e=""){e=String(e);let n=e.match(oke);if(n===null)return e;let a=Number(n[1])||0;return t.substring(0,a)+e.replace(oke,"")},B8=function(t){let e=zVt(t);return Object.keys(e).reduce((n,a)=>(n[a]=qVt(a,e[a]),n),{})},Px=function(t={}){return typeof t=="string"&&(t=JSON.parse(t)),t.fwd=B8(t.fwd||""),t.both=B8(t.both||""),t.rev=B8(t.rev||""),t.ex=B8(t.ex||""),t},Eje=Px(Tx.PastTense),Qje=Px(Tx.PresentTense),Sje=Px(Tx.Gerund),Ije=Px(Tx.Participle),jVt=xE(Eje),UVt=xE(Qje),GVt=xE(Sje),HVt=xE(Ije),Dje=Px(Tx.Comparative),$je=Px(Tx.Superlative),WVt=xE(Dje),YVt=xE($je),XVt=Px(Tx.AdjToNoun),Tje={fromPast:Eje,fromPresent:Qje,fromGerund:Sje,fromParticiple:Ije,toPast:jVt,toPresent:UVt,toGerund:GVt,toParticiple:HVt,toComparative:Dje,toSuperlative:$je,fromComparative:WVt,fromSuperlative:YVt,adjToNoun:XVt},VVt=[[/^[\w.]+@[\w.]+\.[a-z]{2,3}$/,"Email"],[/^(https?:\/\/|www\.)+\w+\.[a-z]{2,3}/,"Url","http.."],[/^[a-z0-9./].+\.(com|net|gov|org|ly|edu|info|biz|dev|ru|jp|de|in|uk|br|io|ai)/,"Url",".com"],[/^[PMCE]ST$/,"Timezone","EST"],[/^ma?c'[a-z]{3}/,"LastName","mc'neil"],[/^o'[a-z]{3}/,"LastName","o'connor"],[/^ma?cd[aeiou][a-z]{3}/,"LastName","mcdonald"],[/^(lol)+[sz]$/,"Expression","lol"],[/^wo{2,}a*h?$/,"Expression","wooah"],[/^(hee?){2,}h?$/,"Expression","hehe"],[/^(un|de|re)\\-[a-z\u00C0-\u00FF]{2}/,"Verb","un-vite"],[/^(m|k|cm|km)\/(s|h|hr)$/,"Unit","5 k/m"],[/^(ug|ng|mg)\/(l|m3|ft3)$/,"Unit","ug/L"],[/[^:/]\/\p{Letter}/u,"SlashedTerm","love/hate"]],ZVt=[[/^#[\p{Number}_]*\p{Letter}/u,"HashTag"],[/^@\w{2,}$/,"AtMention"],[/^([A-Z]\.){2}[A-Z]?/i,["Acronym","Noun"],"F.B.I"],[/.{3}[lkmnp]in['‘’‛‵′`´]$/,"Gerund","chillin'"],[/.{4}s['‘’‛‵′`´]$/,"Possessive","flanders'"],[/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u,"Emoji","emoji-class"]],KVt=[[/^@1?[0-9](am|pm)$/i,"Time","3pm"],[/^@1?[0-9]:[0-9]{2}(am|pm)?$/i,"Time","3:30pm"],[/^'[0-9]{2}$/,"Year"],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])$/,"Time","3:12:31"],[/^[012]?[0-9](:[0-5][0-9])?(:[0-5][0-9])? ?(am|pm)$/i,"Time","1:12pm"],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])? ?(am|pm)?$/i,"Time","1:12:31pm"],[/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}/i,"Date","iso-date"],[/^[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,4}$/,"Date","iso-dash"],[/^[0-9]{1,4}\/[0-9]{1,2}\/([0-9]{4}|[0-9]{2})$/,"Date","iso-slash"],[/^[0-9]{1,4}\.[0-9]{1,2}\.[0-9]{1,4}$/,"Date","iso-dot"],[/^[0-9]{1,4}-[a-z]{2,9}-[0-9]{1,4}$/i,"Date","12-dec-2019"],[/^utc ?[+-]?[0-9]+$/,"Timezone","utc-9"],[/^(gmt|utc)[+-][0-9]{1,2}$/i,"Timezone","gmt-3"],[/^[0-9]{3}-[0-9]{4}$/,"PhoneNumber","421-0029"],[/^(\+?[0-9][ -])?[0-9]{3}[ -]?[0-9]{3}-[0-9]{4}$/,"PhoneNumber","1-800-"],[/^[-+]?\p{Currency_Symbol}[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?([kmb]|bn)?\+?$/u,["Money","Value"],"$5.30"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?\p{Currency_Symbol}\+?$/u,["Money","Value"],"5.30£"],[/^[-+]?[$£]?[0-9]([0-9,.])+(usd|eur|jpy|gbp|cad|aud|chf|cny|hkd|nzd|kr|rub)$/i,["Money","Value"],"$400usd"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?\+?$/,["Cardinal","NumericValue"],"5,999"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?(st|nd|rd|r?th)$/,["Ordinal","NumericValue"],"53rd"],[/^\.[0-9]+\+?$/,["Cardinal","NumericValue"],".73th"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?%\+?$/,["Percent","Cardinal","NumericValue"],"-4%"],[/^\.[0-9]+%$/,["Percent","Cardinal","NumericValue"],".3%"],[/^[0-9]{1,4}\/[0-9]{1,4}(st|nd|rd|th)?s?$/,["Fraction","NumericValue"],"2/3rds"],[/^[0-9.]{1,3}[a-z]{0,2}[-–—][0-9]{1,3}[a-z]{0,2}$/,["Value","NumberRange"],"3-4"],[/^[0-9]{1,2}(:[0-9][0-9])?(am|pm)? ?[-–—] ?[0-9]{1,2}(:[0-9][0-9])?(am|pm)$/,["Time","NumberRange"],"3-4pm"],[/^[0-9.]+([a-z°]{1,4})$/,"NumericValue","9km"]],JVt=["academy","administration","agence","agences","agencies","agency","airlines","airways","army","assoc","associates","association","assurance","authority","autorite","aviation","bank","banque","board","boys","brands","brewery","brotherhood","brothers","bureau","cafe","co","caisse","capital","care","cathedral","center","centre","chemicals","choir","chronicle","church","circus","clinic","clinique","club","co","coalition","coffee","collective","college","commission","committee","communications","community","company","comprehensive","computers","confederation","conference","conseil","consulting","containers","corporation","corps","corp","council","crew","data","departement","department","departments","design","development","directorate","division","drilling","education","eglise","electric","electricity","energy","ensemble","enterprise","enterprises","entertainment","estate","etat","faculty","faction","federation","financial","fm","foundation","fund","gas","gazette","girls","government","group","guild","herald","holdings","hospital","hotel","hotels","inc","industries","institut","institute","institutes","insurance","international","interstate","investment","investments","investors","journal","laboratory","labs","llc","ltd","limited","machines","magazine","management","marine","marketing","markets","media","memorial","ministere","ministry","military","mobile","motor","motors","musee","museum","news","observatory","office","oil","optical","orchestra","organization","partners","partnership","petrol","petroleum","pharmacare","pharmaceutical","pharmaceuticals","pizza","plc","police","politburo","polytechnic","post","power","press","productions","quartet","radio","reserve","resources","restaurant","restaurants","savings","school","securities","service","services","societe","subsidiary","society","sons","subcommittee","syndicat","systems","telecommunications","telegraph","television","times","tribunal","tv","union","university","utilities","workers"].reduce((t,e)=>(t[e]=!0,t),{}),eZt=["atoll","basin","bay","beach","bluff","bog","camp","canyon","canyons","cape","cave","caves","cliffs","coast","cove","coves","crater","crossing","creek","desert","dune","dunes","downs","estates","escarpment","estuary","falls","fjord","fjords","forest","forests","glacier","gorge","gorges","grove","gulf","gully","highland","heights","hollow","hill","hills","inlet","island","islands","isthmus","junction","knoll","lagoon","lake","lakeshore","marsh","marshes","mount","mountain","mountains","narrows","peninsula","plains","plateau","pond","rapids","ravine","reef","reefs","ridge","river","rivers","sandhill","shoal","shore","shoreline","shores","strait","straits","springs","stream","swamp","tombolo","trail","trails","trench","valley","vallies","village","volcano","waterfall","watershed","wetland","woods","acres","burough","county","district","municipality","prefecture","province","region","reservation","state","territory","borough","metropolis","downtown","uptown","midtown","city","town","township","hamlet","country","kingdom","enclave","neighbourhood","neighborhood","kingdom","ward","zone","airport","amphitheater","arch","arena","auditorium","bar","barn","basilica","battlefield","bridge","building","castle","centre","coliseum","cineplex","complex","dam","farm","field","fort","garden","gardens","gymnasium","hall","house","levee","library","manor","memorial","monument","museum","gallery","palace","pillar","pits","plantation","playhouse","quarry","sportsfield","sportsplex","stadium","terrace","terraces","theater","tower","park","parks","site","ranch","raceway","sportsplex","ave","st","street","rd","road","lane","landing","crescent","cr","way","tr","terrace","avenue"].reduce((t,e)=>(t[e]=!0,t),{}),E8=[[/([^v])ies$/i,"$1y"],[/(ise)s$/i,"$1"],[/(kn|[^o]l|w)ives$/i,"$1ife"],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)ves$/i,"$1f"],[/^(dwar|handkerchie|hoo|scar|whar)ves$/i,"$1f"],[/(antenn|formul|nebul|vertebr|vit)ae$/i,"$1a"],[/(octop|vir|radi|nucle|fung|cact|stimul)(i)$/i,"$1us"],[/(buffal|tomat|tornad)(oes)$/i,"$1o"],[/(ause)s$/i,"$1"],[/(ease)s$/i,"$1"],[/(ious)es$/i,"$1"],[/(ouse)s$/i,"$1"],[/(ose)s$/i,"$1"],[/(..ase)s$/i,"$1"],[/(..[aeiu]s)es$/i,"$1"],[/(vert|ind|cort)(ices)$/i,"$1ex"],[/(matr|append)(ices)$/i,"$1ix"],[/([xo]|ch|ss|sh)es$/i,"$1"],[/men$/i,"man"],[/(n)ews$/i,"$1ews"],[/([ti])a$/i,"$1um"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(s)eries$/i,"$1eries"],[/(m)ovies$/i,"$1ovie"],[/(cris|ax|test)es$/i,"$1is"],[/(alias|status)es$/i,"$1"],[/(ss)$/i,"$1"],[/(ic)s$/i,"$1"],[/s$/i,""]],tZt=function(t){return Object.keys(t).reduce((e,n)=>(e[t[n]]=n,e),{})},Pje=function(t,e){const{irregularPlurals:n}=e.two;let a=tZt(n);if(a.hasOwnProperty(t))return a[t];for(let r=0;r(t1[e].forEach(n=>t[n]=e),t),{});const Fje=function(t){let e=t.substring(t.length-3);if(t1.hasOwnProperty(e)===!0)return t1[e];let n=t.substring(t.length-2);return t1.hasOwnProperty(n)===!0?t1[n]:t.substring(t.length-1)==="s"?"PresentTense":null},rZt=function(t,e){let n="",a={};e.one&&e.one.prefixes&&(a=e.one.prefixes);let[r,i]=t.split(/ /);return i&&a[r]===!0&&(n=r,r=i,i=""),{prefix:n,verb:r,particle:i}},ske={are:"be",were:"be",been:"be",is:"be",am:"be",was:"be",be:"be",being:"be"},Eee=function(t,e,n){const{fromPast:a,fromPresent:r,fromGerund:i,fromParticiple:o}=e.two.models;let{prefix:s,verb:l,particle:u}=rZt(t,e),d="";if(n||(n=Fje(t)),ske.hasOwnProperty(t))d=ske[t];else if(n==="Participle")d=Tp(l,o);else if(n==="PastTense")d=Tp(l,a);else if(n==="PresentTense")d=Tp(l,r);else if(n==="Gerund")d=Tp(l,i);else return t;return u&&(d+=" "+u),s&&(d=s+" "+d),d},iZt=t=>/ /.test(t)?t.split(/ /):[t,""],Zce=function(t,e){const{toPast:n,toPresent:a,toGerund:r,toParticiple:i}=e.two.models;if(t==="be")return{Infinitive:t,Gerund:"being",PastTense:"was",PresentTense:"is"};let[o,s]=iZt(t),l={Infinitive:o,PastTense:Tp(o,n),PresentTense:Tp(o,a),Gerund:Tp(o,r),FutureTense:"will "+o},u=Tp(o,i);if(u!==t&&u!==l.PastTense){let d=e.one.lexicon||{};(d[u]==="Participle"||d[u]==="Adjective")&&(t==="play"&&(u="played"),l.Participle=u)}return s&&Object.keys(l).forEach(d=>{l[d]+=" "+s}),l},oZt=function(t,e){let n=Zce(t,e);return delete n.FutureTense,Object.values(n).filter(a=>a)},sZt={toInfinitive:Eee,conjugate:Zce,all:oZt},Kce=function(t,e){const n=e.two.models.toSuperlative;return Tp(t,n)},Jce=function(t,e){const n=e.two.models.toComparative;return Tp(t,n)},cZt=function(t,e){const n=e.two.models.fromComparative;return Tp(t,n)},lZt=function(t,e){const n=e.two.models.fromSuperlative;return Tp(t,n)},uZt=function(t,e){const n=e.two.models.adjToNoun;return Tp(t,n)},Rje=function(t="",e=[]){const n=t.length;let a=n<=6?n-1:6;for(let r=a;r>=1;r-=1){let i=t.substring(n-r,t.length);if(e[i.length].hasOwnProperty(i)===!0){let o=t.slice(0,n-r),s=e[i.length][i];return o+s}}return null},Rr="ically",dZt=new Set(["analyt"+Rr,"chem"+Rr,"class"+Rr,"clin"+Rr,"crit"+Rr,"ecolog"+Rr,"electr"+Rr,"empir"+Rr,"frant"+Rr,"grammat"+Rr,"ident"+Rr,"ideolog"+Rr,"log"+Rr,"mag"+Rr,"mathemat"+Rr,"mechan"+Rr,"med"+Rr,"method"+Rr,"method"+Rr,"mus"+Rr,"phys"+Rr,"phys"+Rr,"polit"+Rr,"pract"+Rr,"rad"+Rr,"satir"+Rr,"statist"+Rr,"techn"+Rr,"technolog"+Rr,"theoret"+Rr,"typ"+Rr,"vert"+Rr,"whims"+Rr]),pZt=[null,{},{ly:""},{ily:"y",bly:"ble",ply:"ple"},{ally:"al",rply:"rp"},{ually:"ual",ially:"ial",cally:"cal",eally:"eal",rally:"ral",nally:"nal",mally:"mal",eeply:"eep",eaply:"eap"},{ically:"ic"}],AZt=new Set(["early","only","hourly","daily","weekly","monthly","yearly","mostly","duly","unduly","especially","undoubtedly","conversely","namely","exceedingly","presumably","accordingly","overly","best","latter","little","long","low"]),cke={wholly:"whole",fully:"full",truly:"true",gently:"gentle",singly:"single",customarily:"customary",idly:"idle",publically:"public",quickly:"quick",superbly:"superb",cynically:"cynical",well:"good"},mZt=function(t){return t.endsWith("ly")?dZt.has(t)?t.replace(/ically/,"ical"):AZt.has(t)?null:cke.hasOwnProperty(t)?cke[t]:Rje(t,pZt)||t:null},gZt=[null,{y:"ily"},{ly:"ly",ic:"ically"},{ial:"ially",ual:"ually",tle:"tly",ble:"bly",ple:"ply",ary:"arily"},{},{},{}],lke={cool:"cooly",whole:"wholly",full:"fully",good:"well",idle:"idly",public:"publicly",single:"singly",special:"especially"},Lje=function(t){if(lke.hasOwnProperty(t))return lke[t];let e=Rje(t,gZt);return e||(e=t+"ly"),e},hZt=function(t,e){let n=[t];return n.push(Kce(t,e)),n.push(Jce(t,e)),n.push(Lje(t)),n=n.filter(a=>a),n=new Set(n),Array.from(n)},fZt={toSuperlative:Kce,toComparative:Jce,toAdverb:Lje,toNoun:uZt,fromAdverb:mZt,fromSuperlative:lZt,fromComparative:cZt,all:hZt},bZt={noun:aZt,verb:sZt,adjective:fZt},uke={Singular:(t,e,n,a)=>{let r=a.one.lexicon,i=n.two.transform.noun.toPlural(t,a);r[i]||(e[i]=e[i]||"Plural")},Actor:(t,e,n,a)=>{let r=a.one.lexicon,i=n.two.transform.noun.toPlural(t,a);r[i]||(e[i]=e[i]||["Plural","Actor"])},Comparable:(t,e,n,a)=>{let r=a.one.lexicon,{toSuperlative:i,toComparative:o}=n.two.transform.adjective,s=i(t,a);r[s]||(e[s]=e[s]||"Superlative");let l=o(t,a);r[l]||(e[l]=e[l]||"Comparative"),e[t]="Adjective"},Demonym:(t,e,n,a)=>{let r=n.two.transform.noun.toPlural(t,a);e[r]=e[r]||["Demonym","Plural"]},Infinitive:(t,e,n,a)=>{let r=a.one.lexicon,i=n.two.transform.verb.conjugate(t,a);Object.entries(i).forEach(o=>{!r[o[1]]&&!e[o[1]]&&o[0]!=="FutureTense"&&(e[o[1]]=o[0])})},PhrasalVerb:(t,e,n,a)=>{let r=a.one.lexicon;e[t]=["PhrasalVerb","Infinitive"];let i=a.one._multiCache,[o,s]=t.split(" ");r[o]||(e[o]=e[o]||"Infinitive");let l=n.two.transform.verb.conjugate(o,a);delete l.FutureTense,Object.entries(l).forEach(u=>{if(u[0]==="Actor"||u[1]==="")return;!e[u[1]]&&!r[u[1]]&&(e[u[1]]=u[0]),i[u[1]]=2;let d=u[1]+" "+s;e[d]=e[d]||[u[0],"PhrasalVerb"]})},Multiple:(t,e)=>{e[t]=["Multiple","Cardinal"],e[t+"th"]=["Multiple","Ordinal"],e[t+"ths"]=["Multiple","Fraction"]},Cardinal:(t,e)=>{e[t]=["TextValue","Cardinal"]},Ordinal:(t,e)=>{e[t]=["TextValue","Ordinal"],e[t+"s"]=["TextValue","Fraction"]},Place:(t,e)=>{e[t]=["Place","ProperNoun"]},Region:(t,e)=>{e[t]=["Region","ProperNoun"]}},yZt=function(t,e){const{methods:n,model:a}=e;let r={},i={};return Object.keys(t).forEach(o=>{let s=t[o];o=o.toLowerCase().trim(),o=o.replace(/'s\b/,"");let l=o.split(/ /);l.length>1&&(i[l[0]]===void 0||l.length>i[l[0]])&&(i[l[0]]=l.length),uke.hasOwnProperty(s)===!0&&uke[s](o,r,n,a),r[o]=r[o]||s}),delete r[""],delete r[null],delete r[" "],{lex:r,_multi:i}},wZt=function(t,e){const n=/^[0-9]+$/;let a=t[e];if(!a)return!1;const r=new Set(["may","april","august","jan"]);if(a.normal==="like"||r.has(a.normal)||a.tags.has("Place")||a.tags.has("Date"))return!1;if(t[e-1]){let o=t[e-1];if(o.tags.has("Date")||r.has(o.normal)||o.tags.has("Adjective")||a.tags.has("Adjective"))return!1}let i=a.normal;return!((i.length===1||i.length===2||i.length===4)&&n.test(i))},vZt=function(t){const e=/[,:;]/;let n=[];return t.forEach(a=>{let r=0;a.forEach((i,o)=>{e.test(i.post)&&wZt(a,o+1)&&(n.push(a.slice(r,o+1)),r=o+1)}),rt.endsWith(n)):!(e!=="s"||xZt.find(n=>t.endsWith(n)))},Qee={two:{quickSplit:vZt,expandLexicon:yZt,transform:bZt,looksPlural:Nje}},OZt=function(t){const{irregularPlurals:e}=t.two,{lexicon:n}=t.one;return Object.entries(e).forEach(a=>{n[a[0]]=n[a[0]]||"Singular",n[a[1]]=n[a[1]]||"Plural"}),t};let See={one:{lexicon:{}},two:{models:Tje}};const CZt={"Actor|Verb":"Actor","Adj|Gerund":"Adjective","Adj|Noun":"Adjective","Adj|Past":"Adjective","Adj|Present":"Adjective","Noun|Verb":"Singular","Noun|Gerund":"Gerund","Person|Noun":"Noun","Person|Date":"Month","Person|Verb":"FirstName","Person|Place":"Person","Person|Adj":"Comparative","Plural|Verb":"Plural","Unit|Noun":"Noun"},Mje=function(t,e){const n={model:e,methods:Qee};let{lex:a,_multi:r}=Qee.two.expandLexicon(t,n);return Object.assign(e.one.lexicon,a),Object.assign(e.one._multiCache,r),e},_Zt=function(t,e){return Object.keys(t).forEach(n=>{t[n]==="Uncountable"&&(e.two.uncountable[n]=!0,t[n]="Uncountable")}),e},pke=function(t,e,n){let a=Zce(t,See);e[a.PastTense]=e[a.PastTense]||"PastTense",e[a.Gerund]=e[a.Gerund]||"Gerund",n===!0&&(e[a.PresentTense]=e[a.PresentTense]||"PresentTense")},Ake=function(t,e,n){let a=Kce(t,n);e[a]=e[a]||"Superlative";let r=Jce(t,n);e[r]=e[r]||"Comparative"},BZt=function(t,e,n){let a=cz(t,n);e[a]=e[a]||"Plural"},EZt=function(t,e){let n={};const a=e.one.lexicon;return Object.keys(t).forEach(r=>{const i=t[r];if(n[r]=CZt[i],(i==="Noun|Verb"||i==="Person|Verb"||i==="Actor|Verb")&&pke(r,a,!1),i==="Adj|Present"&&(pke(r,a,!0),Ake(r,a,e)),i==="Person|Adj"&&Ake(r,a,e),i==="Adj|Gerund"||i==="Noun|Gerund"){let o=Eee(r,See,"Gerund");a[o]||(n[o]="Infinitive")}if((i==="Noun|Gerund"||i==="Adj|Noun"||i==="Person|Noun")&&BZt(r,a,e),i==="Adj|Past"){let o=Eee(r,See,"PastTense");a[o]||(n[o]="Infinitive")}}),e=Mje(n,e),e},QZt=function(t){return t=Mje(t.one.lexicon,t),t=_Zt(t.one.lexicon,t),t=EZt(t.two.switches,t),t=OZt(t),t};let Iee={one:{_multiCache:{},lexicon:kE,frozenLex:pVt},two:{irregularPlurals:Bje,models:Tje,suffixPatterns:TVt,prefixPatterns:PVt,endsWith:FVt,neighbours:RVt,regexNormal:VVt,regexText:ZVt,regexNumbers:KVt,switches:Bee,clues:TC,uncountable:{},orgWords:JVt,placeWords:eZt}};Iee=QZt(Iee);const SZt=function(t,e,n,a){const r=a.methods.one.setTag;if(t.length>=3){const i=/:/;if(t[0].post.match(i)){let s=t[1];if(s.tags.has("Value")||s.tags.has("Email")||s.tags.has("PhoneNumber"))return;r([t[0]],"Expression",a,null,"2-punct-colon''")}}},IZt=function(t,e,n,a){const r=a.methods.one.setTag;t[e].post==="-"&&t[e+1]&&r([t[e],t[e+1]],"Hyphenated",a,null,"1-punct-hyphen''")},mke=/^(under|over|mis|re|un|dis|semi)-?/,DZt=function(t,e,n){const a=n.two.switches;let r=t[e];if(a.hasOwnProperty(r.normal)){r.switch=a[r.normal];return}if(mke.test(r.normal)){let i=r.normal.replace(mke,"");i.length>3&&a.hasOwnProperty(i)&&(r.switch=a[i])}};var gke={};const $Zt=(t,e,n="")=>{const a=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",r=o=>"\x1B[3m"+o+"\x1B[0m";let i=t.text||"["+t.implicit+"]";typeof e!="string"&&e.length>2&&(e=e.slice(0,2).join(", #")+" +"),e=typeof e!="string"?e.join(", #"):e,console.log(` ${a(i).padEnd(24)} \x1B[32m→\x1B[0m #${e.padEnd(22)} ${r(n)}`)},ws=function(t,e,n){if(!e||e.length===0||t.frozen===!0)return;const a=typeof process>"u"||!gke?self.env||{}:gke;a&&a.DEBUG_TAGS&&$Zt(t,e,n),t.tags=t.tags||new Set,typeof e=="string"?t.tags.add(e):e.forEach(r=>t.tags.add(r))},TZt=["Acronym","Abbreviation","ProperNoun","Uncountable","Possessive","Pronoun","Activity","Honorific","Month"],PZt=function(t){!t.tags.has("Noun")||t.tags.has("Plural")||t.tags.has("Singular")||TZt.find(e=>t.tags.has(e))||(Nje(t.normal)?ws(t,"Plural","3-plural-guess"):ws(t,"Singular","3-singular-guess"))},FZt=function(t){let e=t.tags;if(e.has("Verb")&&e.size===1){let n=Fje(t.normal);n&&ws(t,n,"3-verb-tense-guess")}},h3=function(t,e,n){let a=t[e],r=Array.from(a.tags);for(let i=0;ia.tags.has(o))||a.pre.match(/["']$/)||a.normal==="the"?null:(h3(t,e,n),!a.tags.has("Noun")&&!a.frozen&&a.tags.clear(),ws(a,"ProperNoun","2-titlecase"),!0):i.length>=2&&zZt.test(i)&&MZt.test(i)&&qZt.test(i)&&!jZt[a.normal]?(ws(a,"RomanNumeral","2-xvii"),!0):null},hke=function(t="",e=[]){const n=t.length;let a=7;n<=a&&(a=n-1);for(let r=a;r>1;r-=1){let i=t.substring(n-r,n);if(e[i.length].hasOwnProperty(i)===!0)return e[i.length][i]}return null},GZt=function(t,e,n){let a=t[e];if(a.tags.size===0){let r=hke(a.normal,n.two.suffixPatterns);if(r!==null)return ws(a,r,"2-suffix"),a.confidence=.7,!0;if(a.implicit&&(r=hke(a.implicit,n.two.suffixPatterns),r!==null))return ws(a,r,"2-implicit-suffix"),a.confidence=.7,!0}return null},fke=/['‘’‛‵′`´]/,hH=function(t,e){for(let n=0;nn-3&&(a=n-3);for(let r=a;r>2;r-=1){let i=t.substring(0,r);if(e[i.length].hasOwnProperty(i)===!0)return e[i.length][i]}return null},XZt=function(t,e,n){let a=t[e];if(a.tags.size===0){let r=YZt(a.normal,n.two.prefixPatterns);if(r!==null)return ws(a,r,"2-prefix"),a.confidence=.5,!0}return null},VZt=1400,ZZt=2100,KZt=new Set(["in","on","by","until","for","to","during","throughout","through","within","before","after","of","this","next","last","circa","around","post","pre","budget","classic","plan","may"]),bke=function(t){if(!t)return!1;let e=t.normal||t.implicit;return!!(KZt.has(e)||t.tags.has("Date")||t.tags.has("Month")||t.tags.has("WeekDay")||t.tags.has("Year")||t.tags.has("ProperNoun"))},yke=function(t){return t?!!(t.tags.has("Ordinal")||t.tags.has("Cardinal")&&t.normal.length<3||t.normal==="is"||t.normal==="was"):!1},wke=function(t){return t&&(t.tags.has("Date")||t.tags.has("Month")||t.tags.has("WeekDay")||t.tags.has("Year"))},JZt=function(t,e){const n=t[e];if(n.tags.has("NumericValue")&&n.tags.has("Cardinal")&&n.normal.length===4){let a=Number(n.normal);if(a&&!isNaN(a)&&a>VZt&&a=1920&&a<2025){if(yke(r)||yke(i))return ws(n,"Year","2-tagYear-close");if(wke(t[e-2])||wke(t[e+2]))return ws(n,"Year","2-tagYear-far");if(r&&(r.tags.has("Determiner")||r.tags.has("Possessive"))&&i&&i.tags.has("Noun")&&!i.tags.has("Plural"))return ws(n,"Year","2-tagYear-noun")}}}return null},eKt=function(t,e,n,a){const r=a.methods.one.setTag,i=t[e],o=["PastTense","PresentTense","Auxiliary","Modal","Particle"];i.tags.has("Verb")&&(o.find(l=>i.tags.has(l))||r([i],"Infinitive",a,null,"2-verb-type''"))},zje=/^[A-Z]('s|,)?$/,qje=/^[A-Z-]+$/,jje=/^[A-Z]+s$/,tKt=/([A-Z]\.)+[A-Z]?,?$/,nKt=/[A-Z]{2,}('s|,)?$/,aKt=/([a-z]\.)+[a-z]\.?$/,Uje={I:!0,A:!0},rKt={la:!0,ny:!0,us:!0,dc:!0,gb:!0},iKt=function(t,e){let n=t.text;if(qje.test(n)===!1)if(n.length>3&&jje.test(n)===!0)n=n.replace(/s$/,"");else return!1;return n.length>5||Uje.hasOwnProperty(n)||e.one.lexicon.hasOwnProperty(t.normal)?!1:tKt.test(n)===!0||aKt.test(n)===!0||zje.test(n)===!0||nKt.test(n)===!0},oKt=function(t,e,n){let a=t[e];return a.tags.has("RomanNumeral")||a.tags.has("Acronym")||a.frozen?null:iKt(a,n)?(a.tags.clear(),ws(a,["Acronym","Noun"],"3-no-period-acronym"),rKt[a.normal]===!0&&ws(a,"Place","3-place-acronym"),jje.test(a.text)===!0&&ws(a,"Plural","3-plural-acronym"),!0):!Uje.hasOwnProperty(a.text)&&zje.test(a.text)?(a.tags.clear(),ws(a,["Acronym","Noun"],"3-one-letter-acronym"),!0):a.tags.has("Organization")&&a.text.length<=3?(ws(a,"Acronym","3-org-acronym"),!0):a.tags.has("Organization")&&qje.test(a.text)&&a.text.length<=6?(ws(a,"Acronym","3-titlecase-acronym"),!0):null},vke=function(t,e){if(!t)return null;let n=e.find(a=>t.normal===a[0]);return n?n[1]:null},kke=function(t,e){if(!t)return null;let n=e.find(a=>t.tags.has(a[0]));return n?n[1]:null},sKt=function(t,e,n){const{leftTags:a,leftWords:r,rightWords:i,rightTags:o}=n.two.neighbours;let s=t[e];if(s.tags.size===0){let l=null;if(l=l||vke(t[e-1],r),l=l||vke(t[e+1],i),l=l||kke(t[e-1],a),l=l||kke(t[e+1],o),l)return ws(s,l,"3-[neighbour]"),h3(t,e,n),t[e].confidence=.2,!0}return null},cKt=t=>/^\p{Lu}[\p{Ll}'’]/u.test(t),xke=function(t,e,n){return!t||t.tags.has("FirstName")||t.tags.has("Place")?!1:t.tags.has("ProperNoun")||t.tags.has("Organization")||t.tags.has("Acronym")?!0:!n&&cKt(t.text)?e===0?t.tags.has("Singular"):!0:!1},lKt=function(t,e,n,a){const r=n.model.two.orgWords,i=n.methods.one.setTag;let o=t[e],s=o.machine||o.normal;if(r[s]===!0&&xke(t[e-1],e-1,a)){i([t[e]],"Organization",n,null,"3-[org-word]");for(let l=e;l>=0&&xke(t[l],l,a);l-=1)i([t[l]],"Organization",n,null,"3-[org-word]")}return null},uKt=t=>/^\p{Lu}[\p{Ll}'’]/u.test(t),dKt=/'s$/,Oke=new Set(["athletic","city","community","eastern","federal","financial","great","historic","historical","local","memorial","municipal","national","northern","provincial","southern","state","western","spring","pine","sunset","view","oak","maple","spruce","cedar","willow"]),pKt=new Set(["center","centre","way","range","bar","bridge","field","pit"]),Cke=function(t,e,n){if(!t)return!1;let a=t.tags;return a.has("Organization")||a.has("Possessive")||dKt.test(t.normal)?!1:a.has("ProperNoun")||a.has("Place")?!0:!n&&uKt(t.text)?e===0?a.has("Singular"):!0:!1},AKt=function(t,e,n,a){const r=n.model.two.placeWords,i=n.methods.one.setTag;let o=t[e],s=o.machine||o.normal;if(r[s]===!0){for(let l=e-1;l>=0;l-=1)if(!Oke.has(t[l].normal)){if(Cke(t[l],l,a)){i(t.slice(l,e+1),"Place",n,null,"3-[place-of-foo]");continue}break}if(pKt.has(s))return!1;for(let l=e+1;lt[e].tags.has("ProperNoun")&&gKt.test(t[e].text)?"Noun":null,_ke=(t,e,n)=>e===0&&!t[1]?n:null,hKt=function(t,e){return!t[e+1]&&t[e-1]&&t[e-1].tags.has("Determiner")?"Noun":null},fKt=function(t,e,n){return e===0&&t.length>3?n:null},Bke={"Adj|Gerund":(t,e)=>vm(t,e),"Adj|Noun":(t,e)=>vm(t,e)||hKt(t,e),"Actor|Verb":(t,e)=>vm(t,e),"Adj|Past":(t,e)=>vm(t,e),"Adj|Present":(t,e)=>vm(t,e),"Noun|Gerund":(t,e)=>vm(t,e),"Noun|Verb":(t,e)=>e>0&&vm(t,e)||_ke(t,e,"Infinitive"),"Plural|Verb":(t,e)=>vm(t,e)||_ke(t,e,"PresentTense")||fKt(t,e,"Plural"),"Person|Noun":(t,e)=>vm(t,e),"Person|Verb":(t,e)=>e!==0?vm(t,e):null,"Person|Adj":(t,e)=>e===0&&t.length>1||vm(t,e)?"Person":null};var Eke={};const ele=typeof process>"u"||!Eke?self.env||{}:Eke,Qke=/^(under|over|mis|re|un|dis|semi)-?/,Ske=(t,e)=>{if(!t||!e)return null;let n=t.normal||t.implicit,a=null;return e.hasOwnProperty(n)&&(a=e[n]),a&&ele.DEBUG_TAGS&&console.log(` \x1B[2m\x1B[3m ↓ - '${n}' \x1B[0m`),a},Ike=(t,e={},n)=>{if(!t||!e)return null;let r=Array.from(t.tags).sort((i,o)=>{let s=n[i]?n[i].parents.length:0,l=n[o]?n[o].parents.length:0;return s>l?-1:1}).find(i=>e[i]);return r&&ele.DEBUG_TAGS&&console.log(` \x1B[2m\x1B[3m ↓ - '${t.normal||t.implicit}' (#${r}) \x1B[0m`),r=e[r],r},bKt=function(t,e,n,a){if(!n)return null;const r=t[e-1]?.text!=="also"?e-1:Math.max(0,e-2),i=a.one.tagSet;let o=Ske(t[e+1],n.afterWords);return o=o||Ske(t[r],n.beforeWords),o=o||Ike(t[r],n.beforeTags,i),o=o||Ike(t[e+1],n.afterTags,i),o},yKt=function(t,e,n){const a=n.model,r=n.methods.one.setTag,{switches:i,clues:o}=a.two,s=t[e];let l=s.normal||s.implicit||"";if(Qke.test(l)&&!i[l]&&(l=l.replace(Qke,"")),s.switch){let u=s.switch;if(s.tags.has("Acronym")||s.tags.has("PhrasalVerb"))return;let d=bKt(t,e,o[u],a);Bke[u]&&(d=Bke[u](t,e)||d),d?(r([s],d,n,null,`3-[switch] (${u})`),h3(t,e,a)):ele.DEBUG_TAGS&&console.log(` -> X - '${l}' : (${u}) `)}},wKt={there:!0,this:!0,it:!0,him:!0,her:!0,us:!0},vKt=function(t,e){const n=e.methods.one.setTag,a=e.model.one._multiCache||{};let r=t[0];if((r.switch==="Noun|Verb"||r.tags.has("Infinitive"))&&t.length>=2){if(t.length<4&&!wKt[t[1].normal]||!r.tags.has("PhrasalVerb")&&a.hasOwnProperty(r.normal))return;(t[1].tags.has("Noun")||t[1].tags.has("Determiner"))&&(!t.slice(1,3).some(l=>l.tags.has("Verb"))||r.tags.has("#PhrasalVerb"))&&n([r],"Imperative",e,null,"3-[imperative]")}},kKt=function(t){if(t.filter(n=>!n.tags.has("ProperNoun")).length<=3)return!1;const e=/^[a-z]/;return t.every(n=>!e.test(n.text))},xKt=function(t,e,n){t.forEach(a=>{SZt(a,0,e,n)})},OKt=function(t,e,n,a){for(let r=0;r{let e=t.machine||t.normal||t.text;return e=e.replace(/'s$/,""),e},Plural:(t,e)=>{let n=t.machine||t.normal||t.text;return e.methods.two.transform.noun.toSingular(n,e.model)},Copula:()=>"is",PastTense:(t,e)=>{let n=t.machine||t.normal||t.text;return e.methods.two.transform.verb.toInfinitive(n,e.model,"PastTense")},Gerund:(t,e)=>{let n=t.machine||t.normal||t.text;return e.methods.two.transform.verb.toInfinitive(n,e.model,"Gerund")},PresentTense:(t,e)=>{let n=t.machine||t.normal||t.text;return t.tags.has("Infinitive")?n:e.methods.two.transform.verb.toInfinitive(n,e.model,"PresentTense")},Comparative:(t,e)=>{let n=t.machine||t.normal||t.text;return e.methods.two.transform.adjective.fromComparative(n,e.model)},Superlative:(t,e)=>{let n=t.machine||t.normal||t.text;return e.methods.two.transform.adjective.fromSuperlative(n,e.model)},Adverb:(t,e)=>{const{fromAdverb:n}=e.methods.two.transform.adjective;let a=t.machine||t.normal||t.text;return n(a)}},BKt=function(t){const e=t.world,n=Object.keys(Dke);t.docs.forEach(a=>{for(let r=0;r{e.forEach(n=>{n.penn=EKt(n)})})},SKt={preTagger:_Kt,root:BKt,penn:QKt},fH=["Person","Place","Organization"],IKt={Noun:{not:["Verb","Adjective","Adverb","Value","Determiner"]},Singular:{is:"Noun",not:["Plural","Uncountable"]},ProperNoun:{is:"Noun"},Person:{is:"Singular",also:["ProperNoun"],not:["Place","Organization","Date"]},FirstName:{is:"Person"},MaleName:{is:"FirstName",not:["FemaleName","LastName"]},FemaleName:{is:"FirstName",not:["MaleName","LastName"]},LastName:{is:"Person",not:["FirstName"]},Honorific:{is:"Person",not:["FirstName","LastName","Value"]},Place:{is:"Singular",not:["Person","Organization"]},Country:{is:"Place",also:["ProperNoun"],not:["City"]},City:{is:"Place",also:["ProperNoun"],not:["Country"]},Region:{is:"Place",also:["ProperNoun"]},Address:{},Organization:{is:"ProperNoun",not:["Person","Place"]},SportsTeam:{is:"Organization"},School:{is:"Organization"},Company:{is:"Organization"},Plural:{is:"Noun",not:["Singular","Uncountable"]},Uncountable:{is:"Noun"},Pronoun:{is:"Noun",not:fH},Actor:{is:"Noun",not:["Place","Organization"]},Activity:{is:"Noun",not:["Person","Place"]},Unit:{is:"Noun",not:fH},Demonym:{is:"Noun",also:["ProperNoun"],not:fH},Possessive:{is:"Noun"},Reflexive:{is:"Pronoun"}},DKt={Verb:{not:["Noun","Adjective","Adverb","Value","Expression"]},PresentTense:{is:"Verb",not:["PastTense","FutureTense"]},Infinitive:{is:"PresentTense",not:["Gerund"]},Imperative:{is:"Verb",not:["PastTense","Gerund","Copula"]},Gerund:{is:"PresentTense",not:["Copula"]},PastTense:{is:"Verb",not:["PresentTense","Gerund","FutureTense"]},FutureTense:{is:"Verb",not:["PresentTense","PastTense"]},Copula:{is:"Verb"},Modal:{is:"Verb",not:["Infinitive"]},Participle:{is:"PastTense"},Auxiliary:{is:"Verb",not:["PastTense","PresentTense","Gerund","Conjunction"]},PhrasalVerb:{is:"Verb"},Particle:{is:"PhrasalVerb",not:["PastTense","PresentTense","Copula","Gerund"]},Passive:{is:"Verb"}},$Kt={Value:{not:["Verb","Adjective","Adverb"]},Ordinal:{is:"Value",not:["Cardinal"]},Cardinal:{is:"Value",not:["Ordinal"]},Fraction:{is:"Value",not:["Noun"]},Multiple:{is:"TextValue"},RomanNumeral:{is:"Cardinal",not:["TextValue"]},TextValue:{is:"Value",not:["NumericValue"]},NumericValue:{is:"Value",not:["TextValue"]},Money:{is:"Cardinal"},Percent:{is:"Value"}},TKt={Date:{not:["Verb","Adverb","Adjective"]},Month:{is:"Date",also:["Noun"],not:["Year","WeekDay","Time"]},WeekDay:{is:"Date",also:["Noun"]},Year:{is:"Date",not:["RomanNumeral"]},FinancialQuarter:{is:"Date",not:"Fraction"},Holiday:{is:"Date",also:["Noun"]},Season:{is:"Date"},Timezone:{is:"Date",also:["Noun"],not:["ProperNoun"]},Time:{is:"Date",not:["AtMention"]},Duration:{is:"Date",also:["Noun"]}},PKt=["Noun","Verb","Adjective","Adverb","Value","QuestionWord"],FKt={Adjective:{not:["Noun","Verb","Adverb","Value"]},Comparable:{is:"Adjective"},Comparative:{is:"Adjective"},Superlative:{is:"Adjective",not:["Comparative"]},NumberRange:{},Adverb:{not:["Noun","Verb","Adjective","Value"]},Determiner:{not:["Noun","Verb","Adjective","Adverb","QuestionWord","Conjunction"]},Conjunction:{not:PKt},Preposition:{not:["Noun","Verb","Adjective","Adverb","QuestionWord","Determiner"]},QuestionWord:{not:["Determiner"]},Currency:{is:"Noun"},Expression:{not:["Noun","Adjective","Verb","Adverb"]},Abbreviation:{},Url:{not:["HashTag","PhoneNumber","Verb","Adjective","Value","AtMention","Email","SlashedTerm"]},PhoneNumber:{not:["HashTag","Verb","Adjective","Value","AtMention","Email"]},HashTag:{},AtMention:{is:"Noun",not:["HashTag","Email"]},Emoji:{not:["HashTag","Verb","Adjective","Value","AtMention"]},Emoticon:{not:["HashTag","Verb","Adjective","Value","AtMention","SlashedTerm"]},SlashedTerm:{not:["Emoticon","Url","Value"]},Email:{not:["HashTag","Verb","Adjective","Value","AtMention"]},Acronym:{not:["Plural","RomanNumeral","Pronoun","Date"]},Negative:{not:["Noun","Adjective","Value","Expression"]},Condition:{not:["Verb","Adjective","Noun","Value"]},There:{not:["Verb","Adjective","Noun","Value","Conjunction","Preposition"]},Prefix:{not:["Abbreviation","Acronym","ProperNoun"]},Hyphenated:{}};let RKt=Object.assign({},IKt,DKt,$Kt,TKt,FKt);const LKt={compute:SKt,methods:Qee,model:Iee,tags:RKt,hooks:["preTagger"]},NKt=/[,)"';:\-–—.…]/,$f=function(t,e){if(!t.found)return;let n=t.termList();for(let a=0;a{a.implicit=a.normal,a.text="",a.normal=""});for(let a=0;ae.toUpperCase()),t},jKt=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Contraction"}expand(){return this.docs.forEach(a=>{let r=zKt.test(a[0].text);a.forEach((i,o)=>{i.text=i.implicit||"",delete i.implicit,o(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[a,r+o],i)),n[0]&&(n[0].pre=t[a][r].pre,n[n.length-1].post=t[a][r].post,n[0].text=t[a][r].text,n[0].normal=t[a][r].normal),t[a].splice(r,1,...n))},GKt=/'/,HKt=new Set(["been","become"]),WKt=new Set(["what","how","when","if","too"]);let YKt=new Set(["too","also","enough"]);const XKt=(t,e)=>{for(let n=e+1;n{for(let n=e+1;n=0;n-=1)if(t[n].tags.has("Noun")||t[n].tags.has("Pronoun")||t[n].tags.has("Plural")||t[n].tags.has("Singular"))return t[n];return null},aJt=function(t,e){if(t[e].normal==="ain't"||t[e].normal==="aint"){if(t[e+1]&&t[e+1].normal==="never")return["have"];let a=nJt(t,e);if(a){if(a.normal==="we"||a.normal==="they")return["are","not"];if(a.normal==="i")return["am","not"];if(a.tags&&a.tags.has("Plural"))return["are","not"]}return["is","not"]}return[t[e].normal.replace(/n't/,""),"not"]},rJt={that:!0,there:!0,let:!0,here:!0,everywhere:!0},iJt={in:!0,by:!0,for:!0};let oJt=new Set(["too","also","enough","about"]),sJt=new Set(["is","are","did","were","could","should","must","had","have"]);const cJt=(t,e)=>{let n=t[e];if(rJt.hasOwnProperty(n.machine||n.normal))return!1;if(n.tags.has("Possessive"))return!0;if(n.tags.has("QuestionWord")||n.normal==="he's"||n.normal==="she's")return!1;let a=t[e+1];if(!a)return!0;if(n.normal==="it's")return!!a.tags.has("#Noun");if(a.switch=="Noun|Gerund"){let r=t[e+2];return r?r.tags.has("Copula")?!0:(r.normal==="on"||r.normal==="in",!1):!!(n.tags.has("Actor")||n.tags.has("ProperNoun"))}if(a.tags.has("Verb"))return a.tags.has("Infinitive")?!0:a.tags.has("Gerund")?!1:!!a.tags.has("PresentTense");if(a.switch==="Adj|Noun"){let r=t[e+2];if(!r)return!1;if(sJt.has(r.normal))return!0;if(oJt.has(r.normal))return!1}if(a.tags.has("Noun")){let r=a.machine||a.normal;return!(r==="here"||r==="there"||r==="everywhere"||a.tags.has("Possessive")||a.tags.has("ProperNoun")&&!n.tags.has("ProperNoun"))}if(t[e-1]&&iJt[t[e-1].normal]===!0)return!0;if(a.tags.has("Adjective")){let r=t[e+2];if(!r)return!1;if(r.tags.has("Noun")&&!r.tags.has("Pronoun")){let i=a.normal;return!(i==="above"||i==="below"||i==="behind")}return r.switch==="Noun|Verb"}return!!a.tags.has("Value")},Tke=/'/,lJt=function(t){t.forEach((e,n)=>{e.index&&(e.index[1]=n)})},uJt=function(t,e,n,a){let r=e.update();r.document=[t];let i=n+a;n>0&&(n-=1),t[i]&&(i+=1),r.ptrs=[[0,n,i]],r.compute(["freeze","lexicon","preTagger","unfreeze"]),lJt(t)},Pke={d:(t,e)=>tJt(t,e),t:(t,e)=>aJt(t,e),s:(t,e,n)=>cJt(t,e)?n.methods.one.setTag([t[e]],"Possessive",n,null,"2-contraction"):VKt(t,e)},dJt=function(t,e){let n=e.fromText(t.join(" "));return n.compute("id"),n.docs[0]},pJt=t=>{let{world:e,document:n}=t;n.forEach((a,r)=>{for(let i=a.length-1;i>=0;i-=1){if(a[i].implicit)continue;let o=null;Tke.test(a[i].normal)===!0&&(o=a[i].normal.split(Tke)[1]);let s=null;if(Pke.hasOwnProperty(o)&&(s=Pke[o](a,i,e)),s){s=dJt(s,t),UKt(n,[r,i],s),uJt(n[r],t,i,s.length);continue}}})},AJt={contractionTwo:pJt},mJt={compute:AJt,api:jKt,hooks:["contractionTwo"]},gJt=[{match:"[(all|both)] #Determiner #Noun",group:0,tag:"Noun",reason:"all-noun"},{match:"#Copula [(just|alone)]$",group:0,tag:"Adjective",reason:"not-adverb"},{match:"#Singular is #Adverb? [#PastTense$]",group:0,tag:"Adjective",reason:"is-filled"},{match:"[#PastTense] #Singular is",group:0,tag:"Adjective",reason:"smoked-poutine"},{match:"[#PastTense] #Plural are",group:0,tag:"Adjective",reason:"baked-onions"},{match:"well [#PastTense]",group:0,tag:"Adjective",reason:"well-made"},{match:"#Copula [fucked up?]",group:0,tag:"Adjective",reason:"swears-adjective"},{match:"#Singular (seems|appears) #Adverb? [#PastTense$]",group:0,tag:"Adjective",reason:"seems-filled"},{match:"#Copula #Adjective? [(out|in|through)]$",group:0,tag:"Adjective",reason:"still-out"},{match:"^[#Adjective] (the|your) #Noun",group:0,notIf:"(all|even)",tag:"Infinitive",reason:"shut-the"},{match:"the [said] #Noun",group:0,tag:"Adjective",reason:"the-said-card"},{match:"[#Hyphenated (#Hyphenated && #PastTense)] (#Noun|#Conjunction)",group:0,tag:"Adjective",notIf:"#Adverb",reason:"faith-based"},{match:"[#Hyphenated (#Hyphenated && #Gerund)] (#Noun|#Conjunction)",group:0,tag:"Adjective",notIf:"#Adverb",reason:"self-driving"},{match:"[#PastTense (#Hyphenated && #PhrasalVerb)] (#Noun|#Conjunction)",group:0,tag:"Adjective",reason:"dammed-up"},{match:"(#Hyphenated && #Value) fold",tag:"Adjective",reason:"two-fold"},{match:"must (#Hyphenated && #Infinitive)",tag:"Adjective",reason:"must-win"},{match:"(#Hyphenated && #Infinitive) #Hyphenated",tag:"Adjective",notIf:"#PhrasalVerb",reason:"vacuum-sealed"},{match:"too much",tag:"Adverb Adjective",reason:"bit-4"},{match:"a bit much",tag:"Determiner Adverb Adjective",reason:"bit-3"},{match:"[(un|contra|extra|inter|intra|macro|micro|mid|mis|mono|multi|pre|sub|tri|ex)] #Adjective",group:0,tag:["Adjective","Prefix"],reason:"un-skilled"}],hJt="(dark|bright|flat|light|soft|pale|dead|dim|faux|little|wee|sheer|most|near|good|extra|all)",Fke="(hard|fast|late|early|high|right|deep|close|direct)",fJt=[{match:"#Adverb [#Adverb] (and|or|then)",group:0,tag:"Adjective",reason:"kinda-sparkly-and"},{match:`[${hJt}] #Adjective`,group:0,tag:"Adverb",reason:"dark-green"},{match:"#Copula [far too] #Adjective",group:0,tag:"Adverb",reason:"far-too"},{match:"#Copula [still] (in|#Gerund|#Adjective)",group:0,tag:"Adverb",reason:"was-still-walking"},{match:`#Plural ${Fke}`,tag:"#PresentTense #Adverb",reason:"studies-hard"},{match:`#Verb [${Fke}] !#Noun?`,group:0,notIf:"(#Copula|get|got|getting|become|became|becoming|feel|feels|feeling|#Determiner|#Preposition)",tag:"Adverb",reason:"shops-direct"},{match:"[#Plural] a lot",tag:"PresentTense",reason:"studies-a-lot"}],bJt=[{match:"as [#Gerund] as",group:0,tag:"Adjective",reason:"as-gerund-as"},{match:"more [#Gerund] than",group:0,tag:"Adjective",reason:"more-gerund-than"},{match:"(so|very|extremely) [#Gerund]",group:0,tag:"Adjective",reason:"so-gerund"},{match:"(found|found) it #Adverb? [#Gerund]",group:0,tag:"Adjective",reason:"found-it-gerund"},{match:"a (little|bit|wee) bit? [#Gerund]",group:0,tag:"Adjective",reason:"a-bit-gerund"},{match:"#Gerund [#Gerund]",group:0,tag:"Adjective",notIf:"(impersonating|practicing|considering|assuming)",reason:"looking-annoying"},{match:"(looked|look|looks) #Adverb? [%Adj|Gerund%]",group:0,tag:"Adjective",notIf:"(impersonating|practicing|considering|assuming)",reason:"looked-amazing"},{match:"[%Adj|Gerund%] #Determiner",group:0,tag:"Gerund",reason:"developing-a"},{match:"#Possessive [%Adj|Gerund%] #Noun",group:0,tag:"Adjective",reason:"leading-manufacturer"},{match:"%Noun|Gerund% %Adj|Gerund%",tag:"Gerund #Adjective",reason:"meaning-alluring"},{match:"(face|embrace|reveal|stop|start|resume) %Adj|Gerund%",tag:"#PresentTense #Adjective",reason:"face-shocking"},{match:"(are|were) [%Adj|Gerund%] #Plural",group:0,tag:"Adjective",reason:"are-enduring-symbols"}],yJt=[{match:"#Determiner [#Adjective] #Copula",group:0,tag:"Noun",reason:"the-adj-is"},{match:"#Adjective [#Adjective] #Copula",group:0,tag:"Noun",reason:"adj-adj-is"},{match:"(his|its) [%Adj|Noun%]",group:0,tag:"Noun",notIf:"#Hyphenated",reason:"his-fine"},{match:"#Copula #Adverb? [all]",group:0,tag:"Noun",reason:"is-all"},{match:"(have|had) [#Adjective] #Preposition .",group:0,tag:"Noun",reason:"have-fun"},{match:"#Gerund (giant|capital|center|zone|application)",tag:"Noun",reason:"brewing-giant"},{match:"#Preposition (a|an) [#Adjective]$",group:0,tag:"Noun",reason:"an-instant"},{match:"no [#Adjective] #Modal",group:0,tag:"Noun",reason:"no-golden"},{match:"[brand #Gerund?] new",group:0,tag:"Adverb",reason:"brand-new"},{match:"(#Determiner|#Comparative|new|different) [kind]",group:0,tag:"Noun",reason:"some-kind"},{match:"#Possessive [%Adj|Noun%] #Noun",group:0,tag:"Adjective",reason:"her-favourite"},{match:"must && #Hyphenated .",tag:"Adjective",reason:"must-win"},{match:"#Determiner [#Adjective]$",tag:"Noun",notIf:"(this|that|#Comparative|#Superlative)",reason:"the-south"},{match:"(#Noun && #Hyphenated) (#Adjective && #Hyphenated)",tag:"Adjective",notIf:"(this|that|#Comparative|#Superlative)",reason:"company-wide"},{match:"#Determiner [#Adjective] (#Copula|#Determiner)",notIf:"(#Comparative|#Superlative)",group:0,tag:"Noun",reason:"the-poor"},{match:"[%Adj|Noun%] #Noun",notIf:"(#Pronoun|#ProperNoun)",group:0,tag:"Adjective",reason:"stable-foundations"}],wJt=[{match:"(slowly|quickly) [#Adjective]",group:0,tag:"Verb",reason:"slowly-adj"},{match:"does (#Adverb|not)? [#Adjective]",group:0,tag:"PresentTense",reason:"does-mean"},{match:"[(fine|okay|cool|ok)] by me",group:0,tag:"Adjective",reason:"okay-by-me"},{match:"i (#Adverb|do)? not? [mean]",group:0,tag:"PresentTense",reason:"i-mean"},{match:"will #Adjective",tag:"Auxiliary Infinitive",reason:"will-adj"},{match:"#Pronoun [#Adjective] #Determiner #Adjective? #Noun",group:0,tag:"Verb",reason:"he-adj-the"},{match:"#Copula [%Adj|Present%] to #Verb",group:0,tag:"Verb",reason:"adj-to"},{match:"#Copula [#Adjective] (well|badly|quickly|slowly)",group:0,tag:"Verb",reason:"done-well"},{match:"#Adjective and [#Gerund] !#Preposition?",group:0,tag:"Adjective",reason:"rude-and-x"},{match:"#Copula #Adverb? (over|under) [#PastTense]",group:0,tag:"Adjective",reason:"over-cooked"},{match:"#Copula #Adjective+ (and|or) [#PastTense]$",group:0,tag:"Adjective",reason:"bland-and-overcooked"},{match:"got #Adverb? [#PastTense] of",group:0,tag:"Adjective",reason:"got-tired-of"},{match:"(seem|seems|seemed|appear|appeared|appears|feel|feels|felt|sound|sounds|sounded) (#Adverb|#Adjective)? [#PastTense]",group:0,tag:"Adjective",reason:"felt-loved"},{match:"(seem|feel|seemed|felt) [#PastTense #Particle?]",group:0,tag:"Adjective",reason:"seem-confused"},{match:"a (bit|little|tad) [#PastTense #Particle?]",group:0,tag:"Adjective",reason:"a-bit-confused"},{match:"not be [%Adj|Past% #Particle?]",group:0,tag:"Adjective",reason:"do-not-be-confused"},{match:"#Copula just [%Adj|Past% #Particle?]",group:0,tag:"Adjective",reason:"is-just-right"},{match:"as [#Infinitive] as",group:0,tag:"Adjective",reason:"as-pale-as"},{match:"[%Adj|Past%] and #Adjective",group:0,tag:"Adjective",reason:"faled-and-oppressive"},{match:"or [#PastTense] #Noun",group:0,tag:"Adjective",notIf:"(#Copula|#Pronoun)",reason:"or-heightened-emotion"},{match:"(become|became|becoming|becomes) [#Verb]",group:0,tag:"Adjective",reason:"become-verb"},{match:"#Possessive [#PastTense] #Noun",group:0,tag:"Adjective",reason:"declared-intentions"},{match:"#Copula #Pronoun [%Adj|Present%]",group:0,tag:"Adjective",reason:"is-he-cool"},{match:"#Copula [%Adj|Past%] with",group:0,tag:"Adjective",notIf:"(associated|worn|baked|aged|armed|bound|fried|loaded|mixed|packed|pumped|filled|sealed)",reason:"is-crowded-with"},{match:"#Copula #Adverb? [%Adj|Present%]$",group:0,tag:"Adjective",reason:"was-empty$"}],vJt=[{match:"[still] #Adjective",group:0,tag:"Adverb",reason:"still-advb"},{match:"[still] #Verb",group:0,tag:"Adverb",reason:"still-verb"},{match:"[so] #Adjective",group:0,tag:"Adverb",reason:"so-adv"},{match:"[way] #Comparative",group:0,tag:"Adverb",reason:"way-adj"},{match:"[way] #Adverb #Adjective",group:0,tag:"Adverb",reason:"way-too-adj"},{match:"[all] #Verb",group:0,tag:"Adverb",reason:"all-verb"},{match:"#Verb [like]",group:0,notIf:"(#Modal|#PhrasalVerb)",tag:"Adverb",reason:"verb-like"},{match:"(barely|hardly) even",tag:"Adverb",reason:"barely-even"},{match:"[even] #Verb",group:0,tag:"Adverb",reason:"even-walk"},{match:"[even] #Comparative",group:0,tag:"Adverb",reason:"even-worse"},{match:"[even] (#Determiner|#Possessive)",group:0,tag:"#Adverb",reason:"even-the"},{match:"even left",tag:"#Adverb #Verb",reason:"even-left"},{match:"[way] #Adjective",group:0,tag:"#Adverb",reason:"way-over"},{match:"#PresentTense [(hard|quick|bright|slow|fast|backwards|forwards)]",notIf:"#Copula",group:0,tag:"Adverb",reason:"lazy-ly"},{match:"[much] #Adjective",group:0,tag:"Adverb",reason:"bit-1"},{match:"#Copula [#Adverb]$",group:0,tag:"Adjective",reason:"is-well"},{match:"a [(little|bit|wee) bit?] #Adjective",group:0,tag:"Adverb",reason:"a-bit-cold"},{match:"[(super|pretty)] #Adjective",group:0,tag:"Adverb",reason:"super-strong"},{match:"(become|fall|grow) #Adverb? [#PastTense]",group:0,tag:"Adjective",reason:"overly-weakened"},{match:"(a|an) #Adverb [#Participle] #Noun",group:0,tag:"Adjective",reason:"completely-beaten"},{match:"#Determiner #Adverb? [close]",group:0,tag:"Adjective",reason:"a-close"},{match:"#Gerund #Adverb? [close]",group:0,tag:"Adverb",notIf:"(getting|becoming|feeling)",reason:"being-close"},{match:"(the|those|these|a|an) [#Participle] #Noun",group:0,tag:"Adjective",reason:"blown-motor"},{match:"(#PresentTense|#PastTense) [back]",group:0,tag:"Adverb",notIf:"(#PhrasalVerb|#Copula)",reason:"charge-back"},{match:"#Verb [around]",group:0,tag:"Adverb",notIf:"#PhrasalVerb",reason:"send-around"},{match:"[later] #PresentTense",group:0,tag:"Adverb",reason:"later-say"},{match:"#Determiner [well] !#PastTense?",group:0,tag:"Noun",reason:"the-well"},{match:"#Adjective [enough]",group:0,tag:"Adverb",reason:"high-enough"}],kJt=[{match:"#Holiday (day|eve)",tag:"Holiday",reason:"holiday-day"},{match:"#Value of #Month",tag:"Date",reason:"value-of-month"},{match:"#Cardinal #Month",tag:"Date",reason:"cardinal-month"},{match:"#Month #Value to #Value",tag:"Date",reason:"value-to-value"},{match:"#Month the #Value",tag:"Date",reason:"month-the-value"},{match:"(#WeekDay|#Month) #Value",tag:"Date",reason:"date-value"},{match:"#Value (#WeekDay|#Month)",tag:"Date",reason:"value-date"},{match:"(#TextValue && #Date) #TextValue",tag:"Date",reason:"textvalue-date"},{match:"#Month #NumberRange",tag:"Date",reason:"aug 20-21"},{match:"#WeekDay #Month #Ordinal",tag:"Date",reason:"week mm-dd"},{match:"#Month #Ordinal #Cardinal",tag:"Date",reason:"mm-dd-yyy"},{match:"(#Place|#Demonmym|#Time) (standard|daylight|central|mountain)? time",tag:"Timezone",reason:"std-time"},{match:"(eastern|mountain|pacific|central|atlantic) (standard|daylight|summer)? time",tag:"Timezone",reason:"eastern-time"},{match:"#Time [(eastern|mountain|pacific|central|est|pst|gmt)]",group:0,tag:"Timezone",reason:"5pm-central"},{match:"(central|western|eastern) european time",tag:"Timezone",reason:"cet"}],xJt=[{match:"[sun] the #Ordinal",tag:"WeekDay",reason:"sun-the-5th"},{match:"[sun] #Date",group:0,tag:"WeekDay",reason:"sun-feb"},{match:"#Date (on|this|next|last|during)? [sun]",group:0,tag:"WeekDay",reason:"1pm-sun"},{match:"(in|by|before|during|on|until|after|of|within|all) [sat]",group:0,tag:"WeekDay",reason:"sat"},{match:"(in|by|before|during|on|until|after|of|within|all) [wed]",group:0,tag:"WeekDay",reason:"wed"},{match:"(in|by|before|during|on|until|after|of|within|all) [march]",group:0,tag:"Month",reason:"march"},{match:"[sat] #Date",group:0,tag:"WeekDay",reason:"sat-feb"},{match:"#Preposition [(march|may)]",group:0,tag:"Month",reason:"in-month"},{match:"(this|next|last) (march|may) !#Infinitive?",tag:"#Date #Month",reason:"this-month"},{match:"(march|may) the? #Value",tag:"#Month #Date #Date",reason:"march-5th"},{match:"#Value of? (march|may)",tag:"#Date #Date #Month",reason:"5th-of-march"},{match:"[(march|may)] .? #Date",group:0,tag:"Month",reason:"march-and-feb"},{match:"#Date .? [(march|may)]",group:0,tag:"Month",reason:"feb-and-march"},{match:"#Adverb [(march|may)]",group:0,tag:"Verb",reason:"quickly-march"},{match:"[(march|may)] #Adverb",group:0,tag:"Verb",reason:"march-quickly"},{match:"#Value (am|pm)",tag:"Time",reason:"2-am"}],OJt="(feel|sense|process|rush|side|bomb|bully|challenge|cover|crush|dump|exchange|flow|function|issue|lecture|limit|march|process)",CJt=[{match:"(the|any) [more]",group:0,tag:"Singular",reason:"more-noun"},{match:"[more] #Noun",group:0,tag:"Adjective",reason:"more-noun"},{match:"(right|rights) of .",tag:"Noun",reason:"right-of"},{match:"a [bit]",group:0,tag:"Singular",reason:"bit-2"},{match:"a [must]",group:0,tag:"Singular",reason:"must-2"},{match:"(we|us) [all]",group:0,tag:"Noun",reason:"we all"},{match:"due to [#Verb]",group:0,tag:"Noun",reason:"due-to"},{match:"some [#Verb] #Plural",group:0,tag:"Noun",reason:"determiner6"},{match:"#Possessive #Ordinal [#PastTense]",group:0,tag:"Noun",reason:"first-thought"},{match:"(the|this|those|these) #Adjective [%Verb|Noun%]",group:0,tag:"Noun",notIf:"#Copula",reason:"the-adj-verb"},{match:"(the|this|those|these) #Adverb #Adjective [#Verb]",group:0,tag:"Noun",reason:"determiner4"},{match:"the [#Verb] #Preposition .",group:0,tag:"Noun",reason:"determiner1"},{match:"(a|an|the) [#Verb] of",group:0,tag:"Noun",reason:"the-verb-of"},{match:"#Determiner #Noun of [#Verb]",group:0,tag:"Noun",notIf:"#Gerund",reason:"noun-of-noun"},{match:"#PastTense #Preposition [#PresentTense]",group:0,notIf:"#Gerund",tag:"Noun",reason:"ended-in-ruins"},{match:"#Conjunction [u]",group:0,tag:"Pronoun",reason:"u-pronoun-2"},{match:"[u] #Verb",group:0,tag:"Pronoun",reason:"u-pronoun-1"},{match:"#Determiner [(western|eastern|northern|southern|central)] #Noun",group:0,tag:"Noun",reason:"western-line"},{match:"(#Singular && @hasHyphen) #PresentTense",tag:"Noun",reason:"hyphen-verb"},{match:"is no [#Verb]",group:0,tag:"Noun",reason:"is-no-verb"},{match:"do [so]",group:0,tag:"Noun",reason:"so-noun"},{match:"#Determiner [(shit|damn|hell)]",group:0,tag:"Noun",reason:"swears-noun"},{match:"to [(shit|hell)]",group:0,tag:"Noun",reason:"to-swears"},{match:"(the|these) [#Singular] (were|are)",group:0,tag:"Plural",reason:"singular-were"},{match:"a #Noun+ or #Adverb+? [#Verb]",group:0,tag:"Noun",reason:"noun-or-noun"},{match:"(the|those|these|a|an) #Adjective? [#PresentTense #Particle?]",group:0,tag:"Noun",notIf:"(seem|appear|include|#Gerund|#Copula)",reason:"det-inf"},{match:"#Noun #Actor",tag:"Actor",notIf:"(#Person|#Pronoun)",reason:"thing-doer"},{match:"#Gerund #Actor",tag:"Actor",reason:"gerund-doer"},{match:"co #Singular",tag:"Actor",reason:"co-noun"},{match:"[#Noun+] #Actor",group:0,tag:"Actor",notIf:"(#Honorific|#Pronoun|#Possessive)",reason:"air-traffic-controller"},{match:"(urban|cardiac|cardiovascular|respiratory|medical|clinical|visual|graphic|creative|dental|exotic|fine|certified|registered|technical|virtual|professional|amateur|junior|senior|special|pharmaceutical|theoretical)+ #Noun? #Actor",tag:"Actor",reason:"fine-artist"},{match:"#Noun+ (coach|chef|king|engineer|fellow|personality|boy|girl|man|woman|master)",tag:"Actor",reason:"dance-coach"},{match:"chief . officer",tag:"Actor",reason:"chief-x-officer"},{match:"chief of #Noun+",tag:"Actor",reason:"chief-of-police"},{match:"senior? vice? president of #Noun+",tag:"Actor",reason:"president-of"},{match:"#Determiner [sun]",group:0,tag:"Singular",reason:"the-sun"},{match:"#Verb (a|an) [#Value]$",group:0,tag:"Singular",reason:"did-a-value"},{match:"the [(can|will|may)]",group:0,tag:"Singular",reason:"the can"},{match:"#FirstName #Acronym? (#Possessive && #LastName)",tag:"Possessive",reason:"name-poss"},{match:"#Organization+ #Possessive",tag:"Possessive",reason:"org-possessive"},{match:"#Place+ #Possessive",tag:"Possessive",reason:"place-possessive"},{match:"#Possessive #PresentTense #Particle?",notIf:"(#Gerund|her)",tag:"Noun",reason:"possessive-verb"},{match:"(my|our|their|her|his|its) [(#Plural && #Actor)] #Noun",tag:"Possessive",reason:"my-dads"},{match:"#Value of a [second]",group:0,unTag:"Value",tag:"Singular",reason:"10th-of-a-second"},{match:"#Value [seconds]",group:0,unTag:"Value",tag:"Plural",reason:"10-seconds"},{match:"in [#Infinitive]",group:0,tag:"Singular",reason:"in-age"},{match:"a [#Adjective] #Preposition",group:0,tag:"Noun",reason:"a-minor-in"},{match:"#Determiner [#Singular] said",group:0,tag:"Actor",reason:"the-actor-said"},{match:`#Determiner #Noun [${OJt}] !(#Preposition|to|#Adverb)?`,group:0,tag:"Noun",reason:"the-noun-sense"},{match:"[#PresentTense] (of|by|for) (a|an|the) #Noun #Copula",group:0,tag:"Plural",reason:"photographs-of"},{match:"#Infinitive and [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"fight and win"},{match:"#Noun and [#Verb] and #Noun",group:0,tag:"Noun",reason:"peace-and-flowers"},{match:"the #Cardinal [%Adj|Noun%]",group:0,tag:"Noun",reason:"the-1992-classic"},{match:"#Copula the [%Adj|Noun%] #Noun",group:0,tag:"Adjective",reason:"the-premier-university"},{match:"i #Verb [me] #Noun",group:0,tag:"Possessive",reason:"scottish-me"},{match:"[#PresentTense] (music|class|lesson|night|party|festival|league|ceremony)",group:0,tag:"Noun",reason:"dance-music"},{match:"[wit] (me|it)",group:0,tag:"Presposition",reason:"wit-me"},{match:"#PastTense #Possessive [#Verb]",group:0,tag:"Noun",notIf:"(saw|made)",reason:"left-her-boots"},{match:"#Value [%Plural|Verb%]",group:0,tag:"Plural",notIf:"(one|1|a|an)",reason:"35-signs"},{match:"had [#PresentTense]",group:0,tag:"Noun",notIf:"(#Gerund|come|become)",reason:"had-time"},{match:"%Adj|Noun% %Noun|Verb%",tag:"#Adjective #Noun",notIf:"#ProperNoun #Noun",reason:"instant-access"},{match:"#Determiner [%Adj|Noun%] #Conjunction",group:0,tag:"Noun",reason:"a-rep-to"},{match:"#Adjective #Noun [%Plural|Verb%]$",group:0,tag:"Plural",notIf:"#Pronoun",reason:"near-death-experiences"},{match:"#Possessive #Noun [%Plural|Verb%]$",group:0,tag:"Plural",reason:"your-guild-colors"}],_Jt=[{match:"(this|that|the|a|an) [#Gerund #Infinitive]",group:0,tag:"Singular",reason:"the-planning-process"},{match:"(that|the) [#Gerund #PresentTense]",group:0,ifNo:"#Copula",tag:"Plural",reason:"the-paving-stones"},{match:"#Determiner [#Gerund] #Noun",group:0,tag:"Adjective",reason:"the-gerund-noun"},{match:"#Pronoun #Infinitive [#Gerund] #PresentTense",group:0,tag:"Noun",reason:"tipping-sucks"},{match:"#Adjective [#Gerund]",group:0,tag:"Noun",notIf:"(still|even|just)",reason:"early-warning"},{match:"[#Gerund] #Adverb? not? #Copula",group:0,tag:"Activity",reason:"gerund-copula"},{match:"#Copula [(#Gerund|#Activity)] #Copula",group:0,tag:"Gerund",reason:"are-doing-is"},{match:"[#Gerund] #Modal",group:0,tag:"Activity",reason:"gerund-modal"},{match:"#Singular for [%Noun|Gerund%]",group:0,tag:"Gerund",reason:"noun-for-gerund"},{match:"#Comparative (for|at) [%Noun|Gerund%]",group:0,tag:"Gerund",reason:"better-for-gerund"},{match:"#PresentTense the [#Gerund]",group:0,tag:"Noun",reason:"keep-the-touching"}],BJt=[{match:"#Infinitive (this|that|the) [#Infinitive]",group:0,tag:"Noun",reason:"do-this-dance"},{match:"#Gerund #Determiner [#Infinitive]",group:0,tag:"Noun",reason:"running-a-show"},{match:"#Determiner (only|further|just|more|backward) [#Infinitive]",group:0,tag:"Noun",reason:"the-only-reason"},{match:"(the|this|a|an) [#Infinitive] #Adverb? #Verb",group:0,tag:"Noun",reason:"determiner5"},{match:"#Determiner #Adjective #Adjective? [#Infinitive]",group:0,tag:"Noun",reason:"a-nice-inf"},{match:"#Determiner #Demonym [#PresentTense]",group:0,tag:"Noun",reason:"mexican-train"},{match:"#Adjective #Noun+ [#Infinitive] #Copula",group:0,tag:"Noun",reason:"career-move"},{match:"at some [#Infinitive]",group:0,tag:"Noun",reason:"at-some-inf"},{match:"(go|goes|went) to [#Infinitive]",group:0,tag:"Noun",reason:"goes-to-verb"},{match:"(a|an) #Adjective? #Noun [#Infinitive] (#Preposition|#Noun)",group:0,notIf:"from",tag:"Noun",reason:"a-noun-inf"},{match:"(a|an) #Noun [#Infinitive]$",group:0,tag:"Noun",reason:"a-noun-inf2"},{match:"#Gerund #Adjective? for [#Infinitive]",group:0,tag:"Noun",reason:"running-for"},{match:"about [#Infinitive]",group:0,tag:"Singular",reason:"about-love"},{match:"#Plural on [#Infinitive]",group:0,tag:"Noun",reason:"on-stage"},{match:"any [#Infinitive]",group:0,tag:"Noun",reason:"any-charge"},{match:"no [#Infinitive]",group:0,tag:"Noun",reason:"no-doubt"},{match:"number of [#PresentTense]",group:0,tag:"Noun",reason:"number-of-x"},{match:"(taught|teaches|learns|learned) [#PresentTense]",group:0,tag:"Noun",reason:"teaches-x"},{match:"(try|use|attempt|build|make) [#Verb #Particle?]",notIf:"(#Copula|#Noun|sure|fun|up)",group:0,tag:"Noun",reason:"do-verb"},{match:"^[#Infinitive] (is|was)",group:0,tag:"Noun",reason:"checkmate-is"},{match:"#Infinitive much [#Infinitive]",group:0,tag:"Noun",reason:"get-much"},{match:"[cause] #Pronoun #Verb",group:0,tag:"Conjunction",reason:"cause-cuz"},{match:"the #Singular [#Infinitive] #Noun",group:0,tag:"Noun",notIf:"#Pronoun",reason:"cardio-dance"},{match:"#Determiner #Modal [#Noun]",group:0,tag:"PresentTense",reason:"should-smoke"},{match:"this [#Plural]",group:0,tag:"PresentTense",notIf:"(#Preposition|#Date)",reason:"this-verbs"},{match:"#Noun that [#Plural]",group:0,tag:"PresentTense",notIf:"(#Preposition|#Pronoun|way)",reason:"voice-that-rocks"},{match:"that [#Plural] to",group:0,tag:"PresentTense",notIf:"#Preposition",reason:"that-leads-to"},{match:"(let|make|made) (him|her|it|#Person|#Place|#Organization)+ [#Singular] (a|an|the|it)",group:0,tag:"Infinitive",reason:"let-him-glue"},{match:"#Verb (all|every|each|most|some|no) [#PresentTense]",notIf:"#Modal",group:0,tag:"Noun",reason:"all-presentTense"},{match:"(had|have|#PastTense) #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"better",reason:"adj-presentTense"},{match:"#Value #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"one-big-reason"},{match:"#PastTense #Adjective+ [#PresentTense]",group:0,tag:"Noun",notIf:"(#Copula|better)",reason:"won-wide-support"},{match:"(many|few|several|couple) [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"many-poses"},{match:"#Determiner #Adverb #Adjective [%Noun|Verb%]",group:0,tag:"Noun",notIf:"#Copula",reason:"very-big-dream"},{match:"from #Noun to [%Noun|Verb%]",group:0,tag:"Noun",reason:"start-to-finish"},{match:"(for|with|of) #Noun (and|or|not) [%Noun|Verb%]",group:0,tag:"Noun",notIf:"#Pronoun",reason:"for-food-and-gas"},{match:"#Adjective #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"adorable-little-store"},{match:"#Gerund #Adverb? #Comparative [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"higher-costs"},{match:"(#Noun && @hasComma) #Noun (and|or) [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"noun-list"},{match:"(many|any|some|several) [#PresentTense] for",group:0,tag:"Noun",reason:"any-verbs-for"},{match:"to #PresentTense #Noun [#PresentTense] #Preposition",group:0,tag:"Noun",reason:"gas-exchange"},{match:"#PastTense (until|as|through|without) [#PresentTense]",group:0,tag:"Noun",reason:"waited-until-release"},{match:"#Gerund like #Adjective? [#PresentTense]",group:0,tag:"Plural",reason:"like-hot-cakes"},{match:"some #Adjective [#PresentTense]",group:0,tag:"Noun",reason:"some-reason"},{match:"for some [#PresentTense]",group:0,tag:"Noun",reason:"for-some-reason"},{match:"(same|some|the|that|a) kind of [#PresentTense]",group:0,tag:"Noun",reason:"some-kind-of"},{match:"(same|some|the|that|a) type of [#PresentTense]",group:0,tag:"Noun",reason:"some-type-of"},{match:"#Gerund #Adjective #Preposition [#PresentTense]",group:0,tag:"Noun",reason:"doing-better-for-x"},{match:"(get|got|have) #Comparative [#PresentTense]",group:0,tag:"Noun",reason:"got-better-aim"},{match:"whose [#PresentTense] #Copula",group:0,tag:"Noun",reason:"whos-name-was"},{match:"#PhrasalVerb #Particle #Preposition [#PresentTense]",group:0,tag:"Noun",reason:"given-up-on-x"},{match:"there (are|were) #Adjective? [#PresentTense]",group:0,tag:"Plural",reason:"there-are"},{match:"#Value [#PresentTense] of",group:0,notIf:"(one|1|#Copula|#Infinitive)",tag:"Plural",reason:"2-trains"},{match:"[#PresentTense] (are|were) #Adjective",group:0,tag:"Plural",reason:"compromises-are-possible"},{match:"^[(hope|guess|thought|think)] #Pronoun #Verb",group:0,tag:"Infinitive",reason:"suppose-i"},{match:"#Possessive #Adjective [#Verb]",group:0,tag:"Noun",notIf:"#Copula",reason:"our-full-support"},{match:"[(tastes|smells)] #Adverb? #Adjective",group:0,tag:"PresentTense",reason:"tastes-good"},{match:"#Copula #Gerund [#PresentTense] !by?",group:0,tag:"Noun",notIf:"going",reason:"ignoring-commute"},{match:"#Determiner #Adjective? [(shed|thought|rose|bid|saw|spelt)]",group:0,tag:"Noun",reason:"noun-past"},{match:"how to [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"how-to-noun"},{match:"which [%Noun|Verb%] #Noun",group:0,tag:"Infinitive",reason:"which-boost-it"},{match:"#Gerund [%Plural|Verb%]",group:0,tag:"Plural",reason:"asking-questions"},{match:"(ready|available|difficult|hard|easy|made|attempt|try) to [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"ready-to-noun"},{match:"(bring|went|go|drive|run|bike) to [%Noun|Verb%]",group:0,tag:"Noun",reason:"bring-to-noun"},{match:"#Modal #Noun [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"would-you-look"},{match:"#Copula just [#Infinitive]",group:0,tag:"Noun",reason:"is-just-spam"},{match:"^%Noun|Verb% %Plural|Verb%",tag:"Imperative #Plural",reason:"request-copies"},{match:"#Adjective #Plural and [%Plural|Verb%]",group:0,tag:"#Plural",reason:"pickles-and-drinks"},{match:"#Determiner #Year [#Verb]",group:0,tag:"Noun",reason:"the-1968-film"},{match:"#Determiner [#PhrasalVerb #Particle]",group:0,tag:"Noun",reason:"the-break-up"},{match:"#Determiner [%Adj|Noun%] #Noun",group:0,tag:"Adjective",notIf:"(#Pronoun|#Possessive|#ProperNoun)",reason:"the-individual-goals"},{match:"[%Noun|Verb%] or #Infinitive",group:0,tag:"Infinitive",reason:"work-or-prepare"},{match:"to #Infinitive [#PresentTense]",group:0,tag:"Noun",notIf:"(#Gerund|#Copula|help)",reason:"to-give-thanks"},{match:"[#Noun] me",group:0,tag:"Verb",reason:"kills-me"},{match:"%Plural|Verb% %Plural|Verb%",tag:"#PresentTense #Plural",reason:"removes-wrinkles"}],EJt=[{match:"#Money and #Money #Currency?",tag:"Money",reason:"money-and-money"},{match:"#Value #Currency [and] #Value (cents|ore|centavos|sens)",group:0,tag:"money",reason:"and-5-cents"},{match:"#Value (mark|rand|won|rub|ore)",tag:"#Money #Currency",reason:"4-mark"},{match:"a pound",tag:"#Money #Unit",reason:"a-pound"},{match:"#Value (pound|pounds)",tag:"#Money #Unit",reason:"4-pounds"}],QJt=[{match:"[(half|quarter)] of? (a|an)",group:0,tag:"Fraction",reason:"millionth"},{match:"#Adverb [half]",group:0,tag:"Fraction",reason:"nearly-half"},{match:"[half] the",group:0,tag:"Fraction",reason:"half-the"},{match:"#Cardinal and a half",tag:"Fraction",reason:"and-a-half"},{match:"#Value (halves|halfs|quarters)",tag:"Fraction",reason:"two-halves"},{match:"a #Ordinal",tag:"Fraction",reason:"a-quarter"},{match:"[#Cardinal+] (#Fraction && /s$/)",tag:"Fraction",reason:"seven-fifths"},{match:"[#Cardinal+ #Ordinal] of .",group:0,tag:"Fraction",reason:"ordinal-of"},{match:"[(#NumericValue && #Ordinal)] of .",group:0,tag:"Fraction",reason:"num-ordinal-of"},{match:"(a|one) #Cardinal?+ #Ordinal",tag:"Fraction",reason:"a-ordinal"},{match:"#Cardinal+ out? of every? #Cardinal",tag:"Fraction",reason:"out-of"}],SJt=[{match:"#Cardinal [second]",tag:"Unit",reason:"one-second"},{match:"!once? [(a|an)] (#Duration|hundred|thousand|million|billion|trillion)",group:0,tag:"Value",reason:"a-is-one"},{match:"1 #Value #PhoneNumber",tag:"PhoneNumber",reason:"1-800-Value"},{match:"#NumericValue #PhoneNumber",tag:"PhoneNumber",reason:"(800) PhoneNumber"},{match:"#Demonym #Currency",tag:"Currency",reason:"demonym-currency"},{match:"#Value [(buck|bucks|grand)]",group:0,tag:"Currency",reason:"value-bucks"},{match:"[#Value+] #Currency",group:0,tag:"Money",reason:"15 usd"},{match:"[second] #Noun",group:0,tag:"Ordinal",reason:"second-noun"},{match:"#Value+ [#Currency]",group:0,tag:"Unit",reason:"5-yan"},{match:"#Value [(foot|feet)]",group:0,tag:"Unit",reason:"foot-unit"},{match:"#Value [#Abbreviation]",group:0,tag:"Unit",reason:"value-abbr"},{match:"#Value [k]",group:0,tag:"Unit",reason:"value-k"},{match:"#Unit an hour",tag:"Unit",reason:"unit-an-hour"},{match:"(minus|negative) #Value",tag:"Value",reason:"minus-value"},{match:"#Value (point|decimal) #Value",tag:"Value",reason:"value-point-value"},{match:"#Determiner [(half|quarter)] #Ordinal",group:0,tag:"Value",reason:"half-ordinal"},{match:"#Multiple+ and #Value",tag:"Value",reason:"magnitude-and-value"},{match:"#Value #Unit [(per|an) (hr|hour|sec|second|min|minute)]",group:0,tag:"Unit",reason:"12-miles-per-second"},{match:"#Value [(square|cubic)] #Unit",group:0,tag:"Unit",reason:"square-miles"}],IJt=[{match:"#Copula [(#Noun|#PresentTense)] #LastName",group:0,tag:"FirstName",reason:"copula-noun-lastname"},{match:"(sister|pope|brother|father|aunt|uncle|grandpa|grandfather|grandma) #ProperNoun",tag:"Person",reason:"lady-titlecase",safe:!0},{match:"#FirstName [#Determiner #Noun] #LastName",group:0,tag:"Person",reason:"first-noun-last"},{match:"#ProperNoun (b|c|d|e|f|g|h|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z) #ProperNoun",tag:"Person",reason:"titlecase-acronym-titlecase",safe:!0},{match:"#Acronym #LastName",tag:"Person",reason:"acronym-lastname",safe:!0},{match:"#Person (jr|sr|md)",tag:"Person",reason:"person-honorific"},{match:"#Honorific #Acronym",tag:"Person",reason:"Honorific-TitleCase"},{match:"#Person #Person the? #RomanNumeral",tag:"Person",reason:"roman-numeral"},{match:"#FirstName [/^[^aiurck]$/]",group:0,tag:["Acronym","Person"],reason:"john-e"},{match:"#Noun van der? #Noun",tag:"Person",reason:"van der noun",safe:!0},{match:"(king|queen|prince|saint|lady) of #Noun",tag:"Person",reason:"king-of-noun",safe:!0},{match:"(prince|lady) #Place",tag:"Person",reason:"lady-place"},{match:"(king|queen|prince|saint) #ProperNoun",tag:"Person",notIf:"#Place",reason:"saint-foo"},{match:"al (#Person|#ProperNoun)",tag:"Person",reason:"al-borlen",safe:!0},{match:"#FirstName de #Noun",tag:"Person",reason:"bill-de-noun"},{match:"#FirstName (bin|al) #Noun",tag:"Person",reason:"bill-al-noun"},{match:"#FirstName #Acronym #ProperNoun",tag:"Person",reason:"bill-acronym-title"},{match:"#FirstName #FirstName #ProperNoun",tag:"Person",reason:"bill-firstname-title"},{match:"#Honorific #FirstName? #ProperNoun",tag:"Person",reason:"dr-john-Title"},{match:"#FirstName the #Adjective",tag:"Person",reason:"name-the-great"},{match:"#ProperNoun (van|al|bin) #ProperNoun",tag:"Person",reason:"title-van-title",safe:!0},{match:"#ProperNoun (de|du) la? #ProperNoun",tag:"Person",notIf:"#Place",reason:"title-de-title"},{match:"#Singular #Acronym #LastName",tag:"#FirstName #Person .",reason:"title-acro-noun",safe:!0},{match:"[#ProperNoun] #Person",group:0,tag:"Person",reason:"proper-person",safe:!0},{match:"#Person [#ProperNoun #ProperNoun]",group:0,tag:"Person",notIf:"#Possessive",reason:"three-name-person",safe:!0},{match:"#FirstName #Acronym? [#ProperNoun]",group:0,tag:"LastName",notIf:"#Possessive",reason:"firstname-titlecase"},{match:"#FirstName [#FirstName]",group:0,tag:"LastName",reason:"firstname-firstname"},{match:"#FirstName #Acronym #Noun",tag:"Person",reason:"n-acro-noun",safe:!0},{match:"#FirstName [(de|di|du|van|von)] #Person",group:0,tag:"LastName",reason:"de-firstname"},{match:"[(lieutenant|corporal|sergeant|captain|qeen|king|admiral|major|colonel|marshal|president|queen|king)+] #ProperNoun",group:0,tag:"Honorific",reason:"seargeant-john"},{match:"[(private|general|major|rear|prime|field|count|miss)] #Honorific? #Person",group:0,tag:["Honorific","Person"],reason:"ambg-honorifics"},{match:"#Honorific #FirstName [#Singular]",group:0,tag:"LastName",notIf:"#Possessive",reason:"dr-john-foo",safe:!0},{match:"[(his|her) (majesty|honour|worship|excellency|honorable)] #Person",group:0,tag:"Honorific",reason:"his-excellency"},{match:"#Honorific #Actor",tag:"Honorific",reason:"Lieutenant colonel"},{match:"(first|second|third|1st|2nd|3rd) #Actor",tag:"Honorific",reason:"first lady"},{match:"#Person #RomanNumeral",tag:"Person",reason:"louis-IV"}],DJt=[{match:"#FirstName #Noun$",tag:". #LastName",notIf:"(#Possessive|#Organization|#Place|#Pronoun|@hasTitleCase)",reason:"firstname-noun"},{match:"%Person|Date% #Acronym? #ProperNoun",tag:"Person",reason:"jan-thierson"},{match:"%Person|Noun% #Acronym? #ProperNoun",tag:"Person",reason:"switch-person",safe:!0},{match:"%Person|Noun% #Organization",tag:"Organization",reason:"olive-garden"},{match:"%Person|Verb% #Acronym? #ProperNoun",tag:"Person",reason:"verb-propernoun",ifNo:"#Actor"},{match:"[%Person|Verb%] (will|had|has|said|says|told|did|learned|wants|wanted)",group:0,tag:"Person",reason:"person-said"},{match:"[%Person|Place%] (harbor|harbour|pier|town|city|place|dump|landfill)",group:0,tag:"Place",reason:"sydney-harbour"},{match:"(west|east|north|south) [%Person|Place%]",group:0,tag:"Place",reason:"east-sydney"},{match:"#Modal [%Person|Verb%]",group:0,tag:"Verb",reason:"would-mark"},{match:"#Adverb [%Person|Verb%]",group:0,tag:"Verb",reason:"really-mark"},{match:"[%Person|Verb%] (#Adverb|#Comparative)",group:0,tag:"Verb",reason:"drew-closer"},{match:"%Person|Verb% #Person",tag:"Person",reason:"rob-smith"},{match:"%Person|Verb% #Acronym #ProperNoun",tag:"Person",reason:"rob-a-smith"},{match:"[will] #Verb",group:0,tag:"Modal",reason:"will-verb"},{match:"(will && @isTitleCase) #ProperNoun",tag:"Person",reason:"will-name"},{match:"(#FirstName && !#Possessive) [#Singular] #Verb",group:0,safe:!0,tag:"LastName",reason:"jack-layton"},{match:"^[#Singular] #Person #Verb",group:0,safe:!0,tag:"Person",reason:"sherwood-anderson"},{match:"(a|an) [#Person]$",group:0,unTag:"Person",reason:"a-warhol"}],$Jt=[{match:"#Copula (pretty|dead|full|well|sure) (#Adjective|#Noun)",tag:"#Copula #Adverb #Adjective",reason:"sometimes-adverb"},{match:"(#Pronoun|#Person) (had|#Adverb)? [better] #PresentTense",group:0,tag:"Modal",reason:"i-better"},{match:"(#Modal|i|they|we|do) not? [like]",group:0,tag:"PresentTense",reason:"modal-like"},{match:"#Noun #Adverb? [left]",group:0,tag:"PastTense",reason:"left-verb"},{match:"will #Adverb? not? #Adverb? [be] #Gerund",group:0,tag:"Copula",reason:"will-be-copula"},{match:"will #Adverb? not? #Adverb? [be] #Adjective",group:0,tag:"Copula",reason:"be-copula"},{match:"[march] (up|down|back|toward)",notIf:"#Date",group:0,tag:"Infinitive",reason:"march-to"},{match:"#Modal [march]",group:0,tag:"Infinitive",reason:"must-march"},{match:"[may] be",group:0,tag:"Verb",reason:"may-be"},{match:"[(subject|subjects|subjected)] to",group:0,tag:"Verb",reason:"subject to"},{match:"[home] to",group:0,tag:"PresentTense",reason:"home to"},{match:"[open] #Determiner",group:0,tag:"Infinitive",reason:"open-the"},{match:"(were|was) being [#PresentTense]",group:0,tag:"PastTense",reason:"was-being"},{match:"(had|has|have) [been /en$/]",group:0,tag:"Auxiliary Participle",reason:"had-been-broken"},{match:"(had|has|have) [been /ed$/]",group:0,tag:"Auxiliary PastTense",reason:"had-been-smoked"},{match:"(had|has) #Adverb? [been] #Adverb? #PastTense",group:0,tag:"Auxiliary",reason:"had-been-adj"},{match:"(had|has) to [#Noun] (#Determiner|#Possessive)",group:0,tag:"Infinitive",reason:"had-to-noun"},{match:"have [#PresentTense]",group:0,tag:"PastTense",notIf:"(come|gotten)",reason:"have-read"},{match:"(does|will|#Modal) that [work]",group:0,tag:"PastTense",reason:"does-that-work"},{match:"[(sound|sounds)] #Adjective",group:0,tag:"PresentTense",reason:"sounds-fun"},{match:"[(look|looks)] #Adjective",group:0,tag:"PresentTense",reason:"looks-good"},{match:"[(start|starts|stop|stops|begin|begins)] #Gerund",group:0,tag:"Verb",reason:"starts-thinking"},{match:"(have|had) read",tag:"Modal #PastTense",reason:"read-read"},{match:"(is|was|were) [(under|over) #PastTense]",group:0,tag:"Adverb Adjective",reason:"was-under-cooked"},{match:"[shit] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear1-verb"},{match:"[damn] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear2-verb"},{match:"[fuck] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear3-verb"},{match:"#Plural that %Noun|Verb%",tag:". #Preposition #Infinitive",reason:"jobs-that-work"},{match:"[works] for me",group:0,tag:"PresentTense",reason:"works-for-me"},{match:"as #Pronoun [please]",group:0,tag:"Infinitive",reason:"as-we-please"},{match:"[(co|mis|de|inter|intra|pre|re|un|out|under|over|counter)] #Verb",group:0,tag:["Verb","Prefix"],notIf:"(#Copula|#PhrasalVerb)",reason:"co-write"},{match:"#PastTense and [%Adj|Past%]",group:0,tag:"PastTense",reason:"dressed-and-left"},{match:"[%Adj|Past%] and #PastTense",group:0,tag:"PastTense",reason:"dressed-and-left"},{match:"#Copula #Pronoun [%Adj|Past%]",group:0,tag:"Adjective",reason:"is-he-stoked"},{match:"to [%Noun|Verb%] #Preposition",group:0,tag:"Infinitive",reason:"to-dream-of"}],TJt=[{match:"will (#Adverb|not)+? [have] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"will-have-vb"},{match:"[#Copula] (#Adverb|not)+? (#Gerund|#PastTense)",group:0,tag:"Auxiliary",reason:"copula-walking"},{match:"[(#Modal|did)+] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"modal-verb"},{match:"#Modal (#Adverb|not)+? [have] (#Adverb|not)+? [had] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"would-have"},{match:"[(has|had)] (#Adverb|not)+? #PastTense",group:0,tag:"Auxiliary",reason:"had-walked"},{match:"[(do|does|did|will|have|had|has|got)] (not|#Adverb)+? #Verb",group:0,tag:"Auxiliary",reason:"have-had"},{match:"[about to] #Adverb? #Verb",group:0,tag:["Auxiliary","Verb"],reason:"about-to"},{match:"#Modal (#Adverb|not)+? [be] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"would-be"},{match:"[(#Modal|had|has)] (#Adverb|not)+? [been] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"had-been"},{match:"[(be|being|been)] #Participle",group:0,tag:"Auxiliary",reason:"being-driven"},{match:"[may] #Adverb? #Infinitive",group:0,tag:"Auxiliary",reason:"may-want"},{match:"#Copula (#Adverb|not)+? [(be|being|been)] #Adverb+? #PastTense",group:0,tag:"Auxiliary",reason:"being-walked"},{match:"will [be] #PastTense",group:0,tag:"Auxiliary",reason:"will-be-x"},{match:"[(be|been)] (#Adverb|not)+? #Gerund",group:0,tag:"Auxiliary",reason:"been-walking"},{match:"[used to] #PresentTense",group:0,tag:"Auxiliary",reason:"used-to-walk"},{match:"#Copula (#Adverb|not)+? [going to] #Adverb+? #PresentTense",group:0,tag:"Auxiliary",reason:"going-to-walk"},{match:"#Imperative [(me|him|her)]",group:0,tag:"Reflexive",reason:"tell-him"},{match:"(is|was) #Adverb? [no]",group:0,tag:"Negative",reason:"is-no"},{match:"[(been|had|became|came)] #PastTense",group:0,notIf:"#PhrasalVerb",tag:"Auxiliary",reason:"been-told"},{match:"[(being|having|getting)] #Verb",group:0,tag:"Auxiliary",reason:"being-born"},{match:"[be] #Gerund",group:0,tag:"Auxiliary",reason:"be-walking"},{match:"[better] #PresentTense",group:0,tag:"Modal",notIf:"(#Copula|#Gerund)",reason:"better-go"},{match:"even better",tag:"Adverb #Comparative",reason:"even-better"}],PJt=[{match:"(#Verb && @hasHyphen) up",tag:"PhrasalVerb",reason:"foo-up"},{match:"(#Verb && @hasHyphen) off",tag:"PhrasalVerb",reason:"foo-off"},{match:"(#Verb && @hasHyphen) over",tag:"PhrasalVerb",reason:"foo-over"},{match:"(#Verb && @hasHyphen) out",tag:"PhrasalVerb",reason:"foo-out"},{match:"[#Verb (in|out|up|down|off|back)] (on|in)",notIf:"#Copula",tag:"PhrasalVerb Particle",reason:"walk-in-on"},{match:"(lived|went|crept|go) [on] for",group:0,tag:"PhrasalVerb",reason:"went-on"},{match:"#Verb (up|down|in|on|for)$",tag:"PhrasalVerb #Particle",notIf:"#PhrasalVerb",reason:"come-down$"},{match:"help [(stop|end|make|start)]",group:0,tag:"Infinitive",reason:"help-stop"},{match:"#PhrasalVerb (in && #Particle) #Determiner",tag:"#Verb #Preposition #Determiner",unTag:"PhrasalVerb",reason:"work-in-the"},{match:"[(stop|start|finish|help)] #Gerund",group:0,tag:"Infinitive",reason:"start-listening"},{match:"#Verb (him|her|it|us|himself|herself|itself|everything|something) [(up|down)]",group:0,tag:"Adverb",reason:"phrasal-pronoun-advb"}],bH="(i|we|they)",FJt=[{match:"^do not? [#Infinitive #Particle?]",notIf:bH,group:0,tag:"Imperative",reason:"do-eat"},{match:"^please do? not? [#Infinitive #Particle?]",group:0,tag:"Imperative",reason:"please-go"},{match:"^just do? not? [#Infinitive #Particle?]",group:0,tag:"Imperative",reason:"just-go"},{match:"^[#Infinitive] it #Comparative",notIf:bH,group:0,tag:"Imperative",reason:"do-it-better"},{match:"^[#Infinitive] it (please|now|again|plz)",notIf:bH,group:0,tag:"Imperative",reason:"do-it-please"},{match:"^[#Infinitive] (#Adjective|#Adverb)$",group:0,tag:"Imperative",notIf:"(so|such|rather|enough)",reason:"go-quickly"},{match:"^[#Infinitive] (up|down|over) #Determiner",group:0,tag:"Imperative",reason:"turn-down"},{match:"^[#Infinitive] (your|my|the|a|an|any|each|every|some|more|with|on)",group:0,notIf:"like",tag:"Imperative",reason:"eat-my-shorts"},{match:"^[#Infinitive] (him|her|it|us|me|there)",group:0,tag:"Imperative",reason:"tell-him"},{match:"^[#Infinitive] #Adjective #Noun$",group:0,tag:"Imperative",reason:"avoid-loud-noises"},{match:"^[#Infinitive] (#Adjective|#Adverb)? and #Infinitive",group:0,tag:"Imperative",reason:"call-and-reserve"},{match:"^(go|stop|wait|hurry) please?$",tag:"Imperative",reason:"go"},{match:"^(somebody|everybody) [#Infinitive]",group:0,tag:"Imperative",reason:"somebody-call"},{match:"^let (us|me) [#Infinitive]",group:0,tag:"Imperative",reason:"lets-leave"},{match:"^[(shut|close|open|start|stop|end|keep)] #Determiner #Noun",group:0,tag:"Imperative",reason:"shut-the-door"},{match:"^[#PhrasalVerb #Particle] #Determiner #Noun",group:0,tag:"Imperative",reason:"turn-off-the-light"},{match:"^[go] to .",group:0,tag:"Imperative",reason:"go-to-toronto"},{match:"^#Modal you [#Infinitive]",group:0,tag:"Imperative",reason:"would-you-"},{match:"^never [#Infinitive]",group:0,tag:"Imperative",reason:"never-stop"},{match:"^come #Infinitive",tag:"Imperative",notIf:"on",reason:"come-have"},{match:"^come and? #Infinitive",tag:"Imperative . Imperative",notIf:"#PhrasalVerb",reason:"come-and-have"},{match:"^stay (out|away|back)",tag:"Imperative",reason:"stay-away"},{match:"^[(stay|be|keep)] #Adjective",group:0,tag:"Imperative",reason:"stay-cool"},{match:"^[keep it] #Adjective",group:0,tag:"Imperative",reason:"keep-it-cool"},{match:"^do not [#Infinitive]",group:0,tag:"Imperative",reason:"do-not-be"},{match:"[#Infinitive] (yourself|yourselves)",group:0,tag:"Imperative",reason:"allow-yourself"},{match:"[#Infinitive] what .",group:0,tag:"Imperative",reason:"look-what"},{match:"^[#Infinitive] #Gerund",group:0,tag:"Imperative",reason:"keep-playing"},{match:"^[#Infinitive] (to|for|into|toward|here|there)",group:0,tag:"Imperative",reason:"go-to"},{match:"^[#Infinitive] (and|or) #Infinitive",group:0,tag:"Imperative",reason:"inf-and-inf"},{match:"^[%Noun|Verb%] to",group:0,tag:"Imperative",reason:"commit-to"},{match:"^[#Infinitive] #Adjective? #Singular #Singular",group:0,tag:"Imperative",reason:"maintain-eye-contact"},{match:"do not (forget|omit|neglect) to [#Infinitive]",group:0,tag:"Imperative",reason:"do-not-forget"},{match:"^[(ask|wear|pay|look|help|show|watch|act|fix|kill|stop|start|turn|try|win)] #Noun",group:0,tag:"Imperative",reason:"pay-attention"}],RJt=[{match:"(that|which) were [%Adj|Gerund%]",group:0,tag:"Gerund",reason:"that-were-growing"},{match:"#Gerund [#Gerund] #Plural",group:0,tag:"Adjective",reason:"hard-working-fam"}],LJt=[{match:"(got|were|was|is|are|am) (#PastTense|#Participle)",tag:"Passive",reason:"got-walked"},{match:"(was|were|is|are|am) being (#PastTense|#Participle)",tag:"Passive",reason:"was-being"},{match:"(had|have|has) been (#PastTense|#Participle)",tag:"Passive",reason:"had-been"},{match:"will be being? (#PastTense|#Participle)",tag:"Passive",reason:"will-be-cleaned"},{match:"#Noun [(#PastTense|#Participle)] by (the|a) #Noun",group:0,tag:"Passive",reason:"suffered-by"}];let NJt=[{match:"u r",tag:"#Pronoun #Copula",reason:"u r"},{match:"#Noun [(who|whom)]",group:0,tag:"Determiner",reason:"captain-who"},{match:"[had] #Noun+ #PastTense",group:0,tag:"Condition",reason:"had-he"},{match:"[were] #Noun+ to #Infinitive",group:0,tag:"Condition",reason:"were-he"},{match:"some sort of",tag:"Adjective Noun Conjunction",reason:"some-sort-of"},{match:"of some sort",tag:"Conjunction Adjective Noun",reason:"of-some-sort"},{match:"[such] (a|an|is)? #Noun",group:0,tag:"Determiner",reason:"such-skill"},{match:"[right] (before|after|in|into|to|toward)",group:0,tag:"#Adverb",reason:"right-into"},{match:"#Preposition [about]",group:0,tag:"Adjective",reason:"at-about"},{match:"(are|#Modal|see|do|for) [ya]",group:0,tag:"Pronoun",reason:"are-ya"},{match:"[long live] .",group:0,tag:"#Adjective #Infinitive",reason:"long-live"},{match:"[plenty] of",group:0,tag:"#Uncountable",reason:"plenty-of"},{match:"(always|nearly|barely|practically) [there]",group:0,tag:"Adjective",reason:"always-there"},{match:"[there] (#Adverb|#Pronoun)? #Copula",group:0,tag:"There",reason:"there-is"},{match:"#Copula [there] .",group:0,tag:"There",reason:"is-there"},{match:"#Modal #Adverb? [there]",group:0,tag:"There",reason:"should-there"},{match:"^[do] (you|we|they)",group:0,tag:"QuestionWord",reason:"do-you"},{match:"^[does] (he|she|it|#ProperNoun)",group:0,tag:"QuestionWord",reason:"does-he"},{match:"#Determiner #Noun+ [who] #Verb",group:0,tag:"Preposition",reason:"the-x-who"},{match:"#Determiner #Noun+ [which] #Verb",group:0,tag:"Preposition",reason:"the-x-which"},{match:"a [while]",group:0,tag:"Noun",reason:"a-while"},{match:"guess who",tag:"#Infinitive #QuestionWord",reason:"guess-who"},{match:"[fucking] !#Verb",group:0,tag:"#Gerund",reason:"f-as-gerund"}];const MJt=[{match:"university of #Place",tag:"Organization",reason:"university-of-Foo"},{match:"#Noun (&|n) #Noun",tag:"Organization",reason:"Noun-&-Noun"},{match:"#Organization of the? #ProperNoun",tag:"Organization",reason:"org-of-place",safe:!0},{match:"#Organization #Country",tag:"Organization",reason:"org-country"},{match:"#ProperNoun #Organization",tag:"Organization",notIf:"#FirstName",reason:"titlecase-org"},{match:"#ProperNoun (ltd|co|inc|dept|assn|bros)",tag:"Organization",reason:"org-abbrv"},{match:"the [#Acronym]",group:0,tag:"Organization",reason:"the-acronym",safe:!0},{match:"government of the? [#Place+]",tag:"Organization",reason:"government-of-x"},{match:"(health|school|commerce) board",tag:"Organization",reason:"school-board"},{match:"(nominating|special|conference|executive|steering|central|congressional) committee",tag:"Organization",reason:"special-comittee"},{match:"(world|global|international|national|#Demonym) #Organization",tag:"Organization",reason:"global-org"},{match:"#Noun+ (public|private) school",tag:"School",reason:"noun-public-school"},{match:"#Place+ #SportsTeam",tag:"SportsTeam",reason:"place-sportsteam"},{match:"(dc|atlanta|minnesota|manchester|newcastle|sheffield) united",tag:"SportsTeam",reason:"united-sportsteam"},{match:"#Place+ fc",tag:"SportsTeam",reason:"fc-sportsteam"},{match:"#Place+ #Noun{0,2} (club|society|group|team|committee|commission|association|guild|crew)",tag:"Organization",reason:"place-noun-society"}],zJt=[{match:"(west|north|south|east|western|northern|southern|eastern)+ #Place",tag:"Region",reason:"west-norfolk"},{match:"#City [(al|ak|az|ar|ca|ct|dc|fl|ga|id|il|nv|nh|nj|ny|oh|pa|sc|tn|tx|ut|vt|pr)]",group:0,tag:"Region",reason:"us-state"},{match:"portland [or]",group:0,tag:"Region",reason:"portland-or"},{match:"#ProperNoun+ (cliff|place|range|pit|place|point|room|grounds|ruins)",tag:"Place",reason:"foo-point"},{match:"in [#ProperNoun] #Place",group:0,tag:"Place",reason:"propernoun-place"},{match:"#Value #Noun (st|street|rd|road|crescent|cr|way|tr|terrace|avenue|ave)",tag:"Address",reason:"address-st"},{match:"(port|mount|mt) #ProperName",tag:"Place",reason:"port-name"}],qJt=[{match:"[so] #Noun",group:0,tag:"Conjunction",reason:"so-conj"},{match:"[(who|what|where|why|how|when)] #Noun #Copula #Adverb? (#Verb|#Adjective)",group:0,tag:"Conjunction",reason:"how-he-is-x"},{match:"#Copula [(who|what|where|why|how|when)] #Noun",group:0,tag:"Conjunction",reason:"when-he"},{match:"#Verb [that] #Pronoun",group:0,tag:"Conjunction",reason:"said-that-he"},{match:"#Noun [that] #Copula",group:0,tag:"Conjunction",reason:"that-are"},{match:"#Noun [that] #Verb #Adjective",group:0,tag:"Conjunction",reason:"that-seem"},{match:"#Noun #Copula not? [that] #Adjective",group:0,tag:"Adverb",reason:"that-adj"},{match:"#Verb #Adverb? #Noun [(that|which)]",group:0,tag:"Preposition",reason:"that-prep"},{match:"@hasComma [which] (#Pronoun|#Verb)",group:0,tag:"Preposition",reason:"which-copula"},{match:"#Noun [like] #Noun",group:0,tag:"Preposition",reason:"noun-like"},{match:"^[like] #Determiner",group:0,tag:"Preposition",reason:"like-the"},{match:"a #Noun [like] (#Noun|#Determiner)",group:0,tag:"Preposition",reason:"a-noun-like"},{match:"#Adverb [like]",group:0,tag:"Verb",reason:"really-like"},{match:"(not|nothing|never) [like]",group:0,tag:"Preposition",reason:"nothing-like"},{match:"#Infinitive #Pronoun [like]",group:0,tag:"Preposition",reason:"treat-them-like"},{match:"[#QuestionWord] (#Pronoun|#Determiner)",group:0,tag:"Preposition",reason:"how-he"},{match:"[#QuestionWord] #Participle",group:0,tag:"Preposition",reason:"when-stolen"},{match:"[how] (#Determiner|#Copula|#Modal|#PastTense)",group:0,tag:"QuestionWord",reason:"how-is"},{match:"#Plural [(who|which|when)] .",group:0,tag:"Preposition",reason:"people-who"}],jJt=[{match:"holy (shit|fuck|hell)",tag:"Expression",reason:"swears-expression"},{match:"^[(well|so|okay|now)] !#Adjective?",group:0,tag:"Expression",reason:"well-"},{match:"^come on",tag:"Expression",reason:"come-on"},{match:"(say|says|said) [sorry]",group:0,tag:"Expression",reason:"say-sorry"},{match:"^(ok|alright|shoot|hell|anyways)",tag:"Expression",reason:"ok-"},{match:"^(say && @hasComma)",tag:"Expression",reason:"say-"},{match:"^(like && @hasComma)",tag:"Expression",reason:"like-"},{match:"^[(dude|man|girl)] #Pronoun",group:0,tag:"Expression",reason:"dude-i"}];let UJt=[].concat(LJt,gJt,fJt,bJt,yJt,vJt,xJt,kJt,CJt,_Jt,BJt,EJt,QJt,SJt,IJt,DJt,$Jt,wJt,TJt,PJt,FJt,RJt,NJt,MJt,zJt,qJt,jJt);const GJt={two:{matches:UJt}};let yH=null;const HJt=function(t){const{world:e}=t,{model:n,methods:a}=e;yH=yH||a.one.buildNet(n.two.matches,e);let i=a.two.quickSplit(t.document).map(s=>{let l=s[0];return[l.index[0],l.index[1],l.index[1]+s.length]}),o=t.update(i);return o.cache(),o.sweep(yH),t.uncache(),t.unfreeze(),t},WJt=t=>t.compute(["freeze","lexicon","preTagger","postTagger","unfreeze"]),YJt={postTagger:HJt,tagger:WJt},XJt=t=>Math.round(t*100)/100;function VJt(t){t.prototype.confidence=function(){let e=0,n=0;return this.docs.forEach(a=>{a.forEach(r=>{n+=1,e+=r.confidence||1})}),n===0?1:XJt(e/n)},t.prototype.tagger=function(){return this.compute(["tagger"])}}const ZJt={api:VJt,compute:YJt,model:GJt,hooks:["postTagger"]},KJt=function(t){return Object.keys(t.hooks).filter(e=>!e.startsWith("#")&&!e.startsWith("%"))},JJt=function(t,e){let n=KJt(e);if(n.length===0)return t;t._cache||t.cache();let a=t._cache;return t.filter((r,i)=>n.some(o=>a[i].has(o)))},een=function(t,e){let n=e;typeof e=="string"&&(n=this.buildNet([{match:e}]));let a=this.tokenize(t),r=JJt(a,n);return r.found?(r.compute(["index","tagger"]),r.match(e)):a.none()},ten={lib:{lazy:een}},nen=function(t,e){const n=t.methods.two.transform.verb.conjugate;let a=n(e,t.model);return t.has("#Gerund")?a.Gerund:t.has("#PastTense")?a.PastTense:t.has("#PresentTense")?a.PresentTense:t.has("#Gerund")?a.Gerund:e},aen=function(t,e){let n=e;return t.forEach(a=>{a.has("#Infinitive")||(n=nen(a,e)),a.replaceWith(n)}),t},ren=function(t,e){let n=e;if(t.has("#Plural")){const a=t.methods.two.transform.noun.toPlural;n=a(e,t.model)}t.replaceWith(n,{possessives:!0})},ien=function(t,e){const{toAdverb:n}=t.methods.two.transform.adjective;let r=n(e);r&&t.replaceWith(r)},oen=function(t,e){const{toComparative:n,toSuperlative:a}=t.methods.two.transform.adjective;let r=e;t.has("#Comparative")?r=n(r,t.model):t.has("#Superlative")&&(r=a(r,t.model)),r&&t.replaceWith(r)},sen=function(t,e,n){let a=t.split(/ /g).map(i=>i.toLowerCase().trim());a=a.filter(i=>i),a=a.map(i=>`{${i}}`).join(" ");let r=this.match(a);return n&&(r=r.if(n)),r.has("#Verb")?aen(r,e):r.has("#Noun")?ren(r,e):r.has("#Adverb")?ien(r,e):r.has("#Adjective")?oen(r,e):this},cen=function(t){t.prototype.swap=sen},len={api:cen};Fa.plugin(LKt);Fa.plugin(mJt);Fa.plugin(ZJt);Fa.plugin(ten);Fa.plugin(len);const UO=function(t){const{fromComparative:e,fromSuperlative:n}=t.methods.two.transform.adjective;let a=t.text("normal");return t.has("#Comparative")?e(a,t.model):t.has("#Superlative")?n(a,t.model):a},uen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Adjectives"}json(a={}){const{toAdverb:r,toNoun:i,toSuperlative:o,toComparative:s}=this.methods.two.transform.adjective;return a.normal=!0,this.map(l=>{let u=l.toView().json(a)[0]||{},d=UO(l);return u.adjective={adverb:r(d,this.model),noun:i(d,this.model),superlative:o(d,this.model),comparative:s(d,this.model)},u},[])}adverbs(){return this.before("#Adverb+$").concat(this.after("^#Adverb+"))}conjugate(a){const{toComparative:r,toSuperlative:i,toNoun:o,toAdverb:s}=this.methods.two.transform.adjective;return this.getNth(a).map(l=>{let u=UO(l);return{Adjective:u,Comparative:r(u,this.model),Superlative:i(u,this.model),Noun:o(u,this.model),Adverb:s(u,this.model)}},[])}toComparative(a){const{toComparative:r}=this.methods.two.transform.adjective;return this.getNth(a).map(i=>{let o=UO(i),s=r(o,this.model);return i.replaceWith(s)})}toSuperlative(a){const{toSuperlative:r}=this.methods.two.transform.adjective;return this.getNth(a).map(i=>{let o=UO(i),s=r(o,this.model);return i.replaceWith(s)})}toAdverb(a){const{toAdverb:r}=this.methods.two.transform.adjective;return this.getNth(a).map(i=>{let o=UO(i),s=r(o,this.model);return i.replaceWith(s)})}toNoun(a){const{toNoun:r}=this.methods.two.transform.adjective;return this.getNth(a).map(i=>{let o=UO(i),s=r(o,this.model);return i.replaceWith(s)})}}t.prototype.adjectives=function(n){let a=this.match("#Adjective");return a=a.getNth(n),new e(a.document,a.pointer)},t.prototype.superlatives=function(n){let a=this.match("#Superlative");return a=a.getNth(n),new e(a.document,a.pointer)},t.prototype.comparatives=function(n){let a=this.match("#Comparative");return a=a.getNth(n),new e(a.document,a.pointer)}},den={api:uen},pen=function(t){return t.compute("root").text("root")},Aen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Adverbs"}conjugate(a){return this.getNth(a).map(r=>{let i=pen(r);return{Adverb:r.text("normal"),Adjective:i}},[])}json(a={}){const r=this.methods.two.transform.adjective.fromAdverb;return a.normal=!0,this.map(i=>{let o=i.toView().json(a)[0]||{};return o.adverb={adjective:r(o.normal)},o},[])}}t.prototype.adverbs=function(n){let a=this.match("#Adverb");return a=a.getNth(n),new e(a.document,a.pointer)}},men={api:Aen},gen=function(t){let e=t.match("@hasComma");return e=e.filter(n=>{if(n.growLeft(".").wordCount()===1||n.growRight(". .").wordCount()===1)return!1;let a=n.grow(".");return a=a.ifNo("@hasComma @hasComma"),a=a.ifNo("@hasComma (and|or) ."),a=a.ifNo("(#City && @hasComma) #Country"),a=a.ifNo("(#WeekDay && @hasComma) #Date"),a=a.ifNo("(#Date+ && @hasComma) #Value"),a=a.ifNo("(#Adjective && @hasComma) #Adjective"),a.found}),t.splitAfter(e)},hen=function(t){let e=t.parentheses();return e=e.filter(n=>n.wordCount()>=3&&n.has("#Verb")&&n.has("#Noun")),t.splitOn(e)},fen=function(t){let e=t.quotations();return e=e.filter(n=>n.wordCount()>=3&&n.has("#Verb")&&n.has("#Noun")),t.splitOn(e)},ben=function(t){let e=this;e=hen(e),e=fen(e),e=gen(e),e=e.splitAfter("(@hasEllipses|@hasSemicolon|@hasDash|@hasColon)"),e=e.splitAfter("^#Pronoun (said|says)"),e=e.splitBefore("(said|says) #ProperNoun$"),e=e.splitBefore(". . if .{4}"),e=e.splitBefore("and while"),e=e.splitBefore("now that"),e=e.splitBefore("ever since"),e=e.splitBefore("(supposing|although)"),e=e.splitBefore("even (while|if|though)"),e=e.splitBefore("(whereas|whose)"),e=e.splitBefore("as (though|if)"),e=e.splitBefore("(til|until)");let n=e.match("#Verb .* [but] .* #Verb",0);n.found&&(e=e.splitBefore(n));let a=e.if("if .{2,9} then .").match("then");return e=e.splitBefore(a),typeof t=="number"&&(e=e.get(t)),e},yen=function(t){let e=[],n=null;return t.clauses().docs.forEach(i=>{i.forEach(o=>{!o.chunk||o.chunk!==n?(n=o.chunk,e.push([o.index[0],o.index[1],o.index[1]+1])):e[e.length-1][2]=o.index[1]+1}),n=null}),t.update(e)},wen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Chunks"}isVerb(){return this.filter(a=>a.has(""))}isNoun(){return this.filter(a=>a.has(""))}isAdjective(){return this.filter(a=>a.has(""))}isPivot(){return this.filter(a=>a.has(""))}debug(){return this.toView().debug("chunks"),this}update(a){let r=new e(this.document,a);return r._cache=this._cache,r}}t.prototype.chunks=function(n){let a=yen(this);return a=a.getNth(n),new e(this.document,a.pointer)},t.prototype.clauses=ben},Rke={this:"Noun",then:"Pivot"},ven=function(t){for(let e=0;e",group:0,chunk:"Verb"},{match:"#Noun of #Determiner? #Noun",chunk:"Noun"},{match:"#Value+ #Adverb? #Adjective",chunk:"Noun"},{match:"the [#Adjective] #Noun",chunk:"Noun"},{match:"#Singular in #Determiner? #Singular",chunk:"Noun"},{match:"#Plural [in] #Determiner? #Noun",group:0,chunk:"Pivot"},{match:"#Noun and #Determiner? #Noun",notIf:"(#Possessive|#Pronoun)",chunk:"Noun"}];let wH=null;const Oen=function(t,e,n){const{methods:a}=n;wH=wH||a.one.buildNet(xen,n),t.sweep(wH)};var Lke={};const vH=function(t,e){if((typeof process>"u"||!Lke?self.env||{}:Lke).DEBUG_CHUNKS){let a=(t.normal+"'").padEnd(8);console.log(` | '${a} → \x1B[34m${e.padEnd(12)}\x1B[0m \x1B[2m -fallback- \x1B[0m`)}t.chunk=e},Cen=function(t){for(let e=0;e{for(let r=0;r{a.chunk==="Verb"&&(a.terms.find(i=>i.tags.has("Verb"))||a.terms.forEach(i=>i.chunk=null))})},Ben=function(t){const{document:e,world:n}=t;ven(e),ken(e),Oen(t,e,n),Cen(e),_en(e)},Een={chunks:Ben},Qen={compute:Een,api:wen,hooks:["chunks"]},Q8=/\./g,Sen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Acronyms"}strip(){return this.docs.forEach(a=>{a.forEach(r=>{r.text=r.text.replace(Q8,""),r.normal=r.normal.replace(Q8,"")})}),this}addPeriods(){return this.docs.forEach(a=>{a.forEach(r=>{r.text=r.text.replace(Q8,""),r.normal=r.normal.replace(Q8,""),r.text=r.text.split("").join(".")+".",r.normal=r.normal.split("").join(".")+"."})}),this}}t.prototype.acronyms=function(n){let a=this.match("#Acronym");return a=a.getNth(n),new e(a.document,a.pointer)}},Gje=/\(/,Hje=/\)/,Ien=function(t,e){for(;e{for(let a=0;a{e[0].pre=e[0].pre.replace(Gje,"");let n=e[e.length-1];n.post=n.post.replace(Hje,"")}),t},Ten=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Possessives"}strip(){return $en(this)}}t.prototype.parentheses=function(n){let a=Den(this);return a=a.getNth(n),new e(a.document,a.pointer)}},Nke=/'s$/,Pen=function(t){let e=t.match("#Possessive+");return e.has("#Person")&&(e=e.growLeft("#Person+")),e.has("#Place")&&(e=e.growLeft("#Place+")),e.has("#Organization")&&(e=e.growLeft("#Organization+")),e},Fen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Possessives"}strip(){return this.docs.forEach(a=>{a.forEach(r=>{r.text=r.text.replace(Nke,""),r.normal=r.normal.replace(Nke,"")})}),this}}t.prototype.possessives=function(n){let a=Pen(this);return a=a.getNth(n),new e(a.document,a.pointer)}},jL={'"':'"',""":""","'":"'","“":"”","‘":"’","‟":"”","‛":"’","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","`":"´","〟":"〞"},tle=RegExp("["+Object.keys(jL).join("")+"]"),Ren=RegExp("["+Object.values(jL).join("")+"]"),Len=function(t,e){const n=t[e].pre.match(tle)[0]||"";if(!n||!jL[n])return null;const a=jL[n];for(;e{for(let a=0;a{e[0].pre=e[0].pre.replace(tle,"");let n=e[e.length-1];n.post=n.post.replace(Ren,"")})},zen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Possessives"}strip(){return Men(this)}}t.prototype.quotations=function(n){let a=Nen(this);return a=a.getNth(n),new e(a.document,a.pointer)}},qen=function(t){let e=this.splitAfter("@hasComma");return e=e.match("#PhoneNumber+"),e=e.getNth(t),e},jen=[["hyphenated","@hasHyphen ."],["hashTags","#HashTag"],["emails","#Email"],["emoji","#Emoji"],["emoticons","#Emoticon"],["atMentions","#AtMention"],["urls","#Url"],["conjunctions","#Conjunction"],["prepositions","#Preposition"],["abbreviations","#Abbreviation"],["honorifics","#Honorific"]];let Uen=[["emojis","emoji"],["atmentions","atMentions"]];const Gen=function(t){jen.forEach(e=>{t.prototype[e[0]]=function(n){let a=this.match(e[1]);return typeof n=="number"?a.get(n):a}}),t.prototype.phoneNumbers=qen,Uen.forEach(e=>{t.prototype[e[0]]=t.prototype[e[1]]})},Hen=/\//,Wen=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Slashes"}split(){return this.map(a=>{let i=a.text().split(Hen);return a=a.replaceWith(i.join(" ")),a.growRight("("+i.join("|")+")+")})}}t.prototype.slashes=function(n){let a=this.match("#SlashedTerm");return a=a.getNth(n),new e(a.document,a.pointer)}},Yen={api:function(t){Sen(t),Ten(t),Fen(t),zen(t),Gen(t),Wen(t)}},S8=function(t,e){t.docs.forEach(n=>{n.forEach(e)})},Mke={case:t=>{S8(t,e=>{e.text=e.text.toLowerCase()})},unicode:t=>{const e=t.world,n=e.methods.one.killUnicode;S8(t,a=>a.text=n(a.text,e))},whitespace:t=>{S8(t,e=>{e.post=e.post.replace(/\s+/g," "),e.post=e.post.replace(/\s([.,?!:;])/g,"$1"),e.pre=e.pre.replace(/\s+/g,"")})},punctuation:t=>{S8(t,a=>{a.post=a.post.replace(/[–—-]/g," "),a.post=a.post.replace(/[,:;]/g,""),a.post=a.post.replace(/\.{2,}/g,""),a.post=a.post.replace(/\?{2,}/g,"?"),a.post=a.post.replace(/!{2,}/g,"!"),a.post=a.post.replace(/\?!+/g,"?")});let e=t.docs,n=e[e.length-1];if(n&&n.length>0){let a=n[n.length-1];a.post=a.post.replace(/ /g,"")}},contractions:t=>{t.contractions().expand()},acronyms:t=>{t.acronyms().strip()},parentheses:t=>{t.parentheses().strip()},possessives:t=>{t.possessives().strip()},quotations:t=>{t.quotations().strip()},emoji:t=>{t.emojis().remove()},honorifics:t=>{t.match("#Honorific+ #Person").honorifics().remove()},adverbs:t=>{t.adverbs().remove()},nouns:t=>{t.nouns().toSingular()},verbs:t=>{t.verbs().toInfinitive()},numbers:t=>{t.numbers().toNumber()},debullet:t=>{const e=/^\s*([-–—*•])\s*$/;return t.docs.forEach(n=>{e.test(n[0].pre)&&(n[0].pre=n[0].pre.replace(e,""))}),t}},kH=t=>t.split("|").reduce((e,n)=>(e[n]=!0,e),{}),xH="unicode|punctuation|whitespace|acronyms",zke="|case|contractions|parentheses|quotations|emoji|honorifics|debullet",Xen="|possessives|adverbs|nouns|verbs",Ven={light:kH(xH),medium:kH(xH+zke),heavy:kH(xH+zke+Xen)};function Zen(t){t.prototype.normalize=function(e="light"){return typeof e=="string"&&(e=Ven[e]),Object.keys(e).forEach(n=>{Mke.hasOwnProperty(n)&&Mke[n](this,e[n])}),this}}const Ken={api:Zen},Jen=function(t){let e=t.clauses().match(""),n=e.match("@hasComma");return n=n.not("#Place"),n.found&&(e=e.splitAfter(n)),e=e.splitOn("#Expression"),e=e.splitOn("(he|she|we|you|they|i)"),e=e.splitOn("(#Noun|#Adjective) [(he|him|she|it)]",0),e=e.splitOn("[(he|him|she|it)] (#Determiner|#Value)",0),e=e.splitBefore("#Noun [(the|a|an)] #Adjective? #Noun",0),e=e.splitOn("[(here|there)] #Noun",0),e=e.splitOn("[#Noun] (here|there)",0),e=e.splitBefore("(our|my|their|your)"),e=e.splitOn("#Noun [#Determiner]",0),e=e.if("#Noun"),e},qke=["after","although","as if","as long as","as","because","before","even if","even though","ever since","if","in order that","provided that","since","so that","than","that","though","unless","until","what","whatever","when","whenever","where","whereas","wherever","whether","which","whichever","who","whoever","whom","whomever","whose"],etn=function(t){if(t.before("#Preposition$").found)return!0;if(!t.before().found)return!1;for(let n=0;n3&&n.endsWith("s")&&!n.endsWith("ss")},atn=function(t){let e=t.clone();return e=e.match("#Noun+"),e=e.remove("(#Adjective|#Preposition|#Determiner|#Value)"),e=e.not("#Possessive"),e=e.first(),e.found?e:t},u0=function(t){let e=atn(t);return{determiner:t.match("#Determiner").eq(0),adjectives:t.match("#Adjective"),number:t.values(),isPlural:ntn(t,e),isSubordinate:etn(t),root:e}},jke=t=>t.text(),rtn=t=>t.json({terms:!1,normal:!0}).map(e=>e.normal),itn=function(t){let e=null;if(!t.found)return e;let n=t.values(0);return n.found?(n.parse()[0]||{}).num:e},otn=function(t){let e=u0(t);return{root:jke(e.root),number:itn(e.number),determiner:jke(e.determiner),adjectives:rtn(e.adjectives),isPlural:e.isPlural,isSubordinate:e.isSubordinate}},Wje=function(t){return!t.has("^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$")},stn={tags:!0},ctn=function(t,e){if(e.isPlural===!0||(e.root.has("#Possessive")&&(e.root=e.root.possessives().strip()),!Wje(e.root)))return t;const{methods:n,model:a}=t.world,{toPlural:r}=n.two.transform.noun;let i=e.root.text({keepPunct:!1}),o=r(i,a);t.match(e.root).replaceWith(o,stn).tag("Plural","toPlural"),e.determiner.has("(a|an)")&&t.remove(e.determiner);let s=e.root.after("not? #Adverb+? [#Copula]",0);return s.found&&(s.has("is")?t.replace(s,"are"):s.has("was")&&t.replace(s,"were")),t},ltn={tags:!0},utn=function(t,e){if(e.isPlural===!1)return t;const{methods:n,model:a}=t.world,{toSingular:r}=n.two.transform.noun;let i=e.root.text("normal"),o=r(i,a);return t.replace(e.root,o,ltn).tag("Singular","toPlural"),t},dtn=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Nouns"}parse(a){return this.getNth(a).map(u0)}json(a){let r=typeof a=="object"?a:{};return this.getNth(a).map(i=>{let o=i.toView().json(r)[0]||{};return r&&r.noun!==!1&&(o.noun=otn(i)),o},[])}conjugate(a){const r=this.world.methods.two.transform.noun;return this.getNth(a).map(i=>{let o=u0(i),s=o.root.compute("root").text("root"),l={Singular:s};return Wje(o.root)&&(l.Plural=r.toPlural(s,this.model)),l.Singular===l.Plural&&delete l.Plural,l},[])}isPlural(a){return this.filter(i=>u0(i).isPlural).getNth(a)}isSingular(a){return this.filter(i=>!u0(i).isPlural).getNth(a)}adjectives(a){let r=this.update([]);return this.forEach(i=>{let o=u0(i).adjectives;o.found&&(r=r.concat(o))}),r.getNth(a)}toPlural(a){return this.getNth(a).map(r=>ctn(r,u0(r)))}toSingular(a){return this.getNth(a).map(r=>{let i=u0(r);return utn(r,i)})}update(a){let r=new e(this.document,a);return r._cache=this._cache,r}}t.prototype.nouns=function(n){let a=Jen(this);return a=a.getNth(n),new e(this.document,a.pointer)}},ptn={api:dtn},Atn=function(t,e){let n=t.match("#Fraction+");return n=n.filter(a=>!a.lookBehind("#Value and$").found),n=n.notIf("#Value seconds"),n},mtn=t=>{const e=[{reg:/^(minus|negative)[\s-]/i,mult:-1},{reg:/^(a\s)?half[\s-](of\s)?/i,mult:.5}];for(let n=0;n{if(js.ones.hasOwnProperty(t)){if(e.ones||e.teens)return!1}else if(js.teens.hasOwnProperty(t)){if(e.ones||e.teens||e.tens)return!1}else if(js.tens.hasOwnProperty(t)&&(e.ones||e.teens||e.tens))return!1;return!0},htn=function(t){let e="0.";for(let n=0;n(t=t.replace(/1st$/,"1"),t=t.replace(/2nd$/,"2"),t=t.replace(/3rd$/,"3"),t=t.replace(/([4567890])r?th$/,"$1"),t=t.replace(/^[$€¥£¢]/,""),t=t.replace(/[%$€¥£¢]$/,""),t=t.replace(/,/g,""),t=t.replace(/([0-9])([a-z\u00C0-\u00FF]{1,2})$/,"$1"),t),btn=/^([0-9,. ]+)\/([0-9,. ]+)$/,Uke={"a few":3,"a couple":2,"a dozen":12,"two dozen":24,zero:0},I8=t=>Object.keys(t).reduce((e,n)=>(e+=t[n],e),0),Dee=function(t){if(Uke.hasOwnProperty(t)===!0)return Uke[t];if(t==="a"||t==="an")return 1;const e=mtn(t);t=e.str;let n=null,a={},r=0,i=!1;const o=t.split(/[ -]/);for(let s=0;s#Value+] out of every? [#Value+]");if(e.found!==!0)return null;let{num:n,den:a}=e.groups();return!n||!a||(n=kD(n),a=kD(a),!n||!a)?null:typeof n=="number"&&typeof a=="number"?{numerator:n,denominator:a}:null},vtn=function(t){let e=t.match("[(#Cardinal|a)+] [#Fraction+]");if(e.found!==!0)return null;let{num:n,den:a}=e.groups();n.has("a")?n=1:n=kD(n);let r=a.text("reduced");return Gke.test(r)&&(r=r.replace(Gke,""),a=a.replaceWith(r)),UL.hasOwnProperty(r)?a=UL[r]:a=kD(a),typeof n=="number"&&typeof a=="number"?{numerator:n,denominator:a}:null},ktn=function(t){let e=t.match("^#Ordinal$");return e.found!==!0?null:t.lookAhead("^of .")?{numerator:1,denominator:kD(e)}:null},xtn=function(t){let e=t.text("reduced");return UL.hasOwnProperty(e)?{numerator:1,denominator:UL[e]}:null},Otn=t=>{let e=Math.round(t*1e3)/1e3;return e===0&&t!==0?t:e},Xf=function(t){t=t.clone();let e=xtn(t)||ytn(t)||wtn(t)||vtn(t)||ktn(t)||null;return e!==null&&e.numerator&&e.denominator&&(e.decimal=e.numerator/e.denominator,e.decimal=Otn(e.decimal)),e},nle=function(t){if(t<1e6)return String(t);let e;return typeof t=="number"?e=t.toFixed(0):e=t,e.indexOf("e+")===-1?e:e.replace(".","").split("e+").reduce(function(n,a){return n+Array(a-n.length+2).join(0)})},D8=[["ninety",90],["eighty",80],["seventy",70],["sixty",60],["fifty",50],["forty",40],["thirty",30],["twenty",20]],Hke=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Ctn=[[1e24,"septillion"],[1e20,"hundred sextillion"],[1e21,"sextillion"],[1e20,"hundred quintillion"],[1e18,"quintillion"],[1e17,"hundred quadrillion"],[1e15,"quadrillion"],[1e14,"hundred trillion"],[1e12,"trillion"],[1e11,"hundred billion"],[1e9,"billion"],[1e8,"hundred million"],[1e6,"million"],[1e5,"hundred thousand"],[1e3,"thousand"],[100,"hundred"],[1,"one"]],_tn=function(t){let e=t,n=[];return Ctn.forEach(a=>{if(t>=a[0]){let r=Math.floor(e/a[0]);e-=r*a[0],r&&n.push({unit:a[1],count:r})}}),n},Btn=function(t){let e=[];if(t>100)return e;for(let n=0;n=D8[n][1]&&(t-=D8[n][1],e.push(D8[n][0]));return Hke[t]&&e.push(Hke[t]),e},Etn=t=>{const e=["zero","one","two","three","four","five","six","seven","eight","nine"];let n=[],r=nle(t).match(/\.([0-9]+)/);if(!r||!r[0])return n;n.push("point");let i=r[0].split("");for(let o=0;o1e21&&(e=nle(e));let n=[];e<0&&(n.push("minus"),e=Math.abs(e));let a=_tn(e);for(let r=0;r1&&n.push("and")),n=n.concat(Btn(a[r].count)),n.push(i)}return n=n.concat(Etn(e)),n=n.filter(r=>r),n.length===0&&(n[0]=""),n.join(" ")},Qtn=function(t){if(!t.numerator||!t.denominator)return"";let e=xD({num:t.numerator}),n=xD({num:t.denominator});return`${e} out of ${n}`},Wke={one:"first",two:"second",three:"third",five:"fifth",eight:"eighth",nine:"ninth",twelve:"twelfth",twenty:"twentieth",thirty:"thirtieth",forty:"fortieth",fourty:"fourtieth",fifty:"fiftieth",sixty:"sixtieth",seventy:"seventieth",eighty:"eightieth",ninety:"ninetieth"},Yje=t=>{let e=xD(t).split(" "),n=e[e.length-1];return Wke.hasOwnProperty(n)?e[e.length-1]=Wke[n]:e[e.length-1]=n.replace(/y$/,"i")+"th",e.join(" ")},Stn=function(t){if(!t.numerator||!t.denominator)return"";let e=xD({num:t.numerator}),n=Yje({num:t.denominator});return t.denominator===2&&(n="half"),e&&n?(t.numerator!==1&&(n+="s"),`${e} ${n}`):""},Itn=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Fractions"}parse(a){return this.getNth(a).map(Xf)}get(a){return this.getNth(a).map(Xf)}json(a){return this.getNth(a).map(r=>{let i=r.toView().json(a)[0],o=Xf(r);return i.fraction=o,i},[])}toDecimal(a){return this.getNth(a).forEach(r=>{let{decimal:i}=Xf(r);r=r.replaceWith(String(i),!0),r.tag("NumericValue"),r.unTag("Fraction")}),this}toFraction(a){return this.getNth(a).forEach(r=>{let i=Xf(r);if(i&&typeof i.numerator=="number"&&typeof i.denominator=="number"){let o=`${i.numerator}/${i.denominator}`;this.replace(r,o)}}),this}toOrdinal(a){return this.getNth(a).forEach(r=>{let i=Xf(r),o=Stn(i);r.after("^#Noun").found&&(o+=" of"),r.replaceWith(o)}),this}toCardinal(a){return this.getNth(a).forEach(r=>{let i=Xf(r),o=Qtn(i);r.replaceWith(o)}),this}toPercentage(a){return this.getNth(a).forEach(r=>{let{decimal:i}=Xf(r),o=i*100;o=Math.round(o*100)/100,r.replaceWith(`${o}%`)}),this}}t.prototype.fractions=function(n){let a=Atn(this);return a=a.getNth(n),new e(this.document,a.pointer)}},Dtn="one|two|three|four|five|six|seven|eight|nine",e0="twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty",$tn="eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen",OH=function(t){let e=t.match("#Value+");if(e.has("#NumericValue #NumericValue")&&(e.has("#Value @hasComma #Value")?e.splitAfter("@hasComma"):e.has("#NumericValue #Fraction")?e.splitAfter("#NumericValue #Fraction"):e=e.splitAfter("#NumericValue")),e.has("#Value #Value #Value")&&!e.has("#Multiple")&&e.has("("+e0+") #Cardinal #Cardinal")&&(e=e.splitAfter("("+e0+") #Cardinal")),e.has("#Value #Value")){e.has("#NumericValue #NumericValue")&&(e=e.splitOn("#Year")),e.has("("+e0+") ("+$tn+")")&&(e=e.splitAfter("("+e0+")"));let n=e.match("#Cardinal #Cardinal");if(n.found&&!e.has("(point|decimal|#Fraction)")&&!n.has("#Cardinal (#Multiple|point|decimal)")){let a=e.has(`(${Dtn}) (${e0})`),r=n.has("("+e0+") #Cardinal"),i=n.has("#Multiple #Value");!a&&!r&&!i&&n.terms().forEach(o=>{e=e.splitOn(o)})}e.match("#Ordinal #Ordinal").match("#TextValue").found&&!e.has("#Multiple")&&(e.has("("+e0+") #Ordinal")||(e=e.splitAfter("#Ordinal"))),e=e.splitBefore("#Ordinal [#Cardinal]",0),e.has("#TextValue #NumericValue")&&!e.has("("+e0+"|#Multiple)")&&(e=e.splitBefore("#TextValue #NumericValue"))}return e=e.splitAfter("#NumberRange"),e=e.splitBefore("#Year"),e},Ttn=function(t,e){t=t.replace(/,/g,"");let n=t.split(/([0-9.,]*)/),[a,r]=n,i=n.slice(2).join("");return r!==""&&e.length<2?(r=Number(r||t),typeof r!="number"&&(r=null),i=i||"",(i==="st"||i==="nd"||i==="rd"||i==="th")&&(i=""),{prefix:a||"",num:r,suffix:i}):null},hl=function(t){if(typeof t=="string")return{num:Dee(t)};let e=t.text("reduced"),n=t.growRight("#Unit").match("#Unit$").text("machine"),a=/[0-9],[0-9]/.test(t.text("text"));if(t.terms().length===1&&!t.has("#Multiple")){let s=Ttn(e,t);if(s!==null)return s.hasComma=a,s.unit=n,s}let r=t.match("#Fraction{2,}$");r=r.found===!1?t.match("^#Fraction$"):r;let i=null;r.found&&(r.has("#Value and #Value #Fraction")&&(r=r.match("and #Value #Fraction")),i=Xf(r),t=t.not(r),t=t.not("and$"),e=t.text("reduced"));let o=0;return e&&(o=Dee(e)||0),i&&i.decimal&&(o+=i.decimal),{hasComma:a,prefix:"",num:o,suffix:"",isOrdinal:t.has("#Ordinal"),isText:t.has("#TextValue"),isFraction:t.has("#Fraction"),isMoney:t.has("#Money"),unit:n}},Ptn=function(t){let e=t.num;if(!e&&e!==0)return null;let n=e%100;if(n>10&&n<20)return String(e)+"th";const a={0:"th",1:"st",2:"nd",3:"rd"};let r=nle(e),i=r.slice(r.length-1,r.length);return a[i]?r+=a[i]:r+="th",r},Yke={"¢":"cents",$:"dollars","£":"pounds","¥":"yen","€":"euros","₡":"colón","฿":"baht","₭":"kip","₩":"won","₹":"rupees","₽":"ruble","₺":"liras"},Xke={"%":"percent","°":"degrees"},Vke=function(t){let e={suffix:"",prefix:t.prefix};return Yke.hasOwnProperty(t.prefix)&&(e.suffix+=" "+Yke[t.prefix],e.prefix=""),Xke.hasOwnProperty(t.suffix)&&(e.suffix+=" "+Xke[t.suffix]),e.suffix&&t.num===1&&(e.suffix=e.suffix.replace(/s$/,"")),!e.suffix&&t.suffix&&(e.suffix+=" "+t.suffix),e},Jv=function(t,e){if(e==="TextOrdinal"){let{prefix:a,suffix:r}=Vke(t);return a+Yje(t)+r}if(e==="Ordinal")return t.prefix+Ptn(t)+t.suffix;if(e==="TextCardinal"){let{prefix:a,suffix:r}=Vke(t);return a+xD(t)+r}let n=t.num;return t.hasComma&&(n=n.toLocaleString()),t.prefix+String(n)+t.suffix},Ftn=t=>Object.prototype.toString.call(t)==="[object Array]",Rtn=function(t){if(typeof t=="string"||typeof t=="number"){let e={};return e[t]=!0,e}return Ftn(t)?t.reduce((e,n)=>(e[n]=!0,e),{}):t||{}},Ltn=function(t,e={}){return e=Rtn(e),t.filter(n=>{let{unit:a}=hl(n);return!!(a&&e[a]===!0)})},Ntn=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Numbers"}parse(a){return this.getNth(a).map(hl)}get(a){return this.getNth(a).map(hl).map(r=>r.num)}json(a){let r=typeof a=="object"?a:{};return this.getNth(a).map(i=>{let o=i.toView().json(r)[0],s=hl(i);return o.number={prefix:s.prefix,num:s.num,suffix:s.suffix,hasComma:s.hasComma,unit:s.unit},o},[])}units(){return this.growRight("#Unit").match("#Unit$")}isUnit(a){return Ltn(this,a)}isOrdinal(){return this.if("#Ordinal")}isCardinal(){return this.if("#Cardinal")}toNumber(){let a=this.map(r=>{if(!this.has("#TextValue"))return r;let i=hl(r);if(i.num===null)return r;let o=r.has("#Ordinal")?"Ordinal":"Cardinal",s=Jv(i,o);return r.replaceWith(s,{tags:!0}),r.tag("NumericValue")});return new e(a.document,a.pointer)}toLocaleString(){return this.forEach(r=>{let i=hl(r);if(i.num===null)return;let o=i.num.toLocaleString();if(r.has("#Ordinal")){let l=Jv(i,"Ordinal").match(/[a-z]+$/);l&&(o+=l[0]||"")}r.replaceWith(o,{tags:!0})}),this}toText(){let r=this.map(i=>{if(i.has("#TextValue"))return i;let o=hl(i);if(o.num===null)return i;let s=i.has("#Ordinal")?"TextOrdinal":"TextCardinal",l=Jv(o,s);return i.replaceWith(l,{tags:!0}),i.tag("TextValue"),i});return new e(r.document,r.pointer)}toCardinal(){let r=this.map(i=>{if(!i.has("#Ordinal"))return i;let o=hl(i);if(o.num===null)return i;let s=i.has("#TextValue")?"TextCardinal":"Cardinal",l=Jv(o,s);return i.replaceWith(l,{tags:!0}),i.tag("Cardinal"),i});return new e(r.document,r.pointer)}toOrdinal(){let r=this.map(i=>{if(i.has("#Ordinal"))return i;let o=hl(i);if(o.num===null)return i;let s=i.has("#TextValue")?"TextOrdinal":"Ordinal",l=Jv(o,s);return i.replaceWith(l,{tags:!0}),i.tag("Ordinal"),i});return new e(r.document,r.pointer)}isEqual(a){return this.filter(r=>hl(r).num===a)}greaterThan(a){return this.filter(r=>hl(r).num>a)}lessThan(a){return this.filter(r=>hl(r).num{let o=hl(i).num;return o>a&&o{let s=hl(o);if(s.num=a,s.num===null)return o;let l=o.has("#Ordinal")?"Ordinal":"Cardinal";o.has("#TextValue")&&(l=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let u=Jv(s,l);return s.hasComma&&l==="Cardinal"&&(u=Number(u).toLocaleString()),o=o.not("#Currency"),o.replaceWith(u,{tags:!0}),o});return new e(i.document,i.pointer)}add(a){if(!a)return this;typeof a=="string"&&(a=hl(a).num);let i=this.map(o=>{let s=hl(o);if(s.num===null)return o;s.num+=a;let l=o.has("#Ordinal")?"Ordinal":"Cardinal";s.isText&&(l=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let u=Jv(s,l);return o.replaceWith(u,{tags:!0}),o});return new e(i.document,i.pointer)}subtract(a,r){return this.add(a*-1,r)}increment(a){return this.add(1,a)}decrement(a){return this.add(-1,a)}update(a){let r=new e(this.document,a);return r._cache=this._cache,r}}e.prototype.toNice=e.prototype.toLocaleString,e.prototype.isBetween=e.prototype.between,e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add,e.prototype.equals=e.prototype.isEqual,t.prototype.numbers=function(n){let a=OH(this);return a=a.getNth(n),new e(this.document,a.pointer)},t.prototype.percentages=function(n){let a=OH(this);return a=a.filter(r=>r.has("#Percent")||r.after("^percent")),a=a.getNth(n),new e(this.document,a.pointer)},t.prototype.money=function(n){let a=OH(this);return a=a.filter(r=>r.has("#Money")||r.after("^#Currency")),a=a.getNth(n),new e(this.document,a.pointer)},t.prototype.values=t.prototype.numbers},Mtn=function(t){Itn(t),Ntn(t)},ztn={api:Mtn},qtn={people:!0,emails:!0,phoneNumbers:!0,places:!0},jtn=function(t={}){return t=Object.assign({},qtn,t),t.people!==!1&&this.people().replaceWith("██████████"),t.emails!==!1&&this.emails().replaceWith("██████████"),t.places!==!1&&this.places().replaceWith("██████████"),t.phoneNumbers!==!1&&this.phoneNumbers().replaceWith("███████"),this},Utn={api:function(t){t.prototype.redact=jtn}},Gtn=function(t){let e=t.clauses();return/\.\.$/.test(t.out("text"))||t.has("^#QuestionWord")&&t.has("@hasComma")?!1:!!(t.has("or not$")||t.has("^#QuestionWord")||t.has("^(do|does|did|is|was|can|could|will|would|may) #Noun")||t.has("^(have|must) you")||e.has("(do|does|is|was) #Noun+ #Adverb? (#Adjective|#Infinitive)$"))},Htn=function(t){const e=/\?/,{document:n}=t;return t.filter(a=>{let r=a.docs[0]||[],i=r[r.length-1];return!i||n[i.index[0]].length!==r.length?!1:e.test(i.post)?!0:Gtn(a)})},Wtn="(after|although|as|because|before|if|since|than|that|though|when|whenever|where|whereas|wherever|whether|while|why|unless|until|once)",Ytn="(that|which|whichever|who|whoever|whom|whose|whomever)",Xtn=function(t){let e=t;return e.length===1||(e=e.if("#Verb"),e.length===1)||(e=e.ifNo(Wtn),e=e.ifNo("^even (if|though)"),e=e.ifNo("^so that"),e=e.ifNo("^rather than"),e=e.ifNo("^provided that"),e.length===1)||(e=e.ifNo(Ytn),e.length===1)||(e=e.ifNo("(^despite|^during|^before|^through|^throughout)"),e.length===1)||(e=e.ifNo("^#Gerund"),e.length===1)?e:(e.length===0&&(e=t),e.eq(0))},Vtn=function(t){let e=null;return t.has("#PastTense")?e="PastTense":t.has("#FutureTense")?e="FutureTense":t.has("#PresentTense")&&(e="PresentTense"),{tense:e}},ek=function(t){let e=t.clauses(),a=Xtn(e).chunks(),r=t.none(),i=t.none(),o=t.none();return a.forEach((s,l)=>{if(l===0&&!s.has("")){r=s;return}if(!i.found&&s.has("")){i=s;return}i.found&&(o=o.concat(s))}),i.found&&!r.found&&(r=i.before("+").first()),{subj:r,verb:i,pred:o,grammar:Vtn(i)}},Ztn=function(t){let e=t.verbs(),n=e.eq(0);if(n.has("#PastTense"))return t;if(n.toPastTense(),e.length>1){e=e.slice(1),e=e.filter(r=>!r.lookBehind("to$").found),e=e.if("#PresentTense"),e=e.notIf("#Gerund");let a=t.match("to #Verb+ #Conjunction #Verb").terms();e=e.not(a),e.found&&e.verbs().toPastTense()}return t},Ktn=function(t){let e=t.verbs();return e.eq(0).toPresentTense(),e.length>1&&(e=e.slice(1),e=e.filter(a=>!a.lookBehind("to$").found),e=e.notIf("#Gerund"),e.found&&e.verbs().toPresentTense()),t},Jtn=function(t){let e=t.verbs();if(e.eq(0).toFutureTense(),t=t.fullSentence(),e=t.verbs(),e.length>1){e=e.slice(1);let a=e.filter(r=>r.lookBehind("to$").found?!1:r.has("#Copula #Gerund")?!0:r.has("#Gerund")?!1:r.has("#Copula")?!0:!(r.has("#PresentTense")&&!r.has("#Infinitive")&&r.lookBefore("(he|she|it|that|which)$").found));a.found&&a.forEach(r=>{if(r.has("#Copula")){r.match("was").replaceWith("is"),r.match("is").replaceWith("will be");return}r.toInfinitive()})}return t},enn=function(t){return t.verbs().first().toNegative().compute("chunks"),t},tnn=function(t){return t.verbs().first().toPositive().compute("chunks"),t},nnn=function(t){return t.verbs().toInfinitive(),t},ann=function(t){class e extends t{constructor(r,i,o){super(r,i,o),this.viewType="Sentences"}json(r={}){return this.map(i=>{let o=i.toView().json(r)[0]||{},{subj:s,verb:l,pred:u,grammar:d}=ek(i);return o.sentence={subject:s.text("normal"),verb:l.text("normal"),predicate:u.text("normal"),grammar:d},o},[])}toPastTense(r){return this.getNth(r).map(i=>(ek(i),Ztn(i)))}toPresentTense(r){return this.getNth(r).map(i=>(ek(i),Ktn(i)))}toFutureTense(r){return this.getNth(r).map(i=>(ek(i),i=Jtn(i),i))}toInfinitive(r){return this.getNth(r).map(i=>(ek(i),nnn(i)))}toNegative(r){return this.getNth(r).map(i=>(ek(i),enn(i)))}toPositive(r){return this.getNth(r).map(i=>(ek(i),tnn(i)))}isQuestion(r){return this.questions(r)}isExclamation(r){return this.filter(o=>o.lastTerm().has("@hasExclamation")).getNth(r)}isStatement(r){return this.filter(o=>!o.isExclamation().found&&!o.isQuestion().found).getNth(r)}update(r){let i=new e(this.document,r);return i._cache=this._cache,i}}e.prototype.toPresent=e.prototype.toPresentTense,e.prototype.toPast=e.prototype.toPastTense,e.prototype.toFuture=e.prototype.toFutureTense;const n={sentences:function(a){let r=this.map(i=>i.fullSentence());return r=r.getNth(a),new e(this.document,r.pointer)},questions:function(a){return Htn(this).getNth(a)}};Object.assign(t.prototype,n)},rnn={api:ann},inn=function(t){let e=t.splitAfter("@hasComma");e=e.match("#Honorific+? #Person+");let n=e.match("#Possessive").notIf("(his|her)");return e=e.splitAfter(n),e},Zke=function(t){let e={};e.firstName=t.match("#FirstName+"),e.lastName=t.match("#LastName+"),e.honorific=t.match("#Honorific+");let n=e.lastName,a=e.firstName;return(!a.found||!n.found)&&!a.found&&!n.found&&t.has("^#Honorific .$")&&(e.lastName=t.match(".$")),e},kA="male",Lu="female",Kke={mr:kA,mrs:Lu,miss:Lu,madam:Lu,king:kA,queen:Lu,duke:kA,duchess:Lu,baron:kA,baroness:Lu,count:kA,countess:Lu,prince:kA,princess:Lu,sire:kA,dame:Lu,lady:Lu,ayatullah:kA,congressman:kA,congresswoman:Lu,"first lady":Lu,mx:null},onn=function(t,e){let{firstName:n,honorific:a}=t;if(n.has("#FemaleName"))return Lu;if(n.has("#MaleName"))return kA;if(a.found){let i=a.text("normal");if(i=i.replace(/\./g,""),Kke.hasOwnProperty(i))return Kke[i];if(/^her /.test(i))return Lu;if(/^his /.test(i))return kA}let r=e.after();if(!r.has("#Person")&&r.has("#Pronoun")){let i=r.match("#Pronoun");if(i.has("(they|their)"))return null;let o=i.has("(he|his)"),s=i.has("(she|her|hers)");if(o&&!s)return kA;if(s&&!o)return Lu}return null},snn=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="People"}parse(a){return this.getNth(a).map(Zke)}json(a){let r=typeof a=="object"?a:{};return this.getNth(a).map(i=>{let o=i.toView().json(r)[0],s=Zke(i);return o.person={firstName:s.firstName.text("normal"),lastName:s.lastName.text("normal"),honorific:s.honorific.text("normal"),presumed_gender:onn(s,i)},o},[])}presumedMale(){return this.filter(a=>a.has("(#MaleName|mr|mister|sr|jr|king|pope|prince|sir)"))}presumedFemale(){return this.filter(a=>a.has("(#FemaleName|mrs|miss|queen|princess|madam)"))}update(a){let r=new e(this.document,a);return r._cache=this._cache,r}}t.prototype.people=function(n){let a=inn(this);return a=a.getNth(n),new e(this.document,a.pointer)}},cnn=function(t){let e=t.match("(#Place|#Address)+"),n=e.match("@hasComma");return n=n.filter(a=>a.has("(asia|africa|europe|america)$")?!0:!(a.has("(#City|#Region|#ProperNoun)$")&&a.after("^(#Country|#Region)").found)),e=e.splitAfter(n),e},lnn=function(t){t.prototype.places=function(e){let n=cnn(this);return n=n.getNth(e),new t(this.document,n.pointer)}},unn=function(t){t.prototype.organizations=function(e){return this.match("#Organization+").getNth(e)}},dnn=function(t){let e=this.clauses(),n=e.people();return n=n.concat(e.places()),n=n.concat(e.organizations()),n=n.not("(someone|man|woman|mother|brother|sister|father)"),n=n.sort("seq"),n=n.getNth(t),n},pnn=function(t){t.prototype.topics=dnn},Ann=function(t){snn(t),lnn(t),unn(t),pnn(t)},mnn={api:Ann},gnn=function(t){let e=t.match("");return e=e.not("#Conjunction"),e=e.not("#Preposition"),e=e.splitAfter("@hasComma"),e=e.splitAfter("[(do|did|am|was|is|will)] (is|was)",0),e=e.splitBefore("(#Verb && !#Copula) [being] #Verb",0),e=e.splitBefore("#Verb [to be] #Verb",0),e=e.splitAfter("[help] #PresentTense",0),e=e.splitBefore("(#PresentTense|#PastTense) [#Copula]$",0),e=e.splitBefore("(#PresentTense|#PastTense) [will be]$",0),e=e.splitBefore("(#PresentTense|#PastTense) [(had|has)]",0),e=e.not("#Reflexive$"),e=e.not("#Adjective"),e=e.splitAfter("[#PastTense] #PastTense",0),e=e.splitAfter("[#PastTense] #Auxiliary+ #PastTense",0),e=e.splitAfter("#Copula [#Gerund] #PastTense",0),e=e.if("#Verb"),e.has("(#Verb && !#Auxiliary) #Adverb+? #Copula")&&(e=e.splitBefore("#Copula")),e},hnn=function(t){let e=t;return t.wordCount()>1&&(e=t.not("(#Negative|#Auxiliary|#Modal|#Adverb|#Prefix)")),e.length>1&&!e.has("#Phrasal #Particle")&&(e=e.last()),e=e.not("(want|wants|wanted) to"),e.found||(e=t.not("#Negative")),e},fnn=function(t,e){let n={pre:t.none(),post:t.none()};if(!t.has("#Adverb"))return n;let a=t.splitOn(e);return a.length===3?{pre:a.eq(0).adverbs(),post:a.eq(2).adverbs()}:a.eq(0).isDoc(e)?(n.post=a.eq(1).adverbs(),n):(n.pre=a.eq(0).adverbs(),n)},bnn=function(t,e){let n=t.splitBefore(e);if(n.length<=1)return t.none();let a=n.eq(0);return a=a.not("(#Adverb|#Negative|#Prefix)"),a},ynn=function(t){return t.match("#Negative")},wnn=function(t){if(!t.has("(#Particle|#PhrasalVerb)"))return{verb:t.none(),particle:t.none()};let e=t.match("#Particle$");return{verb:t.not(e),particle:e}},Sm=function(t){let e=t.clone();e.contractions().expand();const n=hnn(e);return{root:n,prefix:e.match("#Prefix"),adverbs:fnn(e,n),auxiliary:bnn(e,n),negative:ynn(e),phrasal:wnn(n)}},km={tense:"PresentTense"},$8={conditional:!0},Tf={tense:"FutureTense"},GO={progressive:!0},qc={tense:"PastTense"},HO={complete:!0,progressive:!1},t0={passive:!0},vnn={plural:!0},knn={plural:!1},xnn=function(t){let e={};return t.forEach(n=>{Object.assign(e,n)}),e},Jke={imperative:[["#Imperative",[]]],"want-infinitive":[["^(want|wants|wanted) to #Infinitive$",[km]],["^wanted to #Infinitive$",[qc]],["^will want to #Infinitive$",[Tf]]],"gerund-phrase":[["^#PastTense #Gerund$",[qc]],["^#PresentTense #Gerund$",[km]],["^#Infinitive #Gerund$",[km]],["^will #Infinitive #Gerund$",[Tf]],["^have #PastTense #Gerund$",[qc]],["^will have #PastTense #Gerund$",[qc]]],"simple-present":[["^#PresentTense$",[km]],["^#Infinitive$",[km]]],"simple-past":[["^#PastTense$",[qc]]],"simple-future":[["^will #Adverb? #Infinitive",[Tf]]],"present-progressive":[["^(is|are|am) #Gerund$",[km,GO]]],"past-progressive":[["^(was|were) #Gerund$",[qc,GO]]],"future-progressive":[["^will be #Gerund$",[Tf,GO]]],"present-perfect":[["^(has|have) #PastTense$",[qc,HO]]],"past-perfect":[["^had #PastTense$",[qc,HO]],["^had #PastTense to #Infinitive",[qc,HO]]],"future-perfect":[["^will have #PastTense$",[Tf,HO]]],"present-perfect-progressive":[["^(has|have) been #Gerund$",[qc,GO]]],"past-perfect-progressive":[["^had been #Gerund$",[qc,GO]]],"future-perfect-progressive":[["^will have been #Gerund$",[Tf,GO]]],"passive-past":[["(got|were|was) #Passive",[qc,t0]],["^(was|were) being #Passive",[qc,t0]],["^(had|have) been #Passive",[qc,t0]]],"passive-present":[["^(is|are|am) #Passive",[km,t0]],["^(is|are|am) being #Passive",[km,t0]],["^has been #Passive",[km,t0]]],"passive-future":[["will have been #Passive",[Tf,t0,$8]],["will be being? #Passive",[Tf,t0,$8]]],"present-conditional":[["would be #PastTense",[km,$8]]],"past-conditional":[["would have been #PastTense",[qc,$8]]],"auxiliary-future":[["(is|are|am|was) going to (#Infinitive|#PresentTense)",[Tf]]],"auxiliary-past":[["^did #Infinitive$",[qc,knn]],["^used to #Infinitive$",[qc,HO]]],"auxiliary-present":[["^(does|do) #Infinitive$",[km,HO,vnn]]],"modal-past":[["^(could|must|should|shall) have #PastTense$",[qc]]],"modal-infinitive":[["^#Modal #Infinitive$",[]]],infinitive:[["^#Infinitive$",[]]]};let $ee=[];Object.keys(Jke).map(t=>{Jke[t].forEach(e=>{$ee.push({name:t,match:e[0],data:xnn(e[1])})})});const Onn=function(t,e){return t=t.clone(),e.adverbs.post&&e.adverbs.post.found&&t.remove(e.adverbs.post),e.adverbs.pre&&e.adverbs.pre.found&&t.remove(e.adverbs.pre),t.has("#Negative")&&(t=t.remove("#Negative")),t.has("#Prefix")&&(t=t.remove("#Prefix")),e.root.has("#PhrasalVerb #Particle")&&t.remove("#Particle$"),t=t.not("#Adverb"),t},Cnn=function(t){return!!(t.has("#Infinitive")&&t.growLeft("to").has("^to #Infinitive"))},Vf=function(t,e){let n={};t=Onn(t,e);for(let a=0;a<$ee.length;a+=1){let r=$ee[a];if(t.has(r.match)===!0){n.form=r.name,Object.assign(n,r.data);break}}return n.form||t.has("^#Verb$")&&(n.form="infinitive"),n.tense||(n.tense=e.root.has("#PastTense")?"PastTense":"PresentTense"),n.copula=e.root.has("#Copula"),n.isInfinitive=Cnn(t),n},e1e=function(t){return t.length<=1?!1:(t.parse()[0]||{}).isSubordinate},_nn=function(t){let e=t.clauses();return e=e.filter((n,a)=>!(n.has("^(if|unless|while|but|for|per|at|by|that|which|who|from)")||a>0&&n.has("^#Verb . #Noun+$")||a>0&&n.has("^#Adverb"))),e.length===0?t:e},Bnn=function(t){let e=t.before();e=_nn(e);let n=e.nouns(),a=n.last(),r=a.match("(i|he|she|we|you|they)");if(r.found)return r.nouns();let i=n.if("^(that|this|those)");return i.found||n.found===!1&&(i=e.match("^(that|this|those)"),i.found)?i:(a=n.last(),e1e(a)&&(n.remove(a),a=n.last()),e1e(a)&&(n.remove(a),a=n.last()),a)},Enn=function(t,e){return e.has("(are|were|does)")||t.has("(those|they|we)")?!0:t.found&&t.isPlural?t.isPlural().found:!1},Th=function(t){let e=Bnn(t);return{subject:e,plural:Enn(e,t)}},Xi=t=>t,jI=(t,e)=>{let n=Th(t),a=n.subject;return a.has("i")||a.has("we")?!0:n.plural},Qnn=(t,e)=>{let{subject:n,plural:a}=Th(t);return a||n.has("we")?"were":"was"},UI=function(t,e){if(t.has("were"))return"are";let{subject:n,plural:a}=Th(t);return n.has("i")?"am":n.has("we")||a?"are":"is"},ale=function(t,e){let n=Th(t),a=n.subject;return a.has("i")||a.has("we")||n.plural?"do":"does"},qp=function(t){if(t.has("#Infinitive"))return"Infinitive";if(t.has("#Participle"))return"Participle";if(t.has("#PastTense"))return"PastTense";if(t.has("#Gerund"))return"Gerund";if(t.has("#PresentTense"))return"PresentTense"},Tee=function(t,e){const{toInfinitive:n}=t.methods.two.transform.verb;let a=e.root.text({keepPunct:!1});return a=n(a,t.model,qp(t)),a&&t.replace(e.root,a),t},t1e=t=>t.has("will not")?t.replace("will not","have not"):t.remove("will"),n1e=function(t){if(!t||!t.isView)return[];const e={normal:!0,terms:!1,text:!1};return t.json(e).map(n=>n.normal)},a1e=function(t){return!t||!t.isView?"":t.text("normal")},Snn=function(t){const{toInfinitive:e}=t.methods.two.transform.verb;let n=t.text("normal");return e(n,t.model,qp(t))},Inn=function(t){let e=Sm(t);t=t.clone().toView();const n=Vf(t,e);return{root:e.root.text(),preAdverbs:n1e(e.adverbs.pre),postAdverbs:n1e(e.adverbs.post),auxiliary:a1e(e.auxiliary),negative:e.negative.found,prefix:a1e(e.prefix),infinitive:Snn(e.root),grammar:n}},Dnn={tags:!0},$nn=function(t,e){const{toInfinitive:n}=t.methods.two.transform.verb,{root:a,auxiliary:r}=e;let i=r.terms().harden(),o=a.text("normal");if(o=n(o,t.model,qp(a)),o&&t.replace(a,o,Dnn).tag("Verb").firstTerm().tag("Infinitive"),i.found&&t.remove(i),e.negative.found){t.has("not")||t.prepend("not");let s=ale(t);t.prepend(s)}return t.fullSentence().compute(["freeze","lexicon","preTagger","postTagger","unfreeze","chunks"]),t},wA={tags:!0},nb={noAux:(t,e)=>(e.auxiliary.found&&(t=t.remove(e.auxiliary)),t),simple:(t,e)=>{const{conjugate:n,toInfinitive:a}=t.methods.two.transform.verb,r=e.root;if(r.has("#Modal"))return t;let i=r.text({keepPunct:!1});return i=a(i,t.model,qp(r)),i=n(i,t.model).PastTense,i=i==="been"?"was":i,i==="was"&&(i=Qnn(t)),i&&t.replace(r,i,wA),t},both:function(t,e){return e.negative.found?(t.replace("will","did"),t):(t=nb.simple(t,e),t=nb.noAux(t,e),t)},hasHad:t=>(t.replace("has","had",wA),t),hasParticiple:(t,e)=>{const{conjugate:n,toInfinitive:a}=t.methods.two.transform.verb,r=e.root;let i=r.text("normal");return i=a(i,t.model,qp(r)),n(i,t.model).Participle}},r1e={infinitive:nb.simple,"simple-present":nb.simple,"simple-past":Xi,"simple-future":nb.both,"present-progressive":t=>(t.replace("are","were",wA),t.replace("(is|are|am)","was",wA),t),"past-progressive":Xi,"future-progressive":(t,e)=>(t.match(e.root).insertBefore("was"),t.remove("(will|be)"),t),"present-perfect":nb.hasHad,"past-perfect":Xi,"future-perfect":(t,e)=>(t.match(e.root).insertBefore("had"),t.has("will")&&(t=t1e(t)),t.remove("have"),t),"present-perfect-progressive":nb.hasHad,"past-perfect-progressive":Xi,"future-perfect-progressive":t=>(t.remove("will"),t.replace("have","had",wA),t),"passive-past":t=>(t.replace("have","had",wA),t),"passive-present":t=>(t.replace("(is|are)","was",wA),t),"passive-future":(t,e)=>(e.auxiliary.has("will be")&&(t.match(e.root).insertBefore("had been"),t.remove("(will|be)")),e.auxiliary.has("will have been")&&(t.replace("have","had",wA),t.remove("will")),t),"present-conditional":t=>(t.replace("be","have been"),t),"past-conditional":Xi,"auxiliary-future":t=>(t.replace("(is|are|am)","was",wA),t),"auxiliary-past":Xi,"auxiliary-present":t=>(t.replace("(do|does)","did",wA),t),"modal-infinitive":(t,e)=>(t.has("can")?t.replace("can","could",wA):(nb.simple(t,e),t.match("#Modal").insertAfter("have").tag("Auxiliary")),t),"modal-past":Xi,"want-infinitive":t=>(t.replace("(want|wants)","wanted",wA),t.remove("will"),t),"gerund-phrase":(t,e)=>(e.root=e.root.not("#Gerund$"),nb.simple(t,e),t1e(t),t)},Tnn=function(t,e,n){return r1e.hasOwnProperty(n)&&(t=r1e[n](t,e),t.fullSentence().compute(["tagger","chunks"])),t},Pee=function(t,e){let n=Th(t),a=n.subject;return a.has("(i|we|you)")?"have":n.plural===!1||a.has("he")||a.has("she")||a.has("#Person")?"has":"have"},Fee=(t,e)=>{const{conjugate:n,toInfinitive:a}=t.methods.two.transform.verb,{root:r,auxiliary:i}=e;if(r.has("#Modal"))return t;let o=r.text({keepPunct:!1});o=a(o,t.model,qp(r));let s=n(o,t.model);if(o=s.Participle||s.PastTense,o){t=t.replace(r,o);let l=Pee(t);t.prepend(l).match(l).tag("Auxiliary"),t.remove(i)}return t},i1e={infinitive:Fee,"simple-present":Fee,"simple-future":(t,e)=>t.replace("will",Pee(t)),"present-perfect":Xi,"past-perfect":Xi,"future-perfect":(t,e)=>t.replace("will have",Pee(t)),"present-perfect-progressive":Xi,"past-perfect-progressive":Xi,"future-perfect-progressive":Xi},Pnn=function(t,e,n){return i1e.hasOwnProperty(n)?(t=i1e[n](t,e),t.fullSentence().compute(["tagger","chunks"]),t):(t=Fee(t,e),t.fullSentence().compute(["tagger","chunks"]),t)},ub={tags:!0},WO=(t,e)=>{const{conjugate:n,toInfinitive:a}=t.methods.two.transform.verb,r=e.root;let i=r.text("normal");return i=a(i,t.model,qp(r)),jI(t)===!1&&(i=n(i,t.model).PresentTense),r.has("#Copula")&&(i=UI(t)),i&&(t=t.replace(r,i,ub),t.not("#Particle").tag("PresentTense")),t},o1e=(t,e)=>{const{conjugate:n,toInfinitive:a}=t.methods.two.transform.verb,r=e.root;let i=r.text("normal");return i=a(i,t.model,qp(r)),jI(t)===!1&&(i=n(i,t.model).Gerund),i&&(t=t.replace(r,i,ub),t.not("#Particle").tag("Gerund")),t},Fnn=(t,e)=>{const{toInfinitive:n}=t.methods.two.transform.verb,a=e.root;let r=e.root.text("normal");return r=n(r,t.model,qp(a)),r&&(t=t.replace(e.root,r,ub)),t},s1e={infinitive:WO,"simple-present":(t,e)=>{const{conjugate:n}=t.methods.two.transform.verb;let{root:a}=e;if(a.has("#Infinitive")){let i=Th(t).subject;if(jI(t)||i.has("i"))return t;let o=a.text("normal"),s=n(o,t.model).PresentTense;o!==s&&t.replace(a,s,ub)}else return WO(t,e);return t},"simple-past":WO,"simple-future":(t,e)=>{const{root:n,auxiliary:a}=e;if(a.has("will")&&n.has("be")){let r=UI(t);t.replace(n,r),t=t.remove("will"),t.replace("not "+r,r+" not")}else WO(t,e),t=t.remove("will");return t},"present-progressive":Xi,"past-progressive":(t,e)=>{let n=UI(t);return t.replace("(were|was)",n,ub)},"future-progressive":t=>(t.match("will").insertBefore("is"),t.remove("be"),t.remove("will")),"present-perfect":(t,e)=>(WO(t,e),t=t.remove("(have|had|has)"),t),"past-perfect":(t,e)=>{let a=Th(t).subject;return jI(t)||a.has("i")?(t=Tee(t,e),t.remove("had"),t):(t.replace("had","has",ub),t)},"future-perfect":t=>(t.match("will").insertBefore("has"),t.remove("have").remove("will")),"present-perfect-progressive":Xi,"past-perfect-progressive":t=>t.replace("had","has",ub),"future-perfect-progressive":t=>(t.match("will").insertBefore("has"),t.remove("have").remove("will")),"passive-past":(t,e)=>{let n=UI(t);return t.has("(had|have|has)")&&t.has("been")?(t.replace("(had|have|has)",n,ub),t.replace("been","being"),t):t.replace("(got|was|were)",n)},"passive-present":Xi,"passive-future":t=>(t.replace("will","is"),t.replace("be","being")),"present-conditional":Xi,"past-conditional":t=>(t.replace("been","be"),t.remove("have")),"auxiliary-future":(t,e)=>(o1e(t,e),t.remove("(going|to)"),t),"auxiliary-past":(t,e)=>{if(e.auxiliary.has("did")){let n=ale(t);return t.replace(e.auxiliary,n),t}return o1e(t,e),t.replace(e.auxiliary,"is"),t},"auxiliary-present":Xi,"modal-infinitive":Xi,"modal-past":(t,e)=>(Fnn(t,e),t.remove("have")),"gerund-phrase":(t,e)=>(e.root=e.root.not("#Gerund$"),WO(t,e),t.remove("(will|have)")),"want-infinitive":(t,e)=>{let n="wants";return jI(t)&&(n="want"),t.replace("(want|wanted|wants)",n,ub),t.remove("will"),t}},Rnn=function(t,e,n){return s1e.hasOwnProperty(n)&&(t=s1e[n](t,e),t.fullSentence().compute(["tagger","chunks"])),t},Xje={tags:!0},T8=(t,e)=>{const{toInfinitive:n}=t.methods.two.transform.verb,{root:a,auxiliary:r}=e;if(a.has("#Modal"))return t;let i=a.text("normal");return i=n(i,t.model,qp(a)),i&&(t=t.replace(a,i,Xje),t.not("#Particle").tag("Verb")),t.prepend("will").match("will").tag("Auxiliary"),t.remove(r),t},c1e=(t,e)=>{const{conjugate:n,toInfinitive:a}=t.methods.two.transform.verb,{root:r,auxiliary:i}=e;let o=r.text("normal");return o=a(o,t.model,qp(r)),o&&(o=n(o,t.model).Gerund,t.replace(r,o,Xje),t.not("#Particle").tag("PresentTense")),t.remove(i),t.prepend("will be").match("will be").tag("Auxiliary"),t},l1e={infinitive:T8,"simple-present":T8,"simple-past":T8,"simple-future":Xi,"present-progressive":c1e,"past-progressive":c1e,"future-progressive":Xi,"present-perfect":t=>(t.match("(have|has)").replaceWith("will have"),t),"past-perfect":t=>t.replace("(had|has)","will have"),"future-perfect":Xi,"present-perfect-progressive":t=>t.replace("has","will have"),"past-perfect-progressive":t=>t.replace("had","will have"),"future-perfect-progressive":Xi,"passive-past":t=>t.has("got")?t.replace("got","will get"):t.has("(was|were)")?(t.replace("(was|were)","will be"),t.remove("being")):t.has("(have|has|had) been")?t.replace("(have|has|had) been","will be"):t,"passive-present":t=>(t.replace("being","will be"),t.remove("(is|are|am)"),t),"passive-future":Xi,"present-conditional":t=>t.replace("would","will"),"past-conditional":t=>t.replace("would","will"),"auxiliary-future":Xi,"auxiliary-past":t=>t.has("used")&&t.has("to")?(t.replace("used","will"),t.remove("to")):(t.replace("did","will"),t),"auxiliary-present":t=>t.replace("(do|does)","will"),"modal-infinitive":Xi,"modal-past":Xi,"gerund-phrase":(t,e)=>(e.root=e.root.not("#Gerund$"),T8(t,e),t.remove("(had|have)")),"want-infinitive":t=>(t.replace("(want|wants|wanted)","will want"),t)},Lnn=function(t,e,n){return t.has("will")||t.has("going to")||l1e.hasOwnProperty(n)&&(t=l1e[n](t,e),t.fullSentence().compute(["tagger","chunks"])),t},Nnn={tags:!0},Mnn=function(t,e){const{toInfinitive:n,conjugate:a}=t.methods.two.transform.verb,{root:r,auxiliary:i}=e;if(t.has("#Gerund"))return t;let o=r.text("normal");o=n(o,t.model,qp(r));let s=a(o,t.model).Gerund;if(s){let l=UI(t);t.replace(r,s,Nnn),t.remove(i),t.prepend(l)}return t.replace("not is","is not"),t.replace("not are","are not"),t.fullSentence().compute(["tagger","chunks"]),t},u1e={tags:!0},CH=function(t,e){let n=ale(t);return t.prepend(n+" not"),t},DF=function(t){let e=t.match("be");return e.found?(e.prepend("not"),t):(e=t.match("(is|was|am|are|will|were)"),e.found&&e.append("not"),t)},$F=t=>t.has("(is|was|am|are|will|were|be)"),d1e={"simple-present":(t,e)=>$F(t)===!0?DF(t):(t=Tee(t,e),t=CH(t),t),"simple-past":(t,e)=>$F(t)===!0?DF(t):(t=Tee(t,e),t.prepend("did not"),t),imperative:t=>(t.prepend("do not"),t),infinitive:(t,e)=>$F(t)===!0?DF(t):CH(t),"passive-past":t=>{if(t.has("got"))return t.replace("got","get",u1e),t.prepend("did not"),t;let e=t.match("(was|were|had|have)");return e.found&&e.append("not"),t},"auxiliary-past":t=>{if(t.has("used"))return t.prepend("did not"),t;let e=t.match("(did|does|do)");return e.found&&e.append("not"),t},"want-infinitive":(t,e)=>(t=CH(t),t=t.replace("wants","want",u1e),t)},znn=function(t,e,n){if(t.has("#Negative"))return t;if(d1e.hasOwnProperty(n))return t=d1e[n](t,e),t;let a=t.matchOne("be");return a.found?(a.prepend("not"),t):$F(t)===!0?DF(t):(a=t.matchOne("(will|had|have|has|did|does|do|#Modal)"),a.found&&a.append("not"),t)},qnn=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Verbs"}parse(a){return this.getNth(a).map(Sm)}json(a,r){return this.getNth(r).map(s=>{let l=s.toView().json(a)[0]||{};return l.verb=Inn(s),l},[])}subjects(a){return this.getNth(a).map(r=>(Sm(r),Th(r).subject))}adverbs(a){return this.getNth(a).map(r=>r.match("#Adverb"))}isSingular(a){return this.getNth(a).filter(r=>Th(r).plural!==!0)}isPlural(a){return this.getNth(a).filter(r=>Th(r).plural===!0)}isImperative(a){return this.getNth(a).filter(r=>r.has("#Imperative"))}toInfinitive(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return $nn(r,i,o.form)})}toPresentTense(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return o.isInfinitive?r:Rnn(r,i,o.form)})}toPastTense(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return o.isInfinitive?r:Tnn(r,i,o.form)})}toFutureTense(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return o.isInfinitive?r:Lnn(r,i,o.form)})}toGerund(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return o.isInfinitive?r:Mnn(r,i,o.form)})}toPastParticiple(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return o.isInfinitive?r:Pnn(r,i,o.form)})}conjugate(a){const{conjugate:r,toInfinitive:i}=this.world.methods.two.transform.verb;return this.getNth(a).map(o=>{let s=Sm(o),l=Vf(o,s);l.form==="imperative"&&(l.form="simple-present");let u=s.root.text("normal");if(!s.root.has("#Infinitive")){let d=qp(s.root);u=i(u,o.model,d)||u}return r(u,o.model)},[])}isNegative(){return this.if("#Negative")}isPositive(){return this.ifNo("#Negative")}toPositive(){let a=this.match("do not #Verb");return a.found&&a.remove("do not"),this.remove("#Negative")}toNegative(a){return this.getNth(a).map(r=>{let i=Sm(r),o=Vf(r,i);return znn(r,i,o.form)})}update(a){let r=new e(this.document,a);return r._cache=this._cache,r}}e.prototype.toPast=e.prototype.toPastTense,e.prototype.toPresent=e.prototype.toPresentTense,e.prototype.toFuture=e.prototype.toFutureTense,t.prototype.verbs=function(n){let a=gnn(this);return a=a.getNth(n),new e(this.document,a.pointer)}},jnn={api:qnn},Ree=function(t,e){let n=e.match(t);if(n.found){let a=n.pronouns().refersTo();if(a.found)return a}return e.none()},p1e=function(t){if(!t.found)return t;let[e]=t.fullPointer[0];return e&&e>0?t.update([[e-1]]):t.none()},Unn=function(t,e){return e==="m"?t.filter(n=>!n.presumedFemale().found):e==="f"?t.filter(n=>!n.presumedMale().found):t},A1e=function(t,e){let n=t.people();return n=Unn(n,e),n.found||(n=t.nouns("#Actor"),n.found)?n.last():e==="f"?Ree("(she|her|hers)",t):e==="m"?Ree("(he|him|his)",t):t.none()},Gnn=function(t){let e=t.nouns(),n=e.isPlural().notIf("#Pronoun");if(n.found)return n.last();let a=Ree("(they|their|theirs)",t);return a.found?a:(n=e.match("(somebody|nobody|everybody|anybody|someone|noone|everyone|anyone)"),n.found?n.last():t.none())},Hnn=function(t,e){if(e&&e.found){let n=t.docs[0][0];n.reference=e.ptrs[0]}},_H=function(t,e){let n=t.before(),a=e(n);return a.found||(n=p1e(t),a=e(n),a.found)||(n=p1e(n),a=e(n),a.found)?a:t.none()},Wnn=function(t){t.pronouns().if("(he|him|his|she|her|hers|they|their|theirs|it|its)").forEach(n=>{let a=null;n.has("(he|him|his)")?a=_H(n,r=>A1e(r,"m")):n.has("(she|her|hers)")?a=_H(n,r=>A1e(r,"f")):n.has("(they|their|theirs)")&&(a=_H(n,Gnn)),a&&a.found&&Hnn(n,a)})},Ynn=function(t){class e extends t{constructor(a,r,i){super(a,r,i),this.viewType="Pronouns"}hasReference(){return this.compute("coreference"),this.filter(a=>a.docs[0][0].reference)}refersTo(){return this.compute("coreference"),this.map(a=>{if(!a.found)return a.none();let r=a.docs[0][0];return r.reference?a.update([r.reference]):a.none()})}update(a){let r=new e(this.document,a);return r._cache=this._cache,r}}t.prototype.pronouns=function(n){let a=this.match("#Pronoun");return a=a.getNth(n),new e(a.document,a.pointer)}},Xnn={compute:{coreference:Wnn},api:Ynn};Fa.plugin(den);Fa.plugin(men);Fa.plugin(Qen);Fa.plugin(Xnn);Fa.plugin(Yen);Fa.plugin(Ken);Fa.plugin(ptn);Fa.plugin(ztn);Fa.plugin(Utn);Fa.plugin(rnn);Fa.plugin(mnn);Fa.plugin(jnn);function Vnn(t){return Fa(t).topics().out("array")}function Znn(t){return Fa(t).nouns().out("array")}function Knn(t){return Fa(t).normalize().remove("#Stop").out("text")}function Jnn(t){let e=t.replace(/<[^>]*>/g,"");return["CONVERSATION HISTORY","BACKGROUND KNOWLEDGE","QUESTION","QUOTE","COMMENTS","POWER_UP","UNDERSTANDING"].forEach(a=>{const r=new RegExp(a+":[^\\n]*\\n?","gi");e=e.replace(r,"")}),e=e.trim().replace(/\s+/g," "),e}function ean(t){return t.replace(/\s+/g," ").replace(/\n+/g,` `).trim()}function tan(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""}function nan(t){let e=tan(t);e=Jnn(t),e=ean(e),e=Knn(e);let n=Vnn(e);return n.length===0&&(n=Znn(e),n.length===0&&(n=e.split(" "))),n}async function m1e(t,e,n="tinyMLDB_chats"){try{const a=await Xr();if(!a||!a.db)throw new Error("Database not initialized");const r=a.db.transaction(["tinyMLDB_chats"],"readwrite").objectStore("tinyMLDB_chats"),i=r.count(),o=await new Promise((s,l)=>{i.onsuccess=()=>s(i.result+1),i.onerror=u=>l(new Error("Error counting rows: "+u.target.error))});return new Promise((s,l)=>{const u=r.put({id:o,title:t,html_content:e,date:new Date().toISOString()});u.onsuccess=()=>s({success:!0,id:o}),u.onerror=d=>l(new Error("Error saving content: "+d.target.error))})}catch(a){throw console.error("Database operation failed:",a),a}}function aan(t){let e="";const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:function(r){return!r.parentNode.tagName.match(/SCRIPT|STYLE/i)&&r.nodeValue.trim()!==""?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}},!1);let a;for(;a=n.nextNode();)e+=a.textContent+" ";return e.trim()}function ran(t){if(t==null)return null;typeof t=="object"&&t!==null&&(t=t.id);const e=typeof t=="string"?parseInt(t,10):t;return isNaN(e)||e<=0?null:e}async function Vje(t,e){try{const n=ran(e);if(console.log("Attempting to load chat with ID:",n),n===null)return console.warn("Invalid chat ID:",e),!1;const a=t.querySelector("#message-container");if(!a)return console.warn("Message container not found"),!1;const r=await Xr();if(!r||!r.db)return console.warn("Database not properly initialized"),!1;const i=r.db.transaction(["tinyMLDB_chats"],"readonly").objectStore("tinyMLDB_chats"),o=await new Promise(u=>{const d=i.getAll();d.onsuccess=()=>u(d.result)});console.log("Available chats:",o);const s=await r.getByKey("tinyMLDB_chats",n);if(!s||!s.html_content)return console.warn(`No data found for chat ID: ${n}`),!1;a.innerHTML=s.html_content;const{reinitializeQuizButtons:l}=await ye(async()=>{const{reinitializeQuizButtons:u}=await Promise.resolve().then(()=>Ijt);return{reinitializeQuizButtons:u}},void 0,import.meta.url);return Zje(n),NL(t),$qe(t),Wqe(t),l(t),!0}catch(n){return console.error("Error loading chat:",n),!1}}async function ian(t){try{const e=await Xr();if(!e)throw new Error("Database not initialized");return await e.delete("tinyMLDB_chats",t),!0}catch(e){return console.error(`Error deleting chat with key ${t}:`,e),!1}}async function oan(){try{const t=await Xr();if(!t)throw new Error("Database not initialized");const e=await t.getAll("tinyMLDB_chats");for(const n of e)await t.delete("tinyMLDB_chats",n.id);return!0}catch(t){throw console.error("Error clearing rows:",t),t}}async function san(t,e,n=null){try{const a=t.querySelector("#message-container");if(!a)throw new Error("Element '#message-container' not found.");const r=a.innerHTML,i=await Xr();if(!i||!i.db)throw new Error("Database not properly initialized");if(typeof e>"u"||e===null){let l=aan(a);const u=n||nan(l);return(await m1e(u,r)).id}const o=e?.id||e,s=await can(o,r);return s.success?s.id:(console.warn(`Failed to update chat with ID: ${o}, creating new chat`),(await m1e(n||"Recovered Chat",r)).id)}catch(a){throw console.error("Error in determineAndSaveChat:",a),a}}async function can(t,e){try{const n=await Xr();if(!n||!n.db)throw new Error("Database not initialized");const a=n.db.transaction(["tinyMLDB_chats"],"readwrite").objectStore("tinyMLDB_chats"),r=a.get(t),i=await new Promise((s,l)=>{r.onsuccess=()=>s(r.result),r.onerror=()=>l(new Error("Error retrieving entry"))});if(!i)return console.warn(`No existing entry found for ID: ${t}`),{success:!1,id:t};const o={...i,html_content:e,last_updated:new Date().toISOString()};return new Promise((s,l)=>{const u=a.put(o);u.onsuccess=()=>s({success:!0,id:t}),u.onerror=d=>l(new Error("Error updating content: "+d.target.error))})}catch(n){throw console.error("Database operation failed:",n),n}}function Zje(t){t!=null&&localStorage.setItem("mostRecentID",t.toString())}function lan(){const t=localStorage.getItem("mostRecentID");return t?parseInt(t,10):null}function uan(t){const e=t.querySelector("#message-container");e?e.innerHTML="":console.error("Message container not found")}function g1e(t,e){const n=["🚲 Beginner","🚗 Intermediate","🚁 Advanced","🛸 Bloom's Taxonomy"],a=t.querySelector(".difficulty-dropdown");if(a){a.setAttribute("title","Select a difficulty level to redo the AI response");const r=a.querySelector(".current-difficulty-level");if(r){const i=Math.min(Math.max(parseInt(e,10),0),n.length-1);r.textContent=n[i].slice(2).trim()}}}function OE(t,e,n=""){let a;{if(n){a=n;const o=n.getAttribute("data-difficulty");o!==null&&(a.setAttribute("data-difficulty",o),g1e(a,o))}else{a=lee(t,"ai-message","","message-container");const o=window.current_difficulty||1;a.setAttribute("data-difficulty",o),g1e(a,o)}Object.assign(a.style,{position:"relative",borderRadius:"15px",border:"2px solid rgba(59, 130, 246, 0.2)"});const r=[{border:"2px solid rgba(59, 130, 246, 0.2)"},{border:"2px solid rgba(59, 130, 246, 0.8)"},{border:"2px solid rgba(59, 130, 246, 0.2)"}],i=a.animate(r,{duration:2e3,iterations:3,easing:"ease-in-out"});i.onfinish=()=>{a.style.border="none"}}return a}function f3(t,e,n){const a=lee(t,"reference-btn-container","");return n.forEach((r,i)=>{const o=lee(t,"reference-btn","");o.setAttribute("href",r),o.textContent=i+1,a.appendChild(o)}),a}const dan=`
    `;let uv=!1;function pan(t){uv=!t}function CE(t){if(uv)return null;if(!t)return console.warn("No clone element provided to injectProgress"),null;const e=document.createElement("template");e.innerHTML=dan;let n=t.querySelector("#progress");if(!n){n=document.createElement("div"),n.id="progress",n.className="w-full";const a=t.querySelector(".message-content");a?a.insertBefore(n,a.firstChild):t.appendChild(n)}return n.cloneNode(!0),n.innerHTML="",n.appendChild(e.content.cloneNode(!0)),n}async function sy(t,e){if(uv)return;if(!t){console.warn(`No clone provided when removing ${e}`);return}const n=t.querySelector(`#${e}`);n&&(Aan(n),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n)},500))}function Aan(t){if(uv)return;t.querySelectorAll("svg.hidden").forEach(n=>{n.classList.remove("hidden")})}function man(t,e,n){if(uv)return;const a=t.querySelector("#checklist");if(a){const r=document.createElement("div");r.className="flex items-center text-blue-400 dark:text-blue-400 bg-transparent p-1 rounded-lg border-b border-zinc-300 dark:border-zinc-700 animate-fadeInUp",r.innerHTML=`
    • ${e}
    `,a.appendChild(r)}}function gan(t,e,n,a,r){if(uv)return;const i=Date.now(),o=setInterval(function(){if(Date.now()-i>r){clearInterval(o);return}const s=e.querySelector(t);s&&(clearInterval(o),n(s))},a)}function pi(t,e){if(uv)return;const n=`progress${e}`;gan(`#${n}`,t,function(a){a.classList.remove("hidden")},100,5e3)}function _E(t,e){uv||t.forEach((n,a)=>{setTimeout(()=>man(e,n,a),100*a)})}function han(t){return Fa(t).sentences().out("array").map(r=>{let i=Fa(r),o=i.topics().out("array"),s=i.nouns().out("array").filter(l=>!o.includes(l));return{sentence:r,entities:o,nouns:s}})}function fan(t){let e=[];return t.forEach(({sentence:n,entities:a,nouns:r})=>{let i=Fa(n).terms().out("array").filter(s=>!a.includes(s)&&!r.includes(s)),o=a.length>0?a:r;o.forEach(s=>{let l=n.replace(s,"______"),u=s,d=o.filter(m=>m!==s).concat(r.filter(m=>m!==s),i);Lee(d);let p=d.slice(0,3);for(;p.length<3&&i.length>0;){let m=i.pop();p.includes(m)||p.push(m)}let A={question:l,answers:[]};p.forEach(m=>{A.answers.push({text:m,correct:!1,explanation:"This is not the correct answer for the blank."})}),A.answers.push({text:u,correct:!0,explanation:"This is the correct answer based on the context."}),Lee(A.answers),e.push(A)})}),e}function GL(t){const e=han(t),n=fan(e);return yan(n).questions}function Kje(t){return t=t.replace(/<\/?[^>]+(>|$)/g,""),t=t.replace(/\b[A-Z]{1,2}\s*:\s*/g,""),t}function Lee(t){for(let e=t.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}}function ban(t){return Kje(t.question).replace(/______/g,"").trim().split(/\s+/).length>=3}function yan(t){let e=t.filter(ban);return Lee(e),{questions:e.slice(0,3).map(a=>({...a,question:Kje(a.question)}))}}const wan=` `;function van(t){const e=document.createElement("template");e.innerHTML=wan;const n=t.querySelector("#modal_feedback");n?n.appendChild(e.content.cloneNode(!0)):console.error("feedbackModel not found")}function kan(t){const e=t.querySelector("#openModal-feedback"),n=t.querySelector("#closeModal"),a=t.querySelector("#myModal"),r=t.querySelector("#feedback-iframe"),i=()=>{a.classList.add("hidden")};e.addEventListener("click",()=>{r&&!r.src&&(r.src="https://docs.google.com/forms/d/e/1FAIpQLSeK8RXgc6kbT1IbWVLjyUhwowp3x1ySbAjUQQqztdDs5ccmmQ/viewform?embedded=true"),a.classList.remove("hidden")}),n.addEventListener("click",i),a.addEventListener("click",o=>{o.target===a&&i()}),document.addEventListener("keydown",o=>{o.key==="Escape"&&!a.classList.contains("hidden")&&i()})}function xan(){const t=document.createElement("div");t.className="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full flex justify-center items-center z-50",t.id="helpModal";const e=document.createElement("div");e.className="bg-white shadow-lg rounded-lg relative max-w-lg mx-auto",e.style.maxWidth="400px",e.id="helpModalContainer",e.style.width="100%",e.onclick=s=>s.stopPropagation();const n=document.createElement("div");n.className="p-4 md:p-6 lg:p-8 overflow-auto",n.style.maxHeight="500px";const a=document.createElement("div");a.className="markdown-body space-y-4",a.innerHTML='
    ',n.appendChild(a),e.appendChild(n);const r=document.createElement("div");r.className="flex justify-between items-center p-4";const i=document.createElement("button");i.innerText="Contact Us",i.className="bg-gray-600 rounded-lg p-2 hover:bg-gray-300 text-white",i.id="emailButtonHelpModal",i.onclick=()=>{window.location.href="mailto:tinyml.aichat@gmail.com?subject=Help with TinyML"};const o=document.createElement("button");return o.innerText="Close",o.className="bg-gray-600 rounded-lg p-2 text-white hover:bg-gray-300",o.id="closeButtonHelpModal",r.appendChild(i),r.appendChild(o),e.appendChild(r),t.appendChild(e),t}function TF(t){const e=t.querySelector("#helpModal"),n=e.classList.contains("hidden"),a=e.querySelector("#youtubeVideo-container");n?(e.classList.remove("hidden"),a.innerHTML=''):(e.classList.add("hidden"),_an(e),a.innerHTML="")}function Oan(t){const e=xan(),n=t.querySelector("#helpModal");n.contains(e)||n.appendChild(e),Can(t),document.addEventListener("keydown",function(r){if(r.key==="Escape"){const i=t.querySelector("#helpModal");i&&!i.classList.contains("hidden")&&TF(t)}}),e.addEventListener("click",r=>{const i=e.querySelector("#helpModalContainer");r.target===e&&!i.contains(r.target)&&TF(t)});const a=e.querySelector("#closeButtonHelpModal");a.onclick=()=>TF(t)}function Can(t){const e=t.querySelector("#help-btn");Mo(e,"Get help with SocratiQ",t),e.onclick=()=>TF(t)}function _an(t){var e=t.querySelector("iframe");e&&e.src.includes("youtube.com/embed")&&e.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo"}),"*")}function BE(t,e){const n=e.querySelectorAll(`.${t}`);let a=!1;n.forEach(r=>{const i=document.createElement("div");i.className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative",i.role="alert",i.innerHTML=` Error: Check your network connection and try again. `,r.replaceWith(i),a=!0}),a&&Ban(t,e)}function Ban(t,e){e.querySelectorAll(`#${t}`).forEach(a=>{a.remove()})}function h1e(t){if(!t)return null;const e=t.trim().toLowerCase();if(e.startsWith("#")){const a=e.slice(1),r=a.length===3?a.split("").map(i=>i+i).join(""):a;if(r.length===6){const i=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);return{r:i,g:o,b:s}}}const n=e.match(/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return n?{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10)}:null}function BH(t){const e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function f1e(t){if(!t)return null;const e=BH(t.r),n=BH(t.g),a=BH(t.b);return .2126*e+.7152*n+.0722*a}function Jje(t){if(!t)return console.log("[THEME DEBUG] getEffectiveBackgroundColor: No element provided"),null;const n=window.getComputedStyle(t).getPropertyValue("background-color");return console.log("[THEME DEBUG] getEffectiveBackgroundColor: Element:",t.tagName,"Background color:",n),!n||n==="transparent"||n==="rgba(0, 0, 0, 0)"?(console.log("[THEME DEBUG] getEffectiveBackgroundColor: Background is transparent, checking parent"),t.parentElement?Jje(t.parentElement):(console.log("[THEME DEBUG] getEffectiveBackgroundColor: No parent, defaulting to white"),"#ffffff")):(console.log("[THEME DEBUG] getEffectiveBackgroundColor: Returning:",n),n)}function EH(t){console.log("[THEME DEBUG] Starting theme detection...");let e=!1,n=!1;if(typeof window<"u"&&typeof window.SocratiqWidgetTheme=="string"){const u=window.SocratiqWidgetTheme.trim().toLowerCase();console.log("[THEME DEBUG] Forced theme detected:",u),(u==="dark"||u==="light")&&(e=u==="dark",n=!0)}if(!n){console.log("[THEME DEBUG] No forced theme, checking automatic detection...");const u=document.querySelector(".quarto-color-scheme-toggle");if(u&&u.classList.contains("alternate")&&(console.log("[THEME DEBUG] Quarto toggle button found with alternate class"),e=!0),!e){const d=document.body;console.log("[THEME DEBUG] Body classes:",d.className),d&&d.classList.contains("dark-mode")&&(console.log("[THEME DEBUG] Body has dark-mode class"),e=!0)}if(!e&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(console.log("[THEME DEBUG] System prefers dark color scheme"),e=!0),!e){const d=Jje(document.body);console.log("[THEME DEBUG] Computed background color:",d);const p=h1e(d);console.log("[THEME DEBUG] Parsed RGB:",p);const A=f1e(p);console.log("[THEME DEBUG] Calculated luminance:",A),typeof A=="number"&&A<.45&&(console.log("[THEME DEBUG] Low luminance detected, switching to dark mode"),e=!0)}if(!e){const p=window.getComputedStyle(document.body).getPropertyValue("color");console.log("[THEME DEBUG] Body text color:",p);const A=h1e(p);if(A){const m=f1e(A);console.log("[THEME DEBUG] Text luminance:",m),m>.6&&(console.log("[THEME DEBUG] Light text detected, assuming dark background"),e=!0)}}}console.log("[THEME DEBUG] Final isDarkMode:",e);const a=e?"dark":"light";console.log("[THEME DEBUG] Setting theme value to:",a);const r=t.host||t;if(r?.setAttribute){r.setAttribute("data-socratiq-theme",a),console.log("[THEME DEBUG] Set host element theme attribute:",r.getAttribute("data-socratiq-theme"));const u=window.getComputedStyle(r);console.log("[THEME DEBUG] Host computed styles:",{color:u.color,backgroundColor:u.backgroundColor,"--socratiq-text":u.getPropertyValue("--socratiq-text"),"--socratiq-bg":u.getPropertyValue("--socratiq-bg")})}const i=t.querySelector?.(".socratiq-widget-root");if(i?.setAttribute){i.setAttribute("data-socratiq-theme",a),console.log("[THEME DEBUG] Set widget root theme attribute:",i.getAttribute("data-socratiq-theme"));const u=window.getComputedStyle(i);console.log("[THEME DEBUG] Widget root computed styles:",{color:u.color,backgroundColor:u.backgroundColor,"--socratiq-text":u.getPropertyValue("--socratiq-text"),"--socratiq-bg":u.getPropertyValue("--socratiq-bg")})}const o=t.querySelector?.("#spacedRepetitionModal");if(o){const u=window.getComputedStyle(o);console.log("[THEME DEBUG] Modal computed styles:",{color:u.color,backgroundColor:u.backgroundColor,"--socratiq-text":u.getPropertyValue("--socratiq-text"),"--socratiq-bg":u.getPropertyValue("--socratiq-bg")})}function s(u){e?u.classList.add("dark-mode"):u.classList.remove("dark-mode")}["text-selection-menu","text-selection-menu-highlight","popover-container","modal1","modal_feedback","cardReviewModal"].forEach(u=>{const d=t.getElementById(u);if(d&&(s(d),d.querySelectorAll("*").forEach(s),u==="modal_feedback")){const p=d.querySelector("#feedback-iframe");if(p&&p.contentDocument){const A=p.contentDocument;s(A.documentElement),A.querySelectorAll("*").forEach(s)}}})}function Ean(t){console.log("[THEME DEBUG] trackColorScheme function called with shadowEle:",t),EH(t),new MutationObserver(n=>{for(const a of n)a.type==="attributes"&&a.attributeName==="class"&&EH(t)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{EH(t)})}class Qan{constructor(){this.storeName="quizTitles",this.dbManager=null}async initDB(){return this.dbManager||(this.dbManager=await Xr()),this.dbManager}async saveQuizTitles(e,n){try{const a=await this.initDB(),r={url:e,titles:n,timestamp:new Date().toISOString()};return await a.update(this.storeName,r)}catch(a){throw console.error("Error saving quiz titles:",a),a}}async getQuizTitles(e){try{return(await(await this.initDB()).getByKey(this.storeName,e))?.titles||null}catch(n){throw console.error("Error getting quiz titles:",n),n}}}class San{constructor(){this.STORE_NAME="chapterSummaries",this.recentSaves=new Map,this.DEBOUNCE_DELAY=2e3}generateSectionSummary(e){const r=Fa(e).terms().filter(l=>!l.isStopWord).out("array").map(l=>l.toLowerCase().trim()).filter(l=>l.length>0).map(l=>l.replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"")).filter(l=>l.length>0),i=[],o=10;for(let l=0;li-o).map(i=>e[i])}async saveSectionSummary(e,n,a){try{const r=`${e}-${n}`,i=this.recentSaves.get(r),o=Date.now();if(i&&o-i{this.recentSaves.delete(r)},this.DEBOUNCE_DELAY);const s=await Xr();if(!s)throw new Error("Database not initialized");const l=String(e);let u=await s.getByKey(this.STORE_NAME,l);u=u||{chapterId:l,sections:{},lastUpdated:new Date().toISOString(),url:window.location.href};const d=u.sections[n];if(d&&d.content===a.content)return;u.sections[n]={...a,summary:this.generateSectionSummary(a.content),lastUpdated:new Date().toISOString()},await s.update(this.STORE_NAME,u)}catch(r){throw console.error("Error in saveSectionSummary:",r),r}}async getChapterSummaries(e){try{const n=await Xr();if(!n)throw new Error("Database not initialized");return await n.getByKey(this.STORE_NAME,e)}catch(n){throw console.error("Error getting chapter summaries:",n),n}}}class Ian{constructor(){this.storage=new San}getChapterNumber(){const e=document.querySelector("h1 .chapter-number");return e?e.textContent.trim():null}async collectSectionData(e){const n=e.querySelector("h2.anchored");if(!n||n.textContent.trim().includes("Resources"))return null;const a=e.id,r=n.getAttribute("data-number"),i=n.textContent.trim(),o=e.textContent.trim();return{id:a,dataNumber:r,title:i,content:o}}async processCurrentPage(){const e=this.getChapterNumber();if(!e)return;const n=document.querySelectorAll("section.level2");for(const a of n){const r=await this.collectSectionData(a);r&&await this.storage.saveSectionSummary(e,r.id,r)}}}function Dan(t){const e=new Ian,n=window.location.href;if(!document.querySelector("h1 .chapter-number")||n.match(/^[^/]+\/?$/)||n.includes("about.html")||n.includes("acknowledgements.html")||n.includes("socratiq.html")||Fan(n))return;const r=document.querySelectorAll("section.level2");let i=[];const o=new Qan;window.sectionData||(window.sectionData={}),r.forEach((l,u)=>{const d=l.querySelector("h2.anchored");if(!d||d.textContent.trim().includes("Resources"))return;const p=l.textContent.trim(),A=l.id,m=d.getAttribute("data-number"),g=d.textContent.trim(),h=m+" "+g.replace(`${m} `,"");i.push(h),window.sectionData[A]={title:h,content:p},Ran(e,{section:l,sectionId:A,title:h,sectionText:p,dataNumber:m});const f=$an(h,p,A,t);l.appendChild(f)});const s=r[r.length-1];if(s){const l=Tan(i,t);s.insertAdjacentElement("afterend",l)}i.length>0&&(window.requestIdleCallback||(u=>setTimeout(u,0)))(()=>{o.saveQuizTitles(n,i).catch(u=>console.error("Error saving quiz titles:",u))})}function $an(t,e,n,a){const r=document.createElement("div");r.style.cssText=` margin-top: 0.5rem; display: flex; justify-content: flex-start; width: 100%; `;const i=document.createElement("div");i.className="callout callout-style-simple callout-exercise no-icon callout-titled",i.style.width="102%",i.innerHTML=`
    🧩
      Section Quiz
    `;const o=document.createElement("style");return o.textContent=` .callout-exercise.callout { cursor: pointer !important; transition: background-color 0.3s ease; margin-bottom: 0; width: 102%; border-left-color: #DC143C !important; } .callout-exercise.callout:hover { background-color: rgb(243, 244, 246) !important; cursor: pointer !important; } .callout-icon-container { display: flex; align-items: center; margin-right: 10px !important; font-size: 1.1em !important; } `,i.appendChild(o),i.dataset.sectionId=n,i.dataset.sectionText=e,i.addEventListener("click",s=>{s.stopPropagation(),eUe(t,e,n,a)}),r.appendChild(i),r}function Tan(t,e){const n=document.createElement("div");n.className="callout callout-style-simple callout-exercise no-icon callout-titled custom-quiz-callout";const a=document.createElement("style");return a.textContent=` .custom-quiz-callout.callout-exercise.callout { border-left-color: #DC143C !important; width: 102% !important; } .custom-quiz-callout.callout-exercise.callout > .callout-header::before { font-family: sans-serif !important; content: "🧩" !important; margin-right: 10px !important; display: inline-block !important; text-decoration: none !important; font-size: 1.1em !important; } .custom-quiz-callout.callout-exercise.callout > .callout-header { text-decoration: none !important; } `,n.appendChild(a),n.innerHTML+=`
    Sub Section Quick AI Quizzes
    `,n.querySelectorAll(".quiz-link").forEach(r=>{r.addEventListener("click",i=>{i.preventDefault();const o=parseInt(r.getAttribute("data-index"),10),s=t[o],l=Object.keys(window.sectionData)[o];if(l&&window.sectionData[l]){const u=window.sectionData[l].content;eUe(s,u,l,e)}else console.error("No matching section data found for index:",o)})}),n}function eUe(t,e,n,a){a?rz(a,!0):console.error("Shadow root not found");const r=Fqe(e,Rce);Pan(t,r,n)}function Pan(t,e,n){const a=new CustomEvent("aiActionCompleted",{detail:{type:"quiz",text:e,title:t,sectionId:n}});window.dispatchEvent(a)}function Fan(t){try{const e=new URL(t);return e.pathname==="/"||e.pathname===""}catch(e){return console.error("Invalid URL:",e),!1}}function Ran(t,e){(window.requestIdleCallback||(a=>setTimeout(a,0)))(async()=>{try{const a=t.getChapterNumber();if(!a)return;await t.storage.saveSectionSummary(a,e.sectionId,{id:e.sectionId,dataNumber:e.dataNumber,title:e.title,content:e.sectionText,url:window.location.href})}catch(a){console.error("Error in background collection:",a)}})}function Lan(t,e){if(!t||!e||e.length===0)return null;const n=t.match(/\d+/g);if(n&&n.length>0){const a=e.find(r=>{const i=r.title.match(/\d+/g);return i?n.some(o=>i.includes(o)):!1});if(a)return a}return Nan(t,e)}function Nan(t,e){if(!t||!e||e.length===0)return null;const n=t.toLowerCase().replace(/\d+/g,"").replace(/[^\w\s]/g,"").split(/\s+/).filter(i=>i.length>2&&!["the","and","or","of","in","on","at","to","for"].includes(i));let a=null,r=0;return e.forEach(i=>{const o=i.title.toLowerCase().replace(/\d+/g,"").replace(/[^\w\s]/g,"").split(/\s+/).filter(u=>u.length>2),l=n.filter(u=>o.includes(u)).length/Math.max(n.length,o.length);l>r&&l>.3&&(r=l,a=i)}),a}function Man(t,e,n=[],a=[]){if(!t||!e)return{pageUrl:t?.url||"",pageTitle:t?.title||"",passedQuizzes:0,totalAttempted:0,completionPercentage:0};const r=a.find(u=>{const d=u.normalizedUrl||u.originalUrl,p=t.url;if(d===p)return!0;try{const A=rle(p);return d===A}catch{return!1}});if(r&&r.completedByCumulativeQuiz)return{pageUrl:t.url,pageTitle:t.title,passedQuizzes:10,totalAttempted:1,completionPercentage:100,totalQuizzes:10,lastUpdated:t.lastUpdated,completedByCumulativeQuiz:!0,cumulativeQuizTitle:r.cumulativeQuizTitle,cumulativeScore:r.lastQuizScore?.percentage||0};const i=n.find(u=>u.pageUrl===t.url);if(i&&i.completedByCumulativeQuiz)return{pageUrl:t.url,pageTitle:t.title,passedQuizzes:10,totalAttempted:1,completionPercentage:100,totalQuizzes:10,lastUpdated:t.lastUpdated,completedByCumulativeQuiz:!0,cumulativeQuizTitle:i.cumulativeQuizTitle};let o={passedQuizzes:0,totalAttempted:0};if(r&&r.quizHistory){const u=r.quizHistory.filter(d=>d.quizType==="section");o.totalAttempted=u.length,o.passedQuizzes=u.filter(d=>d.score.passed).length}else{const u=e.filter(d=>{const p=Lan(d.quizTitle,[t]);return p&&p.url===t.url&&!d.isCumulative});o.totalAttempted=u.length,o.passedQuizzes=u.filter(d=>parseFloat(d.percentageScore)>=60).length}const s=10,l=Math.min(o.passedQuizzes/s*100,100);return{pageUrl:t.url,pageTitle:t.title,passedQuizzes:o.passedQuizzes,totalAttempted:o.totalAttempted,completionPercentage:l,totalQuizzes:s,lastUpdated:t.lastUpdated,completedByCumulativeQuiz:!1,hasSectionQuizzes:o.totalAttempted>0,hasCumulativeQuiz:r&&r.quizHistory&&r.quizHistory.some(u=>u.quizType==="cumulative")}}function rle(t){try{const e=new URL(t);return`${e.protocol}//${e.host}${e.pathname}`.replace(/\/$/,"")}catch(e){return console.warn("Error normalizing URL for cumulative quiz:",e),t}}async function ile(){try{const t=await Lb();if(!t||t.length===0)return console.warn("No chapterMap entries found"),[];const a=t.filter(r=>![/index\.html?$/i,/table.of.contents/i,/toc/i,/preface/i,/introduction/i].some(o=>o.test(r.url)||o.test(r.title))).sort((r,i)=>{const o=r.title.match(/\d+/g),s=i.title.match(/\d+/g);return o&&s?parseInt(o[0])-parseInt(s[0]):r.title.localeCompare(i.title)}).map((r,i)=>({chapter:i+1,title:r.title,url:r.url,originalPage:r,quizzesTaken:0,totalQuizzes:10,passedQuizzes:0}));return console.log(`📚 Generated ${a.length} chapters from chapterMap data`),a}catch(t){return console.error("Error getting chapters from chapterMap:",t),[]}}async function b3(){try{const t=await Xr();if(!t)throw new Error("Database not available");const[e,n,a,r]=await Promise.all([t.getAll("quizHighScores"),Lb(),t.getAll("pageCompletions").catch(()=>[]),t.getAll("cumulativeQuizScores").catch(()=>[])]),i=new Map;return n.forEach(o=>{const s=Man(o,e,a,r);i.set(o.url,{passedQuizzes:s.passedQuizzes,totalAttempted:s.totalAttempted,completionPercentage:s.completionPercentage,pageTitle:s.pageTitle,pageUrl:s.pageUrl,completedByCumulativeQuiz:s.completedByCumulativeQuiz,cumulativeQuizTitle:s.cumulativeQuizTitle,cumulativeScore:s.cumulativeScore})}),console.log(`📊 Calculated progress for ${i.size} pages from chapterMap`),console.log(`🎯 Found ${a.length} page completions from old system`),console.log(`🎯 Found ${r.length} cumulative quiz records`),i}catch(t){return console.error("Error getting chapter progress from chapterMap:",t),new Map}}async function zan(){try{const t=await b3();return t.size>0?(console.log("✅ Using chapterMap-based progress system"),t):(console.warn("⚠️ chapterMap is empty, falling back to old chapter system"),await b1e())}catch(t){return console.error("Error in getChapterProgress:",t),await b1e()}}async function b1e(){try{const e=await(await Xr()).getAll("quizHighScores"),n=new Map;return e.forEach(a=>{const r=a.quizTitle.match(/^(\d+)\./);if(r){const i=parseInt(r[1]),o=parseFloat(a.percentageScore)>=60;n.has(i)||n.set(i,{passedQuizzes:0,totalAttempted:0});const s=n.get(i);s.totalAttempted++,o&&s.passedQuizzes++}}),n}catch(t){return console.error("Error in legacy chapter progress:",t),new Map}}async function ole(){try{const[t,e]=await Promise.all([ile(),b3()]);return t.map(a=>{const r=e.get(a.url);return{...a,quizzesTaken:r?.totalAttempted||0,passedQuizzes:r?.passedQuizzes||0,completionPercentage:r?.completionPercentage||0}})}catch(t){return console.error("Error getting dashboard chapter data:",t),[]}}async function tUe(){console.log("🧪 Testing chapterMap integration...");try{const t=await Lb(),e=await ile(),n=await b3(),a=await ole(),r={success:!0,chapterMapEntries:t.length,chapters:e.length,progressEntries:n.size,dashboardData:a.length,sampleData:{firstChapter:e[0],firstProgress:n.values().next().value,firstDashboard:a[0]}};return console.log("✅ ChapterMap integration test results:",r),r}catch(t){return console.error("❌ ChapterMap integration test failed:",t),{success:!1,error:t.message}}}async function nUe(){console.log("🧪 Testing cumulative quiz progress tracking...");try{const t=await Xr(),e=Array.from(t.db.objectStoreNames),n=e.includes("pageCompletions"),a=e.includes("cumulativeQuizScores"),r=n?await t.getAll("pageCompletions"):[],i=a?await t.getAll("cumulativeQuizScores"):[],s=(await t.getAll("quizStats")).filter(h=>h.isCumulative),l={totalPages:i.length,pagesWithCumulativeQuizzes:i.filter(h=>h.completedByCumulativeQuiz).length,pagesWithSectionQuizzes:i.filter(h=>h.quizHistory&&h.quizHistory.some(f=>f.quizType==="section")).length,totalQuizAttempts:i.reduce((h,f)=>h+(f.quizHistory?f.quizHistory.length:0),0)},u=await b3(),d=Array.from(u.values()).filter(h=>h.completedByCumulativeQuiz),p=Array.from(u.values()).filter(h=>h.hasSectionQuizzes),A=["http://localhost:3000/page.html?scroll=100","http://localhost:3000/page.html#section1","http://localhost:3000/page/"],m=A.map(h=>rle(h)),g={success:!0,stores:{hasPageCompletionsStore:n,hasCumulativeQuizScoresStore:a,allStores:e},data:{pageCompletionsCount:r.length,enhancedQuizScoresCount:i.length,cumulativeQuizzesCount:s.length,completedPagesCount:d.length,pagesWithSectionQuizzesCount:p.length},enhancedStats:l,urlNormalization:{testUrls:A,normalizedUrls:m},samples:{pageCompletions:r.slice(0,2),enhancedQuizScores:i.slice(0,2),cumulativeQuizzes:s.slice(0,2),completedPages:d.slice(0,2),pagesWithSectionQuizzes:p.slice(0,2)}};return console.log("✅ Cumulative quiz progress test results:",g),g}catch(t){return console.error("❌ Cumulative quiz progress test failed:",t),{success:!1,error:t.message}}}typeof window<"u"&&(window.testChapterMapIntegration=tUe,window.testCumulativeQuizProgress=nUe,window.normalizeUrlForCumulativeQuiz=rle);const aUe=Object.freeze(Object.defineProperty({__proto__:null,getChapterProgress:zan,getChapterProgressFromChapterMap:b3,getChaptersFromChapterMap:ile,getDashboardChapterData:ole,testChapterMapIntegration:tUe,testCumulativeQuizProgress:nUe},Symbol.toStringTag,{value:"Module"}));var rUe={exports:{}};function qan(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var QH={exports:{}};const jan={},Uan=Object.freeze(Object.defineProperty({__proto__:null,default:jan},Symbol.toStringTag,{value:"Module"})),Gan=m$e(Uan);var y1e;function Sr(){return y1e||(y1e=1,function(t,e){(function(n,a){t.exports=a()})(la,function(){var n=n||function(a,r){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof la<"u"&&la.crypto&&(i=la.crypto),!i&&typeof qan=="function")try{i=Gan}catch{}var o=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(w){var v;return y.prototype=w,v=new y,y.prototype=null,v}}(),l={},u=l.lib={},d=u.Base=function(){return{extend:function(y){var w=s(this);return y&&w.mixIn(y),(!w.hasOwnProperty("init")||this.init===w.init)&&(w.init=function(){w.$super.init.apply(this,arguments)}),w.init.prototype=w,w.$super=this,w},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var w in y)y.hasOwnProperty(w)&&(this[w]=y[w]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=u.WordArray=d.extend({init:function(y,w){y=this.words=y||[],w!=r?this.sigBytes=w:this.sigBytes=y.length*4},toString:function(y){return(y||m).stringify(this)},concat:function(y){var w=this.words,v=y.words,k=this.sigBytes,_=y.sigBytes;if(this.clamp(),k%4)for(var x=0;x<_;x++){var C=v[x>>>2]>>>24-x%4*8&255;w[k+x>>>2]|=C<<24-(k+x)%4*8}else for(var B=0;B<_;B+=4)w[k+B>>>2]=v[B>>>2];return this.sigBytes+=_,this},clamp:function(){var y=this.words,w=this.sigBytes;y[w>>>2]&=4294967295<<32-w%4*8,y.length=a.ceil(w/4)},clone:function(){var y=d.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var w=[],v=0;v>>2]>>>24-_%4*8&255;k.push((x>>>4).toString(16)),k.push((x&15).toString(16))}return k.join("")},parse:function(y){for(var w=y.length,v=[],k=0;k>>3]|=parseInt(y.substr(k,2),16)<<24-k%8*4;return new p.init(v,w/2)}},g=A.Latin1={stringify:function(y){for(var w=y.words,v=y.sigBytes,k=[],_=0;_>>2]>>>24-_%4*8&255;k.push(String.fromCharCode(x))}return k.join("")},parse:function(y){for(var w=y.length,v=[],k=0;k>>2]|=(y.charCodeAt(k)&255)<<24-k%4*8;return new p.init(v,w)}},h=A.Utf8={stringify:function(y){try{return decodeURIComponent(escape(g.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return g.parse(unescape(encodeURIComponent(y)))}},f=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=h.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var w,v=this._data,k=v.words,_=v.sigBytes,x=this.blockSize,C=x*4,B=_/C;y?B=a.ceil(B):B=a.max((B|0)-this._minBufferSize,0);var I=B*x,E=a.min(I*4,_);if(I){for(var S=0;S>>2]|=l[p]<<24-p%4*8;o.call(this,d,u)}else o.apply(this,arguments)};s.prototype=i}}(),n.lib.WordArray})}(IH)),IH.exports}var DH={exports:{}},k1e;function Wan(){return k1e||(k1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){return function(){var a=n,r=a.lib,i=r.WordArray,o=a.enc;o.Utf16=o.Utf16BE={stringify:function(l){for(var u=l.words,d=l.sigBytes,p=[],A=0;A>>2]>>>16-A%4*8&65535;p.push(String.fromCharCode(m))}return p.join("")},parse:function(l){for(var u=l.length,d=[],p=0;p>>1]|=l.charCodeAt(p)<<16-p%2*16;return i.create(d,u*2)}},o.Utf16LE={stringify:function(l){for(var u=l.words,d=l.sigBytes,p=[],A=0;A>>2]>>>16-A%4*8&65535);p.push(String.fromCharCode(m))}return p.join("")},parse:function(l){for(var u=l.length,d=[],p=0;p>>1]|=s(l.charCodeAt(p)<<16-p%2*16);return i.create(d,u*2)}};function s(l){return l<<8&4278255360|l>>>8&16711935}}(),n.enc.Utf16})}(DH)),DH.exports}var $H={exports:{}},x1e;function Fx(){return x1e||(x1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){return function(){var a=n,r=a.lib,i=r.WordArray,o=a.enc;o.Base64={stringify:function(l){var u=l.words,d=l.sigBytes,p=this._map;l.clamp();for(var A=[],m=0;m>>2]>>>24-m%4*8&255,h=u[m+1>>>2]>>>24-(m+1)%4*8&255,f=u[m+2>>>2]>>>24-(m+2)%4*8&255,b=g<<16|h<<8|f,y=0;y<4&&m+y*.75>>6*(3-y)&63));var w=p.charAt(64);if(w)for(;A.length%4;)A.push(w);return A.join("")},parse:function(l){var u=l.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var A=0;A>>6-m%4*2,f=g|h;p[A>>>2]|=f<<24-A%4*8,A++}return i.create(p,A)}}(),n.enc.Base64})}($H)),$H.exports}var TH={exports:{}},O1e;function Yan(){return O1e||(O1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){return function(){var a=n,r=a.lib,i=r.WordArray,o=a.enc;o.Base64url={stringify:function(l,u){u===void 0&&(u=!0);var d=l.words,p=l.sigBytes,A=u?this._safe_map:this._map;l.clamp();for(var m=[],g=0;g>>2]>>>24-g%4*8&255,f=d[g+1>>>2]>>>24-(g+1)%4*8&255,b=d[g+2>>>2]>>>24-(g+2)%4*8&255,y=h<<16|f<<8|b,w=0;w<4&&g+w*.75>>6*(3-w)&63));var v=A.charAt(64);if(v)for(;m.length%4;)m.push(v);return m.join("")},parse:function(l,u){u===void 0&&(u=!0);var d=l.length,p=u?this._safe_map:this._map,A=this._reverseMap;if(!A){A=this._reverseMap=[];for(var m=0;m>>6-m%4*2,f=g|h;p[A>>>2]|=f<<24-A%4*8,A++}return i.create(p,A)}}(),n.enc.Base64url})}(TH)),TH.exports}var PH={exports:{}},C1e;function Rx(){return C1e||(C1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){return function(a){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,l=r.algo,u=[];(function(){for(var h=0;h<64;h++)u[h]=a.abs(a.sin(h+1))*4294967296|0})();var d=l.MD5=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,f){for(var b=0;b<16;b++){var y=f+b,w=h[y];h[y]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var v=this._hash.words,k=h[f+0],_=h[f+1],x=h[f+2],C=h[f+3],B=h[f+4],I=h[f+5],E=h[f+6],S=h[f+7],P=h[f+8],O=h[f+9],T=h[f+10],D=h[f+11],$=h[f+12],F=h[f+13],L=h[f+14],q=h[f+15],M=v[0],R=v[1],j=v[2],W=v[3];M=p(M,R,j,W,k,7,u[0]),W=p(W,M,R,j,_,12,u[1]),j=p(j,W,M,R,x,17,u[2]),R=p(R,j,W,M,C,22,u[3]),M=p(M,R,j,W,B,7,u[4]),W=p(W,M,R,j,I,12,u[5]),j=p(j,W,M,R,E,17,u[6]),R=p(R,j,W,M,S,22,u[7]),M=p(M,R,j,W,P,7,u[8]),W=p(W,M,R,j,O,12,u[9]),j=p(j,W,M,R,T,17,u[10]),R=p(R,j,W,M,D,22,u[11]),M=p(M,R,j,W,$,7,u[12]),W=p(W,M,R,j,F,12,u[13]),j=p(j,W,M,R,L,17,u[14]),R=p(R,j,W,M,q,22,u[15]),M=A(M,R,j,W,_,5,u[16]),W=A(W,M,R,j,E,9,u[17]),j=A(j,W,M,R,D,14,u[18]),R=A(R,j,W,M,k,20,u[19]),M=A(M,R,j,W,I,5,u[20]),W=A(W,M,R,j,T,9,u[21]),j=A(j,W,M,R,q,14,u[22]),R=A(R,j,W,M,B,20,u[23]),M=A(M,R,j,W,O,5,u[24]),W=A(W,M,R,j,L,9,u[25]),j=A(j,W,M,R,C,14,u[26]),R=A(R,j,W,M,P,20,u[27]),M=A(M,R,j,W,F,5,u[28]),W=A(W,M,R,j,x,9,u[29]),j=A(j,W,M,R,S,14,u[30]),R=A(R,j,W,M,$,20,u[31]),M=m(M,R,j,W,I,4,u[32]),W=m(W,M,R,j,P,11,u[33]),j=m(j,W,M,R,D,16,u[34]),R=m(R,j,W,M,L,23,u[35]),M=m(M,R,j,W,_,4,u[36]),W=m(W,M,R,j,B,11,u[37]),j=m(j,W,M,R,S,16,u[38]),R=m(R,j,W,M,T,23,u[39]),M=m(M,R,j,W,F,4,u[40]),W=m(W,M,R,j,k,11,u[41]),j=m(j,W,M,R,C,16,u[42]),R=m(R,j,W,M,E,23,u[43]),M=m(M,R,j,W,O,4,u[44]),W=m(W,M,R,j,$,11,u[45]),j=m(j,W,M,R,q,16,u[46]),R=m(R,j,W,M,x,23,u[47]),M=g(M,R,j,W,k,6,u[48]),W=g(W,M,R,j,S,10,u[49]),j=g(j,W,M,R,L,15,u[50]),R=g(R,j,W,M,I,21,u[51]),M=g(M,R,j,W,$,6,u[52]),W=g(W,M,R,j,C,10,u[53]),j=g(j,W,M,R,T,15,u[54]),R=g(R,j,W,M,_,21,u[55]),M=g(M,R,j,W,P,6,u[56]),W=g(W,M,R,j,q,10,u[57]),j=g(j,W,M,R,E,15,u[58]),R=g(R,j,W,M,F,21,u[59]),M=g(M,R,j,W,B,6,u[60]),W=g(W,M,R,j,D,10,u[61]),j=g(j,W,M,R,x,15,u[62]),R=g(R,j,W,M,O,21,u[63]),v[0]=v[0]+M|0,v[1]=v[1]+R|0,v[2]=v[2]+j|0,v[3]=v[3]+W|0},_doFinalize:function(){var h=this._data,f=h.words,b=this._nDataBytes*8,y=h.sigBytes*8;f[y>>>5]|=128<<24-y%32;var w=a.floor(b/4294967296),v=b;f[(y+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,f[(y+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,h.sigBytes=(f.length+1)*4,this._process();for(var k=this._hash,_=k.words,x=0;x<4;x++){var C=_[x];_[x]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return k},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});function p(h,f,b,y,w,v,k){var _=h+(f&b|~f&y)+w+k;return(_<>>32-v)+f}function A(h,f,b,y,w,v,k){var _=h+(f&y|b&~y)+w+k;return(_<>>32-v)+f}function m(h,f,b,y,w,v,k){var _=h+(f^b^y)+w+k;return(_<>>32-v)+f}function g(h,f,b,y,w,v,k){var _=h+(b^(f|~y))+w+k;return(_<>>32-v)+f}r.MD5=s._createHelper(d),r.HmacMD5=s._createHmacHelper(d)}(Math),n.MD5})}(PH)),PH.exports}var FH={exports:{}},_1e;function iUe(){return _1e||(_1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){return function(){var a=n,r=a.lib,i=r.WordArray,o=r.Hasher,s=a.algo,l=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,p){for(var A=this._hash.words,m=A[0],g=A[1],h=A[2],f=A[3],b=A[4],y=0;y<80;y++){if(y<16)l[y]=d[p+y]|0;else{var w=l[y-3]^l[y-8]^l[y-14]^l[y-16];l[y]=w<<1|w>>>31}var v=(m<<5|m>>>27)+b+l[y];y<20?v+=(g&h|~g&f)+1518500249:y<40?v+=(g^h^f)+1859775393:y<60?v+=(g&h|g&f|h&f)-1894007588:v+=(g^h^f)-899497514,b=f,f=h,h=g<<30|g>>>2,g=m,m=v}A[0]=A[0]+m|0,A[1]=A[1]+g|0,A[2]=A[2]+h|0,A[3]=A[3]+f|0,A[4]=A[4]+b|0},_doFinalize:function(){var d=this._data,p=d.words,A=this._nDataBytes*8,m=d.sigBytes*8;return p[m>>>5]|=128<<24-m%32,p[(m+64>>>9<<4)+14]=Math.floor(A/4294967296),p[(m+64>>>9<<4)+15]=A,d.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d}});a.SHA1=o._createHelper(u),a.HmacSHA1=o._createHmacHelper(u)}(),n.SHA1})}(FH)),FH.exports}var RH={exports:{}},B1e;function sle(){return B1e||(B1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){return function(a){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,l=r.algo,u=[],d=[];(function(){function m(b){for(var y=a.sqrt(b),w=2;w<=y;w++)if(!(b%w))return!1;return!0}function g(b){return(b-(b|0))*4294967296|0}for(var h=2,f=0;f<64;)m(h)&&(f<8&&(u[f]=g(a.pow(h,1/2))),d[f]=g(a.pow(h,1/3)),f++),h++})();var p=[],A=l.SHA256=s.extend({_doReset:function(){this._hash=new o.init(u.slice(0))},_doProcessBlock:function(m,g){for(var h=this._hash.words,f=h[0],b=h[1],y=h[2],w=h[3],v=h[4],k=h[5],_=h[6],x=h[7],C=0;C<64;C++){if(C<16)p[C]=m[g+C]|0;else{var B=p[C-15],I=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,E=p[C-2],S=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;p[C]=I+p[C-7]+S+p[C-16]}var P=v&k^~v&_,O=f&b^f&y^b&y,T=(f<<30|f>>>2)^(f<<19|f>>>13)^(f<<10|f>>>22),D=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),$=x+D+P+d[C]+p[C],F=T+O;x=_,_=k,k=v,v=w+$|0,w=y,y=b,b=f,f=$+F|0}h[0]=h[0]+f|0,h[1]=h[1]+b|0,h[2]=h[2]+y|0,h[3]=h[3]+w|0,h[4]=h[4]+v|0,h[5]=h[5]+k|0,h[6]=h[6]+_|0,h[7]=h[7]+x|0},_doFinalize:function(){var m=this._data,g=m.words,h=this._nDataBytes*8,f=m.sigBytes*8;return g[f>>>5]|=128<<24-f%32,g[(f+64>>>9<<4)+14]=a.floor(h/4294967296),g[(f+64>>>9<<4)+15]=h,m.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});r.SHA256=s._createHelper(A),r.HmacSHA256=s._createHmacHelper(A)}(Math),n.SHA256})}(RH)),RH.exports}var LH={exports:{}},E1e;function Xan(){return E1e||(E1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sle())})(la,function(n){return function(){var a=n,r=a.lib,i=r.WordArray,o=a.algo,s=o.SHA256,l=o.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=s._doFinalize.call(this);return u.sigBytes-=4,u}});a.SHA224=s._createHelper(l),a.HmacSHA224=s._createHmacHelper(l)}(),n.SHA224})}(LH)),LH.exports}var NH={exports:{}},Q1e;function oUe(){return Q1e||(Q1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),lz())})(la,function(n){return function(){var a=n,r=a.lib,i=r.Hasher,o=a.x64,s=o.Word,l=o.WordArray,u=a.algo;function d(){return s.create.apply(s,arguments)}var p=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],A=[];(function(){for(var g=0;g<80;g++)A[g]=d()})();var m=u.SHA512=i.extend({_doReset:function(){this._hash=new l.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(g,h){for(var f=this._hash.words,b=f[0],y=f[1],w=f[2],v=f[3],k=f[4],_=f[5],x=f[6],C=f[7],B=b.high,I=b.low,E=y.high,S=y.low,P=w.high,O=w.low,T=v.high,D=v.low,$=k.high,F=k.low,L=_.high,q=_.low,M=x.high,R=x.low,j=C.high,W=C.low,G=B,X=I,ne=E,oe=S,ee=P,he=O,le=T,me=D,be=$,ce=F,fe=L,Z=q,ze=M,ae=R,qe=j,Oe=W,nt=0;nt<80;nt++){var et,lt,Ge=A[nt];if(nt<16)lt=Ge.high=g[h+nt*2]|0,et=Ge.low=g[h+nt*2+1]|0;else{var at=A[nt-15],Pe=at.high,de=at.low,$e=(Pe>>>1|de<<31)^(Pe>>>8|de<<24)^Pe>>>7,we=(de>>>1|Pe<<31)^(de>>>8|Pe<<24)^(de>>>7|Pe<<25),Ie=A[nt-2],ie=Ie.high,Ne=Ie.low,se=(ie>>>19|Ne<<13)^(ie<<3|Ne>>>29)^ie>>>6,De=(Ne>>>19|ie<<13)^(Ne<<3|ie>>>29)^(Ne>>>6|ie<<26),Se=A[nt-7],Ve=Se.high,je=Se.low,Ze=A[nt-16],At=Ze.high,Xe=Ze.low;et=we+je,lt=$e+Ve+(et>>>0>>0?1:0),et=et+De,lt=lt+se+(et>>>0>>0?1:0),et=et+Xe,lt=lt+At+(et>>>0>>0?1:0),Ge.high=lt,Ge.low=et}var ht=be&fe^~be&ze,Rt=ce&Z^~ce&ae,zt=G&ne^G&ee^ne&ee,Ct=X&oe^X&he^oe&he,Ht=(G>>>28|X<<4)^(G<<30|X>>>2)^(G<<25|X>>>7),Qt=(X>>>28|G<<4)^(X<<30|G>>>2)^(X<<25|G>>>7),Gt=(be>>>14|ce<<18)^(be>>>18|ce<<14)^(be<<23|ce>>>9),cn=(ce>>>14|be<<18)^(ce>>>18|be<<14)^(ce<<23|be>>>9),tn=p[nt],ft=tn.high,vn=tn.low,It=Oe+cn,Nt=qe+Gt+(It>>>0>>0?1:0),It=It+Rt,Nt=Nt+ht+(It>>>0>>0?1:0),It=It+vn,Nt=Nt+ft+(It>>>0>>0?1:0),It=It+et,Nt=Nt+lt+(It>>>0>>0?1:0),dn=Qt+Ct,jt=Ht+zt+(dn>>>0>>0?1:0);qe=ze,Oe=ae,ze=fe,ae=Z,fe=be,Z=ce,ce=me+It|0,be=le+Nt+(ce>>>0>>0?1:0)|0,le=ee,me=he,ee=ne,he=oe,ne=G,oe=X,X=It+dn|0,G=Nt+jt+(X>>>0>>0?1:0)|0}I=b.low=I+X,b.high=B+G+(I>>>0>>0?1:0),S=y.low=S+oe,y.high=E+ne+(S>>>0>>0?1:0),O=w.low=O+he,w.high=P+ee+(O>>>0>>0?1:0),D=v.low=D+me,v.high=T+le+(D>>>0>>0?1:0),F=k.low=F+ce,k.high=$+be+(F>>>0>>0?1:0),q=_.low=q+Z,_.high=L+fe+(q>>>0>>0?1:0),R=x.low=R+ae,x.high=M+ze+(R>>>0>>0?1:0),W=C.low=W+Oe,C.high=j+qe+(W>>>0>>0?1:0)},_doFinalize:function(){var g=this._data,h=g.words,f=this._nDataBytes*8,b=g.sigBytes*8;h[b>>>5]|=128<<24-b%32,h[(b+128>>>10<<5)+30]=Math.floor(f/4294967296),h[(b+128>>>10<<5)+31]=f,g.sigBytes=h.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var g=i.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});a.SHA512=i._createHelper(m),a.HmacSHA512=i._createHmacHelper(m)}(),n.SHA512})}(NH)),NH.exports}var MH={exports:{}},S1e;function Van(){return S1e||(S1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),lz(),oUe())})(la,function(n){return function(){var a=n,r=a.x64,i=r.Word,o=r.WordArray,s=a.algo,l=s.SHA512,u=s.SHA384=l.extend({_doReset:function(){this._hash=new o.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var d=l._doFinalize.call(this);return d.sigBytes-=16,d}});a.SHA384=l._createHelper(u),a.HmacSHA384=l._createHmacHelper(u)}(),n.SHA384})}(MH)),MH.exports}var zH={exports:{}},I1e;function Zan(){return I1e||(I1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),lz())})(la,function(n){return function(a){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,l=r.x64,u=l.Word,d=r.algo,p=[],A=[],m=[];(function(){for(var f=1,b=0,y=0;y<24;y++){p[f+5*b]=(y+1)*(y+2)/2%64;var w=b%5,v=(2*f+3*b)%5;f=w,b=v}for(var f=0;f<5;f++)for(var b=0;b<5;b++)A[f+5*b]=b+(2*f+3*b)%5*5;for(var k=1,_=0;_<24;_++){for(var x=0,C=0,B=0;B<7;B++){if(k&1){var I=(1<>>24)&16711935|(k<<24|k>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var x=y[v];x.high^=_,x.low^=k}for(var C=0;C<24;C++){for(var B=0;B<5;B++){for(var I=0,E=0,S=0;S<5;S++){var x=y[B+5*S];I^=x.high,E^=x.low}var P=g[B];P.high=I,P.low=E}for(var B=0;B<5;B++)for(var O=g[(B+4)%5],T=g[(B+1)%5],D=T.high,$=T.low,I=O.high^(D<<1|$>>>31),E=O.low^($<<1|D>>>31),S=0;S<5;S++){var x=y[B+5*S];x.high^=I,x.low^=E}for(var F=1;F<25;F++){var I,E,x=y[F],L=x.high,q=x.low,M=p[F];M<32?(I=L<>>32-M,E=q<>>32-M):(I=q<>>64-M,E=L<>>64-M);var R=g[A[F]];R.high=I,R.low=E}var j=g[0],W=y[0];j.high=W.high,j.low=W.low;for(var B=0;B<5;B++)for(var S=0;S<5;S++){var F=B+5*S,x=y[F],G=g[F],X=g[(B+1)%5+5*S],ne=g[(B+2)%5+5*S];x.high=G.high^~X.high&ne.high,x.low=G.low^~X.low&ne.low}var x=y[0],oe=m[C];x.high^=oe.high,x.low^=oe.low}},_doFinalize:function(){var f=this._data,b=f.words;this._nDataBytes*8;var y=f.sigBytes*8,w=this.blockSize*32;b[y>>>5]|=1<<24-y%32,b[(a.ceil((y+1)/w)*w>>>5)-1]|=128,f.sigBytes=b.length*4,this._process();for(var v=this._state,k=this.cfg.outputLength/8,_=k/8,x=[],C=0;C<_;C++){var B=v[C],I=B.high,E=B.low;I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,x.push(E),x.push(I)}return new o.init(x,k)},clone:function(){for(var f=s.clone.call(this),b=f._state=this._state.slice(0),y=0;y<25;y++)b[y]=b[y].clone();return f}});r.SHA3=s._createHelper(h),r.HmacSHA3=s._createHmacHelper(h)}(Math),n.SHA3})}(zH)),zH.exports}var qH={exports:{}},D1e;function Kan(){return D1e||(D1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */return function(a){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,l=r.algo,u=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),m=o.create([0,1518500249,1859775393,2400959708,2840853838]),g=o.create([1352829926,1548603684,1836072691,2053994217,0]),h=l.RIPEMD160=s.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(_,x){for(var C=0;C<16;C++){var B=x+C,I=_[B];_[B]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}var E=this._hash.words,S=m.words,P=g.words,O=u.words,T=d.words,D=p.words,$=A.words,F,L,q,M,R,j,W,G,X,ne;j=F=E[0],W=L=E[1],G=q=E[2],X=M=E[3],ne=R=E[4];for(var oe,C=0;C<80;C+=1)oe=F+_[x+O[C]]|0,C<16?oe+=f(L,q,M)+S[0]:C<32?oe+=b(L,q,M)+S[1]:C<48?oe+=y(L,q,M)+S[2]:C<64?oe+=w(L,q,M)+S[3]:oe+=v(L,q,M)+S[4],oe=oe|0,oe=k(oe,D[C]),oe=oe+R|0,F=R,R=M,M=k(q,10),q=L,L=oe,oe=j+_[x+T[C]]|0,C<16?oe+=v(W,G,X)+P[0]:C<32?oe+=w(W,G,X)+P[1]:C<48?oe+=y(W,G,X)+P[2]:C<64?oe+=b(W,G,X)+P[3]:oe+=f(W,G,X)+P[4],oe=oe|0,oe=k(oe,$[C]),oe=oe+ne|0,j=ne,ne=X,X=k(G,10),G=W,W=oe;oe=E[1]+q+X|0,E[1]=E[2]+M+ne|0,E[2]=E[3]+R+j|0,E[3]=E[4]+F+W|0,E[4]=E[0]+L+G|0,E[0]=oe},_doFinalize:function(){var _=this._data,x=_.words,C=this._nDataBytes*8,B=_.sigBytes*8;x[B>>>5]|=128<<24-B%32,x[(B+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,_.sigBytes=(x.length+1)*4,this._process();for(var I=this._hash,E=I.words,S=0;S<5;S++){var P=E[S];E[S]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return I},clone:function(){var _=s.clone.call(this);return _._hash=this._hash.clone(),_}});function f(_,x,C){return _^x^C}function b(_,x,C){return _&x|~_&C}function y(_,x,C){return(_|~x)^C}function w(_,x,C){return _&C|x&~C}function v(_,x,C){return _^(x|~C)}function k(_,x){return _<>>32-x}r.RIPEMD160=s._createHelper(h),r.HmacRIPEMD160=s._createHmacHelper(h)}(),n.RIPEMD160})}(qH)),qH.exports}var jH={exports:{}},$1e;function cle(){return $1e||($1e=1,function(t,e){(function(n,a){t.exports=a(Sr())})(la,function(n){(function(){var a=n,r=a.lib,i=r.Base,o=a.enc,s=o.Utf8,l=a.algo;l.HMAC=i.extend({init:function(u,d){u=this._hasher=new u.init,typeof d=="string"&&(d=s.parse(d));var p=u.blockSize,A=p*4;d.sigBytes>A&&(d=u.finalize(d)),d.clamp();for(var m=this._oKey=d.clone(),g=this._iKey=d.clone(),h=m.words,f=g.words,b=0;b>>2]&255;I.sigBytes-=E}};i.BlockCipher=m.extend({cfg:m.cfg.extend({mode:f,padding:y}),reset:function(){var I;m.reset.call(this);var E=this.cfg,S=E.iv,P=E.mode;this._xformMode==this._ENC_XFORM_MODE?I=P.createEncryptor:(I=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==I?this._mode.init(this,S&&S.words):(this._mode=I.call(P,this,S&&S.words),this._mode.__creator=I)},_doProcessBlock:function(I,E){this._mode.processBlock(I,E)},_doFinalize:function(){var I,E=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(E.pad(this._data,this.blockSize),I=this._process(!0)):(I=this._process(!0),E.unpad(I)),I},blockSize:128/32});var w=i.CipherParams=o.extend({init:function(I){this.mixIn(I)},toString:function(I){return(I||this.formatter).stringify(this)}}),v=r.format={},k=v.OpenSSL={stringify:function(I){var E,S=I.ciphertext,P=I.salt;return P?E=s.create([1398893684,1701076831]).concat(P).concat(S):E=S,E.toString(d)},parse:function(I){var E,S=d.parse(I),P=S.words;return P[0]==1398893684&&P[1]==1701076831&&(E=s.create(P.slice(2,4)),P.splice(0,4),S.sigBytes-=16),w.create({ciphertext:S,salt:E})}},_=i.SerializableCipher=o.extend({cfg:o.extend({format:k}),encrypt:function(I,E,S,P){P=this.cfg.extend(P);var O=I.createEncryptor(S,P),T=O.finalize(E),D=O.cfg;return w.create({ciphertext:T,key:S,iv:D.iv,algorithm:I,mode:D.mode,padding:D.padding,blockSize:I.blockSize,formatter:P.format})},decrypt:function(I,E,S,P){P=this.cfg.extend(P),E=this._parse(E,P.format);var O=I.createDecryptor(S,P).finalize(E.ciphertext);return O},_parse:function(I,E){return typeof I=="string"?E.parse(I,this):I}}),x=r.kdf={},C=x.OpenSSL={execute:function(I,E,S,P,O){if(P||(P=s.random(64/8)),O)var T=A.create({keySize:E+S,hasher:O}).compute(I,P);else var T=A.create({keySize:E+S}).compute(I,P);var D=s.create(T.words.slice(E),S*4);return T.sigBytes=E*4,w.create({key:T,iv:D,salt:P})}},B=i.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:C}),encrypt:function(I,E,S,P){P=this.cfg.extend(P);var O=P.kdf.execute(S,I.keySize,I.ivSize,P.salt,P.hasher);P.iv=O.iv;var T=_.encrypt.call(this,I,E,O.key,P);return T.mixIn(O),T},decrypt:function(I,E,S,P){P=this.cfg.extend(P),E=this._parse(E,P.format);var O=P.kdf.execute(S,I.keySize,I.ivSize,E.salt,P.hasher);P.iv=O.iv;var T=_.decrypt.call(this,I,E,O.key,P);return T}})}()})}(HH)),HH.exports}var WH={exports:{}},R1e;function ern(){return R1e||(R1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sl())})(la,function(n){return n.mode.CFB=function(){var a=n.lib.BlockCipherMode.extend();a.Encryptor=a.extend({processBlock:function(i,o){var s=this._cipher,l=s.blockSize;r.call(this,i,o,l,s),this._prevBlock=i.slice(o,o+l)}}),a.Decryptor=a.extend({processBlock:function(i,o){var s=this._cipher,l=s.blockSize,u=i.slice(o,o+l);r.call(this,i,o,l,s),this._prevBlock=u}});function r(i,o,s,l){var u,d=this._iv;d?(u=d.slice(0),this._iv=void 0):u=this._prevBlock,l.encryptBlock(u,0);for(var p=0;p>24&255)===255){var l=s>>16&255,u=s>>8&255,d=s&255;l===255?(l=0,u===255?(u=0,d===255?d=0:++d):++u):++l,s=0,s+=l<<16,s+=u<<8,s+=d}else s+=1<<24;return s}function i(s){return(s[0]=r(s[0]))===0&&(s[1]=r(s[1])),s}var o=a.Encryptor=a.extend({processBlock:function(s,l){var u=this._cipher,d=u.blockSize,p=this._iv,A=this._counter;p&&(A=this._counter=p.slice(0),this._iv=void 0),i(A);var m=A.slice(0);u.encryptBlock(m,0);for(var g=0;g>>2]|=s<<24-l%4*8,a.sigBytes+=s},unpad:function(a){var r=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=r}},n.pad.Ansix923})}(KH)),KH.exports}var JH={exports:{}},j1e;function orn(){return j1e||(j1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sl())})(la,function(n){return n.pad.Iso10126={pad:function(a,r){var i=r*4,o=i-a.sigBytes%i;a.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(a){var r=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=r}},n.pad.Iso10126})}(JH)),JH.exports}var eW={exports:{}},U1e;function srn(){return U1e||(U1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sl())})(la,function(n){return n.pad.Iso97971={pad:function(a,r){a.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(a,r)},unpad:function(a){n.pad.ZeroPadding.unpad(a),a.sigBytes--}},n.pad.Iso97971})}(eW)),eW.exports}var tW={exports:{}},G1e;function crn(){return G1e||(G1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sl())})(la,function(n){return n.pad.ZeroPadding={pad:function(a,r){var i=r*4;a.clamp(),a.sigBytes+=i-(a.sigBytes%i||i)},unpad:function(a){for(var r=a.words,i=a.sigBytes-1,i=a.sigBytes-1;i>=0;i--)if(r[i>>>2]>>>24-i%4*8&255){a.sigBytes=i+1;break}}},n.pad.ZeroPadding})}(tW)),tW.exports}var nW={exports:{}},H1e;function lrn(){return H1e||(H1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sl())})(la,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(nW)),nW.exports}var aW={exports:{}},W1e;function urn(){return W1e||(W1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),sl())})(la,function(n){return function(a){var r=n,i=r.lib,o=i.CipherParams,s=r.enc,l=s.Hex,u=r.format;u.Hex={stringify:function(d){return d.ciphertext.toString(l)},parse:function(d){var p=l.parse(d);return o.create({ciphertext:p})}}}(),n.format.Hex})}(aW)),aW.exports}var rW={exports:{}},Y1e;function drn(){return Y1e||(Y1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),Fx(),Rx(),dv(),sl())})(la,function(n){return function(){var a=n,r=a.lib,i=r.BlockCipher,o=a.algo,s=[],l=[],u=[],d=[],p=[],A=[],m=[],g=[],h=[],f=[];(function(){for(var w=[],v=0;v<256;v++)v<128?w[v]=v<<1:w[v]=v<<1^283;for(var k=0,_=0,v=0;v<256;v++){var x=_^_<<1^_<<2^_<<3^_<<4;x=x>>>8^x&255^99,s[k]=x,l[x]=k;var C=w[k],B=w[C],I=w[B],E=w[x]*257^x*16843008;u[k]=E<<24|E>>>8,d[k]=E<<16|E>>>16,p[k]=E<<8|E>>>24,A[k]=E;var E=I*16843009^B*65537^C*257^k*16843008;m[x]=E<<24|E>>>8,g[x]=E<<16|E>>>16,h[x]=E<<8|E>>>24,f[x]=E,k?(k=C^w[w[w[I^C]]],_^=w[w[_]]):k=_=1}})();var b=[0,1,2,4,8,16,32,64,128,27,54],y=o.AES=i.extend({_doReset:function(){var w;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,k=v.words,_=v.sigBytes/4,x=this._nRounds=_+6,C=(x+1)*4,B=this._keySchedule=[],I=0;I6&&I%_==4&&(w=s[w>>>24]<<24|s[w>>>16&255]<<16|s[w>>>8&255]<<8|s[w&255]):(w=w<<8|w>>>24,w=s[w>>>24]<<24|s[w>>>16&255]<<16|s[w>>>8&255]<<8|s[w&255],w^=b[I/_|0]<<24),B[I]=B[I-_]^w);for(var E=this._invKeySchedule=[],S=0;S>>24]]^g[s[w>>>16&255]]^h[s[w>>>8&255]]^f[s[w&255]]}}},encryptBlock:function(w,v){this._doCryptBlock(w,v,this._keySchedule,u,d,p,A,s)},decryptBlock:function(w,v){var k=w[v+1];w[v+1]=w[v+3],w[v+3]=k,this._doCryptBlock(w,v,this._invKeySchedule,m,g,h,f,l);var k=w[v+1];w[v+1]=w[v+3],w[v+3]=k},_doCryptBlock:function(w,v,k,_,x,C,B,I){for(var E=this._nRounds,S=w[v]^k[0],P=w[v+1]^k[1],O=w[v+2]^k[2],T=w[v+3]^k[3],D=4,$=1;$>>24]^x[P>>>16&255]^C[O>>>8&255]^B[T&255]^k[D++],L=_[P>>>24]^x[O>>>16&255]^C[T>>>8&255]^B[S&255]^k[D++],q=_[O>>>24]^x[T>>>16&255]^C[S>>>8&255]^B[P&255]^k[D++],M=_[T>>>24]^x[S>>>16&255]^C[P>>>8&255]^B[O&255]^k[D++];S=F,P=L,O=q,T=M}var F=(I[S>>>24]<<24|I[P>>>16&255]<<16|I[O>>>8&255]<<8|I[T&255])^k[D++],L=(I[P>>>24]<<24|I[O>>>16&255]<<16|I[T>>>8&255]<<8|I[S&255])^k[D++],q=(I[O>>>24]<<24|I[T>>>16&255]<<16|I[S>>>8&255]<<8|I[P&255])^k[D++],M=(I[T>>>24]<<24|I[S>>>16&255]<<16|I[P>>>8&255]<<8|I[O&255])^k[D++];w[v]=F,w[v+1]=L,w[v+2]=q,w[v+3]=M},keySize:256/32});a.AES=i._createHelper(y)}(),n.AES})}(rW)),rW.exports}var iW={exports:{}},X1e;function prn(){return X1e||(X1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),Fx(),Rx(),dv(),sl())})(la,function(n){return function(){var a=n,r=a.lib,i=r.WordArray,o=r.BlockCipher,s=a.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],p=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],A=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=s.DES=o.extend({_doReset:function(){for(var b=this._key,y=b.words,w=[],v=0;v<56;v++){var k=l[v]-1;w[v]=y[k>>>5]>>>31-k%32&1}for(var _=this._subKeys=[],x=0;x<16;x++){for(var C=_[x]=[],B=d[x],v=0;v<24;v++)C[v/6|0]|=w[(u[v]-1+B)%28]<<31-v%6,C[4+(v/6|0)]|=w[28+(u[v+24]-1+B)%28]<<31-v%6;C[0]=C[0]<<1|C[0]>>>31;for(var v=1;v<7;v++)C[v]=C[v]>>>(v-1)*4+3;C[7]=C[7]<<5|C[7]>>>27}for(var I=this._invSubKeys=[],v=0;v<16;v++)I[v]=_[15-v]},encryptBlock:function(b,y){this._doCryptBlock(b,y,this._subKeys)},decryptBlock:function(b,y){this._doCryptBlock(b,y,this._invSubKeys)},_doCryptBlock:function(b,y,w){this._lBlock=b[y],this._rBlock=b[y+1],g.call(this,4,252645135),g.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),g.call(this,1,1431655765);for(var v=0;v<16;v++){for(var k=w[v],_=this._lBlock,x=this._rBlock,C=0,B=0;B<8;B++)C|=p[B][((x^k[B])&A[B])>>>0];this._lBlock=x,this._rBlock=_^C}var I=this._lBlock;this._lBlock=this._rBlock,this._rBlock=I,g.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),b[y]=this._lBlock,b[y+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(b,y){var w=(this._lBlock>>>b^this._rBlock)&y;this._rBlock^=w,this._lBlock^=w<>>b^this._lBlock)&y;this._lBlock^=w,this._rBlock^=w<192.");var w=y.slice(0,2),v=y.length<4?y.slice(0,2):y.slice(2,4),k=y.length<6?y.slice(0,2):y.slice(4,6);this._des1=m.createEncryptor(i.create(w)),this._des2=m.createEncryptor(i.create(v)),this._des3=m.createEncryptor(i.create(k))},encryptBlock:function(b,y){this._des1.encryptBlock(b,y),this._des2.decryptBlock(b,y),this._des3.encryptBlock(b,y)},decryptBlock:function(b,y){this._des3.decryptBlock(b,y),this._des2.encryptBlock(b,y),this._des1.decryptBlock(b,y)},keySize:192/32,ivSize:64/32,blockSize:64/32});a.TripleDES=o._createHelper(f)}(),n.TripleDES})}(iW)),iW.exports}var oW={exports:{}},V1e;function Arn(){return V1e||(V1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),Fx(),Rx(),dv(),sl())})(la,function(n){return function(){var a=n,r=a.lib,i=r.StreamCipher,o=a.algo,s=o.RC4=i.extend({_doReset:function(){for(var d=this._key,p=d.words,A=d.sigBytes,m=this._S=[],g=0;g<256;g++)m[g]=g;for(var g=0,h=0;g<256;g++){var f=g%A,b=p[f>>>2]>>>24-f%4*8&255;h=(h+m[g]+b)%256;var y=m[g];m[g]=m[h],m[h]=y}this._i=this._j=0},_doProcessBlock:function(d,p){d[p]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var d=this._S,p=this._i,A=this._j,m=0,g=0;g<4;g++){p=(p+1)%256,A=(A+d[p])%256;var h=d[p];d[p]=d[A],d[A]=h,m|=d[(d[p]+d[A])%256]<<24-g*8}return this._i=p,this._j=A,m}a.RC4=i._createHelper(s);var u=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)l.call(this)}});a.RC4Drop=i._createHelper(u)}(),n.RC4})}(oW)),oW.exports}var sW={exports:{}},Z1e;function mrn(){return Z1e||(Z1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),Fx(),Rx(),dv(),sl())})(la,function(n){return function(){var a=n,r=a.lib,i=r.StreamCipher,o=a.algo,s=[],l=[],u=[],d=o.Rabbit=i.extend({_doReset:function(){for(var A=this._key.words,m=this.cfg.iv,g=0;g<4;g++)A[g]=(A[g]<<8|A[g]>>>24)&16711935|(A[g]<<24|A[g]>>>8)&4278255360;var h=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],f=this._C=[A[2]<<16|A[2]>>>16,A[0]&4294901760|A[1]&65535,A[3]<<16|A[3]>>>16,A[1]&4294901760|A[2]&65535,A[0]<<16|A[0]>>>16,A[2]&4294901760|A[3]&65535,A[1]<<16|A[1]>>>16,A[3]&4294901760|A[0]&65535];this._b=0;for(var g=0;g<4;g++)p.call(this);for(var g=0;g<8;g++)f[g]^=h[g+4&7];if(m){var b=m.words,y=b[0],w=b[1],v=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,k=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,_=v>>>16|k&4294901760,x=k<<16|v&65535;f[0]^=v,f[1]^=_,f[2]^=k,f[3]^=x,f[4]^=v,f[5]^=_,f[6]^=k,f[7]^=x;for(var g=0;g<4;g++)p.call(this)}},_doProcessBlock:function(A,m){var g=this._X;p.call(this),s[0]=g[0]^g[5]>>>16^g[3]<<16,s[1]=g[2]^g[7]>>>16^g[5]<<16,s[2]=g[4]^g[1]>>>16^g[7]<<16,s[3]=g[6]^g[3]>>>16^g[1]<<16;for(var h=0;h<4;h++)s[h]=(s[h]<<8|s[h]>>>24)&16711935|(s[h]<<24|s[h]>>>8)&4278255360,A[m+h]^=s[h]},blockSize:128/32,ivSize:64/32});function p(){for(var A=this._X,m=this._C,g=0;g<8;g++)l[g]=m[g];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0>>0?1:0)|0,this._b=m[7]>>>0>>0?1:0;for(var g=0;g<8;g++){var h=A[g]+m[g],f=h&65535,b=h>>>16,y=((f*f>>>17)+f*b>>>15)+b*b,w=((h&4294901760)*h|0)+((h&65535)*h|0);u[g]=y^w}A[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,A[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,A[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,A[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,A[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,A[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,A[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,A[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}a.Rabbit=i._createHelper(d)}(),n.Rabbit})}(sW)),sW.exports}var cW={exports:{}},K1e;function grn(){return K1e||(K1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),Fx(),Rx(),dv(),sl())})(la,function(n){return function(){var a=n,r=a.lib,i=r.StreamCipher,o=a.algo,s=[],l=[],u=[],d=o.RabbitLegacy=i.extend({_doReset:function(){var A=this._key.words,m=this.cfg.iv,g=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],h=this._C=[A[2]<<16|A[2]>>>16,A[0]&4294901760|A[1]&65535,A[3]<<16|A[3]>>>16,A[1]&4294901760|A[2]&65535,A[0]<<16|A[0]>>>16,A[2]&4294901760|A[3]&65535,A[1]<<16|A[1]>>>16,A[3]&4294901760|A[0]&65535];this._b=0;for(var f=0;f<4;f++)p.call(this);for(var f=0;f<8;f++)h[f]^=g[f+4&7];if(m){var b=m.words,y=b[0],w=b[1],v=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,k=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,_=v>>>16|k&4294901760,x=k<<16|v&65535;h[0]^=v,h[1]^=_,h[2]^=k,h[3]^=x,h[4]^=v,h[5]^=_,h[6]^=k,h[7]^=x;for(var f=0;f<4;f++)p.call(this)}},_doProcessBlock:function(A,m){var g=this._X;p.call(this),s[0]=g[0]^g[5]>>>16^g[3]<<16,s[1]=g[2]^g[7]>>>16^g[5]<<16,s[2]=g[4]^g[1]>>>16^g[7]<<16,s[3]=g[6]^g[3]>>>16^g[1]<<16;for(var h=0;h<4;h++)s[h]=(s[h]<<8|s[h]>>>24)&16711935|(s[h]<<24|s[h]>>>8)&4278255360,A[m+h]^=s[h]},blockSize:128/32,ivSize:64/32});function p(){for(var A=this._X,m=this._C,g=0;g<8;g++)l[g]=m[g];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0>>0?1:0)|0,this._b=m[7]>>>0>>0?1:0;for(var g=0;g<8;g++){var h=A[g]+m[g],f=h&65535,b=h>>>16,y=((f*f>>>17)+f*b>>>15)+b*b,w=((h&4294901760)*h|0)+((h&65535)*h|0);u[g]=y^w}A[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,A[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,A[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,A[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,A[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,A[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,A[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,A[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}a.RabbitLegacy=i._createHelper(d)}(),n.RabbitLegacy})}(cW)),cW.exports}var lW={exports:{}},J1e;function hrn(){return J1e||(J1e=1,function(t,e){(function(n,a,r){t.exports=a(Sr(),Fx(),Rx(),dv(),sl())})(la,function(n){return function(){var a=n,r=a.lib,i=r.BlockCipher,o=a.algo;const s=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],u=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var d={pbox:[],sbox:[]};function p(f,b){let y=b>>24&255,w=b>>16&255,v=b>>8&255,k=b&255,_=f.sbox[0][y]+f.sbox[1][w];return _=_^f.sbox[2][v],_=_+f.sbox[3][k],_}function A(f,b,y){let w=b,v=y,k;for(let _=0;_1;--_)w=w^f.pbox[_],v=p(f,w)^v,k=w,w=v,v=k;return k=w,w=v,v=k,v=v^f.pbox[1],w=w^f.pbox[0],{left:w,right:v}}function g(f,b,y){for(let x=0;x<4;x++){f.sbox[x]=[];for(let C=0;C<256;C++)f.sbox[x][C]=u[x][C]}let w=0;for(let x=0;x=y&&(w=0);let v=0,k=0,_=0;for(let x=0;x{const n=new FileReader;n.onload=async a=>{try{const r=new Uint8Array(a.target.result),i=new TextDecoder().decode(r),o="---VERIFY_CONTENT_START---",s="---VERIFY_CONTENT_END---",l=i.indexOf(o),u=i.indexOf(s);if(l===-1||u===-1){console.error("Could not find verification markers"),e({isValid:!1,reason:"PDF does not contain valid verification markers. This may not be a quiz report generated by our system.",details:"Missing verification content markers"});return}let d=i.substring(l+o.length,u).replace(/\) Tj/g,"").replace(/ET\n?BT\n?/g,"").replace(/\/F\d+ \d+ Tf/g,"").replace(/\d+(\.\d+)? TL/g,"").replace(/\d+(\.\d+)? \d+(\.\d+)? Td/g,"").replace(/\(/g,"").replace(/\)/g,"").replace(/T\*\s*\d*\.?g/g,"").replace(/\s+/g,"").trim();const p=d.match(/({.*})/);if(!p){console.error("Could not find JSON content in:",d),e({isValid:!1,reason:"PDF content could not be parsed as valid JSON data.",details:"Invalid JSON structure in verification content"});return}d=p[1];try{const k=JSON.parse(d)}catch{console.error("Content after cleaning"),e({isValid:!1,reason:"PDF contains corrupted or invalid data structure.",details:"JSON parsing failed after content extraction"});return}try{const k=JSON.parse(d);k.highScores&&(k.highScores=k.highScores.map(_=>({..._,quizTitle:_.quizTitle.replace(/\s+/g,"")}))),d=JSON.stringify(k)}catch(k){console.error("Content normalization failed:",k),e({isValid:!1,reason:"PDF data normalization failed during verification process.",details:"Content normalization error"});return}const A=i.slice(u),m=/Verification Code:[^(]*\(([A-Fa-f0-9]{16})\)/,g=/Generated:[^(]*\(([\d]{4}-[\d]{2}-[\d]{2}T[\d]{2}:[\d]{2}:[\d]{2}\.[\d]{3}Z)\)/,h=A.match(m),f=A.match(g);if(!h||!f){console.error("Could not extract verification data"),e({isValid:!1,reason:"PDF is missing verification data (hash or timestamp).",details:"Verification metadata not found"});return}const b=h[1],y=f[1],w=sUe(d,y),v=b===w;e({isValid:v,reason:v?"PDF verification successful! This is a valid quiz report generated by our system.":"PDF verification failed. The content has been modified or corrupted.",details:v?`Hash verification passed: ${b.substring(0,8)}...`:`Hash mismatch: Expected ${w.substring(0,8)}..., Found ${b.substring(0,8)}...`,timestamp:y,hash:b})}catch(r){console.error("Verification error:",r),e({isValid:!1,reason:"An unexpected error occurred during PDF verification.",details:r.message||"Unknown verification error"})}},n.readAsArrayBuffer(t)})}const txe="chapter_progress_data";async function cUe(t=document.querySelector("#quarto-sidebar")){const e=document.createElement("div");e.className="loading-overlay",e.innerHTML=`
    `,document.body.appendChild(e);try{try{const{getDashboardChapterData:u}=await ye(async()=>{const{getDashboardChapterData:p}=await Promise.resolve().then(()=>aUe);return{getDashboardChapterData:p}},void 0,import.meta.url),d=await u();if(d&&d.length>0){console.log("✅ Using chapterMap data for navigation parsing");const p=d.map((A,m)=>({chapter:m+1,title:A.title,quizzesTaken:A.quizzesTaken||0,totalQuizzes:A.totalQuizzes||10,passedQuizzes:A.passedQuizzes||0}));try{localStorage.setItem(txe,JSON.stringify(p))}catch(A){console.error("Error saving chapterMap data to localStorage:",A)}return p}}catch(u){console.warn("ChapterMap system not available, falling back to DOM parsing:",u)}console.log("🔄 Falling back to DOM navigation parsing");const n=await Xqe(),a=typeof t=="string"?t:t?.outerHTML||"";if(!a)return console.error("No navigation content found"),[];const o=new DOMParser().parseFromString(a,"text/html").querySelectorAll("span.chapter-number"),s=[];o.forEach(u=>{const d=parseInt(u.textContent),p=u.closest(".sidebar-item-text")?.querySelector("span.chapter-title");if(p&&!isNaN(d)){const A=p.textContent.trim(),m=n.get(d)||{passedQuizzes:0,totalAttempted:0};s[d-1]={chapter:d,title:A,quizzesTaken:m.totalAttempted,totalQuizzes:10,passedQuizzes:m.passedQuizzes}}});const l=s.filter(Boolean);try{localStorage.setItem(txe,JSON.stringify(l))}catch(u){console.error("Error saving chapter data:",u)}return l}finally{e.remove()}}function Yr(t){"@babel/helpers - typeof";return Yr=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},Yr(t)}var cu=Uint8Array,Pp=Uint16Array,lle=Int32Array,uz=new cu([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),dz=new cu([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Nee=new cu([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lUe=function(t,e){for(var n=new Pp(31),a=0;a<31;++a)n[a]=e+=1<>1|(oo&21845)<<1;n0=(n0&52428)>>2|(n0&13107)<<2,n0=(n0&61680)>>4|(n0&3855)<<4,zee[oo]=((n0&65280)>>8|(n0&255)<<8)>>1}var Ph=function(t,e,n){for(var a=t.length,r=0,i=new Pp(e);r>l]=u}else for(s=new Pp(a),r=0;r>15-t[r]);return s},Tw=new cu(288);for(var oo=0;oo<144;++oo)Tw[oo]=8;for(var oo=144;oo<256;++oo)Tw[oo]=9;for(var oo=256;oo<280;++oo)Tw[oo]=7;for(var oo=280;oo<288;++oo)Tw[oo]=8;var OD=new cu(32);for(var oo=0;oo<32;++oo)OD[oo]=5;var wrn=Ph(Tw,9,0),vrn=Ph(Tw,9,1),krn=Ph(OD,5,0),xrn=Ph(OD,5,1),uW=function(t){for(var e=t[0],n=1;ne&&(e=t[n]);return e},xm=function(t,e,n){var a=e/8|0;return(t[a]|t[a+1]<<8)>>(e&7)&n},dW=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(e&7)},ule=function(t){return(t+7)/8|0},AUe=function(t,e,n){return(n==null||n>t.length)&&(n=t.length),new cu(t.subarray(e,n))},Orn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Lm=function(t,e,n){var a=new Error(e||Orn[t]);if(a.code=t,Error.captureStackTrace&&Error.captureStackTrace(a,Lm),!n)throw a;return a},Crn=function(t,e,n,a){var r=t.length,i=0;if(!r||e.f&&!e.l)return n||new cu(0);var o=!n,s=o||e.i!=2,l=e.i;o&&(n=new cu(r*3));var u=function(le){var me=n.length;if(le>me){var be=new cu(Math.max(me*2,le));be.set(n),n=be}},d=e.f||0,p=e.p||0,A=e.b||0,m=e.l,g=e.d,h=e.m,f=e.n,b=r*8;do{if(!m){d=xm(t,p,1);var y=xm(t,p+1,3);if(p+=3,y)if(y==1)m=vrn,g=xrn,h=9,f=5;else if(y==2){var _=xm(t,p,31)+257,x=xm(t,p+10,15)+4,C=_+xm(t,p+5,31)+1;p+=14;for(var B=new cu(C),I=new cu(19),E=0;E>4;if(w<16)B[E++]=w;else{var D=0,$=0;for(w==16?($=3+xm(t,p,3),p+=2,D=B[E-1]):w==17?($=3+xm(t,p,7),p+=3):w==18&&($=11+xm(t,p,127),p+=7);$--;)B[E++]=D}}var F=B.subarray(0,_),L=B.subarray(_);h=uW(F),f=uW(L),m=Ph(F,h,1),g=Ph(L,f,1)}else Lm(1);else{var w=ule(p)+4,v=t[w-4]|t[w-3]<<8,k=w+v;if(k>r){l&&Lm(0);break}s&&u(A+v),n.set(t.subarray(w,k),A),e.b=A+=v,e.p=p=k*8,e.f=d;continue}if(p>b){l&&Lm(0);break}}s&&u(A+131072);for(var q=(1<>4;if(p+=D&15,p>b){l&&Lm(0);break}if(D||Lm(2),j<256)n[A++]=j;else if(j==256){R=p,m=null;break}else{var W=j-254;if(j>264){var E=j-257,G=uz[E];W=xm(t,p,(1<>4;X||Lm(3),p+=X&15;var L=yrn[ne];if(ne>3){var G=dz[ne];L+=dW(t,p)&(1<b){l&&Lm(0);break}s&&u(A+131072);var oe=A+W;if(A>8},oQ=function(t,e,n){n<<=e&7;var a=e/8|0;t[a]|=n,t[a+1]|=n>>8,t[a+2]|=n>>16},pW=function(t,e){for(var n=[],a=0;aA&&(A=i[a].s);var m=new Pp(A+1),g=qee(n[d-1],m,0);if(g>e){var a=0,h=0,f=g-e,b=1<e)h+=b-(1<>=f;h>0;){var w=i[a].s;m[w]=0&&h;--a){var v=i[a].s;m[v]==e&&(--m[v],++h)}g=e}return{t:new cu(m),l:g}},qee=function(t,e,n){return t.s==-1?Math.max(qee(t.l,e,n+1),qee(t.r,e,n+1)):e[t.s]=n},axe=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Pp(++e),a=0,r=t[0],i=1,o=function(l){n[a++]=l},s=1;s<=e;++s)if(t[s]==r&&s!=e)++i;else{if(!r&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(r),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(r);i=1,r=t[s]}return{c:n.subarray(0,a),n:e}},sQ=function(t,e){for(var n=0,a=0;a>8,t[r+2]=t[r]^255,t[r+3]=t[r+1]^255;for(var i=0;i4&&!I[Nee[S-1]];--S);var P=u+5<<3,O=sQ(r,Tw)+sQ(i,OD)+o,T=sQ(r,A)+sQ(i,h)+o+14+3*S+sQ(x,I)+2*x[16]+3*x[17]+7*x[18];if(l>=0&&P<=O&&P<=T)return mUe(e,d,t.subarray(l,l+u));var D,$,F,L;if(Pf(e,d,1+(T15&&(Pf(e,d,j[C]>>5&127),d+=j[C]>>12)}}else D=wrn,$=Tw,F=krn,L=OD;for(var C=0;C255){var W=G>>18&31;oQ(e,d,D[W+257]),d+=$[W+257],W>7&&(Pf(e,d,G>>23&31),d+=uz[W]);var X=G&31;oQ(e,d,F[X]),d+=L[X],X>3&&(oQ(e,d,G>>5&8191),d+=dz[X])}else oQ(e,d,D[G]),d+=$[G]}return oQ(e,d,D[256]),d+$[256]},_rn=new lle([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),gUe=new cu(0),Brn=function(t,e,n,a,r,i){var o=i.z||t.length,s=new cu(a+o+5*(1+Math.ceil(o/7e3))+r),l=s.subarray(a,s.length-r),u=i.l,d=(i.r||0)&7;if(e){d&&(l[0]=i.r>>3);for(var p=_rn[e-1],A=p>>13,m=p&8191,g=(1<7e3||I>24576)&&(D>423||!u)){d=rxe(t,l,0,v,k,_,C,I,S,B-S,d),I=x=C=0,S=B;for(var $=0;$<286;++$)k[$]=0;for(var $=0;$<30;++$)_[$]=0}var F=2,L=0,q=m,M=O-T&32767;if(D>2&&P==w(B-M))for(var R=Math.min(A,D)-1,j=Math.min(32767,B),W=Math.min(258,D);M<=j&&--q&&O!=T;){if(t[B+F]==t[B+F-M]){for(var G=0;GF){if(F=G,L=M,G>R)break;for(var X=Math.min(M,G-2),ne=0,$=0;$ne&&(ne=he,T=oe)}}}O=T,T=h[O],M+=O-T&32767}if(L){v[I++]=268435456|Mee[F]<<18|nxe[L];var le=Mee[F]&31,me=nxe[L]&31;C+=uz[le]+dz[me],++k[257+le],++_[me],E=B+F,++x}else v[I++]=t[B],++k[t[B]]}}for(B=Math.max(B,E);B=o&&(l[d/8|0]=u,be=o),d=mUe(l,d+1,t.subarray(B,be))}i.i=o}return AUe(s,0,a+ule(d)+r)},hUe=function(){var t=1,e=0;return{p:function(n){for(var a=t,r=e,i=n.length|0,o=0;o!=i;){for(var s=Math.min(o+2655,i);o>16),r=(r&65535)+15*(r>>16)}t=a,e=r},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},Ern=function(t,e,n,a,r){if(!r&&(r={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),o=new cu(i.length+t.length);o.set(i),o.set(t,i.length),t=o,r.w=i.length}return Brn(t,e.level==null?6:e.level,e.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,a,r)},fUe=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},Qrn=function(t,e){var n=e.level,a=n==0?0:n<6?1:n==9?3:2;if(t[0]=120,t[1]=a<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var r=hUe();r.p(e.dictionary),fUe(t,2,r.d())}},Srn=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Lm(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&Lm(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function jee(t,e){e||(e={});var n=hUe();n.p(t);var a=Ern(t,e,e.dictionary?6:2,4);return Qrn(a,e),fUe(a,a.length-4,n.d()),a}function Irn(t,e){return Crn(t.subarray(Srn(t,e),-4),{i:2},e,e)}var Drn=typeof TextDecoder<"u"&&new TextDecoder,$rn=0;try{Drn.decode(gUe,{stream:!0}),$rn=1}catch{}var Ra=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function AW(){Ra.console&&typeof Ra.console.log=="function"&&Ra.console.log.apply(Ra.console,arguments)}var Fi={log:AW,warn:function(t){Ra.console&&(typeof Ra.console.warn=="function"?Ra.console.warn.apply(Ra.console,arguments):AW.call(null,arguments))},error:function(t){Ra.console&&(typeof Ra.console.error=="function"?Ra.console.error.apply(Ra.console,arguments):AW(t))}};function mW(t,e,n){var a=new XMLHttpRequest;a.open("GET",t),a.responseType="blob",a.onload=function(){xk(a.response,e,n)},a.onerror=function(){Fi.error("could not download file")},a.send()}function ixe(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function P8(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var GI,Uee,xk=Ra.saveAs||((typeof window>"u"?"undefined":Yr(window))!=="object"||window!==Ra?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var a=Ra.URL||Ra.webkitURL,r=document.createElement("a");e=e||t.name||"download",r.download=e,r.rel="noopener",typeof t=="string"?(r.href=t,r.origin!==location.origin?ixe(r.href)?mW(t,e,n):P8(r,r.target="_blank"):P8(r)):(r.href=a.createObjectURL(t),setTimeout(function(){a.revokeObjectURL(r.href)},4e4),setTimeout(function(){P8(r)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download",typeof t=="string")if(ixe(t))mW(t,e,n);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){P8(a)})}else navigator.msSaveOrOpenBlob(function(r,i){return i===void 0?i={autoBom:!1}:Yr(i)!=="object"&&(Fi.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}(t,n),e)}:function(t,e,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),typeof t=="string")return mW(t,e,n);var r=t.type==="application/octet-stream",i=/constructor/i.test(Ra.HTMLElement)||Ra.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||r&&i)&&(typeof FileReader>"u"?"undefined":Yr(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var d=s.result;d=o?d:d.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=d:location=d,a=null},s.readAsDataURL(t)}else{var l=Ra.URL||Ra.webkitURL,u=l.createObjectURL(t);a?a.location=u:location.href=u,a=null,setTimeout(function(){l.revokeObjectURL(u)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} * @license Use it if you like it */function bUe(t){var e;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={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",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",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",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],a=0;a255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return s.length==1&&(s="0"+s),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+s+l+u}}/** * @license * Joseph Myers does not specify a particular license for his work. * * Author: Joseph Myers * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js * * Modified by: Owen Leong */function gW(t,e){var n=t[0],a=t[1],r=t[2],i=t[3];n=Ml(n,a,r,i,e[0],7,-680876936),i=Ml(i,n,a,r,e[1],12,-389564586),r=Ml(r,i,n,a,e[2],17,606105819),a=Ml(a,r,i,n,e[3],22,-1044525330),n=Ml(n,a,r,i,e[4],7,-176418897),i=Ml(i,n,a,r,e[5],12,1200080426),r=Ml(r,i,n,a,e[6],17,-1473231341),a=Ml(a,r,i,n,e[7],22,-45705983),n=Ml(n,a,r,i,e[8],7,1770035416),i=Ml(i,n,a,r,e[9],12,-1958414417),r=Ml(r,i,n,a,e[10],17,-42063),a=Ml(a,r,i,n,e[11],22,-1990404162),n=Ml(n,a,r,i,e[12],7,1804603682),i=Ml(i,n,a,r,e[13],12,-40341101),r=Ml(r,i,n,a,e[14],17,-1502002290),n=zl(n,a=Ml(a,r,i,n,e[15],22,1236535329),r,i,e[1],5,-165796510),i=zl(i,n,a,r,e[6],9,-1069501632),r=zl(r,i,n,a,e[11],14,643717713),a=zl(a,r,i,n,e[0],20,-373897302),n=zl(n,a,r,i,e[5],5,-701558691),i=zl(i,n,a,r,e[10],9,38016083),r=zl(r,i,n,a,e[15],14,-660478335),a=zl(a,r,i,n,e[4],20,-405537848),n=zl(n,a,r,i,e[9],5,568446438),i=zl(i,n,a,r,e[14],9,-1019803690),r=zl(r,i,n,a,e[3],14,-187363961),a=zl(a,r,i,n,e[8],20,1163531501),n=zl(n,a,r,i,e[13],5,-1444681467),i=zl(i,n,a,r,e[2],9,-51403784),r=zl(r,i,n,a,e[7],14,1735328473),n=ql(n,a=zl(a,r,i,n,e[12],20,-1926607734),r,i,e[5],4,-378558),i=ql(i,n,a,r,e[8],11,-2022574463),r=ql(r,i,n,a,e[11],16,1839030562),a=ql(a,r,i,n,e[14],23,-35309556),n=ql(n,a,r,i,e[1],4,-1530992060),i=ql(i,n,a,r,e[4],11,1272893353),r=ql(r,i,n,a,e[7],16,-155497632),a=ql(a,r,i,n,e[10],23,-1094730640),n=ql(n,a,r,i,e[13],4,681279174),i=ql(i,n,a,r,e[0],11,-358537222),r=ql(r,i,n,a,e[3],16,-722521979),a=ql(a,r,i,n,e[6],23,76029189),n=ql(n,a,r,i,e[9],4,-640364487),i=ql(i,n,a,r,e[12],11,-421815835),r=ql(r,i,n,a,e[15],16,530742520),n=jl(n,a=ql(a,r,i,n,e[2],23,-995338651),r,i,e[0],6,-198630844),i=jl(i,n,a,r,e[7],10,1126891415),r=jl(r,i,n,a,e[14],15,-1416354905),a=jl(a,r,i,n,e[5],21,-57434055),n=jl(n,a,r,i,e[12],6,1700485571),i=jl(i,n,a,r,e[3],10,-1894986606),r=jl(r,i,n,a,e[10],15,-1051523),a=jl(a,r,i,n,e[1],21,-2054922799),n=jl(n,a,r,i,e[8],6,1873313359),i=jl(i,n,a,r,e[15],10,-30611744),r=jl(r,i,n,a,e[6],15,-1560198380),a=jl(a,r,i,n,e[13],21,1309151649),n=jl(n,a,r,i,e[4],6,-145523070),i=jl(i,n,a,r,e[11],10,-1120210379),r=jl(r,i,n,a,e[2],15,718787259),a=jl(a,r,i,n,e[9],21,-343485551),t[0]=W0(n,t[0]),t[1]=W0(a,t[1]),t[2]=W0(r,t[2]),t[3]=W0(i,t[3])}function pz(t,e,n,a,r,i){return e=W0(W0(e,t),W0(a,i)),W0(e<>>32-r,n)}function Ml(t,e,n,a,r,i,o){return pz(e&n|~e&a,t,e,r,i,o)}function zl(t,e,n,a,r,i,o){return pz(e&a|n&~a,t,e,r,i,o)}function ql(t,e,n,a,r,i,o){return pz(e^n^a,t,e,r,i,o)}function jl(t,e,n,a,r,i,o){return pz(n^(e|~a),t,e,r,i,o)}function yUe(t){var e,n=t.length,a=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)gW(a,Trn(t.substring(e-64,e)));t=t.substring(e-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(gW(a,r),e=0;e<16;e++)r[e]=0;return r[14]=8*n,gW(a,r),a}function Trn(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}GI=Ra.atob.bind(Ra),Uee=Ra.btoa.bind(Ra);var oxe="0123456789abcdef".split("");function Prn(t){for(var e="",n=0;n<4;n++)e+=oxe[t>>8*n+4&15]+oxe[t>>8*n&15];return e}function Frn(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Gee(t){return yUe(t).map(Frn).join("")}var Rrn=function(t){for(var e=0;e>16)+(e>>16)+(n>>16)<<16|65535&n}return t+e&4294967295}/** * @license * FPDF is released under a permissive license: there is no usage restriction. * You may embed it freely in your application (commercial or not), with or * without modifications. * * Reference: http://www.fpdf.org/en/script/script37.php */function Hee(t,e){var n,a,r,i;if(t!==n){for(var o=(r=t,i=1+(256/t.length>>0),new Array(i+1).join(r)),s=[],l=0;l<256;l++)s[l]=l;var u=0;for(l=0;l<256;l++){var d=s[l];u=(u+d+o.charCodeAt(l))%256,s[l]=s[u],s[u]=d}n=t,a=s}else s=a;var p=e.length,A=0,m=0,g="";for(l=0;l€/\f©þdSiz";var i=(e+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,o),this.P=-(1+(255^r)),this.encryptionKey=Gee(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(a)).substr(0,5),this.U=Hee(this.encryptionKey,this.padding)}function FC(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",n=t.length,a=0;a126?e+="#"+("0"+r.toString(16)).slice(-2):e+=t[a]}return e}function cxe(t){if(Yr(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(n,a,r){if(r=r||!1,typeof n!="string"||typeof a!="function"||typeof r!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(n)||(e[n]={});var i=Math.random().toString(35);return e[n][i]=[a,!!r],i},this.unsubscribe=function(n){for(var a in e)if(e[a][n])return delete e[a][n],Object.keys(e[a]).length===0&&delete e[a],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var a=Array.prototype.slice.call(arguments,1),r=[];for(var i in e[n]){var o=e[n][i];try{o[0].apply(t,a)}catch(s){Ra.console&&Fi.error("jsPDF PubSub Error",s.message,s)}o[1]&&r.push(i)}r.length&&r.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function CD(t){if(!(this instanceof CD))return new CD(t);var e="opacity,stroke-opacity".split(",");for(var n in t)t.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=t[n]);this.id="",this.objectNumber=-1}function wUe(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function C0(t,e,n,a,r){if(!(this instanceof C0))return new C0(t,e,n,a,r);this.type=t==="axial"?2:3,this.coords=e,this.colors=n,wUe.call(this,a,r)}function n1(t,e,n,a,r){if(!(this instanceof n1))return new n1(t,e,n,a,r);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,wUe.call(this,a,r)}function Ea(t){var e,n=typeof arguments[0]=="string"?arguments[0]:"p",a=arguments[1],r=arguments[2],i=arguments[3],o=[],s=1,l=16,u="S",d=null;Yr(t=t||{})==="object"&&(n=t.orientation,a=t.unit||a,r=t.format||r,i=t.compress||t.compressPdf||i,(d=t.encryption||null)!==null&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),s=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(e=t.precision),t.floatPrecision!==void 0&&(l=t.floatPrecision),u=t.defaultPathOperation||"S"),o=t.filters||(i===!0?["FlateEncode"]:o),a=a||"mm",n=(""+(n||"P")).toLowerCase();var p=t.putOnlyUsedFonts||!1,A={},m={internal:{},__private__:{}};m.__private__.PubSub=cxe;var g="1.3",h=m.__private__.getPdfVersion=function(){return g};m.__private__.setPdfVersion=function(Y){g=Y};var f={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};m.__private__.getPageFormats=function(){return f};var b=m.__private__.getPageFormat=function(Y){return f[Y]};r=r||"a4";var y={COMPAT:"compat",ADVANCED:"advanced"},w=y.COMPAT;function v(){this.saveGraphicsState(),Z(new ft(ie,0,0,-ie,0,zi()*ie).toString()+" cm"),this.setFontSize(this.getFontSize()/ie),u="n",w=y.ADVANCED}function k(){this.restoreGraphicsState(),u="S",w=y.COMPAT}var _=m.__private__.combineFontStyleAndFontWeight=function(Y,ke){if(Y=="bold"&&ke=="normal"||Y=="bold"&&ke==400||Y=="normal"&&ke=="italic"||Y=="bold"&&ke=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return ke&&(Y=ke==400||ke==="normal"?Y==="italic"?"italic":"normal":ke!=700&&ke!=="bold"||Y!=="normal"?(ke==700?"bold":ke)+""+Y:"bold"),Y};m.advancedAPI=function(Y){var ke=w===y.COMPAT;return ke&&v.call(this),typeof Y!="function"||(Y(this),ke&&k.call(this)),this},m.compatAPI=function(Y){var ke=w===y.ADVANCED;return ke&&k.call(this),typeof Y!="function"||(Y(this),ke&&v.call(this)),this},m.isAdvancedAPI=function(){return w===y.ADVANCED};var x,C=function(Y){if(w!==y.ADVANCED)throw new Error(Y+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},B=m.roundToPrecision=m.__private__.roundToPrecision=function(Y,ke){var Ke=e||ke;if(isNaN(Y)||isNaN(Ke))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return Y.toFixed(Ke).replace(/0+$/,"")};x=m.hpf=m.__private__.hpf=typeof l=="number"?function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.hpf");return B(Y,l)}:l==="smart"?function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.hpf");return B(Y,Y>-1&&Y<1?16:5)}:function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.hpf");return B(Y,16)};var I=m.f2=m.__private__.f2=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.f2");return B(Y,2)},E=m.__private__.f3=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.f3");return B(Y,3)},S=m.scale=m.__private__.scale=function(Y){if(isNaN(Y))throw new Error("Invalid argument passed to jsPDF.scale");return w===y.COMPAT?Y*ie:w===y.ADVANCED?Y:void 0},P=function(Y){return w===y.COMPAT?zi()-Y:w===y.ADVANCED?Y:void 0},O=function(Y){return S(P(Y))};m.__private__.setPrecision=m.setPrecision=function(Y){typeof parseInt(Y,10)=="number"&&(e=parseInt(Y,10))};var T,D="00000000000000000000000000000000",$=m.__private__.getFileId=function(){return D},F=m.__private__.setFileId=function(Y){return D=Y!==void 0&&/^[a-fA-F0-9]{32}$/.test(Y)?Y.toUpperCase():D.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),d!==null&&(Ur=new PC(d.userPermissions,d.userPassword,d.ownerPassword,D)),D};m.setFileId=function(Y){return F(Y),this},m.getFileId=function(){return $()};var L=m.__private__.convertDateToPDFDate=function(Y){var ke=Y.getTimezoneOffset(),Ke=ke<0?"+":"-",ut=Math.floor(Math.abs(ke/60)),kt=Math.abs(ke%60),Yt=[Ke,W(ut),"'",W(kt),"'"].join("");return["D:",Y.getFullYear(),W(Y.getMonth()+1),W(Y.getDate()),W(Y.getHours()),W(Y.getMinutes()),W(Y.getSeconds()),Yt].join("")},q=m.__private__.convertPDFDateToDate=function(Y){var ke=parseInt(Y.substr(2,4),10),Ke=parseInt(Y.substr(6,2),10)-1,ut=parseInt(Y.substr(8,2),10),kt=parseInt(Y.substr(10,2),10),Yt=parseInt(Y.substr(12,2),10),fn=parseInt(Y.substr(14,2),10);return new Date(ke,Ke,ut,kt,Yt,fn,0)},M=m.__private__.setCreationDate=function(Y){var ke;if(Y===void 0&&(Y=new Date),Y instanceof Date)ke=L(Y);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(Y))throw new Error("Invalid argument passed to jsPDF.setCreationDate");ke=Y}return T=ke},R=m.__private__.getCreationDate=function(Y){var ke=T;return Y==="jsDate"&&(ke=q(T)),ke};m.setCreationDate=function(Y){return M(Y),this},m.getCreationDate=function(Y){return R(Y)};var j,W=m.__private__.padd2=function(Y){return("0"+parseInt(Y)).slice(-2)},G=m.__private__.padd2Hex=function(Y){return("00"+(Y=Y.toString())).substr(Y.length)},X=0,ne=[],oe=[],ee=0,he=[],le=[],me=!1,be=oe,ce=function(){X=0,ee=0,oe=[],ne=[],he=[],ga=jt(),yn=jt()};m.__private__.setCustomOutputDestination=function(Y){me=!0,be=Y};var fe=function(Y){me||(be=Y)};m.__private__.resetCustomOutputDestination=function(){me=!1,be=oe};var Z=m.__private__.out=function(Y){return Y=Y.toString(),ee+=Y.length+1,be.push(Y),be},ze=m.__private__.write=function(Y){return Z(arguments.length===1?Y.toString():Array.prototype.join.call(arguments," "))},ae=m.__private__.getArrayBuffer=function(Y){for(var ke=Y.length,Ke=new ArrayBuffer(ke),ut=new Uint8Array(Ke);ke--;)ut[ke]=Y.charCodeAt(ke);return Ke},qe=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];m.__private__.getStandardFonts=function(){return qe};var Oe=t.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(Y){return Oe=w===y.ADVANCED?Y/ie:Y,this};var nt,et=m.__private__.getFontSize=m.getFontSize=function(){return w===y.COMPAT?Oe:Oe*ie},lt=t.R2L||!1;m.__private__.setR2L=m.setR2L=function(Y){return lt=Y,this},m.__private__.getR2L=m.getR2L=function(){return lt};var Ge,at=m.__private__.setZoomMode=function(Y){var ke=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(Y))nt=Y;else if(isNaN(Y)){if(ke.indexOf(Y)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+Y+'" is not recognized.');nt=Y}else nt=parseInt(Y,10)};m.__private__.getZoomMode=function(){return nt};var Pe,de=m.__private__.setPageMode=function(Y){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(Y)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+Y+'" is not recognized.');Ge=Y};m.__private__.getPageMode=function(){return Ge};var $e=m.__private__.setLayoutMode=function(Y){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(Y)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+Y+'" is not recognized.');Pe=Y};m.__private__.getLayoutMode=function(){return Pe},m.__private__.setDisplayMode=m.setDisplayMode=function(Y,ke,Ke){return at(Y),$e(ke),de(Ke),this};var we={title:"",subject:"",author:"",keywords:"",creator:""};m.__private__.getDocumentProperty=function(Y){if(Object.keys(we).indexOf(Y)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return we[Y]},m.__private__.getDocumentProperties=function(){return we},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(Y){for(var ke in we)we.hasOwnProperty(ke)&&Y[ke]&&(we[ke]=Y[ke]);return this},m.__private__.setDocumentProperty=function(Y,ke){if(Object.keys(we).indexOf(Y)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return we[Y]=ke};var Ie,ie,Ne,se,De,Se={},Ve={},je=[],Ze={},At={},Xe={},ht={},Rt=null,zt=0,Ct=[],Ht=new cxe(m),Qt=t.hotfixes||[],Gt={},cn={},tn=[],ft=function Y(ke,Ke,ut,kt,Yt,fn){if(!(this instanceof Y))return new Y(ke,Ke,ut,kt,Yt,fn);isNaN(ke)&&(ke=1),isNaN(Ke)&&(Ke=0),isNaN(ut)&&(ut=0),isNaN(kt)&&(kt=1),isNaN(Yt)&&(Yt=0),isNaN(fn)&&(fn=0),this._matrix=[ke,Ke,ut,kt,Yt,fn]};Object.defineProperty(ft.prototype,"sx",{get:function(){return this._matrix[0]},set:function(Y){this._matrix[0]=Y}}),Object.defineProperty(ft.prototype,"shy",{get:function(){return this._matrix[1]},set:function(Y){this._matrix[1]=Y}}),Object.defineProperty(ft.prototype,"shx",{get:function(){return this._matrix[2]},set:function(Y){this._matrix[2]=Y}}),Object.defineProperty(ft.prototype,"sy",{get:function(){return this._matrix[3]},set:function(Y){this._matrix[3]=Y}}),Object.defineProperty(ft.prototype,"tx",{get:function(){return this._matrix[4]},set:function(Y){this._matrix[4]=Y}}),Object.defineProperty(ft.prototype,"ty",{get:function(){return this._matrix[5]},set:function(Y){this._matrix[5]=Y}}),Object.defineProperty(ft.prototype,"a",{get:function(){return this._matrix[0]},set:function(Y){this._matrix[0]=Y}}),Object.defineProperty(ft.prototype,"b",{get:function(){return this._matrix[1]},set:function(Y){this._matrix[1]=Y}}),Object.defineProperty(ft.prototype,"c",{get:function(){return this._matrix[2]},set:function(Y){this._matrix[2]=Y}}),Object.defineProperty(ft.prototype,"d",{get:function(){return this._matrix[3]},set:function(Y){this._matrix[3]=Y}}),Object.defineProperty(ft.prototype,"e",{get:function(){return this._matrix[4]},set:function(Y){this._matrix[4]=Y}}),Object.defineProperty(ft.prototype,"f",{get:function(){return this._matrix[5]},set:function(Y){this._matrix[5]=Y}}),Object.defineProperty(ft.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(ft.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(ft.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(ft.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),ft.prototype.join=function(Y){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(x).join(Y)},ft.prototype.multiply=function(Y){var ke=Y.sx*this.sx+Y.shy*this.shx,Ke=Y.sx*this.shy+Y.shy*this.sy,ut=Y.shx*this.sx+Y.sy*this.shx,kt=Y.shx*this.shy+Y.sy*this.sy,Yt=Y.tx*this.sx+Y.ty*this.shx+this.tx,fn=Y.tx*this.shy+Y.ty*this.sy+this.ty;return new ft(ke,Ke,ut,kt,Yt,fn)},ft.prototype.decompose=function(){var Y=this.sx,ke=this.shy,Ke=this.shx,ut=this.sy,kt=this.tx,Yt=this.ty,fn=Math.sqrt(Y*Y+ke*ke),zn=(Y/=fn)*Ke+(ke/=fn)*ut;Ke-=Y*zn,ut-=ke*zn;var ba=Math.sqrt(Ke*Ke+ut*ut);return zn/=ba,Y*(ut/=ba)>16&255,ut=ba>>8&255,kt=255&ba}if(ut===void 0||Yt===void 0&&Ke===ut&&ut===kt)if(typeof Ke=="string")ke=Ke+" "+fn[0];else switch(Y.precision){case 2:ke=I(Ke/255)+" "+fn[0];break;case 3:default:ke=E(Ke/255)+" "+fn[0]}else if(Yt===void 0||Yr(Yt)==="object"){if(Yt&&!isNaN(Yt.a)&&Yt.a===0)return ke=["1.","1.","1.",fn[1]].join(" ");if(typeof Ke=="string")ke=[Ke,ut,kt,fn[1]].join(" ");else switch(Y.precision){case 2:ke=[I(Ke/255),I(ut/255),I(kt/255),fn[1]].join(" ");break;default:case 3:ke=[E(Ke/255),E(ut/255),E(kt/255),fn[1]].join(" ")}}else if(typeof Ke=="string")ke=[Ke,ut,kt,Yt,fn[2]].join(" ");else switch(Y.precision){case 2:ke=[I(Ke),I(ut),I(kt),I(Yt),fn[2]].join(" ");break;case 3:default:ke=[E(Ke),E(ut),E(kt),E(Yt),fn[2]].join(" ")}return ke},Ya=m.__private__.getFilters=function(){return o},fa=m.__private__.putStream=function(Y){var ke=(Y=Y||{}).data||"",Ke=Y.filters||Ya(),ut=Y.alreadyAppliedFilters||[],kt=Y.addLength1||!1,Yt=ke.length,fn=Y.objectId,zn=function(Fl){return Fl};if(d!==null&&fn===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");d!==null&&(zn=Ur.encryptor(fn,0));var ba={};Ke===!0&&(Ke=["FlateEncode"]);var Ja=Y.additionalKeyValues||[],Xa=(ba=Ea.API.processDataByFilters!==void 0?Ea.API.processDataByFilters(ke,Ke):{data:ke,reverseChain:[]}).reverseChain+(Array.isArray(ut)?ut.join(" "):ut.toString());if(ba.data.length!==0&&(Ja.push({key:"Length",value:ba.data.length}),kt===!0&&Ja.push({key:"Length1",value:Yt})),Xa.length!=0)if(Xa.split("/").length-1==1)Ja.push({key:"Filter",value:Xa});else{Ja.push({key:"Filter",value:"["+Xa+"]"});for(var Dr=0;Dr>"),ba.data.length!==0&&(Z("stream"),Z(zn(ba.data)),Z("endstream"))},Ka=m.__private__.putPage=function(Y){var ke=Y.number,Ke=Y.data,ut=Y.objId,kt=Y.contentsObjId;Xt(ut,!0),Z("<>"),Z("endobj");var Yt=Ke.join(` `);return w===y.ADVANCED&&(Yt+=` Q`),Xt(kt,!0),fa({data:Yt,filters:Ya(),objectId:kt}),Z("endobj"),ut},_n=m.__private__.putPages=function(){var Y,ke,Ke=[];for(Y=1;Y<=zt;Y++)Ct[Y].objId=jt(),Ct[Y].contentsObjId=jt();for(Y=1;Y<=zt;Y++)Ke.push(Ka({number:Y,data:le[Y],objId:Ct[Y].objId,contentsObjId:Ct[Y].contentsObjId,mediaBox:Ct[Y].mediaBox,cropBox:Ct[Y].cropBox,bleedBox:Ct[Y].bleedBox,trimBox:Ct[Y].trimBox,artBox:Ct[Y].artBox,userUnit:Ct[Y].userUnit,rootDictionaryObjId:ga,resourceDictionaryObjId:yn}));Xt(ga,!0),Z("<>"),Z("endobj"),Ht.publish("postPutPages")},st=function(Y){Ht.publish("putFont",{font:Y,out:Z,newObject:dn,putStream:fa}),Y.isAlreadyPutted!==!0&&(Y.objectNumber=dn(),Z("<<"),Z("/Type /Font"),Z("/BaseFont /"+FC(Y.postScriptName)),Z("/Subtype /Type1"),typeof Y.encoding=="string"&&Z("/Encoding /"+Y.encoding),Z("/FirstChar 32"),Z("/LastChar 255"),Z(">>"),Z("endobj"))},vt=function(){for(var Y in Se)Se.hasOwnProperty(Y)&&(p===!1||p===!0&&A.hasOwnProperty(Y))&&st(Se[Y])},We=function(Y){Y.objectNumber=dn();var ke=[];ke.push({key:"Type",value:"/XObject"}),ke.push({key:"Subtype",value:"/Form"}),ke.push({key:"BBox",value:"["+[x(Y.x),x(Y.y),x(Y.x+Y.width),x(Y.y+Y.height)].join(" ")+"]"}),ke.push({key:"Matrix",value:"["+Y.matrix.toString()+"]"});var Ke=Y.pages[1].join(` `);fa({data:Ke,additionalKeyValues:ke,objectId:Y.objectNumber}),Z("endobj")},Tt=function(){for(var Y in Gt)Gt.hasOwnProperty(Y)&&We(Gt[Y])},an=function(Y,ke){var Ke,ut=[],kt=1/(ke-1);for(Ke=0;Ke<1;Ke+=kt)ut.push(Ke);if(ut.push(1),Y[0].offset!=0){var Yt={offset:0,color:Y[0].color};Y.unshift(Yt)}if(Y[Y.length-1].offset!=1){var fn={offset:1,color:Y[Y.length-1].color};Y.push(fn)}for(var zn="",ba=0,Ja=0;JaY[ba+1].offset;)ba++;var Xa=Y[ba].offset,Dr=(Ke-Xa)/(Y[ba+1].offset-Xa),Io=Y[ba].color,Yo=Y[ba+1].color;zn+=G(Math.round((1-Dr)*Io[0]+Dr*Yo[0]).toString(16))+G(Math.round((1-Dr)*Io[1]+Dr*Yo[1]).toString(16))+G(Math.round((1-Dr)*Io[2]+Dr*Yo[2]).toString(16))}return zn.trim()},jn=function(Y,ke){ke||(ke=21);var Ke=dn(),ut=an(Y.colors,ke),kt=[];kt.push({key:"FunctionType",value:"0"}),kt.push({key:"Domain",value:"[0.0 1.0]"}),kt.push({key:"Size",value:"["+ke+"]"}),kt.push({key:"BitsPerSample",value:"8"}),kt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),kt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),fa({data:ut,additionalKeyValues:kt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Ke}),Z("endobj"),Y.objectNumber=dn(),Z("<< /ShadingType "+Y.type),Z("/ColorSpace /DeviceRGB");var Yt="/Coords ["+x(parseFloat(Y.coords[0]))+" "+x(parseFloat(Y.coords[1]))+" ";Y.type===2?Yt+=x(parseFloat(Y.coords[2]))+" "+x(parseFloat(Y.coords[3])):Yt+=x(parseFloat(Y.coords[2]))+" "+x(parseFloat(Y.coords[3]))+" "+x(parseFloat(Y.coords[4]))+" "+x(parseFloat(Y.coords[5])),Z(Yt+="]"),Y.matrix&&Z("/Matrix ["+Y.matrix.toString()+"]"),Z("/Function "+Ke+" 0 R"),Z("/Extend [true true]"),Z(">>"),Z("endobj")},ya=function(Y,ke){var Ke=jt(),ut=dn();ke.push({resourcesOid:Ke,objectOid:ut}),Y.objectNumber=ut;var kt=[];kt.push({key:"Type",value:"/Pattern"}),kt.push({key:"PatternType",value:"1"}),kt.push({key:"PaintType",value:"1"}),kt.push({key:"TilingType",value:"1"}),kt.push({key:"BBox",value:"["+Y.boundingBox.map(x).join(" ")+"]"}),kt.push({key:"XStep",value:x(Y.xStep)}),kt.push({key:"YStep",value:x(Y.yStep)}),kt.push({key:"Resources",value:Ke+" 0 R"}),Y.matrix&&kt.push({key:"Matrix",value:"["+Y.matrix.toString()+"]"}),fa({data:Y.stream,additionalKeyValues:kt,objectId:Y.objectNumber}),Z("endobj")},ve=function(Y){var ke;for(ke in Ze)Ze.hasOwnProperty(ke)&&(Ze[ke]instanceof C0?jn(Ze[ke]):Ze[ke]instanceof n1&&ya(Ze[ke],Y))},Ue=function(Y){for(var ke in Y.objectNumber=dn(),Z("<<"),Y)switch(ke){case"opacity":Z("/ca "+I(Y[ke]));break;case"stroke-opacity":Z("/CA "+I(Y[ke]))}Z(">>"),Z("endobj")},$t=function(){var Y;for(Y in Xe)Xe.hasOwnProperty(Y)&&Ue(Xe[Y])},Ut=function(){for(var Y in Z("/XObject <<"),Gt)Gt.hasOwnProperty(Y)&&Gt[Y].objectNumber>=0&&Z("/"+Y+" "+Gt[Y].objectNumber+" 0 R");Ht.publish("putXobjectDict"),Z(">>")},Pt=function(){Ur.oid=dn(),Z("<<"),Z("/Filter /Standard"),Z("/V "+Ur.v),Z("/R "+Ur.r),Z("/U <"+Ur.toHexString(Ur.U)+">"),Z("/O <"+Ur.toHexString(Ur.O)+">"),Z("/P "+Ur.P),Z(">>"),Z("endobj")},Vt=function(){for(var Y in Z("/Font <<"),Se)Se.hasOwnProperty(Y)&&(p===!1||p===!0&&A.hasOwnProperty(Y))&&Z("/"+Y+" "+Se[Y].objectNumber+" 0 R");Z(">>")},Jt=function(){if(Object.keys(Ze).length>0){for(var Y in Z("/Shading <<"),Ze)Ze.hasOwnProperty(Y)&&Ze[Y]instanceof C0&&Ze[Y].objectNumber>=0&&Z("/"+Y+" "+Ze[Y].objectNumber+" 0 R");Ht.publish("putShadingPatternDict"),Z(">>")}},qt=function(Y){if(Object.keys(Ze).length>0){for(var ke in Z("/Pattern <<"),Ze)Ze.hasOwnProperty(ke)&&Ze[ke]instanceof m.TilingPattern&&Ze[ke].objectNumber>=0&&Ze[ke].objectNumber>")}},wa=function(){if(Object.keys(Xe).length>0){var Y;for(Y in Z("/ExtGState <<"),Xe)Xe.hasOwnProperty(Y)&&Xe[Y].objectNumber>=0&&Z("/"+Y+" "+Xe[Y].objectNumber+" 0 R");Ht.publish("putGStateDict"),Z(">>")}},Le=function(Y){Xt(Y.resourcesOid,!0),Z("<<"),Z("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Vt(),Jt(),qt(Y.objectOid),wa(),Ut(),Z(">>"),Z("endobj")},ep=function(){var Y=[];vt(),$t(),Tt(),ve(Y),Ht.publish("putResources"),Y.forEach(Le),Le({resourcesOid:yn,objectOid:Number.MAX_SAFE_INTEGER}),Ht.publish("postPutResources")},Je=function(){Ht.publish("putAdditionalObjects");for(var Y=0;Y>8&&(ba=!0);Y=zn.join("")}for(Ke=Y.length;ba===void 0&&Ke!==0;)Y.charCodeAt(Ke-1)>>8&&(ba=!0),Ke--;if(!ba)return Y;for(zn=ke.noBOM?[]:[254,255],Ke=0,ut=Y.length;Ke>8)>>8)throw new Error("Character at position "+Ke+" of string '"+Y+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");zn.push(Xa),zn.push(Ja-(Xa<<8))}return String.fromCharCode.apply(void 0,zn)},_r=m.__private__.pdfEscape=m.pdfEscape=function(Y,ke){return hr(Y,ke).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},lc=m.__private__.beginPage=function(Y){le[++zt]=[],Ct[zt]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(Y[0]),topRightY:Number(Y[1])}},Fy(zt),fe(le[j])},Pg=function(Y,ke){var Ke,ut,kt;switch(n=ke||n,typeof Y=="string"&&(Ke=b(Y.toLowerCase()),Array.isArray(Ke)&&(ut=Ke[0],kt=Ke[1])),Array.isArray(Y)&&(ut=Y[0]*ie,kt=Y[1]*ie),isNaN(ut)&&(ut=r[0],kt=r[1]),(ut>14400||kt>14400)&&(Fi.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ut=Math.min(14400,ut),kt=Math.min(14400,kt)),r=[ut,kt],n.substr(0,1)){case"l":kt>ut&&(r=[kt,ut]);break;case"p":ut>kt&&(r=[kt,ut])}lc(r),V(z),Z(ct),rn!==0&&Z(rn+" J"),pa!==0&&Z(pa+" j"),Ht.publish("addPage",{pageNumber:zt})},tp=function(Y){Y>0&&Y<=zt&&(le.splice(Y,1),Ct.splice(Y,1),zt--,j>zt&&(j=zt),this.setPage(j))},Fy=function(Y){Y>0&&Y<=zt&&(j=Y)},dm=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return le.length-1},Fg=function(Y,ke,Ke){var ut,kt=void 0;return Ke=Ke||{},Y=Y!==void 0?Y:Se[Ie].fontName,ke=ke!==void 0?ke:Se[Ie].fontStyle,ut=Y.toLowerCase(),Ve[ut]!==void 0&&Ve[ut][ke]!==void 0?kt=Ve[ut][ke]:Ve[Y]!==void 0&&Ve[Y][ke]!==void 0?kt=Ve[Y][ke]:Ke.disableWarning===!1&&Fi.warn("Unable to look up font label for font '"+Y+"', '"+ke+"'. Refer to getFontList() for available fonts."),kt||Ke.noFallback||(kt=Ve.times[ke])==null&&(kt=Ve.times.normal),kt},ls=m.__private__.putInfo=function(){var Y=dn(),ke=function(ut){return ut};for(var Ke in d!==null&&(ke=Ur.encryptor(Y,0)),Z("<<"),Z("/Producer ("+_r(ke("jsPDF "+Ea.version))+")"),we)we.hasOwnProperty(Ke)&&we[Ke]&&Z("/"+Ke.substr(0,1).toUpperCase()+Ke.substr(1)+" ("+_r(ke(we[Ke]))+")");Z("/CreationDate ("+_r(ke(T))+")"),Z(">>"),Z("endobj")},Qu=m.__private__.putCatalog=function(Y){var ke=(Y=Y||{}).rootDictionaryObjId||ga;switch(dn(),Z("<<"),Z("/Type /Catalog"),Z("/Pages "+ke+" 0 R"),nt||(nt="fullwidth"),nt){case"fullwidth":Z("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Z("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Z("/OpenAction [3 0 R /Fit]");break;case"original":Z("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Ke=""+nt;Ke.substr(Ke.length-1)==="%"&&(nt=parseInt(nt)/100),typeof nt=="number"&&Z("/OpenAction [3 0 R /XYZ null null "+I(nt)+"]")}switch(Pe||(Pe="continuous"),Pe){case"continuous":Z("/PageLayout /OneColumn");break;case"single":Z("/PageLayout /SinglePage");break;case"two":case"twoleft":Z("/PageLayout /TwoColumnLeft");break;case"tworight":Z("/PageLayout /TwoColumnRight")}Ge&&Z("/PageMode /"+Ge),Ht.publish("putCatalog"),Z(">>"),Z("endobj")},Ts=m.__private__.putTrailer=function(){Z("trailer"),Z("<<"),Z("/Size "+(X+1)),Z("/Root "+X+" 0 R"),Z("/Info "+(X-1)+" 0 R"),d!==null&&Z("/Encrypt "+Ur.oid+" 0 R"),Z("/ID [ <"+D+"> <"+D+"> ]"),Z(">>")},gf=m.__private__.putHeader=function(){Z("%PDF-"+g),Z("%ºß¬à")},gd=m.__private__.putXRef=function(){var Y="0000000000";Z("xref"),Z("0 "+(X+1)),Z("0000000000 65535 f ");for(var ke=1;ke<=X;ke++)typeof ne[ke]=="function"?Z((Y+ne[ke]()).slice(-10)+" 00000 n "):ne[ke]!==void 0?Z((Y+ne[ke]).slice(-10)+" 00000 n "):Z("0000000000 00000 n ")},uc=m.__private__.buildDocument=function(){ce(),fe(oe),Ht.publish("buildDocument"),gf(),_n(),Je(),ep(),d!==null&&Pt(),ls(),Qu();var Y=ee;return gd(),Ts(),Z("startxref"),Z(""+Y),Z("%%EOF"),fe(le[j]),oe.join(` `)},dc=m.__private__.getBlob=function(Y){return new Blob([ae(Y)],{type:"application/pdf"})},pm=m.output=m.__private__.output=So(function(Y,ke){switch(typeof(ke=ke||{})=="string"?ke={filename:ke}:ke.filename=ke.filename||"generated.pdf",Y){case void 0:return uc();case"save":m.save(ke.filename);break;case"arraybuffer":return ae(uc());case"blob":return dc(uc());case"bloburi":case"bloburl":if(Ra.URL!==void 0&&typeof Ra.URL.createObjectURL=="function")return Ra.URL&&Ra.URL.createObjectURL(dc(uc()))||void 0;Fi.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Ke="",ut=uc();try{Ke=Uee(ut)}catch{Ke=Uee(unescape(encodeURIComponent(ut)))}return"data:application/pdf;filename="+ke.filename+";base64,"+Ke;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ra)==="[object Window]"){var kt="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Yt=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';ke.pdfObjectUrl&&(kt=ke.pdfObjectUrl,Yt="");var fn='