var He=Object.defineProperty;var Ve=(e,t,n)=>t in e?He(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>(Ve(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const A of document.querySelectorAll('link[rel="modulepreload"]'))r(A);new MutationObserver(A=>{for(const S of A)if(S.type==="childList")for(const E of S.addedNodes)E.tagName==="LINK"&&E.rel==="modulepreload"&&r(E)}).observe(document,{childList:!0,subtree:!0});function n(A){const S={};return A.integrity&&(S.integrity=A.integrity),A.referrerPolicy&&(S.referrerPolicy=A.referrerPolicy),A.crossOrigin==="use-credentials"?S.credentials="include":A.crossOrigin==="anonymous"?S.credentials="omit":S.credentials="same-origin",S}function r(A){if(A.ep)return;A.ep=!0;const S=n(A);fetch(A.href,S)}})();const bulma="",bulmaHelpers_min="",fontAwesomeAnimation_min="";function ownKeys$2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(A){return Object.getOwnPropertyDescriptor(e,A).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2$1(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;A--){var S=n[A],E=(S.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(E)>-1&&(r=S)}return DOCUMENT.head.insertBefore(t,r),e}}var idPool="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function nextUniqueId(){for(var e=12,t="";e-- >0;)t+=idPool[Math.random()*62|0];return t}function toArray$1(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function classArray(e){return e.classList?toArray$1(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function htmlEscape(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function joinAttributes(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(htmlEscape(e[n]),'" ')},"").trim()}function joinStyles(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function transformIsMeaningful(e){return e.size!==meaninglessTransform.size||e.x!==meaninglessTransform.x||e.y!==meaninglessTransform.y||e.rotate!==meaninglessTransform.rotate||e.flipX||e.flipY}function transformForSvg(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,A={transform:"translate(".concat(n/2," 256)")},S="translate(".concat(t.x*32,", ").concat(t.y*32,") "),E="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),T="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(S," ").concat(E," ").concat(T)},C={transform:"translate(".concat(r/2*-1," -256)")};return{outer:A,inner:c,path:C}}function transformForCss(e){var t=e.transform,n=e.width,r=n===void 0?UNITS_IN_GRID:n,A=e.height,S=A===void 0?UNITS_IN_GRID:A,E=e.startCentered,T=E===void 0?!1:E,c="";return T&&IS_IE?c+="translate(".concat(t.x/d$1-r/2,"em, ").concat(t.y/d$1-S/2,"em) "):T?c+="translate(calc(-50% + ".concat(t.x/d$1,"em), calc(-50% + ").concat(t.y/d$1,"em)) "):c+="translate(".concat(t.x/d$1,"em, ").concat(t.y/d$1,"em) "),c+="scale(".concat(t.size/d$1*(t.flipX?-1:1),", ").concat(t.size/d$1*(t.flipY?-1:1),") "),c+="rotate(".concat(t.rotate,"deg) "),c}var baseStyles=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; } svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { overflow: visible; box-sizing: content-box; } .svg-inline--fa { display: var(--fa-display, inline-block); height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-2xs { vertical-align: 0.1em; } .svg-inline--fa.fa-xs { vertical-align: 0em; } .svg-inline--fa.fa-sm { vertical-align: -0.0714285705em; } .svg-inline--fa.fa-lg { vertical-align: -0.2em; } .svg-inline--fa.fa-xl { vertical-align: -0.25em; } .svg-inline--fa.fa-2xl { vertical-align: -0.3125em; } .svg-inline--fa.fa-pull-left { margin-right: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-pull-right { margin-left: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-li { width: var(--fa-li-width, 2em); top: 0.25em; } .svg-inline--fa.fa-fw { width: var(--fa-fw-width, 1.25em); } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-text { left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter { background-color: var(--fa-counter-background-color, #ff253a); border-radius: var(--fa-counter-border-radius, 1em); box-sizing: border-box; color: var(--fa-inverse, #fff); line-height: var(--fa-counter-line-height, 1); max-width: var(--fa-counter-max-width, 5em); min-width: var(--fa-counter-min-width, 1.5em); overflow: hidden; padding: var(--fa-counter-padding, 0.25em 0.5em); right: var(--fa-right, 0); text-overflow: ellipsis; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-counter-scale, 0.25)); transform: scale(var(--fa-counter-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-bottom-right { bottom: var(--fa-bottom, 0); right: var(--fa-right, 0); top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .fa-layers-bottom-left { bottom: var(--fa-bottom, 0); left: var(--fa-left, 0); right: auto; top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom left; transform-origin: bottom left; } .fa-layers-top-right { top: var(--fa-top, 0); right: var(--fa-right, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-top-left { left: var(--fa-left, 0); right: auto; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top left; transform-origin: top left; } .fa-1x { font-size: 1em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-6x { font-size: 6em; } .fa-7x { font-size: 7em; } .fa-8x { font-size: 8em; } .fa-9x { font-size: 9em; } .fa-10x { font-size: 10em; } .fa-2xs { font-size: 0.625em; line-height: 0.1em; vertical-align: 0.225em; } .fa-xs { font-size: 0.75em; line-height: 0.0833333337em; vertical-align: 0.125em; } .fa-sm { font-size: 0.875em; line-height: 0.0714285718em; vertical-align: 0.0535714295em; } .fa-lg { font-size: 1.25em; line-height: 0.05em; vertical-align: -0.075em; } .fa-xl { font-size: 1.5em; line-height: 0.0416666682em; vertical-align: -0.125em; } .fa-2xl { font-size: 2em; line-height: 0.03125em; vertical-align: -0.1875em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: var(--fa-li-margin, 2.5em); padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: calc(var(--fa-li-width, 2em) * -1); position: absolute; text-align: center; width: var(--fa-li-width, 2em); line-height: inherit; } .fa-border { border-color: var(--fa-border-color, #eee); border-radius: var(--fa-border-radius, 0.1em); border-style: var(--fa-border-style, solid); border-width: var(--fa-border-width, 0.08em); padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); } .fa-pull-left { float: left; margin-right: var(--fa-pull-margin, 0.3em); } .fa-pull-right { float: right; margin-left: var(--fa-pull-margin, 0.3em); } .fa-beat { -webkit-animation-name: fa-beat; animation-name: fa-beat; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-bounce { -webkit-animation-name: fa-bounce; animation-name: fa-bounce; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); } .fa-fade { -webkit-animation-name: fa-fade; animation-name: fa-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-beat-fade { -webkit-animation-name: fa-beat-fade; animation-name: fa-beat-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-flip { -webkit-animation-name: fa-flip; animation-name: fa-flip; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-shake { -webkit-animation-name: fa-shake; animation-name: fa-shake; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 2s); animation-duration: var(--fa-animation-duration, 2s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin-reverse { --fa-animation-direction: reverse; } .fa-pulse, .fa-spin-pulse { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); animation-timing-function: var(--fa-animation-timing, steps(8)); } @media (prefers-reduced-motion: reduce) { .fa-beat, .fa-bounce, .fa-fade, .fa-beat-fade, .fa-flip, .fa-pulse, .fa-shake, .fa-spin, .fa-spin-pulse { -webkit-animation-delay: -1ms; animation-delay: -1ms; -webkit-animation-duration: 1ms; animation-duration: 1ms; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-transition-delay: 0s; transition-delay: 0s; -webkit-transition-duration: 0s; transition-duration: 0s; } } @-webkit-keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @-webkit-keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @-webkit-keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @-webkit-keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @-webkit-keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @-webkit-keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .fa-rotate-90 { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -webkit-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -webkit-transform: scale(1, -1); transform: scale(1, -1); } .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -webkit-transform: scale(-1, -1); transform: scale(-1, -1); } .fa-rotate-by { -webkit-transform: rotate(var(--fa-rotate-angle, none)); transform: rotate(var(--fa-rotate-angle, none)); } .fa-stack { display: inline-block; vertical-align: middle; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: var(--fa-stack-z-index, auto); } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: var(--fa-inverse, #fff); } .sr-only, .fa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .sr-only-focusable:not(:focus), .fa-sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); }`;function css(){var e=DEFAULT_CSS_PREFIX,t=DEFAULT_REPLACEMENT_CLASS,n=config.cssPrefix,r=config.replacementClass,A=baseStyles;if(n!==e||r!==t){var S=new RegExp("\\.".concat(e,"\\-"),"g"),E=new RegExp("\\--".concat(e,"\\-"),"g"),T=new RegExp("\\.".concat(t),"g");A=A.replace(S,".".concat(n,"-")).replace(E,"--".concat(n,"-")).replace(T,".".concat(r))}return A}var _cssInserted=!1;function ensureCss(){config.autoAddCss&&!_cssInserted&&(insertCss(css()),_cssInserted=!0)}var InjectCSS={mixout:function(){return{dom:{css,insertCss:ensureCss}}},hooks:function(){return{beforeDOMElementCreation:function(){ensureCss()},beforeI2svg:function(){ensureCss()}}}},w$1=WINDOW||{};w$1[NAMESPACE_IDENTIFIER]||(w$1[NAMESPACE_IDENTIFIER]={});w$1[NAMESPACE_IDENTIFIER].styles||(w$1[NAMESPACE_IDENTIFIER].styles={});w$1[NAMESPACE_IDENTIFIER].hooks||(w$1[NAMESPACE_IDENTIFIER].hooks={});w$1[NAMESPACE_IDENTIFIER].shims||(w$1[NAMESPACE_IDENTIFIER].shims=[]);var namespace=w$1[NAMESPACE_IDENTIFIER],functions=[],listener=function e(){DOCUMENT.removeEventListener("DOMContentLoaded",e),loaded=1,functions.map(function(t){return t()})},loaded=!1;IS_DOM&&(loaded=(DOCUMENT.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(DOCUMENT.readyState),loaded||DOCUMENT.addEventListener("DOMContentLoaded",listener));function domready(e){IS_DOM&&(loaded?setTimeout(e,0):functions.push(e))}function toHtml(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,A=e.children,S=A===void 0?[]:A;return typeof e=="string"?htmlEscape(e):"<".concat(t," ").concat(joinAttributes(r),">").concat(S.map(toHtml).join(""),"")}function iconFromMapping(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var bindInternal4=function(t,n){return function(r,A,S,E){return t.call(n,r,A,S,E)}},reduce=function(t,n,r,A){var S=Object.keys(t),E=S.length,T=A!==void 0?bindInternal4(n,A):n,c,C,o;for(r===void 0?(c=1,o=t[S[0]]):(c=0,o=r);c=55296&&A<=56319&&n=55296&&r<=56319&&n>t+1&&(A=e.charCodeAt(t+1),A>=56320&&A<=57343)?(r-55296)*1024+A-56320+65536:r}function normalizeIcons(e){return Object.keys(e).reduce(function(t,n){var r=e[n],A=!!r.icon;return A?t[r.iconName]=r.icon:t[n]=r,t},{})}function defineIcons(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,A=r===void 0?!1:r,S=normalizeIcons(t);typeof namespace.hooks.addPack=="function"&&!A?namespace.hooks.addPack(e,normalizeIcons(t)):namespace.styles[e]=_objectSpread2$1(_objectSpread2$1({},namespace.styles[e]||{}),S),e==="fas"&&defineIcons("fa",t)}var _LONG_STYLE,_PREFIXES,_PREFIXES_FOR_FAMILY,styles$1=namespace.styles,shims=namespace.shims,LONG_STYLE=(_LONG_STYLE={},_defineProperty$1(_LONG_STYLE,FAMILY_CLASSIC,Object.values(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])),_defineProperty$1(_LONG_STYLE,FAMILY_SHARP,Object.values(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])),_LONG_STYLE),_defaultUsablePrefix=null,_byUnicode={},_byLigature={},_byOldName={},_byOldUnicode={},_byAlias={},PREFIXES=(_PREFIXES={},_defineProperty$1(_PREFIXES,FAMILY_CLASSIC,Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC])),_defineProperty$1(_PREFIXES,FAMILY_SHARP,Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP])),_PREFIXES);function isReserved(e){return~RESERVED_CLASSES.indexOf(e)}function getIconName(e,t){var n=t.split("-"),r=n[0],A=n.slice(1).join("-");return r===e&&A!==""&&!isReserved(A)?A:null}var build=function(){var t=function(S){return reduce(styles$1,function(E,T,c){return E[c]=reduce(T,S,{}),E},{})};_byUnicode=t(function(A,S,E){if(S[3]&&(A[S[3]]=E),S[2]){var T=S[2].filter(function(c){return typeof c=="number"});T.forEach(function(c){A[c.toString(16)]=E})}return A}),_byLigature=t(function(A,S,E){if(A[E]=E,S[2]){var T=S[2].filter(function(c){return typeof c=="string"});T.forEach(function(c){A[c]=E})}return A}),_byAlias=t(function(A,S,E){var T=S[2];return A[E]=E,T.forEach(function(c){A[c]=E}),A});var n="far"in styles$1||config.autoFetchSvg,r=reduce(shims,function(A,S){var E=S[0],T=S[1],c=S[2];return T==="far"&&!n&&(T="fas"),typeof E=="string"&&(A.names[E]={prefix:T,iconName:c}),typeof E=="number"&&(A.unicodes[E.toString(16)]={prefix:T,iconName:c}),A},{names:{},unicodes:{}});_byOldName=r.names,_byOldUnicode=r.unicodes,_defaultUsablePrefix=getCanonicalPrefix(config.styleDefault,{family:config.familyDefault})};onChange(function(e){_defaultUsablePrefix=getCanonicalPrefix(e.styleDefault,{family:config.familyDefault})});build();function byUnicode(e,t){return(_byUnicode[e]||{})[t]}function byLigature(e,t){return(_byLigature[e]||{})[t]}function byAlias(e,t){return(_byAlias[e]||{})[t]}function byOldName(e){return _byOldName[e]||{prefix:null,iconName:null}}function byOldUnicode(e){var t=_byOldUnicode[e],n=byUnicode("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function getDefaultUsablePrefix(){return _defaultUsablePrefix}var emptyCanonicalIcon=function(){return{prefix:null,iconName:null,rest:[]}};function getCanonicalPrefix(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?FAMILY_CLASSIC:n,A=PREFIX_TO_STYLE[r][e],S=STYLE_TO_PREFIX[r][e]||STYLE_TO_PREFIX[r][A],E=e in namespace.styles?e:null;return S||E||null}var PREFIXES_FOR_FAMILY=(_PREFIXES_FOR_FAMILY={},_defineProperty$1(_PREFIXES_FOR_FAMILY,FAMILY_CLASSIC,Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])),_defineProperty$1(_PREFIXES_FOR_FAMILY,FAMILY_SHARP,Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])),_PREFIXES_FOR_FAMILY);function getCanonicalIcon(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,A=r===void 0?!1:r,S=(t={},_defineProperty$1(t,FAMILY_CLASSIC,"".concat(config.cssPrefix,"-").concat(FAMILY_CLASSIC)),_defineProperty$1(t,FAMILY_SHARP,"".concat(config.cssPrefix,"-").concat(FAMILY_SHARP)),t),E=null,T=FAMILY_CLASSIC;(e.includes(S[FAMILY_CLASSIC])||e.some(function(C){return PREFIXES_FOR_FAMILY[FAMILY_CLASSIC].includes(C)}))&&(T=FAMILY_CLASSIC),(e.includes(S[FAMILY_SHARP])||e.some(function(C){return PREFIXES_FOR_FAMILY[FAMILY_SHARP].includes(C)}))&&(T=FAMILY_SHARP);var c=e.reduce(function(C,o){var a=getIconName(config.cssPrefix,o);if(styles$1[o]?(o=LONG_STYLE[T].includes(o)?LONG_STYLE_TO_PREFIX[T][o]:o,E=o,C.prefix=o):PREFIXES[T].indexOf(o)>-1?(E=o,C.prefix=getCanonicalPrefix(o,{family:T})):a?C.iconName=a:o!==config.replacementClass&&o!==S[FAMILY_CLASSIC]&&o!==S[FAMILY_SHARP]&&C.rest.push(o),!A&&C.prefix&&C.iconName){var $=E==="fa"?byOldName(C.iconName):{},l=byAlias(C.prefix,C.iconName);$.prefix&&(E=null),C.iconName=$.iconName||l||C.iconName,C.prefix=$.prefix||C.prefix,C.prefix==="far"&&!styles$1.far&&styles$1.fas&&!config.autoFetchSvg&&(C.prefix="fas")}return C},emptyCanonicalIcon());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&T===FAMILY_SHARP&&(styles$1.fass||config.autoFetchSvg)&&(c.prefix="fass",c.iconName=byAlias(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||E==="fa")&&(c.prefix=getDefaultUsablePrefix()||"fas"),c}var Library=function(){function e(){_classCallCheck(this,e),this.definitions={}}return _createClass(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,A=new Array(r),S=0;S0&&o.forEach(function(a){typeof a=="string"&&(n[T][a]=C)}),n[T][c]=C}),n}}]),e}(),_plugins=[],_hooks={},providers={},defaultProviderKeys=Object.keys(providers);function registerPlugins(e,t){var n=t.mixoutsTo;return _plugins=e,_hooks={},Object.keys(providers).forEach(function(r){defaultProviderKeys.indexOf(r)===-1&&delete providers[r]}),_plugins.forEach(function(r){var A=r.mixout?r.mixout():{};if(Object.keys(A).forEach(function(E){typeof A[E]=="function"&&(n[E]=A[E]),_typeof$1(A[E])==="object"&&Object.keys(A[E]).forEach(function(T){n[E]||(n[E]={}),n[E][T]=A[E][T]})}),r.hooks){var S=r.hooks();Object.keys(S).forEach(function(E){_hooks[E]||(_hooks[E]=[]),_hooks[E].push(S[E])})}r.provides&&r.provides(providers)}),n}function chainHooks(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),A=2;A1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return IS_DOM?(callHooks("beforeI2svg",t),callProvided("pseudoElements2svg",t),callProvided("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;config.autoReplaceSvg===!1&&(config.autoReplaceSvg=!0),config.observeMutations=!0,domready(function(){autoReplace({autoReplaceSvgRoot:n}),callHooks("watch",t)})}},parse={icon:function(t){if(t===null)return null;if(_typeof$1(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:byAlias(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=getCanonicalPrefix(t[0]);return{prefix:r,iconName:byAlias(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(config.cssPrefix,"-"))>-1||t.match(ICON_SELECTION_SYNTAX_PATTERN))){var A=getCanonicalIcon(t.split(" "),{skipLookups:!0});return{prefix:A.prefix||getDefaultUsablePrefix(),iconName:byAlias(A.prefix,A.iconName)||A.iconName}}if(typeof t=="string"){var S=getDefaultUsablePrefix();return{prefix:S,iconName:byAlias(S,t)||t}}}},api={noAuto,config,dom,parse,library,findIconDefinition,toHtml},autoReplace=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?DOCUMENT:n;(Object.keys(namespace.styles).length>0||config.autoFetchSvg)&&IS_DOM&&config.autoReplaceSvg&&api.dom.i2svg({node:r})};function domVariants(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return toHtml(r)})}}),Object.defineProperty(e,"node",{get:function(){if(IS_DOM){var r=DOCUMENT.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function asIcon(e){var t=e.children,n=e.main,r=e.mask,A=e.attributes,S=e.styles,E=e.transform;if(transformIsMeaningful(E)&&n.found&&!r.found){var T=n.width,c=n.height,C={x:T/c/2,y:.5};A.style=joinStyles(_objectSpread2$1(_objectSpread2$1({},S),{},{"transform-origin":"".concat(C.x+E.x/16,"em ").concat(C.y+E.y/16,"em")}))}return[{tag:"svg",attributes:A,children:t}]}function asSymbol(e){var t=e.prefix,n=e.iconName,r=e.children,A=e.attributes,S=e.symbol,E=S===!0?"".concat(t,"-").concat(config.cssPrefix,"-").concat(n):S;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:_objectSpread2$1(_objectSpread2$1({},A),{},{id:E}),children:r}]}]}function makeInlineSvgAbstract(e){var t=e.icons,n=t.main,r=t.mask,A=e.prefix,S=e.iconName,E=e.transform,T=e.symbol,c=e.title,C=e.maskId,o=e.titleId,a=e.extra,$=e.watchable,l=$===void 0?!1:$,f=r.found?r:n,R=f.width,x=f.height,L=A==="fak",M=[config.replacementClass,S?"".concat(config.cssPrefix,"-").concat(S):""].filter(function(z){return a.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(a.classes).join(" "),V={children:[],attributes:_objectSpread2$1(_objectSpread2$1({},a.attributes),{},{"data-prefix":A,"data-icon":S,class:M,role:a.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(R," ").concat(x)})},D=L&&!~a.classes.indexOf("fa-fw")?{width:"".concat(R/x*16*.0625,"em")}:{};l&&(V.attributes[DATA_FA_I2SVG]=""),c&&(V.children.push({tag:"title",attributes:{id:V.attributes["aria-labelledby"]||"title-".concat(o||nextUniqueId())},children:[c]}),delete V.attributes.title);var F=_objectSpread2$1(_objectSpread2$1({},V),{},{prefix:A,iconName:S,main:n,mask:r,maskId:C,transform:E,symbol:T,styles:_objectSpread2$1(_objectSpread2$1({},D),a.styles)}),P=r.found&&n.found?callProvided("generateAbstractMask",F)||{children:[],attributes:{}}:callProvided("generateAbstractIcon",F)||{children:[],attributes:{}},X=P.children,U=P.attributes;return F.children=X,F.attributes=U,T?asSymbol(F):asIcon(F)}function makeLayersTextAbstract(e){var t=e.content,n=e.width,r=e.height,A=e.transform,S=e.title,E=e.extra,T=e.watchable,c=T===void 0?!1:T,C=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},E.attributes),S?{title:S}:{}),{},{class:E.classes.join(" ")});c&&(C[DATA_FA_I2SVG]="");var o=_objectSpread2$1({},E.styles);transformIsMeaningful(A)&&(o.transform=transformForCss({transform:A,startCentered:!0,width:n,height:r}),o["-webkit-transform"]=o.transform);var a=joinStyles(o);a.length>0&&(C.style=a);var $=[];return $.push({tag:"span",attributes:C,children:[t]}),S&&$.push({tag:"span",attributes:{class:"sr-only"},children:[S]}),$}function makeLayersCounterAbstract(e){var t=e.content,n=e.title,r=e.extra,A=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),S=joinStyles(r.styles);S.length>0&&(A.style=S);var E=[];return E.push({tag:"span",attributes:A,children:[t]}),n&&E.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),E}var styles$1$1=namespace.styles;function asFoundIcon(e){var t=e[0],n=e[1],r=e.slice(4),A=_slicedToArray(r,1),S=A[0],E=null;return Array.isArray(S)?E={tag:"g",attributes:{class:"".concat(config.cssPrefix,"-").concat(DUOTONE_CLASSES.GROUP)},children:[{tag:"path",attributes:{class:"".concat(config.cssPrefix,"-").concat(DUOTONE_CLASSES.SECONDARY),fill:"currentColor",d:S[0]}},{tag:"path",attributes:{class:"".concat(config.cssPrefix,"-").concat(DUOTONE_CLASSES.PRIMARY),fill:"currentColor",d:S[1]}}]}:E={tag:"path",attributes:{fill:"currentColor",d:S}},{found:!0,width:t,height:n,icon:E}}var missingIconResolutionMixin={found:!1,width:512,height:512};function maybeNotifyMissing(e,t){!PRODUCTION$1&&!config.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function findIcon(e,t){var n=t;return t==="fa"&&config.styleDefault!==null&&(t=getDefaultUsablePrefix()),new Promise(function(r,A){if(callProvided("missingIconAbstract"),n==="fa"){var S=byOldName(e)||{};e=S.iconName||e,t=S.prefix||t}if(e&&t&&styles$1$1[t]&&styles$1$1[t][e]){var E=styles$1$1[t][e];return r(asFoundIcon(E))}maybeNotifyMissing(e,t),r(_objectSpread2$1(_objectSpread2$1({},missingIconResolutionMixin),{},{icon:config.showMissingIcons&&e?callProvided("missingIconAbstract")||{}:{}}))})}var noop$1$1=function(){},p$1=config.measurePerformance&&PERFORMANCE&&PERFORMANCE.mark&&PERFORMANCE.measure?PERFORMANCE:{mark:noop$1$1,measure:noop$1$1},preamble='FA "6.4.2"',begin=function(t){return p$1.mark("".concat(preamble," ").concat(t," begins")),function(){return end(t)}},end=function(t){p$1.mark("".concat(preamble," ").concat(t," ends")),p$1.measure("".concat(preamble," ").concat(t),"".concat(preamble," ").concat(t," begins"),"".concat(preamble," ").concat(t," ends"))},perf={begin,end},noop$2$1=function(){};function isWatched(e){var t=e.getAttribute?e.getAttribute(DATA_FA_I2SVG):null;return typeof t=="string"}function hasPrefixAndIcon(e){var t=e.getAttribute?e.getAttribute(DATA_PREFIX):null,n=e.getAttribute?e.getAttribute(DATA_ICON):null;return t&&n}function hasBeenReplaced(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(config.replacementClass)}function getMutator(){if(config.autoReplaceSvg===!0)return mutators.replace;var e=mutators[config.autoReplaceSvg];return e||mutators.replace}function createElementNS(e){return DOCUMENT.createElementNS("http://www.w3.org/2000/svg",e)}function createElement(e){return DOCUMENT.createElement(e)}function convertSVG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?createElementNS:createElement:n;if(typeof e=="string")return DOCUMENT.createTextNode(e);var A=r(e.tag);Object.keys(e.attributes||[]).forEach(function(E){A.setAttribute(E,e.attributes[E])});var S=e.children||[];return S.forEach(function(E){A.appendChild(convertSVG(E,{ceFn:r}))}),A}function nodeAsComment(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var mutators={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(A){n.parentNode.insertBefore(convertSVG(A),n)}),n.getAttribute(DATA_FA_I2SVG)===null&&config.keepOriginalSource){var r=DOCUMENT.createComment(nodeAsComment(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~classArray(n).indexOf(config.replacementClass))return mutators.replace(t);var A=new RegExp("".concat(config.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var S=r[0].attributes.class.split(" ").reduce(function(T,c){return c===config.replacementClass||c.match(A)?T.toSvg.push(c):T.toNode.push(c),T},{toNode:[],toSvg:[]});r[0].attributes.class=S.toSvg.join(" "),S.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",S.toNode.join(" "))}var E=r.map(function(T){return toHtml(T)}).join(` `);n.setAttribute(DATA_FA_I2SVG,""),n.innerHTML=E}};function performOperationSync(e){e()}function perform(e,t){var n=typeof t=="function"?t:noop$2$1;if(e.length===0)n();else{var r=performOperationSync;config.mutateApproach===MUTATION_APPROACH_ASYNC&&(r=WINDOW.requestAnimationFrame||performOperationSync),r(function(){var A=getMutator(),S=perf.begin("mutate");e.map(A),S(),n()})}}var disabled=!1;function disableObservation(){disabled=!0}function enableObservation(){disabled=!1}var mo=null;function observe(e){if(MUTATION_OBSERVER&&config.observeMutations){var t=e.treeCallback,n=t===void 0?noop$2$1:t,r=e.nodeCallback,A=r===void 0?noop$2$1:r,S=e.pseudoElementsCallback,E=S===void 0?noop$2$1:S,T=e.observeMutationsRoot,c=T===void 0?DOCUMENT:T;mo=new MUTATION_OBSERVER(function(C){if(!disabled){var o=getDefaultUsablePrefix();toArray$1(C).forEach(function(a){if(a.type==="childList"&&a.addedNodes.length>0&&!isWatched(a.addedNodes[0])&&(config.searchPseudoElements&&E(a.target),n(a.target)),a.type==="attributes"&&a.target.parentNode&&config.searchPseudoElements&&E(a.target.parentNode),a.type==="attributes"&&isWatched(a.target)&&~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(a.attributeName))if(a.attributeName==="class"&&hasPrefixAndIcon(a.target)){var $=getCanonicalIcon(classArray(a.target)),l=$.prefix,f=$.iconName;a.target.setAttribute(DATA_PREFIX,l||o),f&&a.target.setAttribute(DATA_ICON,f)}else hasBeenReplaced(a.target)&&A(a.target)})}}),IS_DOM&&mo.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function disconnect(){mo&&mo.disconnect()}function styleParser(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,A){var S=A.split(":"),E=S[0],T=S.slice(1);return E&&T.length>0&&(r[E]=T.join(":").trim()),r},{})),n}function classParser(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",A=getCanonicalIcon(classArray(e));return A.prefix||(A.prefix=getDefaultUsablePrefix()),t&&n&&(A.prefix=t,A.iconName=n),A.iconName&&A.prefix||(A.prefix&&r.length>0&&(A.iconName=byLigature(A.prefix,e.innerText)||byUnicode(A.prefix,toHex(e.innerText))),!A.iconName&&config.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(A.iconName=e.firstChild.data)),A}function attributesParser(e){var t=toArray$1(e.attributes).reduce(function(A,S){return A.name!=="class"&&A.name!=="style"&&(A[S.name]=S.value),A},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return config.autoA11y&&(n?t["aria-labelledby"]="".concat(config.replacementClass,"-title-").concat(r||nextUniqueId()):(t["aria-hidden"]="true",t.focusable="false")),t}function blankMeta(){return{iconName:null,title:null,titleId:null,prefix:null,transform:meaninglessTransform,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function parseMeta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=classParser(e),r=n.iconName,A=n.prefix,S=n.rest,E=attributesParser(e),T=chainHooks("parseNodeAttributes",{},e),c=t.styleParser?styleParser(e):[];return _objectSpread2$1({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:A,transform:meaninglessTransform,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:S,styles:c,attributes:E}},T)}var styles$2=namespace.styles;function generateMutation(e){var t=config.autoReplaceSvg==="nest"?parseMeta(e,{styleParser:!1}):parseMeta(e);return~t.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)?callProvided("generateLayersText",e,t):callProvided("generateSvgReplacementMutation",e,t)}var knownPrefixes=new Set;FAMILIES.map(function(e){knownPrefixes.add("fa-".concat(e))});Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC]).map(knownPrefixes.add.bind(knownPrefixes));Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP]).map(knownPrefixes.add.bind(knownPrefixes));knownPrefixes=_toConsumableArray(knownPrefixes);function onTree(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!IS_DOM)return Promise.resolve();var n=DOCUMENT.documentElement.classList,r=function(a){return n.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS,"-").concat(a))},A=function(a){return n.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS,"-").concat(a))},S=config.autoFetchSvg?knownPrefixes:FAMILIES.map(function(o){return"fa-".concat(o)}).concat(Object.keys(styles$2));S.includes("fa")||S.push("fa");var E=[".".concat(LAYERS_TEXT_CLASSNAME,":not([").concat(DATA_FA_I2SVG,"])")].concat(S.map(function(o){return".".concat(o,":not([").concat(DATA_FA_I2SVG,"])")})).join(", ");if(E.length===0)return Promise.resolve();var T=[];try{T=toArray$1(e.querySelectorAll(E))}catch{}if(T.length>0)r("pending"),A("complete");else return Promise.resolve();var c=perf.begin("onTree"),C=T.reduce(function(o,a){try{var $=generateMutation(a);$&&o.push($)}catch(l){PRODUCTION$1||l.name==="MissingIcon"&&console.error(l)}return o},[]);return new Promise(function(o,a){Promise.all(C).then(function($){perform($,function(){r("active"),r("complete"),A("pending"),typeof t=="function"&&t(),c(),o()})}).catch(function($){c(),a($)})})}function onNode(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;generateMutation(e).then(function(n){n&&perform([n],t)})}function resolveIcons(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:findIconDefinition(t||{}),A=n.mask;return A&&(A=(A||{}).icon?A:findIconDefinition(A||{})),e(r,_objectSpread2$1(_objectSpread2$1({},n),{},{mask:A}))}}var render$1=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,A=r===void 0?meaninglessTransform:r,S=n.symbol,E=S===void 0?!1:S,T=n.mask,c=T===void 0?null:T,C=n.maskId,o=C===void 0?null:C,a=n.title,$=a===void 0?null:a,l=n.titleId,f=l===void 0?null:l,R=n.classes,x=R===void 0?[]:R,L=n.attributes,M=L===void 0?{}:L,V=n.styles,D=V===void 0?{}:V;if(t){var F=t.prefix,P=t.iconName,X=t.icon;return domVariants(_objectSpread2$1({type:"icon"},t),function(){return callHooks("beforeDOMElementCreation",{iconDefinition:t,params:n}),config.autoA11y&&($?M["aria-labelledby"]="".concat(config.replacementClass,"-title-").concat(f||nextUniqueId()):(M["aria-hidden"]="true",M.focusable="false")),makeInlineSvgAbstract({icons:{main:asFoundIcon(X),mask:c?asFoundIcon(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:F,iconName:P,transform:_objectSpread2$1(_objectSpread2$1({},meaninglessTransform),A),symbol:E,title:$,maskId:o,titleId:f,extra:{attributes:M,styles:D,classes:x}})})}},ReplaceElements={mixout:function(){return{icon:resolveIcons(render$1)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=onTree,n.nodeCallback=onNode,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,A=r===void 0?DOCUMENT:r,S=n.callback,E=S===void 0?function(){}:S;return onTree(A,E)},t.generateSvgReplacementMutation=function(n,r){var A=r.iconName,S=r.title,E=r.titleId,T=r.prefix,c=r.transform,C=r.symbol,o=r.mask,a=r.maskId,$=r.extra;return new Promise(function(l,f){Promise.all([findIcon(A,T),o.iconName?findIcon(o.iconName,o.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(R){var x=_slicedToArray(R,2),L=x[0],M=x[1];l([n,makeInlineSvgAbstract({icons:{main:L,mask:M},prefix:T,iconName:A,transform:c,symbol:C,maskId:a,title:S,titleId:E,extra:$,watchable:!0})])}).catch(f)})},t.generateAbstractIcon=function(n){var r=n.children,A=n.attributes,S=n.main,E=n.transform,T=n.styles,c=joinStyles(T);c.length>0&&(A.style=c);var C;return transformIsMeaningful(E)&&(C=callProvided("generateAbstractTransformGrouping",{main:S,transform:E,containerWidth:S.width,iconWidth:S.width})),r.push(C||S.icon),{children:r,attributes:A}}}},Layers={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=r.classes,S=A===void 0?[]:A;return domVariants({type:"layer"},function(){callHooks("beforeDOMElementCreation",{assembler:n,params:r});var E=[];return n(function(T){Array.isArray(T)?T.map(function(c){E=E.concat(c.abstract)}):E=E.concat(T.abstract)}),[{tag:"span",attributes:{class:["".concat(config.cssPrefix,"-layers")].concat(_toConsumableArray(S)).join(" ")},children:E}]})}}}},LayersCounter={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=r.title,S=A===void 0?null:A,E=r.classes,T=E===void 0?[]:E,c=r.attributes,C=c===void 0?{}:c,o=r.styles,a=o===void 0?{}:o;return domVariants({type:"counter",content:n},function(){return callHooks("beforeDOMElementCreation",{content:n,params:r}),makeLayersCounterAbstract({content:n.toString(),title:S,extra:{attributes:C,styles:a,classes:["".concat(config.cssPrefix,"-layers-counter")].concat(_toConsumableArray(T))}})})}}}},LayersText={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=r.transform,S=A===void 0?meaninglessTransform:A,E=r.title,T=E===void 0?null:E,c=r.classes,C=c===void 0?[]:c,o=r.attributes,a=o===void 0?{}:o,$=r.styles,l=$===void 0?{}:$;return domVariants({type:"text",content:n},function(){return callHooks("beforeDOMElementCreation",{content:n,params:r}),makeLayersTextAbstract({content:n,transform:_objectSpread2$1(_objectSpread2$1({},meaninglessTransform),S),title:T,extra:{attributes:a,styles:l,classes:["".concat(config.cssPrefix,"-layers-text")].concat(_toConsumableArray(C))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var A=r.title,S=r.transform,E=r.extra,T=null,c=null;if(IS_IE){var C=parseInt(getComputedStyle(n).fontSize,10),o=n.getBoundingClientRect();T=o.width/C,c=o.height/C}return config.autoA11y&&!A&&(E.attributes["aria-hidden"]="true"),Promise.resolve([n,makeLayersTextAbstract({content:n.innerHTML,width:T,height:c,transform:S,title:A,extra:E,watchable:!0})])}}},CLEAN_CONTENT_PATTERN=new RegExp('"',"ug"),SECONDARY_UNICODE_RANGE=[1105920,1112319];function hexValueFromContent(e){var t=e.replace(CLEAN_CONTENT_PATTERN,""),n=codePointAt(t,0),r=n>=SECONDARY_UNICODE_RANGE[0]&&n<=SECONDARY_UNICODE_RANGE[1],A=t.length===2?t[0]===t[1]:!1;return{value:toHex(A?t[0]:t),isSecondary:r||A}}function replaceForPosition(e,t){var n="".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(t.replace(":","-"));return new Promise(function(r,A){if(e.getAttribute(n)!==null)return r();var S=toArray$1(e.children),E=S.filter(function(X){return X.getAttribute(DATA_FA_PSEUDO_ELEMENT)===t})[0],T=WINDOW.getComputedStyle(e,t),c=T.getPropertyValue("font-family").match(FONT_FAMILY_PATTERN),C=T.getPropertyValue("font-weight"),o=T.getPropertyValue("content");if(E&&!c)return e.removeChild(E),r();if(c&&o!=="none"&&o!==""){var a=T.getPropertyValue("content"),$=~["Sharp"].indexOf(c[2])?FAMILY_SHARP:FAMILY_CLASSIC,l=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?STYLE_TO_PREFIX[$][c[2].toLowerCase()]:FONT_WEIGHT_TO_PREFIX[$][C],f=hexValueFromContent(a),R=f.value,x=f.isSecondary,L=c[0].startsWith("FontAwesome"),M=byUnicode(l,R),V=M;if(L){var D=byOldUnicode(R);D.iconName&&D.prefix&&(M=D.iconName,l=D.prefix)}if(M&&!x&&(!E||E.getAttribute(DATA_PREFIX)!==l||E.getAttribute(DATA_ICON)!==V)){e.setAttribute(n,V),E&&e.removeChild(E);var F=blankMeta(),P=F.extra;P.attributes[DATA_FA_PSEUDO_ELEMENT]=t,findIcon(M,l).then(function(X){var U=makeInlineSvgAbstract(_objectSpread2$1(_objectSpread2$1({},F),{},{icons:{main:X,mask:emptyCanonicalIcon()},prefix:l,iconName:V,extra:P,watchable:!0})),z=DOCUMENT.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=U.map(function(B){return toHtml(B)}).join(` `),e.removeAttribute(n),r()}).catch(A)}else r()}else r()})}function replace(e){return Promise.all([replaceForPosition(e,"::before"),replaceForPosition(e,"::after")])}function processable(e){return e.parentNode!==document.head&&!~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(DATA_FA_PSEUDO_ELEMENT)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function searchPseudoElements(e){if(IS_DOM)return new Promise(function(t,n){var r=toArray$1(e.querySelectorAll("*")).filter(processable).map(replace),A=perf.begin("searchPseudoElements");disableObservation(),Promise.all(r).then(function(){A(),enableObservation(),t()}).catch(function(){A(),enableObservation(),n()})})}var PseudoElements={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=searchPseudoElements,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,A=r===void 0?DOCUMENT:r;config.searchPseudoElements&&searchPseudoElements(A)}}},_unwatched=!1,MutationObserver$1={mixout:function(){return{dom:{unwatch:function(){disableObservation(),_unwatched=!0}}}},hooks:function(){return{bootstrap:function(){observe(chainHooks("mutationObserverCallbacks",{}))},noAuto:function(){disconnect()},watch:function(n){var r=n.observeMutationsRoot;_unwatched?enableObservation():observe(chainHooks("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},parseTransformString=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,A){var S=A.toLowerCase().split("-"),E=S[0],T=S.slice(1).join("-");if(E&&T==="h")return r.flipX=!0,r;if(E&&T==="v")return r.flipY=!0,r;if(T=parseFloat(T),isNaN(T))return r;switch(E){case"grow":r.size=r.size+T;break;case"shrink":r.size=r.size-T;break;case"left":r.x=r.x-T;break;case"right":r.x=r.x+T;break;case"up":r.y=r.y-T;break;case"down":r.y=r.y+T;break;case"rotate":r.rotate=r.rotate+T;break}return r},n)},PowerTransforms={mixout:function(){return{parse:{transform:function(n){return parseTransformString(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var A=r.getAttribute("data-fa-transform");return A&&(n.transform=parseTransformString(A)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,A=n.transform,S=n.containerWidth,E=n.iconWidth,T={transform:"translate(".concat(S/2," 256)")},c="translate(".concat(A.x*32,", ").concat(A.y*32,") "),C="scale(".concat(A.size/16*(A.flipX?-1:1),", ").concat(A.size/16*(A.flipY?-1:1),") "),o="rotate(".concat(A.rotate," 0 0)"),a={transform:"".concat(c," ").concat(C," ").concat(o)},$={transform:"translate(".concat(E/2*-1," -256)")},l={outer:T,inner:a,path:$};return{tag:"g",attributes:_objectSpread2$1({},l.outer),children:[{tag:"g",attributes:_objectSpread2$1({},l.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:_objectSpread2$1(_objectSpread2$1({},r.icon.attributes),l.path)}]}]}}}},ALL_SPACE={x:0,y:0,width:"100%",height:"100%"};function fillBlack(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function deGroup(e){return e.tag==="g"?e.children:[e]}var Masks={hooks:function(){return{parseNodeAttributes:function(n,r){var A=r.getAttribute("data-fa-mask"),S=A?getCanonicalIcon(A.split(" ").map(function(E){return E.trim()})):emptyCanonicalIcon();return S.prefix||(S.prefix=getDefaultUsablePrefix()),n.mask=S,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,A=n.attributes,S=n.main,E=n.mask,T=n.maskId,c=n.transform,C=S.width,o=S.icon,a=E.width,$=E.icon,l=transformForSvg({transform:c,containerWidth:a,iconWidth:C}),f={tag:"rect",attributes:_objectSpread2$1(_objectSpread2$1({},ALL_SPACE),{},{fill:"white"})},R=o.children?{children:o.children.map(fillBlack)}:{},x={tag:"g",attributes:_objectSpread2$1({},l.inner),children:[fillBlack(_objectSpread2$1({tag:o.tag,attributes:_objectSpread2$1(_objectSpread2$1({},o.attributes),l.path)},R))]},L={tag:"g",attributes:_objectSpread2$1({},l.outer),children:[x]},M="mask-".concat(T||nextUniqueId()),V="clip-".concat(T||nextUniqueId()),D={tag:"mask",attributes:_objectSpread2$1(_objectSpread2$1({},ALL_SPACE),{},{id:M,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,L]},F={tag:"defs",children:[{tag:"clipPath",attributes:{id:V},children:deGroup($)},D]};return r.push(F,{tag:"rect",attributes:_objectSpread2$1({fill:"currentColor","clip-path":"url(#".concat(V,")"),mask:"url(#".concat(M,")")},ALL_SPACE)}),{children:r,attributes:A}}}},MissingIconIndicator={provides:function(t){var n=!1;WINDOW.matchMedia&&(n=WINDOW.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],A={fill:"currentColor"},S={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:_objectSpread2$1(_objectSpread2$1({},A),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var E=_objectSpread2$1(_objectSpread2$1({},S),{},{attributeName:"opacity"}),T={tag:"circle",attributes:_objectSpread2$1(_objectSpread2$1({},A),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||T.children.push({tag:"animate",attributes:_objectSpread2$1(_objectSpread2$1({},S),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:_objectSpread2$1(_objectSpread2$1({},E),{},{values:"1;0;1;1;0;1;"})}),r.push(T),r.push({tag:"path",attributes:_objectSpread2$1(_objectSpread2$1({},A),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:_objectSpread2$1(_objectSpread2$1({},E),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:_objectSpread2$1(_objectSpread2$1({},A),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:_objectSpread2$1(_objectSpread2$1({},E),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},SvgSymbols={hooks:function(){return{parseNodeAttributes:function(n,r){var A=r.getAttribute("data-fa-symbol"),S=A===null?!1:A===""?!0:A;return n.symbol=S,n}}}},plugins=[InjectCSS,ReplaceElements,Layers,LayersCounter,LayersText,PseudoElements,MutationObserver$1,PowerTransforms,Masks,MissingIconIndicator,SvgSymbols];registerPlugins(plugins,{mixoutsTo:api});api.noAuto;api.config;var library$1=api.library;api.dom;var parse$1=api.parse;api.findIconDefinition;api.toHtml;var icon=api.icon;api.layer;api.text;api.counter;var faLightbulb={prefix:"fas",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"]},faPenToSquare={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},faEdit=faPenToSquare,faArrowRight={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},faCircleInfo={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},faInfoCircle=faCircleInfo,faMagnifyingGlass={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},faSearch=faMagnifyingGlass,faPlus={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},faXmark={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},faTimes=faXmark,faSpinner={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},faCheck={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},faExclamation={prefix:"fas",iconName:"exclamation",icon:[64,512,[10069,10071,61738],"21","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]};function makeMap(e,t){const n=Object.create(null),r=e.split(",");for(let A=0;A!!n[A.toLowerCase()]:A=>!!n[A]}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=e=>onRE.test(e),isModelListener=e=>e.startsWith("onUpdate:"),extend$1=Object.assign,remove=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$2=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$2.call(e,t),isArray$2=Array.isArray,isMap=e=>toTypeString(e)==="[object Map]",isSet=e=>toTypeString(e)==="[object Set]",isDate$1=e=>toTypeString(e)==="[object Date]",isRegExp$1=e=>toTypeString(e)==="[object RegExp]",isFunction$3=e=>typeof e=="function",isString$1=e=>typeof e=="string",isSymbol=e=>typeof e=="symbol",isObject$1=e=>e!==null&&typeof e=="object",isPromise$1=e=>isObject$1(e)&&isFunction$3(e.then)&&isFunction$3(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject$1=e=>toTypeString(e)==="[object Object]",isIntegerKey=e=>isString$1(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(e=>e.replace(camelizeRE,(t,n)=>n?n.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(e=>e.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(e=>e.charAt(0).toUpperCase()+e.slice(1)),toHandlerKey=cacheStringFunction(e=>e?`on${capitalize(e)}`:""),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t},toNumber=e=>{const t=isString$1(e)?Number(e):NaN;return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),GLOBALS_WHITE_LISTED="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console",isGloballyWhitelisted=makeMap(GLOBALS_WHITE_LISTED);function normalizeStyle(e){if(isArray$2(e)){const t={};for(let n=0;n{if(n){const r=n.split(propertyDelimiterRE);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function normalizeClass(e){let t="";if(isString$1(e))t=e;else if(isArray$2(e))for(let n=0;nlooseEqual(n,t))}const toDisplayString=e=>isString$1(e)?e:e==null?"":isArray$2(e)||isObject$1(e)&&(e.toString===objectToString||!isFunction$3(e.toString))?JSON.stringify(e,replacer,2):String(e),replacer=(e,t)=>t&&t.__v_isRef?replacer(e,t.value):isMap(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,A])=>(n[`${r} =>`]=A,n),{})}:isSet(t)?{[`Set(${t.size})`]:[...t.values()]}:isObject$1(t)&&!isArray$2(t)&&!isPlainObject$1(t)?String(t):t;let activeEffectScope;class EffectScope{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!t&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=activeEffectScope;try{return activeEffectScope=this,t()}finally{activeEffectScope=n}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},wasTracked=e=>(e.w&trackOpBit)>0,newTracked=e=>(e.n&trackOpBit)>0,initDepMarkers=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(o==="length"||o>=c)&&T.push(C)})}else switch(n!==void 0&&T.push(E.get(n)),t){case"add":isArray$2(e)?isIntegerKey(n)&&T.push(E.get("length")):(T.push(E.get(ITERATE_KEY)),isMap(e)&&T.push(E.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$2(e)||(T.push(E.get(ITERATE_KEY)),isMap(e)&&T.push(E.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(e)&&T.push(E.get(ITERATE_KEY));break}if(T.length===1)T[0]&&triggerEffects(T[0]);else{const c=[];for(const C of T)C&&c.push(...C);triggerEffects(createDep(c))}}function triggerEffects(e,t){const n=isArray$2(e)?e:[...e];for(const r of n)r.computed&&triggerEffect(r);for(const r of n)r.computed||triggerEffect(r)}function triggerEffect(e,t){(e!==activeEffect||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function getDepFromReactive(e,t){var n;return(n=targetMap.get(e))==null?void 0:n.get(t)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(isSymbol)),get$1=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),shallowReadonlyGet=createGetter(!0,!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=toRaw(this);for(let S=0,E=this.length;S{e[t]=function(...n){pauseTracking();const r=toRaw(this)[t].apply(this,n);return resetTracking(),r}}),e}function hasOwnProperty$1(e){const t=toRaw(this);return track(t,"has",e),t.hasOwnProperty(e)}function createGetter(e=!1,t=!1){return function(r,A,S){if(A==="__v_isReactive")return!e;if(A==="__v_isReadonly")return e;if(A==="__v_isShallow")return t;if(A==="__v_raw"&&S===(e?t?shallowReadonlyMap:readonlyMap:t?shallowReactiveMap:reactiveMap).get(r))return r;const E=isArray$2(r);if(!e){if(E&&hasOwn(arrayInstrumentations,A))return Reflect.get(arrayInstrumentations,A,S);if(A==="hasOwnProperty")return hasOwnProperty$1}const T=Reflect.get(r,A,S);return(isSymbol(A)?builtInSymbols.has(A):isNonTrackableKeys(A))||(e||track(r,"get",A),t)?T:isRef(T)?E&&isIntegerKey(A)?T:T.value:isObject$1(T)?e?readonly(T):reactive(T):T}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(e=!1){return function(n,r,A,S){let E=n[r];if(isReadonly(E)&&isRef(E)&&!isRef(A))return!1;if(!e&&(!isShallow(A)&&!isReadonly(A)&&(E=toRaw(E),A=toRaw(A)),!isArray$2(n)&&isRef(E)&&!isRef(A)))return E.value=A,!0;const T=isArray$2(n)&&isIntegerKey(r)?Number(r)e,getProto=e=>Reflect.getPrototypeOf(e);function get(e,t,n=!1,r=!1){e=e.__v_raw;const A=toRaw(e),S=toRaw(t);n||(t!==S&&track(A,"get",t),track(A,"get",S));const{has:E}=getProto(A),T=r?toShallow:n?toReadonly:toReactive;if(E.call(A,t))return T(e.get(t));if(E.call(A,S))return T(e.get(S));e!==A&&e.get(t)}function has$2(e,t=!1){const n=this.__v_raw,r=toRaw(n),A=toRaw(e);return t||(e!==A&&track(r,"has",e),track(r,"has",A)),e===A?n.has(e):n.has(e)||n.has(A)}function size(e,t=!1){return e=e.__v_raw,!t&&track(toRaw(e),"iterate",ITERATE_KEY),Reflect.get(e,"size",e)}function add(e){e=toRaw(e);const t=toRaw(this);return getProto(t).has.call(t,e)||(t.add(e),trigger(t,"add",e,e)),this}function set$2(e,t){t=toRaw(t);const n=toRaw(this),{has:r,get:A}=getProto(n);let S=r.call(n,e);S||(e=toRaw(e),S=r.call(n,e));const E=A.call(n,e);return n.set(e,t),S?hasChanged(t,E)&&trigger(n,"set",e,t):trigger(n,"add",e,t),this}function deleteEntry(e){const t=toRaw(this),{has:n,get:r}=getProto(t);let A=n.call(t,e);A||(e=toRaw(e),A=n.call(t,e)),r&&r.call(t,e);const S=t.delete(e);return A&&trigger(t,"delete",e,void 0),S}function clear(){const e=toRaw(this),t=e.size!==0,n=e.clear();return t&&trigger(e,"clear",void 0,void 0),n}function createForEach(e,t){return function(r,A){const S=this,E=S.__v_raw,T=toRaw(E),c=t?toShallow:e?toReadonly:toReactive;return!e&&track(T,"iterate",ITERATE_KEY),E.forEach((C,o)=>r.call(A,c(C),c(o),S))}}function createIterableMethod(e,t,n){return function(...r){const A=this.__v_raw,S=toRaw(A),E=isMap(S),T=e==="entries"||e===Symbol.iterator&&E,c=e==="keys"&&E,C=A[e](...r),o=n?toShallow:t?toReadonly:toReactive;return!t&&track(S,"iterate",c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:a,done:$}=C.next();return $?{value:a,done:$}:{value:T?[o(a[0]),o(a[1])]:o(a),done:$}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return e==="delete"?!1:this}}function createInstrumentations(){const e={get(S){return get(this,S)},get size(){return size(this)},has:has$2,add,set:set$2,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},t={get(S){return get(this,S,!1,!0)},get size(){return size(this)},has:has$2,add,set:set$2,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},n={get(S){return get(this,S,!0)},get size(){return size(this,!0)},has(S){return has$2.call(this,S,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},r={get(S){return get(this,S,!0,!0)},get size(){return size(this,!0)},has(S){return has$2.call(this,S,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(S=>{e[S]=createIterableMethod(S,!1,!1),n[S]=createIterableMethod(S,!0,!1),t[S]=createIterableMethod(S,!1,!0),r[S]=createIterableMethod(S,!0,!0)}),[e,n,t,r]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(e,t){const n=t?e?shallowReadonlyInstrumentations:shallowInstrumentations:e?readonlyInstrumentations:mutableInstrumentations;return(r,A,S)=>A==="__v_isReactive"?!e:A==="__v_isReadonly"?e:A==="__v_raw"?r:Reflect.get(hasOwn(n,A)&&A in r?n:r,A,S)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive(e){return isReadonly(e)?e:createReactiveObject(e,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(e){return createReactiveObject(e,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(e){return createReactiveObject(e,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(e){return createReactiveObject(e,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(e,t,n,r,A){if(!isObject$1(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const S=A.get(e);if(S)return S;const E=getTargetType(e);if(E===0)return e;const T=new Proxy(e,E===2?r:n);return A.set(e,T),T}function isReactive(e){return isReadonly(e)?isReactive(e.__v_raw):!!(e&&e.__v_isReactive)}function isReadonly(e){return!!(e&&e.__v_isReadonly)}function isShallow(e){return!!(e&&e.__v_isShallow)}function isProxy(e){return isReactive(e)||isReadonly(e)}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return def(e,"__v_skip",!0),e}const toReactive=e=>isObject$1(e)?reactive(e):e,toReadonly=e=>isObject$1(e)?readonly(e):e;function trackRefValue(e){shouldTrack&&activeEffect&&(e=toRaw(e),trackEffects(e.dep||(e.dep=createDep())))}function triggerRefValue(e,t){e=toRaw(e);const n=e.dep;n&&triggerEffects(n)}function isRef(e){return!!(e&&e.__v_isRef===!0)}function ref(e){return createRef(e,!1)}function shallowRef(e){return createRef(e,!0)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:toRaw(t),this._value=n?t:toReactive(t)}get value(){return trackRefValue(this),this._value}set value(t){const n=this.__v_isShallow||isShallow(t)||isReadonly(t);t=n?t:toRaw(t),hasChanged(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:toReactive(t),triggerRefValue(this))}}function triggerRef(e){triggerRefValue(e)}function unref(e){return isRef(e)?e.value:e}function toValue$1(e){return isFunction$3(e)?e():unref(e)}const shallowUnwrapHandlers={get:(e,t,n)=>unref(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const A=e[t];return isRef(A)&&!isRef(n)?(A.value=n,!0):Reflect.set(e,t,n,r)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}class CustomRefImpl{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>trackRefValue(this),()=>triggerRefValue(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function customRef(e){return new CustomRefImpl(e)}function toRefs(e){const t=isArray$2(e)?new Array(e.length):{};for(const n in e)t[n]=propertyToRef(e,n);return t}class ObjectRefImpl{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function toRef$1(e,t,n){return isRef(e)?e:isFunction$3(e)?new GetterRefImpl(e):isObject$1(e)&&arguments.length>1?propertyToRef(e,t,n):ref(e)}function propertyToRef(e,t,n){const r=e[t];return isRef(r)?r:new ObjectRefImpl(e,t,n)}class ComputedRefImpl{constructor(t,n,r,A){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ReactiveEffect(t,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!A,this.__v_isReadonly=r}get value(){const t=toRaw(this);return trackRefValue(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function computed$1(e,t,n=!1){let r,A;const S=isFunction$3(e);return S?(r=e,A=NOOP):(r=e.get,A=e.set),new ComputedRefImpl(r,A,S||!A,n)}function warn(e,...t){}function assertNumber(e,t){}function callWithErrorHandling(e,t,n,r){let A;try{A=r?e(...r):e()}catch(S){handleError(S,t,n)}return A}function callWithAsyncErrorHandling(e,t,n,r){if(isFunction$3(e)){const S=callWithErrorHandling(e,t,n,r);return S&&isPromise$1(S)&&S.catch(E=>{handleError(E,t,n)}),S}const A=[];for(let S=0;S>>1;getId(queue[r])flushIndex&&queue.splice(t,1)}function queuePostFlushCb(e){isArray$2(e)?pendingPostFlushCbs.push(...e):(!activePostFlushCbs||!activePostFlushCbs.includes(e,e.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(e),queueFlush()}function flushPreFlushCbs(e,t=isFlushing?flushIndex+1:0){for(;tgetId(n)-getId(r)),postFlushIndex=0;postFlushIndexe.id==null?1/0:e.id,comparator=(e,t)=>{const n=getId(e)-getId(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function flushJobs(e){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const t=NOOP;try{for(flushIndex=0;flushIndexdevtools.emit(A,...S)),buffer=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(S=>{setDevtoolsHook(S,t)}),setTimeout(()=>{devtools||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,buffer=[])},3e3)):buffer=[]}function emit(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||EMPTY_OBJ;let A=n;const S=t.startsWith("update:"),E=S&&t.slice(7);if(E&&E in r){const o=`${E==="modelValue"?"model":E}Modifiers`,{number:a,trim:$}=r[o]||EMPTY_OBJ;$&&(A=n.map(l=>isString$1(l)?l.trim():l)),a&&(A=n.map(looseToNumber))}let T,c=r[T=toHandlerKey(t)]||r[T=toHandlerKey(camelize(t))];!c&&S&&(c=r[T=toHandlerKey(hyphenate(t))]),c&&callWithAsyncErrorHandling(c,e,6,A);const C=r[T+"Once"];if(C){if(!e.emitted)e.emitted={};else if(e.emitted[T])return;e.emitted[T]=!0,callWithAsyncErrorHandling(C,e,6,A)}}function normalizeEmitsOptions(e,t,n=!1){const r=t.emitsCache,A=r.get(e);if(A!==void 0)return A;const S=e.emits;let E={},T=!1;if(!isFunction$3(e)){const c=C=>{const o=normalizeEmitsOptions(C,t,!0);o&&(T=!0,extend$1(E,o))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!S&&!T?(isObject$1(e)&&r.set(e,null),null):(isArray$2(S)?S.forEach(c=>E[c]=null):extend$1(E,S),isObject$1(e)&&r.set(e,E),E)}function isEmitListener(e,t){return!e||!isOn(t)?!1:(t=t.slice(2).replace(/Once$/,""),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate(t))||hasOwn(e,t))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(e){const t=currentRenderingInstance;return currentRenderingInstance=e,currentScopeId=e&&e.type.__scopeId||null,t}function pushScopeId(e){currentScopeId=e}function popScopeId(){currentScopeId=null}const withScopeId=e=>withCtx;function withCtx(e,t=currentRenderingInstance,n){if(!t||e._n)return e;const r=(...A)=>{r._d&&setBlockTracking(-1);const S=setCurrentRenderingInstance(t);let E;try{E=e(...A)}finally{setCurrentRenderingInstance(S),r._d&&setBlockTracking(1)}return E};return r._n=!0,r._c=!0,r._d=!0,r}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:n,proxy:r,withProxy:A,props:S,propsOptions:[E],slots:T,attrs:c,emit:C,render:o,renderCache:a,data:$,setupState:l,ctx:f,inheritAttrs:R}=e;let x,L;const M=setCurrentRenderingInstance(e);try{if(n.shapeFlag&4){const D=A||r;x=normalizeVNode(o.call(D,D,a,S,l,$,f)),L=c}else{const D=t;x=normalizeVNode(D.length>1?D(S,{attrs:c,slots:T,emit:C}):D(S,null)),L=t.props?c:getFunctionalFallthrough(c)}}catch(D){blockStack.length=0,handleError(D,e,1),x=createVNode(Comment)}let V=x;if(L&&R!==!1){const D=Object.keys(L),{shapeFlag:F}=V;D.length&&F&7&&(E&&D.some(isModelListener)&&(L=filterModelListeners(L,E)),V=cloneVNode(V,L))}return n.dirs&&(V=cloneVNode(V),V.dirs=V.dirs?V.dirs.concat(n.dirs):n.dirs),n.transition&&(V.transition=n.transition),x=V,setCurrentRenderingInstance(M),x}function filterSingleRoot(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{const n={};for(const r in e)(!isModelListener(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function shouldUpdateComponent(e,t,n){const{props:r,children:A,component:S}=e,{props:E,children:T,patchFlag:c}=t,C=S.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?hasPropsChanged(r,E,C):!!E;if(c&8){const o=t.dynamicProps;for(let a=0;ae.__isSuspense,SuspenseImpl={name:"Suspense",__isSuspense:!0,process(e,t,n,r,A,S,E,T,c,C){e==null?mountSuspense(t,n,r,A,S,E,T,c,C):patchSuspense(e,t,n,r,A,E,T,c,C)},hydrate:hydrateSuspense,create:createSuspenseBoundary,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(e,t){const n=e.props&&e.props[t];isFunction$3(n)&&n()}function mountSuspense(e,t,n,r,A,S,E,T,c){const{p:C,o:{createElement:o}}=c,a=o("div"),$=e.suspense=createSuspenseBoundary(e,A,r,t,a,n,S,E,T,c);C(null,$.pendingBranch=e.ssContent,a,null,r,$,S,E),$.deps>0?(triggerEvent(e,"onPending"),triggerEvent(e,"onFallback"),C(null,e.ssFallback,t,n,r,null,S,E),setActiveBranch($,e.ssFallback)):$.resolve(!1,!0)}function patchSuspense(e,t,n,r,A,S,E,T,{p:c,um:C,o:{createElement:o}}){const a=t.suspense=e.suspense;a.vnode=t,t.el=e.el;const $=t.ssContent,l=t.ssFallback,{activeBranch:f,pendingBranch:R,isInFallback:x,isHydrating:L}=a;if(R)a.pendingBranch=$,isSameVNodeType($,R)?(c(R,$,a.hiddenContainer,null,A,a,S,E,T),a.deps<=0?a.resolve():x&&(c(f,l,n,r,A,null,S,E,T),setActiveBranch(a,l))):(a.pendingId++,L?(a.isHydrating=!1,a.activeBranch=R):C(R,A,a),a.deps=0,a.effects.length=0,a.hiddenContainer=o("div"),x?(c(null,$,a.hiddenContainer,null,A,a,S,E,T),a.deps<=0?a.resolve():(c(f,l,n,r,A,null,S,E,T),setActiveBranch(a,l))):f&&isSameVNodeType($,f)?(c(f,$,n,r,A,a,S,E,T),a.resolve(!0)):(c(null,$,a.hiddenContainer,null,A,a,S,E,T),a.deps<=0&&a.resolve()));else if(f&&isSameVNodeType($,f))c(f,$,n,r,A,a,S,E,T),setActiveBranch(a,$);else if(triggerEvent(t,"onPending"),a.pendingBranch=$,a.pendingId++,c(null,$,a.hiddenContainer,null,A,a,S,E,T),a.deps<=0)a.resolve();else{const{timeout:M,pendingId:V}=a;M>0?setTimeout(()=>{a.pendingId===V&&a.fallback(l)},M):M===0&&a.fallback(l)}}function createSuspenseBoundary(e,t,n,r,A,S,E,T,c,C,o=!1){const{p:a,m:$,um:l,n:f,o:{parentNode:R,remove:x}}=C;let L;const M=isVNodeSuspensible(e);M&&t!=null&&t.pendingBranch&&(L=t.pendingId,t.deps++);const V=e.props?toNumber(e.props.timeout):void 0,D={vnode:e,parent:t,parentComponent:n,isSVG:E,container:r,hiddenContainer:A,anchor:S,deps:0,pendingId:0,timeout:typeof V=="number"?V:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:o,isUnmounted:!1,effects:[],resolve(F=!1,P=!1){const{vnode:X,activeBranch:U,pendingBranch:z,pendingId:B,effects:I,parentComponent:Y,container:H}=D;if(D.isHydrating)D.isHydrating=!1;else if(!F){const G=U&&z.transition&&z.transition.mode==="out-in";G&&(U.transition.afterLeave=()=>{B===D.pendingId&&$(z,H,Z,0)});let{anchor:Z}=D;U&&(Z=f(U),l(U,Y,D,!0)),G||$(z,H,Z,0)}setActiveBranch(D,z),D.pendingBranch=null,D.isInFallback=!1;let N=D.parent,W=!1;for(;N;){if(N.pendingBranch){N.effects.push(...I),W=!0;break}N=N.parent}W||queuePostFlushCb(I),D.effects=[],M&&t&&t.pendingBranch&&L===t.pendingId&&(t.deps--,t.deps===0&&!P&&t.resolve()),triggerEvent(X,"onResolve")},fallback(F){if(!D.pendingBranch)return;const{vnode:P,activeBranch:X,parentComponent:U,container:z,isSVG:B}=D;triggerEvent(P,"onFallback");const I=f(X),Y=()=>{D.isInFallback&&(a(null,F,z,I,U,null,B,T,c),setActiveBranch(D,F))},H=F.transition&&F.transition.mode==="out-in";H&&(X.transition.afterLeave=Y),D.isInFallback=!0,l(X,U,null,!0),H||Y()},move(F,P,X){D.activeBranch&&$(D.activeBranch,F,P,X),D.container=F},next(){return D.activeBranch&&f(D.activeBranch)},registerDep(F,P){const X=!!D.pendingBranch;X&&D.deps++;const U=F.vnode.el;F.asyncDep.catch(z=>{handleError(z,F,0)}).then(z=>{if(F.isUnmounted||D.isUnmounted||D.pendingId!==F.suspenseId)return;F.asyncResolved=!0;const{vnode:B}=F;handleSetupResult(F,z,!1),U&&(B.el=U);const I=!U&&F.subTree.el;P(F,B,R(U||F.subTree.el),U?null:f(F.subTree),D,E,c),I&&x(I),updateHOCHostEl(F,B.el),X&&--D.deps===0&&D.resolve()})},unmount(F,P){D.isUnmounted=!0,D.activeBranch&&l(D.activeBranch,n,F,P),D.pendingBranch&&l(D.pendingBranch,n,F,P)}};return D}function hydrateSuspense(e,t,n,r,A,S,E,T,c){const C=t.suspense=createSuspenseBoundary(t,r,n,e.parentNode,document.createElement("div"),null,A,S,E,T,!0),o=c(e,C.pendingBranch=t.ssContent,n,C,S,E);return C.deps===0&&C.resolve(!1,!0),o}function normalizeSuspenseChildren(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=normalizeSuspenseSlot(r?n.default:n),e.ssFallback=r?normalizeSuspenseSlot(n.fallback):createVNode(Comment)}function normalizeSuspenseSlot(e){let t;if(isFunction$3(e)){const n=isBlockTreeEnabled&&e._c;n&&(e._d=!1,openBlock()),e=e(),n&&(e._d=!0,t=currentBlock,closeBlock())}return isArray$2(e)&&(e=filterSingleRoot(e)),e=normalizeVNode(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$2(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}function setActiveBranch(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,A=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=A,updateHOCHostEl(r,A))}function isVNodeSuspensible(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}function watchEffect(e,t){return doWatch(e,null,t)}function watchPostEffect(e,t){return doWatch(e,null,{flush:"post"})}function watchSyncEffect(e,t){return doWatch(e,null,{flush:"sync"})}const INITIAL_WATCHER_VALUE={};function watch(e,t,n){return doWatch(e,t,n)}function doWatch(e,t,{immediate:n,deep:r,flush:A,onTrack:S,onTrigger:E}=EMPTY_OBJ){var T;const c=getCurrentScope()===((T=currentInstance)==null?void 0:T.scope)?currentInstance:null;let C,o=!1,a=!1;if(isRef(e)?(C=()=>e.value,o=isShallow(e)):isReactive(e)?(C=()=>e,r=!0):isArray$2(e)?(a=!0,o=e.some(D=>isReactive(D)||isShallow(D)),C=()=>e.map(D=>{if(isRef(D))return D.value;if(isReactive(D))return traverse(D);if(isFunction$3(D))return callWithErrorHandling(D,c,2)})):isFunction$3(e)?t?C=()=>callWithErrorHandling(e,c,2):C=()=>{if(!(c&&c.isUnmounted))return $&&$(),callWithAsyncErrorHandling(e,c,3,[l])}:C=NOOP,t&&r){const D=C;C=()=>traverse(D())}let $,l=D=>{$=M.onStop=()=>{callWithErrorHandling(D,c,4)}},f;if(isInSSRComponentSetup)if(l=NOOP,t?n&&callWithAsyncErrorHandling(t,c,3,[C(),a?[]:void 0,l]):C(),A==="sync"){const D=useSSRContext();f=D.__watcherHandles||(D.__watcherHandles=[])}else return NOOP;let R=a?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const x=()=>{if(M.active)if(t){const D=M.run();(r||o||(a?D.some((F,P)=>hasChanged(F,R[P])):hasChanged(D,R)))&&($&&$(),callWithAsyncErrorHandling(t,c,3,[D,R===INITIAL_WATCHER_VALUE?void 0:a&&R[0]===INITIAL_WATCHER_VALUE?[]:R,l]),R=D)}else M.run()};x.allowRecurse=!!t;let L;A==="sync"?L=x:A==="post"?L=()=>queuePostRenderEffect(x,c&&c.suspense):(x.pre=!0,c&&(x.id=c.uid),L=()=>queueJob(x));const M=new ReactiveEffect(C,L);t?n?x():R=M.run():A==="post"?queuePostRenderEffect(M.run.bind(M),c&&c.suspense):M.run();const V=()=>{M.stop(),c&&c.scope&&remove(c.scope.effects,M)};return f&&f.push(V),V}function instanceWatch(e,t,n){const r=this.proxy,A=isString$1(e)?e.includes(".")?createPathGetter(r,e):()=>r[e]:e.bind(r,r);let S;isFunction$3(t)?S=t:(S=t.handler,n=t);const E=currentInstance;setCurrentInstance(this);const T=doWatch(A,S.bind(r),n);return E?setCurrentInstance(E):unsetCurrentInstance(),T}function createPathGetter(e,t){const n=t.split(".");return()=>{let r=e;for(let A=0;A{traverse(n,t)});else if(isPlainObject$1(e))for(const n in e)traverse(e[n],t);return e}function withDirectives(e,t){const n=currentRenderingInstance;if(n===null)return e;const r=getExposeProxy(n)||n.proxy,A=e.dirs||(e.dirs=[]);for(let S=0;S{e.isMounted=!0}),onBeforeUnmount(()=>{e.isUnmounting=!0}),e}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(e,{slots:t}){const n=getCurrentInstance(),r=useTransitionState();let A;return()=>{const S=t.default&&getTransitionRawChildren(t.default(),!0);if(!S||!S.length)return;let E=S[0];if(S.length>1){for(const R of S)if(R.type!==Comment){E=R;break}}const T=toRaw(e),{mode:c}=T;if(r.isLeaving)return emptyPlaceholder(E);const C=getKeepAliveChild(E);if(!C)return emptyPlaceholder(E);const o=resolveTransitionHooks(C,T,r,n);setTransitionHooks(C,o);const a=n.subTree,$=a&&getKeepAliveChild(a);let l=!1;const{getTransitionKey:f}=C.type;if(f){const R=f();A===void 0?A=R:R!==A&&(A=R,l=!0)}if($&&$.type!==Comment&&(!isSameVNodeType(C,$)||l)){const R=resolveTransitionHooks($,T,r,n);if(setTransitionHooks($,R),c==="out-in")return r.isLeaving=!0,R.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},emptyPlaceholder(E);c==="in-out"&&C.type!==Comment&&(R.delayLeave=(x,L,M)=>{const V=getLeavingNodesForType(r,$);V[String($.key)]=$,x._leaveCb=()=>{L(),x._leaveCb=void 0,delete o.delayedLeave},o.delayedLeave=M})}return E}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function resolveTransitionHooks(e,t,n,r){const{appear:A,mode:S,persisted:E=!1,onBeforeEnter:T,onEnter:c,onAfterEnter:C,onEnterCancelled:o,onBeforeLeave:a,onLeave:$,onAfterLeave:l,onLeaveCancelled:f,onBeforeAppear:R,onAppear:x,onAfterAppear:L,onAppearCancelled:M}=t,V=String(e.key),D=getLeavingNodesForType(n,e),F=(U,z)=>{U&&callWithAsyncErrorHandling(U,r,9,z)},P=(U,z)=>{const B=z[1];F(U,z),isArray$2(U)?U.every(I=>I.length<=1)&&B():U.length<=1&&B()},X={mode:S,persisted:E,beforeEnter(U){let z=T;if(!n.isMounted)if(A)z=R||T;else return;U._leaveCb&&U._leaveCb(!0);const B=D[V];B&&isSameVNodeType(e,B)&&B.el._leaveCb&&B.el._leaveCb(),F(z,[U])},enter(U){let z=c,B=C,I=o;if(!n.isMounted)if(A)z=x||c,B=L||C,I=M||o;else return;let Y=!1;const H=U._enterCb=N=>{Y||(Y=!0,N?F(I,[U]):F(B,[U]),X.delayedLeave&&X.delayedLeave(),U._enterCb=void 0)};z?P(z,[U,H]):H()},leave(U,z){const B=String(e.key);if(U._enterCb&&U._enterCb(!0),n.isUnmounting)return z();F(a,[U]);let I=!1;const Y=U._leaveCb=H=>{I||(I=!0,z(),H?F(f,[U]):F(l,[U]),U._leaveCb=void 0,D[B]===e&&delete D[B])};D[B]=e,$?P($,[U,Y]):Y()},clone(U){return resolveTransitionHooks(U,t,n,r)}};return X}function emptyPlaceholder(e){if(isKeepAlive(e))return e=cloneVNode(e),e.children=null,e}function getKeepAliveChild(e){return isKeepAlive(e)?e.children?e.children[0]:void 0:e}function setTransitionHooks(e,t){e.shapeFlag&6&&e.component?setTransitionHooks(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function getTransitionRawChildren(e,t=!1,n){let r=[],A=0;for(let S=0;S1)for(let S=0;Sextend$1({name:e.name},t,{setup:e}))():e}const isAsyncWrapper=e=>!!e.type.__asyncLoader;function defineAsyncComponent(e){isFunction$3(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:A=200,timeout:S,suspensible:E=!0,onError:T}=e;let c=null,C,o=0;const a=()=>(o++,c=null,$()),$=()=>{let l;return c||(l=c=t().catch(f=>{if(f=f instanceof Error?f:new Error(String(f)),T)return new Promise((R,x)=>{T(f,()=>R(a()),()=>x(f),o+1)});throw f}).then(f=>l!==c&&c?c:(f&&(f.__esModule||f[Symbol.toStringTag]==="Module")&&(f=f.default),C=f,f)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:$,get __asyncResolved(){return C},setup(){const l=currentInstance;if(C)return()=>createInnerComp(C,l);const f=M=>{c=null,handleError(M,l,13,!r)};if(E&&l.suspense||isInSSRComponentSetup)return $().then(M=>()=>createInnerComp(M,l)).catch(M=>(f(M),()=>r?createVNode(r,{error:M}):null));const R=ref(!1),x=ref(),L=ref(!!A);return A&&setTimeout(()=>{L.value=!1},A),S!=null&&setTimeout(()=>{if(!R.value&&!x.value){const M=new Error(`Async component timed out after ${S}ms.`);f(M),x.value=M}},S),$().then(()=>{R.value=!0,l.parent&&isKeepAlive(l.parent.vnode)&&queueJob(l.parent.update)}).catch(M=>{f(M),x.value=M}),()=>{if(R.value&&C)return createInnerComp(C,l);if(x.value&&r)return createVNode(r,{error:x.value});if(n&&!L.value)return createVNode(n)}}})}function createInnerComp(e,t){const{ref:n,props:r,children:A,ce:S}=t.vnode,E=createVNode(e,r,A);return E.ref=n,E.ce=S,delete t.vnode.ce,E}const isKeepAlive=e=>e.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=getCurrentInstance(),r=n.ctx;if(!r.renderer)return()=>{const M=t.default&&t.default();return M&&M.length===1?M[0]:M};const A=new Map,S=new Set;let E=null;const T=n.suspense,{renderer:{p:c,m:C,um:o,o:{createElement:a}}}=r,$=a("div");r.activate=(M,V,D,F,P)=>{const X=M.component;C(M,V,D,0,T),c(X.vnode,M,V,D,X,T,F,M.slotScopeIds,P),queuePostRenderEffect(()=>{X.isDeactivated=!1,X.a&&invokeArrayFns(X.a);const U=M.props&&M.props.onVnodeMounted;U&&invokeVNodeHook(U,X.parent,M)},T)},r.deactivate=M=>{const V=M.component;C(M,$,null,1,T),queuePostRenderEffect(()=>{V.da&&invokeArrayFns(V.da);const D=M.props&&M.props.onVnodeUnmounted;D&&invokeVNodeHook(D,V.parent,M),V.isDeactivated=!0},T)};function l(M){resetShapeFlag(M),o(M,n,T,!0)}function f(M){A.forEach((V,D)=>{const F=getComponentName(V.type);F&&(!M||!M(F))&&R(D)})}function R(M){const V=A.get(M);!E||!isSameVNodeType(V,E)?l(V):E&&resetShapeFlag(E),A.delete(M),S.delete(M)}watch(()=>[e.include,e.exclude],([M,V])=>{M&&f(D=>matches(M,D)),V&&f(D=>!matches(V,D))},{flush:"post",deep:!0});let x=null;const L=()=>{x!=null&&A.set(x,getInnerChild(n.subTree))};return onMounted(L),onUpdated(L),onBeforeUnmount(()=>{A.forEach(M=>{const{subTree:V,suspense:D}=n,F=getInnerChild(V);if(M.type===F.type&&M.key===F.key){resetShapeFlag(F);const P=F.component.da;P&&queuePostRenderEffect(P,D);return}l(M)})}),()=>{if(x=null,!t.default)return null;const M=t.default(),V=M[0];if(M.length>1)return E=null,M;if(!isVNode(V)||!(V.shapeFlag&4)&&!(V.shapeFlag&128))return E=null,V;let D=getInnerChild(V);const F=D.type,P=getComponentName(isAsyncWrapper(D)?D.type.__asyncResolved||{}:F),{include:X,exclude:U,max:z}=e;if(X&&(!P||!matches(X,P))||U&&P&&matches(U,P))return E=D,V;const B=D.key==null?F:D.key,I=A.get(B);return D.el&&(D=cloneVNode(D),V.shapeFlag&128&&(V.ssContent=D)),x=B,I?(D.el=I.el,D.component=I.component,D.transition&&setTransitionHooks(D,D.transition),D.shapeFlag|=512,S.delete(B),S.add(B)):(S.add(B),z&&S.size>parseInt(z,10)&&R(S.values().next().value)),D.shapeFlag|=256,E=D,isSuspense(V.type)?V:D}}},KeepAlive=KeepAliveImpl;function matches(e,t){return isArray$2(e)?e.some(n=>matches(n,t)):isString$1(e)?e.split(",").includes(t):isRegExp$1(e)?e.test(t):!1}function onActivated(e,t){registerKeepAliveHook(e,"a",t)}function onDeactivated(e,t){registerKeepAliveHook(e,"da",t)}function registerKeepAliveHook(e,t,n=currentInstance){const r=e.__wdc||(e.__wdc=()=>{let A=n;for(;A;){if(A.isDeactivated)return;A=A.parent}return e()});if(injectHook(t,r,n),n){let A=n.parent;for(;A&&A.parent;)isKeepAlive(A.parent.vnode)&&injectToKeepAliveRoot(r,t,n,A),A=A.parent}}function injectToKeepAliveRoot(e,t,n,r){const A=injectHook(t,e,r,!0);onUnmounted(()=>{remove(r[t],A)},n)}function resetShapeFlag(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function getInnerChild(e){return e.shapeFlag&128?e.ssContent:e}function injectHook(e,t,n=currentInstance,r=!1){if(n){const A=n[e]||(n[e]=[]),S=t.__weh||(t.__weh=(...E)=>{if(n.isUnmounted)return;pauseTracking(),setCurrentInstance(n);const T=callWithAsyncErrorHandling(t,n,e,E);return unsetCurrentInstance(),resetTracking(),T});return r?A.unshift(S):A.push(S),S}}const createHook=e=>(t,n=currentInstance)=>(!isInSSRComponentSetup||e==="sp")&&injectHook(e,(...r)=>t(...r),n),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(e,t=currentInstance){injectHook("ec",e,t)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(e,t){return resolveAsset(COMPONENTS,e,!0,t)||e}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(e){return isString$1(e)?resolveAsset(COMPONENTS,e,!1)||e:e||NULL_DYNAMIC_COMPONENT}function resolveDirective(e){return resolveAsset(DIRECTIVES,e)}function resolveAsset(e,t,n=!0,r=!1){const A=currentRenderingInstance||currentInstance;if(A){const S=A.type;if(e===COMPONENTS){const T=getComponentName(S,!1);if(T&&(T===t||T===camelize(t)||T===capitalize(camelize(t))))return S}const E=resolve$1(A[e]||S[e],t)||resolve$1(A.appContext[e],t);return!E&&r?S:E}}function resolve$1(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderList(e,t,n,r){let A;const S=n&&n[r];if(isArray$2(e)||isString$1(e)){A=new Array(e.length);for(let E=0,T=e.length;Et(E,T,void 0,S&&S[T]));else{const E=Object.keys(e);A=new Array(E.length);for(let T=0,c=E.length;T{const S=r.fn(...A);return S&&(S.key=r.key),S}:r.fn)}return e}function renderSlot(e,t,n={},r,A){if(currentRenderingInstance.isCE||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.isCE)return t!=="default"&&(n.name=t),createVNode("slot",n,r&&r());let S=e[t];S&&S._c&&(S._d=!1),openBlock();const E=S&&ensureValidVNode(S(n)),T=createBlock(Fragment,{key:n.key||E&&E.key||`_${t}`},E||(r?r():[]),E&&e._===1?64:-2);return!A&&T.scopeId&&(T.slotScopeIds=[T.scopeId+"-s"]),S&&S._c&&(S._d=!0),T}function ensureValidVNode(e){return e.some(t=>isVNode(t)?!(t.type===Comment||t.type===Fragment&&!ensureValidVNode(t.children)):!0)?e:null}function toHandlers(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:toHandlerKey(r)]=e[r];return n}const getPublicInstance=e=>e?isStatefulComponent(e)?getExposeProxy(e)||e.proxy:getPublicInstance(e.parent):null,publicPropertiesMap=extend$1(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>getPublicInstance(e.parent),$root:e=>getPublicInstance(e.root),$emit:e=>e.emit,$options:e=>resolveMergedOptions(e),$forceUpdate:e=>e.f||(e.f=()=>queueJob(e.update)),$nextTick:e=>e.n||(e.n=nextTick.bind(e.proxy)),$watch:e=>instanceWatch.bind(e)}),hasSetupBinding=(e,t)=>e!==EMPTY_OBJ&&!e.__isScriptSetup&&hasOwn(e,t),PublicInstanceProxyHandlers={get({_:e},t){const{ctx:n,setupState:r,data:A,props:S,accessCache:E,type:T,appContext:c}=e;let C;if(t[0]!=="$"){const l=E[t];if(l!==void 0)switch(l){case 1:return r[t];case 2:return A[t];case 4:return n[t];case 3:return S[t]}else{if(hasSetupBinding(r,t))return E[t]=1,r[t];if(A!==EMPTY_OBJ&&hasOwn(A,t))return E[t]=2,A[t];if((C=e.propsOptions[0])&&hasOwn(C,t))return E[t]=3,S[t];if(n!==EMPTY_OBJ&&hasOwn(n,t))return E[t]=4,n[t];shouldCacheAccess&&(E[t]=0)}}const o=publicPropertiesMap[t];let a,$;if(o)return t==="$attrs"&&track(e,"get",t),o(e);if((a=T.__cssModules)&&(a=a[t]))return a;if(n!==EMPTY_OBJ&&hasOwn(n,t))return E[t]=4,n[t];if($=c.config.globalProperties,hasOwn($,t))return $[t]},set({_:e},t,n){const{data:r,setupState:A,ctx:S}=e;return hasSetupBinding(A,t)?(A[t]=n,!0):r!==EMPTY_OBJ&&hasOwn(r,t)?(r[t]=n,!0):hasOwn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(S[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:A,propsOptions:S}},E){let T;return!!n[E]||e!==EMPTY_OBJ&&hasOwn(e,E)||hasSetupBinding(t,E)||(T=S[0])&&hasOwn(T,E)||hasOwn(r,E)||hasOwn(publicPropertiesMap,E)||hasOwn(A.config.globalProperties,E)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:hasOwn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$1({},PublicInstanceProxyHandlers,{get(e,t){if(t!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(e,t,e)},has(e,t){return t[0]!=="_"&&!isGloballyWhitelisted(t)}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(e){}function defineOptions(e){}function defineSlots(){return null}function defineModel(){}function withDefaults(e,t){return null}function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function useModel(e,t,n){const r=getCurrentInstance();if(n&&n.local){const A=ref(e[t]);return watch(()=>e[t],S=>A.value=S),watch(A,S=>{S!==e[t]&&r.emit(`update:${t}`,S)}),A}else return{__v_isRef:!0,get value(){return e[t]},set value(A){r.emit(`update:${t}`,A)}}}function getContext(){const e=getCurrentInstance();return e.setupContext||(e.setupContext=createSetupContext(e))}function normalizePropsOrEmits(e){return isArray$2(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function mergeDefaults(e,t){const n=normalizePropsOrEmits(e);for(const r in t){if(r.startsWith("__skip"))continue;let A=n[r];A?isArray$2(A)||isFunction$3(A)?A=n[r]={type:A,default:t[r]}:A.default=t[r]:A===null&&(A=n[r]={default:t[r]}),A&&t[`__skip_${r}`]&&(A.skipFactory=!0)}return n}function mergeModels(e,t){return!e||!t?e||t:isArray$2(e)&&isArray$2(t)?e.concat(t):extend$1({},normalizePropsOrEmits(e),normalizePropsOrEmits(t))}function createPropsRestProxy(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function withAsyncContext(e){const t=getCurrentInstance();let n=e();return unsetCurrentInstance(),isPromise$1(n)&&(n=n.catch(r=>{throw setCurrentInstance(t),r})),[n,()=>setCurrentInstance(t)]}let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),n=e.proxy,r=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook$1(t.beforeCreate,e,"bc");const{data:A,computed:S,methods:E,watch:T,provide:c,inject:C,created:o,beforeMount:a,mounted:$,beforeUpdate:l,updated:f,activated:R,deactivated:x,beforeDestroy:L,beforeUnmount:M,destroyed:V,unmounted:D,render:F,renderTracked:P,renderTriggered:X,errorCaptured:U,serverPrefetch:z,expose:B,inheritAttrs:I,components:Y,directives:H,filters:N}=t;if(C&&resolveInjections(C,r,null),E)for(const Z in E){const J=E[Z];isFunction$3(J)&&(r[Z]=J.bind(n))}if(A){const Z=A.call(n,n);isObject$1(Z)&&(e.data=reactive(Z))}if(shouldCacheAccess=!0,S)for(const Z in S){const J=S[Z],Q=isFunction$3(J)?J.bind(n,n):isFunction$3(J.get)?J.get.bind(n,n):NOOP,ne=!isFunction$3(J)&&isFunction$3(J.set)?J.set.bind(n):NOOP,re=computed({get:Q,set:ne});Object.defineProperty(r,Z,{enumerable:!0,configurable:!0,get:()=>re.value,set:ue=>re.value=ue})}if(T)for(const Z in T)createWatcher(T[Z],r,n,Z);if(c){const Z=isFunction$3(c)?c.call(n):c;Reflect.ownKeys(Z).forEach(J=>{provide(J,Z[J])})}o&&callHook$1(o,e,"c");function G(Z,J){isArray$2(J)?J.forEach(Q=>Z(Q.bind(n))):J&&Z(J.bind(n))}if(G(onBeforeMount,a),G(onMounted,$),G(onBeforeUpdate,l),G(onUpdated,f),G(onActivated,R),G(onDeactivated,x),G(onErrorCaptured,U),G(onRenderTracked,P),G(onRenderTriggered,X),G(onBeforeUnmount,M),G(onUnmounted,D),G(onServerPrefetch,z),isArray$2(B))if(B.length){const Z=e.exposed||(e.exposed={});B.forEach(J=>{Object.defineProperty(Z,J,{get:()=>n[J],set:Q=>n[J]=Q})})}else e.exposed||(e.exposed={});F&&e.render===NOOP&&(e.render=F),I!=null&&(e.inheritAttrs=I),Y&&(e.components=Y),H&&(e.directives=H)}function resolveInjections(e,t,n=NOOP){isArray$2(e)&&(e=normalizeInject(e));for(const r in e){const A=e[r];let S;isObject$1(A)?"default"in A?S=inject(A.from||r,A.default,!0):S=inject(A.from||r):S=inject(A),isRef(S)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>S.value,set:E=>S.value=E}):t[r]=S}}function callHook$1(e,t,n){callWithAsyncErrorHandling(isArray$2(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,r){const A=r.includes(".")?createPathGetter(n,r):()=>n[r];if(isString$1(e)){const S=t[e];isFunction$3(S)&&watch(A,S)}else if(isFunction$3(e))watch(A,e.bind(n));else if(isObject$1(e))if(isArray$2(e))e.forEach(S=>createWatcher(S,t,n,r));else{const S=isFunction$3(e.handler)?e.handler.bind(n):t[e.handler];isFunction$3(S)&&watch(A,S,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:A,optionsCache:S,config:{optionMergeStrategies:E}}=e.appContext,T=S.get(t);let c;return T?c=T:!A.length&&!n&&!r?c=t:(c={},A.length&&A.forEach(C=>mergeOptions$1(c,C,E,!0)),mergeOptions$1(c,t,E)),isObject$1(t)&&S.set(t,c),c}function mergeOptions$1(e,t,n,r=!1){const{mixins:A,extends:S}=t;S&&mergeOptions$1(e,S,n,!0),A&&A.forEach(E=>mergeOptions$1(e,E,n,!0));for(const E in t)if(!(r&&E==="expose")){const T=internalOptionMergeStrats[E]||n&&n[E];e[E]=T?T(e[E],t[E]):t[E]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(e,t){return t?e?function(){return extend$1(isFunction$3(e)?e.call(this,this):e,isFunction$3(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$2(e)){const t={};for(let n=0;n1)return n&&isFunction$3(t)?t.call(r&&r.proxy):t}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}function initProps(e,t,n,r=!1){const A={},S={};def(S,InternalObjectKey,1),e.propsDefaults=Object.create(null),setFullProps(e,t,A,S);for(const E in e.propsOptions[0])E in A||(A[E]=void 0);n?e.props=r?A:shallowReactive(A):e.type.props?e.props=A:e.props=S,e.attrs=S}function updateProps(e,t,n,r){const{props:A,attrs:S,vnode:{patchFlag:E}}=e,T=toRaw(A),[c]=e.propsOptions;let C=!1;if((r||E>0)&&!(E&16)){if(E&8){const o=e.vnode.dynamicProps;for(let a=0;a{c=!0;const[$,l]=normalizePropsOptions(a,t,!0);extend$1(E,$),l&&T.push(...l)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!S&&!c)return isObject$1(e)&&r.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$2(S))for(let o=0;o-1,l[1]=R<0||f-1||hasOwn(l,"default"))&&T.push(a)}}}const C=[E,T];return isObject$1(e)&&r.set(e,C),C}function validatePropName(e){return e[0]!=="$"}function getType(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function isSameType(e,t){return getType(e)===getType(t)}function getTypeIndex(e,t){return isArray$2(t)?t.findIndex(n=>isSameType(n,e)):isFunction$3(t)&&isSameType(t,e)?0:-1}const isInternalKey=e=>e[0]==="_"||e==="$stable",normalizeSlotValue=e=>isArray$2(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot$1=(e,t,n)=>{if(t._n)return t;const r=withCtx((...A)=>normalizeSlotValue(t(...A)),n);return r._c=!1,r},normalizeObjectSlots=(e,t,n)=>{const r=e._ctx;for(const A in e){if(isInternalKey(A))continue;const S=e[A];if(isFunction$3(S))t[A]=normalizeSlot$1(A,S,r);else if(S!=null){const E=normalizeSlotValue(S);t[A]=()=>E}}},normalizeVNodeSlots=(e,t)=>{const n=normalizeSlotValue(t);e.slots.default=()=>n},initSlots=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=toRaw(t),def(t,"_",n)):normalizeObjectSlots(t,e.slots={})}else e.slots={},t&&normalizeVNodeSlots(e,t);def(e.slots,InternalObjectKey,1)},updateSlots=(e,t,n)=>{const{vnode:r,slots:A}=e;let S=!0,E=EMPTY_OBJ;if(r.shapeFlag&32){const T=t._;T?n&&T===1?S=!1:(extend$1(A,t),!n&&T===1&&delete A._):(S=!t.$stable,normalizeObjectSlots(t,A)),E=t}else t&&(normalizeVNodeSlots(e,t),E={default:1});if(S)for(const T in A)!isInternalKey(T)&&!(T in E)&&delete A[T]};function setRef(e,t,n,r,A=!1){if(isArray$2(e)){e.forEach(($,l)=>setRef($,t&&(isArray$2(t)?t[l]:t),n,r,A));return}if(isAsyncWrapper(r)&&!A)return;const S=r.shapeFlag&4?getExposeProxy(r.component)||r.component.proxy:r.el,E=A?null:S,{i:T,r:c}=e,C=t&&t.r,o=T.refs===EMPTY_OBJ?T.refs={}:T.refs,a=T.setupState;if(C!=null&&C!==c&&(isString$1(C)?(o[C]=null,hasOwn(a,C)&&(a[C]=null)):isRef(C)&&(C.value=null)),isFunction$3(c))callWithErrorHandling(c,T,12,[E,o]);else{const $=isString$1(c),l=isRef(c);if($||l){const f=()=>{if(e.f){const R=$?hasOwn(a,c)?a[c]:o[c]:c.value;A?isArray$2(R)&&remove(R,S):isArray$2(R)?R.includes(S)||R.push(S):$?(o[c]=[S],hasOwn(a,c)&&(a[c]=o[c])):(c.value=[S],e.k&&(o[e.k]=c.value))}else $?(o[c]=E,hasOwn(a,c)&&(a[c]=E)):l&&(c.value=E,e.k&&(o[e.k]=E))};E?(f.id=-1,queuePostRenderEffect(f,n)):f()}}}let hasMismatch=!1;const isSVGContainer=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",isComment=e=>e.nodeType===8;function createHydrationFunctions(e){const{mt:t,p:n,o:{patchProp:r,createText:A,nextSibling:S,parentNode:E,remove:T,insert:c,createComment:C}}=e,o=(L,M)=>{if(!M.hasChildNodes()){n(null,L,M),flushPostFlushCbs(),M._vnode=L;return}hasMismatch=!1,a(M.firstChild,L,null,null,null),flushPostFlushCbs(),M._vnode=L,hasMismatch&&console.error("Hydration completed but contains mismatches.")},a=(L,M,V,D,F,P=!1)=>{const X=isComment(L)&&L.data==="[",U=()=>R(L,M,V,D,F,X),{type:z,ref:B,shapeFlag:I,patchFlag:Y}=M;let H=L.nodeType;M.el=L,Y===-2&&(P=!1,M.dynamicChildren=null);let N=null;switch(z){case Text:H!==3?M.children===""?(c(M.el=A(""),E(L),L),N=L):N=U():(L.data!==M.children&&(hasMismatch=!0,L.data=M.children),N=S(L));break;case Comment:H!==8||X?N=U():N=S(L);break;case Static:if(X&&(L=S(L),H=L.nodeType),H===1||H===3){N=L;const W=!M.children.length;for(let G=0;G{P=P||!!M.dynamicChildren;const{type:X,props:U,patchFlag:z,shapeFlag:B,dirs:I}=M,Y=X==="input"&&I||X==="option";if(Y||z!==-1){if(I&&invokeDirectiveHook(M,null,V,"created"),U)if(Y||!P||z&48)for(const N in U)(Y&&N.endsWith("value")||isOn(N)&&!isReservedProp(N))&&r(L,N,null,U[N],!1,void 0,V);else U.onClick&&r(L,"onClick",null,U.onClick,!1,void 0,V);let H;if((H=U&&U.onVnodeBeforeMount)&&invokeVNodeHook(H,V,M),I&&invokeDirectiveHook(M,null,V,"beforeMount"),((H=U&&U.onVnodeMounted)||I)&&queueEffectWithSuspense(()=>{H&&invokeVNodeHook(H,V,M),I&&invokeDirectiveHook(M,null,V,"mounted")},D),B&16&&!(U&&(U.innerHTML||U.textContent))){let N=l(L.firstChild,M,L,V,D,F,P);for(;N;){hasMismatch=!0;const W=N;N=N.nextSibling,T(W)}}else B&8&&L.textContent!==M.children&&(hasMismatch=!0,L.textContent=M.children)}return L.nextSibling},l=(L,M,V,D,F,P,X)=>{X=X||!!M.dynamicChildren;const U=M.children,z=U.length;for(let B=0;B{const{slotScopeIds:X}=M;X&&(F=F?F.concat(X):X);const U=E(L),z=l(S(L),M,U,V,D,F,P);return z&&isComment(z)&&z.data==="]"?S(M.anchor=z):(hasMismatch=!0,c(M.anchor=C("]"),U,z),z)},R=(L,M,V,D,F,P)=>{if(hasMismatch=!0,M.el=null,P){const z=x(L);for(;;){const B=S(L);if(B&&B!==z)T(B);else break}}const X=S(L),U=E(L);return T(L),n(null,M,U,X,V,D,isSVGContainer(U),F),X},x=L=>{let M=0;for(;L;)if(L=S(L),L&&isComment(L)&&(L.data==="["&&M++,L.data==="]")){if(M===0)return S(L);M--}return L};return[o,a]}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function createHydrationRenderer(e){return baseCreateRenderer(e,createHydrationFunctions)}function baseCreateRenderer(e,t){const n=getGlobalThis();n.__VUE__=!0;const{insert:r,remove:A,patchProp:S,createElement:E,createText:T,createComment:c,setText:C,setElementText:o,parentNode:a,nextSibling:$,setScopeId:l=NOOP,insertStaticContent:f}=e,R=(ee,te,ae,he=null,me=null,ye=null,$e=!1,_e=null,Se=!!te.dynamicChildren)=>{if(ee===te)return;ee&&!isSameVNodeType(ee,te)&&(he=se(ee),ue(ee,me,ye,!0),ee=null),te.patchFlag===-2&&(Se=!1,te.dynamicChildren=null);const{type:be,ref:ke,shapeFlag:Ae}=te;switch(be){case Text:x(ee,te,ae,he);break;case Comment:L(ee,te,ae,he);break;case Static:ee==null&&M(te,ae,he,$e);break;case Fragment:Y(ee,te,ae,he,me,ye,$e,_e,Se);break;default:Ae&1?F(ee,te,ae,he,me,ye,$e,_e,Se):Ae&6?H(ee,te,ae,he,me,ye,$e,_e,Se):(Ae&64||Ae&128)&&be.process(ee,te,ae,he,me,ye,$e,_e,Se,ce)}ke!=null&&me&&setRef(ke,ee&&ee.ref,ye,te||ee,!te)},x=(ee,te,ae,he)=>{if(ee==null)r(te.el=T(te.children),ae,he);else{const me=te.el=ee.el;te.children!==ee.children&&C(me,te.children)}},L=(ee,te,ae,he)=>{ee==null?r(te.el=c(te.children||""),ae,he):te.el=ee.el},M=(ee,te,ae,he)=>{[ee.el,ee.anchor]=f(ee.children,te,ae,he,ee.el,ee.anchor)},V=({el:ee,anchor:te},ae,he)=>{let me;for(;ee&&ee!==te;)me=$(ee),r(ee,ae,he),ee=me;r(te,ae,he)},D=({el:ee,anchor:te})=>{let ae;for(;ee&&ee!==te;)ae=$(ee),A(ee),ee=ae;A(te)},F=(ee,te,ae,he,me,ye,$e,_e,Se)=>{$e=$e||te.type==="svg",ee==null?P(te,ae,he,me,ye,$e,_e,Se):z(ee,te,me,ye,$e,_e,Se)},P=(ee,te,ae,he,me,ye,$e,_e)=>{let Se,be;const{type:ke,props:Ae,shapeFlag:Ee,transition:Te,dirs:pe}=ee;if(Se=ee.el=E(ee.type,ye,Ae&&Ae.is,Ae),Ee&8?o(Se,ee.children):Ee&16&&U(ee.children,Se,null,he,me,ye&&ke!=="foreignObject",$e,_e),pe&&invokeDirectiveHook(ee,null,he,"created"),X(Se,ee,ee.scopeId,$e,he),Ae){for(const Ce in Ae)Ce!=="value"&&!isReservedProp(Ce)&&S(Se,Ce,null,Ae[Ce],ye,ee.children,he,me,ge);"value"in Ae&&S(Se,"value",null,Ae.value),(be=Ae.onVnodeBeforeMount)&&invokeVNodeHook(be,he,ee)}pe&&invokeDirectiveHook(ee,null,he,"beforeMount");const we=(!me||me&&!me.pendingBranch)&&Te&&!Te.persisted;we&&Te.beforeEnter(Se),r(Se,te,ae),((be=Ae&&Ae.onVnodeMounted)||we||pe)&&queuePostRenderEffect(()=>{be&&invokeVNodeHook(be,he,ee),we&&Te.enter(Se),pe&&invokeDirectiveHook(ee,null,he,"mounted")},me)},X=(ee,te,ae,he,me)=>{if(ae&&l(ee,ae),he)for(let ye=0;ye{for(let be=Se;be{const _e=te.el=ee.el;let{patchFlag:Se,dynamicChildren:be,dirs:ke}=te;Se|=ee.patchFlag&16;const Ae=ee.props||EMPTY_OBJ,Ee=te.props||EMPTY_OBJ;let Te;ae&&toggleRecurse(ae,!1),(Te=Ee.onVnodeBeforeUpdate)&&invokeVNodeHook(Te,ae,te,ee),ke&&invokeDirectiveHook(te,ee,ae,"beforeUpdate"),ae&&toggleRecurse(ae,!0);const pe=me&&te.type!=="foreignObject";if(be?B(ee.dynamicChildren,be,_e,ae,he,pe,ye):$e||J(ee,te,_e,null,ae,he,pe,ye,!1),Se>0){if(Se&16)I(_e,te,Ae,Ee,ae,he,me);else if(Se&2&&Ae.class!==Ee.class&&S(_e,"class",null,Ee.class,me),Se&4&&S(_e,"style",Ae.style,Ee.style,me),Se&8){const we=te.dynamicProps;for(let Ce=0;Ce{Te&&invokeVNodeHook(Te,ae,te,ee),ke&&invokeDirectiveHook(te,ee,ae,"updated")},he)},B=(ee,te,ae,he,me,ye,$e)=>{for(let _e=0;_e{if(ae!==he){if(ae!==EMPTY_OBJ)for(const _e in ae)!isReservedProp(_e)&&!(_e in he)&&S(ee,_e,ae[_e],null,$e,te.children,me,ye,ge);for(const _e in he){if(isReservedProp(_e))continue;const Se=he[_e],be=ae[_e];Se!==be&&_e!=="value"&&S(ee,_e,be,Se,$e,te.children,me,ye,ge)}"value"in he&&S(ee,"value",ae.value,he.value)}},Y=(ee,te,ae,he,me,ye,$e,_e,Se)=>{const be=te.el=ee?ee.el:T(""),ke=te.anchor=ee?ee.anchor:T("");let{patchFlag:Ae,dynamicChildren:Ee,slotScopeIds:Te}=te;Te&&(_e=_e?_e.concat(Te):Te),ee==null?(r(be,ae,he),r(ke,ae,he),U(te.children,ae,ke,me,ye,$e,_e,Se)):Ae>0&&Ae&64&&Ee&&ee.dynamicChildren?(B(ee.dynamicChildren,Ee,ae,me,ye,$e,_e),(te.key!=null||me&&te===me.subTree)&&traverseStaticChildren(ee,te,!0)):J(ee,te,ae,ke,me,ye,$e,_e,Se)},H=(ee,te,ae,he,me,ye,$e,_e,Se)=>{te.slotScopeIds=_e,ee==null?te.shapeFlag&512?me.ctx.activate(te,ae,he,$e,Se):N(te,ae,he,me,ye,$e,Se):W(ee,te,Se)},N=(ee,te,ae,he,me,ye,$e)=>{const _e=ee.component=createComponentInstance(ee,he,me);if(isKeepAlive(ee)&&(_e.ctx.renderer=ce),setupComponent(_e),_e.asyncDep){if(me&&me.registerDep(_e,G),!ee.el){const Se=_e.subTree=createVNode(Comment);L(null,Se,te,ae)}return}G(_e,ee,te,ae,me,ye,$e)},W=(ee,te,ae)=>{const he=te.component=ee.component;if(shouldUpdateComponent(ee,te,ae))if(he.asyncDep&&!he.asyncResolved){Z(he,te,ae);return}else he.next=te,invalidateJob(he.update),he.update();else te.el=ee.el,he.vnode=te},G=(ee,te,ae,he,me,ye,$e)=>{const _e=()=>{if(ee.isMounted){let{next:ke,bu:Ae,u:Ee,parent:Te,vnode:pe}=ee,we=ke,Ce;toggleRecurse(ee,!1),ke?(ke.el=pe.el,Z(ee,ke,$e)):ke=pe,Ae&&invokeArrayFns(Ae),(Ce=ke.props&&ke.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Ce,Te,ke,pe),toggleRecurse(ee,!0);const Re=renderComponentRoot(ee),Le=ee.subTree;ee.subTree=Re,R(Le,Re,a(Le.el),se(Le),ee,me,ye),ke.el=Re.el,we===null&&updateHOCHostEl(ee,Re.el),Ee&&queuePostRenderEffect(Ee,me),(Ce=ke.props&&ke.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Ce,Te,ke,pe),me)}else{let ke;const{el:Ae,props:Ee}=te,{bm:Te,m:pe,parent:we}=ee,Ce=isAsyncWrapper(te);if(toggleRecurse(ee,!1),Te&&invokeArrayFns(Te),!Ce&&(ke=Ee&&Ee.onVnodeBeforeMount)&&invokeVNodeHook(ke,we,te),toggleRecurse(ee,!0),Ae&&ve){const Re=()=>{ee.subTree=renderComponentRoot(ee),ve(Ae,ee.subTree,ee,me,null)};Ce?te.type.__asyncLoader().then(()=>!ee.isUnmounted&&Re()):Re()}else{const Re=ee.subTree=renderComponentRoot(ee);R(null,Re,ae,he,ee,me,ye),te.el=Re.el}if(pe&&queuePostRenderEffect(pe,me),!Ce&&(ke=Ee&&Ee.onVnodeMounted)){const Re=te;queuePostRenderEffect(()=>invokeVNodeHook(ke,we,Re),me)}(te.shapeFlag&256||we&&isAsyncWrapper(we.vnode)&&we.vnode.shapeFlag&256)&&ee.a&&queuePostRenderEffect(ee.a,me),ee.isMounted=!0,te=ae=he=null}},Se=ee.effect=new ReactiveEffect(_e,()=>queueJob(be),ee.scope),be=ee.update=()=>Se.run();be.id=ee.uid,toggleRecurse(ee,!0),be()},Z=(ee,te,ae)=>{te.component=ee;const he=ee.vnode.props;ee.vnode=te,ee.next=null,updateProps(ee,te.props,he,ae),updateSlots(ee,te.children,ae),pauseTracking(),flushPreFlushCbs(),resetTracking()},J=(ee,te,ae,he,me,ye,$e,_e,Se=!1)=>{const be=ee&&ee.children,ke=ee?ee.shapeFlag:0,Ae=te.children,{patchFlag:Ee,shapeFlag:Te}=te;if(Ee>0){if(Ee&128){ne(be,Ae,ae,he,me,ye,$e,_e,Se);return}else if(Ee&256){Q(be,Ae,ae,he,me,ye,$e,_e,Se);return}}Te&8?(ke&16&&ge(be,me,ye),Ae!==be&&o(ae,Ae)):ke&16?Te&16?ne(be,Ae,ae,he,me,ye,$e,_e,Se):ge(be,me,ye,!0):(ke&8&&o(ae,""),Te&16&&U(Ae,ae,he,me,ye,$e,_e,Se))},Q=(ee,te,ae,he,me,ye,$e,_e,Se)=>{ee=ee||EMPTY_ARR,te=te||EMPTY_ARR;const be=ee.length,ke=te.length,Ae=Math.min(be,ke);let Ee;for(Ee=0;Eeke?ge(ee,me,ye,!0,!1,Ae):U(te,ae,he,me,ye,$e,_e,Se,Ae)},ne=(ee,te,ae,he,me,ye,$e,_e,Se)=>{let be=0;const ke=te.length;let Ae=ee.length-1,Ee=ke-1;for(;be<=Ae&&be<=Ee;){const Te=ee[be],pe=te[be]=Se?cloneIfMounted(te[be]):normalizeVNode(te[be]);if(isSameVNodeType(Te,pe))R(Te,pe,ae,null,me,ye,$e,_e,Se);else break;be++}for(;be<=Ae&&be<=Ee;){const Te=ee[Ae],pe=te[Ee]=Se?cloneIfMounted(te[Ee]):normalizeVNode(te[Ee]);if(isSameVNodeType(Te,pe))R(Te,pe,ae,null,me,ye,$e,_e,Se);else break;Ae--,Ee--}if(be>Ae){if(be<=Ee){const Te=Ee+1,pe=TeEe)for(;be<=Ae;)ue(ee[be],me,ye,!0),be++;else{const Te=be,pe=be,we=new Map;for(be=pe;be<=Ee;be++){const xe=te[be]=Se?cloneIfMounted(te[be]):normalizeVNode(te[be]);xe.key!=null&&we.set(xe.key,be)}let Ce,Re=0;const Le=Ee-pe+1;let Ie=!1,Pe=0;const Ne=new Array(Le);for(be=0;be=Le){ue(xe,me,ye,!0);continue}let Fe;if(xe.key!=null)Fe=we.get(xe.key);else for(Ce=pe;Ce<=Ee;Ce++)if(Ne[Ce-pe]===0&&isSameVNodeType(xe,te[Ce])){Fe=Ce;break}Fe===void 0?ue(xe,me,ye,!0):(Ne[Fe-pe]=be+1,Fe>=Pe?Pe=Fe:Ie=!0,R(xe,te[Fe],ae,null,me,ye,$e,_e,Se),Re++)}const Oe=Ie?getSequence(Ne):EMPTY_ARR;for(Ce=Oe.length-1,be=Le-1;be>=0;be--){const xe=pe+be,Fe=te[xe],Be=xe+1{const{el:ye,type:$e,transition:_e,children:Se,shapeFlag:be}=ee;if(be&6){re(ee.component.subTree,te,ae,he);return}if(be&128){ee.suspense.move(te,ae,he);return}if(be&64){$e.move(ee,te,ae,ce);return}if($e===Fragment){r(ye,te,ae);for(let Ae=0;Ae_e.enter(ye),me);else{const{leave:Ae,delayLeave:Ee,afterLeave:Te}=_e,pe=()=>r(ye,te,ae),we=()=>{Ae(ye,()=>{pe(),Te&&Te()})};Ee?Ee(ye,pe,we):we()}else r(ye,te,ae)},ue=(ee,te,ae,he=!1,me=!1)=>{const{type:ye,props:$e,ref:_e,children:Se,dynamicChildren:be,shapeFlag:ke,patchFlag:Ae,dirs:Ee}=ee;if(_e!=null&&setRef(_e,null,ae,ee,!0),ke&256){te.ctx.deactivate(ee);return}const Te=ke&1&&Ee,pe=!isAsyncWrapper(ee);let we;if(pe&&(we=$e&&$e.onVnodeBeforeUnmount)&&invokeVNodeHook(we,te,ee),ke&6)fe(ee.component,ae,he);else{if(ke&128){ee.suspense.unmount(ae,he);return}Te&&invokeDirectiveHook(ee,null,te,"beforeUnmount"),ke&64?ee.type.remove(ee,te,ae,me,ce,he):be&&(ye!==Fragment||Ae>0&&Ae&64)?ge(be,te,ae,!1,!0):(ye===Fragment&&Ae&384||!me&&ke&16)&&ge(Se,te,ae),he&&oe(ee)}(pe&&(we=$e&&$e.onVnodeUnmounted)||Te)&&queuePostRenderEffect(()=>{we&&invokeVNodeHook(we,te,ee),Te&&invokeDirectiveHook(ee,null,te,"unmounted")},ae)},oe=ee=>{const{type:te,el:ae,anchor:he,transition:me}=ee;if(te===Fragment){ie(ae,he);return}if(te===Static){D(ee);return}const ye=()=>{A(ae),me&&!me.persisted&&me.afterLeave&&me.afterLeave()};if(ee.shapeFlag&1&&me&&!me.persisted){const{leave:$e,delayLeave:_e}=me,Se=()=>$e(ae,ye);_e?_e(ee.el,ye,Se):Se()}else ye()},ie=(ee,te)=>{let ae;for(;ee!==te;)ae=$(ee),A(ee),ee=ae;A(te)},fe=(ee,te,ae)=>{const{bum:he,scope:me,update:ye,subTree:$e,um:_e}=ee;he&&invokeArrayFns(he),me.stop(),ye&&(ye.active=!1,ue($e,ee,te,ae)),_e&&queuePostRenderEffect(_e,te),queuePostRenderEffect(()=>{ee.isUnmounted=!0},te),te&&te.pendingBranch&&!te.isUnmounted&&ee.asyncDep&&!ee.asyncResolved&&ee.suspenseId===te.pendingId&&(te.deps--,te.deps===0&&te.resolve())},ge=(ee,te,ae,he=!1,me=!1,ye=0)=>{for(let $e=ye;$eee.shapeFlag&6?se(ee.component.subTree):ee.shapeFlag&128?ee.suspense.next():$(ee.anchor||ee.el),de=(ee,te,ae)=>{ee==null?te._vnode&&ue(te._vnode,null,null,!0):R(te._vnode||null,ee,te,null,null,null,ae),flushPreFlushCbs(),flushPostFlushCbs(),te._vnode=ee},ce={p:R,um:ue,m:re,r:oe,mt:N,mc:U,pc:J,pbc:B,n:se,o:e};let le,ve;return t&&([le,ve]=t(ce)),{render:de,hydrate:le,createApp:createAppAPI(de,le)}}function toggleRecurse({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function traverseStaticChildren(e,t,n=!1){const r=e.children,A=t.children;if(isArray$2(r)&&isArray$2(A))for(let S=0;S>1,e[n[T]]0&&(t[r]=n[S-1]),n[S]=r)}}for(S=n.length,E=n[S-1];S-- >0;)n[S]=E,E=t[E];return n}const isTeleport=e=>e.__isTeleport,isTeleportDisabled=e=>e&&(e.disabled||e.disabled===""),isTargetSVG=e=>typeof SVGElement<"u"&&e instanceof SVGElement,resolveTarget=(e,t)=>{const n=e&&e.to;return isString$1(n)?t?t(n):null:n},TeleportImpl={__isTeleport:!0,process(e,t,n,r,A,S,E,T,c,C){const{mc:o,pc:a,pbc:$,o:{insert:l,querySelector:f,createText:R,createComment:x}}=C,L=isTeleportDisabled(t.props);let{shapeFlag:M,children:V,dynamicChildren:D}=t;if(e==null){const F=t.el=R(""),P=t.anchor=R("");l(F,n,r),l(P,n,r);const X=t.target=resolveTarget(t.props,f),U=t.targetAnchor=R("");X&&(l(U,X),E=E||isTargetSVG(X));const z=(B,I)=>{M&16&&o(V,B,I,A,S,E,T,c)};L?z(n,P):X&&z(X,U)}else{t.el=e.el;const F=t.anchor=e.anchor,P=t.target=e.target,X=t.targetAnchor=e.targetAnchor,U=isTeleportDisabled(e.props),z=U?n:P,B=U?F:X;if(E=E||isTargetSVG(P),D?($(e.dynamicChildren,D,z,A,S,E,T),traverseStaticChildren(e,t,!0)):c||a(e,t,z,B,A,S,E,T,!1),L)U||moveTeleport(t,n,F,C,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const I=t.target=resolveTarget(t.props,f);I&&moveTeleport(t,I,null,C,0)}else U&&moveTeleport(t,P,X,C,1)}updateCssVars(t)},remove(e,t,n,r,{um:A,o:{remove:S}},E){const{shapeFlag:T,children:c,anchor:C,targetAnchor:o,target:a,props:$}=e;if(a&&S(o),(E||!isTeleportDisabled($))&&(S(C),T&16))for(let l=0;l0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(e),e}function createElementBlock(e,t,n,r,A,S){return setupBlock(createBaseVNode(e,t,n,r,A,S,!0))}function createBlock(e,t,n,r,A){return setupBlock(createVNode(e,t,n,r,A,!0))}function isVNode(e){return e?e.__v_isVNode===!0:!1}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}function transformVNodeArgs(e){}const InternalObjectKey="__vInternal",normalizeKey=({key:e})=>e??null,normalizeRef=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?isString$1(e)||isRef(e)||isFunction$3(e)?{i:currentRenderingInstance,r:e,k:t,f:!!n}:e:null);function createBaseVNode(e,t=null,n=null,r=0,A=null,S=e===Fragment?0:1,E=!1,T=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:S,patchFlag:r,dynamicProps:A,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return T?(normalizeChildren(c,n),S&128&&e.normalize(c)):n&&(c.shapeFlag|=isString$1(n)?8:16),isBlockTreeEnabled>0&&!E&¤tBlock&&(c.patchFlag>0||S&6)&&c.patchFlag!==32&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(e,t=null,n=null,r=0,A=null,S=!1){if((!e||e===NULL_DYNAMIC_COMPONENT)&&(e=Comment),isVNode(e)){const T=cloneVNode(e,t,!0);return n&&normalizeChildren(T,n),isBlockTreeEnabled>0&&!S&¤tBlock&&(T.shapeFlag&6?currentBlock[currentBlock.indexOf(e)]=T:currentBlock.push(T)),T.patchFlag|=-2,T}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:T,style:c}=t;T&&!isString$1(T)&&(t.class=normalizeClass(T)),isObject$1(c)&&(isProxy(c)&&!isArray$2(c)&&(c=extend$1({},c)),t.style=normalizeStyle(c))}const E=isString$1(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$1(e)?4:isFunction$3(e)?2:0;return createBaseVNode(e,t,n,r,A,E,S,!0)}function guardReactiveProps(e){return e?isProxy(e)||InternalObjectKey in e?extend$1({},e):e:null}function cloneVNode(e,t,n=!1){const{props:r,ref:A,patchFlag:S,children:E}=e,T=t?mergeProps(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:T,key:T&&normalizeKey(T),ref:t&&t.ref?n&&A?isArray$2(A)?A.concat(normalizeRef(t)):[A,normalizeRef(t)]:normalizeRef(t):A,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:E,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?S===-1?16:S|16:S,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cloneVNode(e.ssContent),ssFallback:e.ssFallback&&cloneVNode(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function createTextVNode(e=" ",t=0){return createVNode(Text,null,e,t)}function createStaticVNode(e,t){const n=createVNode(Static,null,e);return n.staticCount=t,n}function createCommentVNode(e="",t=!1){return t?(openBlock(),createBlock(Comment,null,e)):createVNode(Comment,null,e)}function normalizeVNode(e){return e==null||typeof e=="boolean"?createVNode(Comment):isArray$2(e)?createVNode(Fragment,null,e.slice()):typeof e=="object"?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(isArray$2(t))n=16;else if(typeof t=="object")if(r&65){const A=t.default;A&&(A._c&&(A._d=!1),normalizeChildren(e,A()),A._c&&(A._d=!0));return}else{n=32;const A=t._;!A&&!(InternalObjectKey in t)?t._ctx=currentRenderingInstance:A===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else isFunction$3(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),r&64?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(...e){const t={};for(let n=0;ncurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,globalCurrentInstanceSetters,settersKey="__VUE_INSTANCE_SETTERS__";(globalCurrentInstanceSetters=getGlobalThis()[settersKey])||(globalCurrentInstanceSetters=getGlobalThis()[settersKey]=[]),globalCurrentInstanceSetters.push(e=>currentInstance=e),internalSetCurrentInstance=e=>{globalCurrentInstanceSetters.length>1?globalCurrentInstanceSetters.forEach(t=>t(e)):globalCurrentInstanceSetters[0](e)};const setCurrentInstance=e=>{internalSetCurrentInstance(e),e.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(e){return e.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(e,t=!1){isInSSRComponentSetup=t;const{props:n,children:r}=e.vnode,A=isStatefulComponent(e);initProps(e,n,A,t),initSlots(e,r);const S=A?setupStatefulComponent(e,t):void 0;return isInSSRComponentSetup=!1,S}function setupStatefulComponent(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=markRaw(new Proxy(e.ctx,PublicInstanceProxyHandlers));const{setup:r}=n;if(r){const A=e.setupContext=r.length>1?createSetupContext(e):null;setCurrentInstance(e),pauseTracking();const S=callWithErrorHandling(r,e,0,[e.props,A]);if(resetTracking(),unsetCurrentInstance(),isPromise$1(S)){if(S.then(unsetCurrentInstance,unsetCurrentInstance),t)return S.then(E=>{handleSetupResult(e,E,t)}).catch(E=>{handleError(E,e,0)});e.asyncDep=S}else handleSetupResult(e,S,t)}else finishComponentSetup(e,t)}function handleSetupResult(e,t,n){isFunction$3(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$1(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e,n)}let compile$1,installWithProxy;function registerRuntimeCompiler(e){compile$1=e,installWithProxy=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$1;function finishComponentSetup(e,t,n){const r=e.type;if(!e.render){if(!t&&compile$1&&!r.render){const A=r.template||resolveMergedOptions(e).template;if(A){const{isCustomElement:S,compilerOptions:E}=e.appContext.config,{delimiters:T,compilerOptions:c}=r,C=extend$1(extend$1({isCustomElement:S,delimiters:T},E),c);r.render=compile$1(A,C)}}e.render=r.render||NOOP,installWithProxy&&installWithProxy(e)}setCurrentInstance(e),pauseTracking(),applyOptions(e),resetTracking(),unsetCurrentInstance()}function getAttrsProxy(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return track(e,"get","$attrs"),t[n]}}))}function createSetupContext(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return getAttrsProxy(e)},slots:e.slots,emit:e.emit,expose:t}}function getExposeProxy(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in publicPropertiesMap)return publicPropertiesMap[n](e)},has(t,n){return n in t||n in publicPropertiesMap}}))}function getComponentName(e,t=!0){return isFunction$3(e)?e.displayName||e.name:e.name||t&&e.__name}function isClassComponent(e){return isFunction$3(e)&&"__vccOpts"in e}const computed=(e,t)=>computed$1(e,t,isInSSRComponentSetup);function h(e,t,n){const r=arguments.length;return r===2?isObject$1(t)&&!isArray$2(t)?isVNode(t)?createVNode(e,null,[t]):createVNode(e,t):createVNode(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&isVNode(n)&&(n=[n]),createVNode(e,t,n))}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey);function initCustomFormatter(){}function withMemo(e,t,n,r){const A=n[r];if(A&&isMemoSame(A,e))return A;const S=t();return S.memo=e.slice(),n[r]=S}function isMemoSame(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r0&¤tBlock&¤tBlock.push(e),!0}const version="3.3.4",_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,svgNS="http://www.w3.org/2000/svg",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const A=t?doc.createElementNS(svgNS,e):doc.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&A.setAttribute("multiple",r.multiple),A},createText:e=>doc.createTextNode(e),createComment:e=>doc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>doc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,A,S){const E=n?n.previousSibling:t.lastChild;if(A&&(A===S||A.nextSibling))for(;t.insertBefore(A.cloneNode(!0),n),!(A===S||!(A=A.nextSibling)););else{templateContainer.innerHTML=r?`${e}`:e;const T=templateContainer.content;if(r){const c=T.firstChild;for(;c.firstChild;)T.appendChild(c.firstChild);T.removeChild(c)}t.insertBefore(T,n)}return[E?E.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function patchClass(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function patchStyle(e,t,n){const r=e.style,A=isString$1(n);if(n&&!A){if(t&&!isString$1(t))for(const S in t)n[S]==null&&setStyle(r,S,"");for(const S in n)setStyle(r,S,n[S])}else{const S=r.display;A?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=S)}}const importantRE=/\s*!important$/;function setStyle(e,t,n){if(isArray$2(n))n.forEach(r=>setStyle(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=autoPrefix(e,t);importantRE.test(n)?e.setProperty(hyphenate(r),n.replace(importantRE,""),"important"):e[r]=n}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const n=prefixCache[t];if(n)return n;let r=camelize(t);if(r!=="filter"&&r in e)return prefixCache[t]=r;r=capitalize(r);for(let A=0;AcachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(r,n.value),t,5,[r])};return n.value=e,n.attached=getNow(),n}function patchStopImmediatePropagation(e,t){if(isArray$2(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>A=>!A._stopped&&r&&r(A))}else return t}const nativeOnRE=/^on[a-z]/,patchProp=(e,t,n,r,A=!1,S,E,T,c)=>{t==="class"?patchClass(e,r,A):t==="style"?patchStyle(e,n,r):isOn(t)?isModelListener(t)||patchEvent(e,t,n,r,E):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):shouldSetAsProp(e,t,r,A))?patchDOMProp(e,t,r,S,E,T,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),patchAttr(e,t,r,A))};function shouldSetAsProp(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&nativeOnRE.test(t)&&isFunction$3(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||nativeOnRE.test(t)&&isString$1(n)?!1:t in e}function defineCustomElement(e,t){const n=defineComponent(e);class r extends VueElement{constructor(S){super(n,S,t)}}return r.def=n,r}const defineSSRCustomElement=e=>defineCustomElement(e,hydrate),BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(render(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r{for(const A of r)this._setAttr(A.attributeName)}).observe(this,{attributes:!0});const t=(r,A=!1)=>{const{props:S,styles:E}=r;let T;if(S&&!isArray$2(S))for(const c in S){const C=S[c];(C===Number||C&&C.type===Number)&&(c in this._props&&(this._props[c]=toNumber(this._props[c])),(T||(T=Object.create(null)))[camelize(c)]=!0)}this._numberProps=T,A&&this._resolveProps(r),this._applyStyles(E),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=isArray$2(n)?n:Object.keys(n||{});for(const A of Object.keys(this))A[0]!=="_"&&r.includes(A)&&this._setProp(A,this[A],!0,!1);for(const A of r.map(camelize))Object.defineProperty(this,A,{get(){return this._getProp(A)},set(S){this._setProp(A,S)}})}_setAttr(t){let n=this.getAttribute(t);const r=camelize(t);this._numberProps&&this._numberProps[r]&&(n=toNumber(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,A=!0){n!==this._props[t]&&(this._props[t]=n,A&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(hyphenate(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(hyphenate(t),n+""):n||this.removeAttribute(hyphenate(t))))}_update(){render(this._createVNode(),this.shadowRoot)}_createVNode(){const t=createVNode(this._def,extend$1({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(S,E)=>{this.dispatchEvent(new CustomEvent(S,{detail:E}))};n.emit=(S,...E)=>{r(S,E),hyphenate(S)!==S&&r(hyphenate(S),E)};let A=this;for(;A=A&&(A.parentNode||A.host);)if(A instanceof VueElement){n.parent=A._instance,n.provides=A._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function useCssModule(e="$style"){{const t=getCurrentInstance();if(!t)return EMPTY_OBJ;const n=t.type.__cssModules;if(!n)return EMPTY_OBJ;const r=n[e];return r||EMPTY_OBJ}}function useCssVars(e){const t=getCurrentInstance();if(!t)return;const n=t.ut=(A=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(S=>setVarsOnNode(S,A))},r=()=>{const A=e(t.proxy);setVarsOnVNode(t.subTree,A),n(A)};watchPostEffect(r),onMounted(()=>{const A=new MutationObserver(r);A.observe(t.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>A.disconnect())})}function setVarsOnVNode(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{setVarsOnVNode(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)setVarsOnNode(e.el,t);else if(e.type===Fragment)e.children.forEach(n=>setVarsOnVNode(n,t));else if(e.type===Static){let{el:n,anchor:r}=e;for(;n&&(setVarsOnNode(n,t),n!==r);)n=n.nextSibling}}function setVarsOnNode(e,t){if(e.nodeType===1){const n=e.style;for(const r in t)n.setProperty(`--${r}`,t[r])}}const TRANSITION="transition",ANIMATION="animation",Transition=(e,{slots:t})=>h(BaseTransition,resolveTransitionProps(e),t);Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=Transition.props=extend$1({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),callHook=(e,t=[])=>{isArray$2(e)?e.forEach(n=>n(...t)):e&&e(...t)},hasExplicitCallback=e=>e?isArray$2(e)?e.some(t=>t.length>1):e.length>1:!1;function resolveTransitionProps(e){const t={};for(const Y in e)Y in DOMTransitionPropsValidators||(t[Y]=e[Y]);if(e.css===!1)return t;const{name:n="v",type:r,duration:A,enterFromClass:S=`${n}-enter-from`,enterActiveClass:E=`${n}-enter-active`,enterToClass:T=`${n}-enter-to`,appearFromClass:c=S,appearActiveClass:C=E,appearToClass:o=T,leaveFromClass:a=`${n}-leave-from`,leaveActiveClass:$=`${n}-leave-active`,leaveToClass:l=`${n}-leave-to`}=e,f=normalizeDuration(A),R=f&&f[0],x=f&&f[1],{onBeforeEnter:L,onEnter:M,onEnterCancelled:V,onLeave:D,onLeaveCancelled:F,onBeforeAppear:P=L,onAppear:X=M,onAppearCancelled:U=V}=t,z=(Y,H,N)=>{removeTransitionClass(Y,H?o:T),removeTransitionClass(Y,H?C:E),N&&N()},B=(Y,H)=>{Y._isLeaving=!1,removeTransitionClass(Y,a),removeTransitionClass(Y,l),removeTransitionClass(Y,$),H&&H()},I=Y=>(H,N)=>{const W=Y?X:M,G=()=>z(H,Y,N);callHook(W,[H,G]),nextFrame(()=>{removeTransitionClass(H,Y?c:S),addTransitionClass(H,Y?o:T),hasExplicitCallback(W)||whenTransitionEnds(H,r,R,G)})};return extend$1(t,{onBeforeEnter(Y){callHook(L,[Y]),addTransitionClass(Y,S),addTransitionClass(Y,E)},onBeforeAppear(Y){callHook(P,[Y]),addTransitionClass(Y,c),addTransitionClass(Y,C)},onEnter:I(!1),onAppear:I(!0),onLeave(Y,H){Y._isLeaving=!0;const N=()=>B(Y,H);addTransitionClass(Y,a),forceReflow(),addTransitionClass(Y,$),nextFrame(()=>{Y._isLeaving&&(removeTransitionClass(Y,a),addTransitionClass(Y,l),hasExplicitCallback(D)||whenTransitionEnds(Y,r,x,N))}),callHook(D,[Y,N])},onEnterCancelled(Y){z(Y,!1),callHook(V,[Y])},onAppearCancelled(Y){z(Y,!0),callHook(U,[Y])},onLeaveCancelled(Y){B(Y),callHook(F,[Y])}})}function normalizeDuration(e){if(e==null)return null;if(isObject$1(e))return[NumberOf(e.enter),NumberOf(e.leave)];{const t=NumberOf(e);return[t,t]}}function NumberOf(e){return toNumber(e)}function addTransitionClass(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function removeTransitionClass(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function nextFrame(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let endId=0;function whenTransitionEnds(e,t,n,r){const A=e._endId=++endId,S=()=>{A===e._endId&&r()};if(n)return setTimeout(S,n);const{type:E,timeout:T,propCount:c}=getTransitionInfo(e,t);if(!E)return r();const C=E+"end";let o=0;const a=()=>{e.removeEventListener(C,$),S()},$=l=>{l.target===e&&++o>=c&&a()};setTimeout(()=>{o(n[f]||"").split(", "),A=r(`${TRANSITION}Delay`),S=r(`${TRANSITION}Duration`),E=getTimeout(A,S),T=r(`${ANIMATION}Delay`),c=r(`${ANIMATION}Duration`),C=getTimeout(T,c);let o=null,a=0,$=0;t===TRANSITION?E>0&&(o=TRANSITION,a=E,$=S.length):t===ANIMATION?C>0&&(o=ANIMATION,a=C,$=c.length):(a=Math.max(E,C),o=a>0?E>C?TRANSITION:ANIMATION:null,$=o?o===TRANSITION?S.length:c.length:0);const l=o===TRANSITION&&/\b(transform|all)(,|$)/.test(r(`${TRANSITION}Property`).toString());return{type:o,timeout:a,propCount:$,hasTransform:l}}function getTimeout(e,t){for(;e.lengthtoMs(n)+toMs(e[r])))}function toMs(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}const positionMap=new WeakMap,newPositionMap=new WeakMap,TransitionGroupImpl={name:"TransitionGroup",props:extend$1({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=getCurrentInstance(),r=useTransitionState();let A,S;return onUpdated(()=>{if(!A.length)return;const E=e.moveClass||`${e.name||"v"}-move`;if(!hasCSSTransform(A[0].el,n.vnode.el,E))return;A.forEach(callPendingCbs),A.forEach(recordPosition);const T=A.filter(applyTranslation);forceReflow(),T.forEach(c=>{const C=c.el,o=C.style;addTransitionClass(C,E),o.transform=o.webkitTransform=o.transitionDuration="";const a=C._moveCb=$=>{$&&$.target!==C||(!$||/transform$/.test($.propertyName))&&(C.removeEventListener("transitionend",a),C._moveCb=null,removeTransitionClass(C,E))};C.addEventListener("transitionend",a)})}),()=>{const E=toRaw(e),T=resolveTransitionProps(E);let c=E.tag||Fragment;A=S,S=t.default?getTransitionRawChildren(t.default()):[];for(let C=0;Cdelete e.mode;TransitionGroupImpl.props;const TransitionGroup=TransitionGroupImpl;function callPendingCbs(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function recordPosition(e){newPositionMap.set(e,e.el.getBoundingClientRect())}function applyTranslation(e){const t=positionMap.get(e),n=newPositionMap.get(e),r=t.left-n.left,A=t.top-n.top;if(r||A){const S=e.el.style;return S.transform=S.webkitTransform=`translate(${r}px,${A}px)`,S.transitionDuration="0s",e}}function hasCSSTransform(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(E=>{E.split(/\s+/).forEach(T=>T&&r.classList.remove(T))}),n.split(/\s+/).forEach(E=>E&&r.classList.add(E)),r.style.display="none";const A=t.nodeType===1?t:t.parentNode;A.appendChild(r);const{hasTransform:S}=getTransitionInfo(r);return A.removeChild(r),S}const getModelAssigner=e=>{const t=e.props["onUpdate:modelValue"]||!1;return isArray$2(t)?n=>invokeArrayFns(t,n):t};function onCompositionStart(e){e.target.composing=!0}function onCompositionEnd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vModelText={created(e,{modifiers:{lazy:t,trim:n,number:r}},A){e._assign=getModelAssigner(A);const S=r||A.props&&A.props.type==="number";addEventListener(e,t?"change":"input",E=>{if(E.target.composing)return;let T=e.value;n&&(T=T.trim()),S&&(T=looseToNumber(T)),e._assign(T)}),n&&addEventListener(e,"change",()=>{e.value=e.value.trim()}),t||(addEventListener(e,"compositionstart",onCompositionStart),addEventListener(e,"compositionend",onCompositionEnd),addEventListener(e,"change",onCompositionEnd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:A}},S){if(e._assign=getModelAssigner(S),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(A||e.type==="number")&&looseToNumber(e.value)===t))return;const E=t??"";e.value!==E&&(e.value=E)}},vModelCheckbox={deep:!0,created(e,t,n){e._assign=getModelAssigner(n),addEventListener(e,"change",()=>{const r=e._modelValue,A=getValue(e),S=e.checked,E=e._assign;if(isArray$2(r)){const T=looseIndexOf(r,A),c=T!==-1;if(S&&!c)E(r.concat(A));else if(!S&&c){const C=[...r];C.splice(T,1),E(C)}}else if(isSet(r)){const T=new Set(r);S?T.add(A):T.delete(A),E(T)}else E(getCheckboxValue(e,S))})},mounted:setChecked,beforeUpdate(e,t,n){e._assign=getModelAssigner(n),setChecked(e,t,n)}};function setChecked(e,{value:t,oldValue:n},r){e._modelValue=t,isArray$2(t)?e.checked=looseIndexOf(t,r.props.value)>-1:isSet(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=looseEqual(t,getCheckboxValue(e,!0)))}const vModelRadio={created(e,{value:t},n){e.checked=looseEqual(t,n.props.value),e._assign=getModelAssigner(n),addEventListener(e,"change",()=>{e._assign(getValue(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=getModelAssigner(r),t!==n&&(e.checked=looseEqual(t,r.props.value))}},vModelSelect={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const A=isSet(t);addEventListener(e,"change",()=>{const S=Array.prototype.filter.call(e.options,E=>E.selected).map(E=>n?looseToNumber(getValue(E)):getValue(E));e._assign(e.multiple?A?new Set(S):S:S[0])}),e._assign=getModelAssigner(r)},mounted(e,{value:t}){setSelected(e,t)},beforeUpdate(e,t,n){e._assign=getModelAssigner(n)},updated(e,{value:t}){setSelected(e,t)}};function setSelected(e,t){const n=e.multiple;if(!(n&&!isArray$2(t)&&!isSet(t))){for(let r=0,A=e.options.length;r-1:S.selected=t.has(E);else if(looseEqual(getValue(S),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function getValue(e){return"_value"in e?e._value:e.value}function getCheckboxValue(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const vModelDynamic={created(e,t,n){callModelHook(e,t,n,null,"created")},mounted(e,t,n){callModelHook(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){callModelHook(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){callModelHook(e,t,n,r,"updated")}};function resolveDynamicModel(e,t){switch(e){case"SELECT":return vModelSelect;case"TEXTAREA":return vModelText;default:switch(t){case"checkbox":return vModelCheckbox;case"radio":return vModelRadio;default:return vModelText}}}function callModelHook(e,t,n,r,A){const E=resolveDynamicModel(e.tagName,n.props&&n.props.type)[A];E&&E(e,t,n,r)}function initVModelForSSR(){vModelText.getSSRProps=({value:e})=>({value:e}),vModelRadio.getSSRProps=({value:e},t)=>{if(t.props&&looseEqual(t.props.value,e))return{checked:!0}},vModelCheckbox.getSSRProps=({value:e},t)=>{if(isArray$2(e)){if(t.props&&looseIndexOf(e,t.props.value)>-1)return{checked:!0}}else if(isSet(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},vModelDynamic.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=resolveDynamicModel(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>systemModifiers.some(n=>e[`${n}Key`]&&!t.includes(n))},withModifiers=(e,t)=>(n,...r)=>{for(let A=0;An=>{if(!("key"in n))return;const r=hyphenate(n.key);if(t.some(A=>A===r||keyNames[A]===r))return e(n)},vShow={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):setDisplay(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),setDisplay(e,!0),r.enter(e)):r.leave(e,()=>{setDisplay(e,!1)}):setDisplay(e,t))},beforeUnmount(e,{value:t}){setDisplay(e,t)}};function setDisplay(e,t){e.style.display=t?e._vod:"none"}function initVShowForSSR(){vShow.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const rendererOptions=extend$1({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render=(...e)=>{ensureRenderer().render(...e)},hydrate=(...e)=>{ensureHydrationRenderer().hydrate(...e)},createApp=(...e)=>{const t=ensureRenderer().createApp(...e),{mount:n}=t;return t.mount=r=>{const A=normalizeContainer(r);if(!A)return;const S=t._component;!isFunction$3(S)&&!S.render&&!S.template&&(S.template=A.innerHTML),A.innerHTML="";const E=n(A,!1,A instanceof SVGElement);return A instanceof Element&&(A.removeAttribute("v-cloak"),A.setAttribute("data-v-app","")),E},t},createSSRApp=(...e)=>{const t=ensureHydrationRenderer().createApp(...e),{mount:n}=t;return t.mount=r=>{const A=normalizeContainer(r);if(A)return n(A,!0,A instanceof SVGElement)},t};function normalizeContainer(e){return isString$1(e)?document.querySelector(e):e}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())},compile=()=>{},vue_runtime_esmBundler=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition,BaseTransitionPropsValidators,Comment,EffectScope,Fragment,KeepAlive,ReactiveEffect,Static,Suspense,Teleport,Text,Transition,TransitionGroup,VueElement,assertNumber,callWithAsyncErrorHandling,callWithErrorHandling,camelize,capitalize,cloneVNode,compatUtils,compile,computed,createApp,createBlock,createCommentVNode,createElementBlock,createElementVNode:createBaseVNode,createHydrationRenderer,createPropsRestProxy,createRenderer,createSSRApp,createSlots,createStaticVNode,createTextVNode,createVNode,customRef,defineAsyncComponent,defineComponent,defineCustomElement,defineEmits,defineExpose,defineModel,defineOptions,defineProps,defineSSRCustomElement,defineSlots,get devtools(){return devtools},effect,effectScope,getCurrentInstance,getCurrentScope,getTransitionRawChildren,guardReactiveProps,h,handleError,hasInjectionContext,hydrate,initCustomFormatter,initDirectivesForSSR,inject,isMemoSame,isProxy,isReactive,isReadonly,isRef,isRuntimeOnly,isShallow,isVNode,markRaw,mergeDefaults,mergeModels,mergeProps,nextTick,normalizeClass,normalizeProps,normalizeStyle,onActivated,onBeforeMount,onBeforeUnmount,onBeforeUpdate,onDeactivated,onErrorCaptured,onMounted,onRenderTracked,onRenderTriggered,onScopeDispose,onServerPrefetch,onUnmounted,onUpdated,openBlock,popScopeId,provide,proxyRefs,pushScopeId,queuePostFlushCb,reactive,readonly,ref,registerRuntimeCompiler,render,renderList,renderSlot,resolveComponent,resolveDirective,resolveDynamicComponent,resolveFilter,resolveTransitionHooks,setBlockTracking,setDevtoolsHook,setTransitionHooks,shallowReactive,shallowReadonly,shallowRef,ssrContextKey,ssrUtils,stop,toDisplayString,toHandlerKey,toHandlers,toRaw,toRef:toRef$1,toRefs,toValue:toValue$1,transformVNodeArgs,triggerRef,unref,useAttrs,useCssModule,useCssVars,useModel,useSSRContext,useSlots,useTransitionState,vModelCheckbox,vModelDynamic,vModelRadio,vModelSelect,vModelText,vShow,version,warn,watch,watchEffect,watchPostEffect,watchSyncEffect,withAsyncContext,withCtx,withDefaults,withDirectives,withKeys,withMemo,withModifiers,withScopeId},Symbol.toStringTag,{value:"Module"}));function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(A){return Object.getOwnPropertyDescriptor(e,A).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t=0)&&(n[A]=e[A]);return n}function _objectWithoutProperties(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose(e,t),r,A;if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(e);for(A=0;A=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},humps$1={exports:{}};(function(e){(function(t){var n=function(L,M,V){if(!C(M)||a(M)||$(M)||l(M)||c(M))return M;var D,F=0,P=0;if(o(M))for(D=[],P=M.length;F1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(c){return convert(c)}),A=Object.keys(e.attributes||{}).reduce(function(c,C){var o=e.attributes[C];switch(C){case"class":c.class=classToObject(o);break;case"style":c.style=styleToObject(o);break;default:c.attrs[C]=o}return c},{attrs:{},class:{},style:{}});n.class;var S=n.style,E=S===void 0?{}:S,T=_objectWithoutProperties(n,_excluded);return h(e.tag,_objectSpread2(_objectSpread2(_objectSpread2({},t),{},{class:A.class,style:_objectSpread2(_objectSpread2({},A.style),E)},A.attrs),T),r)}var PRODUCTION=!1;try{PRODUCTION=!0}catch{}function log(){if(!PRODUCTION&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function objectWithKey(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?_defineProperty({},e,t):{}}function classList(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},_defineProperty(t,"fa-".concat(e.size),e.size!==null),_defineProperty(t,"fa-rotate-".concat(e.rotation),e.rotation!==null),_defineProperty(t,"fa-pull-".concat(e.pull),e.pull!==null),_defineProperty(t,"fa-swap-opacity",e.swapOpacity),_defineProperty(t,"fa-bounce",e.bounce),_defineProperty(t,"fa-shake",e.shake),_defineProperty(t,"fa-beat",e.beat),_defineProperty(t,"fa-fade",e.fade),_defineProperty(t,"fa-beat-fade",e.beatFade),_defineProperty(t,"fa-flash",e.flash),_defineProperty(t,"fa-spin-pulse",e.spinPulse),_defineProperty(t,"fa-spin-reverse",e.spinReverse),t);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function normalizeIconArgs(e){if(e&&_typeof(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(parse$1.icon)return parse$1.icon(e);if(e===null)return null;if(_typeof(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var FontAwesomeIcon=defineComponent({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var r=n.attrs,A=computed(function(){return normalizeIconArgs(t.icon)}),S=computed(function(){return objectWithKey("classes",classList(t))}),E=computed(function(){return objectWithKey("transform",typeof t.transform=="string"?parse$1.transform(t.transform):t.transform)}),T=computed(function(){return objectWithKey("mask",normalizeIconArgs(t.mask))}),c=computed(function(){return icon(A.value,_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},S.value),E.value),T.value),{},{symbol:t.symbol,title:t.title}))});watch(c,function(o){if(!o)return log("Could not find one or more icon(s)",A.value,T.value)},{immediate:!0});var C=computed(function(){return c.value?convert(c.value.abstract[0],{},r):null});return function(){return C.value}}});const _sfc_main$H=defineComponent({name:"NavbarItem"}),Navbar_vue_vue_type_style_index_0_scoped_19d4e9a4_lang="",_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,A]of t)n[r]=A;return n},_withScopeId$1=e=>(pushScopeId("data-v-19d4e9a4"),e=e(),popScopeId(),e),_hoisted_1$v={role:"navigation","aria-label":"main navigation",class:"navbar is-fixed-top"},_hoisted_2$i=_withScopeId$1(()=>createBaseVNode("div",{class:"navbar-brand"},[createBaseVNode("a",{class:"navbar-item"},[createBaseVNode("h1",{class:"title"},"Mihari")]),createBaseVNode("a",{role:"button","aria-label":"menu",class:"navbar-burger burger"},[createBaseVNode("span",{"aria-hidden":"true"}),createBaseVNode("span",{"aria-hidden":"true"}),createBaseVNode("span",{"aria-hidden":"true"})])],-1)),_hoisted_3$f={class:"navbar-menu"},_hoisted_4$e=_withScopeId$1(()=>createBaseVNode("div",{class:"navbar-start"},null,-1)),_hoisted_5$d={class:"navbar-end"},_hoisted_6$c=_withScopeId$1(()=>createBaseVNode("a",{class:"navbar-item"},[createBaseVNode("a",{href:"/redoc-static.html",target:"_blank",class:"navbar-item"},"API")],-1)),_hoisted_7$c=_withScopeId$1(()=>createBaseVNode("a",{class:"navbar-item"},[createBaseVNode("a",{href:"https://github.com/ninoseki/mihari",target:"_blank",class:"navbar-item"},"GitHub")],-1));function _sfc_render$H(e,t,n,r,A,S){const E=resolveComponent("router-link");return openBlock(),createElementBlock("nav",_hoisted_1$v,[_hoisted_2$i,createBaseVNode("div",_hoisted_3$f,[_hoisted_4$e,createBaseVNode("div",_hoisted_5$d,[createVNode(E,{class:"navbar-item",to:{name:"Alerts"}},{default:withCtx(()=>[createTextVNode("Alerts")]),_:1}),createVNode(E,{class:"navbar-item",to:{name:"NewRule"}},{default:withCtx(()=>[createTextVNode("New rule")]),_:1}),createVNode(E,{class:"navbar-item",to:{name:"Rules"}},{default:withCtx(()=>[createTextVNode("Rules")]),_:1}),createVNode(E,{class:"navbar-item",to:{name:"Configs"}},{default:withCtx(()=>[createTextVNode("Configs")]),_:1}),_hoisted_6$c,_hoisted_7$c])])])}const Navbar=_export_sfc(_sfc_main$H,[["render",_sfc_render$H],["__scopeId","data-v-19d4e9a4"]]),_sfc_main$G=defineComponent({name:"App",components:{Navbar}}),App_vue_vue_type_style_index_0_lang="",_hoisted_1$u={class:"section is-medium"},_hoisted_2$h={class:"container"};function _sfc_render$G(e,t,n,r,A,S){const E=resolveComponent("Navbar"),T=resolveComponent("router-view");return openBlock(),createElementBlock(Fragment,null,[createVNode(E),createBaseVNode("section",_hoisted_1$u,[createBaseVNode("div",_hoisted_2$h,[createVNode(T)])])],64)}const App=_export_sfc(_sfc_main$G,[["render",_sfc_render$G]]);/*! * vue-router v4.2.4 * (c) 2023 Eduardo San Martin Morote * @license MIT */const isBrowser$1=typeof window<"u";function isESModule(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const assign=Object.assign;function applyToParams(e,t){const n={};for(const r in t){const A=t[r];n[r]=isArray$1(A)?A.map(e):e(A)}return n}const noop$2=()=>{},isArray$1=Array.isArray,TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=e=>e.replace(TRAILING_SLASH_RE,"");function parseURL(e,t,n="/"){let r,A={},S="",E="";const T=t.indexOf("#");let c=t.indexOf("?");return T=0&&(c=-1),c>-1&&(r=t.slice(0,c),S=t.slice(c+1,T>-1?T:t.length),A=e(S)),T>-1&&(r=r||t.slice(0,T),E=t.slice(T,t.length)),r=resolveRelativePath(r??t,n),{fullPath:r+(S&&"?")+S+E,path:r,query:A,hash:E}}function stringifyURL(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function stripBase(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function isSameRouteLocation(e,t,n){const r=t.matched.length-1,A=n.matched.length-1;return r>-1&&r===A&&isSameRouteRecord(t.matched[r],n.matched[A])&&isSameRouteLocationParams(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function isSameRouteRecord(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function isSameRouteLocationParams(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!isSameRouteLocationParamsValue(e[n],t[n]))return!1;return!0}function isSameRouteLocationParamsValue(e,t){return isArray$1(e)?isEquivalentArray(e,t):isArray$1(t)?isEquivalentArray(t,e):e===t}function isEquivalentArray(e,t){return isArray$1(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function resolveRelativePath(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),A=r[r.length-1];(A===".."||A===".")&&r.push("");let S=n.length-1,E,T;for(E=0;E1&&S--;else break;return n.slice(0,S).join("/")+"/"+r.slice(E-(E===r.length?1:0)).join("/")}var NavigationType;(function(e){e.pop="pop",e.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(e){e.back="back",e.forward="forward",e.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(e){if(!e)if(isBrowser$1){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),removeTrailingSlash(e)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(e,t){return e.replace(BEFORE_HASH_RE,"#")+t}function getElementPosition(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const computeScrollPosition=()=>({left:window.pageXOffset,top:window.pageYOffset});function scrollToPosition(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),A=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!A)return;t=getElementPosition(A,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function getScrollKey(e,t){return(history.state?history.state.position-t:-1)+e}const scrollPositions=new Map;function saveScrollPosition(e,t){scrollPositions.set(e,t)}function getSavedScrollPosition(e){const t=scrollPositions.get(e);return scrollPositions.delete(e),t}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(e,t){const{pathname:n,search:r,hash:A}=t,S=e.indexOf("#");if(S>-1){let T=A.includes(e.slice(S))?e.slice(S).length:1,c=A.slice(T);return c[0]!=="/"&&(c="/"+c),stripBase(c,"")}return stripBase(n,e)+r+A}function useHistoryListeners(e,t,n,r){let A=[],S=[],E=null;const T=({state:$})=>{const l=createCurrentLocation(e,location),f=n.value,R=t.value;let x=0;if($){if(n.value=l,t.value=$,E&&E===f){E=null;return}x=R?$.position-R.position:0}else r(l);A.forEach(L=>{L(n.value,f,{delta:x,type:NavigationType.pop,direction:x?x>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function c(){E=n.value}function C($){A.push($);const l=()=>{const f=A.indexOf($);f>-1&&A.splice(f,1)};return S.push(l),l}function o(){const{history:$}=window;$.state&&$.replaceState(assign({},$.state,{scroll:computeScrollPosition()}),"")}function a(){for(const $ of S)$();S=[],window.removeEventListener("popstate",T),window.removeEventListener("beforeunload",o)}return window.addEventListener("popstate",T),window.addEventListener("beforeunload",o,{passive:!0}),{pauseListeners:c,listen:C,destroy:a}}function buildState(e,t,n,r=!1,A=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:A?computeScrollPosition():null}}function useHistoryStateNavigation(e){const{history:t,location:n}=window,r={value:createCurrentLocation(e,n)},A={value:t.state};A.value||S(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function S(c,C,o){const a=e.indexOf("#"),$=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+c:createBaseLocation()+e+c;try{t[o?"replaceState":"pushState"](C,"",$),A.value=C}catch(l){console.error(l),n[o?"replace":"assign"]($)}}function E(c,C){const o=assign({},t.state,buildState(A.value.back,c,A.value.forward,!0),C,{position:A.value.position});S(c,o,!0),r.value=c}function T(c,C){const o=assign({},A.value,t.state,{forward:c,scroll:computeScrollPosition()});S(o.current,o,!0);const a=assign({},buildState(r.value,c,null),{position:o.position+1},C);S(c,a,!1),r.value=c}return{location:r,state:A,push:T,replace:E}}function createWebHistory(e){e=normalizeBase(e);const t=useHistoryStateNavigation(e),n=useHistoryListeners(e,t.state,t.location,t.replace);function r(S,E=!0){E||n.pauseListeners(),history.go(S)}const A=assign({location:"",base:e,go:r,createHref:createHref.bind(null,e)},t,n);return Object.defineProperty(A,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(A,"state",{enumerable:!0,get:()=>t.state.value}),A}function createWebHashHistory(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),createWebHistory(e)}function isRouteLocation(e){return typeof e=="string"||e&&typeof e=="object"}function isRouteName(e){return typeof e=="string"||typeof e=="symbol"}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(e,t){return assign(new Error,{type:e,[NavigationFailureSymbol]:!0},t)}function isNavigationFailure(e,t){return e instanceof Error&&NavigationFailureSymbol in e&&(t==null||!!(e.type&t))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(e,t){const n=assign({},BASE_PATH_PARSER_OPTIONS,t),r=[];let A=n.start?"^":"";const S=[];for(const C of e){const o=C.length?[]:[90];n.strict&&!C.length&&(A+="/");for(let a=0;at.length?t.length===1&&t[0]===40+40?1:-1:0}function comparePathParserScore(e,t){let n=0;const r=e.score,A=t.score;for(;n0&&t[t.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(e){if(!e)return[[]];if(e==="/")return[[ROOT_TOKEN]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(l){throw new Error(`ERR (${n})/"${C}": ${l}`)}let n=0,r=n;const A=[];let S;function E(){S&&A.push(S),S=[]}let T=0,c,C="",o="";function a(){C&&(n===0?S.push({type:0,value:C}):n===1||n===2||n===3?(S.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${C}) must be alone in its segment. eg: '/:ids+.`),S.push({type:1,value:C,regexp:o,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),C="")}function $(){C+=c}for(;T{E(M)}:noop$2}function E(o){if(isRouteName(o)){const a=r.get(o);a&&(r.delete(o),n.splice(n.indexOf(a),1),a.children.forEach(E),a.alias.forEach(E))}else{const a=n.indexOf(o);a>-1&&(n.splice(a,1),o.record.name&&r.delete(o.record.name),o.children.forEach(E),o.alias.forEach(E))}}function T(){return n}function c(o){let a=0;for(;a=0&&(o.record.path!==n[a].record.path||!isRecordChildOf(o,n[a]));)a++;n.splice(a,0,o),o.record.name&&!isAliasRecord(o)&&r.set(o.record.name,o)}function C(o,a){let $,l={},f,R;if("name"in o&&o.name){if($=r.get(o.name),!$)throw createRouterError(1,{location:o});R=$.record.name,l=assign(paramsFromLocation(a.params,$.keys.filter(M=>!M.optional).map(M=>M.name)),o.params&¶msFromLocation(o.params,$.keys.map(M=>M.name))),f=$.stringify(l)}else if("path"in o)f=o.path,$=n.find(M=>M.re.test(f)),$&&(l=$.parse(f),R=$.record.name);else{if($=a.name?r.get(a.name):n.find(M=>M.re.test(a.path)),!$)throw createRouterError(1,{location:o,currentLocation:a});R=$.record.name,l=assign({},a.params,o.params),f=$.stringify(l)}const x=[];let L=$;for(;L;)x.unshift(L.record),L=L.parent;return{name:R,path:f,params:l,matched:x,meta:mergeMetaFields(x)}}return e.forEach(o=>S(o)),{addRoute:S,resolve:C,removeRoute:E,getRoutes:T,getRecordMatcher:A}}function paramsFromLocation(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function normalizeRouteRecord(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:normalizeRecordProps(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function normalizeRecordProps(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function isAliasRecord(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mergeMetaFields(e){return e.reduce((t,n)=>assign(t,n.meta),{})}function mergeOptions(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function isRecordChildOf(e,t){return t.children.some(n=>n===e||isRecordChildOf(e,n))}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(e){return encodeURI(""+e).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(e){return commonEncode(e).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(e){return commonEncode(e).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(e){return encodeQueryValue(e).replace(EQUAL_RE,"%3D")}function encodePath(e){return commonEncode(e).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(e){return e==null?"":encodePath(e).replace(SLASH_RE,"%2F")}function decode$1(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function parseQuery(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let A=0;AS&&encodeQueryValue(S)):[r&&encodeQueryValue(r)]).forEach(S=>{S!==void 0&&(t+=(t.length?"&":"")+n,S!=null&&(t+="="+S))})}return t}function normalizeQuery(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=isArray$1(r)?r.map(A=>A==null?null:""+A):r==null?r:""+r)}return t}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let e=[];function t(r){return e.push(r),()=>{const A=e.indexOf(r);A>-1&&e.splice(A,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function guardToPromiseFn(e,t,n,r,A){const S=r&&(r.enterCallbacks[A]=r.enterCallbacks[A]||[]);return()=>new Promise((E,T)=>{const c=a=>{a===!1?T(createRouterError(4,{from:n,to:t})):a instanceof Error?T(a):isRouteLocation(a)?T(createRouterError(2,{from:t,to:a})):(S&&r.enterCallbacks[A]===S&&typeof a=="function"&&S.push(a),E())},C=e.call(r&&r.instances[A],t,n,c);let o=Promise.resolve(C);e.length<3&&(o=o.then(c)),o.catch(a=>T(a))})}function extractComponentsGuards(e,t,n,r){const A=[];for(const S of e)for(const E in S.components){let T=S.components[E];if(!(t!=="beforeRouteEnter"&&!S.instances[E]))if(isRouteComponent(T)){const C=(T.__vccOpts||T)[t];C&&A.push(guardToPromiseFn(C,n,r,S,E))}else{let c=T();A.push(()=>c.then(C=>{if(!C)return Promise.reject(new Error(`Couldn't resolve component "${E}" at "${S.path}"`));const o=isESModule(C)?C.default:C;S.components[E]=o;const $=(o.__vccOpts||o)[t];return $&&guardToPromiseFn($,n,r,S,E)()}))}}return A}function isRouteComponent(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function useLink(e){const t=inject(routerKey),n=inject(routeLocationKey),r=computed(()=>t.resolve(unref(e.to))),A=computed(()=>{const{matched:c}=r.value,{length:C}=c,o=c[C-1],a=n.matched;if(!o||!a.length)return-1;const $=a.findIndex(isSameRouteRecord.bind(null,o));if($>-1)return $;const l=getOriginalPath(c[C-2]);return C>1&&getOriginalPath(o)===l&&a[a.length-1].path!==l?a.findIndex(isSameRouteRecord.bind(null,c[C-2])):$}),S=computed(()=>A.value>-1&&includesParams(n.params,r.value.params)),E=computed(()=>A.value>-1&&A.value===n.matched.length-1&&isSameRouteLocationParams(n.params,r.value.params));function T(c={}){return guardEvent(c)?t[unref(e.replace)?"replace":"push"](unref(e.to)).catch(noop$2):Promise.resolve()}return{route:r,href:computed(()=>r.value.href),isActive:S,isExactActive:E,navigate:T}}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink,setup(e,{slots:t}){const n=reactive(useLink(e)),{options:r}=inject(routerKey),A=computed(()=>({[getLinkClass(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[getLinkClass(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const S=t.default&&t.default(n);return e.custom?S:h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:A.value},S)}}}),RouterLink=RouterLinkImpl;function guardEvent(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function includesParams(e,t){for(const n in t){const r=t[n],A=e[n];if(typeof r=="string"){if(r!==A)return!1}else if(!isArray$1(A)||A.length!==r.length||r.some((S,E)=>S!==A[E]))return!1}return!0}function getOriginalPath(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const getLinkClass=(e,t,n)=>e??t??n,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=inject(routerViewLocationKey),A=computed(()=>e.route||r.value),S=inject(viewDepthKey,0),E=computed(()=>{let C=unref(S);const{matched:o}=A.value;let a;for(;(a=o[C])&&!a.components;)C++;return C}),T=computed(()=>A.value.matched[E.value]);provide(viewDepthKey,computed(()=>E.value+1)),provide(matchedRouteKey,T),provide(routerViewLocationKey,A);const c=ref();return watch(()=>[c.value,T.value,e.name],([C,o,a],[$,l,f])=>{o&&(o.instances[a]=C,l&&l!==o&&C&&C===$&&(o.leaveGuards.size||(o.leaveGuards=l.leaveGuards),o.updateGuards.size||(o.updateGuards=l.updateGuards))),C&&o&&(!l||!isSameRouteRecord(o,l)||!$)&&(o.enterCallbacks[a]||[]).forEach(R=>R(C))},{flush:"post"}),()=>{const C=A.value,o=e.name,a=T.value,$=a&&a.components[o];if(!$)return normalizeSlot(n.default,{Component:$,route:C});const l=a.props[o],f=l?l===!0?C.params:typeof l=="function"?l(C):l:null,x=h($,assign({},f,t,{onVnodeUnmounted:L=>{L.component.isUnmounted&&(a.instances[o]=null)},ref:c}));return normalizeSlot(n.default,{Component:x,route:C})||x}}});function normalizeSlot(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const RouterView=RouterViewImpl;function createRouter(e){const t=createRouterMatcher(e.routes,e),n=e.parseQuery||parseQuery,r=e.stringifyQuery||stringifyQuery,A=e.history,S=useCallbacks(),E=useCallbacks(),T=useCallbacks(),c=shallowRef(START_LOCATION_NORMALIZED);let C=START_LOCATION_NORMALIZED;isBrowser$1&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const o=applyToParams.bind(null,se=>""+se),a=applyToParams.bind(null,encodeParam),$=applyToParams.bind(null,decode$1);function l(se,de){let ce,le;return isRouteName(se)?(ce=t.getRecordMatcher(se),le=de):le=se,t.addRoute(le,ce)}function f(se){const de=t.getRecordMatcher(se);de&&t.removeRoute(de)}function R(){return t.getRoutes().map(se=>se.record)}function x(se){return!!t.getRecordMatcher(se)}function L(se,de){if(de=assign({},de||c.value),typeof se=="string"){const ae=parseURL(n,se,de.path),he=t.resolve({path:ae.path},de),me=A.createHref(ae.fullPath);return assign(ae,he,{params:$(he.params),hash:decode$1(ae.hash),redirectedFrom:void 0,href:me})}let ce;if("path"in se)ce=assign({},se,{path:parseURL(n,se.path,de.path).path});else{const ae=assign({},se.params);for(const he in ae)ae[he]==null&&delete ae[he];ce=assign({},se,{params:a(ae)}),de.params=a(de.params)}const le=t.resolve(ce,de),ve=se.hash||"";le.params=o($(le.params));const ee=stringifyURL(r,assign({},se,{hash:encodeHash(ve),path:le.path})),te=A.createHref(ee);return assign({fullPath:ee,hash:ve,query:r===stringifyQuery?normalizeQuery(se.query):se.query||{}},le,{redirectedFrom:void 0,href:te})}function M(se){return typeof se=="string"?parseURL(n,se,c.value.path):assign({},se)}function V(se,de){if(C!==se)return createRouterError(8,{from:de,to:se})}function D(se){return X(se)}function F(se){return D(assign(M(se),{replace:!0}))}function P(se){const de=se.matched[se.matched.length-1];if(de&&de.redirect){const{redirect:ce}=de;let le=typeof ce=="function"?ce(se):ce;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=M(le):{path:le},le.params={}),assign({query:se.query,hash:se.hash,params:"path"in le?{}:se.params},le)}}function X(se,de){const ce=C=L(se),le=c.value,ve=se.state,ee=se.force,te=se.replace===!0,ae=P(ce);if(ae)return X(assign(M(ae),{state:typeof ae=="object"?assign({},ve,ae.state):ve,force:ee,replace:te}),de||ce);const he=ce;he.redirectedFrom=de;let me;return!ee&&isSameRouteLocation(r,le,ce)&&(me=createRouterError(16,{to:he,from:le}),re(le,le,!0,!1)),(me?Promise.resolve(me):B(he,le)).catch(ye=>isNavigationFailure(ye)?isNavigationFailure(ye,2)?ye:ne(ye):J(ye,he,le)).then(ye=>{if(ye){if(isNavigationFailure(ye,2))return X(assign({replace:te},M(ye.to),{state:typeof ye.to=="object"?assign({},ve,ye.to.state):ve,force:ee}),de||he)}else ye=Y(he,le,!0,te,ve);return I(he,le,ye),ye})}function U(se,de){const ce=V(se,de);return ce?Promise.reject(ce):Promise.resolve()}function z(se){const de=ie.values().next().value;return de&&typeof de.runWithContext=="function"?de.runWithContext(se):se()}function B(se,de){let ce;const[le,ve,ee]=extractChangingRecords(se,de);ce=extractComponentsGuards(le.reverse(),"beforeRouteLeave",se,de);for(const ae of le)ae.leaveGuards.forEach(he=>{ce.push(guardToPromiseFn(he,se,de))});const te=U.bind(null,se,de);return ce.push(te),ge(ce).then(()=>{ce=[];for(const ae of S.list())ce.push(guardToPromiseFn(ae,se,de));return ce.push(te),ge(ce)}).then(()=>{ce=extractComponentsGuards(ve,"beforeRouteUpdate",se,de);for(const ae of ve)ae.updateGuards.forEach(he=>{ce.push(guardToPromiseFn(he,se,de))});return ce.push(te),ge(ce)}).then(()=>{ce=[];for(const ae of ee)if(ae.beforeEnter)if(isArray$1(ae.beforeEnter))for(const he of ae.beforeEnter)ce.push(guardToPromiseFn(he,se,de));else ce.push(guardToPromiseFn(ae.beforeEnter,se,de));return ce.push(te),ge(ce)}).then(()=>(se.matched.forEach(ae=>ae.enterCallbacks={}),ce=extractComponentsGuards(ee,"beforeRouteEnter",se,de),ce.push(te),ge(ce))).then(()=>{ce=[];for(const ae of E.list())ce.push(guardToPromiseFn(ae,se,de));return ce.push(te),ge(ce)}).catch(ae=>isNavigationFailure(ae,8)?ae:Promise.reject(ae))}function I(se,de,ce){T.list().forEach(le=>z(()=>le(se,de,ce)))}function Y(se,de,ce,le,ve){const ee=V(se,de);if(ee)return ee;const te=de===START_LOCATION_NORMALIZED,ae=isBrowser$1?history.state:{};ce&&(le||te?A.replace(se.fullPath,assign({scroll:te&&ae&&ae.scroll},ve)):A.push(se.fullPath,ve)),c.value=se,re(se,de,ce,te),ne()}let H;function N(){H||(H=A.listen((se,de,ce)=>{if(!fe.listening)return;const le=L(se),ve=P(le);if(ve){X(assign(ve,{replace:!0}),le).catch(noop$2);return}C=le;const ee=c.value;isBrowser$1&&saveScrollPosition(getScrollKey(ee.fullPath,ce.delta),computeScrollPosition()),B(le,ee).catch(te=>isNavigationFailure(te,12)?te:isNavigationFailure(te,2)?(X(te.to,le).then(ae=>{isNavigationFailure(ae,20)&&!ce.delta&&ce.type===NavigationType.pop&&A.go(-1,!1)}).catch(noop$2),Promise.reject()):(ce.delta&&A.go(-ce.delta,!1),J(te,le,ee))).then(te=>{te=te||Y(le,ee,!1),te&&(ce.delta&&!isNavigationFailure(te,8)?A.go(-ce.delta,!1):ce.type===NavigationType.pop&&isNavigationFailure(te,20)&&A.go(-1,!1)),I(le,ee,te)}).catch(noop$2)}))}let W=useCallbacks(),G=useCallbacks(),Z;function J(se,de,ce){ne(se);const le=G.list();return le.length?le.forEach(ve=>ve(se,de,ce)):console.error(se),Promise.reject(se)}function Q(){return Z&&c.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((se,de)=>{W.add([se,de])})}function ne(se){return Z||(Z=!se,N(),W.list().forEach(([de,ce])=>se?ce(se):de()),W.reset()),se}function re(se,de,ce,le){const{scrollBehavior:ve}=e;if(!isBrowser$1||!ve)return Promise.resolve();const ee=!ce&&getSavedScrollPosition(getScrollKey(se.fullPath,0))||(le||!ce)&&history.state&&history.state.scroll||null;return nextTick().then(()=>ve(se,de,ee)).then(te=>te&&scrollToPosition(te)).catch(te=>J(te,se,de))}const ue=se=>A.go(se);let oe;const ie=new Set,fe={currentRoute:c,listening:!0,addRoute:l,removeRoute:f,hasRoute:x,getRoutes:R,resolve:L,options:e,push:D,replace:F,go:ue,back:()=>ue(-1),forward:()=>ue(1),beforeEach:S.add,beforeResolve:E.add,afterEach:T.add,onError:G.add,isReady:Q,install(se){const de=this;se.component("RouterLink",RouterLink),se.component("RouterView",RouterView),se.config.globalProperties.$router=de,Object.defineProperty(se.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(c)}),isBrowser$1&&!oe&&c.value===START_LOCATION_NORMALIZED&&(oe=!0,D(A.location).catch(ve=>{}));const ce={};for(const ve in START_LOCATION_NORMALIZED)Object.defineProperty(ce,ve,{get:()=>c.value[ve],enumerable:!0});se.provide(routerKey,de),se.provide(routeLocationKey,shallowReactive(ce)),se.provide(routerViewLocationKey,c);const le=se.unmount;ie.add(se),se.unmount=function(){ie.delete(se),ie.size<1&&(C=START_LOCATION_NORMALIZED,H&&H(),H=null,c.value=START_LOCATION_NORMALIZED,oe=!1,Z=!1),le()}}};function ge(se){return se.reduce((de,ce)=>de.then(()=>z(ce)),Promise.resolve())}return fe}function extractChangingRecords(e,t){const n=[],r=[],A=[],S=Math.max(t.matched.length,e.matched.length);for(let E=0;EisSameRouteRecord(C,T))?r.push(T):n.push(T));const c=e.matched[E];c&&(t.matched.find(C=>isSameRouteRecord(C,c))||A.push(c))}return[n,r,A]}function useRouter(){return inject(routerKey)}function useRoute(){return inject(routeLocationKey)}function tryOnScopeDispose(e){return getCurrentScope()?(onScopeDispose(e),!0):!1}function toValue(e){return typeof e=="function"?e():unref(e)}const isClient=typeof window<"u",noop$1=()=>{};function toRef(...e){if(e.length!==1)return toRef$1(...e);const t=e[0];return typeof t=="function"?readonly(customRef(()=>({get:t,set:noop$1}))):ref(t)}function unrefElement(e){var t;const n=toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}const defaultWindow=isClient?window:void 0,defaultDocument=isClient?window.document:void 0;function useMounted(){const e=ref(!1);return getCurrentInstance()&&onMounted(()=>{e.value=!0}),e}function useSupported(e){const t=useMounted();return computed(()=>(t.value,!!e()))}var __getOwnPropSymbols$m=Object.getOwnPropertySymbols,__hasOwnProp$m=Object.prototype.hasOwnProperty,__propIsEnum$m=Object.prototype.propertyIsEnumerable,__objRest$3=(e,t)=>{var n={};for(var r in e)__hasOwnProp$m.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&__getOwnPropSymbols$m)for(var r of __getOwnPropSymbols$m(e))t.indexOf(r)<0&&__propIsEnum$m.call(e,r)&&(n[r]=e[r]);return n};function useMutationObserver(e,t,n={}){const r=n,{window:A=defaultWindow}=r,S=__objRest$3(r,["window"]);let E;const T=useSupported(()=>A&&"MutationObserver"in A),c=()=>{E&&(E.disconnect(),E=void 0)},C=watch(()=>unrefElement(e),a=>{c(),T.value&&A&&a&&(E=new MutationObserver(t),E.observe(a,S))},{immediate:!0}),o=()=>{c(),C()};return tryOnScopeDispose(o),{isSupported:T,stop:o}}function useTitle(e=null,t={}){var n,r;const{document:A=defaultDocument}=t,S=toRef((n=e??(A==null?void 0:A.title))!=null?n:null),E=e&&typeof e=="function";function T(c){if(!("titleTemplate"in t))return c;const C=t.titleTemplate||"%s";return typeof C=="function"?C(c):toValue(C).replace(/%s/g,c)}return watch(S,(c,C)=>{c!==C&&A&&(A.title=T(typeof c=="string"?c:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&A&&!E&&useMutationObserver((r=A.head)==null?void 0:r.querySelector("title"),()=>{A&&A.title!==S.value&&(S.value=T(A.title))},{childList:!0}),S}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var A=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,A.get?A:{enumerable:!0,get:function(){return e[r]}})}),n}var caf={exports:{}},shared={exports:{}};const CLEANUP_FN$1=Symbol("Cleanup Function"),TIMEOUT_TOKEN$1=Symbol("Timeout Token"),REASON=Symbol("Signal Reason"),UNSET$1=Symbol("Unset"),[SIGNAL_HAS_REASON_DEFINED,MISSING_REASON_EXCEPTION]=function(){var t=new AbortController,n=!!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t.signal),"reason");try{t.abort()}catch{}return[n,isNativeAbortException(t.signal.reason)]}();let cancelToken$1=class{constructor(t=new AbortController){this.controller=t,this.signal=t.signal,this.signal[REASON]=UNSET$1;var n,r=(A,S)=>{var E=()=>{if(S&&this.signal){let T=getSignalReason$1(this.signal);this._trackSignalReason(T),S(T!==UNSET$1?T:void 0)}S=null};this.signal.addEventListener("abort",E,!1),n=()=>{this.signal&&(this.signal.removeEventListener("abort",E,!1),this.signal.pr&&(this.signal.pr[CLEANUP_FN$1]=null)),E=null}};this.signal.pr=new Promise(r),this.signal.pr[CLEANUP_FN$1]=n,this.signal.pr.catch(n),r=n=null}abort(...t){var n=t.length>0?t[0]:UNSET$1;this._trackSignalReason(n),this.controller&&(SIGNAL_HAS_REASON_DEFINED&&n!==UNSET$1?this.controller.abort(n):this.controller.abort())}discard(){this.signal&&(this.signal.pr&&(this.signal.pr[CLEANUP_FN$1]&&this.signal.pr[CLEANUP_FN$1](),this.signal.pr=null),delete this.signal[REASON],SIGNAL_HAS_REASON_DEFINED||(this.signal.reason=null),this.signal=null),this.controller=null}_trackSignalReason(t){this.signal&&t!==UNSET$1&&(!SIGNAL_HAS_REASON_DEFINED&&!("reason"in this.signal)&&(this.signal.reason=t),this.signal[REASON]===UNSET$1&&(this.signal[REASON]=t))}};shared.exports={CLEANUP_FN:CLEANUP_FN$1,TIMEOUT_TOKEN:TIMEOUT_TOKEN$1,UNSET:UNSET$1,getSignalReason:getSignalReason$1,cancelToken:cancelToken$1,signalPromise:signalPromise$1,processTokenOrSignal:processTokenOrSignal$1,deferred,isFunction:isFunction$2,isPromise,invokeAbort:invokeAbort$1};shared.exports.CLEANUP_FN=CLEANUP_FN$1;shared.exports.TIMEOUT_TOKEN=TIMEOUT_TOKEN$1;shared.exports.UNSET=UNSET$1;shared.exports.getSignalReason=getSignalReason$1;shared.exports.cancelToken=cancelToken$1;shared.exports.signalPromise=signalPromise$1;shared.exports.processTokenOrSignal=processTokenOrSignal$1;shared.exports.deferred=deferred;shared.exports.isFunction=isFunction$2;shared.exports.isPromise=isPromise;shared.exports.invokeAbort=invokeAbort$1;function getSignalReason$1(e){return e&&e.aborted?SIGNAL_HAS_REASON_DEFINED&&MISSING_REASON_EXCEPTION?isNativeAbortException(e.reason)?UNSET$1:e.reason:REASON in e?e[REASON]:UNSET$1:UNSET$1}function signalPromise$1(e){if(e.pr)return e.pr;var t,n=new Promise(function(A,S){t=()=>{if(S&&e){let E=getSignalReason$1(e);S(E!==UNSET$1?E:void 0)}S=null},e.addEventListener("abort",t,!1)});return n[CLEANUP_FN$1]=function(){e&&(e.removeEventListener("abort",t,!1),e=null),n&&(n=n[CLEANUP_FN$1]=t=null)},n.catch(n[CLEANUP_FN$1]),n}function processTokenOrSignal$1(e){e instanceof AbortController&&(e=new cancelToken$1(e));var t=e&&e instanceof cancelToken$1?e.signal:e,n=signalPromise$1(t);return{tokenOrSignal:e,signal:t,signalPr:n}}function deferred(){var e,t=new Promise(n=>e=n);return{pr:t,resolve:e}}function isFunction$2(e){return typeof e=="function"}function isPromise(e){return e&&typeof e=="object"&&typeof e.then=="function"}function isNativeAbortException(e){return typeof e=="object"&&e instanceof Error&&e.name=="AbortError"}function invokeAbort$1(e,t){!isNativeAbortException(t)&&t!==UNSET$1?e.abort(t):e.abort()}var sharedExports=shared.exports,{CLEANUP_FN,TIMEOUT_TOKEN,UNSET,getSignalReason,cancelToken,signalPromise,processTokenOrSignal,isFunction:isFunction$1,invokeAbort}=sharedExports;caf.exports=Object.assign(CAF,{cancelToken,delay,timeout,signalRace,signalAll,tokenCycle});var cancelToken_1=caf.exports.cancelToken=cancelToken;caf.exports.delay=delay;caf.exports.timeout=timeout;caf.exports.signalRace=signalRace;caf.exports.signalAll=signalAll;caf.exports.tokenCycle=tokenCycle;function CAF(e){return function(n,...r){var A,S;if({tokenOrSignal:n,signal:A,signalPr:S}=processTokenOrSignal(n),A.aborted)return S;var E=S.catch(function(a){var $=getSignalReason(A);$=$!==UNSET?$:a;try{var l=T.return();throw l.value!==void 0?l.value:$!==UNSET?$:void 0}finally{T=c=E=C=null}}),{it:T,result:c}=runner.call(this,e,A,...r),C=Promise.race([c,E]);if(n!==A&&n[TIMEOUT_TOKEN]){let o=function($){invokeAbort(n,$),isFunction$1(n.discard)&&n.discard(),n=o=null};C.then(o,o)}else C.catch(()=>{}),n=null;return r=null,C}}function delay(e,t){typeof e=="number"&&typeof t!="number"&&([t,e]=[e,t]);var n,r;return e&&({tokenOrSignal:e,signal:n,signalPr:r}=processTokenOrSignal(e)),n&&n.aborted?r:new Promise(function(S,E){n&&(r.catch(function(){if(E&&n&&T){let C=getSignalReason(n);clearTimeout(T),E(C!==UNSET?C:`delay (${t}) interrupted`),S=E=T=n=null}}),r=null);var T=setTimeout(function(){S(`delayed: ${t}`),S=E=T=n=null},t)})}function timeout(e,t="Timeout"){e=Number(e)||0;var n=new cancelToken;return delay(n.signal,e).then(()=>r(t),r),Object.defineProperty(n,TIMEOUT_TOKEN,{value:!0,writable:!1,enumerable:!1,configurable:!1}),n;function r(...A){invokeAbort(n,A.length>0?A[0]:UNSET),n.discard(),n=null}}function splitSignalPRs(e){return e.reduce(function(n,r){var A=signalPromise(r);return n[0].push(A),r.pr||n[1].push(A),n},[[],[]])}function triggerAndCleanup(e,t,n){e.then(function(A){invokeAbort(t,A),t.discard(),t=null}).then(function(){for(let A of n)A[CLEANUP_FN]&&A[CLEANUP_FN]();n=null})}function prCatch(e){return e.catch(t=>t)}function signalRace(e){var t=new cancelToken,[n,r]=splitSignalPRs(e);return triggerAndCleanup(prCatch(Promise.race(n)),t,r),t.signal}function signalAll(e){var t=new cancelToken,[n,r]=splitSignalPRs(e);return triggerAndCleanup(Promise.all(n.map(prCatch)),t,r),t.signal}function tokenCycle(){var e;return function(...n){return e&&(invokeAbort(e,n.length>0?n[0]:UNSET),e.discard()),e=new cancelToken}}function runner(e,...t){var n=e.apply(this,t);return e=t=null,{it:n,result:function r(A){try{var S=n.next(A);A=null}catch(E){return Promise.reject(E)}return function E(T){var c=Promise.resolve(T.value);return T.done?n=null:(c=c.then(r,function(o){return Promise.resolve(n.throw(o)).then(E)}),c.catch(function(){n=null})),T=null,c}(S)}()}}var cafExports=caf.exports;const u=getDefaultExportFromCjs(cafExports);function s(){s=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=typeof Symbol=="function"?Symbol:{},A=r.iterator||"@@iterator",S=r.asyncIterator||"@@asyncIterator",E=r.toStringTag||"@@toStringTag";function T(B,I,Y){return Object.defineProperty(B,I,{value:Y,enumerable:!0,configurable:!0,writable:!0}),B[I]}try{T({},"")}catch{T=function(I,Y,H){return I[Y]=H}}function c(B,I,Y,H){var N=Object.create((I&&I.prototype instanceof a?I:a).prototype),W=new X(H||[]);return N._invoke=function(G,Z,J){var Q="suspendedStart";return function(ne,re){if(Q==="executing")throw new Error("Generator is already running");if(Q==="completed"){if(ne==="throw")throw re;return{value:void 0,done:!0}}for(J.method=ne,J.arg=re;;){var ue=J.delegate;if(ue){var oe=D(ue,J);if(oe){if(oe===o)continue;return oe}}if(J.method==="next")J.sent=J._sent=J.arg;else if(J.method==="throw"){if(Q==="suspendedStart")throw Q="completed",J.arg;J.dispatchException(J.arg)}else J.method==="return"&&J.abrupt("return",J.arg);Q="executing";var ie=C(G,Z,J);if(ie.type==="normal"){if(Q=J.done?"completed":"suspendedYield",ie.arg===o)continue;return{value:ie.arg,done:J.done}}ie.type==="throw"&&(Q="completed",J.method="throw",J.arg=ie.arg)}}}(B,Y,W),N}function C(B,I,Y){try{return{type:"normal",arg:B.call(I,Y)}}catch(H){return{type:"throw",arg:H}}}e.wrap=c;var o={};function a(){}function $(){}function l(){}var f={};T(f,A,function(){return this});var R=Object.getPrototypeOf,x=R&&R(R(U([])));x&&x!==t&&n.call(x,A)&&(f=x);var L=l.prototype=a.prototype=Object.create(f);function M(B){["next","throw","return"].forEach(function(I){T(B,I,function(Y){return this._invoke(I,Y)})})}function V(B,I){function Y(N,W,G,Z){var J=C(B[N],B,W);if(J.type!=="throw"){var Q=J.arg,ne=Q.value;return ne&&typeof ne=="object"&&n.call(ne,"__await")?I.resolve(ne.__await).then(function(re){Y("next",re,G,Z)},function(re){Y("throw",re,G,Z)}):I.resolve(ne).then(function(re){Q.value=re,G(Q)},function(re){return Y("throw",re,G,Z)})}Z(J.arg)}var H;this._invoke=function(N,W){function G(){return new I(function(Z,J){Y(N,W,Z,J)})}return H=H?H.then(G,G):G()}}function D(B,I){var Y=B.iterator[I.method];if(Y===void 0){if(I.delegate=null,I.method==="throw"){if(B.iterator.return&&(I.method="return",I.arg=void 0,D(B,I),I.method==="throw"))return o;I.method="throw",I.arg=new TypeError("The iterator does not provide a 'throw' method")}return o}var H=C(Y,B.iterator,I.arg);if(H.type==="throw")return I.method="throw",I.arg=H.arg,I.delegate=null,o;var N=H.arg;return N?N.done?(I[B.resultName]=N.value,I.next=B.nextLoc,I.method!=="return"&&(I.method="next",I.arg=void 0),I.delegate=null,o):N:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,o)}function F(B){var I={tryLoc:B[0]};1 in B&&(I.catchLoc=B[1]),2 in B&&(I.finallyLoc=B[2],I.afterLoc=B[3]),this.tryEntries.push(I)}function P(B){var I=B.completion||{};I.type="normal",delete I.arg,B.completion=I}function X(B){this.tryEntries=[{tryLoc:"root"}],B.forEach(F,this),this.reset(!0)}function U(B){if(B){var I=B[A];if(I)return I.call(B);if(typeof B.next=="function")return B;if(!isNaN(B.length)){var Y=-1,H=function N(){for(;++Y=0;--H){var N=this.tryEntries[H],W=N.completion;if(N.tryLoc==="root")return Y("end");if(N.tryLoc<=this.prev){var G=n.call(N,"catchLoc"),Z=n.call(N,"finallyLoc");if(G&&Z){if(this.prev=0;--Y){var H=this.tryEntries[Y];if(H.tryLoc<=this.prev&&n.call(H,"finallyLoc")&&this.prev=0;--I){var Y=this.tryEntries[I];if(Y.finallyLoc===B)return this.complete(Y.completion,Y.afterLoc),P(Y),o}},catch:function(B){for(var I=this.tryEntries.length-1;I>=0;--I){var Y=this.tryEntries[I];if(Y.tryLoc===B){var H=Y.completion;if(H.type==="throw"){var N=H.arg;P(Y)}return N}}throw new Error("illegal catch attempt")},delegateYield:function(B,I,Y){return this.delegate={iterator:U(B),resultName:I,nextLoc:Y},this.method==="next"&&(this.arg=void 0),o}},e}var d=function(e){return e._runningInstances.length>=e._maxConcurrency},v=function(e){var t=e._activeInstances[0];t&&t.cancel()},y=function(e){e._enqueuedInstances.forEach(function(t){t.isEnqueued=!1,t.isDropped=!0})};function g(e,t){return t?function(n,r,A){return computed(function(){return n().filter(function(S){return S[r]})})}(function(){return e()._instances},t):computed(function(){return[]})}function _(e){return computed(function(){return e().length})}function m(e){return computed(function(){var t=e();return t[t.length-1]})}function w(e){return computed(function(){return e()[0]})}function b(e){return reactive(e)}function O(e){return q(s().mark(function t(n){var r=arguments;return s().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",e.apply(void 0,[n].concat([].slice.call(r,1))));case 1:case"end":return A.stop()}},t)}))}function j(e,t,n){var r,A,S={id:n.id,isDropped:!1,isEnqueued:!1,hasStarted:!1,isRunning:!1,isFinished:!1,isCanceling:!1,isCanceled:computed(function(){return E.isCanceling&&E.isFinished}),isActive:computed(function(){return E.isRunning&&!E.isCanceling}),isSuccessful:!1,isNotDropped:computed(function(){return!E.isDropped}),isError:computed(function(){return!!E.error}),status:computed(function(){var c=[[E.isRunning,"running"],[E.isEnqueued,"enqueued"],[E.isCanceled,"canceled"],[E.isCanceling,"canceling"],[E.isDropped,"dropped"],[E.isError,"error"],[E.isSuccessful,"success"]].find(function(C){return C[0]});return c&&c[1]}),error:null,value:null,cancel:function(c){if((c===void 0?{force:!1}:c).force||(E.isCanceling=!0,E.isEnqueued&&(E.isFinished=!0),E.isEnqueued=!1),E.token&&E._canAbort){E.token.abort("cancel");try{E.token.discard()}catch{}E.token=void 0,E._canAbort=!1}},canceledOn:function(c){return c.pr.catch(function(C){E.cancel()}),E},_run:function(){(function(c,C,o,a){var $=new cancelToken_1,l=u(C,$);function f(){c.isRunning=!1,c.isFinished=!0}c.token=$,c.hasStarted=!0,c.isRunning=!0,c.isEnqueued=!1,l.call.apply(l,[c,$].concat(o)).then(function(R){c.value=R,c.isSuccessful=!0,f(),c._deferredObject.resolve(R),c._canAbort=!1,a.onFinish(c)}).catch(function(R){R!=="cancel"&&(c.error=R),f(),c._shouldThrow&&c._deferredObject.reject(R),a.onFinish(c)})})(E,e,t,n)},_handled:!0,_deferredObject:(r={},A=new Promise(function(c,C){r.resolve=c,r.reject=C}),r.promise=A,r),_shouldThrow:!1,_canAbort:!0,then:function(c,C){return E._shouldThrow=!0,E._deferredObject.promise.then(c,C)},catch:function(c,C){return C===void 0&&(C=!0),E._shouldThrow=C,E._deferredObject.promise.catch(c)},finally:function(c){return E._shouldThrow=!0,E._deferredObject.promise.finally(c)}},E=b(S),T=n.modifiers;return T.drop?E.isDropped=!0:T.enqueue?E.isEnqueued=!0:E._run(),E}function q(e,t){t===void 0&&(t={cancelOnUnmount:!0});var n=getCurrentInstance(),r=effectScope(),A={_isRestartable:!1,_isDropping:!1,_isEnqueuing:!1,_isKeepingLatest:!1,_maxConcurrency:1,_hasConcurrency:computed(function(){return S._isRestartable||S._isDropping||S._isEnqueuing||S._isKeepingLatest}),isIdle:computed(function(){return!S.isRunning}),isRunning:computed(function(){return!!S._instances.find(function(E){return E.isRunning})}),isError:computed(function(){return!(!S.last||!S.last.isError)}),_instances:[],_successfulInstances:g(function(){return S},"isSuccessful"),_runningInstances:g(function(){return S},"isRunning"),_enqueuedInstances:g(function(){return S},"isEnqueued"),_notDroppedInstances:g(function(){return S},"isNotDropped"),_activeInstances:g(function(){return S},"isActive"),performCount:_(function(){return S._instances}),last:m(function(){return S._notDroppedInstances}),lastSuccessful:m(function(){return S._successfulInstances}),firstEnqueued:w(function(){return S._enqueuedInstances}),cancelAll:function(E){var T=(E===void 0?{force:!1}:E).force;S._instances.forEach(function(c){try{(T||!c.isDropped&&!c.isFinished)&&c.cancel({force:T})}catch(C){if(C!=="cancel")throw C}})},perform:function(){var E=arguments,T={enqueue:!1,drop:!1};S._hasConcurrency&&d(S)&&(S._isDropping&&(T.drop=!0),S._isRestartable&&v(S),S._isKeepingLatest&&y(S),(S._isEnqueuing||S._isKeepingLatest)&&(T.enqueue=!0));var c=function(){return k(S)},C=function(){return j(e,[].slice.call(E),{modifiers:T,onFinish:c,scope:r,id:S._instances.length+1})},o=r.active?r.run(C):C();return r.active||console.warn("Task instance has been created in inactive scope. Perhaps youre creating task out of setup?"),S._instances=[].concat(S._instances,[o]),o},clear:function(){this.cancelAll({force:!0}),this._instances=[]},destroy:function(){r.stop(),this.clear()},restartable:function(){return S._resetModifierFlags(),S._isRestartable=!0,S},drop:function(){return S._resetModifierFlags(),S._isDropping=!0,S},enqueue:function(){return S._resetModifierFlags(),S._isEnqueuing=!0,S},keepLatest:function(){return S._resetModifierFlags(),S._isKeepingLatest=!0,S},_resetModifierFlags:function(){S._isKeepingLatest=!1,S._isRestartable=!1,S._isEnqueuing=!1,S._isDropping=!1},maxConcurrency:function(E){return S._maxConcurrency=E,S}},S=b(A);return n&&t.cancelOnUnmount&&onBeforeUnmount(function(){S._instances&&S.destroy()}),S}function k(e){if(e._isEnqueuing||e._isKeepingLatest){var t=e.firstEnqueued;t&&t._run()}}function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(e=>t=>{const n=toString$1.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,A;if(typeof e!="object"&&(e=[e]),isArray(e))for(r=0,A=e.length;r0;)if(A=n[r],t===A.toLowerCase())return A;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(r,A)=>{const S=e&&findKey(t,A)||A;isPlainObject(t[S])&&isPlainObject(r)?t[S]=merge(t[S],r):isPlainObject(r)?t[S]=merge({},r):isArray(r)?t[S]=r.slice():t[S]=r};for(let r=0,A=arguments.length;r(forEach(t,(A,S)=>{n&&isFunction(A)?e[S]=bind(A,n):e[S]=A},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let A,S,E;const T={};if(t=t||{},e==null)return t;do{for(A=Object.getOwnPropertyNames(e),S=A.length;S-- >0;)E=A[S],(!r||r(E,e,t))&&!T[E]&&(t[E]=e[E],T[E]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let A;for(;(A=r.next())&&!A.done;){const S=A.value;t.call(e,S[0],S[1])}},matchAll=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,A){return r.toUpperCase()+A}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(A,S)=>{t(A,S,e)!==!1&&(r[S]=A)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(isFunction(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},r=A=>{A.forEach(S=>{n[S]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(e=16,t=ALPHABET.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const toJSONObject=e=>{const t=new Array(10),n=(r,A)=>{if(isObject(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[A]=r;const S=isArray(r)?[]:{};return forEach(r,(E,T)=>{const c=n(E,A+1);!isUndefined(c)&&(S[T]=c)}),t[A]=void 0,S}}return r};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable};function AxiosError(e,t,n,r,A){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),A&&(this.response=A)}utils.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(e,t,n,r,A,S)=>{const E=Object.create(prototype$1);return utils.toFlatObject(e,E,function(c){return c!==Error.prototype},T=>T!=="isAxiosError"),AxiosError.call(E,e.message,t,n,r,A),E.cause=e,E.name=e.name,S&&Object.assign(E,S),E};const httpAdapter=null;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(A,S){return A=removeBrackets(A),!n&&S?"["+A+"]":A}).join(n?".":""):t}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData(e,t,n){if(!utils.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,x){return!utils.isUndefined(x[R])});const r=n.metaTokens,A=n.visitor||o,S=n.dots,E=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&utils.isSpecCompliantForm(t);if(!utils.isFunction(A))throw new TypeError("visitor must be a function");function C(f){if(f===null)return"";if(utils.isDate(f))return f.toISOString();if(!c&&utils.isBlob(f))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(f)||utils.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function o(f,R,x){let L=f;if(f&&!x&&typeof f=="object"){if(utils.endsWith(R,"{}"))R=r?R:R.slice(0,-2),f=JSON.stringify(f);else if(utils.isArray(f)&&isFlatArray(f)||(utils.isFileList(f)||utils.endsWith(R,"[]"))&&(L=utils.toArray(f)))return R=removeBrackets(R),L.forEach(function(V,D){!(utils.isUndefined(V)||V===null)&&t.append(E===!0?renderKey([R],D,S):E===null?R:R+"[]",C(V))}),!1}return isVisitable(f)?!0:(t.append(renderKey(x,R,S),C(f)),!1)}const a=[],$=Object.assign(predicates,{defaultVisitor:o,convertValue:C,isVisitable});function l(f,R){if(!utils.isUndefined(f)){if(a.indexOf(f)!==-1)throw Error("Circular reference detected in "+R.join("."));a.push(f),utils.forEach(f,function(L,M){(!(utils.isUndefined(L)||L===null)&&A.call(t,L,utils.isString(M)?M.trim():M,R,$))===!0&&l(L,R?R.concat(M):[M])}),a.pop()}}if(!utils.isObject(e))throw new TypeError("data must be an object");return l(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])};prototype.toString=function(t){const n=t?function(r){return t.call(this,r,encode$2)}:encode$2;return this._pairs.map(function(A){return n(A[0])+"="+n(A[1])},"").join("&")};function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode$1,A=n&&n.serialize;let S;if(A?S=A(t,n):S=utils.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),S){const E=e.indexOf("#");E!==-1&&(e=e.slice(0,E)),e+=(e.indexOf("?")===-1?"?":"&")+S}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils.forEach(this.handlers,function(r){r!==null&&t(r)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,isStandardBrowserEnv=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(n,r,A,S){return platform.isNode&&utils.isBuffer(n)?(this.append(r,n.toString("base64")),!1):S.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const A=n.length;let S;for(r=0;r=n.length;return E=!E&&utils.isArray(A)?A.length:E,c?(utils.hasOwnProp(A,E)?A[E]=[A[E],r]:A[E]=r,!T):((!A[E]||!utils.isObject(A[E]))&&(A[E]=[]),t(n,r,A[E],S)&&utils.isArray(A[E])&&(A[E]=arrayToObject(A[E])),!T)}if(utils.isFormData(e)&&utils.isFunction(e.entries)){const n={};return utils.forEachEntry(e,(r,A)=>{t(parsePropPath(r),A,n,0)}),n}return null}const DEFAULT_CONTENT_TYPE={"Content-Type":void 0};function stringifySafely(e,t,n){if(utils.isString(e))try{return(t||JSON.parse)(e),utils.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",A=r.indexOf("application/json")>-1,S=utils.isObject(t);if(S&&utils.isHTMLForm(t)&&(t=new FormData(t)),utils.isFormData(t))return A&&A?JSON.stringify(formDataToJSON(t)):t;if(utils.isArrayBuffer(t)||utils.isBuffer(t)||utils.isStream(t)||utils.isFile(t)||utils.isBlob(t))return t;if(utils.isArrayBufferView(t))return t.buffer;if(utils.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let T;if(S){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((T=utils.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return toFormData(T?{"files[]":t}:t,c&&new c,this.formSerializer)}}return S||A?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,A=this.responseType==="json";if(t&&utils.isString(t)&&(r&&!this.responseType||A)){const E=!(n&&n.silentJSONParsing)&&A;try{return JSON.parse(t)}catch(T){if(E)throw T.name==="SyntaxError"?AxiosError.from(T,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):T}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],function(t){defaults.headers[t]={}});utils.forEach(["post","put","patch"],function(t){defaults.headers[t]=utils.merge(DEFAULT_CONTENT_TYPE)});const defaults$1=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,A;return e&&e.split(` `).forEach(function(E){A=E.indexOf(":"),n=E.substring(0,A).trim().toLowerCase(),r=E.substring(A+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,A){if(utils.isFunction(r))return r.call(this,t,n);if(A&&(t=n),!!utils.isString(t)){if(utils.isString(r))return t.indexOf(r)!==-1;if(utils.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function buildAccessors(e,t){const n=utils.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(A,S,E){return this[r].call(this,t,A,S,E)},configurable:!0})})}class AxiosHeaders{constructor(t){t&&this.set(t)}set(t,n,r){const A=this;function S(T,c,C){const o=normalizeHeader(c);if(!o)throw new Error("header name must be a non-empty string");const a=utils.findKey(A,o);(!a||A[a]===void 0||C===!0||C===void 0&&A[a]!==!1)&&(A[a||c]=normalizeValue(T))}const E=(T,c)=>utils.forEach(T,(C,o)=>S(C,o,c));return utils.isPlainObject(t)||t instanceof this.constructor?E(t,n):utils.isString(t)&&(t=t.trim())&&!isValidHeaderName(t)?E(parseHeaders(t),n):t!=null&&S(n,t,r),this}get(t,n){if(t=normalizeHeader(t),t){const r=utils.findKey(this,t);if(r){const A=this[r];if(!n)return A;if(n===!0)return parseTokens(A);if(utils.isFunction(n))return n.call(this,A,r);if(utils.isRegExp(n))return n.exec(A);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=normalizeHeader(t),t){const r=utils.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||matchHeaderValue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let A=!1;function S(E){if(E=normalizeHeader(E),E){const T=utils.findKey(r,E);T&&(!n||matchHeaderValue(r,r[T],T,n))&&(delete r[T],A=!0)}}return utils.isArray(t)?t.forEach(S):S(t),A}clear(t){const n=Object.keys(this);let r=n.length,A=!1;for(;r--;){const S=n[r];(!t||matchHeaderValue(this,this[S],S,t,!0))&&(delete this[S],A=!0)}return A}normalize(t){const n=this,r={};return utils.forEach(this,(A,S)=>{const E=utils.findKey(r,S);if(E){n[E]=normalizeValue(A),delete n[S];return}const T=t?formatHeader(S):String(S).trim();T!==S&&delete n[S],n[T]=normalizeValue(A),r[T]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return utils.forEach(this,(r,A)=>{r!=null&&r!==!1&&(n[A]=t&&utils.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(A=>r.set(A)),r}static accessor(t){const r=(this[$internals]=this[$internals]={accessors:{}}).accessors,A=this.prototype;function S(E){const T=normalizeHeader(E);r[T]||(buildAccessors(A,E),r[T]=!0)}return utils.isArray(t)?t.forEach(S):S(t),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.freezeMethods(AxiosHeaders.prototype);utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(e,t){const n=this||defaults$1,r=t||n,A=AxiosHeaders$1.from(r.headers);let S=r.data;return utils.forEach(e,function(T){S=T.call(n,S,A.normalize(),t?t.status:void 0)}),A.normalize(),S}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,n){AxiosError.call(this,e??"canceled",AxiosError.ERR_CANCELED,t,n),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError("Request failed with status code "+n.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const cookies=platform.isStandardBrowserEnv?function(){return{write:function(n,r,A,S,E,T){const c=[];c.push(n+"="+encodeURIComponent(r)),utils.isNumber(A)&&c.push("expires="+new Date(A).toGMTString()),utils.isString(S)&&c.push("path="+S),utils.isString(E)&&c.push("domain="+E),T===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t}const isURLSameOrigin=platform.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function A(S){let E=S;return t&&(n.setAttribute("href",E),E=n.href),n.setAttribute("href",E),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=A(window.location.href),function(E){const T=utils.isString(E)?A(E):E;return T.protocol===r.protocol&&T.host===r.host}}():function(){return function(){return!0}}();function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let A=0,S=0,E;return t=t!==void 0?t:1e3,function(c){const C=Date.now(),o=r[S];E||(E=C),n[A]=c,r[A]=C;let a=S,$=0;for(;a!==A;)$+=n[a++],a=a%e;if(A=(A+1)%e,A===S&&(S=(S+1)%e),C-E{const S=A.loaded,E=A.lengthComputable?A.total:void 0,T=S-n,c=r(T),C=S<=E;n=S;const o={loaded:S,total:E,progress:E?S/E:void 0,bytes:T,rate:c||void 0,estimated:c&&E&&C?(E-S)/c:void 0,event:A};o[t?"download":"upload"]=!0,e(o)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(n,r){let A=e.data;const S=AxiosHeaders$1.from(e.headers).normalize(),E=e.responseType;let T;function c(){e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T)}utils.isFormData(A)&&(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv?S.setContentType(!1):S.setContentType("multipart/form-data;",!1));let C=new XMLHttpRequest;if(e.auth){const l=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";S.set("Authorization","Basic "+btoa(l+":"+f))}const o=buildFullPath(e.baseURL,e.url);C.open(e.method.toUpperCase(),buildURL(o,e.params,e.paramsSerializer),!0),C.timeout=e.timeout;function a(){if(!C)return;const l=AxiosHeaders$1.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),R={data:!E||E==="text"||E==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:l,config:e,request:C};settle(function(L){n(L),c()},function(L){r(L),c()},R),C=null}if("onloadend"in C?C.onloadend=a:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(a)},C.onabort=function(){C&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,C)),C=null)},C.onerror=function(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,C)),C=null},C.ontimeout=function(){let f=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const R=e.transitional||transitionalDefaults;e.timeoutErrorMessage&&(f=e.timeoutErrorMessage),r(new AxiosError(f,R.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,C)),C=null},platform.isStandardBrowserEnv){const l=(e.withCredentials||isURLSameOrigin(o))&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);l&&S.set(e.xsrfHeaderName,l)}A===void 0&&S.setContentType(null),"setRequestHeader"in C&&utils.forEach(S.toJSON(),function(f,R){C.setRequestHeader(R,f)}),utils.isUndefined(e.withCredentials)||(C.withCredentials=!!e.withCredentials),E&&E!=="json"&&(C.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&C.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&C.upload&&C.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(T=l=>{C&&(r(!l||l.type?new CanceledError(null,e,C):l),C.abort(),C=null)},e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));const $=parseProtocol(o);if($&&platform.protocols.indexOf($)===-1){r(new AxiosError("Unsupported protocol "+$+":",AxiosError.ERR_BAD_REQUEST,e));return}C.send(A||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const adapters={getAdapter:e=>{e=utils.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let A=0;Ae instanceof AxiosHeaders$1?e.toJSON():e;function mergeConfig(e,t){t=t||{};const n={};function r(C,o,a){return utils.isPlainObject(C)&&utils.isPlainObject(o)?utils.merge.call({caseless:a},C,o):utils.isPlainObject(o)?utils.merge({},o):utils.isArray(o)?o.slice():o}function A(C,o,a){if(utils.isUndefined(o)){if(!utils.isUndefined(C))return r(void 0,C,a)}else return r(C,o,a)}function S(C,o){if(!utils.isUndefined(o))return r(void 0,o)}function E(C,o){if(utils.isUndefined(o)){if(!utils.isUndefined(C))return r(void 0,C)}else return r(void 0,o)}function T(C,o,a){if(a in t)return r(C,o);if(a in e)return r(void 0,C)}const c={url:S,method:S,data:S,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:T,headers:(C,o)=>A(headersToObject(C),headersToObject(o),!0)};return utils.forEach(Object.keys(Object.assign({},e,t)),function(o){const a=c[o]||A,$=a(e[o],t[o],o);utils.isUndefined($)&&a!==T||(n[o]=$)}),n}const VERSION="1.4.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(t,n,r){function A(S,E){return"[Axios v"+VERSION+"] Transitional option '"+S+"'"+E+(r?". "+r:"")}return(S,E,T)=>{if(t===!1)throw new AxiosError(A(E," has been removed"+(n?" in "+n:"")),AxiosError.ERR_DEPRECATED);return n&&!deprecatedWarnings[E]&&(deprecatedWarnings[E]=!0,console.warn(A(E," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(S,E,T):!0}};function assertOptions(e,t,n){if(typeof e!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let A=r.length;for(;A-- >0;){const S=r[A],E=t[S];if(E){const T=e[S],c=T===void 0||E(T,S,e);if(c!==!0)throw new AxiosError("option "+S+" must be "+c,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError("Unknown option "+S,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(t){this.defaults=t,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mergeConfig(this.defaults,n);const{transitional:r,paramsSerializer:A,headers:S}=n;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),A!=null&&(utils.isFunction(A)?n.paramsSerializer={serialize:A}:validator.assertOptions(A,{encode:validators.function,serialize:validators.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let E;E=S&&utils.merge(S.common,S[n.method]),E&&utils.forEach(["delete","get","head","post","put","patch","common"],f=>{delete S[f]}),n.headers=AxiosHeaders$1.concat(E,S);const T=[];let c=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(n)===!1||(c=c&&R.synchronous,T.unshift(R.fulfilled,R.rejected))});const C=[];this.interceptors.response.forEach(function(R){C.push(R.fulfilled,R.rejected)});let o,a=0,$;if(!c){const f=[dispatchRequest.bind(this),void 0];for(f.unshift.apply(f,T),f.push.apply(f,C),$=f.length,o=Promise.resolve(n);a<$;)o=o.then(f[a++],f[a++]);return o}$=T.length;let l=n;for(a=0;a<$;){const f=T[a++],R=T[a++];try{l=f(l)}catch(x){R.call(this,x);break}}try{o=dispatchRequest.call(this,l)}catch(f){return Promise.reject(f)}for(a=0,$=C.length;a<$;)o=o.then(C[a++],C[a++]);return o}getUri(t){t=mergeConfig(this.defaults,t);const n=buildFullPath(t.baseURL,t.url);return buildURL(n,t.params,t.paramsSerializer)}}utils.forEach(["delete","get","head","options"],function(t){Axios.prototype[t]=function(n,r){return this.request(mergeConfig(r||{},{method:t,url:n,data:(r||{}).data}))}});utils.forEach(["post","put","patch"],function(t){function n(r){return function(S,E,T){return this.request(mergeConfig(T||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:S,data:E}))}}Axios.prototype[t]=n(),Axios.prototype[t+"Form"]=n(!0)});const Axios$1=Axios;class CancelToken{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(S){n=S});const r=this;this.promise.then(A=>{if(!r._listeners)return;let S=r._listeners.length;for(;S-- >0;)r._listeners[S](A);r._listeners=null}),this.promise.then=A=>{let S;const E=new Promise(T=>{r.subscribe(T),S=T}).then(A);return E.cancel=function(){r.unsubscribe(S)},E},t(function(S,E,T){r.reason||(r.reason=new CanceledError(S,E,T),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new CancelToken(function(A){t=A}),cancel:t}}}const CancelToken$1=CancelToken;function spread(e){return function(n){return e.apply(null,n)}}function isAxiosError(e){return utils.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([e,t])=>{HttpStatusCode[t]=e});const HttpStatusCode$1=HttpStatusCode;function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils.extend(n,t,null,{allOwnKeys:!0}),n.create=function(A){return createInstance(mergeConfig(e,A))},n}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(t){return Promise.all(t)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=e=>formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e);axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const axios$1=axios,client=axios$1.create({headers:{Accept:"application/json"}}),API={async getConfigs(){return(await client.get("/api/configs")).data},async getAlerts(e){return e.page=e.page||1,(await client.get("/api/alerts",{params:e})).data},async getTags(){return(await client.get("/api/tags")).data.tags},async getRuleSet(){return(await client.get("/api/rules/ids")).data.ruleIds},async deleteAlert(e){await client.delete(`/api/alerts/${e}`)},async getArtifact(e){return(await client.get(`/api/artifacts/${e}`)).data},async enrichArtifact(e){await client.get(`/api/artifacts/${e}/enrich`)},async deleteArtifact(e){await client.delete(`/api/artifacts/${e}`)},async getRules(e){return e.page=e.page||1,(await client.get("/api/rules",{params:e})).data},async getRule(e){return(await client.get(`/api/rules/${e}`)).data},async runRule(e){await client.get(`/api/rules/${e}/run`)},async createRule(e){return(await client.post("/api/rules/",e)).data},async updateRule(e){return(await client.put("/api/rules/",e)).data},async deleteRule(e){await client.delete(`/api/rules/${e}`)},async deleteTag(e){await client.delete(`/api/tags/${e}`)},async getIPInfo(e){return(await client.get(`/api/ip_addresses/${e}`)).data}};function generateGetAlertsTask(){return O(async(e,t)=>await API.getAlerts(t))}function generateDeleteAlertTask(){return O(async(e,t)=>await API.deleteAlert(t))}function generateGetTagsTask(){return O(async()=>await API.getTags())}function generateDeleteTagTask(){return O(async(e,t)=>await API.deleteTag(t))}function generateGetRuleSetTask(){return O(async()=>await API.getRuleSet())}function generateGetArtifactTask(){return O(async(e,t)=>await API.getArtifact(t))}function generateDeleteArtifactTask(){return O(async(e,t)=>await API.deleteArtifact(t))}function generateEnrichArtifactTask(){return O(async(e,t)=>await API.enrichArtifact(t))}function generateGetConfigsTask(){return O(async()=>await API.getConfigs())}function generateGetIPTask(){return O(async(e,t)=>await API.getIPInfo(t))}function generateGetRulesTask(){return O(async(e,t)=>await API.getRules(t))}function generateGetRuleTask(){return O(async(e,t)=>await API.getRule(t))}function generateDeleteRuleTask(){return O(async(e,t)=>await API.deleteRule(t))}function generateRunRuleTask(){return O(async(e,t)=>await API.runRule(t))}function generateCreateRuleTask(){return O(async(e,t)=>await API.createRule(t))}function generateUpdateRuleTask(){return O(async(e,t)=>await API.updateRule(t))}const _sfc_main$F=defineComponent({name:"ArtifactTag",props:{artifact:{type:Object,required:!0}},setup(e){const t=ref(!1),n=ref(!1),r=generateDeleteArtifactTask();return{isDeleted:t,deleteArtifact:async()=>{window.confirm(`Are you sure you want to delete ${e.artifact.data}?`)&&(await r.perform(e.artifact.id),t.value=!0)},showDeleteButton:()=>{n.value=!0},hideDeleteButton:()=>{n.value=!1},isDeleteButtonEnabled:n}}}),_hoisted_1$t={key:0,class:"control"};function _sfc_render$F(e,t,n,r,A,S){const E=resolveComponent("router-link");return e.isDeleted?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_1$t,[createBaseVNode("div",{class:"tags has-addons are-medium",onMouseover:t[1]||(t[1]=(...T)=>e.showDeleteButton&&e.showDeleteButton(...T)),onMouseleave:t[2]||(t[2]=(...T)=>e.hideDeleteButton&&e.hideDeleteButton(...T))},[createVNode(E,{class:"tag is-link is-light",to:{name:"Artifact",params:{id:e.artifact.id}}},{default:withCtx(()=>[createTextVNode(toDisplayString(e.artifact.data),1)]),_:1},8,["to"]),e.isDeleteButtonEnabled?(openBlock(),createElementBlock("span",{key:0,class:"tag is-delete",onClick:t[0]||(t[0]=(...T)=>e.deleteArtifact&&e.deleteArtifact(...T))})):createCommentVNode("",!0)],32)]))}const ArtifactComponent$1=_export_sfc(_sfc_main$F,[["render",_sfc_render$F]]),_sfc_main$E=defineComponent({name:"ArtifactTags",components:{ArtifactComponent:ArtifactComponent$1},props:{artifacts:{type:Array,required:!0}}}),_hoisted_1$s={class:"field is-grouped is-grouped-multiline"};function _sfc_render$E(e,t,n,r,A,S){const E=resolveComponent("ArtifactComponent");return openBlock(),createElementBlock("div",_hoisted_1$s,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.artifacts,T=>(openBlock(),createBlock(E,{key:T.id,artifact:T},null,8,["artifact"]))),128))])}const Artifacts=_export_sfc(_sfc_main$E,[["render",_sfc_render$E]]),_sfc_main$D=defineComponent({name:"TagItem",props:{tag:{type:Object,required:!0}},setup(e,t){const n=ref(!1),r=ref(!1),A=generateDeleteTagTask();return{updateTag:()=>{t.emit("update-tag",e.tag.name)},isDeleted:n,deleteTag:async()=>{window.confirm(`Are you sure you want to delete ${e.tag.name}?`)&&(await A.perform(e.tag.name),n.value=!0)},showDeleteButton:()=>{r.value=!0},hideDeleteButton:()=>{r.value=!1},isDeleteButtonEnabled:r}}}),_hoisted_1$r={key:0,class:"control"};function _sfc_render$D(e,t,n,r,A,S){return e.isDeleted?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_1$r,[createBaseVNode("div",{class:"tags has-addons are-medium",onMouseover:t[2]||(t[2]=(...E)=>e.showDeleteButton&&e.showDeleteButton(...E)),onMouseleave:t[3]||(t[3]=(...E)=>e.hideDeleteButton&&e.hideDeleteButton(...E))},[createBaseVNode("span",{class:"tag is-info is-light",onClick:t[0]||(t[0]=(...E)=>e.updateTag&&e.updateTag(...E))},toDisplayString(e.tag.name),1),e.isDeleteButtonEnabled?(openBlock(),createElementBlock("a",{key:0,class:"tag is-delete",onClick:t[1]||(t[1]=(...E)=>e.deleteTag&&e.deleteTag(...E))})):createCommentVNode("",!0)],32)]))}const TagComponent=_export_sfc(_sfc_main$D,[["render",_sfc_render$D]]),_sfc_main$C=defineComponent({name:"TagsItem",components:{TagComponent},props:{tags:{type:Array,required:!0}},setup(e,t){return{updateTag:r=>{t.emit("update-tag",r)}}}}),_hoisted_1$q={class:"field is-grouped is-grouped-multiline"};function _sfc_render$C(e,t,n,r,A,S){const E=resolveComponent("TagComponent");return openBlock(),createElementBlock("div",_hoisted_1$q,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.tags,T=>(openBlock(),createBlock(E,{tag:T,key:T.name,onUpdateTag:e.updateTag},null,8,["tag","onUpdateTag"]))),128))])}const Tags$1=_export_sfc(_sfc_main$C,[["render",_sfc_render$C]]);var dayjs_min={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(commonjsGlobal,function(){var n=1e3,r=6e4,A=36e5,S="millisecond",E="second",T="minute",c="hour",C="day",o="week",a="month",$="quarter",l="year",f="date",R="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|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,M={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(H){var N=["th","st","nd","rd"],W=H%100;return"["+H+(N[(W-20)%10]||N[W]||N[0])+"]"}},V=function(H,N,W){var G=String(H);return!G||G.length>=N?H:""+Array(N+1-G.length).join(W)+H},D={s:V,z:function(H){var N=-H.utcOffset(),W=Math.abs(N),G=Math.floor(W/60),Z=W%60;return(N<=0?"+":"-")+V(G,2,"0")+":"+V(Z,2,"0")},m:function H(N,W){if(N.date()1)return H(Q[0])}else{var ne=N.name;P[ne]=N,Z=ne}return!G&&Z&&(F=Z),Z||!G&&F},z=function(H,N){if(X(H))return H.clone();var W=typeof N=="object"?N:{};return W.date=H,W.args=arguments,new I(W)},B=D;B.l=U,B.i=X,B.w=function(H,N){return z(H,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var I=function(){function H(W){this.$L=U(W.locale,null,!0),this.parse(W)}var N=H.prototype;return N.parse=function(W){this.$d=function(G){var Z=G.date,J=G.utc;if(Z===null)return new Date(NaN);if(B.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var Q=Z.match(x);if(Q){var ne=Q[2]-1||0,re=(Q[7]||"0").substring(0,3);return J?new Date(Date.UTC(Q[1],ne,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,re)):new Date(Q[1],ne,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,re)}}return new Date(Z)}(W),this.$x=W.x||{},this.init()},N.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},N.$utils=function(){return B},N.isValid=function(){return this.$d.toString()!==R},N.isSame=function(W,G){var Z=z(W);return this.startOf(G)<=Z&&Z<=this.endOf(G)},N.isAfter=function(W,G){return z(W)0,P<=F.r||!F.r){P<=1&&D>0&&(F=M[D-1]);var X=L[F.l];l&&(P=l(""+P)),R=typeof X=="string"?X.replace("%d",P):X(P,o,F.l,x);break}}if(o)return R;var U=x?L.future:L.past;return typeof U=="function"?U(R):U.replace("%s",R)},S.to=function(C,o){return T(C,o,this,!0)},S.from=function(C,o){return T(C,o,this)};var c=function(C){return C.$u?A.utc():A()};S.toNow=function(C){return this.to(c(this),C)},S.fromNow=function(C){return this.from(c(this),C)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs(relativeTimeExports);var timezone$1={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(commonjsGlobal,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(A,S,E){var T,c=function($,l,f){f===void 0&&(f={});var R=new Date($),x=function(L,M){M===void 0&&(M={});var V=M.timeZoneName||"short",D=L+"|"+V,F=r[D];return F||(F=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:L,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:V}),r[D]=F),F}(l,f);return x.formatToParts(R)},C=function($,l){for(var f=c($,l),R=[],x=0;x=0&&(R[D]=parseInt(V,10))}var F=R[3],P=F===24?0:F,X=R[0]+"-"+R[1]+"-"+R[2]+" "+P+":"+R[4]+":"+R[5]+":000",U=+$;return(E.utc(X).valueOf()-(U-=U%1e3))/6e4},o=S.prototype;o.tz=function($,l){$===void 0&&($=T);var f=this.utcOffset(),R=this.toDate(),x=R.toLocaleString("en-US",{timeZone:$}),L=Math.round((R-new Date(x))/1e3/60),M=E(x).$set("millisecond",this.$ms).utcOffset(15*-Math.round(R.getTimezoneOffset()/15)-L,!0);if(l){var V=M.utcOffset();M=M.add(f-V,"minute")}return M.$x.$timezone=$,M},o.offsetName=function($){var l=this.$x.$timezone||E.tz.guess(),f=c(this.valueOf(),l,{timeZoneName:$}).find(function(R){return R.type.toLowerCase()==="timezonename"});return f&&f.value};var a=o.startOf;o.startOf=function($,l){if(!this.$x||!this.$x.$timezone)return a.call(this,$,l);var f=E(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return a.call(f,$,l).tz(this.$x.$timezone,!0)},E.tz=function($,l,f){var R=f&&l,x=f||l||T,L=C(+E(),x);if(typeof $!="string")return E($).tz(x);var M=function(P,X,U){var z=P-60*X*1e3,B=C(z,U);if(X===B)return[z,X];var I=C(z-=60*(B-X)*1e3,U);return B===I?[z,B]:[P-60*Math.min(B,I)*1e3,Math.max(B,I)]}(E.utc($,R).valueOf(),L,x),V=M[0],D=M[1],F=E(V).utcOffset(D);return F.$x.$timezone=x,F},E.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},E.tz.setDefault=function($){T=$}}})})(timezone$1);var timezoneExports=timezone$1.exports;const timezone=getDefaultExportFromCjs(timezoneExports);var utc$1={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(commonjsGlobal,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,A=/([+-]|\d\d)/g;return function(S,E,T){var c=E.prototype;T.utc=function(R){var x={date:R,utc:!0,args:arguments};return new E(x)},c.utc=function(R){var x=T(this.toDate(),{locale:this.$L,utc:!0});return R?x.add(this.utcOffset(),n):x},c.local=function(){return T(this.toDate(),{locale:this.$L,utc:!1})};var C=c.parse;c.parse=function(R){R.utc&&(this.$u=!0),this.$utils().u(R.$offset)||(this.$offset=R.$offset),C.call(this,R)};var o=c.init;c.init=function(){if(this.$u){var R=this.$d;this.$y=R.getUTCFullYear(),this.$M=R.getUTCMonth(),this.$D=R.getUTCDate(),this.$W=R.getUTCDay(),this.$H=R.getUTCHours(),this.$m=R.getUTCMinutes(),this.$s=R.getUTCSeconds(),this.$ms=R.getUTCMilliseconds()}else o.call(this)};var a=c.utcOffset;c.utcOffset=function(R,x){var L=this.$utils().u;if(L(R))return this.$u?0:L(this.$offset)?a.call(this):this.$offset;if(typeof R=="string"&&(R=function(F){F===void 0&&(F="");var P=F.match(r);if(!P)return null;var X=(""+P[0]).match(A)||["-",0,0],U=X[0],z=60*+X[1]+ +X[2];return z===0?0:U==="+"?z:-z}(R),R===null))return this;var M=Math.abs(R)<=16?60*R:R,V=this;if(x)return V.$offset=M,V.$u=R===0,V;if(R!==0){var D=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(V=this.local().add(M+D,n)).$offset=M,V.$x.$localOffset=D}else V=this.utc();return V};var $=c.format;c.format=function(R){var x=R||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return $.call(this,x)},c.valueOf=function(){var R=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*R},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var l=c.toDate;c.toDate=function(R){return R==="s"&&this.$offset?T(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var f=c.diff;c.diff=function(R,x,L){if(R&&this.$u===R.$u)return f.call(this,R,x,L);var M=this.local(),V=T(R).local();return f.call(M,V,x,L)}}})})(utc$1);var utcExports=utc$1.exports;const utc=getDefaultExportFromCjs(utcExports),COUNTRIES=[{name:"Afghanistan",lat:33.93911,long:67.709953,code:"AF"},{name:"Albania",lat:41.153332,long:20.168331,code:"AL"},{name:"Algeria",lat:28.033886,long:1.659626,code:"DZ"},{name:"American Samoa",lat:-14.270972,long:-170.132217,code:"AS"},{name:"Andorra",lat:42.546245,long:1.601554,code:"AD"},{name:"Angola",lat:-11.202692,long:17.873887,code:"AO"},{name:"Anguilla",lat:18.220554,long:-63.068615,code:"AI"},{name:"Antarctica",lat:-75.250973,long:-.071389,code:"AQ"},{name:"Antigua and Barbuda",lat:17.060816,long:-61.796428,code:"AG"},{name:"Argentina",lat:-38.416097,long:-63.616672,code:"AR"},{name:"Armenia",lat:40.069099,long:45.038189,code:"AM"},{name:"Aruba",lat:12.52111,long:-69.968338,code:"AW"},{name:"Australia",lat:-25.274398,long:133.775136,code:"AU"},{name:"Austria",lat:47.516231,long:14.550072,code:"AT"},{name:"Azerbaijan",lat:40.143105,long:47.576927,code:"AZ"},{name:"Bahamas",lat:25.03428,long:-77.39628,code:"BS"},{name:"Bahrain",lat:25.930414,long:50.637772,code:"BH"},{name:"Bangladesh",lat:23.684994,long:90.356331,code:"BD"},{name:"Barbados",lat:13.193887,long:-59.543198,code:"BB"},{name:"Belarus",lat:53.709807,long:27.953389,code:"BY"},{name:"Belgium",lat:50.503887,long:4.469936,code:"BE"},{name:"Belize",lat:17.189877,long:-88.49765,code:"BZ"},{name:"Benin",lat:9.30769,long:2.315834,code:"BJ"},{name:"Bermuda",lat:32.321384,long:-64.75737,code:"BM"},{name:"Bhutan",lat:27.514162,long:90.433601,code:"BT"},{name:"Bolivia",lat:-16.290154,long:-63.588653,code:"BO"},{name:"Bosnia",lat:43.915886,long:17.679076,code:"BA"},{name:"Botswana",lat:-22.328474,long:24.684866,code:"BW"},{name:"Bouvet Island",lat:-54.423199,long:3.413194,code:"BV"},{name:"Brazil",lat:-14.235004,long:-51.92528,code:"BR"},{name:"British Indian Ocean Territory",lat:-6.343194,long:71.876519,code:"IO"},{name:"Brunei",lat:4.535277,long:114.727669,code:"BN"},{name:"Bulgaria",lat:42.733883,long:25.48583,code:"BG"},{name:"Burkina Faso",lat:12.238333,long:-1.561593,code:"BF"},{name:"Burundi",lat:-3.373056,long:29.918886,code:"BI"},{name:"Cabo Verde",lat:16.002082,long:-24.013197,code:"CV"},{name:"Cambodia",lat:12.565679,long:104.990963,code:"KH"},{name:"Cameroon",lat:7.369722,long:12.354722,code:"CM"},{name:"Canada",lat:56.130366,long:-106.346771,code:"CA"},{name:"Cayman Islands",lat:19.513469,long:-80.566956,code:"KY"},{name:"Central African Republic",lat:6.611111,long:20.939444,code:"CF"},{name:"Caribbean Netherlands",lat:12.2,long:-68.26,code:"BQ"},{name:"Chad",lat:15.454166,long:18.732207,code:"TD"},{name:"Chile",lat:-35.675147,long:-71.542969,code:"CL"},{name:"China",lat:35.86166,long:104.195397,code:"CN"},{name:"Christmas Island",lat:-10.447525,long:105.690449,code:"CX"},{name:"Cocos (Keeling) Islands",lat:-12.164165,long:96.870956,code:"CC"},{name:"Colombia",lat:4.570868,long:-74.297333,code:"CO"},{name:"Comoros",lat:-11.875001,long:43.872219,code:"KM"},{name:"Congo",lat:-.228021,long:15.827659,code:"CG"},{name:"DRC",lat:-4.038333,long:21.758664,code:"CD"},{name:"Cook Islands",lat:-21.236736,long:-159.777671,code:"CK"},{name:"Costa Rica",lat:9.748917,long:-83.753428,code:"CR"},{name:'Côte d"Ivoire',lat:7.539989,long:-5.54708,code:"CI"},{name:"Croatia",lat:45.1,long:15.2,code:"HR"},{name:"Cuba",lat:21.521757,long:-77.781167,code:"CU"},{name:"Curaçao",lat:12.15,long:-68.97,code:"CW"},{name:"Cyprus",lat:35.126413,long:33.429859,code:"CY"},{name:"Czechia",lat:49.817492,long:15.472962,code:"CZ"},{name:"Denmark",lat:56.26392,long:9.501785,code:"DK"},{name:"Djibouti",lat:11.825138,long:42.590275,code:"DJ"},{name:"Dominica",lat:15.414999,long:-61.370976,code:"DM"},{name:"Dominican Republic",lat:18.735693,long:-70.162651,code:"DO"},{name:"Ecuador",lat:-1.831239,long:-78.183406,code:"EC"},{name:"Egypt",lat:26.820553,long:30.802498,code:"EG"},{name:"El Salvador",lat:13.794185,long:-88.89653,code:"SV"},{name:"Equatorial Guinea",lat:1.650801,long:10.267895,code:"GQ"},{name:"Eritrea",lat:15.179384,long:39.782334,code:"ER"},{name:"Estonia",lat:58.595272,long:25.013607,code:"EE"},{name:"Ethiopia",lat:9.145,long:40.489673,code:"ET"},{name:"Falkland Islands (Malvinas)",lat:-51.796253,long:-59.523613,code:"FK"},{name:"Faroe Islands",lat:61.892635,long:-6.911806,code:"FO"},{name:"Fiji",lat:-16.578193,long:179.414413,code:"FJ"},{name:"Finland",lat:61.92411,long:25.748151,code:"FI"},{name:"France",lat:46.227638,long:2.213749,code:"FR"},{name:"French Guiana",lat:3.933889,long:-53.125782,code:"GF"},{name:"French Polynesia",lat:-17.679742,long:-149.406843,code:"PF"},{name:"French Southern Territories",lat:-49.280366,long:69.348557,code:"TF"},{name:"Gabon",lat:-.803689,long:11.609444,code:"GA"},{name:"Gambia",lat:13.443182,long:-15.310139,code:"GM"},{name:"Georgia",lat:42.315407,long:43.356892,code:"GE"},{name:"Germany",lat:51.165691,long:10.451526,code:"DE"},{name:"Ghana",lat:7.946527,long:-1.023194,code:"GH"},{name:"Gibraltar",lat:36.137741,long:-5.345374,code:"GI"},{name:"Greece",lat:39.074208,long:21.824312,code:"GR"},{name:"Greenland",lat:71.706936,long:-42.604303,code:"GL"},{name:"Grenada",lat:12.262776,long:-61.604171,code:"GD"},{name:"Guadeloupe",lat:16.995971,long:-62.067641,code:"GP"},{name:"Guam",lat:13.444304,long:144.793731,code:"GU"},{name:"Guatemala",lat:15.783471,long:-90.230759,code:"GT"},{name:"Guernsey",lat:49.465691,long:-2.585278,code:"GG"},{name:"Guinea",lat:9.945587,long:-9.696645,code:"GN"},{name:"Guinea-Bissau",lat:11.803749,long:-15.180413,code:"GW"},{name:"Guyana",lat:4.860416,long:-58.93018,code:"GY"},{name:"Haiti",lat:18.971187,long:-72.285215,code:"HT"},{name:"Heard Island and McDonald Islands",lat:-53.08181,long:73.504158,code:"HM"},{name:"Holy See (Vatican City State)",lat:41.902916,long:12.453389,code:"VA"},{name:"Honduras",lat:15.199999,long:-86.241905,code:"HN"},{name:"Hong Kong",lat:22.396428,long:114.109497,code:"HK"},{name:"Hungary",lat:47.162494,long:19.503304,code:"HU"},{name:"Iceland",lat:64.963051,long:-19.020835,code:"IS"},{name:"India",lat:20.593684,long:78.96288,code:"IN"},{name:"Indonesia",lat:-.789275,long:113.921327,code:"ID"},{name:"Iran",lat:32.427908,long:53.688046,code:"IR"},{name:"Iraq",lat:33.223191,long:43.679291,code:"IQ"},{name:"Ireland",lat:53.41291,long:-8.24389,code:"IE"},{name:"Isle of Man",lat:54.236107,long:-4.548056,code:"IM"},{name:"Israel",lat:31.046051,long:34.851612,code:"IL"},{name:"Italy",lat:41.87194,long:12.56738,code:"IT"},{name:"Jamaica",lat:18.109581,long:-77.297508,code:"JM"},{name:"Japan",lat:36.204824,long:138.252924,code:"JP"},{name:"Channel Islands",lat:49.214439,long:-2.13125,code:"JE"},{name:"Jordan",lat:30.585164,long:36.238414,code:"JO"},{name:"Kazakhstan",lat:48.019573,long:66.923684,code:"KZ"},{name:"Kenya",lat:-.023559,long:37.906193,code:"KE"},{name:"Kiribati",lat:-3.370417,long:-168.734039,code:"KI"},{name:"Kosovo",lat:42.602636,long:20.902977,code:"XK"},{name:"N. Korea",lat:40.339852,long:127.510093,code:"KP"},{name:"S. Korea",lat:35.907757,long:127.766922,code:"KR"},{name:"Kuwait",lat:29.31166,long:47.481766,code:"KW"},{name:"Kyrgyzstan",lat:41.20438,long:74.766098,code:"KG"},{name:'Lao People"s Democratic Republic',lat:19.85627,long:102.495496,code:"LA"},{name:"Latvia",lat:56.879635,long:24.603189,code:"LV"},{name:"Lebanon",lat:33.854721,long:35.862285,code:"LB"},{name:"Lesotho",lat:-29.609988,long:28.233608,code:"LS"},{name:"Liberia",lat:6.428055,long:-9.429499,code:"LR"},{name:"Libyan Arab Jamahiriya",lat:26.3351,long:17.228331,code:"LY"},{name:"Liechtenstein",lat:47.166,long:9.555373,code:"LI"},{name:"Lithuania",lat:55.169438,long:23.881275,code:"LT"},{name:"Luxembourg",lat:49.815273,long:6.129583,code:"LU"},{name:"Macao",lat:22.198745,long:113.543873,code:"MO"},{name:"Macedonia",lat:41.608635,long:21.745275,code:"MK"},{name:"Madagascar",lat:-18.766947,long:46.869107,code:"MG"},{name:"Malawi",lat:-13.254308,long:34.301525,code:"MW"},{name:"Malaysia",lat:4.210484,long:101.975766,code:"MY"},{name:"Maldives",lat:3.202778,long:73.22068,code:"MV"},{name:"Mali",lat:17.570692,long:-3.996166,code:"ML"},{name:"Malta",lat:35.937496,long:14.375416,code:"MT"},{name:"Marshall Islands",lat:7.131474,long:171.184478,code:"MH"},{name:"Martinique",lat:14.641528,long:-61.024174,code:"MQ"},{name:"Mauritania",lat:21.00789,long:-10.940835,code:"MR"},{name:"Mauritius",lat:-20.348404,long:57.552152,code:"MU"},{name:"Mayotte",lat:-12.8275,long:45.166244,code:"YT"},{name:"Mexico",lat:23.634501,long:-102.552784,code:"MX"},{name:"Micronesia",lat:7.425554,long:150.550812,code:"FM"},{name:"Moldova",lat:47.411631,long:28.369885,code:"MD"},{name:"Monaco",lat:43.750298,long:7.412841,code:"MC"},{name:"Mongolia",lat:46.862496,long:103.846656,code:"MN"},{name:"Montenegro",lat:42.708678,long:19.37439,code:"ME"},{name:"Montserrat",lat:16.742498,long:-62.187366,code:"MS"},{name:"Morocco",lat:31.791702,long:-7.09262,code:"MA"},{name:"Mozambique",lat:-18.665695,long:35.529562,code:"MZ"},{name:"Myanmar",lat:21.913965,long:95.956223,code:"MM"},{name:"Burma",lat:22,long:98,code:"BU"},{name:"Namibia",lat:-22.95764,long:18.49041,code:"NA"},{name:"Nauru",lat:-.522778,long:166.931503,code:"NR"},{name:"Nepal",lat:28.394857,long:84.124008,code:"NP"},{name:"Netherlands",lat:52.132633,long:5.291266,code:"NL"},{name:"Netherlands Antilles",lat:12.226079,long:-69.060087,code:"AN"},{name:"New Caledonia",lat:-20.904305,long:165.618042,code:"NC"},{name:"New Zealand",lat:-40.900557,long:174.885971,code:"NZ"},{name:"Nicaragua",lat:12.865416,long:-85.207229,code:"NI"},{name:"Niger",lat:17.607789,long:8.081666,code:"NE"},{name:"Nigeria",lat:9.081999,long:8.675277,code:"NG"},{name:"Niue",lat:-19.054445,long:-169.867233,code:"NU"},{name:"Norfolk Island",lat:-29.040835,long:167.954712,code:"NF"},{name:"Northern Mariana Islands",lat:17.33083,long:145.38469,code:"MP"},{name:"Norway",lat:60.472024,long:8.468946,code:"NO"},{name:"Oman",lat:21.512583,long:55.923255,code:"OM"},{name:"Pakistan",lat:30.375321,long:69.345116,code:"PK"},{name:"Palau",lat:7.51498,long:134.58252,code:"PW"},{name:"Palestine",lat:31.952162,long:35.233154,code:"PS"},{name:"Panama",lat:8.537981,long:-80.782127,code:"PA"},{name:"Papua New Guinea",lat:-6.314993,long:143.95555,code:"PG"},{name:"Paraguay",lat:-23.442503,long:-58.443832,code:"PY"},{name:"Peru",lat:-9.189967,long:-75.015152,code:"PE"},{name:"Philippines",lat:12.879721,long:121.774017,code:"PH"},{name:"Pitcairn",lat:-24.703615,long:-127.439308,code:"PN"},{name:"Poland",lat:51.919438,long:19.145136,code:"PL"},{name:"Portugal",lat:39.399872,long:-8.224454,code:"PT"},{name:"Puerto Rico",lat:18.220833,long:-66.590149,code:"PR"},{name:"Qatar",lat:25.354826,long:51.183884,code:"QA"},{name:"Réunion",lat:-21.115141,long:55.536384,code:"RE"},{name:"Romania",lat:45.943161,long:24.96676,code:"RO"},{name:"Russia",lat:61.52401,long:105.318756,code:"RU"},{name:"Rwanda",lat:-1.940278,long:29.873888,code:"RW"},{name:"St. Barth",lat:17.89,long:-62.82,code:"BL"},{name:"Saint Helena",lat:-24.143474,long:-10.030696,code:"SH"},{name:"Saint Kitts and Nevis",lat:17.357822,long:-62.782998,code:"KN"},{name:"Saint Lucia",lat:13.909444,long:-60.978893,code:"LC"},{name:"Saint Pierre Miquelon",lat:46.941936,long:-56.27111,code:"PM"},{name:"Saint Martin",lat:18.11,long:-63.03,code:"MF"},{name:"Sint Maarten",lat:18.02,long:-63.06,code:"SX"},{name:"Saint Vincent and the Grenadines",lat:12.984305,long:-61.287228,code:"VC"},{name:"Samoa",lat:-13.759029,long:-172.104629,code:"WS"},{name:"San Marino",lat:43.94236,long:12.457777,code:"SM"},{name:"Sao Tome and Principe",lat:.18636,long:6.613081,code:"ST"},{name:"Saudi Arabia",lat:23.885942,long:45.079162,code:"SA"},{name:"Senegal",lat:14.497401,long:-14.452362,code:"SN"},{name:"Serbia",lat:44.016521,long:21.005859,code:"RS"},{name:"Seychelles",lat:-4.679574,long:55.491977,code:"SC"},{name:"Sierra Leone",lat:8.460555,long:-11.779889,code:"SL"},{name:"Singapore",lat:1.352083,long:103.819836,code:"SG"},{name:"Slovakia",lat:48.669026,long:19.699024,code:"SK"},{name:"Slovenia",lat:46.151241,long:14.995463,code:"SI"},{name:"Solomon Islands",lat:-9.64571,long:160.156194,code:"SB"},{name:"Somalia",lat:5.152149,long:46.199616,code:"SO"},{name:"South Africa",lat:-30.559482,long:22.937506,code:"ZA"},{name:"South Georgia and the South Sandwich Islands",lat:-54.429579,long:-36.587909,code:"GS"},{name:"South Sudan",lat:6.8769,long:31.3069,code:"SS"},{name:"Spain",lat:40.463667,long:-3.74922,code:"ES"},{name:"Sri Lanka",lat:7.873054,long:80.771797,code:"LK"},{name:"Sudan",lat:12.862807,long:30.217636,code:"SD"},{name:"Suriname",lat:3.919305,long:-56.027783,code:"SR"},{name:"Svalbard and Jan Mayen",lat:77.553604,long:23.670272,code:"SJ"},{name:"Swaziland",lat:-26.522503,long:31.465866,code:"SZ"},{name:"Sweden",lat:60.128161,long:18.643501,code:"SE"},{name:"Switzerland",lat:46.818188,long:8.227512,code:"CH"},{name:"Syrian Arab Republic",lat:34.802075,long:38.996815,code:"SY"},{name:"Taiwan",lat:23.69781,long:120.960515,code:"TW"},{name:"Tajikistan",lat:38.861034,long:71.276093,code:"TJ"},{name:"Tanzania",lat:-6.369028,long:34.888822,code:"TZ"},{name:"Thailand",lat:15.870032,long:100.992541,code:"TH"},{name:"Timor-Leste",lat:-8.874217,long:125.727539,code:"TL"},{name:"Togo",lat:8.619543,long:.824782,code:"TG"},{name:"Tokelau",lat:-8.967363,long:-171.855881,code:"TK"},{name:"Tonga",lat:-21.178986,long:-175.198242,code:"TO"},{name:"Trinidad and Tobago",lat:10.691803,long:-61.222503,code:"TT"},{name:"Tunisia",lat:33.886917,long:9.537499,code:"TN"},{name:"Turkey",lat:38.963745,long:35.243322,code:"TR"},{name:"Turkmenistan",lat:38.969719,long:59.556278,code:"TM"},{name:"Turks and Caicos Islands",lat:21.694025,long:-71.797928,code:"TC"},{name:"Tuvalu",lat:-7.109535,long:177.64933,code:"TV"},{name:"Uganda",lat:1.373333,long:32.290275,code:"UG"},{name:"Ukraine",lat:48.379433,long:31.16558,code:"UA"},{name:"UAE",lat:23.424076,long:53.847818,code:"AE"},{name:"UK",lat:55.378051,long:-3.435973,code:"GB"},{name:"USA",lat:37.09024,long:-95.712891,code:"US"},{name:"United States Minor Outlying Islands",lat:0,long:0,code:"UM"},{name:"Uruguay",lat:-32.522779,long:-55.765835,code:"UY"},{name:"Uzbekistan",lat:41.377491,long:64.585262,code:"UZ"},{name:"Vanuatu",lat:-15.376706,long:166.959158,code:"VU"},{name:"Venezuela",lat:6.42375,long:-66.58973,code:"VE"},{name:"Vietnam",lat:14.058324,long:108.277199,code:"VN"},{name:"British Virgin Islands",lat:18.420695,long:-64.639968,code:"VG"},{name:"U.S. Virgin Islands",lat:18.335765,long:-64.896335,code:"VI"},{name:"Wallis and Futuna",lat:-13.768752,long:-177.156097,code:"WF"},{name:"Western Sahara",lat:24.215527,long:-12.885834,code:"EH"},{name:"Yemen",lat:15.552727,long:48.516388,code:"YE"},{name:"Zambia",lat:-13.133897,long:27.849332,code:"ZM"},{name:"Zimbabwe",lat:-19.015438,long:29.154857,code:"ZW"}];function getCountryByCode(e){return COUNTRIES.find(n=>n.code===e)}dayjs.extend(relativeTime);dayjs.extend(timezone);dayjs.extend(utc);function getLocalDatetime(e){return dayjs(e).local().format("YYYY-MM-DD HH:mm:ss")}function getHumanizedRelativeTime(e){return dayjs(e).local().fromNow()}function getGCSByCountryCode(e){const t=getCountryByCode(e);if(t!==void 0)return{lat:t.lat,long:t.long}}function getGCSByIPInfo(e){if(e.loc!==void 0){const t=e.loc.split(",");if(t.length===2){const n=t[0],r=t[1];return{lat:parseFloat(n),long:parseFloat(r)}}}return getGCSByCountryCode(e.countryCode)}function normalizeQueryParam(e){if(e!=null)return typeof e=="string"?e:e.toString()}const _sfc_main$B=defineComponent({name:"AlertItem",components:{Artifacts,Tags:Tags$1},props:{alert:{type:Object,required:!0}},setup(e,t){const n=S=>{t.emit("update-tag",S)},r=generateDeleteAlertTask();return{updateTag:n,deleteAlert:async()=>{window.confirm(`Are you sure you want to delete ${e.alert.id}?`)&&(await r.perform(e.alert.id),t.emit("refresh-page"))},getLocalDatetime,getHumanizedRelativeTime}}}),_hoisted_1$p={class:"box"},_hoisted_2$g={class:"table is-fullwidth is-completely-borderless"},_hoisted_3$e=createBaseVNode("th",null,"ID",-1),_hoisted_4$d=createBaseVNode("span",null,"Delete",-1),_hoisted_5$c={class:"icon is-small"},_hoisted_6$b=createBaseVNode("th",null,"Rule",-1),_hoisted_7$b=createBaseVNode("th",null,"Artifacts",-1),_hoisted_8$b={key:0},_hoisted_9$9=createBaseVNode("th",null,"Tags",-1),_hoisted_10$8={class:"help"};function _sfc_render$B(e,t,n,r,A,S){const E=resolveComponent("font-awesome-icon"),T=resolveComponent("router-link"),c=resolveComponent("Artifacts"),C=resolveComponent("Tags");return openBlock(),createElementBlock("div",_hoisted_1$p,[createBaseVNode("table",_hoisted_2$g,[createBaseVNode("tr",null,[_hoisted_3$e,createBaseVNode("td",null,[createTextVNode(toDisplayString(e.alert.id)+" ",1),createBaseVNode("button",{class:"button is-light is-small is-pulled-right",onClick:t[0]||(t[0]=(...o)=>e.deleteAlert&&e.deleteAlert(...o))},[_hoisted_4$d,createBaseVNode("span",_hoisted_5$c,[createVNode(E,{icon:"times"})])])])]),createBaseVNode("tr",null,[_hoisted_6$b,createBaseVNode("td",null,[createVNode(T,{to:{name:"Rule",params:{id:e.alert.ruleId}}},{default:withCtx(()=>[createTextVNode(toDisplayString(e.alert.ruleId),1)]),_:1},8,["to"])])]),createBaseVNode("tr",null,[_hoisted_7$b,createBaseVNode("td",null,[createVNode(c,{artifacts:e.alert.artifacts},null,8,["artifacts"])])]),e.alert.tags.length>0?(openBlock(),createElementBlock("tr",_hoisted_8$b,[_hoisted_9$9,createBaseVNode("td",null,[createVNode(C,{tags:e.alert.tags,onUpdateTag:e.updateTag},null,8,["tags","onUpdateTag"])])])):createCommentVNode("",!0)]),createBaseVNode("p",_hoisted_10$8,"Created at: "+toDisplayString(e.alert.createdAt),1)])}const Alert=_export_sfc(_sfc_main$B,[["render",_sfc_render$B]]);var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e};const _cache=new WeakMap;function useRouteQuery(e,t,n={}){const{mode:r="replace",route:A=useRoute(),router:S=useRouter(),transform:E=o=>o}=n;_cache.has(A)||_cache.set(A,new Map);const T=_cache.get(A);tryOnScopeDispose(()=>{T.delete(e)}),T.set(e,A.query[e]);let c;const C=customRef((o,a)=>(c=a,{get(){o();const $=T.get(e);return E($!==void 0?$:toValue(t))},set($){T.get(e)!==$&&(T.set(e,$),a(),nextTick(()=>{const{params:l,query:f,hash:R}=A;S[toValue(r)]({params:l,query:__spreadValues(__spreadValues({},f),Object.fromEntries(T.entries())),hash:R})}))}}));return watch(()=>A.query[e],o=>{T.set(e,o),c()},{flush:"sync"}),C}const _sfc_main$A=defineComponent({name:"AlertsPagination",props:{currentPage:{type:Number,required:!0},pageSize:{type:Number,required:!0},total:{type:Number,required:!0}},emits:["update-page"],setup(e,t){const n=useRoute(),r=useRouter(),A={route:n,router:r},S=computed(()=>Math.ceil(e.total/e.pageSize)),E=computed(()=>S.value===1),T=computed(()=>e.currentPage>1),c=computed(()=>e.currentPage-1!==1),C=computed(()=>e.currentPagee.currentPage+1!==S.value),a=$=>{const l=useRouteQuery("page",$.toString(),A);l.value=$.toString(),t.emit("update-page",$)};return onMounted(()=>{const $=useRouteQuery("page",null,A);$.value&&parseInt($.value)!==e.currentPage&&a(parseInt($.value))}),{updatePage:a,hasNextPage:C,hasOnlyOnePage:E,hasPreviousPage:T,isNextPageNotLast:o,isPreviousPageNotFirst:c,totalPageCount:S}}}),_hoisted_1$o={key:0,class:"message is-warning"},_hoisted_2$f=createBaseVNode("div",{class:"message-body"},"There is no result to show.",-1),_hoisted_3$d=[_hoisted_2$f],_hoisted_4$c={key:1,class:"pagination",role:"navigation","aria-label":"pagination"},_hoisted_5$b={key:0,class:"pagination-list"},_hoisted_6$a={key:1,class:"pagination-list"},_hoisted_7$a={key:0},_hoisted_8$a={key:1},_hoisted_9$8=createBaseVNode("span",{class:"pagination-ellipsis"},"…",-1),_hoisted_10$7=[_hoisted_9$8],_hoisted_11$6={key:2},_hoisted_12$6={key:3},_hoisted_13$5={key:4},_hoisted_14$5=createBaseVNode("span",{class:"pagination-ellipsis"},"…",-1),_hoisted_15$5=[_hoisted_14$5],_hoisted_16$5={key:5};function _sfc_render$A(e,t,n,r,A,S){return e.total===0?(openBlock(),createElementBlock("article",_hoisted_1$o,_hoisted_3$d)):(openBlock(),createElementBlock("nav",_hoisted_4$c,[e.hasOnlyOnePage?(openBlock(),createElementBlock("ul",_hoisted_5$b,[createBaseVNode("li",null,[createBaseVNode("a",{class:"pagination-link mt-2 is-current",onClick:t[0]||(t[0]=E=>e.updatePage(1))},"1")])])):(openBlock(),createElementBlock("ul",_hoisted_6$a,[e.hasPreviousPage&&e.isPreviousPageNotFirst?(openBlock(),createElementBlock("li",_hoisted_7$a,[createBaseVNode("a",{class:"pagination-link mt-2",onClick:t[1]||(t[1]=E=>e.updatePage(1))}," 1")])):createCommentVNode("",!0),e.hasPreviousPage&&e.isPreviousPageNotFirst?(openBlock(),createElementBlock("li",_hoisted_8$a,_hoisted_10$7)):createCommentVNode("",!0),e.hasPreviousPage?(openBlock(),createElementBlock("li",_hoisted_11$6,[createBaseVNode("a",{class:"pagination-link mt-2",onClick:t[2]||(t[2]=E=>e.updatePage(e.currentPage-1))},toDisplayString(e.currentPage-1),1)])):createCommentVNode("",!0),createBaseVNode("li",null,[createBaseVNode("a",{class:"pagination-link mt-2 is-current",onClick:t[3]||(t[3]=E=>e.updatePage(e.currentPage))},toDisplayString(e.currentPage),1)]),e.hasNextPage?(openBlock(),createElementBlock("li",_hoisted_12$6,[createBaseVNode("a",{class:"pagination-link mt-2",onClick:t[4]||(t[4]=E=>e.updatePage(e.currentPage+1))},toDisplayString(e.currentPage+1),1)])):createCommentVNode("",!0),e.hasNextPage&&e.isNextPageNotLast?(openBlock(),createElementBlock("li",_hoisted_13$5,_hoisted_15$5)):createCommentVNode("",!0),e.hasNextPage&&e.isNextPageNotLast?(openBlock(),createElementBlock("li",_hoisted_16$5,[createBaseVNode("a",{class:"pagination-link mt-2",onClick:t[5]||(t[5]=E=>e.updatePage(e.totalPageCount))},toDisplayString(e.totalPageCount),1)])):createCommentVNode("",!0)]))]))}const Pagination=_export_sfc(_sfc_main$A,[["render",_sfc_render$A]]),_sfc_main$z=defineComponent({name:"AlertsItem",components:{Alert,Pagination},props:{alerts:{type:Object,required:!0}},emits:["update-page","refresh-page","update-tag"],setup(e,t){const n=()=>{window.scrollTo({top:0})};return{updatePage:E=>{n(),t.emit("update-page",E)},updateTag:E=>{n(),t.emit("update-tag",E)},refreshPage:()=>{n(),t.emit("refresh-page")}}}}),_hoisted_1$n={class:"help"};function _sfc_render$z(e,t,n,r,A,S){const E=resolveComponent("Alert"),T=resolveComponent("Pagination");return openBlock(),createElementBlock(Fragment,null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.alerts.alerts,(c,C)=>(openBlock(),createBlock(E,{alert:c,key:C,onRefreshPage:e.refreshPage,onUpdateTag:e.updateTag},null,8,["alert","onRefreshPage","onUpdateTag"]))),128)),createVNode(T,{total:e.alerts.total,currentPage:e.alerts.currentPage,pageSize:e.alerts.pageSize,onUpdatePage:e.updatePage},null,8,["total","currentPage","pageSize","onUpdatePage"]),createBaseVNode("p",_hoisted_1$n,"("+toDisplayString(e.alerts.total)+" results in total, "+toDisplayString(e.alerts.alerts.length)+" shown)",1)],64)}const Alerts$3=_export_sfc(_sfc_main$z,[["render",_sfc_render$z]]),_sfc_main$y=defineComponent({name:"AlertsForm",props:{tags:{type:Array,required:!0},ruleSet:{type:Array,required:!0},page:{type:Number,required:!0},tag:{type:String,required:!1}},setup(e){const t=useRoute(),n=ref(void 0),r=ref(void 0),A=toRef$1(e,"tag"),S=ref(void 0),E=ref(void 0),T=ref(void 0),c=ref(void 0),C=ref(void 0),o=()=>{const $=t.query.asn,l=normalizeQueryParam($);T.value=l===void 0?void 0:parseInt(l);const f=t.query.dnsRecord;c.value=normalizeQueryParam(f);const R=t.query.reverseDnsName;C.value=normalizeQueryParam(R);const x=t.query.tag;A.value===void 0&&(A.value=normalizeQueryParam(x))},a=()=>(o(),{artifact:n.value===""?void 0:n.value,page:e.page,ruleId:S.value===""?void 0:S.value,tag:A.value===""?void 0:A.value,toAt:E.value===""?void 0:E.value,fromAt:r.value===""?void 0:r.value});return watch(()=>e.tag,()=>{A.value=e.tag}),{artifact:n,fromAt:r,getSearchParams:a,ruleId:S,toAt:E,tagInput:A}}}),_hoisted_1$m={class:"columns"},_hoisted_2$e={class:"column"},_hoisted_3$c={class:"field is-horizontal"},_hoisted_4$b=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"Rule")],-1),_hoisted_5$a={class:"field-body"},_hoisted_6$9={class:"field"},_hoisted_7$9={class:"control"},_hoisted_8$9={class:"select"},_hoisted_9$7=createBaseVNode("option",null,null,-1),_hoisted_10$6={class:"column"},_hoisted_11$5={class:"field is-horizontal"},_hoisted_12$5=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"Artifact")],-1),_hoisted_13$4={class:"field-body"},_hoisted_14$4={class:"field"},_hoisted_15$4={class:"control"},_hoisted_16$4={class:"columns"},_hoisted_17$4={class:"column"},_hoisted_18$2={class:"field is-horizontal"},_hoisted_19$2=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"Tag")],-1),_hoisted_20$2={class:"field-body"},_hoisted_21$2={class:"field"},_hoisted_22$2={class:"control"},_hoisted_23$2={class:"select"},_hoisted_24$2=createBaseVNode("option",null,null,-1),_hoisted_25$2=createBaseVNode("div",{class:"column"},null,-1),_hoisted_26$2={class:"columns"},_hoisted_27$2={class:"column"},_hoisted_28$2={class:"field is-horizontal"},_hoisted_29$2=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"From")],-1),_hoisted_30$2={class:"field-body"},_hoisted_31$2={class:"field"},_hoisted_32$2={class:"control"},_hoisted_33$2={class:"column"},_hoisted_34$2={class:"field is-horizontal"},_hoisted_35$2=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"To")],-1),_hoisted_36$2={class:"field-body"},_hoisted_37$1={class:"field"},_hoisted_38$1={class:"control"};function _sfc_render$y(e,t,n,r,A,S){return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$m,[createBaseVNode("div",_hoisted_2$e,[createBaseVNode("div",_hoisted_3$c,[_hoisted_4$b,createBaseVNode("div",_hoisted_5$a,[createBaseVNode("div",_hoisted_6$9,[createBaseVNode("div",_hoisted_7$9,[createBaseVNode("div",_hoisted_8$9,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":t[0]||(t[0]=E=>e.ruleId=E)},[_hoisted_9$7,(openBlock(!0),createElementBlock(Fragment,null,renderList(e.ruleSet,E=>(openBlock(),createElementBlock("option",{key:E},toDisplayString(E),1))),128))],512),[[vModelSelect,e.ruleId]])])])])])])]),createBaseVNode("div",_hoisted_10$6,[createBaseVNode("div",_hoisted_11$5,[_hoisted_12$5,createBaseVNode("div",_hoisted_13$4,[createBaseVNode("div",_hoisted_14$4,[createBaseVNode("p",_hoisted_15$4,[withDirectives(createBaseVNode("input",{class:"input",type:"text","onUpdate:modelValue":t[1]||(t[1]=E=>e.artifact=E)},null,512),[[vModelText,e.artifact]])])])])])])]),createBaseVNode("div",_hoisted_16$4,[createBaseVNode("div",_hoisted_17$4,[createBaseVNode("div",_hoisted_18$2,[_hoisted_19$2,createBaseVNode("div",_hoisted_20$2,[createBaseVNode("div",_hoisted_21$2,[createBaseVNode("div",_hoisted_22$2,[createBaseVNode("div",_hoisted_23$2,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":t[2]||(t[2]=E=>e.tagInput=E)},[_hoisted_24$2,(openBlock(!0),createElementBlock(Fragment,null,renderList(e.tags,E=>(openBlock(),createElementBlock("option",{key:E},toDisplayString(E),1))),128))],512),[[vModelSelect,e.tagInput]])])])])])])]),_hoisted_25$2]),createBaseVNode("div",_hoisted_26$2,[createBaseVNode("div",_hoisted_27$2,[createBaseVNode("div",_hoisted_28$2,[_hoisted_29$2,createBaseVNode("div",_hoisted_30$2,[createBaseVNode("div",_hoisted_31$2,[createBaseVNode("p",_hoisted_32$2,[withDirectives(createBaseVNode("input",{class:"input",type:"date","onUpdate:modelValue":t[3]||(t[3]=E=>e.fromAt=E)},null,512),[[vModelText,e.fromAt]])])])])])]),createBaseVNode("div",_hoisted_33$2,[createBaseVNode("div",_hoisted_34$2,[_hoisted_35$2,createBaseVNode("div",_hoisted_36$2,[createBaseVNode("div",_hoisted_37$1,[createBaseVNode("p",_hoisted_38$1,[withDirectives(createBaseVNode("input",{class:"input",type:"date","onUpdate:modelValue":t[4]||(t[4]=E=>e.toAt=E)},null,512),[[vModelText,e.toAt]])])])])])])])],64)}const FormComponent$1=_export_sfc(_sfc_main$y,[["render",_sfc_render$y]]),styles="";var vueJsonPretty={exports:{}};const require$$0=getAugmentedNamespace(vue_runtime_esmBundler);(function(e,t){(function(n,r){e.exports=r(require$$0)})(commonjsGlobal,function(n){return function(){var r={789:function(T){T.exports=n}},A={};function S(T){var c=A[T];if(c!==void 0)return c.exports;var C=A[T]={exports:{}};return r[T](C,C.exports,S),C.exports}S.d=function(T,c){for(var C in c)S.o(c,C)&&!S.o(T,C)&&Object.defineProperty(T,C,{enumerable:!0,get:c[C]})},S.o=function(T,c){return Object.prototype.hasOwnProperty.call(T,c)},S.r=function(T){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})};var E={};return function(){function T(I,Y){(Y==null||Y>I.length)&&(Y=I.length);for(var H=0,N=new Array(Y);H1&&arguments[1]!==void 0?arguments[1]:"root",H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,N=arguments.length>3?arguments[3]:void 0,W=N||{},G=W.key,Z=W.index,J=W.type,Q=J===void 0?"content":J,ne=W.showComma,re=ne!==void 0&&ne,ue=W.length,oe=ue===void 0?1:ue,ie=x(I);if(ie==="array"){var fe=M(I.map(function(de,ce,le){return L(de,"".concat(Y,"[").concat(ce,"]"),H+1,{index:ce,showComma:ce!==le.length-1,length:oe,type:Q})}));return[L("[",Y,H,{showComma:!1,key:G,length:I.length,type:"arrayStart"})[0]].concat(fe,L("]",Y,H,{showComma:re,length:I.length,type:"arrayEnd"})[0])}if(ie==="object"){var ge=Object.keys(I),se=M(ge.map(function(de,ce,le){return L(I[de],/^[a-zA-Z_]\w*$/.test(de)?"".concat(Y,".").concat(de):"".concat(Y,'["').concat(de,'"]'),H+1,{key:de,showComma:ce!==le.length-1,length:oe,type:Q})}));return[L("{",Y,H,{showComma:!1,key:G,index:Z,length:ge.length,type:"objectStart"})[0]].concat(se,L("}",Y,H,{showComma:re,length:ge.length,type:"objectEnd"})[0])}return[{content:I,level:H,key:G,index:Z,path:Y,showComma:re,length:oe,type:Q}]}function M(I){if(typeof Array.prototype.flat=="function")return I.flat();for(var Y=C(I),H=[];Y.length;){var N=Y.shift();Array.isArray(N)?Y.unshift.apply(Y,C(N)):H.push(N)}return H}function V(I){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(I==null)return I;if(I instanceof Date)return new Date(I);if(I instanceof RegExp)return new RegExp(I);if(R(I)!=="object")return I;if(Y.get(I))return Y.get(I);if(Array.isArray(I)){var H=I.map(function(G){return V(G,Y)});return Y.set(I,H),H}var N={};for(var W in I)N[W]=V(I[W],Y);return Y.set(I,N),N}function D(I,Y){var H=Object.keys(I);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(I);Y&&(N=N.filter(function(W){return Object.getOwnPropertyDescriptor(I,W).enumerable})),H.push.apply(H,N)}return H}function F(I){for(var Y=1;Y=le,he=(te=I.pathCollapsible)===null||te===void 0?void 0:te.call(I,ee);return ee.type!=="objectStart"&&ee.type!=="arrayStart"||!ae&&!he?ve:z(z({},ve),{},o({},ee.path,1))},{})},J=(0,a.reactive)({translateY:0,visibleData:null,hiddenPaths:Z(I.deep)}),Q=(0,a.computed)(function(){for(var le=null,ve=[],ee=G.value.length,te=0;tele.length?le.length-ee:ae;he<0&&(he=0);var me=he+ee;J.translateY=he*I.itemHeight,J.visibleData=le.filter(function(ye,$e){return $e>=he&&$e{var l;const $=(l=n.value)==null?void 0:l.getSearchParams();return await r.perform($)},T=$=>{e.value=$},c=()=>{e.value=1},C=async()=>{c(),await E()},o=$=>{t.value===$?t.value=void 0:t.value=$,nextTick(async()=>await C())},a=async()=>{await C()};return onMounted(async()=>{A.perform(),S.perform(),await E()}),watch([e,t],async()=>{nextTick(async()=>await E())}),{getAlertsTask:r,getRuleSetTask:S,getTagsTask:A,refreshPage:a,search:C,tag:t,updatePage:T,updateTag:o,form:n,page:e}}}),_hoisted_1$j={class:"box mb-6"},_hoisted_2$b=createBaseVNode("hr",null,null,-1),_hoisted_3$a={class:"columns"},_hoisted_4$9={class:"column"},_hoisted_5$8={class:"field is-grouped is-grouped-centered"},_hoisted_6$8={class:"control"},_hoisted_7$8={class:"icon is-small"},_hoisted_8$8=createBaseVNode("span",null,"Search",-1),_hoisted_9$6={key:0},_hoisted_10$5=createBaseVNode("hr",null,null,-1);function _sfc_render$v(e,t,n,r,A,S){var a,$,l,f;const E=resolveComponent("FormComponent"),T=resolveComponent("font-awesome-icon"),c=resolveComponent("Loading"),C=resolveComponent("ErrorMessage"),o=resolveComponent("AlertsComponent");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$j,[createVNode(E,{ref:"form",ruleSet:((a=e.getRuleSetTask.last)==null?void 0:a.value)||[],tags:(($=e.getTagsTask.last)==null?void 0:$.value)||[],page:e.page,tag:e.tag},null,8,["ruleSet","tags","page","tag"]),_hoisted_2$b,createBaseVNode("div",_hoisted_3$a,[createBaseVNode("div",_hoisted_4$9,[createBaseVNode("div",_hoisted_5$8,[createBaseVNode("p",_hoisted_6$8,[createBaseVNode("a",{class:"button is-primary",onClick:t[0]||(t[0]=(...R)=>e.search&&e.search(...R))},[createBaseVNode("span",_hoisted_7$8,[createVNode(T,{icon:"search"})]),_hoisted_8$8])])])])])]),e.getAlertsTask.performCount>0?(openBlock(),createElementBlock("div",_hoisted_9$6,[_hoisted_10$5,e.getAlertsTask.isRunning?(openBlock(),createBlock(c,{key:0})):createCommentVNode("",!0),e.getAlertsTask.isError?(openBlock(),createBlock(C,{key:1,error:(l=e.getAlertsTask.last)==null?void 0:l.error},null,8,["error"])):createCommentVNode("",!0),(f=e.getAlertsTask.last)!=null&&f.value?(openBlock(),createBlock(o,{key:2,alerts:e.getAlertsTask.last.value,onRefreshPage:e.refreshPage,onUpdatePage:e.updatePage,onUpdateTag:e.updateTag},null,8,["alerts","onRefreshPage","onUpdatePage","onUpdateTag"])):createCommentVNode("",!0)])):createCommentVNode("",!0)],64)}const Alerts$2=_export_sfc(_sfc_main$v,[["render",_sfc_render$v]]),_sfc_main$u=defineComponent({name:"AlertsView",components:{Alerts:Alerts$2},setup(){useTitle("Alerts - Mihari")}});function _sfc_render$u(e,t,n,r,A,S){const E=resolveComponent("Alerts",!0);return openBlock(),createBlock(E)}const Alerts$1=_export_sfc(_sfc_main$u,[["render",_sfc_render$u]]),_sfc_main$t=defineComponent({name:"AlertsWithPagination",props:{ruleId:{type:String},artifact:{type:String}},components:{Alerts:Alerts$3,Loading},setup(e){const t=ref(1),n=ref(void 0),r=generateGetAlertsTask(),A=async()=>{const C={artifact:e.artifact,page:t.value,ruleId:e.ruleId,tag:n.value,toAt:void 0,fromAt:void 0};return await r.perform(C)},S=C=>{t.value=C},E=()=>{t.value=1},T=async()=>{E(),await A()},c=C=>{n.value===C?n.value=void 0:n.value=C};return onMounted(async()=>{await A()}),watch([e,t,n],async()=>{nextTick(async()=>await A())}),{getAlertsTask:r,refreshPage:T,updatePage:S,updateTag:c}}});function _sfc_render$t(e,t,n,r,A,S){var c;const E=resolveComponent("Loading"),T=resolveComponent("Alerts");return openBlock(),createElementBlock(Fragment,null,[e.getAlertsTask.isRunning?(openBlock(),createBlock(E,{key:0})):createCommentVNode("",!0),(c=e.getAlertsTask.last)!=null&&c.value?(openBlock(),createBlock(T,{key:1,alerts:e.getAlertsTask.last.value,onRefreshPage:e.refreshPage,onUpdatePage:e.updatePage,onUpdateTag:e.updateTag},null,8,["alerts","onRefreshPage","onUpdatePage","onUpdateTag"])):createCommentVNode("",!0)],64)}const Alerts=_export_sfc(_sfc_main$t,[["render",_sfc_render$t]]),_sfc_main$s=defineComponent({name:"AS",props:{autonomousSystem:{type:Object,required:!0}}}),_hoisted_1$i={class:"tags are-medium"};function _sfc_render$s(e,t,n,r,A,S){const E=resolveComponent("router-link");return openBlock(),createElementBlock("div",_hoisted_1$i,[createVNode(E,{class:"tag",to:{name:"Alerts",query:{asn:e.autonomousSystem.asn}}},{default:withCtx(()=>[createTextVNode(toDisplayString(e.autonomousSystem.asn),1)]),_:1},8,["to"])])}const AS=_export_sfc(_sfc_main$s,[["render",_sfc_render$s]]),_sfc_main$r=defineComponent({name:"CPEsItem",props:{cpes:{type:Array,required:!0}}}),_hoisted_1$h={class:"tags are-medium"};function _sfc_render$r(e,t,n,r,A,S){return openBlock(),createElementBlock("div",_hoisted_1$h,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.cpes,E=>(openBlock(),createElementBlock("span",{class:"tag",key:E.cpe},toDisplayString(E.cpe),1))),128))])}const CPEs=_export_sfc(_sfc_main$r,[["render",_sfc_render$r]]);var truncate$1={exports:{}};(function(e){(function(t,n){var r="…",A=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function S(T,c,C){return C.length===T.length||!c.ellipsis||(C+=c.ellipsis),C}function E(T,c,C){var o="",a=!0,$=c,l,f;if(C=C||{},C.ellipsis=typeof C.ellipsis>"u"?r:C.ellipsis,!T||T.length===0)return"";for(a=!0;a;){if(A.lastIndex=o.length,a=A.exec(T),!a||a.index-o.length>=$||A.lastIndex>=c+3e3)return o+=T.substring(o.length,c),S(T,C,o);if(l=a[0],f=a.index,o+=T.substring(o.length,f+l.length),$-=f+l.length,$<=0)break}return S(T,C,o)}e.exports?e.exports=E:t.truncate=E})(String)})(truncate$1);var truncateExports=truncate$1.exports;const truncate=getDefaultExportFromCjs(truncateExports),_sfc_main$q=defineComponent({name:"DnsRecords",props:{dnsRecords:{type:Array,required:!0}},setup(){return{truncate}}}),_hoisted_1$g={class:"field is-grouped is-grouped-multiline"},_hoisted_2$a={class:"tags has-addons are-medium"},_hoisted_3$9={class:"tag is-dark"};function _sfc_render$q(e,t,n,r,A,S){const E=resolveComponent("router-link");return openBlock(),createElementBlock("div",_hoisted_1$g,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.dnsRecords,(T,c)=>(openBlock(),createElementBlock("div",{class:"control",key:c},[createBaseVNode("div",_hoisted_2$a,[createBaseVNode("span",_hoisted_3$9,toDisplayString(T.resource),1),createVNode(E,{class:"tag",to:{name:"Alerts",query:{dnsRecord:T.value}}},{default:withCtx(()=>[createTextVNode(toDisplayString(e.truncate(T.value,50)),1)]),_:2},1032,["to"])])]))),128))])}const DnsRecords=_export_sfc(_sfc_main$q,[["render",_sfc_render$q]]),_sfc_main$p=defineComponent({name:"PortsItem",props:{ports:{type:Array,required:!0}}}),_hoisted_1$f={class:"tags are-medium"};function _sfc_render$p(e,t,n,r,A,S){return openBlock(),createElementBlock("div",_hoisted_1$f,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.ports,E=>(openBlock(),createElementBlock("span",{class:"tag",key:E.port},toDisplayString(E.port),1))),128))])}const Ports=_export_sfc(_sfc_main$p,[["render",_sfc_render$p]]),_sfc_main$o=defineComponent({name:"ReverseDnsNames",props:{reverseDnsNames:{type:Array,required:!0}}}),_hoisted_1$e={class:"tags are-medium"};function _sfc_render$o(e,t,n,r,A,S){const E=resolveComponent("router-link");return openBlock(),createElementBlock("div",_hoisted_1$e,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.reverseDnsNames,T=>(openBlock(),createBlock(E,{class:"tag",key:T.name,to:{name:"Alerts",query:{reverseDnsName:T.name}}},{default:withCtx(()=>[createTextVNode(toDisplayString(T.name),1)]),_:2},1032,["to"]))),128))])}const ReverseDnsNames=_export_sfc(_sfc_main$o,[["render",_sfc_render$o]]),_sfc_main$n=defineComponent({name:"TagsItem",props:{tags:{type:Array,required:!0}}}),_hoisted_1$d={class:"tags are-medium"};function _sfc_render$n(e,t,n,r,A,S){const E=resolveComponent("router-link");return openBlock(),createElementBlock("div",_hoisted_1$d,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.tags,T=>(openBlock(),createBlock(E,{class:"tag is-info is-light",key:T,to:{name:"Alerts",query:{tag:T}}},{default:withCtx(()=>[createTextVNode(toDisplayString(T),1)]),_:2},1032,["to"]))),128))])}const Tags=_export_sfc(_sfc_main$n,[["render",_sfc_render$n]]),_sfc_main$m=defineComponent({name:"WhoisRecord",props:{whoisRecord:{type:Object,required:!0}}}),_hoisted_1$c={class:"field is-grouped is-grouped-multiline"},_hoisted_2$9={class:"control"},_hoisted_3$8={class:"tags has-addons are-medium"},_hoisted_4$8=createBaseVNode("span",{class:"tag is-dark"},"Registrar",-1),_hoisted_5$7={class:"tag is-light"},_hoisted_6$7={class:"control"},_hoisted_7$7={class:"tags has-addons are-medium"},_hoisted_8$7=createBaseVNode("span",{class:"tag is-dark"},"Created on",-1),_hoisted_9$5={class:"tag is-light"},_hoisted_10$4={class:"control"},_hoisted_11$4={class:"tags has-addons are-medium"},_hoisted_12$4=createBaseVNode("span",{class:"tag is-dark"},"Updated on",-1),_hoisted_13$3={class:"tag is-light"},_hoisted_14$3={class:"control"},_hoisted_15$3={class:"tags has-addons are-medium"},_hoisted_16$3=createBaseVNode("span",{class:"tag is-dark"},"Exipres on",-1),_hoisted_17$3={class:"tag is-light"};function _sfc_render$m(e,t,n,r,A,S){var E;return openBlock(),createElementBlock("div",_hoisted_1$c,[createBaseVNode("div",_hoisted_2$9,[createBaseVNode("div",_hoisted_3$8,[_hoisted_4$8,createBaseVNode("span",_hoisted_5$7,toDisplayString(((E=e.whoisRecord.registrar)==null?void 0:E.name)||"N/A"),1)])]),createBaseVNode("div",_hoisted_6$7,[createBaseVNode("div",_hoisted_7$7,[_hoisted_8$7,createBaseVNode("span",_hoisted_9$5,toDisplayString(e.whoisRecord.createdOn||"N/A"),1)])]),createBaseVNode("div",_hoisted_10$4,[createBaseVNode("div",_hoisted_11$4,[_hoisted_12$4,createBaseVNode("span",_hoisted_13$3,toDisplayString(e.whoisRecord.updatedOn||"N/A"),1)])]),createBaseVNode("div",_hoisted_14$3,[createBaseVNode("div",_hoisted_15$3,[_hoisted_16$3,createBaseVNode("span",_hoisted_17$3,toDisplayString(e.whoisRecord.expiresOn||"N/A"),1)])])])}const WhoisRecord=_export_sfc(_sfc_main$m,[["render",_sfc_render$m]]),_sfc_main$l=defineComponent({name:"LinkItem",props:{data:{type:String,required:!0},link:{type:Object,required:!0}}}),Link_vue_vue_type_style_index_0_scoped_66270500_lang="",_hoisted_1$b=["href"],_hoisted_2$8=["src"];function _sfc_render$l(e,t,n,r,A,S){return openBlock(),createElementBlock("a",{href:e.link.href(e.data),class:"tag is-white",target:"_blank"},[createBaseVNode("img",{src:e.link.favicon(),alt:"favicon"},null,8,_hoisted_2$8),createBaseVNode("span",null,toDisplayString(e.link.name),1)],8,_hoisted_1$b)}const LinkComponent=_export_sfc(_sfc_main$l,[["render",_sfc_render$l],["__scopeId","data-v-66270500"]]);class BaseLink{constructor(){Me(this,"baseURL");this.baseURL="https://example.com"}favicon(){return"https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url="+this.baseURL}}class AnyRun extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://app.any.run",this.name="ANY.RUN",this.type="hash"}href(n){return this.baseURL+`/submissions/#filehash:${n}`}}class Censys extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://search.censys.io",this.name="Censys",this.type="ip"}href(n){return this.baseURL+`/hosts/${n}`}}class Crtsh extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://crt.sh",this.name="crt.sh",this.type="domain"}href(n){return this.baseURL+`/?q=${n}`}}class DNSlyticsForIP extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://dnslytics.com",this.name="DNSlytics",this.type="ip"}href(n){return this.baseURL+`/ip/${n}`}}class DNSlyticsForDomain extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://dnslytics.com",this.name="DNSlytics",this.type="domain"}href(n){return this.baseURL+`/domain/${n}`}}class GreyNoise extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://www.greynoise.io",this.name="GreyNoise",this.type="ip"}href(n){return this.baseURL+`/viz/query?gnql=ip:${n}`}}class Intezer extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://analyze.intezer.com",this.name="Intezer",this.type="hash"}href(n){return this.baseURL+`/#/files/${n}`}}class OtxForIP extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://otx.alienvault.com",this.name="OTX",this.type="ip"}href(n){return this.baseURL+`/indicator/ip/${n}`}}class OtxForDomain extends OtxForIP{constructor(){super();Me(this,"type");this.type="domain"}href(n){return this.baseURL+`/indicator/domain/${n}`}}class SecurityTrails extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://securitytrails.com",this.name="SecurityTrails",this.type="domain"}}class SecurityTrailsForDomain extends SecurityTrails{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/domain/${t}/dns`}}class SecurityTrailsForIP extends SecurityTrails{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/list/ip/${t}`}}class Shodan extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://www.shodan.io",this.name="Shodan",this.type="ip"}href(n){return this.baseURL+`/host/${n}`}}class Urlscan extends BaseLink{constructor(){super();Me(this,"baseURL");Me(this,"name");Me(this,"type");this.baseURL="https://urlscan.io",this.name="urlscan.io",this.type="domain"}}class UrlscanForDomain extends Urlscan{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/domain/${t}`}}class UrlscanForIP extends Urlscan{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/ip/${t}`}}class UrlscanForURL extends Urlscan{constructor(){super(),this.type="url"}href(t){const n=encodeURIComponent(`page.url:"${t}" OR task.url:"${t}"`);return this.baseURL+`/search/#${n}`}}var sha256={exports:{}};/** * [js-sha256]{@link https://github.com/emn178/js-sha256} * * @version 0.9.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2017 * @license MIT */(function(module){(function(){var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=commonjsGlobal:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&!0&&module.exports,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(A){return t.create().update(A)};for(var n=0;n>2]|=e[A]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(T[S>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=T[16],this.start=S-64,this.hash(),this.hashed=!0):this.start=S}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,A=this.h4,S=this.h5,E=this.h6,T=this.h7,c=this.blocks,C,o,a,$,l,f,R,x,L,M,V;for(C=16;C<64;++C)l=c[C-15],o=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3,l=c[C-2],a=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,c[C]=c[C-16]+o+c[C-7]+a<<0;for(V=t&n,C=0;C<64;C+=4)this.first?(this.is224?(x=300032,l=c[0]-1413257819,T=l-150054599<<0,r=l+24177077<<0):(x=704751109,l=c[0]-210244248,T=l-1521486534<<0,r=l+143694565<<0),this.first=!1):(o=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),a=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),x=e&t,$=x^e&n^V,R=A&S^~A&E,l=T+a+R+K[C]+c[C],f=o+$,T=r+l<<0,r=l+f<<0),o=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),a=(T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7),L=r&e,$=L^r&t^x,R=T&A^~T&S,l=E+a+R+K[C+1]+c[C+1],f=o+$,E=n+l<<0,n=l+f<<0,o=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),a=(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7),M=n&r,$=M^n&e^L,R=E&T^~E&A,l=S+a+R+K[C+2]+c[C+2],f=o+$,S=t+l<<0,t=l+f<<0,o=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),a=(S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7),V=t&n,$=V^t&r^M,R=S&E^~S&T,l=A+a+R+K[C+3]+c[C+3],f=o+$,A=e+l<<0,e=l+f<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+A<<0,this.h5=this.h5+S<<0,this.h6=this.h6+E<<0,this.h7=this.h7+T<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,A=this.h4,S=this.h5,E=this.h6,T=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>4&15]+HEX_CHARS[A&15]+HEX_CHARS[S>>28&15]+HEX_CHARS[S>>24&15]+HEX_CHARS[S>>20&15]+HEX_CHARS[S>>16&15]+HEX_CHARS[S>>12&15]+HEX_CHARS[S>>8&15]+HEX_CHARS[S>>4&15]+HEX_CHARS[S&15]+HEX_CHARS[E>>28&15]+HEX_CHARS[E>>24&15]+HEX_CHARS[E>>20&15]+HEX_CHARS[E>>16&15]+HEX_CHARS[E>>12&15]+HEX_CHARS[E>>8&15]+HEX_CHARS[E>>4&15]+HEX_CHARS[E&15];return this.is224||(c+=HEX_CHARS[T>>28&15]+HEX_CHARS[T>>24&15]+HEX_CHARS[T>>20&15]+HEX_CHARS[T>>16&15]+HEX_CHARS[T>>12&15]+HEX_CHARS[T>>8&15]+HEX_CHARS[T>>4&15]+HEX_CHARS[T&15]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,A=this.h4,S=this.h5,E=this.h6,T=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,A>>24&255,A>>16&255,A>>8&255,A&255,S>>24&255,S>>16&255,S>>8&255,S&255,E>>24&255,E>>16&255,E>>8&255,E&255];return this.is224||c.push(T>>24&255,T>>16&255,T>>8&255,T&255),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,n){var r,A=typeof e;if(A==="string"){var S=[],E=e.length,T=0,c;for(r=0;r>6,S[T++]=128|c&63):c<55296||c>=57344?(S[T++]=224|c>>12,S[T++]=128|c>>6&63,S[T++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++r)&1023),S[T++]=240|c>>18,S[T++]=128|c>>12&63,S[T++]=128|c>>6&63,S[T++]=128|c&63);e=S}else if(A==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var C=[],o=[];for(r=0;r<64;++r){var a=e[r]||0;C[r]=92^a,o[r]=54^a}Sha256.call(this,t,n),this.update(o),this.oKeyPad=C,this.inner=!0,this.sharedMemory=n}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224)})()})(sha256);var sha256Exports=sha256.exports,requiresPort=function e(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},querystringify$1={},has=Object.prototype.hasOwnProperty,undef;function decode(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function encode(e){try{return encodeURIComponent(e)}catch{return null}}function querystring(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var A=decode(r[1]),S=decode(r[2]);A===null||S===null||A in n||(n[A]=S)}return n}function querystringify(e,t){t=t||"";var n=[],r,A;typeof t!="string"&&(t="?");for(A in e)if(has.call(e,A)){if(r=e[A],!r&&(r===null||r===undef||isNaN(r))&&(r=""),A=encode(A),r=encode(r),A===null||r===null)continue;n.push(A+"="+r)}return n.length?t+n.join("&"):""}querystringify$1.stringify=querystringify;querystringify$1.parse=querystring;var required=requiresPort,qs=querystringify$1,controlOrWhitespace=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,CRHTLF=/[\n\r\t]/g,slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,port=/:\d+$/,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/;function trimLeft(e){return(e||"").toString().replace(controlOrWhitespace,"")}var rules=[["#","hash"],["?","query"],function e(t,n){return isSpecial(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(e){var t;typeof window<"u"?t=window:typeof commonjsGlobal<"u"?t=commonjsGlobal:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},A=typeof e,S;if(e.protocol==="blob:")r=new Url(unescape(e.pathname),{});else if(A==="string"){r=new Url(e,{});for(S in ignore)delete r[S]}else if(A==="object"){for(S in e)S in ignore||(r[S]=e[S]);r.slashes===void 0&&(r.slashes=slashes.test(e.href))}return r}function isSpecial(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function extractProtocol(e,t){e=trimLeft(e),e=e.replace(CRHTLF,""),t=t||{};var n=protocolre.exec(e),r=n[1]?n[1].toLowerCase():"",A=!!n[2],S=!!n[3],E=0,T;return A?S?(T=n[2]+n[3]+n[4],E=n[2].length+n[3].length):(T=n[2]+n[4],E=n[2].length):S?(T=n[3]+n[4],E=n[3].length):T=n[4],r==="file:"?E>=2&&(T=T.slice(2)):isSpecial(r)?T=n[4]:r?A&&(T=T.slice(2)):E>=2&&isSpecial(t.protocol)&&(T=n[4]),{protocol:r,slashes:A||isSpecial(r),slashesCount:E,rest:T}}function resolve(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,A=n[r-1],S=!1,E=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),E++):E&&(r===0&&(S=!0),n.splice(r,1),E--);return S&&n.unshift(""),(A==="."||A==="..")&&n.push(""),n.join("/")}function Url(e,t,n){if(e=trimLeft(e),e=e.replace(CRHTLF,""),!(this instanceof Url))return new Url(e,t,n);var r,A,S,E,T,c,C=rules.slice(),o=typeof t,a=this,$=0;for(o!=="object"&&o!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=qs.parse),t=lolcation(t),A=extractProtocol(e||"",t),r=!A.protocol&&!A.slashes,a.slashes=A.slashes||r&&t.slashes,a.protocol=A.protocol||t.protocol||"",e=A.rest,(A.protocol==="file:"&&(A.slashesCount!==2||windowsDriveLetter.test(e))||!A.slashes&&(A.protocol||A.slashesCount<2||!isSpecial(a.protocol)))&&(C[3]=[/(.*)/,"pathname"]);$e.type===void 0?t:t.filter(r=>r.type===e.type))}}}),_hoisted_1$a={class:"tags are-medium"};function _sfc_render$k(e,t,n,r,A,S){const E=resolveComponent("LinkComponent");return openBlock(),createElementBlock("div",_hoisted_1$a,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.selectedLinks,T=>(openBlock(),createBlock(E,{data:e.data,link:T,key:T.name},null,8,["data","link"]))),128))])}const Links=_export_sfc(_sfc_main$k,[["render",_sfc_render$k]]),_sfc_main$j=defineComponent({name:"ArtifactItem",props:{artifact:{type:Object,required:!0}},components:{Alerts,AS,DnsRecords,Links,Loading,ReverseDnsNames,Tags,VueJsonPretty,WhoisRecord,CPEs,Ports},emits:["refresh"],setup(e,t){const n=ref(void 0),r=ref(void 0),A=ref(!1),S=useRouter(),E=computed(()=>{if(e.artifact.dataType==="domain")return`https://urlscan.io/liveshot/?url=${`http://${e.artifact.data}`}`;if(e.artifact.dataType==="url")return`https://urlscan.io/liveshot/?url=${e.artifact.data}`}),T=R=>{if(R!==void 0)return`https://maps.google.co.jp/maps?output=embed&q=${R.lat},${R.long}&z=3`},c=generateGetIPTask(),C=generateGetAlertsTask(),o=generateDeleteArtifactTask(),a=generateEnrichArtifactTask(),$=async()=>{window.confirm(`Are you sure you want to delete ${e.artifact.data}?`)&&(await o.perform(e.artifact.id),S.push("/"))},l=async()=>{await a.perform(e.artifact.id),t.emit("refresh")};return onMounted(async()=>{if(e.artifact.dataType==="ip"){let R;if(e.artifact.geolocation===null){const x=await c.perform(e.artifact.data);R=getGCSByIPInfo(x),r.value=x.countryCode}else R=getGCSByCountryCode(e.artifact.geolocation.countryCode);n.value=T(R)}}),{countryCode:r,enrichArtifactTask:a,getAlertsTask:C,googleMapSrc:n,showMetadata:A,urlscanLiveshotSrc:E,deleteArtifact:$,enrichArtifact:l,flipShowMetadata:()=>{A.value=!A.value}}}}),Artifact_vue_vue_type_style_index_0_scoped_3bbfb14d_lang="",_withScopeId=e=>(pushScopeId("data-v-3bbfb14d"),e=e(),popScopeId(),e),_hoisted_1$9={class:"column"},_hoisted_2$7={key:0},_hoisted_3$7=_withScopeId(()=>createBaseVNode("hr",null,null,-1)),_hoisted_4$7=_withScopeId(()=>createBaseVNode("h2",{class:"is-size-2 mb-4"},"Artifact",-1)),_hoisted_5$6={class:"columns"},_hoisted_6$6={key:0,class:"column is-half"},_hoisted_7$6={key:0},_hoisted_8$6={class:"is-size-4 mb-2"},_hoisted_9$4={class:"has-text-grey"},_hoisted_10$3=["src"],_hoisted_11$3={key:1},_hoisted_12$3=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},[createTextVNode(" Live screenshot "),createBaseVNode("span",{class:"has-text-grey"},"Hover to expand")],-1)),_hoisted_13$2=["src"],_hoisted_14$2={class:"column"},_hoisted_15$2={class:"block"},_hoisted_16$2=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"Information",-1)),_hoisted_17$2={class:"table is-fullwidth is-completely-borderless"},_hoisted_18$1=_withScopeId(()=>createBaseVNode("th",null,"ID",-1)),_hoisted_19$1={class:"buttons is-pulled-right"},_hoisted_20$1=_withScopeId(()=>createBaseVNode("span",null,"Enrich",-1)),_hoisted_21$1={class:"icon is-small"},_hoisted_22$1=_withScopeId(()=>createBaseVNode("span",null,"Metadata",-1)),_hoisted_23$1={class:"icon is-small"},_hoisted_24$1=_withScopeId(()=>createBaseVNode("span",null,"Delete",-1)),_hoisted_25$1={class:"icon is-small"},_hoisted_26$1=_withScopeId(()=>createBaseVNode("th",null,"Data type",-1)),_hoisted_27$1=_withScopeId(()=>createBaseVNode("th",null,"Data",-1)),_hoisted_28$1=_withScopeId(()=>createBaseVNode("th",null,"Source",-1)),_hoisted_29$1={key:0},_hoisted_30$1=_withScopeId(()=>createBaseVNode("th",null,"Tags",-1)),_hoisted_31$1={key:0},_hoisted_32$1={class:"modal is-active"},_hoisted_33$1={class:"modal-card"},_hoisted_34$1={class:"modal-card-head"},_hoisted_35$1=_withScopeId(()=>createBaseVNode("p",{class:"modal-card-title"},"Metadata",-1)),_hoisted_36$1={class:"modal-card-body"},_hoisted_37={key:1,class:"block"},_hoisted_38=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"AS",-1)),_hoisted_39={key:2,class:"block"},_hoisted_40=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"Reverse DNS",-1)),_hoisted_41={key:3,class:"block"},_hoisted_42=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"DNS records",-1)),_hoisted_43={key:4,class:"block"},_hoisted_44=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"CPEs",-1)),_hoisted_45={key:5,class:"block"},_hoisted_46=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"Ports",-1)),_hoisted_47={key:6,class:"block"},_hoisted_48=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"Whois record",-1)),_hoisted_49={class:"block"},_hoisted_50=_withScopeId(()=>createBaseVNode("h4",{class:"is-size-4 mb-2"},"Links",-1)),_hoisted_51=_withScopeId(()=>createBaseVNode("hr",null,null,-1)),_hoisted_52={class:"column"},_hoisted_53=_withScopeId(()=>createBaseVNode("h2",{class:"is-size-2 mb-4"},"Related alerts",-1));function _sfc_render$j(e,t,n,r,A,S){var M;const E=resolveComponent("Loading"),T=resolveComponent("font-awesome-icon"),c=resolveComponent("Tags"),C=resolveComponent("VueJsonPretty"),o=resolveComponent("AS"),a=resolveComponent("ReverseDnsNames"),$=resolveComponent("DnsRecords"),l=resolveComponent("CPEs"),f=resolveComponent("Ports"),R=resolveComponent("WhoisRecord"),x=resolveComponent("Links"),L=resolveComponent("Alerts");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$9,[e.enrichArtifactTask.isRunning?(openBlock(),createElementBlock("div",_hoisted_2$7,[createVNode(E),_hoisted_3$7])):createCommentVNode("",!0),_hoisted_4$7,createBaseVNode("div",_hoisted_5$6,[e.googleMapSrc!==void 0||e.urlscanLiveshotSrc!==void 0?(openBlock(),createElementBlock("div",_hoisted_6$6,[e.googleMapSrc?(openBlock(),createElementBlock("div",_hoisted_7$6,[createBaseVNode("h4",_hoisted_8$6,[createTextVNode(" Geolocation "),createBaseVNode("span",_hoisted_9$4,toDisplayString(e.countryCode||((M=e.artifact.geolocation)==null?void 0:M.countryCode)),1)]),createBaseVNode("iframe",{class:"mb-4",src:e.googleMapSrc,width:"100%",height:"240px"},null,8,_hoisted_10$3)])):createCommentVNode("",!0),e.urlscanLiveshotSrc?(openBlock(),createElementBlock("div",_hoisted_11$3,[_hoisted_12$3,createBaseVNode("img",{src:e.urlscanLiveshotSrc,class:"liveshot",alt:"liveshot"},null,8,_hoisted_13$2)])):createCommentVNode("",!0)])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_14$2,[createBaseVNode("div",_hoisted_15$2,[_hoisted_16$2,createBaseVNode("table",_hoisted_17$2,[createBaseVNode("tr",null,[_hoisted_18$1,createBaseVNode("td",null,[createTextVNode(toDisplayString(e.artifact.id)+" ",1),createBaseVNode("span",_hoisted_19$1,[createBaseVNode("button",{class:"button is-primary is-light is-small",onClick:t[0]||(t[0]=(...V)=>e.enrichArtifact&&e.enrichArtifact(...V))},[_hoisted_20$1,createBaseVNode("span",_hoisted_21$1,[createVNode(T,{icon:"lightbulb"})])]),e.artifact.metadata?(openBlock(),createElementBlock("button",{key:0,class:"button is-info is-light is-small",onClick:t[1]||(t[1]=(...V)=>e.flipShowMetadata&&e.flipShowMetadata(...V))},[_hoisted_22$1,createBaseVNode("span",_hoisted_23$1,[createVNode(T,{icon:"info-circle"})])])):createCommentVNode("",!0),createBaseVNode("button",{class:"button is-light is-small",onClick:t[2]||(t[2]=(...V)=>e.deleteArtifact&&e.deleteArtifact(...V))},[_hoisted_24$1,createBaseVNode("span",_hoisted_25$1,[createVNode(T,{icon:"times"})])])])])]),createBaseVNode("tr",null,[_hoisted_26$1,createBaseVNode("td",null,toDisplayString(e.artifact.dataType),1)]),createBaseVNode("tr",null,[_hoisted_27$1,createBaseVNode("td",null,toDisplayString(e.artifact.data),1)]),createBaseVNode("tr",null,[_hoisted_28$1,createBaseVNode("td",null,toDisplayString(e.artifact.source),1)]),e.artifact.tags.length>0?(openBlock(),createElementBlock("tr",_hoisted_29$1,[_hoisted_30$1,createBaseVNode("td",null,[createVNode(c,{tags:e.artifact.tags},null,8,["tags"])])])):createCommentVNode("",!0)])]),e.artifact.metadata&&e.showMetadata?(openBlock(),createElementBlock("div",_hoisted_31$1,[createBaseVNode("div",_hoisted_32$1,[createBaseVNode("div",{class:"modal-background",onClick:t[3]||(t[3]=(...V)=>e.flipShowMetadata&&e.flipShowMetadata(...V))}),createBaseVNode("div",_hoisted_33$1,[createBaseVNode("header",_hoisted_34$1,[_hoisted_35$1,createBaseVNode("button",{class:"delete","aria-label":"close",onClick:t[4]||(t[4]=(...V)=>e.flipShowMetadata&&e.flipShowMetadata(...V))})]),createBaseVNode("section",_hoisted_36$1,[createVNode(C,{data:e.artifact.metadata},null,8,["data"])])])])])):createCommentVNode("",!0)])]),e.artifact.autonomousSystem?(openBlock(),createElementBlock("div",_hoisted_37,[_hoisted_38,createVNode(o,{autonomousSystem:e.artifact.autonomousSystem},null,8,["autonomousSystem"])])):createCommentVNode("",!0),e.artifact.reverseDnsNames?(openBlock(),createElementBlock("div",_hoisted_39,[_hoisted_40,createVNode(a,{reverseDnsNames:e.artifact.reverseDnsNames},null,8,["reverseDnsNames"])])):createCommentVNode("",!0),e.artifact.dnsRecords?(openBlock(),createElementBlock("div",_hoisted_41,[_hoisted_42,createVNode($,{dnsRecords:e.artifact.dnsRecords},null,8,["dnsRecords"])])):createCommentVNode("",!0),e.artifact.cpes?(openBlock(),createElementBlock("div",_hoisted_43,[_hoisted_44,createVNode(l,{cpes:e.artifact.cpes},null,8,["cpes"])])):createCommentVNode("",!0),e.artifact.ports?(openBlock(),createElementBlock("div",_hoisted_45,[_hoisted_46,createVNode(f,{ports:e.artifact.ports},null,8,["ports"])])):createCommentVNode("",!0),e.artifact.whoisRecord?(openBlock(),createElementBlock("div",_hoisted_47,[_hoisted_48,createVNode(R,{whoisRecord:e.artifact.whoisRecord},null,8,["whoisRecord"])])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_49,[_hoisted_50,createVNode(x,{data:e.artifact.data,type:e.artifact.dataType},null,8,["data","type"])])]),_hoisted_51,createBaseVNode("div",_hoisted_52,[_hoisted_53,createVNode(L,{artifact:e.artifact.data},null,8,["artifact"])])],64)}const ArtifactComponent=_export_sfc(_sfc_main$j,[["render",_sfc_render$j],["__scopeId","data-v-3bbfb14d"]]),_sfc_main$i=defineComponent({name:"ArtifactWrapper",components:{ArtifactComponent,Loading,ErrorMessage},props:{id:{type:String,required:!0}},setup(e){const t=generateGetArtifactTask(),n=async()=>{await t.perform(e.id)},r=async()=>{await n()};return onMounted(async()=>{await n()}),watch(e,async()=>{await n()}),{getArtifactTask:t,refresh:r}}});function _sfc_render$i(e,t,n,r,A,S){var C,o;const E=resolveComponent("Loading"),T=resolveComponent("ErrorMessage"),c=resolveComponent("ArtifactComponent");return openBlock(),createElementBlock(Fragment,null,[e.getArtifactTask.isRunning?(openBlock(),createBlock(E,{key:0})):createCommentVNode("",!0),e.getArtifactTask.isError?(openBlock(),createBlock(T,{key:1,error:(C=e.getArtifactTask.last)==null?void 0:C.error},null,8,["error"])):createCommentVNode("",!0),(o=e.getArtifactTask.last)!=null&&o.value?(openBlock(),createBlock(c,{key:2,artifact:e.getArtifactTask.last.value,onRefresh:e.refresh},null,8,["artifact","onRefresh"])):createCommentVNode("",!0)],64)}const Artifact$1=_export_sfc(_sfc_main$i,[["render",_sfc_render$i]]),_sfc_main$h=defineComponent({name:"ArtifactView",components:{Artifact:Artifact$1},props:{id:{type:String,required:!0}},setup(e){const t=()=>{useTitle(`Artifact:${e.id} - Mihari`)};onMounted(()=>{t()}),watch(()=>e.id,()=>{t()})}});function _sfc_render$h(e,t,n,r,A,S){const E=resolveComponent("Artifact",!0);return openBlock(),createBlock(E,{id:e.id},null,8,["id"])}const Artifact=_export_sfc(_sfc_main$h,[["render",_sfc_render$h]]),_sfc_main$g=defineComponent({name:"ConfigsItem",props:{configs:{type:Array,required:!0}}}),_hoisted_1$8={class:"box"},_hoisted_2$6={class:"table-container"},_hoisted_3$6={class:"table is-fullwidth"},_hoisted_4$6=createBaseVNode("thead",null,[createBaseVNode("tr",null,[createBaseVNode("th",null,"Name"),createBaseVNode("th",null,"Type"),createBaseVNode("th",null,"Configured"),createBaseVNode("th",null,"Key-value(s)")])],-1),_hoisted_5$5={key:0,class:"button is-success is-small ml-1"},_hoisted_6$5={class:"icon is-small"},_hoisted_7$5=createBaseVNode("span",null,"Yes",-1),_hoisted_8$5={key:1,class:"button is-warning is-small ml-1"},_hoisted_9$3={class:"icon is-small"},_hoisted_10$2=createBaseVNode("span",null,"No",-1),_hoisted_11$2={key:0},_hoisted_12$2={key:1};function _sfc_render$g(e,t,n,r,A,S){const E=resolveComponent("font-awesome-icon");return openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("div",_hoisted_2$6,[createBaseVNode("table",_hoisted_3$6,[_hoisted_4$6,createBaseVNode("tbody",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(e.configs,T=>(openBlock(),createElementBlock("tr",{key:T.name},[createBaseVNode("td",null,toDisplayString(T.name),1),createBaseVNode("td",null,toDisplayString(T.type),1),createBaseVNode("td",null,[T.isConfigured?(openBlock(),createElementBlock("button",_hoisted_5$5,[createBaseVNode("span",_hoisted_6$5,[createVNode(E,{icon:"check"})]),_hoisted_7$5])):(openBlock(),createElementBlock("button",_hoisted_8$5,[createBaseVNode("span",_hoisted_9$3,[createVNode(E,{icon:"exclamation"})]),_hoisted_10$2]))]),createBaseVNode("td",null,[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(T.values,(c,C)=>(openBlock(),createElementBlock("li",{key:C},[createBaseVNode("strong",null,toDisplayString(c.key),1),createTextVNode(": "),c.value?(openBlock(),createElementBlock("code",_hoisted_11$2,toDisplayString(c.value),1)):(openBlock(),createElementBlock("span",_hoisted_12$2,"N/A"))]))),128))])])]))),128))])])])])}const Configs$2=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]),_sfc_main$f=defineComponent({name:"ConfigsWrapper",components:{Configs:Configs$2,Loading,ErrorMessage},setup(){const e=generateGetConfigsTask();return onMounted(async()=>{await e.perform()}),{getConfigsTask:e}}});function _sfc_render$f(e,t,n,r,A,S){var C,o;const E=resolveComponent("Loading"),T=resolveComponent("ErrorMessage"),c=resolveComponent("Configs");return openBlock(),createElementBlock(Fragment,null,[e.getConfigsTask.isRunning?(openBlock(),createBlock(E,{key:0})):createCommentVNode("",!0),e.getConfigsTask.isError?(openBlock(),createBlock(T,{key:1,error:(C=e.getConfigsTask.last)==null?void 0:C.error},null,8,["error"])):createCommentVNode("",!0),(o=e.getConfigsTask.last)!=null&&o.value?(openBlock(),createBlock(c,{key:2,configs:e.getConfigsTask.last.value},null,8,["configs"])):createCommentVNode("",!0)],64)}const Configs$1=_export_sfc(_sfc_main$f,[["render",_sfc_render$f]]),_sfc_main$e=defineComponent({name:"ConfigView",components:{Configs:Configs$1},setup(){useTitle("Config - Mihari")}});function _sfc_render$e(e,t,n,r,A,S){const E=resolveComponent("Configs",!0);return openBlock(),createBlock(E)}const Configs=_export_sfc(_sfc_main$e,[["render",_sfc_render$e]]);var ace$2={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var A=function(o,a,$){if(typeof o!="string"){A.original?A.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&($=a),A.modules[o]||(A.payloads[o]=$,A.modules[o]=null)};A.modules={},A.payloads={};var S=function(o,a,$){if(typeof a=="string"){var l=c(o,a);if(l!=null)return $&&$(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var f=[],R=0,x=a.length;Rc.length)&&(T=c.length),T-=E.length;var C=c.indexOf(E,T);return C!==-1&&C===T}),String.prototype.repeat||S(String.prototype,"repeat",function(E){for(var T="",c=this;E>0;)E&1&&(T+=c),(E>>=1)&&(c+=c);return T}),String.prototype.includes||S(String.prototype,"includes",function(E,T){return this.indexOf(E,T)!=-1}),Object.assign||(Object.assign=function(E){if(E==null)throw new TypeError("Cannot convert undefined or null to object");for(var T=Object(E),c=1;c>>0,C=arguments[1],o=C>>0,a=o<0?Math.max(c+o,0):Math.min(o,c),$=arguments[2],l=$===void 0?c:$>>0,f=l<0?Math.max(c+l,0):Math.min(l,c);a0;)c&1&&(C+=T),(c>>=1)&&(T+=T);return C};var S=/^\s\s*/,E=/\s\s*$/;r.stringTrimLeft=function(T){return T.replace(S,"")},r.stringTrimRight=function(T){return T.replace(E,"")},r.copyObject=function(T){var c={};for(var C in T)c[C]=T[C];return c},r.copyArray=function(T){for(var c=[],C=0,o=T.length;C=0?parseFloat((T.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((T.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=T.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(T.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(T.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(T.split(" Edge/")[1])||void 0,r.isAIR=T.indexOf("AdobeAIR")>=0,r.isAndroid=T.indexOf("Android")>=0,r.isChromeOS=T.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(T)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,A){var S=n("./useragent"),E="http://www.w3.org/1999/xhtml";r.buildDom=function $(l,f,R){if(typeof l=="string"&&l){var x=document.createTextNode(l);return f&&f.appendChild(x),x}if(!Array.isArray(l))return l&&l.appendChild&&f&&f.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var L=[],M=0;M"u")){if(c){if(f)C();else if(f===!1)return c.push([$,l])}if(!T){var R=f;!f||!f.getRootNode?R=document:(R=f.getRootNode(),(!R||R==f)&&(R=document));var x=R.ownerDocument||R;if(l&&r.hasCssString(l,R))return null;l&&($+=` /*# sourceURL=ace/css/`+l+" */");var L=r.createElement("style");L.appendChild(x.createTextNode($)),l&&(L.id=l),R==x&&(R=r.getDocumentHead(x)),R.insertBefore(L,R.firstChild)}}}if(r.importCssString=o,r.importCssStylsheet=function($,l){r.buildDom(["link",{rel:"stylesheet",href:$}],r.getDocumentHead(l))},r.scrollbarWidth=function($){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var f=r.createElement("ace_outer"),R=f.style;R.position="absolute",R.left="-10000px",R.overflow="hidden",R.width="200px",R.minWidth="0px",R.height="150px",R.display="block",f.appendChild(l);var x=$&&$.documentElement||document&&document.documentElement;if(!x)return 0;x.appendChild(f);var L=l.offsetWidth;R.overflow="scroll";var M=l.offsetWidth;return L===M&&(M=f.clientWidth),x.removeChild(f),L-M},r.computedStyle=function($,l){return window.getComputedStyle($,"")||{}},r.setStyle=function($,l,f){$[l]!==f&&($[l]=f)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=S.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,S.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!S.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function($,l,f){$.style.transform="translate("+Math.round(l)+"px, "+Math.round(f)+"px)"}:r.translate=function($,l,f){$.style.top=Math.round(f)+"px",$.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,A){/* * based on code from: * * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */var S=n("./dom");r.get=function(E,T){var c=new XMLHttpRequest;c.open("GET",E,!0),c.onreadystatechange=function(){c.readyState===4&&T(c.responseText)},c.send(null)},r.loadScript=function(E,T){var c=S.getDocumentHead(),C=document.createElement("script");C.src=E,c.appendChild(C),C.onload=C.onreadystatechange=function(o,a){(a||!C.readyState||C.readyState=="loaded"||C.readyState=="complete")&&(C=C.onload=C.onreadystatechange=null,a||T())}},r.qualifyURL=function(E){var T=document.createElement("a");return T.href=E,T.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,A){r.inherits=function(S,E){S.super_=E,S.prototype=Object.create(E.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(S,E){for(var T in E)S[T]=E[T];return S},r.implement=function(S,E){r.mixin(S,E)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,A){var S={},E=function(){this.propagationStopped=!0},T=function(){this.defaultPrevented=!0};S._emit=S._dispatchEvent=function(c,C){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[c]||[],a=this._defaultHandlers[c];if(!(!o.length&&!a)){(typeof C!="object"||!C)&&(C={}),C.type||(C.type=c),C.stopPropagation||(C.stopPropagation=E),C.preventDefault||(C.preventDefault=T),o=o.slice();for(var $=0;$1&&(L=R[R.length-2]);var V=C[f+"Path"];return V==null?V=C.basePath:x=="/"&&(f=x=""),V&&V.slice(-1)!="/"&&(V+="/"),V+f+x+L+this.get("suffix")},r.setModuleUrl=function(l,f){return C.$moduleUrls[l]=f};var o=function(l,f){if(l==="ace/theme/textmate"||l==="./theme/textmate")return f(null,n("./theme/textmate"));if(a)return a(l,f);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,f){var R,x;Array.isArray(l)&&(x=l[0],l=l[1]);var L=function(M){if(M&&!r.$loading[l])return f&&f(M);if(r.$loading[l]||(r.$loading[l]=[]),r.$loading[l].push(f),!(r.$loading[l].length>1)){var V=function(){o(l,function(D,F){F&&(r.$loaded[l]=F),r._emit("load.module",{name:l,module:F});var P=r.$loading[l];r.$loading[l]=null,P.forEach(function(X){X&&X(F)})})};if(!r.get("packaged"))return V();E.loadScript(r.moduleUrl(l,x),V),$()}};if(r.dynamicModules[l])r.dynamicModules[l]().then(function(M){M.default?L(M.default):L(M)});else{try{R=this.$require(l)}catch{}L(R||r.$loaded[l])}},r.$require=function(l){if(typeof A.require=="function"){var f="require";return A[f](l)}},r.setModuleLoader=function(l,f){r.dynamicModules[l]=f};var $=function(){!C.basePath&&!C.workerPath&&!C.modePath&&!C.themePath&&!Object.keys(C.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),$=function(){})};r.version="1.24.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,A){n("./lib/fixoldbrowsers");var S=n("./config");S.setLoader(function(C,o){n([C],function(a){o(null,a)})});var E=function(){return this||typeof window<"u"&&window}();A.exports=function(C){S.init=T,S.$require=n,C.require=n},T(!0);function T(C){if(!(!E||!E.document)){S.set("packaged",C||n.packaged||A.packaged||E.define&&(void 0).packaged);var o={},a="",$=document.currentScript||document._currentScript,l=$&&$.ownerDocument||document;$&&$.src&&(a=$.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var f=l.getElementsByTagName("script"),R=0;R ["+this.end.row+"/"+this.end.column+"]"},T.prototype.contains=function(c,C){return this.compare(c,C)==0},T.prototype.compareRange=function(c){var C,o=c.end,a=c.start;return C=this.compare(o.row,o.column),C==1?(C=this.compare(a.row,a.column),C==1?2:C==0?1:0):C==-1?-2:(C=this.compare(a.row,a.column),C==-1?-1:C==1?42:0)},T.prototype.comparePoint=function(c){return this.compare(c.row,c.column)},T.prototype.containsRange=function(c){return this.comparePoint(c.start)==0&&this.comparePoint(c.end)==0},T.prototype.intersects=function(c){var C=this.compareRange(c);return C==-1||C==0||C==1},T.prototype.isEnd=function(c,C){return this.end.row==c&&this.end.column==C},T.prototype.isStart=function(c,C){return this.start.row==c&&this.start.column==C},T.prototype.setStart=function(c,C){typeof c=="object"?(this.start.column=c.column,this.start.row=c.row):(this.start.row=c,this.start.column=C)},T.prototype.setEnd=function(c,C){typeof c=="object"?(this.end.column=c.column,this.end.row=c.row):(this.end.row=c,this.end.column=C)},T.prototype.inside=function(c,C){return this.compare(c,C)==0?!(this.isEnd(c,C)||this.isStart(c,C)):!1},T.prototype.insideStart=function(c,C){return this.compare(c,C)==0?!this.isEnd(c,C):!1},T.prototype.insideEnd=function(c,C){return this.compare(c,C)==0?!this.isStart(c,C):!1},T.prototype.compare=function(c,C){return!this.isMultiLine()&&c===this.start.row?Cthis.end.column?1:0:cthis.end.row?1:this.start.row===c?C>=this.start.column?0:-1:this.end.row===c?C<=this.end.column?0:1:0},T.prototype.compareStart=function(c,C){return this.start.row==c&&this.start.column==C?-1:this.compare(c,C)},T.prototype.compareEnd=function(c,C){return this.end.row==c&&this.end.column==C?1:this.compare(c,C)},T.prototype.compareInside=function(c,C){return this.end.row==c&&this.end.column==C?1:this.start.row==c&&this.start.column==C?-1:this.compare(c,C)},T.prototype.clipRows=function(c,C){if(this.end.row>C)var o={row:C+1,column:0};else if(this.end.rowC)var a={row:C+1,column:0};else if(this.start.row1?(U++,U>4&&(U=1)):U=1,E.isIE){var W=Math.abs(N.clientX-z)>5||Math.abs(N.clientY-B)>5;(!I||W)&&(U=1),I&&clearTimeout(I),I=setTimeout(function(){I=null},D[U-1]||600),U==1&&(z=N.clientX,B=N.clientY)}if(N._clicks=U,F[P]("mousedown",N),U>4)U=0;else if(U>1)return F[P](Y[U],N)}Array.isArray(V)||(V=[V]),V.forEach(function(N){l(N,"mousedown",H,X)})};var R=function(V){return 0|(V.ctrlKey?1:0)|(V.altKey?2:0)|(V.shiftKey?4:0)|(V.metaKey?8:0)};r.getModifierString=function(V){return S.KEY_MODS[R(V)]};function x(V,D,F){var P=R(D);if(!E.isMac&&T){if(D.getModifierState&&(D.getModifierState("OS")||D.getModifierState("Win"))&&(P|=8),T.altGr)if((3&P)!=3)T.altGr=0;else return;if(F===18||F===17){var X="location"in D?D.location:D.keyLocation;if(F===17&&X===1)T[F]==1&&(c=D.timeStamp);else if(F===18&&P===3&&X===2){var U=D.timeStamp-c;U<50&&(T.altGr=!0)}}}if(F in S.MODIFIER_KEYS&&(F=-1),!P&&F===13){var X="location"in D?D.location:D.keyLocation;if(X===3&&(V(D,P,-F),D.defaultPrevented))return}if(E.isChromeOS&&P&8){if(V(D,P,F),D.defaultPrevented)return;P&=-9}return!P&&!(F in S.FUNCTION_KEYS)&&!(F in S.PRINTABLE_KEYS)?!1:V(D,P,F)}r.addCommandKeyListener=function(V,D,F){if(E.isOldGecko||E.isOpera&&!("KeyboardEvent"in window)){var P=null;l(V,"keydown",function(U){P=U.keyCode},F),l(V,"keypress",function(U){return x(D,U,P)},F)}else{var X=null;l(V,"keydown",function(U){T[U.keyCode]=(T[U.keyCode]||0)+1;var z=x(D,U,U.keyCode);return X=U.defaultPrevented,z},F),l(V,"keypress",function(U){X&&(U.ctrlKey||U.altKey||U.shiftKey||U.metaKey)&&(r.stopEvent(U),X=null)},F),l(V,"keyup",function(U){T[U.keyCode]=null},F),T||(L(),l(window,"focus",L))}};function L(){T=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!E.isOldIE){var M=1;r.nextTick=function(V,D){D=D||window;var F="zero-timeout-message-"+M++,P=function(X){X.data==F&&(r.stopPropagation(X),f(D,"message",P),V())};l(D,"message",P),D.postMessage(F,"*")}}r.$idleBlocked=!1,r.onIdle=function(V,D){return setTimeout(function F(){r.$idleBlocked?setTimeout(F,100):V()},D)},r.$idleBlockId=null,r.blockIdle=function(V){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},V||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(V){setTimeout(V,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,A){var S;A.exports={lineMode:!1,pasteCancelled:function(){return S&&S>Date.now()-50?!0:S=!1},cancel:function(){S=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,A){var S=n("../lib/event"),E=n("../config").nls,T=n("../lib/useragent"),c=n("../lib/dom"),C=n("../lib/lang"),o=n("../clipboard"),a=T.isChrome<18,$=T.isIE,l=T.isChrome>63,f=400,R=n("../lib/keys"),x=R.KEY_MODS,L=T.isIOS,M=L?/\s/:/\n/,V=T.isMobile,D=function(F,P){var X=c.createElement("textarea");X.className="ace_text-input",X.setAttribute("wrap","off"),X.setAttribute("autocorrect","off"),X.setAttribute("autocapitalize","off"),X.setAttribute("spellcheck",!1),X.style.opacity="0",F.insertBefore(X,F.firstChild);var U=!1,z=!1,B=!1,I=!1,Y="";V||(X.style.fontSize="1px");var H=!1,N=!1,W="",G=0,Z=0,J=0,Q=Number.MAX_SAFE_INTEGER,ne=Number.MIN_SAFE_INTEGER,re=0;try{var ue=document.activeElement===X}catch{}this.setNumberOfExtraLines=function(pe){if(Q=Number.MAX_SAFE_INTEGER,ne=Number.MIN_SAFE_INTEGER,pe<0){re=0;return}re=pe},this.setAriaOptions=function(pe){if(pe.activeDescendant?(X.setAttribute("aria-haspopup","true"),X.setAttribute("aria-autocomplete",pe.inline?"both":"list"),X.setAttribute("aria-activedescendant",pe.activeDescendant)):(X.setAttribute("aria-haspopup","false"),X.setAttribute("aria-autocomplete","both"),X.removeAttribute("aria-activedescendant")),pe.role&&X.setAttribute("role",pe.role),pe.setLabel&&(X.setAttribute("aria-roledescription",E("editor")),P.session)){var we=P.session.selection.cursor.row;X.setAttribute("aria-label",E("Cursor at row $0",[we+1]))}},this.setAriaOptions({role:"textbox"}),S.addListener(X,"blur",function(pe){N||(P.onBlur(pe),ue=!1)},P),S.addListener(X,"focus",function(pe){if(!N){if(ue=!0,T.isEdge)try{if(!document.hasFocus())return}catch{}P.onFocus(pe),T.isEdge?setTimeout(ie):ie()}},P),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:P.renderer.enableKeyboardAccessibility}),Y||l||this.$focusScroll=="browser")return X.focus({preventScroll:!0});var pe=X.style.top;X.style.position="fixed",X.style.top="0px";try{var we=X.getBoundingClientRect().top!=0}catch{return}var Ce=[];if(we)for(var Re=X.parentElement;Re&&Re.nodeType==1;)Ce.push(Re),Re.setAttribute("ace_nocontext",!0),!Re.parentElement&&Re.getRootNode?Re=Re.getRootNode().host:Re=Re.parentElement;X.focus({preventScroll:!0}),we&&Ce.forEach(function(Le){Le.removeAttribute("ace_nocontext")}),setTimeout(function(){X.style.position="",X.style.top=="0px"&&(X.style.top=pe)},0)},this.blur=function(){X.blur()},this.isFocused=function(){return ue},P.on("beforeEndOperation",function(){var pe=P.curOp,we=pe&&pe.command&&pe.command.name;if(we!="insertstring"){var Ce=we&&(pe.docChanged||pe.selectionChanged);B&&Ce&&(W=X.value="",$e()),ie()}});var oe=function(pe,we){for(var Ce=we,Re=1;Re<=pe-Q&&Re<2*re+1;Re++)Ce+=P.session.getLine(pe-Re).length+1;return Ce},ie=L?function(pe){if(!(!ue||U&&!pe||I)){pe||(pe="");var we=` ab`+pe+`cde fg `;we!=X.value&&(X.value=W=we);var Ce=4,Re=4+(pe.length||(P.selection.isEmpty()?0:1));(G!=Ce||Z!=Re)&&X.setSelectionRange(Ce,Re),G=Ce,Z=Re}}:function(){if(!(B||I)&&!(!ue&&!de)){B=!0;var pe=0,we=0,Ce="";if(P.session){var Re=P.selection,Le=Re.getRange(),Ie=Re.cursor.row;Ie===ne+1?(Q=ne+1,ne=Q+2*re):Ie===Q-1?(ne=Q-1,Q=ne-2*re):(Iene+1)&&(Q=Ie>re?Ie-re:0,ne=Ie>re?Ie+re:2*re);for(var Pe=[],Ne=Q;Ne<=ne;Ne++)Pe.push(P.session.getLine(Ne));if(Ce=Pe.join(` `),pe=oe(Le.start.row,Le.start.column),we=oe(Le.end.row,Le.end.column),Le.start.rowne){var xe=P.session.getLine(ne+1);we=Le.end.row>ne+1?xe.length:Le.end.column,we+=Ce.length+1,Ce=Ce+` `+xe}else V&&Ie>0&&(Ce=` `+Ce,we+=1,pe+=1);Ce.length>f&&(pe=W.length&&pe.value===W&&W&&pe.selectionEnd!==Z},ge=function(pe){B||(U?U=!1:fe(X)?(P.selectAll(),ie()):V&&X.selectionStart!=G&&ie())},se=null;this.setInputHandler=function(pe){se=pe},this.getInputHandler=function(){return se};var de=!1,ce=function(pe,we){if(de&&(de=!1),z)return ie(),pe&&P.onPaste(pe),z=!1,"";for(var Ce=X.selectionStart,Re=X.selectionEnd,Le=G,Ie=W.length-Z,Pe=pe,Ne=pe.length-Ce,Oe=pe.length-Re,xe=0;Le>0&&W[xe]==pe[xe];)xe++,Le--;for(Pe=Pe.slice(xe),xe=1;Ie>0&&W.length-xe>G-1&&W[W.length-xe]==pe[pe.length-xe];)xe++,Ie--;Ne-=xe-1,Oe-=xe-1;var Fe=Pe.length-xe+1;if(Fe<0&&(Le=-Fe,Fe=0),Pe=Pe.slice(0,Fe),!we&&!Pe&&!Ne&&!Le&&!Ie&&!Oe)return"";I=!0;var Be=!1;return T.isAndroid&&Pe==". "&&(Pe=" ",Be=!0),Pe&&!Le&&!Ie&&!Ne&&!Oe||H?P.onTextInput(Pe):P.onTextInput(Pe,{extendLeft:Le,extendRight:Ie,restoreStart:Ne,restoreEnd:Oe}),I=!1,W=pe,G=Ce,Z=Re,J=Oe,Be?` `:Pe},le=function(pe){if(B)return ye();if(pe&&pe.inputType){if(pe.inputType=="historyUndo")return P.execCommand("undo");if(pe.inputType=="historyRedo")return P.execCommand("redo")}var we=X.value,Ce=ce(we,!0);(we.length>f+100||M.test(Ce)||V&&G<1&&G==Z)&&ie()},ve=function(pe,we,Ce){var Re=pe.clipboardData||window.clipboardData;if(!(!Re||a)){var Le=$||Ce?"Text":"text/plain";try{return we?Re.setData(Le,we)!==!1:Re.getData(Le)}catch(Ie){if(!Ce)return ve(Ie,we,!0)}}},ee=function(pe,we){var Ce=P.getCopyText();if(!Ce)return S.preventDefault(pe);ve(pe,Ce)?(L&&(ie(Ce),U=Ce,setTimeout(function(){U=!1},10)),we?P.onCut():P.onCopy(),S.preventDefault(pe)):(U=!0,X.value=Ce,X.select(),setTimeout(function(){U=!1,ie(),we?P.onCut():P.onCopy()}))},te=function(pe){ee(pe,!0)},ae=function(pe){ee(pe,!1)},he=function(pe){var we=ve(pe);o.pasteCancelled()||(typeof we=="string"?(we&&P.onPaste(we,pe),T.isIE&&setTimeout(ie),S.preventDefault(pe)):(X.value="",z=!0))};S.addCommandKeyListener(X,P.onCommandKey.bind(P),P),S.addListener(X,"select",ge,P),S.addListener(X,"input",le,P),S.addListener(X,"cut",te,P),S.addListener(X,"copy",ae,P),S.addListener(X,"paste",he,P),(!("oncut"in X)||!("oncopy"in X)||!("onpaste"in X))&&S.addListener(F,"keydown",function(pe){if(!(T.isMac&&!pe.metaKey||!pe.ctrlKey))switch(pe.keyCode){case 67:ae(pe);break;case 86:he(pe);break;case 88:te(pe);break}},P);var me=function(pe){if(!(B||!P.onCompositionStart||P.$readOnly)&&(B={},!H)){pe.data&&(B.useTextareaForIME=!1),setTimeout(ye,0),P._signal("compositionStart"),P.on("mousedown",_e);var we=P.getSelectionRange();we.end.row=we.start.row,we.end.column=we.start.column,B.markerRange=we,B.selectionStart=G,P.onCompositionStart(B),B.useTextareaForIME?(W=X.value="",G=0,Z=0):(X.msGetInputContext&&(B.context=X.msGetInputContext()),X.getInputContext&&(B.context=X.getInputContext()))}},ye=function(){if(!(!B||!P.onCompositionUpdate||P.$readOnly)){if(H)return _e();if(B.useTextareaForIME)P.onCompositionUpdate(X.value);else{var pe=X.value;ce(pe),B.markerRange&&(B.context&&(B.markerRange.start.column=B.selectionStart=B.context.compositionStartOffset),B.markerRange.end.column=B.markerRange.start.column+Z-B.selectionStart+J)}}},$e=function(pe){!P.onCompositionEnd||P.$readOnly||(B=!1,P.onCompositionEnd(),P.off("mousedown",_e),pe&&le())};function _e(){N=!0,X.blur(),X.focus(),N=!1}var Se=C.delayedCall(ye,50).schedule.bind(null,null);function be(pe){pe.keyCode==27&&X.value.lengthZ&&W[Oe]==` `?xe=R.end:NeZ&&W.slice(0,Oe).split(` `).length>2?xe=R.down:Oe>Z&&W[Oe-1]==" "?(xe=R.right,Fe=x.option):(Oe>Z||Oe==Z&&Z!=G&&Ne==Oe)&&(xe=R.right),Ne!==Oe&&(Fe|=x.shift),xe){var Be=we.onCommandKey({},Fe,xe);if(!Be&&we.commands){xe=R.keyCodeToString(xe);var De=we.commands.findKeyCommand(Fe,xe);De&&we.execCommand(De)}G=Ne,Z=Oe,ie("")}}};document.addEventListener("selectionchange",Ie),we.on("destroy",function(){document.removeEventListener("selectionchange",Ie)})}this.destroy=function(){X.parentElement&&X.parentElement.removeChild(X)}};r.TextInput=D,r.$setUserAgentForTests=function(F,P){V=F,L=P}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,A){var S=n("../lib/useragent"),E=0,T=550,c=function(){function a($){$.$clickSelection=null;var l=$.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind($)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind($)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind($)),l.setDefaultHandler("quadclick",this.onQuadClick.bind($)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind($));var f=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];f.forEach(function(R){$[R]=this[R]},this),$.selectByLines=this.extendSelectionBy.bind($,"getLineRange"),$.selectByWords=this.extendSelectionBy.bind($,"getWordRange")}return a.prototype.onMouseDown=function($){var l=$.inSelection(),f=$.getDocumentPosition();this.mousedownEvent=$;var R=this.editor,x=$.getButton();if(x!==0){var L=R.getSelectionRange(),M=L.isEmpty();(M||x==1)&&R.selection.moveToPosition(f),x==2&&(R.textInput.onContextMenu($.domEvent),S.isMozilla||$.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!R.isFocused()&&(R.focus(),this.$focusTimeout&&!this.$clickSelection&&!R.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse($);return}return this.captureMouse($),this.startSelect(f,$.domEvent._clicks>1),$.preventDefault()},a.prototype.startSelect=function($,l){$=$||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var f=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?f.selection.selectToPosition($):l||f.selection.moveToPosition($),l||this.select(),f.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var $,l=this.editor,f=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var R=this.$clickSelection.comparePoint(f);if(R==-1)$=this.$clickSelection.end;else if(R==1)$=this.$clickSelection.start;else{var x=o(this.$clickSelection,f);f=x.cursor,$=x.anchor}l.selection.setSelectionAnchor($.row,$.column)}l.selection.selectToPosition(f),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function($){var l,f=this.editor,R=f.renderer.screenToTextCoordinates(this.x,this.y),x=f.selection[$](R.row,R.column);if(this.$clickSelection){var L=this.$clickSelection.comparePoint(x.start),M=this.$clickSelection.comparePoint(x.end);if(L==-1&&M<=0)l=this.$clickSelection.end,(x.end.row!=R.row||x.end.column!=R.column)&&(R=x.start);else if(M==1&&L>=0)l=this.$clickSelection.start,(x.start.row!=R.row||x.start.column!=R.column)&&(R=x.end);else if(L==-1&&M==1)R=x.end,l=x.start;else{var V=o(this.$clickSelection,R);R=V.cursor,l=V.anchor}f.selection.setSelectionAnchor(l.row,l.column)}f.selection.selectToPosition(R),f.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var $=C(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();($>E||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function($){var l=$.getDocumentPosition(),f=this.editor,R=f.session,x=R.getBracketRange(l);x?(x.isEmpty()&&(x.start.column--,x.end.column++),this.setState("select")):(x=f.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=x,this.select()},a.prototype.onTripleClick=function($){var l=$.getDocumentPosition(),f=this.editor;this.setState("selectByLines");var R=f.getSelectionRange();R.isMultiLine()&&R.contains(l.row,l.column)?(this.$clickSelection=f.selection.getLineRange(R.start.row),this.$clickSelection.end=f.selection.getLineRange(R.end.row).end):this.$clickSelection=f.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function($){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function($){if(!$.getAccelKey()){$.getShiftKey()&&$.wheelY&&!$.wheelX&&($.wheelX=$.wheelY,$.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var f=this.$lastScroll,R=$.domEvent.timeStamp,x=R-f.t,L=x?$.wheelX/x:f.vx,M=x?$.wheelY/x:f.vy;x=1&&l.renderer.isScrollableBy($.wheelX*$.speed,0)&&(D=!0),V<=1&&l.renderer.isScrollableBy(0,$.wheelY*$.speed)&&(D=!0),D)f.allowed=R;else if(R-f.allowed=f.length&&(f=void 0),{value:f&&f[L++],done:!f}}};throw new TypeError(R?"Object is not iterable.":"Symbol.iterator is not defined.")},T=n("./lib/dom"),c=n("./range").Range,C="ace_tooltip",o=function(){function f(R){this.isOpen=!1,this.$element=null,this.$parentNode=R}return f.prototype.$init=function(){return this.$element=T.createElement("div"),this.$element.className=C,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},f.prototype.getElement=function(){return this.$element||this.$init()},f.prototype.setText=function(R){this.getElement().textContent=R},f.prototype.setHtml=function(R){this.getElement().innerHTML=R},f.prototype.setPosition=function(R,x){this.getElement().style.left=R+"px",this.getElement().style.top=x+"px"},f.prototype.setClassName=function(R){T.addCssClass(this.getElement(),R)},f.prototype.setTheme=function(R){this.$element.className=C+" "+(R.isDark?"ace_dark ":"")+(R.cssClass||"")},f.prototype.show=function(R,x,L){R!=null&&this.setText(R),x!=null&&L!=null&&this.setPosition(x,L),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},f.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=C,this.isOpen=!1)},f.prototype.getHeight=function(){return this.getElement().offsetHeight},f.prototype.getWidth=function(){return this.getElement().offsetWidth},f.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},f}(),a=function(){function f(){this.popups=[]}return f.prototype.addPopup=function(R){this.popups.push(R),this.updatePopups()},f.prototype.removePopup=function(R){var x=this.popups.indexOf(R);x!==-1&&(this.popups.splice(x,1),this.updatePopups())},f.prototype.updatePopups=function(){var R,x,L,M;this.popups.sort(function(I,Y){return Y.priority-I.priority});var V=[];try{for(var D=E(this.popups),F=D.next();!F.done;F=D.next()){var P=F.value,X=!0;try{for(var U=(L=void 0,E(V)),z=U.next();!z.done;z=U.next()){var B=z.value;if(this.doPopupsOverlap(B,P)){X=!1;break}}}catch(I){L={error:I}}finally{try{z&&!z.done&&(M=U.return)&&M.call(U)}finally{if(L)throw L.error}}X?V.push(P):P.hide()}}catch(I){R={error:I}}finally{try{F&&!F.done&&(x=D.return)&&x.call(D)}finally{if(R)throw R.error}}},f.prototype.doPopupsOverlap=function(R,x){var L=R.getElement().getBoundingClientRect(),M=x.getElement().getBoundingClientRect();return L.leftM.left&&L.topM.top},f}(),$=new a;r.popupManager=$,r.Tooltip=o;var l=function(f){S(R,f);function R(x){x===void 0&&(x=document.body);var L=f.call(this,x)||this;L.timeout=void 0,L.lastT=0,L.idleTime=350,L.lastEvent=void 0,L.onMouseOut=L.onMouseOut.bind(L),L.onMouseMove=L.onMouseMove.bind(L),L.waitForHover=L.waitForHover.bind(L),L.hide=L.hide.bind(L);var M=L.getElement();return M.style.whiteSpace="pre-wrap",M.style.pointerEvents="auto",M.addEventListener("mouseout",L.onMouseOut),M.tabIndex=-1,M.addEventListener("blur",(function(){M.contains(document.activeElement)||this.hide()}).bind(L)),L}return R.prototype.addToEditor=function(x){x.on("mousemove",this.onMouseMove),x.on("mousedown",this.hide),x.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},R.prototype.removeFromEditor=function(x){x.off("mousemove",this.onMouseMove),x.off("mousedown",this.hide),x.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},R.prototype.onMouseMove=function(x,L){this.lastEvent=x,this.lastT=Date.now();var M=L.$mouseHandler.isMousePressed;if(this.isOpen){var V=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(V.row,V.column)||M||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||M||(this.lastEvent=x,this.timeout=setTimeout(this.waitForHover,this.idleTime))},R.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var x=Date.now()-this.lastT;if(this.idleTime-x>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-x);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},R.prototype.isOutsideOfText=function(x){var L=x.editor,M=x.getDocumentPosition(),V=L.session.getLine(M.row);if(M.column==V.length){var D=L.renderer.pixelToScreenCoordinates(x.clientX,x.clientY),F=L.session.documentToScreenPosition(M.row,M.column);if(F.column!=D.column||F.row!=D.row)return!0}return!1},R.prototype.setDataProvider=function(x){this.$gatherData=x},R.prototype.showForRange=function(x,L,M,V){if(!(V&&V!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var D=x.renderer;this.isOpen||($.addPopup(this),this.$registerCloseEvents(),this.setTheme(D.theme)),this.isOpen=!0,this.addMarker(L,x.session),this.range=c.fromPoints(L.start,L.end);var F=this.getElement();F.innerHTML="",F.appendChild(M),F.style.display="block";var P=D.textToScreenCoordinates(L.start.row,L.start.column),X=x.getCursorPosition(),U=F.clientHeight,z=D.scroller.getBoundingClientRect(),B=!0;this.row>X.row?B=!0:this.rowz.bottom&&(B=!1),B?P.pageY+=D.lineHeight:P.pageY-=U,F.style.maxWidth=z.width-(P.pageX-z.left)+"px",this.setPosition(P.pageX,P.pageY)}},R.prototype.addMarker=function(x,L){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=L,this.marker=L&&L.addMarker(x,"ace_highlight-marker","text")},R.prototype.hide=function(x){!x&&document.activeElement==this.getElement()||x&&x.target&&(x.type!="keydown"||x.ctrlKey||x.metaKey)&&this.$element.contains(x.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,$.removePopup(this)))},R.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},R.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},R.prototype.onMouseOut=function(x){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!x.relatedTarget||x.relatedTarget==this.getElement()||x&&x.currentTarget.contains(x.relatedTarget)||x.relatedTarget.classList.contains("ace_content")||this.hide())},R}(o);r.HoverTooltip=l}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,A){var S=this&&this.__extends||function(){var l=function(f,R){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(x[M]=L[M])},l(f,R)};return function(f,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");l(f,R);function x(){this.constructor=f}f.prototype=R===null?Object.create(R):(x.prototype=R.prototype,new x)}}(),E=this&&this.__values||function(l){var f=typeof Symbol=="function"&&Symbol.iterator,R=f&&l[f],x=0;if(R)return R.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&x>=l.length&&(l=void 0),{value:l&&l[x++],done:!l}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},T=n("../lib/dom"),c=n("../lib/event"),C=n("../tooltip").Tooltip,o=n("../config").nls;function a(l){var f=l.editor,R=f.renderer.$gutterLayer,x=new $(f);l.editor.setDefaultHandler("guttermousedown",function(P){if(!(!f.isFocused()||P.getButton()!=0)){var X=R.getRegion(P);if(X!="foldWidgets"){var U=P.getDocumentPosition().row,z=f.session.selection;if(P.getShiftKey())z.selectTo(U,0);else{if(P.domEvent.detail==2)return f.selectAll(),P.preventDefault();l.$clickSelection=f.selection.getLineRange(U)}return l.setState("selectByLines"),l.captureMouse(P),P.preventDefault()}}});var L,M;function V(){var P=M.getDocumentPosition().row,X=f.session.getLength();if(P==X){var U=f.renderer.pixelToScreenCoordinates(0,M.y).row,z=M.$pos;if(U>f.session.documentToScreenRow(z.row,z.column))return D()}if(x.showTooltip(P),!!x.isOpen)if(f.on("mousewheel",D),l.$tooltipFollowsMouse)F(M);else{var B=M.getGutterRow(),I=R.$lines.get(B);if(I){var Y=I.element.querySelector(".ace_gutter_annotation"),H=Y.getBoundingClientRect(),N=x.getElement().style;N.left=H.right+"px",N.top=H.bottom+"px"}else F(M)}}function D(){L&&(L=clearTimeout(L)),x.isOpen&&(x.hideTooltip(),f.off("mousewheel",D))}function F(P){x.setPosition(P.x,P.y)}l.editor.setDefaultHandler("guttermousemove",function(P){var X=P.domEvent.target||P.domEvent.srcElement;if(T.hasCssClass(X,"ace_fold-widget"))return D();x.isOpen&&l.$tooltipFollowsMouse&&F(P),M=P,!L&&(L=setTimeout(function(){L=null,M&&!l.isMousePressed?V():D()},50))}),c.addListener(f.renderer.$gutter,"mouseout",function(P){M=null,!(!x.isOpen||L)&&(L=setTimeout(function(){L=null,D()},50))},f),f.on("changeSession",D),f.on("input",D)}r.GutterHandler=a;var $=function(l){S(f,l);function f(R){var x=l.call(this,R.container)||this;return x.editor=R,x}return f.prototype.setPosition=function(R,x){var L=window.innerWidth||document.documentElement.clientWidth,M=window.innerHeight||document.documentElement.clientHeight,V=this.getWidth(),D=this.getHeight();R+=15,x+=15,R+V>L&&(R-=R+V-L),x+D>M&&(x-=20+D),C.prototype.setPosition.call(this,R,x)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:o("error"),plural:o("errors")},warning:{singular:o("warning"),plural:o("warnings")},info:{singular:o("information message"),plural:o("information messages")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(R){var x=this.editor.renderer.$gutterLayer,L=x.$annotations[R],M;L?M={text:Array.from(L.text),type:Array.from(L.type)}:M={text:[],type:[]};var V=x.session.getFoldLine(R);if(V&&x.$showFoldedAnnotations){for(var D={error:[],warning:[],info:[]},F,P=R+1;P<=V.end.row;P++)if(x.$annotations[P])for(var X=0;X ").concat(M.text[P]);B[M.type[P].replace("_fold","")].push(Y)}var H=[].concat(B.error,B.warning,B.info).join("
");this.setHtml(H),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},f.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},f.annotationsToSummaryString=function(R){var x,L,M=[],V=["error","warning","info"];try{for(var D=E(V),F=D.next();!F.done;F=D.next()){var P=F.value;if(R[P].length){var X=R[P].length===1?f.annotationLabels[P].singular:f.annotationLabels[P].plural;M.push("".concat(R[P].length," ").concat(X))}}}catch(U){x={error:U}}finally{try{F&&!F.done&&(L=D.return)&&L.call(D)}finally{if(x)throw x.error}}return M.join(", ")},f}(C);r.GutterTooltip=$}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,A){var S=n("../lib/event"),E=n("../lib/useragent"),T=function(){function c(C,o){this.domEvent=C,this.editor=o,this.x=this.clientX=C.clientX,this.y=this.clientY=C.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){S.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){S.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var C=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(C,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-a},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var C=this.editor,o=C.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=o.contains(a.row,a.column)}return this.$inSelection},c.prototype.getButton=function(){return S.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return E.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c}();r.MouseEvent=T}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,A){var S=n("../lib/dom"),E=n("../lib/event"),T=n("../lib/useragent"),c=200,C=200,o=5;function a(l){var f=l.editor,R=S.createElement("div");R.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",R.textContent=" ";var x=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];x.forEach(function(oe){l[oe]=this[oe]},this),f.on("mousedown",this.onMouseDown.bind(l));var L=f.container,M,V,D,F,P,X,U=0,z,B,I,Y,H;this.onDragStart=function(oe){if(this.cancelDrag||!L.draggable){var ie=this;return setTimeout(function(){ie.startSelect(),ie.captureMouse(oe)},0),oe.preventDefault()}P=f.getSelectionRange();var fe=oe.dataTransfer;fe.effectAllowed=f.getReadOnly()?"copy":"copyMove",f.container.appendChild(R),fe.setDragImage&&fe.setDragImage(R,0,0),setTimeout(function(){f.container.removeChild(R)}),fe.clearData(),fe.setData("Text",f.session.getTextRange()),B=!0,this.setState("drag")},this.onDragEnd=function(oe){if(L.draggable=!1,B=!1,this.setState(null),!f.getReadOnly()){var ie=oe.dataTransfer.dropEffect;!z&&ie=="move"&&f.session.remove(f.getSelectionRange()),f.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(oe){if(!(f.getReadOnly()||!re(oe.dataTransfer)))return V=oe.clientX,D=oe.clientY,M||Z(),U++,oe.dataTransfer.dropEffect=z=ue(oe),E.preventDefault(oe)},this.onDragOver=function(oe){if(!(f.getReadOnly()||!re(oe.dataTransfer)))return V=oe.clientX,D=oe.clientY,M||(Z(),U++),Q!==null&&(Q=null),oe.dataTransfer.dropEffect=z=ue(oe),E.preventDefault(oe)},this.onDragLeave=function(oe){if(U--,U<=0&&M)return J(),z=null,E.preventDefault(oe)},this.onDrop=function(oe){if(X){var ie=oe.dataTransfer;if(B)switch(z){case"move":P.contains(X.row,X.column)?P={start:X,end:X}:P=f.moveText(P,X);break;case"copy":P=f.moveText(P,X,!0);break}else{var fe=ie.getData("Text");P={start:X,end:f.session.insert(X,fe)},f.focus(),z=null}return J(),E.preventDefault(oe)}},E.addListener(L,"dragstart",this.onDragStart.bind(l),f),E.addListener(L,"dragend",this.onDragEnd.bind(l),f),E.addListener(L,"dragenter",this.onDragEnter.bind(l),f),E.addListener(L,"dragover",this.onDragOver.bind(l),f),E.addListener(L,"dragleave",this.onDragLeave.bind(l),f),E.addListener(L,"drop",this.onDrop.bind(l),f);function N(oe,ie){var fe=Date.now(),ge=!ie||oe.row!=ie.row,se=!ie||oe.column!=ie.column;if(!Y||ge||se)f.moveCursorToPosition(oe),Y=fe,H={x:V,y:D};else{var de=$(H.x,H.y,V,D);de>o?Y=null:fe-Y>=C&&(f.renderer.scrollCursorIntoView(),Y=null)}}function W(oe,ie){var fe=Date.now(),ge=f.renderer.layerConfig.lineHeight,se=f.renderer.layerConfig.characterWidth,de=f.renderer.scroller.getBoundingClientRect(),ce={x:{left:V-de.left,right:de.right-V},y:{top:D-de.top,bottom:de.bottom-D}},le=Math.min(ce.x.left,ce.x.right),ve=Math.min(ce.y.top,ce.y.bottom),ee={row:oe.row,column:oe.column};le/se<=2&&(ee.column+=ce.x.left=c&&f.renderer.scrollCursorIntoView(ee):I=fe:I=null}function G(){var oe=X;X=f.renderer.screenToTextCoordinates(V,D),N(X,oe),W(X,oe)}function Z(){P=f.selection.toOrientedRange(),M=f.session.addMarker(P,"ace_selection",f.getSelectionStyle()),f.clearSelection(),f.isFocused()&&f.renderer.$cursorLayer.setBlinking(!1),clearInterval(F),G(),F=setInterval(G,20),U=0,E.addListener(document,"mousemove",ne)}function J(){clearInterval(F),f.session.removeMarker(M),M=null,f.selection.fromOrientedRange(P),f.isFocused()&&!B&&f.$resetCursorStyle(),P=null,X=null,U=0,I=null,Y=null,E.removeListener(document,"mousemove",ne)}var Q=null;function ne(){Q==null&&(Q=setTimeout(function(){Q!=null&&M&&J()},20))}function re(oe){var ie=oe.types;return!ie||Array.prototype.some.call(ie,function(fe){return fe=="text/plain"||fe=="Text"})}function ue(oe){var ie=["copy","copymove","all","uninitialized"],fe=["move","copymove","linkmove","all","uninitialized"],ge=T.isMac?oe.altKey:oe.ctrlKey,se="uninitialized";try{se=oe.dataTransfer.effectAllowed.toLowerCase()}catch{}var de="none";return ge&&ie.indexOf(se)>=0?de="copy":fe.indexOf(se)>=0?de="move":ie.indexOf(se)>=0&&(de="copy"),de}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,f=l.container;f.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var R=T.isWin?"default":"move";l.renderer.setCursorStyle(R),this.setState("dragReady")},this.onMouseDrag=function(l){var f=this.editor.container;if(T.isIE&&this.state=="dragReady"){var R=$(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);R>3&&f.dragDrop()}if(this.state==="dragWait"){var R=$(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);R>0&&(f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var f=this.editor,R=l.inSelection(),x=l.getButton(),L=l.domEvent.detail||1;if(L===1&&x===0&&R){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var M=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in M&&(M.unselectable="on"),f.getDragDelay()){if(T.isWebKit){this.cancelDrag=!0;var V=f.container;V.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function $(l,f,R,x){return Math.sqrt(Math.pow(R-l,2)+Math.pow(x-f,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,A){var S=n("./mouse_event").MouseEvent,E=n("../lib/event"),T=n("../lib/dom");r.addTouchListeners=function(c,C){var o="scroll",a,$,l,f,R,x,L=0,M,V=0,D=0,F=0,P,X;function U(){var N=window.navigator&&window.navigator.clipboard,W=!1,G=function(){var J=C.getCopyText(),Q=C.session.getUndoManager().hasUndo();X.replaceChild(T.buildDom(W?["span",!J&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],J&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],J&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],N&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Q&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),X.firstChild)},Z=function(J){var Q=J.target.getAttribute("action");if(Q=="more"||!W)return W=!W,G();Q=="paste"?N.readText().then(function(ne){C.execCommand(Q,ne)}):Q&&((Q=="cut"||Q=="copy")&&(N?N.writeText(C.getCopyText()):document.execCommand("copy")),C.execCommand(Q)),X.firstChild.style.display="none",W=!1,Q!="openCommandPallete"&&C.focus()};X=T.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(J){o="menu",J.stopPropagation(),J.preventDefault(),C.textInput.focus()},ontouchend:function(J){J.stopPropagation(),J.preventDefault(),Z(J)},onclick:Z},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],C.container)}function z(){X||U();var N=C.selection.cursor,W=C.renderer.textToScreenCoordinates(N.row,N.column),G=C.renderer.textToScreenCoordinates(0,0).pageX,Z=C.renderer.scrollLeft,J=C.container.getBoundingClientRect();X.style.top=W.pageY-J.top-3+"px",W.pageX-J.left=2?C.selection.getLineRange(M.row):C.session.getBracketRange(M);N&&!N.isEmpty()?C.selection.setRange(N):C.selection.selectWord(),o="wait"}E.addListener(c,"contextmenu",function(N){if(P){var W=C.textInput.getElement();W.focus()}},C),E.addListener(c,"touchstart",function(N){var W=N.touches;if(R||W.length>1){clearTimeout(R),R=null,l=-1,o="zoom";return}P=C.$mouseHandler.isMousePressed=!0;var G=C.renderer.layerConfig.lineHeight,Z=C.renderer.layerConfig.lineHeight,J=N.timeStamp;f=J;var Q=W[0],ne=Q.clientX,re=Q.clientY;Math.abs(a-ne)+Math.abs($-re)>G&&(l=-1),a=N.clientX=ne,$=N.clientY=re,D=F=0;var ue=new S(N,C);if(M=ue.getDocumentPosition(),J-l<500&&W.length==1&&!L)V++,N.preventDefault(),N.button=0,Y();else{V=0;var oe=C.selection.cursor,ie=C.selection.isEmpty()?oe:C.selection.anchor,fe=C.renderer.$cursorLayer.getPixelPosition(oe,!0),ge=C.renderer.$cursorLayer.getPixelPosition(ie,!0),se=C.renderer.scroller.getBoundingClientRect(),de=C.renderer.layerConfig.offset,ce=C.renderer.scrollLeft,le=function(te,ae){return te=te/Z,ae=ae/G-.75,te*te+ae*ae};if(N.clientXee?"cursor":"anchor"),ee<3.5?o="anchor":ve<3.5?o="cursor":o="scroll",R=setTimeout(I,450)}l=J},C),E.addListener(c,"touchend",function(N){P=C.$mouseHandler.isMousePressed=!1,x&&clearInterval(x),o=="zoom"?(o="",L=0):R?(C.selection.moveToPosition(M),L=0,z()):o=="scroll"?(H(),B()):z(),clearTimeout(R),R=null},C),E.addListener(c,"touchmove",function(N){R&&(clearTimeout(R),R=null);var W=N.touches;if(!(W.length>1||o=="zoom")){var G=W[0],Z=a-G.clientX,J=$-G.clientY;if(o=="wait")if(Z*Z+J*J>4)o="cursor";else return N.preventDefault();a=G.clientX,$=G.clientY,N.clientX=G.clientX,N.clientY=G.clientY;var Q=N.timeStamp,ne=Q-f;if(f=Q,o=="scroll"){var re=new S(N,C);re.speed=1,re.wheelX=Z,re.wheelY=J,10*Math.abs(Z)0)if(ee==16){for(he=ae;he-1){for(he=ae;he=0&&ge[$e]==P;$e--)ie[$e]=S}}}function ne(oe,ie,fe){if(!(E=oe){for(de=se+1;de=oe;)de++;for(ce=se,le=de-1;ce=ie.length||(de=fe[ge-1])!=x&&de!=L||(ce=ie[ge+1])!=x&&ce!=L?M:(T&&(ce=L),ce==de?ce:M);case U:return de=ge>0?fe[ge-1]:V,de==x&&ge+10&&fe[ge-1]==x)return x;if(T)return M;for(ve=ge+1,le=ie.length;ve=1425&&ee<=2303||ee==64286;if(de=ie[ve],te&&(de==R||de==F))return R}return ge<1||(de=ie[ge-1])==V?M:fe[ge-1];case V:return T=!1,c=!0,S;case D:return C=!0,M;case I:case Y:case N:case W:case H:T=!1;case G:return M}}function ue(oe){var ie=oe.charCodeAt(0),fe=ie>>8;return fe==0?ie>191?f:Z[ie]:fe==5?/[\u0591-\u05f4]/.test(oe)?R:f:fe==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(oe)?B:/[\u0660-\u0669\u066b-\u066c]/.test(oe)?L:ie==1642?z:/[\u06f0-\u06f9]/.test(oe)?x:F:fe==32&&ie<=8287?J[ie&255]:fe==254&&ie>=65136?F:M}r.L=f,r.R=R,r.EN=x,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(oe,ie,fe){if(oe.length<2)return{};var ge=oe.split(""),se=new Array(ge.length),de=new Array(ge.length),ce=[];S=fe?l:$,Q(ge,ce,ge.length,ie);for(var le=0;leF&&ie[le]0&&ge[le-1]==="Ù„"&&/\u0622|\u0623|\u0625|\u0627/.test(ge[le])&&(ce[le-1]=ce[le]=r.R_H,le++);ge[ge.length-1]===r.DOT&&(ce[ge.length-1]=r.B),ge[0]==="‫"&&(ce[0]=r.RLE);for(var le=0;le=0&&(o=this.session.$docRowCache[$])}return o},C.prototype.getSplitIndex=function(){var o=0,a=this.session.$screenRowCache;if(a.length)for(var $,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-o>0&&($=this.session.$getRowCacheIndex(a,this.currentRow-o-1),$===l);)l=$,o++;else o=this.currentRow;return o},C.prototype.updateRowLine=function(o,a){o===void 0&&(o=this.getDocumentRow());var $=o===this.session.getLength()-1,l=$?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var f=this.session.$wrapData[o];f&&(a===void 0&&(a=this.getSplitIndex()),a>0&&f.length?(this.wrapIndent=f.indent,this.wrapOffset=this.wrapIndent*this.charWidths[S.L],this.line=aa?this.session.getOverwrite()?o:o-1:a,l=S.getVisualFromLogicalIdx($,this.bidiMap),f=this.bidiMap.bidiLevels,R=0;!this.session.getOverwrite()&&o<=a&&f[l]%2!==0&&l++;for(var x=0;xa&&f[l]%2===0&&(R+=this.charWidths[f[l]]),this.wrapIndent&&(R+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(R+=this.rtlLineOffset),R},C.prototype.getSelections=function(o,a){var $=this.bidiMap,l=$.bidiLevels,f,R=[],x=0,L=Math.min(o,a)-this.wrapIndent,M=Math.max(o,a)-this.wrapIndent,V=!1,D=!1,F=0;this.wrapIndent&&(x+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var P,X=0;X=L&&Pl+x/2;){if(l+=x,f===R.length-1){x=0;break}x=this.charWidths[R[++f]]}return f>0&&R[f-1]%2!==0&&R[f]%2===0?($0&&R[f-1]%2===0&&R[f]%2!==0?a=1+($>l?this.bidiMap.logicalFromVisual[f]:this.bidiMap.logicalFromVisual[f-1]):this.isRtlDir&&f===R.length-1&&x===0&&R[f-1]%2===0||!this.isRtlDir&&f===0&&R[f]%2!==0?a=1+this.bidiMap.logicalFromVisual[f]:(f>0&&R[f-1]%2!==0&&x!==0&&f--,a=this.bidiMap.logicalFromVisual[f]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},C}();r.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,A){var S=n("./lib/oop"),E=n("./lib/lang"),T=n("./lib/event_emitter").EventEmitter,c=n("./range").Range,C=function(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var a=this;this.cursor.on("change",function($){a.$cursorChanged=!0,a.$silent||a._emit("changeCursor"),!a.$isEmpty&&!a.$silent&&a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&$.old.column!=$.value.column&&(a.$desiredColumn=null)}),this.anchor.on("change",function(){a.$anchorChanged=!0,!a.$isEmpty&&!a.$silent&&a._emit("changeSelection")})};(function(){S.implement(this,T),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(o,a){this.$isEmpty=!1,this.anchor.setPosition(o,a)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var o=this.anchor,a=this.lead;return o.row>a.row||o.row==a.row&&o.column>a.column},this.getRange=function(){var o=this.anchor,a=this.lead;return this.$isEmpty?c.fromPoints(a,a):this.isBackwards()?c.fromPoints(a,o):c.fromPoints(o,a)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(o,a){var $=a?o.end:o.start,l=a?o.start:o.end;this.$setSelection($.row,$.column,l.row,l.column)},this.$setSelection=function(o,a,$,l){if(!this.$silent){var f=this.$isEmpty,R=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,a),this.cursor.setPosition($,l),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||f!=this.$isEmpty||R)&&this._emit("changeSelection")}},this.$moveSelection=function(o){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),o.call(this)},this.selectTo=function(o,a){this.$moveSelection(function(){this.moveCursorTo(o,a)})},this.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},this.moveTo=function(o,a){this.clearSelection(),this.moveCursorTo(o,a)},this.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(o,a){if(typeof a>"u"){var $=o||this.lead;o=$.row,a=$.column}return this.session.getWordRange(o,a)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var o=this.getCursor(),a=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(a)},this.getLineRange=function(o,a){var $=typeof o=="number"?o:this.lead.row,l,f=this.session.getFoldLine($);return f?($=f.start.row,l=f.end.row):l=$,a===!0?new c($,0,l,this.session.getLine(l).length):new c($,0,l+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(o,a,$){var l=o.column,f=o.column+a;return $<0&&(l=o.column-a,f=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(l,f).split(" ").length-1==a},this.moveCursorLeft=function(){var o=this.lead.getPosition(),a;if(a=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var $=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,$,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-$):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var o=this.lead.getPosition(),a;if(a=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(a.column=l)}}this.moveCursorTo(a.row,a.column)},this.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,a=this.doc.getLine(o).length;this.moveCursorTo(o,a)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var o=this.lead.row,a=this.lead.column,$=this.doc.getLine(o),l=$.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(o,a,1);if(f){this.moveCursorTo(f.end.row,f.end.column);return}if(this.session.nonTokenRe.exec(l)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,l=$.substring(a)),a>=$.length){this.moveCursorTo(o,$.length),this.moveCursorRight(),o0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(f)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,a)},this.$shortWordEndIndex=function(o){var a=0,$,l=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,this.session.tokenRe.exec(o))a=this.session.tokenRe.lastIndex;else{for(;($=o[a])&&l.test($);)a++;if(a<1){for(f.lastIndex=0;($=o[a])&&!f.test($);)if(f.lastIndex=0,a++,l.test($))if(a>2){a--;break}else{for(;($=o[a])&&l.test($);)a++;if(a>2)break}}}return f.lastIndex=0,a},this.moveCursorShortWordRight=function(){var o=this.lead.row,a=this.lead.column,$=this.doc.getLine(o),l=$.substring(a),f=this.session.getFoldAt(o,a,1);if(f)return this.moveCursorTo(f.end.row,f.end.column);if(a==$.length){var R=this.doc.getLength();do o++,l=this.doc.getLine(o);while(o0&&/^\s*$/.test(l));a=l.length,/\s+$/.test(l)||(l="")}var f=E.stringReverse(l),R=this.$shortWordEndIndex(f);return this.moveCursorTo(o,a-R)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(o,a){var $=this.session.documentToScreenPosition(this.lead.row,this.lead.column),l;if(a===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow($.row,this.lead.row)?(l=this.session.$bidiHandler.getPosLeft($.column),$.column=Math.round(l/this.session.$bidiHandler.charWidths[0])):l=$.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?$.column=this.$desiredColumn:this.$desiredColumn=$.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var f=this.session.lineWidgets[this.lead.row];o<0?o-=f.rowsAbove||0:o>0&&(o+=f.rowCount-(f.rowsAbove||0))}var R=this.session.screenToDocumentPosition($.row+o,$.column,l);o!==0&&a===0&&R.row===this.lead.row&&(R.column,this.lead.column),this.moveCursorTo(R.row,R.column+a,a===0)},this.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},this.moveCursorTo=function(o,a,$){var l=this.session.getFoldAt(o,a,1);l&&(o=l.start.row,a=l.start.column),this.$keepDesiredColumnOnChange=!0;var f=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(f.charAt(a))&&f.charAt(a-1)&&(this.lead.row==o&&this.lead.column==a+1?a=a-1:a=a+1),this.lead.setPosition(o,a),this.$keepDesiredColumnOnChange=!1,$||(this.$desiredColumn=null)},this.moveCursorToScreen=function(o,a,$){var l=this.session.screenToDocumentPosition(o,a);this.moveCursorTo(l.row,l.column,$)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(o){var a=this.getRange();return o?(o.start.column=a.start.column,o.start.row=a.start.row,o.end.column=a.end.column,o.end.row=a.end.row):o=a,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},this.getRangeOfMovements=function(o){var a=this.getCursor();try{o(this);var $=this.getCursor();return c.fromPoints(a,$)}catch{return c.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},this.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(a){var $=a.clone();return $.isBackwards=a.cursor==a.start,$});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},this.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var a=o.length;a--;){var $=c.fromPoints(o[a].start,o[a].end);o[a].isBackwards&&($.cursor=$.start),this.addRange($,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},this.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(o[a]))return!1;return!0}}).call(C.prototype),r.Selection=C}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(n,r,A){var S=n("./config"),E=2e3,T=function(){function c(C){this.states=C,this.regExps={},this.matchMappings={};for(var o in this.states){for(var a=this.states[o],$=[],l=0,f=this.matchMappings[o]={defaultToken:"text"},R="g",x=[],L=0;L1?M.onMatch=this.$applyToken:M.onMatch=M.token),D>1&&(/\\\d/.test(M.regex)?V=M.regex.replace(/\\([0-9]+)/g,function(F,P){return"\\"+(parseInt(P,10)+l+1)}):(D=1,V=this.removeCapturingGroups(M.regex)),!M.splitRegex&&typeof M.token!="string"&&x.push(M)),f[l]=L,l+=D,$.push(V),M.onMatch||(M.onMatch=null)}}$.length||(f[0]=0,$.push("$")),x.forEach(function(F){F.splitRegex=this.createSplitterRegexp(F.regex,R)},this),this.regExps[o]=new RegExp("("+$.join(")|(")+")|($)",R)}}return c.prototype.$setMaxTokenCount=function(C){E=C|0},c.prototype.$applyToken=function(C){var o=this.splitRegex.exec(C).slice(1),a=this.token.apply(this,o);if(typeof a=="string")return[{type:a,value:C}];for(var $=[],l=0,f=a.length;lM){var z=C.substring(M,U-X.length);D.type==F?D.value+=z:(D.type&&L.push(D),D={type:F,value:z})}for(var B=0;BE){for(V>2*C.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:C});M1&&a[0]!==$&&a.unshift("#tmp",$),{tokens:L,state:a.length?a:$}},c}();T.prototype.reportError=S.reportError,r.Tokenizer=T}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(n,r,A){var S=n("../lib/lang"),E=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(C,o){if(!o){for(var a in C)this.$rules[a]=C[a];return}for(var a in C){for(var $=C[a],l=0;l<$.length;l++){var f=$[l];(f.next||f.onMatch)&&(typeof f.next=="string"&&f.next.indexOf(o)!==0&&(f.next=o+f.next),f.nextState&&f.nextState.indexOf(o)!==0&&(f.nextState=o+f.nextState))}this.$rules[o+a]=$}},this.getRules=function(){return this.$rules},this.embedRules=function(C,o,a,$,l){var f=typeof C=="function"?new C().getRules():C;if($)for(var R=0;R<$.length;R++)$[R]=o+$[R];else{$=[];for(var x in f)$.push(o+x)}if(this.addRules(f,o),a)for(var L=Array.prototype[l?"push":"unshift"],R=0;R<$.length;R++)L.apply(this.$rules[$[R]],S.deepCopy(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var T=function(C,o){return(C!="start"||o.length)&&o.unshift(this.nextState,C),this.nextState},c=function(C,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var C=0,o=this.$rules;function a($){var l=o[$];l.processed=!0;for(var f=0;f=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},T.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},T.prototype.getCurrentTokenRow=function(){return this.$row},T.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,C=this.$tokenIndex,o=c[C].start;if(o!==void 0)return o;for(o=0;C>0;)C-=1,o+=c[C].value.length;return o},T.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},T.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],C=this.getCurrentTokenColumn();return new S(this.$row,C,this.$row,C+c.value.length)},T}();r.TokenIterator=E}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,A){var S=n("../../lib/oop"),E=n("../behaviour").Behaviour,T=n("../../token_iterator").TokenIterator,c=n("../../lib/lang"),C=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,$={},l={'"':'"',"'":"'"},f=function(L){var M=-1;if(L.multiSelect&&(M=L.selection.index,$.rangeCount!=L.multiSelect.rangeCount&&($={rangeCount:L.multiSelect.rangeCount})),$[M])return a=$[M];a=$[M]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},R=function(L,M,V,D){var F=L.end.row-L.start.row;return{text:V+M+D,selection:[0,L.start.column+1,F,L.end.column+(F?0:1)]}},x=function(L){L=L||{},this.add("braces","insertion",function(M,V,D,F,P){var X=D.getCursorPosition(),U=F.doc.getLine(X.row);if(P=="{"){f(D);var z=D.getSelectionRange(),B=F.doc.getTextRange(z);if(B!==""&&B!=="{"&&D.getWrapBehavioursEnabled())return R(z,B,"{","}");if(x.isSaneInsertion(D,F))return/[\]\}\)]/.test(U[X.column])||D.inMultiSelectMode||L.braces?(x.recordAutoInsert(D,F,"}"),{text:"{}",selection:[1,1]}):(x.recordMaybeInsert(D,F,"{"),{text:"{",selection:[1,1]})}else if(P=="}"){f(D);var I=U.substring(X.column,X.column+1);if(I=="}"){var Y=F.$findOpeningBracket("}",{column:X.column+1,row:X.row});if(Y!==null&&x.isAutoInsertedClosing(X,U,P))return x.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(P==` `||P==`\r `){f(D);var H="";x.isMaybeInsertedClosing(X,U)&&(H=c.stringRepeat("}",a.maybeInsertedBrackets),x.clearMaybeInsertedClosing());var I=U.substring(X.column,X.column+1);if(I==="}"){var N=F.findMatchingBracket({row:X.row,column:X.column+1},"}");if(!N)return null;var W=this.$getIndent(F.getLine(N.row))}else if(H)var W=this.$getIndent(U);else{x.clearMaybeInsertedClosing();return}var G=W+F.getTabString();return{text:` `+G+` `+W+H,selection:[1,G.length,1,G.length]}}else x.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(M,V,D,F,P){var X=F.doc.getTextRange(P);if(!P.isMultiLine()&&X=="{"){f(D);var U=F.doc.getLine(P.start.row),z=U.substring(P.end.column,P.end.column+1);if(z=="}")return P.end.column++,P;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(M,V,D,F,P){if(P=="("){f(D);var X=D.getSelectionRange(),U=F.doc.getTextRange(X);if(U!==""&&D.getWrapBehavioursEnabled())return R(X,U,"(",")");if(x.isSaneInsertion(D,F))return x.recordAutoInsert(D,F,")"),{text:"()",selection:[1,1]}}else if(P==")"){f(D);var z=D.getCursorPosition(),B=F.doc.getLine(z.row),I=B.substring(z.column,z.column+1);if(I==")"){var Y=F.$findOpeningBracket(")",{column:z.column+1,row:z.row});if(Y!==null&&x.isAutoInsertedClosing(z,B,P))return x.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(M,V,D,F,P){var X=F.doc.getTextRange(P);if(!P.isMultiLine()&&X=="("){f(D);var U=F.doc.getLine(P.start.row),z=U.substring(P.start.column+1,P.start.column+2);if(z==")")return P.end.column++,P}}),this.add("brackets","insertion",function(M,V,D,F,P){if(P=="["){f(D);var X=D.getSelectionRange(),U=F.doc.getTextRange(X);if(U!==""&&D.getWrapBehavioursEnabled())return R(X,U,"[","]");if(x.isSaneInsertion(D,F))return x.recordAutoInsert(D,F,"]"),{text:"[]",selection:[1,1]}}else if(P=="]"){f(D);var z=D.getCursorPosition(),B=F.doc.getLine(z.row),I=B.substring(z.column,z.column+1);if(I=="]"){var Y=F.$findOpeningBracket("]",{column:z.column+1,row:z.row});if(Y!==null&&x.isAutoInsertedClosing(z,B,P))return x.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(M,V,D,F,P){var X=F.doc.getTextRange(P);if(!P.isMultiLine()&&X=="["){f(D);var U=F.doc.getLine(P.start.row),z=U.substring(P.start.column+1,P.start.column+2);if(z=="]")return P.end.column++,P}}),this.add("string_dquotes","insertion",function(M,V,D,F,P){var X=F.$mode.$quotes||l;if(P.length==1&&X[P]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(P)!=-1)return;f(D);var U=P,z=D.getSelectionRange(),B=F.doc.getTextRange(z);if(B!==""&&(B.length!=1||!X[B])&&D.getWrapBehavioursEnabled())return R(z,B,U,U);if(!B){var I=D.getCursorPosition(),Y=F.doc.getLine(I.row),H=Y.substring(I.column-1,I.column),N=Y.substring(I.column,I.column+1),W=F.getTokenAt(I.row,I.column),G=F.getTokenAt(I.row,I.column+1);if(H=="\\"&&W&&/escape/.test(W.type))return null;var Z=W&&/string|escape/.test(W.type),J=!G||/string|escape/.test(G.type),Q;if(N==U)Q=Z!==J,Q&&/string\.end/.test(G.type)&&(Q=!1);else{if(Z&&!J||Z&&J)return null;var ne=F.$mode.tokenRe;ne.lastIndex=0;var re=ne.test(H);ne.lastIndex=0;var ue=ne.test(N),oe=F.$mode.$pairQuotesAfter,ie=oe&&oe[U]&&oe[U].test(H);if(!ie&&re||ue||N&&!/[\s;,.})\]\\]/.test(N))return null;var fe=Y[I.column-2];if(H==U&&(fe==U||ne.test(fe)))return null;Q=!0}return{text:Q?U+U:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(M,V,D,F,P){var X=F.$mode.$quotes||l,U=F.doc.getTextRange(P);if(!P.isMultiLine()&&X.hasOwnProperty(U)){f(D);var z=F.doc.getLine(P.start.row),B=z.substring(P.start.column+1,P.start.column+2);if(B==U)return P.end.column++,P}}),L.closeDocComment!==!1&&this.add("doc comment end","insertion",function(M,V,D,F,P){if(M==="doc-start"&&(P===` `||P===`\r `)&&D.selection.isEmpty()){var X=D.getCursorPosition(),U=F.doc.getLine(X.row),z=F.doc.getLine(X.row+1),B=this.$getIndent(U);if(/\s*\*/.test(z))return/^\s*\*/.test(U)?{text:P+B+"* ",selection:[1,3+B.length,1,3+B.length]}:{text:P+B+" * ",selection:[1,3+B.length,1,3+B.length]};if(/\/\*\*/.test(U.substring(0,X.column)))return{text:P+B+" * "+P+" "+B+"*/",selection:[1,4+B.length,1,4+B.length]}}})};x.isSaneInsertion=function(L,M){var V=L.getCursorPosition(),D=new T(M,V.row,V.column);if(!this.$matchTokenType(D.getCurrentToken()||"text",C)){if(/[)}\]]/.test(L.session.getLine(V.row)[V.column]))return!0;var F=new T(M,V.row,V.column+1);if(!this.$matchTokenType(F.getCurrentToken()||"text",C))return!1}return D.stepForward(),D.getCurrentTokenRow()!==V.row||this.$matchTokenType(D.getCurrentToken()||"text",o)},x.$matchTokenType=function(L,M){return M.indexOf(L.type||L)>-1},x.recordAutoInsert=function(L,M,V){var D=L.getCursorPosition(),F=M.doc.getLine(D.row);this.isAutoInsertedClosing(D,F,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=D.row,a.autoInsertedLineEnd=V+F.substr(D.column),a.autoInsertedBrackets++},x.recordMaybeInsert=function(L,M,V){var D=L.getCursorPosition(),F=M.doc.getLine(D.row);this.isMaybeInsertedClosing(D,F)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=D.row,a.maybeInsertedLineStart=F.substr(0,D.column)+V,a.maybeInsertedLineEnd=F.substr(D.column),a.maybeInsertedBrackets++},x.isAutoInsertedClosing=function(L,M,V){return a.autoInsertedBrackets>0&&L.row===a.autoInsertedRow&&V===a.autoInsertedLineEnd[0]&&M.substr(L.column)===a.autoInsertedLineEnd},x.isMaybeInsertedClosing=function(L,M){return a.maybeInsertedBrackets>0&&L.row===a.maybeInsertedRow&&M.substr(L.column)===a.maybeInsertedLineEnd&&M.substr(0,L.column)==a.maybeInsertedLineStart},x.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},x.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},S.inherits(x,E),r.CstyleBehaviour=x}),ace.define("ace/unicode",["require","exports","module"],function(n,r,A){for(var S=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],E=0,T=[],c=0;c2?fe%P!=P-1:fe%P==0}}else{if(!this.blockComment)return!1;var U=this.blockComment.start,z=this.blockComment.end,B=new RegExp("^(\\s*)(?:"+o.escapeRegExp(U)+")"),I=new RegExp("(?:"+o.escapeRegExp(z)+")\\s*$"),Y=function(Q,ne){N(Q,ne)||(!V||/\S/.test(Q))&&(M.insertInLine({row:ne,column:Q.length},z),M.insertInLine({row:ne,column:F},U))},H=function(Q,ne){var re;(re=Q.match(I))&&M.removeInLine(ne,Q.length-re[0].length,Q.length),(re=Q.match(B))&&M.removeInLine(ne,re[1].length,re[0].length)},N=function(Q,ne){if(B.test(Q))return!0;for(var re=R.getTokens(ne),ue=0;ueQ.length&&(J=Q.length)}),F==1/0&&(F=J,V=!1,D=!1),X&&F%P!=0&&(F=Math.floor(F/P)*P),Z(D?H:Y)},this.toggleBlockComment=function(f,R,x,L){var M=this.blockComment;if(M){!M.start&&M[0]&&(M=M[0]);var V=new a(R,L.row,L.column),D=V.getCurrentToken();R.selection;var F=R.selection.toOrientedRange(),P,X;if(D&&/comment/.test(D.type)){for(var U,z;D&&/comment/.test(D.type);){var B=D.value.indexOf(M.start);if(B!=-1){var I=V.getCurrentTokenRow(),Y=V.getCurrentTokenColumn()+B;U=new $(I,Y,I,Y+M.start.length);break}D=V.stepBackward()}for(var V=new a(R,L.row,L.column),D=V.getCurrentToken();D&&/comment/.test(D.type);){var B=D.value.indexOf(M.end);if(B!=-1){var I=V.getCurrentTokenRow(),Y=V.getCurrentTokenColumn()+B;z=new $(I,Y,I,Y+M.end.length);break}D=V.stepForward()}z&&R.remove(z),U&&(R.remove(U),P=U.start.row,X=-M.start.length)}else X=M.start.length,P=x.start.row,R.insert(x.end,M.end),R.insert(x.start,M.start);F.start.row==P&&(F.start.column+=X),F.end.row==P&&(F.end.column+=X),R.selection.fromOrientedRange(F)}},this.getNextLineIndent=function(f,R,x){return this.$getIndent(R)},this.checkOutdent=function(f,R,x){return!1},this.autoOutdent=function(f,R,x){},this.$getIndent=function(f){return f.match(/^\s*/)[0]},this.createWorker=function(f){return null},this.createModeDelegates=function(f){this.$embeds=[],this.$modes={};for(var R in f)if(f[R]){var x=f[R],L=x.prototype.$id,M=S.$modes[L];M||(S.$modes[L]=M=new x),S.$modes[R]||(S.$modes[R]=M),this.$embeds.push(R),this.$modes[R]=M}for(var V=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],R=0;R"u"?this.setPosition($.row,$.column):this.setPosition($,l)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var $=C(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition($.row,$.column,!0)}},o.prototype.setPosition=function(a,$,l){var f;if(l?f={row:a,column:$}:f=this.$clipPositionToDocument(a,$),!(this.row==f.row&&this.column==f.column)){var R={row:this.row,column:this.column};this.row=f.row,this.column=f.column,this._signal("change",{old:R,value:f})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(a,$){var l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,$))),$<0&&(l.column=0),l},o}();T.prototype.$insertRight=!1,S.implement(T.prototype,E);function c(o,a,$){var l=$?o.column<=a.column:o.column=f&&($=f-1,l=void 0);var R=this.getLine($);return l==null&&(l=R.length),l=Math.min(Math.max(l,0),R.length),{row:$,column:l}},a.prototype.clonePos=function($){return{row:$.row,column:$.column}},a.prototype.pos=function($,l){return{row:$,column:l}},a.prototype.$clipPosition=function($){var l=this.getLength();return $.row>=l?($.row=Math.max(0,l-1),$.column=this.getLine(l-1).length):($.row=Math.max(0,$.row),$.column=Math.min(Math.max($.column,0),this.getLine($.row).length)),$},a.prototype.insertFullLines=function($,l){$=Math.min(Math.max($,0),this.getLength());var f=0;$0,R=l=0&&this.applyDelta({start:this.pos($,this.getLine($).length),end:this.pos($+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function($,l){if($ instanceof c||($=c.fromPoints($.start,$.end)),l.length===0&&$.isEmpty())return $.start;if(l==this.getTextRange($))return $.end;this.remove($);var f;return l?f=this.insert($.start,l):f=$.start,f},a.prototype.applyDeltas=function($){for(var l=0;l<$.length;l++)this.applyDelta($[l])},a.prototype.revertDeltas=function($){for(var l=$.length-1;l>=0;l--)this.revertDelta($[l])},a.prototype.applyDelta=function($,l){var f=$.action=="insert";(f?$.lines.length<=1&&!$.lines[0]:!c.comparePoints($.start,$.end))||(f&&$.lines.length>2e4?this.$splitAndapplyLargeDelta($,2e4):(E(this.$lines,$,l),this._signal("change",$)))},a.prototype.$safeApplyDelta=function($){var l=this.$lines.length;($.action=="remove"&&$.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,f==-1&&(f=l),x<=f&&a.fireUpdateEvent(x,f)}}}return c.prototype.setTokenizer=function(C){this.tokenizer=C,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(C){this.doc=C,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(C,o){var a={first:C,last:o};this._signal("update",{data:a})},c.prototype.start=function(C){this.currentLine=Math.min(C||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(C){var o=C.start.row,a=C.end.row-o;if(a===0)this.lines[o]=null;else if(C.action=="remove")this.lines.splice(o,a+1,null),this.states.splice(o,a+1,null);else{var $=Array(a+1);$.unshift(o,1),this.lines.splice.apply(this.lines,$),this.states.splice.apply(this.states,$)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(C){return this.lines[C]||this.$tokenizeRow(C)},c.prototype.getState=function(C){return this.currentLine==C&&this.$tokenizeRow(C),this.states[C]||"start"},c.prototype.$tokenizeRow=function(C){var o=this.doc.getLine(C),a=this.states[C-1],$=this.tokenizer.getLineTokens(o,a,C);return this.states[C]+""!=$.state+""?(this.states[C]=$.state,this.lines[C+1]=null,this.currentLine>C+1&&(this.currentLine=C+1)):this.currentLine==C&&(this.currentLine=C+1),this.lines[C]=$.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c}();S.implement(T.prototype,E),r.BackgroundTokenizer=T}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,A){var S=n("./lib/lang"),E=n("./range").Range,T=function(){function c(C,o,a){a===void 0&&(a="text"),this.setRegexp(C),this.clazz=o,this.type=a}return c.prototype.setRegexp=function(C){this.regExp+""!=C+""&&(this.regExp=C,this.cache=[])},c.prototype.update=function(C,o,a,$){if(this.regExp)for(var l=$.firstRow,f=$.lastRow,R={},x=l;x<=f;x++){var L=this.cache[x];L==null&&(L=S.getMatchOffsets(a.getLine(x),this.regExp),L.length>this.MAX_RANGES&&(L=L.slice(0,this.MAX_RANGES)),L=L.map(function(F){return new E(x,F.offset,x,F.offset+F.length)}),this.cache[x]=L.length?L:"");for(var M=L.length;M--;){var V=L[M].toScreenRange(a),D=V.toString();R[D]||(R[D]=!0,o.drawSingleLineMarker(C,V,this.clazz,$))}}},c}();T.prototype.MAX_RANGES=500,r.SearchHighlight=T}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,A){var S=n("../range").Range,E=function(){function T(c,C){this.foldData=c,Array.isArray(C)?this.folds=C:C=this.folds=[C];var o=C[C.length-1];this.range=new S(C[0].start.row,C[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return T.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(C){C.start.row+=c,C.end.row+=c})},T.prototype.addFold=function(c){if(c.sameRow){if(c.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(C,o){return-C.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},T.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},T.prototype.walk=function(c,C,o){var a=0,$=this.folds,l,f,R,x=!0;C==null&&(C=this.end.row,o=this.end.column);for(var L=0;L<$.length;L++){if(l=$[L],f=l.range.compareStart(C,o),f==-1){c(null,C,o,a,x);return}if(R=c(null,l.start.row,l.start.column,a,x),R=!R&&c(l.placeholder,l.start.row,l.start.column,a),R||f===0)return;x=!l.sameRow,a=l.end.column}c(null,C,o,a,x)},T.prototype.getNextFoldTo=function(c,C){for(var o,a,$=0;$0)){var x=E(C,f.start);return R===0?o&&x!==0?-l-2:l:x>0||x===0&&!o?l:-l-1}}return-l-1},c.prototype.add=function(C){var o=!C.isEmpty(),a=this.pointIndex(C.start,o);a<0&&(a=-a-1);var $=this.pointIndex(C.end,o,a);return $<0?$=-$-1:$++,this.ranges.splice(a,$-a,C)},c.prototype.addList=function(C){for(var o=[],a=C.length;a--;)o.push.apply(o,this.add(C[a]));return o},c.prototype.substractPoint=function(C){var o=this.pointIndex(C);if(o>=0)return this.ranges.splice(o,1)},c.prototype.merge=function(){var C=[],o=this.ranges;o=o.sort(function(R,x){return E(R.start,x.start)});for(var a=o[0],$,l=1;l=0},c.prototype.containsPoint=function(C){return this.pointIndex(C)>=0},c.prototype.rangeAtPoint=function(C){var o=this.pointIndex(C);if(o>=0)return this.ranges[o]},c.prototype.clipRows=function(C,o){var a=this.ranges;if(a[0].start.row>o||a[a.length-1].start.row=$)break}if(C.action=="insert")for(var M=l-$,V=-o.column+a.column;R$)break;if(L.start.row==$&&L.start.column>=o.column&&(L.start.column==o.column&&this.$bias<=0||(L.start.column+=V,L.start.row+=M)),L.end.row==$&&L.end.column>=o.column){if(L.end.column==o.column&&this.$bias<0)continue;L.end.column==o.column&&V>0&&RL.start.column&&L.end.column==f[R+1].start.column&&(L.end.column-=V),L.end.column+=V,L.end.row+=M}}else for(var M=$-l,V=o.column-a.column;Rl)break;L.end.rowo.column)&&(L.end.column=o.column,L.end.row=o.row):(L.end.column+=V,L.end.row+=M):L.end.row>l&&(L.end.row+=M),L.start.rowo.column)&&(L.start.column=o.column,L.start.row=o.row):(L.start.column+=V,L.start.row+=M):L.start.row>l&&(L.start.row+=M)}if(M!=0&&R=a)return R;if(R.end.row>a)return null}return null},this.getNextFoldLine=function(a,$){var l=this.$foldData,f=0;for($&&(f=l.indexOf($)),f==-1&&(f=0),f;f=a)return R}return null},this.getFoldedRowCount=function(a,$){for(var l=this.$foldData,f=$-a+1,R=0;R=$){M<$&&(M>=a?f-=$-M:f=0);break}else L>=a&&(M>=a?f-=L-M:f-=L-a+1)}return f},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function($,l){return $.start.row-l.start.row}),a},this.addFold=function(a,$){var l=this.$foldData,f=!1,R;a instanceof T?R=a:(R=new T($,a),R.collapseChildren=$.collapseChildren),this.$clipRangeToDocument(R.range);var x=R.start.row,L=R.start.column,M=R.end.row,V=R.end.column,D=this.getFoldAt(x,L,1),F=this.getFoldAt(M,V,-1);if(D&&F==D)return D.addSubFold(R);D&&!D.range.isStart(x,L)&&this.removeFold(D),F&&!F.range.isEnd(M,V)&&this.removeFold(F);var P=this.getFoldsInRange(R.range);P.length>0&&(this.removeFolds(P),R.collapseChildren||P.forEach(function(B){R.addSubFold(B)}));for(var X=0;X0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function($){this.expandFold($)},this)},this.unfold=function(a,$){var l,f;if(a==null)l=new S(0,0,this.getLength(),0),$==null&&($=!0);else if(typeof a=="number")l=new S(a,0,a,this.getLine(a).length);else if("row"in a)l=S.fromPoints(a,a);else{if(Array.isArray(a))return f=[],a.forEach(function(x){f=f.concat(this.unfold(x))},this),f;l=a}f=this.getFoldsInRangeList(l);for(var R=f;f.length==1&&S.comparePoints(f[0].start,l.start)<0&&S.comparePoints(f[0].end,l.end)>0;)this.expandFolds(f),f=this.getFoldsInRangeList(l);if($!=!1?this.removeFolds(f):this.expandFolds(f),R.length)return R},this.isRowFolded=function(a,$){return!!this.getFoldLine(a,$)},this.getRowFoldEnd=function(a,$){var l=this.getFoldLine(a,$);return l?l.end.row:a},this.getRowFoldStart=function(a,$){var l=this.getFoldLine(a,$);return l?l.start.row:a},this.getFoldDisplayLine=function(a,$,l,f,R){f==null&&(f=a.start.row),R==null&&(R=0),$==null&&($=a.end.row),l==null&&(l=this.getLine($).length);var x=this.doc,L="";return a.walk(function(M,V,D,F){if(!(VV)break;while(R&&L.test(R.type)&&!/^comment.start/.test(R.type));R=f.stepBackward()}else R=f.getCurrentToken();return M.end.row=f.getCurrentTokenRow(),M.end.column=f.getCurrentTokenColumn(),/^comment.end/.test(R.type)||(M.end.column+=R.value.length-2),M}},this.foldAll=function(a,$,l,f){l==null&&(l=1e5);var R=this.foldWidgets;if(R){$=$||this.getLength(),a=a||0;for(var x=a;x<$;x++)if(R[x]==null&&(R[x]=this.getFoldWidget(x)),R[x]=="start"&&!(f&&!f(x))){var L=this.getFoldWidgetRange(x);L&&L.isMultiLine()&&L.end.row<=$&&L.start.row>=a&&(x=L.end.row,L.collapseChildren=l,this.addFold("...",L))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function($){for(var l=a.getTokens($),f=0;f=0;){var x=l[f];if(x==null&&(x=l[f]=this.getFoldWidget(f)),x=="start"){var L=this.getFoldWidgetRange(f);if(R||(R=L),L&&L.end.row>=a)break}f--}return{range:f!==-1&&L,firstRange:R}},this.onFoldWidgetClick=function(a,$){$ instanceof C&&($=$.domEvent);var l={children:$.shiftKey,all:$.ctrlKey||$.metaKey,siblings:$.altKey},f=this.$toggleFoldWidget(a,l);if(!f){var R=$.target||$.srcElement;R&&/ace_fold-widget/.test(R.className)&&(R.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,$){if(this.getFoldWidget){var l=this.getFoldWidget(a),f=this.getLine(a),R=l==="end"?-1:1,x=this.getFoldAt(a,R===-1?0:f.length,R);if(x)return $.children||$.all?this.removeFold(x):this.expandFold(x),x;var L=this.getFoldWidgetRange(a,!0);if(L&&!L.isMultiLine()&&(x=this.getFoldAt(L.start.row,L.start.column,1),x&&L.isEqual(x.range)))return this.removeFold(x),x;if($.siblings){var M=this.getParentFoldRangeData(a);if(M.range)var V=M.range.start.row+1,D=M.range.end.row;this.foldAll(V,D,$.all?1e4:0)}else $.children?(D=L?L.end.row:this.getLength(),this.foldAll(a+1,D,$.all?1e4:0)):L&&($.all&&(L.collapseChildren=1e4),this.addFold("...",L));return L}},this.toggleFoldWidget=function(a){var $=this.selection.getCursor().row;$=this.getRowFoldStart($);var l=this.$toggleFoldWidget($,{});if(!l){var f=this.getParentFoldRangeData($,!0);if(l=f.range||f.firstRange,l){$=l.start.row;var R=this.getFoldAt($,this.getLine($).length,1);R?this.removeFold(R):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var $=a.start.row,l=a.end.row-$;if(l===0)this.foldWidgets[$]=null;else if(a.action=="remove")this.foldWidgets.splice($,l+1,null);else{var f=Array(l+1);f.unshift($,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}},this.tokenizerUpdateFoldWidgets=function(a){var $=a.data;$.first!=$.last&&this.foldWidgets.length>$.first&&this.foldWidgets.splice($.first,this.foldWidgets.length)}}r.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,A){var S=n("../token_iterator").TokenIterator,E=n("../range").Range;function T(){this.findMatchingBracket=function(c,C){if(c.column==0)return null;var o=C||this.getLine(c.row).charAt(c.column-1);if(o=="")return null;var a=o.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],c):this.$findOpeningBracket(a[2],c):null},this.getBracketRange=function(c){var C=this.getLine(c.row),o=!0,a,$=C.charAt(c.column-1),l=$&&$.match(/([\(\[\{])|([\)\]\}])/);if(l||($=C.charAt(c.column),c={row:c.row,column:c.column+1},l=$&&$.match(/([\(\[\{])|([\)\]\}])/),o=!1),!l)return null;if(l[1]){var f=this.$findClosingBracket(l[1],c);if(!f)return null;a=E.fromPoints(c,f),o||(a.end.column++,a.start.column--),a.cursor=a.end}else{var f=this.$findOpeningBracket(l[2],c);if(!f)return null;a=E.fromPoints(f,c),o||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(c,C){var o=this.getLine(c.row),a=/([\(\[\{])|([\)\]\}])/,$=!C&&o.charAt(c.column-1),l=$&&$.match(a);if(l||($=(C===void 0||C)&&o.charAt(c.column),c={row:c.row,column:c.column+1},l=$&&$.match(a)),!l)return null;var f=new E(c.row,c.column-1,c.row,c.column),R=l[1]?this.$findClosingBracket(l[1],c):this.$findOpeningBracket(l[2],c);if(!R)return[f];var x=new E(R.row,R.column,R.row,R.column+1);return[f,x]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,C,o){var a=this.$brackets[c],$=1,l=new S(this,C.row,C.column),f=l.getCurrentToken();if(f||(f=l.stepForward()),!!f){o||(o=new RegExp("(\\.?"+f.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var R=C.column-l.getCurrentTokenColumn()-2,x=f.value;;){for(;R>=0;){var L=x.charAt(R);if(L==a){if($-=1,$==0)return{row:l.getCurrentTokenRow(),column:R+l.getCurrentTokenColumn()}}else L==c&&($+=1);R-=1}do f=l.stepBackward();while(f&&!o.test(f.type));if(f==null)break;x=f.value,R=x.length-1}return null}},this.$findClosingBracket=function(c,C,o){var a=this.$brackets[c],$=1,l=new S(this,C.row,C.column),f=l.getCurrentToken();if(f||(f=l.stepForward()),!!f){o||(o=new RegExp("(\\.?"+f.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var R=C.column-l.getCurrentTokenColumn();;){for(var x=f.value,L=x.length;R"?a=!0:C.type.indexOf("tag-name")!==-1&&(o=!0));while(C&&!o);return C},this.$findClosingTag=function(c,C){var o,a=C.value,$=C.value,l=0,f=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);C=c.stepForward();var R=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+C.value.length),x=!1;do if(o=C,C=c.stepForward(),C){if(C.value===">"&&!x){var L=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);x=!0}if(C.type.indexOf("tag-name")!==-1){if(a=C.value,$===a){if(o.value==="<")l++;else if(o.value==="")var D=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if($===a&&C.value==="/>"&&(l--,l<0))var M=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),V=M,D=V,L=new E(R.end.row,R.end.column,R.end.row,R.end.column+1)}while(C&&l>=0);if(f&&L&&M&&D&&R&&V)return{openTag:new E(f.start.row,f.start.column,L.end.row,L.end.column),closeTag:new E(M.start.row,M.start.column,D.end.row,D.end.column),openTagName:R,closeTagName:V}},this.$findOpeningTag=function(c,C){var o=c.getCurrentToken(),a=C.value,$=0,l=c.getCurrentTokenRow(),f=c.getCurrentTokenColumn(),R=f+2,x=new E(l,f,l,R);c.stepForward();var L=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+C.value.length);if(C=c.stepForward(),!(!C||C.value!==">")){var M=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(C=o,l=c.getCurrentTokenRow(),f=c.getCurrentTokenColumn(),R=f+C.value.length,o=c.stepBackward(),C){if(C.type.indexOf("tag-name")!==-1){if(a===C.value)if(o.value==="<"){if($++,$>0){var V=new E(l,f,l,R),D=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do C=c.stepForward();while(C&&C.value!==">");var F=new E(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else o.value===""){for(var P=0,X=o;X;){if(X.type.indexOf("tag-name")!==-1&&X.value===a){$--;break}else if(X.value==="<")break;X=c.stepBackward(),P++}for(var U=0;UH&&(this.$docRowCache.splice(H,Y),this.$screenRowCache.splice(H,Y))},B.prototype.$getRowCacheIndex=function(I,Y){for(var H=0,N=I.length-1;H<=N;){var W=H+N>>1,G=I[W];if(Y>G)H=W+1;else if(Y=Y));G++);return N=H[G],N?(N.index=G,N.start=W-N.value.length,N):null},B.prototype.setUndoManager=function(I){if(this.$undoManager=I,this.$informUndoManager&&this.$informUndoManager.cancel(),I){var Y=this;I.addSession(this),this.$syncInformUndoManager=function(){Y.$informUndoManager.cancel(),Y.mergeUndoDeltas=!1},this.$informUndoManager=E.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},B.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},B.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},B.prototype.getTabString=function(){return this.getUseSoftTabs()?E.stringRepeat(" ",this.getTabSize()):" "},B.prototype.setUseSoftTabs=function(I){this.setOption("useSoftTabs",I)},B.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},B.prototype.setTabSize=function(I){this.setOption("tabSize",I)},B.prototype.getTabSize=function(){return this.$tabSize},B.prototype.isTabStop=function(I){return this.$useSoftTabs&&I.column%this.$tabSize===0},B.prototype.setNavigateWithinSoftTabs=function(I){this.setOption("navigateWithinSoftTabs",I)},B.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},B.prototype.setOverwrite=function(I){this.setOption("overwrite",I)},B.prototype.getOverwrite=function(){return this.$overwrite},B.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},B.prototype.addGutterDecoration=function(I,Y){this.$decorations[I]||(this.$decorations[I]=""),this.$decorations[I]+=" "+Y,this._signal("changeBreakpoint",{})},B.prototype.removeGutterDecoration=function(I,Y){this.$decorations[I]=(this.$decorations[I]||"").replace(" "+Y,""),this._signal("changeBreakpoint",{})},B.prototype.getBreakpoints=function(){return this.$breakpoints},B.prototype.setBreakpoints=function(I){this.$breakpoints=[];for(var Y=0;Y0&&(N=!!H.charAt(Y-1).match(this.tokenRe)),N||(N=!!H.charAt(Y).match(this.tokenRe)),N)var W=this.tokenRe;else if(/^\s+$/.test(H.slice(Y-1,Y+1)))var W=/\s/;else var W=this.nonTokenRe;var G=Y;if(G>0){do G--;while(G>=0&&H.charAt(G).match(W));G++}for(var Z=Y;ZI&&(I=Y.screenWidth)}),this.lineWidgetWidth=I},B.prototype.$computeWidth=function(I){if(this.$modified||I){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var Y=this.doc.getAllLines(),H=this.$rowLengthCache,N=0,W=0,G=this.$foldData[W],Z=G?G.start.row:1/0,J=Y.length,Q=0;QZ){if(Q=G.end.row+1,Q>=J)break;G=this.$foldData[W++],Z=G?G.start.row:1/0}H[Q]==null&&(H[Q]=this.$getStringScreenWidth(Y[Q])[0]),H[Q]>N&&(N=H[Q])}this.screenWidth=N}},B.prototype.getLine=function(I){return this.doc.getLine(I)},B.prototype.getLines=function(I,Y){return this.doc.getLines(I,Y)},B.prototype.getLength=function(){return this.doc.getLength()},B.prototype.getTextRange=function(I){return this.doc.getTextRange(I||this.selection.getRange())},B.prototype.insert=function(I,Y){return this.doc.insert(I,Y)},B.prototype.remove=function(I){return this.doc.remove(I)},B.prototype.removeFullLines=function(I,Y){return this.doc.removeFullLines(I,Y)},B.prototype.undoChanges=function(I,Y){if(I.length){this.$fromUndo=!0;for(var H=I.length-1;H!=-1;H--){var N=I[H];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!Y&&this.$undoSelect&&(I.selectionBefore?this.selection.fromJSON(I.selectionBefore):this.selection.setRange(this.$getUndoSelection(I,!0))),this.$fromUndo=!1}},B.prototype.redoChanges=function(I,Y){if(I.length){this.$fromUndo=!0;for(var H=0;HI.end.column&&(G.start.column+=J),G.end.row==I.end.row&&G.end.column>I.end.column&&(G.end.column+=J)),Z&&G.start.row>=I.end.row&&(G.start.row+=Z,G.end.row+=Z)}if(G.end=this.insert(G.start,N),W.length){var Q=I.start,ne=G.start,Z=ne.row-Q.row,J=ne.column-Q.column;this.addFolds(W.map(function(oe){return oe=oe.clone(),oe.start.row==Q.row&&(oe.start.column+=J),oe.end.row==Q.row&&(oe.end.column+=J),oe.start.row+=Z,oe.end.row+=Z,oe}))}return G},B.prototype.indentRows=function(I,Y,H){H=H.replace(/\t/g,this.getTabString());for(var N=I;N<=Y;N++)this.doc.insertInLine({row:N,column:0},H)},B.prototype.outdentRows=function(I){for(var Y=I.collapseRows(),H=new $(0,0,0,0),N=this.getTabSize(),W=Y.start.row;W<=Y.end.row;++W){var G=this.getLine(W);H.start.row=W,H.end.row=W;for(var Z=0;Z0){var N=this.getRowFoldEnd(Y+H);if(N>this.doc.getLength()-1)return 0;var W=N-Y}else{I=this.$clipRowToDocument(I),Y=this.$clipRowToDocument(Y);var W=Y-I+1}var G=new $(I,0,Y,Number.MAX_VALUE),Z=this.getFoldsInRange(G).map(function(Q){return Q=Q.clone(),Q.start.row+=W,Q.end.row+=W,Q}),J=H==0?this.doc.getLines(I,Y):this.doc.removeFullLines(I,Y);return this.doc.insertFullLines(I+W,J),Z.length&&this.addFolds(Z),W},B.prototype.moveLinesUp=function(I,Y){return this.$moveLines(I,Y,-1)},B.prototype.moveLinesDown=function(I,Y){return this.$moveLines(I,Y,1)},B.prototype.duplicateLines=function(I,Y){return this.$moveLines(I,Y,0)},B.prototype.$clipRowToDocument=function(I){return Math.max(0,Math.min(I,this.doc.getLength()-1))},B.prototype.$clipColumnToRow=function(I,Y){return Y<0?0:Math.min(this.doc.getLine(I).length,Y)},B.prototype.$clipPositionToDocument=function(I,Y){if(Y=Math.max(0,Y),I<0)I=0,Y=0;else{var H=this.doc.getLength();I>=H?(I=H-1,Y=this.doc.getLine(H-1).length):Y=Math.min(this.doc.getLine(I).length,Y)}return{row:I,column:Y}},B.prototype.$clipRangeToDocument=function(I){I.start.row<0?(I.start.row=0,I.start.column=0):I.start.column=this.$clipColumnToRow(I.start.row,I.start.column);var Y=this.doc.getLength()-1;return I.end.row>Y?(I.end.row=Y,I.end.column=this.doc.getLine(Y).length):I.end.column=this.$clipColumnToRow(I.end.row,I.end.column),I},B.prototype.setUseWrapMode=function(I){if(I!=this.$useWrapMode){if(this.$useWrapMode=I,this.$modified=!0,this.$resetRowCache(0),I){var Y=this.getLength();this.$wrapData=Array(Y),this.$updateWrapData(0,Y-1)}this._signal("changeWrapMode")}},B.prototype.getUseWrapMode=function(){return this.$useWrapMode},B.prototype.setWrapLimitRange=function(I,Y){(this.$wrapLimitRange.min!==I||this.$wrapLimitRange.max!==Y)&&(this.$wrapLimitRange={min:I,max:Y},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},B.prototype.adjustWrapLimit=function(I,Y){var H=this.$wrapLimitRange;H.max<0&&(H={min:Y,max:Y});var N=this.$constrainWrapLimit(I,H.min,H.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},B.prototype.$constrainWrapLimit=function(I,Y,H){return Y&&(I=Math.max(Y,I)),H&&(I=Math.min(H,I)),I},B.prototype.getWrapLimit=function(){return this.$wrapLimit},B.prototype.setWrapLimit=function(I){this.setWrapLimitRange(I,I)},B.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},B.prototype.$updateInternalDataOnChange=function(I){var Y=this.$useWrapMode,H=I.action,N=I.start,W=I.end,G=N.row,Z=W.row,J=Z-G,Q=null;if(this.$updating=!0,J!=0)if(H==="remove"){this[Y?"$wrapData":"$rowLengthCache"].splice(G,J);var ne=this.$foldData;Q=this.getFoldsInRange(I),this.removeFolds(Q);var re=this.getFoldLine(W.row),ue=0;if(re){re.addRemoveChars(W.row,W.column,N.column-W.column),re.shiftRow(-J);var oe=this.getFoldLine(G);oe&&oe!==re&&(oe.merge(re),re=oe),ue=ne.indexOf(re)+1}for(ue;ue=W.row&&re.shiftRow(-J)}Z=G}else{var ie=Array(J);ie.unshift(G,0);var fe=Y?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ie);var ne=this.$foldData,re=this.getFoldLine(G),ue=0;if(re){var ge=re.range.compareInside(N.row,N.column);ge==0?(re=re.split(N.row,N.column),re&&(re.shiftRow(J),re.addRemoveChars(Z,0,W.column-N.column))):ge==-1&&(re.addRemoveChars(G,0,W.column-N.column),re.shiftRow(J)),ue=ne.indexOf(re)+1}for(ue;ue=G&&re.shiftRow(J)}}else{J=Math.abs(I.start.column-I.end.column),H==="remove"&&(Q=this.getFoldsInRange(I),this.removeFolds(Q),J=-J);var re=this.getFoldLine(G);re&&re.addRemoveChars(G,N.column,J)}return Y&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,Y?this.$updateWrapData(G,Z):this.$updateRowLengthCache(G,Z),Q},B.prototype.$updateRowLengthCache=function(I,Y,H){this.$rowLengthCache[I]=null,this.$rowLengthCache[Y]=null},B.prototype.$updateWrapData=function(I,Y){var H=this.doc.getAllLines(),N=this.getTabSize(),W=this.$wrapData,G=this.$wrapLimit,Z,J,Q=I;for(Y=Math.min(Y,H.length-1);Q<=Y;)J=this.getFoldLine(Q,J),J?(Z=[],J.walk((function(ne,re,ue,oe){var ie;if(ne!=null){ie=this.$getDisplayTokens(ne,Z.length),ie[0]=V;for(var fe=1;feY-oe;){var ie=G+Y-oe;if(I[ie-1]>=P&&I[ie]>=P){ue(ie);continue}if(I[ie]==V||I[ie]==D){for(ie;ie!=G-1&&I[ie]!=V;ie--);if(ie>G){ue(ie);continue}for(ie=G+Y,ie;ie>2)),G-1);ie>fe&&I[ie]fe&&I[ie]fe&&I[ie]==F;)ie--}else for(;ie>fe&&I[ie]fe){ue(++ie);continue}ie=G+Y,I[ie]==M&&ie--,ue(ie-oe)}return N},B.prototype.$getDisplayTokens=function(I,Y){var H=[],N;Y=Y||0;for(var W=0;W39&&G<48||G>57&&G<64?H.push(F):G>=4352&&z(G)?H.push(L,M):H.push(L)}return H},B.prototype.$getStringScreenWidth=function(I,Y,H){if(Y==0)return[0,0];Y==null&&(Y=1/0),H=H||0;var N,W;for(W=0;W=4352&&z(N)?H+=2:H+=1,!(H>Y));W++);return[H,W]},B.prototype.getRowLength=function(I){var Y=1;return this.lineWidgets&&(Y+=this.lineWidgets[I]&&this.lineWidgets[I].rowCount||0),!this.$useWrapMode||!this.$wrapData[I]?Y:this.$wrapData[I].length+Y},B.prototype.getRowLineCount=function(I){return!this.$useWrapMode||!this.$wrapData[I]?1:this.$wrapData[I].length+1},B.prototype.getRowWrapIndent=function(I){if(this.$useWrapMode){var Y=this.screenToDocumentPosition(I,Number.MAX_VALUE),H=this.$wrapData[Y.row];return H.length&&H[0]=0)var J=ne[re],W=this.$docRowCache[re],oe=I>ne[ue-1];else var oe=!ue;for(var ie=this.getLength()-1,fe=this.getNextFoldLine(W),ge=fe?fe.start.row:1/0;J<=I&&(Q=this.getRowLength(W),!(J+Q>I||W>=ie));)J+=Q,W++,W>ge&&(W=fe.end.row+1,fe=this.getNextFoldLine(W,fe),ge=fe?fe.start.row:1/0),oe&&(this.$docRowCache.push(W),this.$screenRowCache.push(J));if(fe&&fe.start.row<=W)N=this.getFoldDisplayLine(fe),W=fe.start.row;else{if(J+Q<=I||W>ie)return{row:ie,column:this.getLine(ie).length};N=this.getLine(W),fe=null}var se=0,de=Math.floor(I-J);if(this.$useWrapMode){var ce=this.$wrapData[W];ce&&(Z=ce[de],de>0&&ce.length&&(se=ce.indent,G=ce[de-1]||ce[ce.length-1],N=N.substring(G)))}return H!==void 0&&this.$bidiHandler.isBidiRow(J+de,W,de)&&(Y=this.$bidiHandler.offsetToCol(H)),G+=this.$getStringScreenWidth(N,Y-se)[1],this.$useWrapMode&&G>=Z&&(G=Z-1),fe?fe.idxToPosition(G):{row:W,column:G}},B.prototype.documentToScreenPosition=function(I,Y){if(typeof Y>"u")var H=this.$clipPositionToDocument(I.row,I.column);else H=this.$clipPositionToDocument(I,Y);I=H.row,Y=H.column;var N=0,W=null,G=null;G=this.getFoldAt(I,Y,1),G&&(I=G.start.row,Y=G.start.column);var Z,J=0,Q=this.$docRowCache,ne=this.$getRowCacheIndex(Q,I),re=Q.length;if(re&&ne>=0)var J=Q[ne],N=this.$screenRowCache[ne],ue=I>Q[re-1];else var ue=!re;for(var oe=this.getNextFoldLine(J),ie=oe?oe.start.row:1/0;J=ie){if(Z=oe.end.row+1,Z>I)break;oe=this.getNextFoldLine(Z,oe),ie=oe?oe.start.row:1/0}else Z=J+1;N+=this.getRowLength(J),J=Z,ue&&(this.$docRowCache.push(J),this.$screenRowCache.push(N))}var fe="";oe&&J>=ie?(fe=this.getFoldDisplayLine(oe,I,Y),W=oe.start.row):(fe=this.getLine(I).substring(0,Y),W=I);var ge=0;if(this.$useWrapMode){var se=this.$wrapData[W];if(se){for(var de=0;fe.length>=se[de];)N++,de++;fe=fe.substring(se[de-1]||0,fe.length),ge=de>0?se.indent:0}}return this.lineWidgets&&this.lineWidgets[J]&&this.lineWidgets[J].rowsAbove&&(N+=this.lineWidgets[J].rowsAbove),{row:N,column:ge+this.$getStringScreenWidth(fe)[0]}},B.prototype.documentToScreenColumn=function(I,Y){return this.documentToScreenPosition(I,Y).column},B.prototype.documentToScreenRow=function(I,Y){return this.documentToScreenPosition(I,Y).row},B.prototype.getScreenLength=function(){var I=0,Y=null;if(this.$useWrapMode)for(var W=this.$wrapData.length,G=0,N=0,Y=this.$foldData[N++],Z=Y?Y.start.row:1/0;GZ&&(G=Y.end.row+1,Y=this.$foldData[N++],Z=Y?Y.start.row:1/0)}else{I=this.getLength();for(var H=this.$foldData,N=0;NH));G++);return[N,G]})},B.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},B}();x.$uid=0,x.prototype.$modes=c.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=z,S.implement(x.prototype,C);var L=1,M=2,V=3,D=4,F=9,P=10,X=11,U=12;function z(B){return B<4352?!1:B>=4352&&B<=4447||B>=4515&&B<=4519||B>=4602&&B<=4607||B>=9001&&B<=9002||B>=11904&&B<=11929||B>=11931&&B<=12019||B>=12032&&B<=12245||B>=12272&&B<=12283||B>=12288&&B<=12350||B>=12353&&B<=12438||B>=12441&&B<=12543||B>=12549&&B<=12589||B>=12593&&B<=12686||B>=12688&&B<=12730||B>=12736&&B<=12771||B>=12784&&B<=12830||B>=12832&&B<=12871||B>=12880&&B<=13054||B>=13056&&B<=19903||B>=19968&&B<=42124||B>=42128&&B<=42182||B>=43360&&B<=43388||B>=44032&&B<=55203||B>=55216&&B<=55238||B>=55243&&B<=55291||B>=63744&&B<=64255||B>=65040&&B<=65049||B>=65072&&B<=65106||B>=65108&&B<=65126||B>=65128&&B<=65131||B>=65281&&B<=65376||B>=65504&&B<=65510}n("./edit_session/folding").Folding.call(x.prototype),n("./edit_session/bracket_match").BracketMatch.call(x.prototype),c.defineOptions(x.prototype,"session",{wrap:{set:function(B){if(!B||B=="off"?B=!1:B=="free"?B=!0:B=="printMargin"?B=-1:typeof B=="string"&&(B=parseInt(B,10)||!1),this.$wrap!=B)if(this.$wrap=B,!B)this.setUseWrapMode(!1);else{var I=typeof B=="number"?B:null;this.setWrapLimitRange(I,I),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(B){B=B=="auto"?this.$mode.type!="text":B!="text",B!=this.$wrapAsCode&&(this.$wrapAsCode=B,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(B){this.$useWorker=B,this.$stopWorker(),B&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(B){B=parseInt(B),B>0&&this.$tabSize!==B&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=B,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(B){this.setFoldStyle(B)},handlesSet:!0},overwrite:{set:function(B){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(B){this.doc.setNewLineMode(B)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(B){this.setMode(B)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,A){var S=n("./lib/lang"),E=n("./lib/oop"),T=n("./range").Range,c=function(){function o(){this.$options={}}return o.prototype.set=function(a){return E.mixin(this.$options,a),this},o.prototype.getOptions=function(){return S.copyObject(this.$options)},o.prototype.setOptions=function(a){this.$options=a},o.prototype.find=function(a){var $=this.$options,l=this.$matchIterator(a,$);if(!l)return!1;var f=null;return l.forEach(function(R,x,L,M){return f=new T(R,x,L,M),x==M&&$.start&&$.start.start&&$.skipCurrent!=!1&&f.isEqual($.start)?(f=null,!1):!0}),f},o.prototype.findAll=function(a){var $=this.$options;if(!$.needle)return[];this.$assembleRegExp($);var l=$.range,f=l?a.getLines(l.start.row,l.end.row):a.doc.getAllLines(),R=[],x=$.re;if($.$isMultiLine){var L=x.length,M=f.length-L,V;e:for(var D=x.offset||0;D<=M;D++){for(var F=0;FU||(R.push(V=new T(D,U,D+L-1,z)),L>2&&(D=D+L-2))}}else for(var B=0;BN&&R[F].end.row==W;)F--;for(R=R.slice(B,F+1),B=0,F=R.length;B=M;U--)if(P(U,Number.MAX_VALUE,X))return;if($.wrap!=!1){for(U=V,M=L.row;U>=M;U--)if(P(U,Number.MAX_VALUE,X))return}}};else var D=function(U){var z=L.row;if(!P(z,L.column,U)){for(z=z+1;z<=V;z++)if(P(z,0,U))return;if($.wrap!=!1){for(z=M,V=L.row;z<=V;z++)if(P(z,0,U))return}}};if($.$isMultiLine)var F=l.length,P=function(X,U,z){var B=f?X-F+1:X;if(!(B<0||B+F>a.getLength())){var I=a.getLine(B),Y=I.search(l[0]);if(!(!f&&YU)&&z(B,Y,B+F-1,N))return!0}}};else if(f)var P=function(U,z,B){var I=a.getLine(U),Y=[],H,N=0;for(l.lastIndex=0;H=l.exec(I);){var W=H[0].length;if(N=H.index,!W){if(N>=I.length)break;l.lastIndex=N+=1}if(H.index+W>z)break;Y.push(H.index,W)}for(var G=Y.length-1;G>=0;G-=2){var Z=Y[G-1],W=Y[G];if(B(U,Z,U,Z+W))return!0}};else var P=function(U,z,B){var I=a.getLine(U),Y,H;for(l.lastIndex=z;H=l.exec(I);){var N=H[0].length;if(Y=H.index,B(U,Y,U,Y+N))return!0;if(!N&&(l.lastIndex=Y+=1,Y>=I.length))return!1}};return{forEach:D}},o}();function C(o,a){var $=S.supportsLookbehind();function l(L,M){M===void 0&&(M=!0);var V=$&&a.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return V.test(L)||a.regExp?$&&a.$supportsUnicodeFlag?M?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var f=Array.from(o),R=f[0],x=f[f.length-1];return l(R)+o+l(x,!1)}r.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,A){var S=this&&this.__extends||function(){var $=function(l,f){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,x){R.__proto__=x}||function(R,x){for(var L in x)Object.prototype.hasOwnProperty.call(x,L)&&(R[L]=x[L])},$(l,f)};return function(l,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");$(l,f);function R(){this.constructor=l}l.prototype=f===null?Object.create(f):(R.prototype=f.prototype,new R)}}(),E=n("../lib/keys"),T=n("../lib/useragent"),c=E.KEY_MODS,C=function(){function $(l,f){this.$init(l,f,!1)}return $.prototype.$init=function(l,f,R){this.platform=f||(T.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=R},$.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},$.prototype.removeCommand=function(l,f){var R=l&&(typeof l=="string"?l:l.name);l=this.commands[R],f||delete this.commands[R];var x=this.commandKeyBinding;for(var L in x){var M=x[L];if(M==l)delete x[L];else if(Array.isArray(M)){var V=M.indexOf(l);V!=-1&&(M.splice(V,1),M.length==1&&(x[L]=M[0]))}}},$.prototype.bindKey=function(l,f,R){if(typeof l=="object"&&l&&(R==null&&(R=l.position),l=l[this.platform]),!!l){if(typeof f=="function")return this.addCommand({exec:f,bindKey:l,name:f.name||l});l.split("|").forEach(function(x){var L="";if(x.indexOf(" ")!=-1){var M=x.split(/\s+/);x=M.pop(),M.forEach(function(F){var P=this.parseKeys(F),X=c[P.hashId]+P.key;L+=(L?" ":"")+X,this._addCommandToBinding(L,"chainKeys")},this),L+=" "}var V=this.parseKeys(x),D=c[V.hashId]+V.key;this._addCommandToBinding(L+D,f,R)},this)}},$.prototype._addCommandToBinding=function(l,f,R){var x=this.commandKeyBinding,L;if(!f)delete x[l];else if(!x[l]||this.$singleCommand)x[l]=f;else{Array.isArray(x[l])?(L=x[l].indexOf(f))!=-1&&x[l].splice(L,1):x[l]=[x[l]],typeof R!="number"&&(R=o(f));var M=x[l];for(L=0;LR)break}M.splice(L,0,f)}},$.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(f){var R=l[f];if(R){if(typeof R=="string")return this.bindKey(R,f);typeof R=="function"&&(R={exec:R}),typeof R=="object"&&(R.name||(R.name=f),this.addCommand(R))}},this)},$.prototype.removeCommands=function(l){Object.keys(l).forEach(function(f){this.removeCommand(l[f])},this)},$.prototype.bindKeys=function(l){Object.keys(l).forEach(function(f){this.bindKey(f,l[f])},this)},$.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},$.prototype.parseKeys=function(l){var f=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(D){return D}),R=f.pop(),x=E[R];if(E.FUNCTION_KEYS[x])R=E.FUNCTION_KEYS[x].toLowerCase();else if(f.length){if(f.length==1&&f[0]=="shift")return{key:R.toUpperCase(),hashId:-1}}else return{key:R,hashId:-1};for(var L=0,M=f.length;M--;){var V=E.KEY_MODS[f[M]];if(V==null)return typeof console<"u"&&console.error("invalid modifier "+f[M]+" in "+l),!1;L|=V}return{key:R,hashId:L}},$.prototype.findKeyCommand=function(l,f){var R=c[l]+f;return this.commandKeyBinding[R]},$.prototype.handleKeyboard=function(l,f,R,x){if(!(x<0)){var L=c[f]+R,M=this.commandKeyBinding[L];return l.$keyChain&&(l.$keyChain+=" "+L,M=this.commandKeyBinding[l.$keyChain]||M),M&&(M=="chainKeys"||M[M.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||L,{command:"null"}):(l.$keyChain&&((!f||f==4)&&R.length==1?l.$keyChain=l.$keyChain.slice(0,-L.length-1):(f==-1||x>0)&&(l.$keyChain="")),{command:M})}},$.prototype.getStatusText=function(l,f){return f.$keyChain||""},$}();function o($){return typeof $=="object"&&$.bindKey&&$.bindKey.position||($.isDefault?-100:0)}var a=function($){S(l,$);function l(f,R){var x=$.call(this,f,R)||this;return x.$singleCommand=!0,x}return l}(C);a.call=function($,l,f){C.prototype.$init.call($,l,f,!0)},C.call=function($,l,f){C.prototype.$init.call($,l,f,!1)},r.HashHandler=a,r.MultiHashHandler=C}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,A){var S=this&&this.__extends||function(){var o=function(a,$){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,f){l.__proto__=f}||function(l,f){for(var R in f)Object.prototype.hasOwnProperty.call(f,R)&&(l[R]=f[R])},o(a,$)};return function(a,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");o(a,$);function l(){this.constructor=a}a.prototype=$===null?Object.create($):(l.prototype=$.prototype,new l)}}(),E=n("../lib/oop"),T=n("../keyboard/hash_handler").MultiHashHandler,c=n("../lib/event_emitter").EventEmitter,C=function(o){S(a,o);function a($,l){var f=o.call(this,l,$)||this;return f.byName=f.commands,f.setDefaultHandler("exec",function(R){return R.args?R.command.exec(R.editor,R.args,R.event,!1):R.command.exec(R.editor,{},R.event,!0)}),f}return a.prototype.exec=function($,l,f){if(Array.isArray($)){for(var R=$.length;R--;)if(this.exec($[R],l,f))return!0;return!1}if(typeof $=="string"&&($=this.commands[$]),!$||l&&l.$readOnly&&!$.readOnly||this.$checkCommandState!=!1&&$.isAvailable&&!$.isAvailable(l))return!1;var x={editor:l,command:$,args:f};return x.returnValue=this._emit("exec",x),this._signal("afterExec",x),x.returnValue!==!1},a.prototype.toggleRecording=function($){if(!this.$inReplay)return $&&$._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(l){this.macro.push([l.command,l.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function($){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording($);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,$):this.exec(l[0],$,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function($){return $.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},a}(T);E.implement(C.prototype,c),r.CommandManager=C}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,A){var S=n("../lib/lang"),E=n("../config"),T=n("../range").Range;function c(o,a){return{win:o,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(o){E.loadModule("ace/ext/settings_menu",function(a){a.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(o){E.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(o){E.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(o,a){typeof a=="number"&&!isNaN(a)&&o.gotoLine(a),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(o){E.loadModule("ace/ext/searchbox",function(a){a.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(o,a){o.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(o,a){o.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(o,a){o.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(o,a){o.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var a=o.$copyWithEmptySelection&&o.selection.isEmpty(),$=a?o.selection.getLineRange():o.selection.getRange();o._emit("cut",$),$.isEmpty()||o.session.remove($),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,a){o.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(o){E.loadModule("ace/ext/searchbox",function(a){a.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(o){var a=o.selection.getRange();a.start.column=0,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(o){var a=o.selection.getRange();a.end.column=Number.MAX_VALUE,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,a){o.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,a){o.insert(S.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(o){o.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var a=o.selection.getRange();a.start.column=a.end.column=0,a.end.row++,o.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(o){for(var a=o.selection.isBackwards(),$=a?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),l=a?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),f=o.session.doc.getLine($.row).length,R=o.session.doc.getTextRange(o.selection.getRange()),x=R.replace(/\n\s*/," ").length,L=o.session.doc.getLine($.row),M=$.row+1;M<=l.row+1;M++){var V=S.stringTrimLeft(S.stringTrimRight(o.session.doc.getLine(M)));V.length!==0&&(V=" "+V),L+=V}l.row+10?(o.selection.moveCursorTo($.row,$.column),o.selection.selectTo($.row,$.column+x)):(f=o.session.doc.getLine($.row).length>f?f+1:f,o.selection.moveCursorTo($.row,f))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(o){var a=o.session.doc.getLength()-1,$=o.session.doc.getLine(a).length,l=o.selection.rangeList.ranges,f=[];l.length<1&&(l=[o.selection.getRange()]);for(var R=0;RC[o].column&&o++,l.unshift(o,0),C.splice.apply(C,l),this.$updateRows()}}},T.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var C=!0;c.forEach(function(o,a){if(o)for(C=!1,o.row=a;o.$oldWidget;)o.$oldWidget.row=a,o=o.$oldWidget}),C&&(this.session.lineWidgets=null)}},T.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var C=this.session.lineWidgets[c.row];return C&&(c.$oldWidget=C,C.el&&C.el.parentNode&&(C.el.parentNode.removeChild(C.el),C._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},T.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var C=this.editor.renderer;c.html&&!c.el&&(c.el=S.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=S.createElement("div"),c.el.textContent=c.text),c.el&&(S.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&S.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex=5,C.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex=3),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/C.layerConfig.lineHeight);var o=this.session.getFoldAt(c.row,0);if(c.$fold=o,o){var a=this.session.lineWidgets;c.row==o.end.row&&!a[o.start.row]?a[o.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,C),this.onWidgetChanged(c),c},T.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var C=this.session.lineWidgets[c.row];if(C==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;C;){if(C.$oldWidget==c){C.$oldWidget=c.$oldWidget;break}C=C.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},T.prototype.getWidgetsAtRow=function(c){for(var C=this.session.lineWidgets,o=C&&C[c],a=[];o;)a.push(o),o=o.$oldWidget;return a},T.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},T.prototype.measureWidgets=function(c,C){var o=this.session._changedWidgets,a=C.layerConfig;if(!(!o||!o.length)){for(var $=1/0,l=0;l0&&!a[$];)$--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,C.$cursorLayer.config=o;for(var f=$;f<=l;f++){var R=a[f];if(!(!R||!R.el)){if(R.hidden){R.el.style.top=-100-(R.pixelHeight||0)+"px";continue}R._inDocument||(R._inDocument=!0,C.container.appendChild(R.el));var x=C.$cursorLayer.getPixelPosition({row:f,column:0},!0).top;R.coverLine||(x+=o.lineHeight*this.session.getRowLineCount(R.row)),R.el.style.top=x-o.offset+"px";var L=R.coverGutter?0:C.gutterWidth;R.fixedWidth||(L-=C.scrollLeft),R.el.style.left=L+"px",R.fullWidth&&R.screenWidth&&(R.el.style.minWidth=o.width+2*o.padding+"px"),R.fixedWidth?R.el.style.right=C.scrollBar.getWidth()+"px":R.el.style.right=""}}}},T}();r.LineWidgets=E}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,A){var S=n("../lib/keys"),E=n("../mouse/default_gutter_handler").GutterTooltip,T=function(){function C(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new E(this.editor)}return C.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},C.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},C.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===S.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=S.enter)return;o.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var $=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),l=this.$findNearestFoldWidget($),f=this.$findNearestAnnotation($);if(!(l===null&&f===null)){if(l===null&&f!==null){this.activeRowIndex=f,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(l!==null&&f===null){this.activeRowIndex=l,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(f-$)0||o+a=0&&this.$isFoldWidgetVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+a))return o+a}return null},C.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var a=0;o-a>0||o+a=0&&this.$isAnnotationVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+a))return o+a}return null},C.prototype.$focusFoldWidget=function(o){if(o!=null){var a=this.$getFoldWidget(o);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},C.prototype.$focusAnnotation=function(o){if(o!=null){var a=this.$getAnnotation(o);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},C.prototype.$blurFoldWidget=function(o){var a=this.$getFoldWidget(o);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},C.prototype.$blurAnnotation=function(o){var a=this.$getAnnotation(o);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},C.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},C.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},C.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o=H.length&&(H=void 0),{value:H&&H[G++],done:!H}}};throw new TypeError(N?"Object is not iterable.":"Symbol.iterator is not defined.")},E=n("./lib/oop"),T=n("./lib/dom"),c=n("./lib/lang"),C=n("./lib/useragent"),o=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,$=n("./mouse/fold_handler").FoldHandler,l=n("./keyboard/keybinding").KeyBinding,f=n("./edit_session").EditSession,R=n("./search").Search,x=n("./range").Range,L=n("./lib/event_emitter").EventEmitter,M=n("./commands/command_manager").CommandManager,V=n("./commands/default_commands").commands,D=n("./config"),F=n("./token_iterator").TokenIterator,P=n("./line_widgets").LineWidgets,X=n("./keyboard/gutter_handler").GutterKeyboardHandler,U=n("./config").nls,z=n("./clipboard"),B=n("./lib/keys"),I=function(){function H(N,W,G){this.$toDestroy=[];var Z=N.getContainerElement();this.container=Z,this.renderer=N,this.id="editor"+ ++H.$uid,this.commands=new M(C.isMac?"mac":"win",V),typeof document=="object"&&(this.textInput=new o(N.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new $(this)),this.keyBinding=new l(this),this.$search=new R().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(J,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(W||G&&G.session||new f("")),D.resetOptions(this),G&&this.setOptions(G),D._signal("editor",this)}return H.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=c.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},H.prototype.startOperation=function(N){if(this.curOp){if(!N||this.curOp.command)return;this.prevOp=this.curOp}N||(this.previousCommand=null,N={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:N.command||{},args:N.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},H.prototype.endOperation=function(N){if(this.curOp&&this.session){if(N&&N.returnValue===!1||!this.session)return this.curOp=null;if(N==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var W=this.curOp.command,G=W&&W.scrollIntoView;if(G){switch(G){case"center-animate":G="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var Z=this.selection.getRange(),J=this.renderer.layerConfig;(Z.start.row>=J.lastRow||Z.end.row<=J.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}G=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var Q=this.selection.toJSON();this.curOp.selectionAfter=Q,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(Q),this.prevOp=this.curOp,this.curOp=null}},H.prototype.$historyTracker=function(N){if(this.$mergeUndoDeltas){var W=this.prevOp,G=this.$mergeableCommands,Z=W.command&&N.command.name==W.command.name;if(N.command.name=="insertstring"){var J=N.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),Z=Z&&this.mergeNextCommand&&(!/\s/.test(J)||/\s/.test(W.args)),this.mergeNextCommand=!0}else Z=Z&&G.indexOf(N.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(Z=!1),Z?this.session.mergeUndoDeltas=!0:G.indexOf(N.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},H.prototype.setKeyboardHandler=function(N,W){if(N&&typeof N=="string"&&N!="ace"){this.$keybindingId=N;var G=this;D.loadModule(["keybinding",N],function(Z){G.$keybindingId==N&&G.keyBinding.setKeyboardHandler(Z&&Z.handler),W&&W()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(N),W&&W()},H.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},H.prototype.setSession=function(N){if(this.session!=N){this.curOp&&this.endOperation(),this.curOp={};var W=this.session;if(W){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var G=this.session.getSelection();G.off("changeCursor",this.$onCursorChange),G.off("changeSelection",this.$onSelectionChange)}this.session=N,N?(this.$onDocumentChange=this.onDocumentChange.bind(this),N.on("change",this.$onDocumentChange),this.renderer.setSession(N),this.$onChangeMode=this.onChangeMode.bind(this),N.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),N.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),N.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),N.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),N.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),N.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=N.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(N)),this._signal("changeSession",{session:N,oldSession:W}),this.curOp=null,W&&W._signal("changeEditor",{oldEditor:this}),N&&N._signal("changeEditor",{editor:this}),N&&!N.destroyed&&N.bgTokenizer.scheduleStart()}},H.prototype.getSession=function(){return this.session},H.prototype.setValue=function(N,W){return this.session.doc.setValue(N),W?W==1?this.navigateFileEnd():W==-1&&this.navigateFileStart():this.selectAll(),N},H.prototype.getValue=function(){return this.session.getValue()},H.prototype.getSelection=function(){return this.selection},H.prototype.resize=function(N){this.renderer.onResize(N)},H.prototype.setTheme=function(N,W){this.renderer.setTheme(N,W)},H.prototype.getTheme=function(){return this.renderer.getTheme()},H.prototype.setStyle=function(N){this.renderer.setStyle(N)},H.prototype.unsetStyle=function(N){this.renderer.unsetStyle(N)},H.prototype.getFontSize=function(){return this.getOption("fontSize")||T.computedStyle(this.container).fontSize},H.prototype.setFontSize=function(N){this.setOption("fontSize",N)},H.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var N=this;this.$highlightPending=!0,setTimeout(function(){N.$highlightPending=!1;var W=N.session;if(!(!W||W.destroyed)){W.$bracketHighlight&&(W.$bracketHighlight.markerIds.forEach(function(ie){W.removeMarker(ie)}),W.$bracketHighlight=null);var G=N.getCursorPosition(),Z=N.getKeyboardHandler(),J=Z&&Z.$getDirectionForHighlight&&Z.$getDirectionForHighlight(N),Q=W.getMatchingBracketRanges(G,J);if(!Q){var ne=new F(W,G.row,G.column),re=ne.getCurrentToken();if(re&&/\b(?:tag-open|tag-name)/.test(re.type)){var ue=W.getMatchingTags(G);ue&&(Q=[ue.openTagName,ue.closeTagName])}}if(!Q&&W.$mode.getMatching&&(Q=W.$mode.getMatching(N.session)),!Q){N.getHighlightIndentGuides()&&N.renderer.$textLayer.$highlightIndentGuide();return}var oe="ace_bracket";Array.isArray(Q)?Q.length==1&&(oe="ace_error_bracket"):Q=[Q],Q.length==2&&(x.comparePoints(Q[0].end,Q[1].start)==0?Q=[x.fromPoints(Q[0].start,Q[1].end)]:x.comparePoints(Q[0].start,Q[1].end)==0&&(Q=[x.fromPoints(Q[1].start,Q[0].end)])),W.$bracketHighlight={ranges:Q,markerIds:Q.map(function(ie){return W.addMarker(ie,oe,"text")})},N.getHighlightIndentGuides()&&N.renderer.$textLayer.$highlightIndentGuide()}},50)}},H.prototype.focus=function(){this.textInput.focus()},H.prototype.isFocused=function(){return this.textInput.isFocused()},H.prototype.blur=function(){this.textInput.blur()},H.prototype.onFocus=function(N){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",N))},H.prototype.onBlur=function(N){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",N))},H.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},H.prototype.onDocumentChange=function(N){var W=this.session.$useWrapMode,G=N.start.row==N.end.row?N.end.row:1/0;this.renderer.updateLines(N.start.row,G,W),this._signal("change",N),this.$cursorChange()},H.prototype.onTokenizerUpdate=function(N){var W=N.data;this.renderer.updateLines(W.first,W.last)},H.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},H.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},H.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},H.prototype.$updateHighlightActiveLine=function(){var N=this.getSession(),W;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(W=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(W=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(W=!1)),N.$highlightLineMarker&&!W)N.removeMarker(N.$highlightLineMarker.id),N.$highlightLineMarker=null;else if(!N.$highlightLineMarker&&W){var G=new x(W.row,W.column,W.row,1/0);G.id=N.addMarker(G,"ace_active-line","screenLine"),N.$highlightLineMarker=G}else W&&(N.$highlightLineMarker.start.row=W.row,N.$highlightLineMarker.end.row=W.row,N.$highlightLineMarker.start.column=W.column,N._signal("changeBackMarker"))},H.prototype.onSelectionChange=function(N){var W=this.session;if(W.$selectionMarker&&W.removeMarker(W.$selectionMarker),W.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var G=this.selection.getRange(),Z=this.getSelectionStyle();W.$selectionMarker=W.addMarker(G,"ace_selection",Z)}var J=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(J),this._signal("changeSelection")},H.prototype.$getSelectionHighLightRegexp=function(){var N=this.session,W=this.getSelectionRange();if(!(W.isEmpty()||W.isMultiLine())){var G=W.start.column,Z=W.end.column,J=N.getLine(W.start.row),Q=J.substring(G,Z);if(!(Q.length>5e3||!/[\w\d]/.test(Q))){var ne=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Q}),re=J.substring(G-1,Z+1);if(ne.test(re))return ne}}},H.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},H.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},H.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},H.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},H.prototype.onChangeMode=function(N){this.renderer.updateText(),this._emit("changeMode",N)},H.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},H.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},H.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},H.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},H.prototype.getCopyText=function(){var N=this.getSelectedText(),W=this.session.doc.getNewLineCharacter(),G=!1;if(!N&&this.$copyWithEmptySelection){G=!0;for(var Z=this.selection.getAllRanges(),J=0;Jie.search(/\S|$/)){var re=ie.substr(J.column).search(/\S|$/);G.doc.removeInLine(J.row,J.column,J.column+re)}}this.clearSelection();var ue=J.column,oe=G.getState(J.row),ie=G.getLine(J.row),fe=Z.checkOutdent(oe,ie,N);if(G.insert(J,N),Q&&Q.selection&&(Q.selection.length==2?this.selection.setSelectionRange(new x(J.row,ue+Q.selection[0],J.row,ue+Q.selection[1])):this.selection.setSelectionRange(new x(J.row+Q.selection[0],Q.selection[1],J.row+Q.selection[2],Q.selection[3]))),this.$enableAutoIndent){if(G.getDocument().isNewLine(N)){var ge=Z.getNextLineIndent(oe,ie.slice(0,J.column),G.getTabString());G.insert({row:J.row+1,column:0},ge)}fe&&Z.autoOutdent(oe,G,J.row)}},H.prototype.autoIndent=function(){var N=this.session,W=N.getMode(),G,Z;if(this.selection.isEmpty())G=0,Z=N.doc.getLength()-1;else{var J=this.getSelectionRange();G=J.start.row,Z=J.end.row}for(var Q="",ne="",re="",ue,oe,ie,fe=N.getTabString(),ge=G;ge<=Z;ge++)ge>0&&(Q=N.getState(ge-1),ne=N.getLine(ge-1),re=W.getNextLineIndent(Q,ne,fe)),ue=N.getLine(ge),oe=W.$getIndent(ue),re!==oe&&(oe.length>0&&(ie=new x(ge,0,ge,oe.length),N.remove(ie)),re.length>0&&N.insert({row:ge,column:0},re)),W.autoOutdent(Q,N,ge)},H.prototype.onTextInput=function(N,W){if(!W)return this.keyBinding.onTextInput(N);this.startOperation({command:{name:"insertstring"}});var G=this.applyComposition.bind(this,N,W);this.selection.rangeCount?this.forEachSelection(G):G(),this.endOperation()},H.prototype.applyComposition=function(N,W){if(W.extendLeft||W.extendRight){var G=this.selection.getRange();G.start.column-=W.extendLeft,G.end.column+=W.extendRight,G.start.column<0&&(G.start.row--,G.start.column+=this.session.getLine(G.start.row).length+1),this.selection.setRange(G),!N&&!G.isEmpty()&&this.remove()}if((N||!this.selection.isEmpty())&&this.insert(N,!0),W.restoreStart||W.restoreEnd){var G=this.selection.getRange();G.start.column-=W.restoreStart,G.end.column-=W.restoreEnd,this.selection.setRange(G)}},H.prototype.onCommandKey=function(N,W,G){return this.keyBinding.onCommandKey(N,W,G)},H.prototype.setOverwrite=function(N){this.session.setOverwrite(N)},H.prototype.getOverwrite=function(){return this.session.getOverwrite()},H.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},H.prototype.setScrollSpeed=function(N){this.setOption("scrollSpeed",N)},H.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},H.prototype.setDragDelay=function(N){this.setOption("dragDelay",N)},H.prototype.getDragDelay=function(){return this.getOption("dragDelay")},H.prototype.setSelectionStyle=function(N){this.setOption("selectionStyle",N)},H.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},H.prototype.setHighlightActiveLine=function(N){this.setOption("highlightActiveLine",N)},H.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},H.prototype.setHighlightGutterLine=function(N){this.setOption("highlightGutterLine",N)},H.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},H.prototype.setHighlightSelectedWord=function(N){this.setOption("highlightSelectedWord",N)},H.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},H.prototype.setAnimatedScroll=function(N){this.renderer.setAnimatedScroll(N)},H.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},H.prototype.setShowInvisibles=function(N){this.renderer.setShowInvisibles(N)},H.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},H.prototype.setDisplayIndentGuides=function(N){this.renderer.setDisplayIndentGuides(N)},H.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},H.prototype.setHighlightIndentGuides=function(N){this.renderer.setHighlightIndentGuides(N)},H.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},H.prototype.setShowPrintMargin=function(N){this.renderer.setShowPrintMargin(N)},H.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},H.prototype.setPrintMarginColumn=function(N){this.renderer.setPrintMarginColumn(N)},H.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},H.prototype.setReadOnly=function(N){this.setOption("readOnly",N)},H.prototype.getReadOnly=function(){return this.getOption("readOnly")},H.prototype.setBehavioursEnabled=function(N){this.setOption("behavioursEnabled",N)},H.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},H.prototype.setWrapBehavioursEnabled=function(N){this.setOption("wrapBehavioursEnabled",N)},H.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},H.prototype.setShowFoldWidgets=function(N){this.setOption("showFoldWidgets",N)},H.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},H.prototype.setFadeFoldWidgets=function(N){this.setOption("fadeFoldWidgets",N)},H.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},H.prototype.remove=function(N){this.selection.isEmpty()&&(N=="left"?this.selection.selectLeft():this.selection.selectRight());var W=this.getSelectionRange();if(this.getBehavioursEnabled()){var G=this.session,Z=G.getState(W.start.row),J=G.getMode().transformAction(Z,"deletion",this,G,W);if(W.end.column===0){var Q=G.getTextRange(W);if(Q[Q.length-1]==` `){var ne=G.getLine(W.end.row);/^\s+$/.test(ne)&&(W.end.column=ne.length)}}J&&(W=J)}this.session.remove(W),this.clearSelection()},H.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},H.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},H.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},H.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var N=this.getSelectionRange();N.start.column==N.end.column&&N.start.row==N.end.row&&(N.end.column=0,N.end.row++),this.session.remove(N),this.clearSelection()},H.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var N=this.getCursorPosition();this.insert(` `),this.moveCursorToPosition(N)},H.prototype.setGhostText=function(N,W){this.session.widgetManager||(this.session.widgetManager=new P(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(N,W)},H.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},H.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var N=this.getCursorPosition(),W=N.column;if(W!==0){var G=this.session.getLine(N.row),Z,J;Wre.toLowerCase()?1:0});for(var J=new x(0,0,0,0),Z=N.first;Z<=N.last;Z++){var Q=W.getLine(Z);J.start.row=Z,J.end.row=Z,J.end.column=Q.length,W.replace(J,G[Z-N.first])}},H.prototype.toggleCommentLines=function(){var N=this.session.getState(this.getCursorPosition().row),W=this.$getSelectedRows();this.session.getMode().toggleCommentLines(N,this.session,W.first,W.last)},H.prototype.toggleBlockComment=function(){var N=this.getCursorPosition(),W=this.session.getState(N.row),G=this.getSelectionRange();this.session.getMode().toggleBlockComment(W,this.session,G,N)},H.prototype.getNumberAt=function(N,W){var G=/[\-]?[0-9]+(?:\.[0-9]+)?/g;G.lastIndex=0;for(var Z=this.session.getLine(N);G.lastIndex=W){var Q={value:J[0],start:J.index,end:J.index+J[0].length};return Q}}return null},H.prototype.modifyNumber=function(N){var W=this.selection.getCursor().row,G=this.selection.getCursor().column,Z=new x(W,G-1,W,G),J=this.session.getTextRange(Z);if(!isNaN(parseFloat(J))&&isFinite(J)){var Q=this.getNumberAt(W,G);if(Q){var ne=Q.value.indexOf(".")>=0?Q.start+Q.value.indexOf(".")+1:Q.end,re=Q.start+Q.value.length-ne,ue=parseFloat(Q.value);ue*=Math.pow(10,re),ne!==Q.end&&G=ne&&Q<=re&&(G=ve,ue.selection.clearSelection(),ue.moveCursorTo(N,ne+Z),ue.selection.selectTo(N,re+Z)),ne=re});for(var oe=this.$toggleWordPairs,ie,fe=0;fe=re&&ne<=ue&&ge.match(/((?:https?|ftp):\/\/[\S]+)/)){oe=ge.replace(/[\s:.,'";}\]]+$/,"");break}re=ue}}catch(se){G={error:se}}finally{try{fe&&!fe.done&&(Z=ie.return)&&Z.call(ie)}finally{if(G)throw G.error}}return oe},H.prototype.openLink=function(){var N=this.selection.getCursor(),W=this.findLinkAt(N.row,N.column);return W&&window.open(W,"_blank"),W!=null},H.prototype.removeLines=function(){var N=this.$getSelectedRows();this.session.removeFullLines(N.first,N.last),this.clearSelection()},H.prototype.duplicateSelection=function(){var N=this.selection,W=this.session,G=N.getRange(),Z=N.isBackwards();if(G.isEmpty()){var J=G.start.row;W.duplicateLines(J,J)}else{var Q=Z?G.start:G.end,ne=W.insert(Q,W.getTextRange(G),!1);G.start=Q,G.end=ne,N.setSelectionRange(G,Z)}},H.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},H.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},H.prototype.moveText=function(N,W,G){return this.session.moveText(N,W,G)},H.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},H.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},H.prototype.$moveLines=function(N,W){var G,Z,J=this.selection;if(!J.inMultiSelectMode||this.inVirtualSelectionMode){var Q=J.toOrientedRange();G=this.$getSelectedRows(Q),Z=this.session.$moveLines(G.first,G.last,W?0:N),W&&N==-1&&(Z=0),Q.moveBy(Z,0),J.fromOrientedRange(Q)}else{var ne=J.rangeList.ranges;J.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var re=0,ue=0,oe=ne.length,ie=0;iese+1)break;se=de.last}for(ie--,re=this.session.$moveLines(ge,se,W?0:N),W&&N==-1&&(fe=ie+1);fe<=ie;)ne[fe].moveBy(re,0),fe++;W||(re=0),ue+=re}J.fromOrientedRange(J.ranges[0]),J.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},H.prototype.$getSelectedRows=function(N){return N=(N||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(N.start.row),last:this.session.getRowFoldEnd(N.end.row)}},H.prototype.onCompositionStart=function(N){this.renderer.showComposition(N)},H.prototype.onCompositionUpdate=function(N){this.renderer.setCompositionText(N)},H.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},H.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},H.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},H.prototype.isRowVisible=function(N){return N>=this.getFirstVisibleRow()&&N<=this.getLastVisibleRow()},H.prototype.isRowFullyVisible=function(N){return N>=this.renderer.getFirstFullyVisibleRow()&&N<=this.renderer.getLastFullyVisibleRow()},H.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},H.prototype.$moveByPage=function(N,W){var G=this.renderer,Z=this.renderer.layerConfig,J=N*Math.floor(Z.height/Z.lineHeight);W===!0?this.selection.$moveSelection(function(){this.moveCursorBy(J,0)}):W===!1&&(this.selection.moveCursorBy(J,0),this.selection.clearSelection());var Q=G.scrollTop;G.scrollBy(0,J*Z.lineHeight),W!=null&&G.scrollCursorIntoView(null,.5),G.animateScrolling(Q)},H.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},H.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},H.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},H.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},H.prototype.scrollPageDown=function(){this.$moveByPage(1)},H.prototype.scrollPageUp=function(){this.$moveByPage(-1)},H.prototype.scrollToRow=function(N){this.renderer.scrollToRow(N)},H.prototype.scrollToLine=function(N,W,G,Z){this.renderer.scrollToLine(N,W,G,Z)},H.prototype.centerSelection=function(){var N=this.getSelectionRange(),W={row:Math.floor(N.start.row+(N.end.row-N.start.row)/2),column:Math.floor(N.start.column+(N.end.column-N.start.column)/2)};this.renderer.alignCursor(W,.5)},H.prototype.getCursorPosition=function(){return this.selection.getCursor()},H.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},H.prototype.getSelectionRange=function(){return this.selection.getRange()},H.prototype.selectAll=function(){this.selection.selectAll()},H.prototype.clearSelection=function(){this.selection.clearSelection()},H.prototype.moveCursorTo=function(N,W){this.selection.moveCursorTo(N,W)},H.prototype.moveCursorToPosition=function(N){this.selection.moveCursorToPosition(N)},H.prototype.jumpToMatching=function(N,W){var G=this.getCursorPosition(),Z=new F(this.session,G.row,G.column),J=Z.getCurrentToken(),Q=0;J&&J.type.indexOf("tag-name")!==-1&&(J=Z.stepBackward());var ne=J||Z.stepForward();if(ne){var re,ue=!1,oe={},ie=G.column-ne.start,fe,ge={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(ne.value.match(/[{}()\[\]]/g)){for(;ie1?oe[ne.value]++:J.value==="=0;--Q)this.$tryReplace(G[Q],N)&&Z++;return this.selection.setSelectionRange(J),Z},H.prototype.$tryReplace=function(N,W){var G=this.session.getTextRange(N);return W=this.$search.replace(G,W),W!==null?(N.end=this.session.replace(N,W),N):null},H.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},H.prototype.find=function(N,W,G){W||(W={}),typeof N=="string"||N instanceof RegExp?W.needle=N:typeof N=="object"&&E.mixin(W,N);var Z=this.selection.getRange();W.needle==null&&(N=this.session.getTextRange(Z)||this.$search.$options.needle,N||(Z=this.session.getWordRange(Z.start.row,Z.start.column),N=this.session.getTextRange(Z)),this.$search.set({needle:N})),this.$search.set(W),W.start||this.$search.set({start:Z});var J=this.$search.find(this.session);if(W.preventScroll)return J;if(J)return this.revealRange(J,G),J;W.backwards?Z.start=Z.end:Z.end=Z.start,this.selection.setRange(Z)},H.prototype.findNext=function(N,W){this.find({skipCurrent:!0,backwards:!1},N,W)},H.prototype.findPrevious=function(N,W){this.find(N,{skipCurrent:!0,backwards:!0},W)},H.prototype.revealRange=function(N,W){this.session.unfold(N),this.selection.setSelectionRange(N);var G=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(N.start,N.end,.5),W!==!1&&this.renderer.animateScrolling(G)},H.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},H.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},H.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(N){N.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},H.prototype.setAutoScrollEditorIntoView=function(N){if(N){var W,G=this,Z=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var J=this.$scrollAnchor;J.style.cssText="position:absolute",this.container.insertBefore(J,this.container.firstChild);var Q=this.on("changeSelection",function(){Z=!0}),ne=this.renderer.on("beforeRender",function(){Z&&(W=G.renderer.container.getBoundingClientRect())}),re=this.renderer.on("afterRender",function(){if(Z&&W&&(G.isFocused()||G.searchBox&&G.searchBox.isFocused())){var ue=G.renderer,oe=ue.$cursorLayer.$pixelPos,ie=ue.layerConfig,fe=oe.top-ie.offset;oe.top>=0&&fe+W.top<0?Z=!0:oe.topwindow.innerHeight?Z=!1:Z=null,Z!=null&&(J.style.top=fe+"px",J.style.left=oe.left+"px",J.style.height=ie.lineHeight+"px",J.scrollIntoView(Z)),Z=W=null}});this.setAutoScrollEditorIntoView=function(ue){ue||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",re),this.renderer.off("beforeRender",ne))}}},H.prototype.$resetCursorStyle=function(){var N=this.$cursorStyle||"ace",W=this.renderer.$cursorLayer;W&&(W.setSmoothBlinking(/smooth/.test(N)),W.isBlinking=!this.$readOnly&&N!="wide",T.setCssClass(W.element,"ace_slim-cursors",/slim/.test(N)))},H.prototype.prompt=function(N,W,G){var Z=this;D.loadModule("ace/ext/prompt",function(J){J.prompt(Z,N,W,G)})},H}();I.$uid=0,I.prototype.curOp=null,I.prototype.prevOp={},I.prototype.$mergeableCommands=["backspace","del","insertstring"],I.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],E.implement(I.prototype,L),D.defineOptions(I.prototype,"editor",{selectionStyle:{set:function(H){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:H})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(H){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(H){this.textInput.setReadOnly(H),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(H){this.textInput.setCopyWithEmptySelection(H)},initialValue:!1},cursorStyle:{set:function(H){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(H){this.setAutoScrollEditorIntoView(H)}},keyboardHandler:{set:function(H){this.setKeyboardHandler(H)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(H){this.session.setValue(H)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(H){this.setSession(H)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(H){this.renderer.$gutterLayer.setShowLineNumbers(H),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),H&&this.$relativeLineNumbers?Y.attach(this):Y.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(H){this.$showLineNumbers&&H?Y.attach(this):Y.detach(this)}},placeholder:{set:function(H){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var N=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(N&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),T.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!N&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),T.addCssClass(this.container,"ace_hasPlaceholder");var W=T.createElement("div");W.className="ace_placeholder",W.textContent=this.$placeholder||"",this.renderer.placeholderNode=W,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!N&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(H){var N={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(Z){Z.blur(),Z.renderer.scroller.focus()},readOnly:!0},W=function(Z){if(Z.target==this.renderer.scroller&&Z.keyCode===B.enter){Z.preventDefault();var J=this.getCursorPosition().row;this.isRowVisible(J)||this.scrollToLine(J,!0,!0),this.focus()}},G;H?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(C.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",U("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",U("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",W.bind(this)),this.commands.addCommand(N),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",U("editor")),this.renderer.$gutter.setAttribute("aria-label",U("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),G||(G=new X(this)),G.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",W.bind(this)),this.commands.removeCommand(N),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),G&&G.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var Y={getText:function(H,N){return(Math.abs(H.selection.lead.row-N)||N+1+(N<9?"·":""))+""},getWidth:function(H,N,W){return Math.max(N.toString().length,(W.lastRow+1).toString().length,2)*W.characterWidth},update:function(H,N){N.renderer.$loop.schedule(N.renderer.CHANGE_GUTTER)},attach:function(H){H.renderer.$gutterLayer.$renderer=this,H.on("changeSelection",this.update),this.update(null,H)},detach:function(H){H.renderer.$gutterLayer.$renderer==this&&(H.renderer.$gutterLayer.$renderer=null),H.off("changeSelection",this.update),this.update(null,H)}};r.Editor=I}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,A){var S=function(){function F(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return F.prototype.addSession=function(P){this.$session=P},F.prototype.add=function(P,X,U){if(!this.$fromUndo&&P!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),X===!1||!this.lastDeltas){this.lastDeltas=[];var z=this.$undoStack.length;z>this.$undoDepth-1&&this.$undoStack.splice(0,z-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),P.id=this.$rev=++this.$maxRev}(P.action=="remove"||P.action=="insert")&&(this.$lastDelta=P),this.lastDeltas.push(P)}},F.prototype.addSelection=function(P,X){this.selections.push({value:P,rev:X||this.$rev})},F.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},F.prototype.markIgnored=function(P,X){X==null&&(X=this.$rev+1);for(var U=this.$undoStack,z=U.length;z--;){var B=U[z][0];if(B.id<=P)break;B.id0},F.prototype.canRedo=function(){return this.$redoStack.length>0},F.prototype.bookmark=function(P){P==null&&(P=this.$rev),this.mark=P},F.prototype.isAtBookmark=function(){return this.$rev===this.mark},F.prototype.toJSON=function(){},F.prototype.fromJSON=function(){},F.prototype.$prettyPrint=function(P){return P?a(P):a(this.$undoStack)+` --- `+a(this.$redoStack)},F}();S.prototype.hasUndo=S.prototype.canUndo,S.prototype.hasRedo=S.prototype.canRedo,S.prototype.isClean=S.prototype.isAtBookmark,S.prototype.markClean=S.prototype.bookmark;function E(F,P){for(var X=P;X--;){var U=F[X];if(U&&!U[0].ignore){for(;X"+F.end.row+":"+F.end.column}function l(F,P){var X=F.action=="insert",U=P.action=="insert";if(X&&U)if(c(P.start,F.end)>=0)x(P,F,-1);else if(c(P.start,F.start)<=0)x(F,P,1);else return null;else if(X&&!U)if(c(P.start,F.end)>=0)x(P,F,-1);else if(c(P.end,F.start)<=0)x(F,P,-1);else return null;else if(!X&&U)if(c(P.start,F.start)>=0)x(P,F,1);else if(c(P.start,F.start)<=0)x(F,P,1);else return null;else if(!X&&!U)if(c(P.start,F.start)>=0)x(P,F,1);else if(c(P.end,F.start)<=0)x(F,P,-1);else return null;return[P,F]}function f(F,P){for(var X=F.length;X--;)for(var U=0;U=0?x(F,P,-1):(c(F.start,P.start)<=0||x(F,T.fromPoints(P.start,F.start),-1),x(P,F,1));else if(!X&&U)c(P.start,F.end)>=0?x(P,F,-1):(c(P.start,F.start)<=0||x(P,T.fromPoints(F.start,P.start),-1),x(F,P,1));else if(!X&&!U)if(c(P.start,F.end)>=0)x(P,F,-1);else if(c(P.end,F.start)<=0)x(F,P,-1);else{var z,B;return c(F.start,P.start)<0&&(z=F,F=M(F,P.start)),c(F.end,P.end)>0&&(B=M(F,P.end)),L(P.end,F.start,F.end,-1),B&&!z&&(F.lines=B.lines,F.start=B.start,F.end=B.end,B=F),[P,z,B].filter(Boolean)}return[P,F]}function x(F,P,X){L(F.start,P.start,P.end,X),L(F.end,P.start,P.end,X)}function L(F,P,X,U){F.row==(U==1?P:X).row&&(F.column+=U*(X.column-P.column)),F.row+=U*(X.row-P.row)}function M(F,P){var X=F.lines,U=F.end;F.end=C(P);var z=F.end.row-F.start.row,B=X.splice(z,X.length),I=z?P.column:P.column-F.start.column;X.push(B[0].substring(0,I)),B[0]=B[0].substr(I);var Y={start:C(P),end:U,lines:B,action:F.action};return Y}function V(F,P){P=o(P);for(var X=F.length;X--;){for(var U=F[X],z=0;zV&&(P=M.end.row+1,M=R.getNextFoldLine(P,M),V=M?M.start.row:1/0),P>L){for(;this.$lines.getLength()>F+1;)this.$lines.pop();break}D=this.$lines.get(++F),D?D.row=P:(D=this.$lines.createCell(P,f,this.session,$),this.$lines.push(D)),this.$renderCell(D,f,M,P),P++}this._signal("afterRender"),this.$updateGutterWidth(f)},l.prototype.$updateGutterWidth=function(f){var R=this.session,x=R.gutterRenderer||this.$renderer,L=R.$firstLineNumber,M=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||R.$useWrapMode)&&(M=R.getLength()+L-1);var V=x?x.getWidth(R,M,f):M.toString().length*f.characterWidth,D=this.$padding||this.$computePadding();V+=D.left+D.right,V!==this.gutterWidth&&!isNaN(V)&&(this.gutterWidth=V,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",V))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var f=this.session.selection.getCursor();this.$cursorRow!==f.row&&(this.$cursorRow=f.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var f=this.session.selection.cursor.row;if(this.$cursorRow=f,!(this.$cursorCell&&this.$cursorCell.row==f)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var R=this.$lines.cells;this.$cursorCell=null;for(var x=0;x=this.$cursorRow){if(L.row>this.$cursorRow){var M=this.session.getFoldLine(this.$cursorRow);if(x>0&&M&&M.start.row==R[x-1].row)L=R[x-1];else break}L.element.className="ace_gutter-active-line "+L.element.className,this.$cursorCell=L;break}}}}},l.prototype.scrollLines=function(f){var R=this.config;if(this.config=f,this.$updateCursorRow(),this.$lines.pageChanged(R,f))return this.update(f);this.$lines.moveContainer(f);var x=Math.min(f.lastRow+f.gutterOffset,this.session.getLength()-1),L=this.oldLastRow;if(this.oldLastRow=x,!R||L0;M--)this.$lines.shift();if(L>x)for(var M=this.session.getFoldedRowCount(x+1,L);M>0;M--)this.$lines.pop();f.firstRowL&&this.$lines.push(this.$renderLines(f,L+1,x)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(f)},l.prototype.$renderLines=function(f,R,x){for(var L=[],M=R,V=this.session.getNextFoldLine(M),D=V?V.start.row:1/0;M>D&&(M=V.end.row+1,V=this.session.getNextFoldLine(M,V),D=V?V.start.row:1/0),!(M>x);){var F=this.$lines.createCell(M,f,this.session,$);this.$renderCell(F,f,V,M),L.push(F),M++}return L},l.prototype.$renderCell=function(f,R,x,L){var M=f.element,V=this.session,D=M.childNodes[0],F=M.childNodes[1],P=M.childNodes[2],X=P.firstChild,U=V.$firstLineNumber,z=V.$breakpoints,B=V.$decorations,I=V.gutterRenderer||this.$renderer,Y=this.$showFoldWidgets&&V.foldWidgets,H=x?x.start.row:Number.MAX_VALUE,N=R.lineHeight+"px",W=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",G=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",Z=(I?I.getText(V,L):L+U).toString();if(this.$highlightGutterLine&&(L==this.$cursorRow||x&&L=H&&this.$cursorRow<=x.end.row)&&(W+="ace_gutter-active-line ",this.$cursorCell!=f&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=f)),z[L]&&(W+=z[L]),B[L]&&(W+=B[L]),this.$annotations[L]&&L!==H&&(W+=this.$annotations[L].className),Y){var J=Y[L];J==null&&(J=Y[L]=V.getFoldWidget(L))}if(J){var Q="ace_fold-widget ace_"+J,ne=J=="start"&&L==H&&Lx.right-R.right)return"foldWidgets"},l}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,E.implement(a.prototype,c);function $(l){var f=document.createTextNode("");l.appendChild(f);var R=S.createElement("span");l.appendChild(R);var x=S.createElement("span");l.appendChild(x);var L=S.createElement("span");return x.appendChild(L),l}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,A){var S=n("../range").Range,E=n("../lib/dom"),T=function(){function C(o){this.element=E.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return C.prototype.setPadding=function(o){this.$padding=o},C.prototype.setSession=function(o){this.session=o},C.prototype.setMarkers=function(o){this.markers=o},C.prototype.elt=function(o,a){var $=this.i!=-1&&this.element.childNodes[this.i];$?this.i++:($=document.createElement("div"),this.element.appendChild($),this.i=-1),$.style.cssText=a,$.className=o},C.prototype.update=function(o){if(o){this.config=o,this.i=0;var a;for(var $ in this.markers){var l=this.markers[$];if(!l.range){l.update(a,this,this.session,o);continue}var f=l.range.clipRows(o.firstRow,o.lastRow);if(!f.isEmpty())if(f=f.toScreenRange(this.session),l.renderer){var R=this.$getTop(f.start.row,o),x=this.$padding+f.start.column*o.characterWidth;l.renderer(a,f,x,R,o)}else l.type=="fullLine"?this.drawFullLineMarker(a,f,l.clazz,o):l.type=="screenLine"?this.drawScreenLineMarker(a,f,l.clazz,o):f.isMultiLine()?l.type=="text"?this.drawTextMarker(a,f,l.clazz,o):this.drawMultiLineMarker(a,f,l.clazz,o):this.drawSingleLineMarker(a,f,l.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.iF,M==L),l,M==L?0:1,f)},C.prototype.drawMultiLineMarker=function(o,a,$,l,f){var R=this.$padding,x=l.lineHeight,L=this.$getTop(a.start.row,l),M=R+a.start.column*l.characterWidth;if(f=f||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var V=a.clone();V.end.row=V.start.row,V.end.column=this.session.getLine(V.start.row).length,this.drawBidiSingleLineMarker(o,V,$+" ace_br1 ace_start",l,null,f)}else this.elt($+" ace_br1 ace_start","height:"+x+"px;right:0;top:"+L+"px;left:"+M+"px;"+(f||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var V=a.clone();V.start.row=V.end.row,V.start.column=0,this.drawBidiSingleLineMarker(o,V,$+" ace_br12",l,null,f)}else{L=this.$getTop(a.end.row,l);var D=a.end.column*l.characterWidth;this.elt($+" ace_br12","height:"+x+"px;width:"+D+"px;top:"+L+"px;left:"+R+"px;"+(f||""))}if(x=(a.end.row-a.start.row-1)*l.lineHeight,!(x<=0)){L=this.$getTop(a.start.row+1,l);var F=(a.start.column?1:0)|(a.end.column?0:8);this.elt($+(F?" ace_br"+F:""),"height:"+x+"px;right:0;top:"+L+"px;left:"+R+"px;"+(f||""))}},C.prototype.drawSingleLineMarker=function(o,a,$,l,f,R){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(o,a,$,l,f,R);var x=l.lineHeight,L=(a.end.column+(f||0)-a.start.column)*l.characterWidth,M=this.$getTop(a.start.row,l),V=this.$padding+a.start.column*l.characterWidth;this.elt($,"height:"+x+"px;width:"+L+"px;top:"+M+"px;left:"+V+"px;"+(R||""))},C.prototype.drawBidiSingleLineMarker=function(o,a,$,l,f,R){var x=l.lineHeight,L=this.$getTop(a.start.row,l),M=this.$padding,V=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);V.forEach(function(D){this.elt($,"height:"+x+"px;width:"+(D.width+(f||0))+"px;top:"+L+"px;left:"+(M+D.left)+"px;"+(R||""))},this)},C.prototype.drawFullLineMarker=function(o,a,$,l,f){var R=this.$getTop(a.start.row,l),x=l.lineHeight;a.start.row!=a.end.row&&(x+=this.$getTop(a.end.row,l)-R),this.elt($,"height:"+x+"px;top:"+R+"px;left:0;right:0;"+(f||""))},C.prototype.drawScreenLineMarker=function(o,a,$,l,f){var R=this.$getTop(a.start.row,l),x=l.lineHeight;this.elt($,"height:"+x+"px;top:"+R+"px;left:0;right:0;"+(f||""))},C}();T.prototype.$padding=0;function c(C,o,a,$){return(C?1:0)|(o?2:0)|(a?4:0)|($?8:0)}r.Marker=T}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config"],function(n,r,A){var S=n("../lib/oop"),E=n("../lib/dom"),T=n("../lib/lang"),c=n("./lines").Lines,C=n("../lib/event_emitter").EventEmitter,o=n("../config").nls,a=function(){function $(l){this.dom=E,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",l.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return $.prototype.$updateEolChar=function(){var l=this.session.doc,f=l.getNewLineCharacter()==` `&&l.getNewLineMode()!="windows",R=f?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=R)return this.EOL_CHAR=R,!0},$.prototype.setPadding=function(l){this.$padding=l,this.element.style.margin="0 "+l+"px"},$.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},$.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},$.prototype.$setFontMetrics=function(l){this.$fontMetrics=l,this.$fontMetrics.on("changeCharacterSize",(function(f){this._signal("changeCharacterSize",f)}).bind(this)),this.$pollSizeChanges()},$.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},$.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},$.prototype.setSession=function(l){this.session=l,l&&this.$computeTabString()},$.prototype.setShowInvisibles=function(l){return this.showInvisibles==l?!1:(this.showInvisibles=l,typeof l=="string"?(this.showSpaces=/tab/i.test(l),this.showTabs=/space/i.test(l),this.showEOL=/eol/i.test(l)):this.showSpaces=this.showTabs=this.showEOL=l,this.$computeTabString(),!0)},$.prototype.setDisplayIndentGuides=function(l){return this.displayIndentGuides==l?!1:(this.displayIndentGuides=l,this.$computeTabString(),!0)},$.prototype.setHighlightIndentGuides=function(l){return this.$highlightIndentGuides===l?!1:(this.$highlightIndentGuides=l,l)},$.prototype.$computeTabString=function(){var l=this.session.getTabSize();this.tabSize=l;for(var f=this.$tabStrings=[0],R=1;RX&&(F=P.end.row+1,P=this.session.getNextFoldLine(F,P),X=P?P.start.row:1/0),!(F>L);){var U=M[V++];if(U){this.dom.removeChildren(U),this.$renderLine(U,F,F==X?P:!1),D&&(U.style.top=this.$lines.computeLineTop(F,l,this.session)+"px");var z=l.lineHeight*this.session.getRowLength(F)+"px";U.style.height!=z&&(D=!0,U.style.height=z)}F++}if(D)for(;V0;L--)this.$lines.shift();if(f.lastRow>l.lastRow)for(var L=this.session.getFoldedRowCount(l.lastRow+1,f.lastRow);L>0;L--)this.$lines.pop();l.firstRowf.lastRow&&this.$lines.push(this.$renderLinesFragment(l,f.lastRow+1,l.lastRow)),this.$highlightIndentGuide()},$.prototype.$renderLinesFragment=function(l,f,R){for(var x=[],L=f,M=this.session.getNextFoldLine(L),V=M?M.start.row:1/0;L>V&&(L=M.end.row+1,M=this.session.getNextFoldLine(L,M),V=M?M.start.row:1/0),!(L>R);){var D=this.$lines.createCell(L,l,this.session),F=D.element;this.dom.removeChildren(F),E.setStyle(F.style,"height",this.$lines.computeLineHeight(L,l,this.session)+"px"),E.setStyle(F.style,"top",this.$lines.computeLineTop(L,l,this.session)+"px"),this.$renderLine(F,L,L==V?M:!1),this.$useLineGroups()?F.className="ace_line_group":F.className="ace_line",x.push(D),L++}return x},$.prototype.update=function(l){this.$lines.moveContainer(l),this.config=l;for(var f=l.firstRow,R=l.lastRow,x=this.$lines;x.getLength();)x.pop();x.push(this.$renderLinesFragment(l,f,R))},$.prototype.$renderToken=function(l,f,R,x){for(var L=this,M=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,V=this.dom.createFragment(this.element),D,F=0;D=M.exec(x);){var P=D[1],X=D[2],U=D[3],z=D[4],B=D[5];if(!(!L.showSpaces&&X)){var I=F!=D.index?x.slice(F,D.index):"";if(F=D.index+D[0].length,I&&V.appendChild(this.dom.createTextNode(I,this.element)),P){var Y=L.session.getScreenTabSize(f+D.index);V.appendChild(L.$tabStrings[Y].cloneNode(!0)),f+=Y-1}else if(X)if(L.showSpaces){var H=this.dom.createElement("span");H.className="ace_invisible ace_invisible_space",H.textContent=T.stringRepeat(L.SPACE_CHAR,X.length),V.appendChild(H)}else V.appendChild(this.com.createTextNode(X,this.element));else if(U){var H=this.dom.createElement("span");H.className="ace_invisible ace_invisible_space ace_invalid",H.textContent=T.stringRepeat(L.SPACE_CHAR,U.length),V.appendChild(H)}else if(z){f+=1;var H=this.dom.createElement("span");H.style.width=L.config.characterWidth*2+"px",H.className=L.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",H.textContent=L.showSpaces?L.SPACE_CHAR:z,V.appendChild(H)}else if(B){f+=1;var H=this.dom.createElement("span");H.style.width=L.config.characterWidth*2+"px",H.className="ace_cjk",H.textContent=B,V.appendChild(H)}}}if(V.appendChild(this.dom.createTextNode(F?x.slice(F):x,this.element)),this.$textToken[R.type])l.appendChild(V);else{var N="ace_"+R.type.replace(/\./g," ace_"),H=this.dom.createElement("span");R.type=="fold"&&(H.style.width=R.value.length*this.config.characterWidth+"px",H.setAttribute("title",o("Unfold code"))),H.className=N,H.appendChild(V),l.appendChild(H)}return f+x.length},$.prototype.renderIndentGuide=function(l,f,R){var x=f.search(this.$indentGuideRe);if(x<=0||x>=R)return f;if(f[0]==" "){x-=x%this.tabSize;for(var L=x/this.tabSize,M=0;MM[V].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&l[f.row]!==""&&f.column===l[f.row].length){this.$highlightIndentGuideMarker.dir=1;for(var V=f.row+1;V0){for(var L=0;L=this.$highlightIndentGuideMarker.start+1){if(x.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(x,f)}}else for(var R=l.length-1;R>=0;R--){var x=l[R];if(this.$highlightIndentGuideMarker.end&&x.row=M;)V=this.$renderToken(D,V,P,X.substring(0,M-x)),X=X.substring(M-x),x=M,D=this.$createLineElement(),l.appendChild(D),D.appendChild(this.dom.createTextNode(T.stringRepeat(" ",R.indent),this.element)),L++,V=0,M=R[L]||Number.MAX_VALUE;X.length!=0&&(x+=X.length,V=this.$renderToken(D,V,P,X))}}R[R.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(D,V,null,"",!0)},$.prototype.$renderSimpleLine=function(l,f){for(var R=0,x=0;xthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(l,R,L,M);R=this.$renderToken(l,R,L,M)}}},$.prototype.$renderOverflowMessage=function(l,f,R,x,L){R&&this.$renderToken(l,f,R,x.slice(0,this.MAX_LINE_LENGTH-f));var M=this.dom.createElement("span");M.className="ace_inline_button ace_keyword ace_toggle_wrap",M.textContent=L?"":"",l.appendChild(M)},$.prototype.$renderLine=function(l,f,R){if(!R&&R!=!1&&(R=this.session.getFoldLine(f)),R)var x=this.$getFoldLineTokens(f,R);else var x=this.session.getTokens(f);var L=l;if(x.length){var M=this.session.getRowSplitData(f);if(M&&M.length){this.$renderWrappedLine(l,x,M);var L=l.lastChild}else{var L=l;this.$useLineGroups()&&(L=this.$createLineElement(),l.appendChild(L)),this.$renderSimpleLine(L,x)}}else this.$useLineGroups()&&(L=this.$createLineElement(),l.appendChild(L));if(this.showEOL&&L){R&&(f=R.end.row);var V=this.dom.createElement("span");V.className="ace_invisible ace_invisible_eol",V.textContent=f==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,L.appendChild(V)}},$.prototype.$getFoldLineTokens=function(l,f){var R=this.session,x=[];function L(V,D,F){for(var P=0,X=0;X+V[P].value.lengthF-D&&(U=U.substring(0,F-D)),x.push({type:V[P].type,value:U}),X=D+U.length,P+=1}for(;XF?x.push({type:V[P].type,value:U.substring(0,F-X)}):x.push(V[P]),X+=U.length,P+=1}}var M=R.getTokens(l);return f.walk(function(V,D,F,P,X){V!=null?x.push({type:"fold",value:V}):(X&&(M=R.getTokens(D)),M.length&&L(M,P,F))},f.end.row,this.session.getLine(f.end.row).length),x},$.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},$}();a.prototype.$textToken={text:!0,rparen:!0,lparen:!0},a.prototype.EOF_CHAR="¶",a.prototype.EOL_CHAR_LF="¬",a.prototype.EOL_CHAR_CRLF="¤",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="—",a.prototype.SPACE_CHAR="·",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,S.implement(a.prototype,C),r.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,A){var S=n("../lib/dom"),E=function(){function T(c){this.element=S.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),S.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return T.prototype.$updateOpacity=function(c){for(var C=this.cursors,o=C.length;o--;)S.setStyle(C[o].style,"opacity",c?"":"0")},T.prototype.$startCssAnimation=function(){for(var c=this.cursors,C=c.length;C--;)c[C].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&S.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},T.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,S.removeCssClass(this.element,"ace_animate-blinking")},T.prototype.setPadding=function(c){this.$padding=c},T.prototype.setSession=function(c){this.session=c},T.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},T.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},T.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,S.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},T.prototype.addCursor=function(){var c=S.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},T.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},T.prototype.hideCursor=function(){this.isVisible=!1,S.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},T.prototype.showCursor=function(){this.isVisible=!0,S.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},T.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,S.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&S.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),S.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var C=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),C()},this.blinkInterval),C()}},T.prototype.getPixelPosition=function(c,C){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(c),a=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,c.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),$=(o.row-(C?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:$}},T.prototype.isCursorInView=function(c,C){return c.top>=0&&c.topc.height+c.offset||l.top<0)&&o>1)){var f=this.cursors[a++]||this.addCursor(),R=f.style;this.drawCursor?this.drawCursor(f,l,c,C[o],this.session):this.isCursorInView(l,c)?(S.setStyle(R,"display","block"),S.translate(f,l.left,l.top),S.setStyle(R,"width",Math.round(c.characterWidth)+"px"),S.setStyle(R,"height",c.lineHeight+"px")):S.setStyle(R,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var x=this.session.getOverwrite();this.$setOverwrite(x),this.$pixelPos=l,this.restartTimer()},T.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?S.addCssClass(this.element,"ace_overwrite-cursors"):S.removeCssClass(this.element,"ace_overwrite-cursors"))},T.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},T}();E.prototype.$padding=0,E.prototype.drawCursor=null,r.Cursor=E}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,A){var S=this&&this.__extends||function(){var f=function(R,x){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,M){L.__proto__=M}||function(L,M){for(var V in M)Object.prototype.hasOwnProperty.call(M,V)&&(L[V]=M[V])},f(R,x)};return function(R,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");f(R,x);function L(){this.constructor=R}R.prototype=x===null?Object.create(x):(L.prototype=x.prototype,new L)}}(),E=n("./lib/oop"),T=n("./lib/dom"),c=n("./lib/event"),C=n("./lib/event_emitter").EventEmitter,o=32768,a=function(){function f(R,x){this.element=T.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+x,this.inner=T.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),R.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return f.prototype.setVisible=function(R){this.element.style.display=R?"":"none",this.isVisible=R,this.coeff=1},f}();E.implement(a.prototype,C);var $=function(f){S(R,f);function R(x,L){var M=f.call(this,x,"-v")||this;return M.scrollTop=0,M.scrollHeight=0,L.$scrollbarWidth=M.width=T.scrollbarWidth(x.ownerDocument),M.inner.style.width=M.element.style.width=(M.width||15)+5+"px",M.$minWidth=0,M}return R.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var x=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-x)/(this.coeff-x)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},R.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},R.prototype.setHeight=function(x){this.element.style.height=x+"px"},R.prototype.setScrollHeight=function(x){this.scrollHeight=x,x>o?(this.coeff=o/x,x=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=x+"px"},R.prototype.setScrollTop=function(x){this.scrollTop!=x&&(this.skipEvent=!0,this.scrollTop=x,this.element.scrollTop=x*this.coeff)},R}(a);$.prototype.setInnerHeight=$.prototype.setScrollHeight;var l=function(f){S(R,f);function R(x,L){var M=f.call(this,x,"-h")||this;return M.scrollLeft=0,M.height=L.$scrollbarWidth,M.inner.style.height=M.element.style.height=(M.height||15)+5+"px",M}return R.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},R.prototype.getHeight=function(){return this.isVisible?this.height:0},R.prototype.setWidth=function(x){this.element.style.width=x+"px"},R.prototype.setInnerWidth=function(x){this.inner.style.width=x+"px"},R.prototype.setScrollWidth=function(x){this.inner.style.width=x+"px"},R.prototype.setScrollLeft=function(x){this.scrollLeft!=x&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=x)},R}(a);r.ScrollBar=$,r.ScrollBarV=$,r.ScrollBarH=l,r.VScrollBar=$,r.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,A){var S=this&&this.__extends||function(){var l=function(f,R){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(x[M]=L[M])},l(f,R)};return function(f,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");l(f,R);function x(){this.constructor=f}f.prototype=R===null?Object.create(R):(x.prototype=R.prototype,new x)}}(),E=n("./lib/oop"),T=n("./lib/dom"),c=n("./lib/event"),C=n("./lib/event_emitter").EventEmitter;T.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; box-sizing: border-box; border: 1px solid #bbb; border-radius: 2px; z-index: 8; } .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { position: absolute; z-index: 6; background: none; overflow: hidden!important; } .ace_editor>.ace_sb-v { z-index: 6; right: 0; top: 0; width: 12px; } .ace_editor>.ace_sb-v div { z-index: 8; right: 0; width: 100%; } .ace_editor>.ace_sb-h { bottom: 0; left: 0; height: 12px; } .ace_editor>.ace_sb-h div { bottom: 0; height: 100%; } .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; }`,"ace_scrollbar.css",!1);var o=function(){function l(f,R){this.element=T.createElement("div"),this.element.className="ace_sb"+R,this.inner=T.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},l}();E.implement(o.prototype,C);var a=function(l){S(f,l);function f(R,x){var L=l.call(this,R,"-v")||this;return L.scrollTop=0,L.scrollHeight=0,L.parent=R,L.width=L.VScrollWidth,L.renderer=x,L.inner.style.width=L.element.style.width=(L.width||15)+"px",L.$minWidth=0,L}return f.prototype.onMouseDown=function(R,x){if(R==="mousedown"&&!(c.getButton(x)!==0||x.detail===2)){if(x.target===this.inner){var L=this,M=x.clientY,V=function(B){M=B.clientY},D=function(){clearInterval(U)},F=x.clientY,P=this.thumbTop,X=function(){if(M!==void 0){var B=L.scrollTopFromThumbTop(P+M-F);B!==L.scrollTop&&L._emit("scroll",{data:B})}};c.capture(this.inner,V,D);var U=setInterval(X,20);return c.preventDefault(x)}var z=x.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(z)}),c.preventDefault(x)}},f.prototype.getHeight=function(){return this.height},f.prototype.scrollTopFromThumbTop=function(R){var x=R*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return x=x>>0,x<0?x=0:x>this.pageHeight-this.viewHeight&&(x=this.pageHeight-this.viewHeight),x},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(R){this.height=Math.max(0,R),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},f.prototype.setScrollHeight=function(R,x){this.pageHeight===R&&!x||(this.pageHeight=R,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},f.prototype.setScrollTop=function(R){this.scrollTop=R,R<0&&(R=0),this.thumbTop=R*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},f}(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var $=function(l){S(f,l);function f(R,x){var L=l.call(this,R,"-h")||this;return L.scrollLeft=0,L.scrollWidth=0,L.height=L.HScrollHeight,L.inner.style.height=L.element.style.height=(L.height||12)+"px",L.renderer=x,L}return f.prototype.onMouseDown=function(R,x){if(R==="mousedown"&&!(c.getButton(x)!==0||x.detail===2)){if(x.target===this.inner){var L=this,M=x.clientX,V=function(B){M=B.clientX},D=function(){clearInterval(U)},F=x.clientX,P=this.thumbLeft,X=function(){if(M!==void 0){var B=L.scrollLeftFromThumbLeft(P+M-F);B!==L.scrollLeft&&L._emit("scroll",{data:B})}};c.capture(this.inner,V,D);var U=setInterval(X,20);return c.preventDefault(x)}var z=x.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(z)}),c.preventDefault(x)}},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.scrollLeftFromThumbLeft=function(R){var x=R*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return x=x>>0,x<0?x=0:x>this.pageWidth-this.viewWidth&&(x=this.pageWidth-this.viewWidth),x},f.prototype.setWidth=function(R){this.width=Math.max(0,R),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},f.prototype.setScrollWidth=function(R,x){this.pageWidth===R&&!x||(this.pageWidth=R,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},f.prototype.setScrollLeft=function(R){this.scrollLeft=R,R<0&&(R=0),this.thumbLeft=R*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},f}(o);$.prototype.setInnerWidth=$.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=$,r.VScrollBar=a,r.HScrollBar=$}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,A){var S=n("./lib/event"),E=function(){function T(c,C){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=C||window;var o=this;this._flush=function(a){o.pending=!1;var $=o.changes;if($&&(S.blockIdle(100),o.changes=0,o.onRender($)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return T.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(S.nextFrame(this._flush),this.pending=!0)},T.prototype.clear=function(c){var C=this.changes;return this.changes=0,C},T}();r.RenderLoop=E}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,A){var S=n("../lib/oop"),E=n("../lib/dom"),T=n("../lib/lang"),c=n("../lib/event"),C=n("../lib/useragent"),o=n("../lib/event_emitter").EventEmitter,a=512,$=typeof ResizeObserver=="function",l=200,f=function(){function R(x){this.el=E.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=E.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=E.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),x.appendChild(this.el),this.$measureNode.textContent=T.stringRepeat("X",a),this.$characterSize={width:0,height:0},$?this.$addObserver():this.checkForSizeChanges()}return R.prototype.$setMeasureNodeStyles=function(x,L){x.width=x.height="auto",x.left=x.top="0px",x.visibility="hidden",x.position="absolute",x.whiteSpace="pre",C.isIE<8?x["font-family"]="inherit":x.font="inherit",x.overflow=L?"hidden":"visible"},R.prototype.checkForSizeChanges=function(x){if(x===void 0&&(x=this.$measureSizes()),x&&(this.$characterSize.width!==x.width||this.$characterSize.height!==x.height)){this.$measureNode.style.fontWeight="bold";var L=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=x,this.charSizes=Object.create(null),this.allowBoldFonts=L&&L.width===x.width&&L.height===x.height,this._emit("changeCharacterSize",{data:x})}},R.prototype.$addObserver=function(){var x=this;this.$observer=new window.ResizeObserver(function(L){x.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},R.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var x=this;return this.$pollSizeChangesTimer=c.onIdle(function L(){x.checkForSizeChanges(),c.onIdle(L,500)},500)},R.prototype.setPolling=function(x){x?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},R.prototype.$measureSizes=function(x){var L={height:(x||this.$measureNode).clientHeight,width:(x||this.$measureNode).clientWidth/a};return L.width===0||L.height===0?null:L},R.prototype.$measureCharWidth=function(x){this.$main.textContent=T.stringRepeat(x,a);var L=this.$main.getBoundingClientRect();return L.width/a},R.prototype.getCharacterWidth=function(x){var L=this.charSizes[x];return L===void 0&&(L=this.charSizes[x]=this.$measureCharWidth(x)/this.$characterSize.width),L},R.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},R.prototype.$getZoom=function(x){return!x||!x.parentElement?1:(window.getComputedStyle(x).zoom||1)*this.$getZoom(x.parentElement)},R.prototype.$initTransformMeasureNodes=function(){var x=function(L,M){return["div",{style:"position: absolute;top:"+L+"px;left:"+M+"px;"}]};this.els=E.buildDom([x(0,0),x(l,0),x(0,l),x(l,l)],this.el)},R.prototype.transformCoordinates=function(x,L){if(x){var M=this.$getZoom(this.el);x=P(1/M,x)}function V(ne,re,ue){var oe=ne[1]*re[0]-ne[0]*re[1];return[(-re[1]*ue[0]+re[0]*ue[1])/oe,(+ne[1]*ue[0]-ne[0]*ue[1])/oe]}function D(ne,re){return[ne[0]-re[0],ne[1]-re[1]]}function F(ne,re){return[ne[0]+re[0],ne[1]+re[1]]}function P(ne,re){return[ne*re[0],ne*re[1]]}this.els||this.$initTransformMeasureNodes();function X(ne){var re=ne.getBoundingClientRect();return[re.left,re.top]}var U=X(this.els[0]),z=X(this.els[1]),B=X(this.els[2]),I=X(this.els[3]),Y=V(D(I,z),D(I,B),D(F(z,B),F(I,U))),H=P(1+Y[0],D(z,U)),N=P(1+Y[1],D(B,U));if(L){var W=L,G=Y[0]*W[0]/l+Y[1]*W[1]/l+1,Z=F(P(W[0],H),P(W[1],N));return F(P(1/G/l,Z),U)}var J=D(x,U),Q=V(D(H,P(Y[0],J)),D(N,P(Y[1],J)),J);return P(l,Q)},R}();f.prototype.$characterSize={width:0,height:0},S.implement(f.prototype,o),r.FontMetrics=f}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,A){A.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} .ace_br4 {border-bottom-right-radius: 3px;} .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} .ace_br8 {border-bottom-left-radius : 3px;} .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_editor { position: relative; overflow: hidden; padding: 0; font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; direction: ltr; text-align: left; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .ace_scroller { position: absolute; overflow: hidden; top: 0; bottom: 0; background-color: inherit; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; cursor: text; } .ace_content { position: absolute; box-sizing: border-box; min-width: 100%; contain: style size layout; font-variant-ligatures: no-common-ligatures; } .ace_keyboard-focus:focus { box-shadow: inset 0 0 0 2px #5E9ED6; outline: none; } .ace_dragging .ace_scroller:before{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; content: ''; background: rgba(250, 250, 250, 0.01); z-index: 1000; } .ace_dragging.ace_dark .ace_scroller:before{ background: rgba(0, 0, 0, 0.01); } .ace_gutter { position: absolute; overflow : hidden; width: auto; top: 0; bottom: 0; left: 0; cursor: default; z-index: 4; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; contain: style size layout; } .ace_gutter-active-line { position: absolute; left: 0; right: 0; } .ace_scroller.ace_scroll-left:after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; pointer-events: none; } .ace_gutter-cell, .ace_gutter-cell_svg-icons { position: absolute; top: 0; left: 0; right: 0; padding-left: 19px; padding-right: 6px; background-repeat: no-repeat; } .ace_gutter-cell_svg-icons .ace_gutter_annotation { margin-left: -14px; float: left; } .ace_gutter-cell .ace_gutter_annotation { margin-left: -19px; float: left; } .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_info, .ace_icon.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); background-repeat: no-repeat; background-position: 2px center; } .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); } .ace_icon_svg.ace_error { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); background-color: crimson; } .ace_icon_svg.ace_warning { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); background-color: darkorange; } .ace_icon_svg.ace_info { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); background-color: royalblue; } .ace_icon_svg.ace_error_fold { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); background-color: crimson; } .ace_icon_svg.ace_warning_fold { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); background-color: darkorange; } .ace_scrollbar { contain: strict; position: absolute; right: 0; bottom: 0; z-index: 6; } .ace_scrollbar-inner { position: absolute; cursor: text; left: 0; top: 0; } .ace_scrollbar-v{ overflow-x: hidden; overflow-y: scroll; top: 0; } .ace_scrollbar-h { overflow-x: scroll; overflow-y: hidden; left: 0; } .ace_print-margin { position: absolute; height: 100%; } .ace_text-input { position: absolute; z-index: 0; width: 0.5em; height: 1em; opacity: 0; background: transparent; -moz-appearance: none; appearance: none; border: none; resize: none; outline: none; overflow: hidden; font: inherit; padding: 0 1px; margin: 0 -1px; contain: strict; -ms-user-select: text; -moz-user-select: text; -webkit-user-select: text; user-select: text; /*with \`pre-line\` chrome inserts   instead of space*/ white-space: pre!important; } .ace_text-input.ace_composition { background: transparent; color: inherit; z-index: 1000; opacity: 1; } .ace_composition_placeholder { color: transparent } .ace_composition_marker { border-bottom: 1px solid; position: absolute; border-radius: 0; margin-top: 1px; } [ace_nocontext=true] { transform: none!important; filter: none!important; clip-path: none!important; mask : none!important; contain: none!important; perspective: none!important; mix-blend-mode: initial!important; z-index: auto; } .ace_layer { z-index: 1; position: absolute; overflow: hidden; /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ word-wrap: normal; white-space: pre; height: 100%; width: 100%; box-sizing: border-box; /* setting pointer-events: auto; on node under the mouse, which changes during scroll, will break mouse wheel scrolling in Safari */ pointer-events: none; } .ace_gutter-layer { position: relative; width: auto; text-align: right; pointer-events: auto; height: 1000000px; contain: style size layout; } .ace_text-layer { font: inherit !important; position: absolute; height: 1000000px; width: 1000000px; contain: style size layout; } .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { contain: style size layout; position: absolute; top: 0; left: 0; right: 0; } .ace_hidpi .ace_text-layer, .ace_hidpi .ace_gutter-layer, .ace_hidpi .ace_content, .ace_hidpi .ace_gutter { contain: strict; } .ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group { contain: strict; } .ace_cjk { display: inline-block; text-align: center; } .ace_cursor-layer { z-index: 4; } .ace_cursor { z-index: 4; position: absolute; box-sizing: border-box; border-left: 2px solid; /* workaround for smooth cursor repaintng whole screen in chrome */ transform: translatez(0); } .ace_multiselect .ace_cursor { border-left-width: 1px; } .ace_slim-cursors .ace_cursor { border-left-width: 1px; } .ace_overwrite-cursors .ace_cursor { border-left-width: 0; border-bottom: 1px solid; } .ace_hidden-cursors .ace_cursor { opacity: 0.2; } .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { opacity: 0; } .ace_smooth-blinking .ace_cursor { transition: opacity 0.18s; } .ace_animate-blinking .ace_cursor { animation-duration: 1000ms; animation-timing-function: step-end; animation-name: blink-ace-animate; animation-iteration-count: infinite; } .ace_animate-blinking.ace_smooth-blinking .ace_cursor { animation-duration: 1000ms; animation-timing-function: ease-in-out; animation-name: blink-ace-animate-smooth; } @keyframes blink-ace-animate { from, to { opacity: 1; } 60% { opacity: 0; } } @keyframes blink-ace-animate-smooth { from, to { opacity: 1; } 45% { opacity: 1; } 60% { opacity: 0; } 85% { opacity: 0; } } .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { position: absolute; z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; z-index: 5; } .ace_marker-layer .ace_bracket { position: absolute; z-index: 6; } .ace_marker-layer .ace_error_bracket { position: absolute; border-bottom: 1px solid #DE5555; border-radius: 0; } .ace_marker-layer .ace_active-line { position: absolute; z-index: 2; } .ace_marker-layer .ace_selected-word { position: absolute; z-index: 4; box-sizing: border-box; } .ace_line .ace_fold { box-sizing: border-box; display: inline-block; height: 11px; margin-top: -2px; vertical-align: middle; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); background-repeat: no-repeat, repeat-x; background-position: center center, top left; color: transparent; border: 1px solid black; border-radius: 2px; cursor: pointer; pointer-events: auto; } .ace_dark .ace_fold { } .ace_fold:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); } .ace_tooltip { background-color: #f5f5f5; border: 1px solid gray; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; max-width: 100%; padding: 3px 4px; position: fixed; z-index: 999999; box-sizing: border-box; cursor: default; white-space: pre; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; } .ace_tooltip.ace_dark { background-color: #636363; color: #fff; } .ace_tooltip:focus { outline: 1px solid #5E9ED6; } .ace_icon { display: inline-block; width: 18px; vertical-align: top; } .ace_icon_svg { display: inline-block; width: 12px; vertical-align: top; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 12px; -webkit-mask-position: center; } .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { padding-right: 13px; } .ace_fold-widget { box-sizing: border-box; margin: 0 -12px 0 1px; display: none; width: 11px; vertical-align: top; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; } .ace_folding-enabled .ace_fold-widget { display: inline-block; } .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); } .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); } .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } /** * Dark version for fold widgets */ .ace_dark .ace_fold-widget { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); } .ace_dark .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget:hover { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } .ace_inline_button { border: 1px solid lightgray; display: inline-block; margin: -1px 8px; padding: 0 5px; pointer-events: auto; cursor: pointer; } .ace_inline_button:hover { border-color: gray; background: rgba(200,200,200,0.2); display: inline-block; pointer-events: auto; } .ace_fold-widget.ace_invalid { background-color: #FFB4B4; border-color: #DE5555; } .ace_fade-fold-widgets .ace_fold-widget { transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { transition: opacity 0.05s ease 0.05s; opacity:1; } .ace_underline { text-decoration: underline; } .ace_bold { font-weight: bold; } .ace_nobold .ace_bold { font-weight: normal; } .ace_italic { font-style: italic; } .ace_error-marker { background-color: rgba(255, 0, 0,0.2); position: absolute; z-index: 9; } .ace_highlight-marker { background-color: rgba(255, 255, 0,0.2); position: absolute; z-index: 8; } .ace_mobile-menu { position: absolute; line-height: 1.5; border-radius: 4px; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; background: white; box-shadow: 1px 3px 2px grey; border: 1px solid #dcdcdc; color: black; } .ace_dark > .ace_mobile-menu { background: #333; color: #ccc; box-shadow: 1px 3px 2px grey; border: 1px solid #444; } .ace_mobile-button { padding: 2px; cursor: pointer; overflow: hidden; } .ace_mobile-button:hover { background-color: #eee; opacity:1; } .ace_mobile-button:active { background-color: #ddd; } .ace_placeholder { font-family: arial; transform: scale(0.9); transform-origin: left; white-space: pre; opacity: 0.7; margin: 0 10px; } .ace_ghost_text { opacity: 0.5; font-style: italic; white-space: pre; }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,A){var S=n("../lib/dom"),E=n("../lib/oop"),T=n("../lib/event_emitter").EventEmitter,c=function(){function C(o,a){this.canvas=S.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return C.prototype.$updateDecorators=function(o){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var $=(o.lastRow+1)*this.lineHeight;$Y.priority?1:0}var R=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),R){var x={info:1,warning:2,error:3};R.forEach(function(I){I.priority=x[I.type]||null}),R=R.sort(f);for(var L=this.renderer.session.$foldData,M=0;Mthis.canvasHeight&&(z=this.canvasHeight-this.halfMinDecorationHeight),P=Math.round(z-this.halfMinDecorationHeight),X=Math.round(z+this.halfMinDecorationHeight)}l.fillStyle=a[R[M].type]||null,l.fillRect(0,F,this.canvasWidth,X-P)}}var B=this.renderer.session.selection.getCursor();if(B){var D=this.compensateFoldRows(B.row,L),F=Math.round((B.row-D)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,F,this.canvasWidth,2)}},C.prototype.compensateFoldRows=function(o,a){var $=0;if(a&&a.length>0)for(var l=0;la[l].start.row&&o=a[l].end.row&&($+=a[l].end.row-a[l].start.row);return $},C}();E.implement(c.prototype,T),r.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,A){var S=n("./lib/oop"),E=n("./lib/dom"),T=n("./lib/lang"),c=n("./config"),C=n("./layer/gutter").Gutter,o=n("./layer/marker").Marker,a=n("./layer/text").Text,$=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,f=n("./scrollbar").VScrollBar,R=n("./scrollbar_custom").HScrollBar,x=n("./scrollbar_custom").VScrollBar,L=n("./renderloop").RenderLoop,M=n("./layer/font_metrics").FontMetrics,V=n("./lib/event_emitter").EventEmitter,D=n("./css/editor-css"),F=n("./layer/decorators").Decorator,P=n("./lib/useragent");E.importCssString(D,"ace_editor.css",!1);var X=function(){function U(z,B){var I=this;this.container=z||E.createElement("div"),E.addCssClass(this.container,"ace_editor"),E.HI_DPI&&E.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=E.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=E.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=E.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new C(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var Y=this.$textLayer=new a(this.content);this.canvas=Y.element,this.$markerFront=new o(this.content),this.$cursorLayer=new $(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new f(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(H){I.$scrollAnimation||I.session.setScrollTop(H.data-I.scrollMargin.top)}),this.scrollBarH.on("scroll",function(H){I.$scrollAnimation||I.session.setScrollLeft(H.data-I.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new M(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(H){I.updateCharacterSize(),I.onResize(!0,I.gutterWidth,I.$size.width,I.$size.height),I._signal("changeCharacterSize",H)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!P.isIOS,this.$loop=new L(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return U.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),E.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},U.prototype.setSession=function(z){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=z,z&&this.scrollMargin.top&&z.getScrollTop()<=0&&z.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(z),this.$markerBack.setSession(z),this.$markerFront.setSession(z),this.$gutterLayer.setSession(z),this.$textLayer.setSession(z),z&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},U.prototype.updateLines=function(z,B,I){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>z&&(this.$changedLines.firstRow=z),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},U.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},U.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},U.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},U.prototype.updateFull=function(z){z?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},U.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},U.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},U.prototype.onResize=function(z,B,I,Y){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=z?1:0;var H=this.container;Y||(Y=H.clientHeight||H.scrollHeight),I||(I=H.clientWidth||H.scrollWidth);var N=this.$updateCachedSize(z,B,I,Y);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!I&&!Y)return this.resizing=0;z&&(this.$gutterLayer.$padding=null),z?this.$renderChanges(N|this.$changes,!0):this.$loop.schedule(N|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},U.prototype.$updateCachedSize=function(z,B,I,Y){Y-=this.$extraHeight||0;var H=0,N=this.$size,W={width:N.width,height:N.height,scrollerHeight:N.scrollerHeight,scrollerWidth:N.scrollerWidth};if(Y&&(z||N.height!=Y)&&(N.height=Y,H|=this.CHANGE_SIZE,N.scrollerHeight=N.height,this.$horizScroll&&(N.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(N.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",H=H|this.CHANGE_SCROLL),I&&(z||N.width!=I)){H|=this.CHANGE_SIZE,N.width=I,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,E.setStyle(this.scrollBarH.element.style,"left",B+"px"),E.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),N.scrollerWidth=Math.max(0,I-B-this.scrollBarV.getWidth()-this.margin.h),E.setStyle(this.$gutter.style,"left",this.margin.left+"px");var G=this.scrollBarV.getWidth()+"px";E.setStyle(this.scrollBarH.element.style,"right",G),E.setStyle(this.scroller.style,"right",G),E.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(N.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||z)&&(H|=this.CHANGE_FULL)}return N.$dirty=!I||!Y,H&&this._signal("resize",W),H},U.prototype.onGutterResize=function(z){var B=this.$showGutter?z:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},U.prototype.adjustWrapLimit=function(){var z=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(z/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},U.prototype.setAnimatedScroll=function(z){this.setOption("animatedScroll",z)},U.prototype.getAnimatedScroll=function(){return this.$animatedScroll},U.prototype.setShowInvisibles=function(z){this.setOption("showInvisibles",z),this.session.$bidiHandler.setShowInvisibles(z)},U.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},U.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},U.prototype.setDisplayIndentGuides=function(z){this.setOption("displayIndentGuides",z)},U.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},U.prototype.setHighlightIndentGuides=function(z){this.setOption("highlightIndentGuides",z)},U.prototype.setShowPrintMargin=function(z){this.setOption("showPrintMargin",z)},U.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},U.prototype.setPrintMarginColumn=function(z){this.setOption("printMarginColumn",z)},U.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},U.prototype.getShowGutter=function(){return this.getOption("showGutter")},U.prototype.setShowGutter=function(z){return this.setOption("showGutter",z)},U.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},U.prototype.setFadeFoldWidgets=function(z){this.setOption("fadeFoldWidgets",z)},U.prototype.setHighlightGutterLine=function(z){this.setOption("highlightGutterLine",z)},U.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},U.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var z=E.createElement("div");z.className="ace_layer ace_print-margin-layer",this.$printMarginEl=E.createElement("div"),this.$printMarginEl.className="ace_print-margin",z.appendChild(this.$printMarginEl),this.content.insertBefore(z,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},U.prototype.getContainerElement=function(){return this.container},U.prototype.getMouseEventTarget=function(){return this.scroller},U.prototype.getTextAreaContainer=function(){return this.container},U.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var z=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){E.translate(this.textarea,-100,0);return}var I=this.$cursorLayer.$pixelPos;if(I){B&&B.markerRange&&(I=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var Y=this.layerConfig,H=I.top,N=I.left;H-=Y.offset;var W=B&&B.useTextareaForIME||P.isMobile?this.lineHeight:1;if(H<0||H>Y.height-W){E.translate(this.textarea,0,0);return}var G=1,Z=this.$size.height-W;if(!B)H+=this.lineHeight;else if(B.useTextareaForIME){var J=this.textarea.value;G=this.characterWidth*this.session.$getStringScreenWidth(J)[0]}else H+=this.lineHeight+2;N-=this.scrollLeft,N>this.$size.scrollerWidth-G&&(N=this.$size.scrollerWidth-G),N+=this.gutterWidth+this.margin.left,E.setStyle(z,"height",W+"px"),E.setStyle(z,"width",G+"px"),E.translate(this.textarea,Math.min(N,this.$size.scrollerWidth-G),Math.min(H,Z))}}},U.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},U.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},U.prototype.getLastFullyVisibleRow=function(){var z=this.layerConfig,B=z.lastRow,I=this.session.documentToScreenRow(B,0)*z.lineHeight;return I-this.session.getScrollTop()>z.height-z.lineHeight?B-1:B},U.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},U.prototype.setPadding=function(z){this.$padding=z,this.$textLayer.setPadding(z),this.$cursorLayer.setPadding(z),this.$markerFront.setPadding(z),this.$markerBack.setPadding(z),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},U.prototype.setScrollMargin=function(z,B,I,Y){var H=this.scrollMargin;H.top=z|0,H.bottom=B|0,H.right=Y|0,H.left=I|0,H.v=H.top+H.bottom,H.h=H.left+H.right,H.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-H.top),this.updateFull()},U.prototype.setMargin=function(z,B,I,Y){var H=this.margin;H.top=z|0,H.bottom=B|0,H.right=Y|0,H.left=I|0,H.v=H.top+H.bottom,H.h=H.left+H.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},U.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},U.prototype.setHScrollBarAlwaysVisible=function(z){this.setOption("hScrollBarAlwaysVisible",z)},U.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},U.prototype.setVScrollBarAlwaysVisible=function(z){this.setOption("vScrollBarAlwaysVisible",z)},U.prototype.$updateScrollBarV=function(){var z=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(z-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>z-B&&(z=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(z+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},U.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},U.prototype.freeze=function(){this.$frozen=!0},U.prototype.unfreeze=function(){this.$frozen=!1},U.prototype.$renderChanges=function(z,B){if(this.$changes&&(z|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!z&&!B){this.$changes|=z;return}if(this.$size.$dirty)return this.$changes|=z,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",z),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var I=this.layerConfig;if(z&this.CHANGE_FULL||z&this.CHANGE_SIZE||z&this.CHANGE_TEXT||z&this.CHANGE_LINES||z&this.CHANGE_SCROLL||z&this.CHANGE_H_SCROLL){if(z|=this.$computeLayerConfig()|this.$loop.clear(),I.firstRow!=this.layerConfig.firstRow&&I.firstRowScreen==this.layerConfig.firstRowScreen){var Y=this.scrollTop+(I.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;Y>0&&(this.scrollTop=Y,z=z|this.CHANGE_SCROLL,z|=this.$computeLayerConfig()|this.$loop.clear())}I=this.layerConfig,this.$updateScrollBarV(),z&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),E.translate(this.content,-this.scrollLeft,-I.offset);var H=I.width+2*this.$padding+"px",N=I.minHeight+"px";E.setStyle(this.content.style,"width",H),E.setStyle(this.content.style,"height",N)}if(z&this.CHANGE_H_SCROLL&&(E.translate(this.content,-this.scrollLeft,-I.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),z&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(I),this.$showGutter&&this.$gutterLayer.update(I),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(I),this.$markerBack.update(I),this.$markerFront.update(I),this.$cursorLayer.update(I),this.$moveTextAreaToCursor(),this._signal("afterRender",z);return}if(z&this.CHANGE_SCROLL){this.$changedLines=null,z&this.CHANGE_TEXT||z&this.CHANGE_LINES?this.$textLayer.update(I):this.$textLayer.scrollLines(I),this.$showGutter&&(z&this.CHANGE_GUTTER||z&this.CHANGE_LINES?this.$gutterLayer.update(I):this.$gutterLayer.scrollLines(I)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(I),this.$markerBack.update(I),this.$markerFront.update(I),this.$cursorLayer.update(I),this.$moveTextAreaToCursor(),this._signal("afterRender",z);return}z&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(I),this.$showGutter&&this.$gutterLayer.update(I),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(I)):z&this.CHANGE_LINES?((this.$updateLines()||z&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(I),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(I)):z&this.CHANGE_TEXT||z&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(I),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(I)):z&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(I),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(I)),z&this.CHANGE_CURSOR&&(this.$cursorLayer.update(I),this.$moveTextAreaToCursor()),z&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(I),z&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(I),this._signal("afterRender",z)},U.prototype.$autosize=function(){var z=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,I=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,z))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(I+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&I>this.$maxPixelHeight&&(I=this.$maxPixelHeight);var Y=I<=2*this.lineHeight,H=!Y&&z>B;if(I!=this.desiredHeight||this.$size.height!=this.desiredHeight||H!=this.$vScroll){H!=this.$vScroll&&(this.$vScroll=H,this.scrollBarV.setVisible(H));var N=this.container.clientWidth;this.container.style.height=I+"px",this.$updateCachedSize(!0,this.$gutterWidth,N,I),this.desiredHeight=I,this._signal("autosize")}},U.prototype.$computeLayerConfig=function(){var z=this.session,B=this.$size,I=B.height<=2*this.lineHeight,Y=this.session.getScreenLength(),H=Y*this.lineHeight,N=this.$getLongestLine(),W=!I&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-N-2*this.$padding<0),G=this.$horizScroll!==W;G&&(this.$horizScroll=W,this.scrollBarH.setVisible(W));var Z=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var J=B.scrollerHeight+this.lineHeight,Q=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;H+=Q;var ne=this.scrollMargin;this.session.setScrollTop(Math.max(-ne.top,Math.min(this.scrollTop,H-B.scrollerHeight+ne.bottom))),this.session.setScrollLeft(Math.max(-ne.left,Math.min(this.scrollLeft,N+2*this.$padding-B.scrollerWidth+ne.right)));var re=!I&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-H+Q<0||this.scrollTop>ne.top),ue=Z!==re;ue&&(this.$vScroll=re,this.scrollBarV.setVisible(re));var oe=this.scrollTop%this.lineHeight,ie=Math.ceil(J/this.lineHeight)-1,fe=Math.max(0,Math.round((this.scrollTop-oe)/this.lineHeight)),ge=fe+ie,se,de,ce=this.lineHeight;fe=z.screenToDocumentRow(fe,0);var le=z.getFoldLine(fe);le&&(fe=le.start.row),se=z.documentToScreenRow(fe,0),de=z.getRowLength(fe)*ce,ge=Math.min(z.screenToDocumentRow(ge,0),z.getLength()-1),J=B.scrollerHeight+z.getRowLength(ge)*ce+de,oe=this.scrollTop-se*ce;var ve=0;return(this.layerConfig.width!=N||G)&&(ve=this.CHANGE_H_SCROLL),(G||ue)&&(ve|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),ue&&(N=this.$getLongestLine())),this.layerConfig={width:N,padding:this.$padding,firstRow:fe,firstRowScreen:se,lastRow:ge,lineHeight:ce,characterWidth:this.characterWidth,minHeight:J,maxHeight:H,offset:oe,gutterOffset:ce?Math.max(0,Math.ceil((oe+B.height-B.scrollerHeight)/ce)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(N-this.$padding),ve},U.prototype.$updateLines=function(){if(this.$changedLines){var z=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var I=this.layerConfig;if(!(z>I.lastRow+1)&&!(Bthis.$textLayer.MAX_LINE_LENGTH&&(z=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(z*this.characterWidth))},U.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},U.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},U.prototype.addGutterDecoration=function(z,B){this.$gutterLayer.addGutterDecoration(z,B)},U.prototype.removeGutterDecoration=function(z,B){this.$gutterLayer.removeGutterDecoration(z,B)},U.prototype.updateBreakpoints=function(z){this.$loop.schedule(this.CHANGE_GUTTER)},U.prototype.setAnnotations=function(z){this.$gutterLayer.setAnnotations(z),this.$loop.schedule(this.CHANGE_GUTTER)},U.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},U.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},U.prototype.showCursor=function(){this.$cursorLayer.showCursor()},U.prototype.scrollSelectionIntoView=function(z,B,I){this.scrollCursorIntoView(z,I),this.scrollCursorIntoView(B,I)},U.prototype.scrollCursorIntoView=function(z,B,I){if(this.$size.scrollerHeight!==0){var Y=this.$cursorLayer.getPixelPosition(z),H=Y.left,N=Y.top,W=I&&I.top||0,G=I&&I.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var Z=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;Z+W>N?(B&&Z+W>N+this.lineHeight&&(N-=B*this.$size.scrollerHeight),N===0&&(N=-this.scrollMargin.top),this.session.setScrollTop(N)):Z+this.$size.scrollerHeight-G=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||z<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||z>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},U.prototype.pixelToScreenCoordinates=function(z,B){var I;if(this.$hasCssTransforms){I={top:0,left:0};var Y=this.$fontMetrics.transformCoordinates([z,B]);z=Y[1]-this.gutterWidth-this.margin.left,B=Y[0]}else I=this.scroller.getBoundingClientRect();var H=z+this.scrollLeft-I.left-this.$padding,N=H/this.characterWidth,W=Math.floor((B+this.scrollTop-I.top)/this.lineHeight),G=this.$blockCursor?Math.floor(N):Math.round(N);return{row:W,column:G,side:N-G>0?1:-1,offsetX:H}},U.prototype.screenToTextCoordinates=function(z,B){var I;if(this.$hasCssTransforms){I={top:0,left:0};var Y=this.$fontMetrics.transformCoordinates([z,B]);z=Y[1]-this.gutterWidth-this.margin.left,B=Y[0]}else I=this.scroller.getBoundingClientRect();var H=z+this.scrollLeft-I.left-this.$padding,N=H/this.characterWidth,W=this.$blockCursor?Math.floor(N):Math.round(N),G=Math.floor((B+this.scrollTop-I.top)/this.lineHeight);return this.session.screenToDocumentPosition(G,Math.max(W,0),H)},U.prototype.textToScreenCoordinates=function(z,B){var I=this.scroller.getBoundingClientRect(),Y=this.session.documentToScreenPosition(z,B),H=this.$padding+(this.session.$bidiHandler.isBidiRow(Y.row,z)?this.session.$bidiHandler.getPosLeft(Y.column):Math.round(Y.column*this.characterWidth)),N=Y.row*this.lineHeight;return{pageX:I.left+H-this.scrollLeft,pageY:I.top+N-this.scrollTop}},U.prototype.visualizeFocus=function(){E.addCssClass(this.container,"ace_focus")},U.prototype.visualizeBlur=function(){E.removeCssClass(this.container,"ace_focus")},U.prototype.showComposition=function(z){this.$composition=z,z.cssText||(z.cssText=this.textarea.style.cssText),z.useTextareaForIME==null&&(z.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(E.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):z.markerId=this.session.addMarker(z.markerRange,"ace_composition_marker","text")},U.prototype.setCompositionText=function(z){var B=this.session.selection.cursor;this.addToken(z,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},U.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),E.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var z=this.session.selection.cursor;this.removeExtraToken(z.row,z.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},U.prototype.setGhostText=function(z,B){var I=this.session.selection.cursor,Y=B||{row:I.row,column:I.column};this.removeGhostText();var H=z.split(` `);this.addToken(H[0],"ghost_text",Y.row,Y.column),this.$ghostText={text:z,position:{row:Y.row,column:Y.column}},H.length>1&&(this.$ghostTextWidget={text:H.slice(1).join(` `),row:Y.row,column:Y.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},U.prototype.removeGhostText=function(){if(this.$ghostText){var z=this.$ghostText.position;this.removeExtraToken(z.row,z.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},U.prototype.addToken=function(z,B,I,Y){var H=this.session;H.bgTokenizer.lines[I]=null;var N={type:B,value:z},W=H.getTokens(I);if(Y==null||!W.length)W.push(N);else for(var G=0,Z=0;Z1||Math.abs(z.$size.height-Y)>1?z.$resizeTimer.delay():z.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},U}();X.prototype.CHANGE_CURSOR=1,X.prototype.CHANGE_MARKER=2,X.prototype.CHANGE_GUTTER=4,X.prototype.CHANGE_SCROLL=8,X.prototype.CHANGE_LINES=16,X.prototype.CHANGE_TEXT=32,X.prototype.CHANGE_SIZE=64,X.prototype.CHANGE_MARKER_BACK=128,X.prototype.CHANGE_MARKER_FRONT=256,X.prototype.CHANGE_FULL=512,X.prototype.CHANGE_H_SCROLL=1024,X.prototype.$changes=0,X.prototype.$padding=null,X.prototype.$frozen=!1,X.prototype.STEPS=8,S.implement(X.prototype,V),c.defineOptions(X.prototype,"renderer",{useResizeObserver:{set:function(U){!U&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):U&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(U){this.$textLayer.setShowInvisibles(U)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(U){typeof U=="number"&&(this.$printMarginColumn=U),this.$showPrintMargin=!!U,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(U){this.$gutter.style.display=U?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(U){this.$gutterLayer.$useSvgGutterIcons=U},initialValue:!1},showFoldedAnnotations:{set:function(U){this.$gutterLayer.$showFoldedAnnotations=U},initialValue:!1},fadeFoldWidgets:{set:function(U){E.setCssClass(this.$gutter,"ace_fade-fold-widgets",U)},initialValue:!1},showFoldWidgets:{set:function(U){this.$gutterLayer.setShowFoldWidgets(U),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(U){this.$textLayer.setDisplayIndentGuides(U)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(U){this.$textLayer.setHighlightIndentGuides(U)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(U){this.$gutterLayer.setHighlightGutterLine(U),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(U){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(U){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(U){typeof U=="number"&&(U=U+"px"),this.container.style.fontSize=U,this.updateFontSize()},initialValue:12},fontFamily:{set:function(U){this.container.style.fontFamily=U,this.updateFontSize()}},maxLines:{set:function(U){this.updateFull()}},minLines:{set:function(U){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(U){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(U){U=+U||0,this.$scrollPastEnd!=U&&(this.$scrollPastEnd=U,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(U){this.$gutterLayer.$fixedWidth=!!U,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(U){this.$updateCustomScrollbar(U)},initialValue:!1},theme:{set:function(U){this.setTheme(U)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!P.isMobile&&!P.isIE}}),r.VirtualRenderer=X}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,A){var S=n("../lib/oop"),E=n("../lib/net"),T=n("../lib/event_emitter").EventEmitter,c=n("../config");function C(l){var f="importScripts('"+E.qualifyURL(l)+"');";try{return new Blob([f],{type:"application/javascript"})}catch{var R=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,x=new R;return x.append(f),x.getBlob("application/javascript")}}function o(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var f=C(l),R=window.URL||window.webkitURL,x=R.createObjectURL(f);return new Worker(x)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){S.implement(this,T),this.$createWorkerFromOldConfig=function(l,f,R,x,L){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),c.get("packaged")||!n.toUrl)x=x||c.moduleUrl(f,"worker");else{var M=this.$normalizePath;x=x||M(n.toUrl("ace/worker/worker.js",null,"_"));var V={};l.forEach(function(D){V[D]=M(n.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(x),L&&this.send("importScripts",L),this.$worker.postMessage({init:!0,tlns:V,module:f,classname:R}),this.$worker},this.onMessage=function(l){var f=l.data;switch(f.type){case"event":this._signal(f.name,{data:f.data});break;case"call":var R=this.callbacks[f.id];R&&(R(f.data),delete this.callbacks[f.id]);break;case"error":this.reportError(f.data);break;case"log":window.console&&console.log&&console.log.apply(console,f.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return E.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,f){this.$worker.postMessage({command:l,args:f})},this.call=function(l,f,R){if(R){var x=this.callbackId++;this.callbacks[x]=R,f.push(x)}this.send(l,f)},this.emit=function(l,f){try{f.data&&f.data.err&&(f.data.err={message:f.data.err.message,stack:f.data.err.stack,code:f.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:f.data}})}catch(R){console.error(R.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var $=function(l,f,R){var x=null,L=!1,M=Object.create(T),V=[],D=new a({messageBuffer:V,terminate:function(){},postMessage:function(P){V.push(P),x&&(L?setTimeout(F):F())}});D.setEmitSync=function(P){L=P};var F=function(){var P=V.shift();P.command?x[P.command].apply(x,P.args):P.event&&M._signal(P.event,P.data)};return M.postMessage=function(P){D.onMessage({data:P})},M.callback=function(P,X){this.postMessage({type:"call",id:X,data:P})},M.emit=function(P,X){this.postMessage({type:"event",name:P,data:X})},c.loadModule(["worker",f],function(P){for(x=new P[R](M);V.length;)F()}),D};r.UIWorkerClient=$,r.WorkerClient=a,r.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,A){var S=n("./range").Range,E=n("./lib/event_emitter").EventEmitter,T=n("./lib/oop"),c=function(){function C(o,a,$,l,f,R){var x=this;this.length=a,this.session=o,this.doc=o.getDocument(),this.mainClass=f,this.othersClass=R,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){x.onCursorChange()})},this.$pos=$;var L=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=L.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return C.prototype.setup=function(){var o=this,a=this.doc,$=this.session;this.selectionBefore=$.selection.toJSON(),$.selection.inMultiSelectMode&&$.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=$.addMarker(new S(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(f){var R=a.createAnchor(f.row,f.column);R.$insertRight=!0,R.detach(),o.others.push(R)}),$.setUndoSelect(!1)},C.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,a=this;this.othersActive=!0,this.others.forEach(function($){$.markerId=o.addMarker(new S($.row,$.column,$.row,$.column+a.length),a.othersClass,null,!1)})}},C.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o=this.pos.column&&a.start.column<=this.pos.column+this.length+1,f=a.start.column-this.pos.column;if(this.updateAnchors(o),l&&(this.length+=$),l&&!this.session.$fromUndo){if(o.action==="insert")for(var R=this.others.length-1;R>=0;R--){var x=this.others[R],L={row:x.row,column:x.column+f};this.doc.insertMergedLines(L,o.lines)}else if(o.action==="remove")for(var R=this.others.length-1;R>=0;R--){var x=this.others[R],L={row:x.row,column:x.column+f};this.doc.remove(new S(L.row,L.column,L.row,L.column-$))}}this.$updating=!1,this.updateMarkers()}},C.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var a=this.others.length;a--;)this.others[a].onChange(o);this.updateMarkers()},C.prototype.updateMarkers=function(){if(!this.$updating){var o=this,a=this.session,$=function(f,R){a.removeMarker(f.markerId),f.markerId=a.addMarker(new S(f.row,f.column,f.row,f.column+o.length),R,null,!1)};$(this.pos,this.mainClass);for(var l=this.others.length;l--;)$(this.others[l],this.othersClass)}},C.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},C.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},C.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),a=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,$=0;$1?E.multiSelect.joinSelections():E.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(E){E.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(E){E.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(E){E.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(E){E.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(E){return E&&E.inMultiSelectMode}}];var S=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new S(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,A){var S=n("./range_list").RangeList,E=n("./range").Range,T=n("./selection").Selection,c=n("./mouse/multi_select_handler").onMouseDown,C=n("./lib/event"),o=n("./lib/lang"),a=n("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var $=n("./search").Search,l=new $;function f(D,F,P){return l.$options.wrap=!0,l.$options.needle=F,l.$options.backwards=P==-1,l.find(D)}var R=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(R.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(D,F){if(D){if(!this.inMultiSelectMode&&this.rangeCount===0){var P=this.toOrientedRange();if(this.rangeList.add(P),this.rangeList.add(D),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),F||this.fromOrientedRange(D);this.rangeList.removeAll(),this.rangeList.add(P),this.$onAddRange(P)}D.cursor||(D.cursor=D.end);var X=this.rangeList.add(D);return this.$onAddRange(D),X.length&&this.$onRemoveRange(X),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),F||this.fromOrientedRange(D)}},this.toSingleRange=function(D){D=D||this.ranges[0];var F=this.rangeList.removeAll();F.length&&this.$onRemoveRange(F),D&&this.fromOrientedRange(D)},this.substractPoint=function(D){var F=this.rangeList.substractPoint(D);if(F)return this.$onRemoveRange(F),F[0]},this.mergeOverlappingRanges=function(){var D=this.rangeList.merge();D.length&&this.$onRemoveRange(D)},this.$onAddRange=function(D){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(D),this._signal("addRange",{range:D})},this.$onRemoveRange=function(D){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var F=this.rangeList.ranges.pop();D.push(F),this.rangeCount=0}for(var P=D.length;P--;){var X=this.ranges.indexOf(D[P]);this.ranges.splice(X,1)}this._signal("removeRange",{ranges:D}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),F=F||this.ranges[0],F&&!F.isEqual(this.getRange())&&this.fromOrientedRange(F)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new S,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var D=this.ranges.length?this.ranges:[this.getRange()],F=[],P=0;P1){var D=this.rangeList.ranges,F=D[D.length-1],P=E.fromPoints(D[0].start,F.end);this.toSingleRange(),this.setSelectionRange(P,F.cursor==F.start)}else{var X=this.session.documentToScreenPosition(this.cursor),U=this.session.documentToScreenPosition(this.anchor),z=this.rectangularRangeBlock(X,U);z.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(D,F,P){var X=[],U=D.column0;)Q--;if(Q>0)for(var ne=0;X[ne].isEmpty();)ne++;for(var re=Q;re>=ne;re--)X[re].isEmpty()&&X.splice(re,1)}return X}}).call(T.prototype);var x=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(D){D.cursor||(D.cursor=D.end);var F=this.getSelectionStyle();return D.marker=this.session.addMarker(D,"ace_selection",F),this.session.$selectionMarkers.push(D),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,D},this.removeSelectionMarker=function(D){if(D.marker){this.session.removeMarker(D.marker);var F=this.session.$selectionMarkers.indexOf(D);F!=-1&&this.session.$selectionMarkers.splice(F,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(D){for(var F=this.session.$selectionMarkers,P=D.length;P--;){var X=D[P];if(X.marker){this.session.removeMarker(X.marker);var U=F.indexOf(X);U!=-1&&F.splice(U,1)}}this.session.selectionMarkerCount=F.length},this.$onAddRange=function(D){this.addSelectionMarker(D.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(D){this.removeSelectionMarkers(D.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(D){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(D){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(D){var F=D.command,P=D.editor;if(P.multiSelect){if(F.multiSelectAction)F.multiSelectAction=="forEach"?X=P.forEachSelection(F,D.args):F.multiSelectAction=="forEachLine"?X=P.forEachSelection(F,D.args,!0):F.multiSelectAction=="single"?(P.exitMultiSelectMode(),X=F.exec(P,D.args||{})):X=F.multiSelectAction(P,D.args||{});else{var X=F.exec(P,D.args||{});P.multiSelect.addRange(P.multiSelect.toOrientedRange()),P.multiSelect.mergeOverlappingRanges()}return X}},this.forEachSelection=function(D,F,P){if(!this.inVirtualSelectionMode){var X=P&&P.keepOrder,U=P==!0||P&&P.$byLines,z=this.session,B=this.selection,I=B.rangeList,Y=(X?B:I).ranges,H;if(!Y.length)return D.exec?D.exec(this,F||{}):D(this,F||{});var N=B._eventRegistry;B._eventRegistry={};var W=new T(z);this.inVirtualSelectionMode=!0;for(var G=Y.length;G--;){if(U)for(;G>0&&Y[G].start.row==Y[G-1].end.row;)G--;W.fromOrientedRange(Y[G]),W.index=G,this.selection=z.selection=W;var Z=D.exec?D.exec(this,F||{}):D(this,F||{});!H&&Z!==void 0&&(H=Z),W.toOrientedRange(Y[G])}W.detach(),this.selection=z.selection=B,this.inVirtualSelectionMode=!1,B._eventRegistry=N,B.mergeOverlappingRanges(),B.ranges[0]&&B.fromOrientedRange(B.ranges[0]);var J=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),J&&J.from==J.to&&this.renderer.animateScrolling(J.from),H}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var D="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var F=this.multiSelect.rangeList.ranges,P=[],X=0;X0);B<0&&(B=0),I>=H&&(I=H-1)}var W=this.session.removeFullLines(B,I);W=this.$reAlignText(W,Y),this.session.insert({row:B,column:0},W.join(` `)+` `),Y||(z.start.column=0,z.end.column=W[W.length-1].length),this.selection.setRange(z)}else{U.forEach(function(Q){F.substractPoint(Q.cursor)});var G=0,Z=1/0,J=P.map(function(Q){var ne=Q.cursor,re=D.getLine(ne.row),ue=re.substr(ne.column).search(/\S/g);return ue==-1&&(ue=0),ne.column>G&&(G=ne.column),ueoe?D.insert(re,o.stringRepeat(" ",ue-oe)):D.remove(new E(re.row,re.column,re.row,re.column-ue+oe)),Q.start.column=Q.end.column=G,Q.start.row=Q.end.row=re.row,Q.cursor=Q.end}),F.fromOrientedRange(P[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(D,F){var P=!0,X=!0,U,z,B;return D.map(function(W){var G=W.match(/(\s*)(.*?)(\s*)([=:].*)/);return G?U==null?(U=G[1].length,z=G[2].length,B=G[3].length,G):(U+z+B!=G[1].length+G[2].length+G[3].length&&(X=!1),U!=G[1].length&&(P=!1),U>G[1].length&&(U=G[1].length),zG[3].length&&(B=G[3].length),G):[W]}).map(F?Y:P?X?H:Y:N);function I(W){return o.stringRepeat(" ",W)}function Y(W){return W[2]?I(U)+W[2]+I(z-W[2].length+B)+W[4].replace(/^([=:])\s+/,"$1 "):W[0]}function H(W){return W[2]?I(U+z-W[2].length)+W[2]+I(B)+W[4].replace(/^([=:])\s+/,"$1 "):W[0]}function N(W){return W[2]?I(U)+W[2]+I(B)+W[4].replace(/^([=:])\s+/,"$1 "):W[0]}}}).call(x.prototype);function L(D,F){return D.row==F.row&&D.column==F.column}r.onSessionChange=function(D){var F=D.session;F&&!F.multiSelect&&(F.$selectionMarkers=[],F.selection.$initRangeList(),F.multiSelect=F.selection),this.multiSelect=F&&F.multiSelect;var P=D.oldSession;P&&(P.multiSelect.off("addRange",this.$onAddRange),P.multiSelect.off("removeRange",this.$onRemoveRange),P.multiSelect.off("multiSelect",this.$onMultiSelect),P.multiSelect.off("singleSelect",this.$onSingleSelect),P.multiSelect.lead.off("change",this.$checkMultiselectChange),P.multiSelect.anchor.off("change",this.$checkMultiselectChange)),F&&(F.multiSelect.on("addRange",this.$onAddRange),F.multiSelect.on("removeRange",this.$onRemoveRange),F.multiSelect.on("multiSelect",this.$onMultiSelect),F.multiSelect.on("singleSelect",this.$onSingleSelect),F.multiSelect.lead.on("change",this.$checkMultiselectChange),F.multiSelect.anchor.on("change",this.$checkMultiselectChange)),F&&this.inMultiSelectMode!=F.selection.inMultiSelectMode&&(F.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function M(D){D.$multiselectOnSessionChange||(D.$onAddRange=D.$onAddRange.bind(D),D.$onRemoveRange=D.$onRemoveRange.bind(D),D.$onMultiSelect=D.$onMultiSelect.bind(D),D.$onSingleSelect=D.$onSingleSelect.bind(D),D.$multiselectOnSessionChange=r.onSessionChange.bind(D),D.$checkMultiselectChange=D.$checkMultiselectChange.bind(D),D.$multiselectOnSessionChange(D),D.on("changeSession",D.$multiselectOnSessionChange),D.on("mousedown",c),D.commands.addCommands(a.defaultCommands),V(D))}function V(D){if(!D.textInput)return;var F=D.textInput.getElement(),P=!1;C.addListener(F,"keydown",function(U){var z=U.keyCode==18&&!(U.ctrlKey||U.shiftKey||U.metaKey);D.$blockSelectEnabled&&z?P||(D.renderer.setMouseCursor("crosshair"),P=!0):P&&X()},D),C.addListener(F,"keyup",X,D),C.addListener(F,"blur",X,D);function X(U){P&&(D.renderer.setMouseCursor(""),P=!1)}}r.MultiSelect=M,n("./config").defineOptions(x.prototype,"editor",{enableMultiselect:{set:function(D){M(this),D?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(D){this.$blockSelectEnabled=D},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,A){var S=n("../../range").Range,E=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(T,c,C){var o=T.getLine(C);return this.foldingStartMarker.test(o)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(T,c,C){return null},this.indentationBlock=function(T,c,C){var o=/\S/,a=T.getLine(c),$=a.search(o);if($!=-1){for(var l=C||a.length,f=T.getLength(),R=c,x=c;++cR){var V=T.getLine(x).length;return new S(R,l,x,V)}}},this.openingBracketBlock=function(T,c,C,o,a){var $={row:C,column:o+1},l=T.$findClosingBracket(c,$,a);if(l){var f=T.foldWidgets[l.row];return f==null&&(f=T.getFoldWidget(l.row)),f=="start"&&l.row>$.row&&(l.row--,l.column=T.getLine(l.row).length),S.fromPoints($,l)}},this.closingBracketBlock=function(T,c,C,o,a){var $={row:C,column:o},l=T.$findOpeningBracket(c,$);if(l)return l.column++,$.column--,S.fromPoints(l,$)}}).call(E.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,A){var S=n("../line_widgets").LineWidgets,E=n("../lib/dom"),T=n("../range").Range,c=n("../config").nls;function C(a,$,l){for(var f=0,R=a.length-1;f<=R;){var x=f+R>>1,L=l($,a[x]);if(L>0)f=x+1;else if(L<0)R=x-1;else return x}return-(f+1)}function o(a,$,l){var f=a.getAnnotations().sort(T.comparePoints);if(f.length){var R=C(f,{row:$,column:-1},T.comparePoints);R<0&&(R=-R-1),R>=f.length?R=l>0?0:f.length-1:R===0&&l<0&&(R=f.length-1);var x=f[R];if(!(!x||!l)){if(x.row===$){do x=f[R+=l];while(x&&x.row===$);if(!x)return f.slice()}var L=[];$=x.row;do L[l<0?"unshift":"push"](x),x=f[R+=l];while(x&&x.row==$);return L.length&&L}}}r.showErrorMarker=function(a,$){var l=a.session;l.widgetManager||(l.widgetManager=new S(l),l.widgetManager.attach(a));var f=a.getCursorPosition(),R=f.row,x=l.widgetManager.getWidgetsAtRow(R).filter(function(z){return z.type=="errorMarker"})[0];x?x.destroy():R-=$;var L=o(l,R,$),M;if(L){var V=L[0];f.column=(V.pos&&typeof V.column!="number"?V.pos.sc:V.column)||0,f.row=V.row,M=a.renderer.$gutterLayer.$annotations[f.row]}else{if(x)return;M={text:[c("Looks good!")],className:"ace_ok"}}a.session.unfold(f.row),a.selection.moveToPosition(f);var D={row:f.row,fixedWidth:!0,coverGutter:!0,el:E.createElement("div"),type:"errorMarker"},F=D.el.appendChild(E.createElement("div")),P=D.el.appendChild(E.createElement("div"));P.className="error_widget_arrow "+M.className;var X=a.renderer.$cursorLayer.getPixelPosition(f).left;P.style.left=X+a.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",F.className="error_widget "+M.className,F.innerHTML=M.text.join("
"),F.appendChild(E.createElement("div"));var U=function(z,B,I){if(B===0&&(I==="esc"||I==="return"))return D.destroy(),{command:"null"}};D.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(U),l.widgetManager.removeLineWidget(D),a.off("changeSelection",D.destroy),a.off("changeSession",D.destroy),a.off("mouseup",D.destroy),a.off("change",D.destroy))},a.keyBinding.addKeyboardHandler(U),a.on("changeSelection",D.destroy),a.on("changeSession",D.destroy),a.on("mouseup",D.destroy),a.on("change",D.destroy),a.session.widgetManager.addLineWidget(D),D.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:D.el.offsetHeight})},E.importCssString(` .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; } `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,A){n("./loader_build")(r);var S=n("./lib/dom"),E=n("./range").Range,T=n("./editor").Editor,c=n("./edit_session").EditSession,C=n("./undomanager").UndoManager,o=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(a,$){if(typeof a=="string"){var l=a;if(a=document.getElementById(l),!a)throw new Error("ace.edit can't find div #"+l)}if(a&&a.env&&a.env.editor instanceof T)return a.env.editor;var f="";if(a&&/input|textarea/i.test(a.tagName)){var R=a;f=R.value,a=S.createElement("pre"),R.parentNode.replaceChild(a,R)}else a&&(f=a.textContent,a.innerHTML="");var x=r.createEditSession(f),L=new T(new o(a),x,$),M={document:x,editor:L,onResize:L.resize.bind(L,null)};return R&&(M.textarea=R),L.on("destroy",function(){M.editor.container.env=null}),L.container.env=L.env=M,L},r.createEditSession=function(a,$){var l=new c(a,$);return l.setUndoManager(new C),l},r.Range=E,r.Editor=T,r.EditSession=c,r.UndoManager=C,r.VirtualRenderer=o,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var A in n)n.hasOwnProperty(A)&&(r.ace[A]=n[A]);r.ace.default=r.ace,e&&(e.exports=r.ace)})}()})(ace$2);var aceExports=ace$2.exports;const ace$1=getDefaultExportFromCjs(aceExports),modeYamlUrl="/assets/mode-yaml-a21faa53.js",themeMonokaiUrl="data:application/javascript;base64,YWNlLmRlZmluZSgiYWNlL3RoZW1lL21vbm9rYWktY3NzIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIl0sZnVuY3Rpb24oZSx0LG4pe24uZXhwb3J0cz0iLmFjZS1tb25va2FpIC5hY2VfZ3V0dGVyIHtcbiAgYmFja2dyb3VuZDogIzJGMzEyOTtcbiAgY29sb3I6ICM4RjkwOEFcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfcHJpbnQtbWFyZ2luIHtcbiAgd2lkdGg6IDFweDtcbiAgYmFja2dyb3VuZDogIzU1NTY1MVxufVxuXG4uYWNlLW1vbm9rYWkge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjcyODIyO1xuICBjb2xvcjogI0Y4RjhGMlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9jdXJzb3Ige1xuICBjb2xvcjogI0Y4RjhGMFxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9zZWxlY3Rpb24ge1xuICBiYWNrZ3JvdW5kOiAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaS5hY2VfbXVsdGlzZWxlY3QgLmFjZV9zZWxlY3Rpb24uYWNlX3N0YXJ0IHtcbiAgYm94LXNoYWRvdzogMCAwIDNweCAwcHggIzI3MjgyMjtcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfbWFya2VyLWxheWVyIC5hY2Vfc3RlcCB7XG4gIGJhY2tncm91bmQ6IHJnYigxMDIsIDgyLCAwKVxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9icmFja2V0IHtcbiAgbWFyZ2luOiAtMXB4IDAgMCAtMXB4O1xuICBib3JkZXI6IDFweCBzb2xpZCAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX21hcmtlci1sYXllciAuYWNlX2FjdGl2ZS1saW5lIHtcbiAgYmFja2dyb3VuZDogIzIwMjAyMFxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9ndXR0ZXItYWN0aXZlLWxpbmUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjcyNzI3XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX21hcmtlci1sYXllciAuYWNlX3NlbGVjdGVkLXdvcmQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2ludmlzaWJsZSB7XG4gIGNvbG9yOiAjNTI1MjRkXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2VudGl0eS5hY2VfbmFtZS5hY2VfdGFnLFxuLmFjZS1tb25va2FpIC5hY2Vfa2V5d29yZCxcbi5hY2UtbW9ub2thaSAuYWNlX21ldGEuYWNlX3RhZyxcbi5hY2UtbW9ub2thaSAuYWNlX3N0b3JhZ2Uge1xuICBjb2xvcjogI0Y5MjY3MlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9wdW5jdHVhdGlvbixcbi5hY2UtbW9ub2thaSAuYWNlX3B1bmN0dWF0aW9uLmFjZV90YWcge1xuICBjb2xvcjogI2ZmZlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9jb25zdGFudC5hY2VfY2hhcmFjdGVyLFxuLmFjZS1tb25va2FpIC5hY2VfY29uc3RhbnQuYWNlX2xhbmd1YWdlLFxuLmFjZS1tb25va2FpIC5hY2VfY29uc3RhbnQuYWNlX251bWVyaWMsXG4uYWNlLW1vbm9rYWkgLmFjZV9jb25zdGFudC5hY2Vfb3RoZXIge1xuICBjb2xvcjogI0FFODFGRlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9pbnZhbGlkIHtcbiAgY29sb3I6ICNGOEY4RjA7XG4gIGJhY2tncm91bmQtY29sb3I6ICNGOTI2NzJcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfaW52YWxpZC5hY2VfZGVwcmVjYXRlZCB7XG4gIGNvbG9yOiAjRjhGOEYwO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjQUU4MUZGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N1cHBvcnQuYWNlX2NvbnN0YW50LFxuLmFjZS1tb25va2FpIC5hY2Vfc3VwcG9ydC5hY2VfZnVuY3Rpb24ge1xuICBjb2xvcjogIzY2RDlFRlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9mb2xkIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI0E2RTIyRTtcbiAgYm9yZGVyLWNvbG9yOiAjRjhGOEYyXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N0b3JhZ2UuYWNlX3R5cGUsXG4uYWNlLW1vbm9rYWkgLmFjZV9zdXBwb3J0LmFjZV9jbGFzcyxcbi5hY2UtbW9ub2thaSAuYWNlX3N1cHBvcnQuYWNlX3R5cGUge1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG4gIGNvbG9yOiAjNjZEOUVGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2VudGl0eS5hY2VfbmFtZS5hY2VfZnVuY3Rpb24sXG4uYWNlLW1vbm9rYWkgLmFjZV9lbnRpdHkuYWNlX290aGVyLFxuLmFjZS1tb25va2FpIC5hY2VfZW50aXR5LmFjZV9vdGhlci5hY2VfYXR0cmlidXRlLW5hbWUsXG4uYWNlLW1vbm9rYWkgLmFjZV92YXJpYWJsZSB7XG4gIGNvbG9yOiAjQTZFMjJFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3ZhcmlhYmxlLmFjZV9wYXJhbWV0ZXIge1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG4gIGNvbG9yOiAjRkQ5NzFGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N0cmluZyB7XG4gIGNvbG9yOiAjRTZEQjc0XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2NvbW1lbnQge1xuICBjb2xvcjogIzc1NzE1RVxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9pbmRlbnQtZ3VpZGUge1xuICBiYWNrZ3JvdW5kOiB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUVrbEVRVlFJbVdQUTBGRDBaWEJ6ZC93UEFBalZBb3hlU2dOZUFBQUFBRWxGVGtTdVFtQ0MpIHJpZ2h0IHJlcGVhdC15XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2luZGVudC1ndWlkZS1hY3RpdmUge1xuICBiYWNrZ3JvdW5kOiB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUVrbEVRVlFJVzJQUTFkWDl6ekJ6NXN6L0FCQ2NCRkZlbnRMbEFBQUFBRWxGVGtTdVFtQ0MpIHJpZ2h0IHJlcGVhdC15O1xufVxuIn0pLGFjZS5kZWZpbmUoImFjZS90aGVtZS9tb25va2FpIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIiwiYWNlL3RoZW1lL21vbm9rYWktY3NzIiwiYWNlL2xpYi9kb20iXSxmdW5jdGlvbihlLHQsbil7dC5pc0Rhcms9ITAsdC5jc3NDbGFzcz0iYWNlLW1vbm9rYWkiLHQuY3NzVGV4dD1lKCIuL21vbm9rYWktY3NzIik7dmFyIHI9ZSgiLi4vbGliL2RvbSIpO3IuaW1wb3J0Q3NzU3RyaW5nKHQuY3NzVGV4dCx0LmNzc0NsYXNzLCExKX0pOyAgICAgICAgICAgICAgICAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgYWNlLnJlcXVpcmUoWyJhY2UvdGhlbWUvbW9ub2thaSJdLCBmdW5jdGlvbihtKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbW9kdWxlID09ICJvYmplY3QiICYmIHR5cGVvZiBleHBvcnRzID09ICJvYmplY3QiICYmIG1vZHVsZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSBtOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KSgpOwogICAgICAgICAgICA=";ace$1.config.setModuleUrl("ace/mode/yaml",modeYamlUrl);ace$1.config.setModuleUrl("ace/theme/monokai",themeMonokaiUrl);var MapShim=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(A,S){return A[0]===n?(r=S,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),A=this.__entries__[r];return A&&A[1]},t.prototype.set=function(n,r){var A=e(this.__entries__,n);~A?this.__entries__[A][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,A=e(r,n);~A&&r.splice(A,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var A=0,S=this.__entries__;A0},e.prototype.connect_=function(){!isBrowser||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!isBrowser||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,A=transitionKeys.some(function(S){return!!~r.indexOf(S)});A&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),defineConfigurable=function(e,t){for(var n=0,r=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof getWindowOf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new ResizeObservation(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof getWindowOf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new ResizeObserverEntry(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver$1=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ResizeObserverController.getInstance(),r=new ResizeObserverSPI(t,n,this);observers.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){ResizeObserver$1.prototype[e]=function(){var t;return(t=observers.get(this))[e].apply(t,arguments)}});var index=function(){return typeof global$1.ResizeObserver<"u"?global$1.ResizeObserver:ResizeObserver$1}();const Events=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],VAceEditor=defineComponent({props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...Events],render(){return h("div")},mounted(){const e=this._editor=markRaw(ace$1.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,e.on("change",()=>{if(this._isSettingContent)return;const t=e.getValue();this._contentBackup=t,this.$emit("update:value",t)}),Events.forEach(t=>{const n="on"+capitalize(t);typeof this.$.vnode.props[n]=="function"&&e.on(t,this.$emit.bind(this,t))}),this._ro=new index(()=>e.resize()),this._ro.observe(this.$el),this.$emit("init",e)},beforeUnmount(){var e,t;(e=this._ro)===null||e===void 0||e.disconnect(),(t=this._editor)===null||t===void 0||t.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()}},watch:{value(e){if(this._contentBackup!==e){try{this._isSettingContent=!0,this._editor.setValue(e,1)}finally{this._isSettingContent=!1}this._contentBackup=e}},theme(e){this._editor.setTheme("ace/theme/"+e)},options(e){this._editor.setOptions(e)},readonly(e){this._editor.setReadOnly(e)},placeholder(e){this._editor.setOption("placeholder",e)},wrap(e){this._editor.setWrapBehavioursEnabled(e)},printMargin(e){this._editor.setOption("printMargin",e)},lang(e){this._editor.setOption("mode","ace/mode/"+e)},minLines(e){this._editor.setOption("minLines",e)},maxLines(e){this._editor.setOption("maxLines",e)}}}),_sfc_main$d=defineComponent({name:"RuleInputForm",components:{VAceEditor},props:{yaml:{type:String,required:!0}},emits:["update-yaml"],setup(e,t){const n=toRef$1(e,"yaml");return watchEffect(()=>{t.emit("update-yaml",n.value)}),{yamlInput:n}}}),_hoisted_1$7={class:"block"};function _sfc_render$d(e,t,n,r,A,S){const E=resolveComponent("VAceEditor");return openBlock(),createElementBlock("div",_hoisted_1$7,[createVNode(E,{class:"vue-ace-editor",value:e.yamlInput,"onUpdate:value":t[0]||(t[0]=T=>e.yamlInput=T),lang:"yaml",theme:"monokai",options:{fontSize:16,minLines:6,maxLines:1e4}},null,8,["value"])])}const InputForm=_export_sfc(_sfc_main$d,[["render",_sfc_render$d]]),_sfc_main$c=defineComponent({name:"EditRule",components:{InputForm,ErrorMessage},props:{rule:{type:Object,required:!0}},setup(e){const t=useRouter(),n=toRef$1(e,"rule"),r=toRef$1(n.value,"yaml"),A=generateUpdateRuleTask();return{edit:async()=>{const T=await A.perform({id:e.rule.id,yaml:r.value});t.push({name:"Rule",params:{id:T.id}})},yaml:r,updateYAML:T=>{r.value=T},updateRuleTask:A}}}),_hoisted_1$6={class:"column"},_hoisted_2$5={class:"is-size-2 mb-4"},_hoisted_3$5={class:"field is-grouped is-grouped-centered"},_hoisted_4$5={class:"control"},_hoisted_5$4={class:"icon is-small"},_hoisted_6$4=createBaseVNode("span",null,"Edit",-1),_hoisted_7$4={key:0},_hoisted_8$4=createBaseVNode("hr",null,null,-1);function _sfc_render$c(e,t,n,r,A,S){var C,o;const E=resolveComponent("InputForm"),T=resolveComponent("font-awesome-icon"),c=resolveComponent("ErrorMessage");return openBlock(),createElementBlock("div",_hoisted_1$6,[createBaseVNode("h2",_hoisted_2$5,"Edit rule: "+toDisplayString(e.rule.id),1),createVNode(E,{yaml:e.yaml,"onUpdate:yaml":t[0]||(t[0]=a=>e.yaml=a),onUpdateYaml:e.updateYAML},null,8,["yaml","onUpdateYaml"]),createBaseVNode("div",_hoisted_3$5,[createBaseVNode("p",_hoisted_4$5,[createBaseVNode("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...a)=>e.edit&&e.edit(...a))},[createBaseVNode("span",_hoisted_5$4,[createVNode(T,{icon:"edit"})]),_hoisted_6$4])])]),(C=e.updateRuleTask.last)!=null&&C.error?(openBlock(),createElementBlock("div",_hoisted_7$4,[_hoisted_8$4,createVNode(c,{error:(o=e.updateRuleTask.last)==null?void 0:o.error},null,8,["error"])])):createCommentVNode("",!0)])}const EditRule$2=_export_sfc(_sfc_main$c,[["render",_sfc_render$c]]),_sfc_main$b=defineComponent({name:"EditRuleWrapper",components:{EditRule:EditRule$2,Loading,ErrorMessage},props:{id:{type:String,required:!0}},setup(e){const t=generateGetRuleTask(),n=async()=>{await t.perform(e.id)};return onMounted(async()=>{await n()}),watch(e,async()=>{await n()}),{getRuleTask:t}}});function _sfc_render$b(e,t,n,r,A,S){var C,o;const E=resolveComponent("Loading"),T=resolveComponent("ErrorMessage"),c=resolveComponent("EditRule");return openBlock(),createElementBlock(Fragment,null,[e.getRuleTask.isRunning?(openBlock(),createBlock(E,{key:0})):createCommentVNode("",!0),e.getRuleTask.isError?(openBlock(),createBlock(T,{key:1,error:(C=e.getRuleTask.last)==null?void 0:C.error},null,8,["error"])):createCommentVNode("",!0),(o=e.getRuleTask.last)!=null&&o.value?(openBlock(),createBlock(c,{key:2,rule:e.getRuleTask.last.value},null,8,["rule"])):createCommentVNode("",!0)],64)}const EditRule$1=_export_sfc(_sfc_main$b,[["render",_sfc_render$b]]),_sfc_main$a=defineComponent({name:"EditRuleView",components:{EditRule:EditRule$1},props:{id:{type:String,required:!0}},setup(e){const t=()=>{useTitle(`Edit rule:${e.id} - Mihari`)};onMounted(()=>{t()}),watch(()=>e.id,()=>{t()})}});function _sfc_render$a(e,t,n,r,A,S){const E=resolveComponent("EditRule",!0);return openBlock(),createBlock(E,{id:e.id},null,8,["id"])}const EditRule=_export_sfc(_sfc_main$a,[["render",_sfc_render$a]]);function dedent(e){for(var t=[],n=1;n1&&arguments[1]!==void 0?arguments[1]:0,n=(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase();if(!validate(n))throw TypeError("Stringified UUID is invalid");return n}function v4(e,t,n){e=e||{};var r=e.random||(e.rng||rng)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var A=0;A<16;++A)t[n+A]=r[A];return t}return stringify(r)}function getRuleTemplate(){const e=v4(),t=dayjs();return dedent`id: ${e} title: Title goes here description: Description goes here created_on: ${t.format("YYYY-MM-DD")} queries: []`}const _sfc_main$9=defineComponent({name:"NewRule",components:{InputForm,ErrorMessage},setup(){const e=useRouter(),t=ref(getRuleTemplate()),n=generateCreateRuleTask();return{yaml:t,create:async()=>{const S=await n.perform({yaml:t.value});e.push({name:"Rule",params:{id:S.id}})},updateYAML:S=>{t.value=S},createRuleTask:n}}}),_hoisted_1$5={class:"column"},_hoisted_2$4=createBaseVNode("h2",{class:"is-size-2 mb-4"},"New rule",-1),_hoisted_3$4={class:"field is-grouped is-grouped-centered"},_hoisted_4$4={class:"control"},_hoisted_5$3={class:"icon is-small"},_hoisted_6$3=createBaseVNode("span",null,"Create",-1),_hoisted_7$3={key:0},_hoisted_8$3=createBaseVNode("hr",null,null,-1);function _sfc_render$9(e,t,n,r,A,S){var C,o;const E=resolveComponent("InputForm"),T=resolveComponent("font-awesome-icon"),c=resolveComponent("ErrorMessage");return openBlock(),createElementBlock("div",_hoisted_1$5,[_hoisted_2$4,createVNode(E,{yaml:e.yaml,"onUpdate:yaml":t[0]||(t[0]=a=>e.yaml=a),onUpdateYaml:e.updateYAML},null,8,["yaml","onUpdateYaml"]),createBaseVNode("div",_hoisted_3$4,[createBaseVNode("p",_hoisted_4$4,[createBaseVNode("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...a)=>e.create&&e.create(...a))},[createBaseVNode("span",_hoisted_5$3,[createVNode(T,{icon:"plus"})]),_hoisted_6$3])])]),(C=e.createRuleTask.last)!=null&&C.error?(openBlock(),createElementBlock("div",_hoisted_7$3,[_hoisted_8$3,createVNode(c,{error:(o=e.createRuleTask.last)==null?void 0:o.error},null,8,["error"])])):createCommentVNode("",!0)])}const NewRule$1=_export_sfc(_sfc_main$9,[["render",_sfc_render$9]]),_sfc_main$8=defineComponent({name:"NewRuleView",components:{NewRule:NewRule$1},setup(){const e=()=>{useTitle("New rule - Mihari")};onMounted(()=>{e()})}});function _sfc_render$8(e,t,n,r,A,S){const E=resolveComponent("NewRule",!0);return openBlock(),createBlock(E)}const NewRule=_export_sfc(_sfc_main$8,[["render",_sfc_render$8]]),_sfc_main$7=defineComponent({name:"YAML",components:{VAceEditor},props:{yaml:{type:String,required:!0}},setup(){}}),_hoisted_1$4={class:"block"};function _sfc_render$7(e,t,n,r,A,S){const E=resolveComponent("VAceEditor");return openBlock(),createElementBlock("div",_hoisted_1$4,[createVNode(E,{class:"vue-ace-editor",value:e.yaml,lang:"yaml",theme:"monokai",options:{readOnly:!0,fontSize:16,maxLines:1e4,minLines:6}},null,8,["value"])])}const YAML=_export_sfc(_sfc_main$7,[["render",_sfc_render$7]]),_sfc_main$6=defineComponent({name:"RuleItem",props:{rule:{type:Object,required:!0}},components:{YAML,Alerts,Loading,ErrorMessage},emits:["refresh"],setup(e,t){const n=useRouter(),r=generateDeleteRuleTask(),A=generateRunRuleTask();return{deleteRule:async()=>{window.confirm(`Are you sure you want to delete ${e.rule.id}?`)&&(await r.perform(e.rule.id),n.push("/"))},runRule:async()=>{await A.perform(e.rule.id),t.emit("refresh")},runRuleTask:A}}}),_hoisted_1$3={class:"column"},_hoisted_2$3={key:0},_hoisted_3$3=createBaseVNode("hr",null,null,-1),_hoisted_4$3={key:1},_hoisted_5$2=createBaseVNode("hr",null,null,-1),_hoisted_6$2=createBaseVNode("h2",{class:"is-size-2 mb-4"},"Rule",-1),_hoisted_7$2={class:"is-clearfix"},_hoisted_8$2={class:"buttons is-pulled-right"},_hoisted_9$2=createBaseVNode("span",null,"Run",-1),_hoisted_10$1={class:"icon is-small"},_hoisted_11$1=createBaseVNode("span",null,"Edit",-1),_hoisted_12$1={class:"icon is-small"},_hoisted_13$1=createBaseVNode("span",null,"Delete",-1),_hoisted_14$1={class:"icon is-small"},_hoisted_15$1=createBaseVNode("hr",null,null,-1),_hoisted_16$1={class:"column"},_hoisted_17$1=createBaseVNode("h2",{class:"is-size-2 mb-4"},"Related alerts",-1);function _sfc_render$6(e,t,n,r,A,S){var $;const E=resolveComponent("Loading"),T=resolveComponent("ErrorMessage"),c=resolveComponent("font-awesome-icon"),C=resolveComponent("router-link"),o=resolveComponent("YAML"),a=resolveComponent("Alerts");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$3,[e.runRuleTask.isRunning?(openBlock(),createElementBlock("div",_hoisted_2$3,[createVNode(E),_hoisted_3$3])):createCommentVNode("",!0),($=e.runRuleTask.last)!=null&&$.error?(openBlock(),createElementBlock("div",_hoisted_4$3,[createVNode(T,{error:e.runRuleTask.last.error},null,8,["error"]),_hoisted_5$2])):createCommentVNode("",!0),_hoisted_6$2,createBaseVNode("p",_hoisted_7$2,[createBaseVNode("span",_hoisted_8$2,[createBaseVNode("button",{class:"button is-primary is-light is-small",onClick:t[0]||(t[0]=(...l)=>e.runRule&&e.runRule(...l))},[_hoisted_9$2,createBaseVNode("span",_hoisted_10$1,[createVNode(c,{icon:"arrow-right"})])]),createVNode(C,{class:"button is-info is-light is-small",to:{name:"EditRule",params:{id:e.rule.id}}},{default:withCtx(()=>[_hoisted_11$1,createBaseVNode("span",_hoisted_12$1,[createVNode(c,{icon:"edit"})])]),_:1},8,["to"]),createBaseVNode("button",{class:"button is-light is-small",onClick:t[1]||(t[1]=(...l)=>e.deleteRule&&e.deleteRule(...l))},[_hoisted_13$1,createBaseVNode("span",_hoisted_14$1,[createVNode(c,{icon:"times"})])])])]),createVNode(o,{yaml:e.rule.yaml},null,8,["yaml"])]),_hoisted_15$1,createBaseVNode("div",_hoisted_16$1,[_hoisted_17$1,createVNode(a,{ruleId:e.rule.id},null,8,["ruleId"])])],64)}const Rule$2=_export_sfc(_sfc_main$6,[["render",_sfc_render$6]]),_sfc_main$5=defineComponent({name:"RuleWrapper",components:{Rule:Rule$2,Loading,ErrorMessage},props:{id:{type:String,required:!0}},setup(e){const t=generateGetRuleTask(),n=async()=>{await t.perform(e.id)},r=async()=>{await n()};return onMounted(async()=>{await n()}),watch(e,async()=>{await n()}),{getRuleTask:t,refresh:r}}});function _sfc_render$5(e,t,n,r,A,S){var C,o;const E=resolveComponent("Loading"),T=resolveComponent("ErrorMessage"),c=resolveComponent("Rule");return openBlock(),createElementBlock(Fragment,null,[e.getRuleTask.isRunning?(openBlock(),createBlock(E,{key:0})):createCommentVNode("",!0),e.getRuleTask.isError?(openBlock(),createBlock(T,{key:1,error:(C=e.getRuleTask.last)==null?void 0:C.error},null,8,["error"])):createCommentVNode("",!0),(o=e.getRuleTask.last)!=null&&o.value?(openBlock(),createBlock(c,{key:2,rule:e.getRuleTask.last.value,onRefresh:e.refresh},null,8,["rule","onRefresh"])):createCommentVNode("",!0)],64)}const Rule$1=_export_sfc(_sfc_main$5,[["render",_sfc_render$5]]),_sfc_main$4=defineComponent({name:"RuleView",components:{Rule:Rule$1},props:{id:{type:String,required:!0}},setup(e){const t=()=>{useTitle(`Rule:${e.id} - Mihari`)};onMounted(()=>{t()}),watch(()=>e.id,()=>{t()})}});function _sfc_render$4(e,t,n,r,A,S){const E=resolveComponent("Rule",!0);return openBlock(),createBlock(E,{id:e.id},null,8,["id"])}const Rule=_export_sfc(_sfc_main$4,[["render",_sfc_render$4]]),_sfc_main$3=defineComponent({name:"RulesForm",props:{tags:{type:Array,required:!0},page:{type:Number,required:!0},tag:{type:String,required:!1}},setup(e){const t=useRoute(),n=ref(void 0),r=ref(void 0),A=toRef$1(e,"tag"),S=ref(void 0),E=ref(void 0),T=()=>{const C=t.query.tag;A.value===void 0&&(A.value=normalizeQueryParam(C))},c=()=>(T(),{description:n.value===""?void 0:n.value,page:e.page,tag:A.value===""?void 0:A.value,title:S.value===""?void 0:S.value,toAt:E.value===""?void 0:E.value,fromAt:r.value===""?void 0:r.value});return watch(()=>e.tag,()=>{A.value=e.tag}),{description:n,fromAt:r,getSearchParams:c,title:S,toAt:E,tagInput:A}}}),_hoisted_1$2={class:"columns"},_hoisted_2$2={class:"column"},_hoisted_3$2={class:"field is-horizontal"},_hoisted_4$2=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"Title")],-1),_hoisted_5$1={class:"field-body"},_hoisted_6$1={class:"field"},_hoisted_7$1={class:"control"},_hoisted_8$1={class:"column"},_hoisted_9$1={class:"field is-horizontal"},_hoisted_10=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"Description")],-1),_hoisted_11={class:"field-body"},_hoisted_12={class:"field"},_hoisted_13={class:"control"},_hoisted_14={class:"columns"},_hoisted_15={class:"column"},_hoisted_16={class:"field is-horizontal"},_hoisted_17=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"Tag")],-1),_hoisted_18={class:"field-body"},_hoisted_19={class:"field"},_hoisted_20={class:"control"},_hoisted_21={class:"select"},_hoisted_22=createBaseVNode("option",null,null,-1),_hoisted_23=createBaseVNode("div",{class:"column"},null,-1),_hoisted_24={class:"columns"},_hoisted_25={class:"column"},_hoisted_26={class:"field is-horizontal"},_hoisted_27=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"From")],-1),_hoisted_28={class:"field-body"},_hoisted_29={class:"field"},_hoisted_30={class:"control"},_hoisted_31={class:"column"},_hoisted_32={class:"field is-horizontal"},_hoisted_33=createBaseVNode("div",{class:"field-label is-normal"},[createBaseVNode("label",{class:"label"},"To")],-1),_hoisted_34={class:"field-body"},_hoisted_35={class:"field"},_hoisted_36={class:"control"};function _sfc_render$3(e,t,n,r,A,S){return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1$2,[createBaseVNode("div",_hoisted_2$2,[createBaseVNode("div",_hoisted_3$2,[_hoisted_4$2,createBaseVNode("div",_hoisted_5$1,[createBaseVNode("div",_hoisted_6$1,[createBaseVNode("p",_hoisted_7$1,[withDirectives(createBaseVNode("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=E=>e.title=E)},null,512),[[vModelText,e.title]])])])])])]),createBaseVNode("div",_hoisted_8$1,[createBaseVNode("div",_hoisted_9$1,[_hoisted_10,createBaseVNode("div",_hoisted_11,[createBaseVNode("div",_hoisted_12,[createBaseVNode("p",_hoisted_13,[withDirectives(createBaseVNode("input",{class:"input",type:"text","onUpdate:modelValue":t[1]||(t[1]=E=>e.description=E)},null,512),[[vModelText,e.description]])])])])])])]),createBaseVNode("div",_hoisted_14,[createBaseVNode("div",_hoisted_15,[createBaseVNode("div",_hoisted_16,[_hoisted_17,createBaseVNode("div",_hoisted_18,[createBaseVNode("div",_hoisted_19,[createBaseVNode("div",_hoisted_20,[createBaseVNode("div",_hoisted_21,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":t[2]||(t[2]=E=>e.tagInput=E)},[_hoisted_22,(openBlock(!0),createElementBlock(Fragment,null,renderList(e.tags,E=>(openBlock(),createElementBlock("option",{key:E},toDisplayString(E),1))),128))],512),[[vModelSelect,e.tagInput]])])])])])])]),_hoisted_23]),createBaseVNode("div",_hoisted_24,[createBaseVNode("div",_hoisted_25,[createBaseVNode("div",_hoisted_26,[_hoisted_27,createBaseVNode("div",_hoisted_28,[createBaseVNode("div",_hoisted_29,[createBaseVNode("p",_hoisted_30,[withDirectives(createBaseVNode("input",{class:"input",type:"date","onUpdate:modelValue":t[3]||(t[3]=E=>e.fromAt=E)},null,512),[[vModelText,e.fromAt]])])])])])]),createBaseVNode("div",_hoisted_31,[createBaseVNode("div",_hoisted_32,[_hoisted_33,createBaseVNode("div",_hoisted_34,[createBaseVNode("div",_hoisted_35,[createBaseVNode("p",_hoisted_36,[withDirectives(createBaseVNode("input",{class:"input",type:"date","onUpdate:modelValue":t[4]||(t[4]=E=>e.toAt=E)},null,512),[[vModelText,e.toAt]])])])])])])])],64)}const FormComponent=_export_sfc(_sfc_main$3,[["render",_sfc_render$3]]),_sfc_main$2=defineComponent({name:"RulesItem",props:{rules:{type:Object,required:!0}},components:{Pagination,Tags:Tags$1},emits:["update-page","refresh-page","update-tag"],setup(e,t){const n=()=>{window.scrollTo({top:0})},r=T=>{n(),t.emit("update-page",T)},A=()=>{n(),t.emit("refresh-page")},S=T=>{n(),t.emit("update-tag",T)},E=computed(()=>e.rules.rules.length>0);return{updatePage:r,refreshPage:A,updateTag:S,hasRules:E}}}),_hoisted_1$1={key:0},_hoisted_2$1={class:"table is-fullwidth"},_hoisted_3$1=createBaseVNode("tr",null,[createBaseVNode("th",null,"ID"),createBaseVNode("th",null,"Title"),createBaseVNode("th",null,"Description"),createBaseVNode("th",null,"Tags")],-1),_hoisted_4$1={class:"help"};function _sfc_render$2(e,t,n,r,A,S){const E=resolveComponent("router-link"),T=resolveComponent("Tags"),c=resolveComponent("Pagination");return openBlock(),createElementBlock(Fragment,null,[e.hasRules?(openBlock(),createElementBlock("div",_hoisted_1$1,[createBaseVNode("table",_hoisted_2$1,[_hoisted_3$1,(openBlock(!0),createElementBlock(Fragment,null,renderList(e.rules.rules,C=>(openBlock(),createElementBlock("tr",{key:C.id},[createBaseVNode("td",null,[createVNode(E,{to:{name:"Rule",params:{id:C.id}}},{default:withCtx(()=>[createTextVNode(toDisplayString(C.id),1)]),_:2},1032,["to"])]),createBaseVNode("td",null,toDisplayString(C.title),1),createBaseVNode("td",null,toDisplayString(C.description),1),createBaseVNode("td",null,[createVNode(T,{tags:C.tags,onUpdateTag:e.updateTag},null,8,["tags","onUpdateTag"])])]))),128))])])):createCommentVNode("",!0),createVNode(c,{currentPage:e.rules.currentPage,total:e.rules.total,pageSize:e.rules.pageSize,onUpdatePage:e.updatePage},null,8,["currentPage","total","pageSize","onUpdatePage"]),createBaseVNode("p",_hoisted_4$1,"("+toDisplayString(e.rules.total)+" results in total, "+toDisplayString(e.rules.rules.length)+" shown)",1)],64)}const Rules$2=_export_sfc(_sfc_main$2,[["render",_sfc_render$2]]),_sfc_main$1=defineComponent({name:"RulesWrapper",components:{Rules:Rules$2,Loading,FormComponent,ErrorMessage},setup(){const e=ref(1),t=ref(void 0),n=ref(),r=generateGetRulesTask(),A=generateGetTagsTask(),S=async()=>{var $;const a=($=n.value)==null?void 0:$.getSearchParams();return await r.perform(a)},E=a=>{e.value=a},T=()=>{e.value=1},c=async()=>{T(),await S()},C=a=>{t.value===a?t.value=void 0:t.value=a,nextTick(async()=>await c())},o=async()=>{await c()};return onMounted(async()=>{A.perform(),await S()}),watch([e,t],async()=>{nextTick(async()=>await S())}),{form:n,getRulesTask:r,getTagsTask:A,page:e,tag:t,refreshPage:o,search:c,updatePage:E,updateTag:C}}}),_hoisted_1={class:"box mb-6"},_hoisted_2=createBaseVNode("hr",null,null,-1),_hoisted_3={class:"column"},_hoisted_4={class:"field is-grouped is-grouped-centered"},_hoisted_5={class:"control"},_hoisted_6={class:"icon is-small"},_hoisted_7=createBaseVNode("span",null,"Search",-1),_hoisted_8={key:0},_hoisted_9=createBaseVNode("hr",null,null,-1);function _sfc_render$1(e,t,n,r,A,S){var a,$,l;const E=resolveComponent("FormComponent"),T=resolveComponent("font-awesome-icon"),c=resolveComponent("Loading"),C=resolveComponent("ErrorMessage"),o=resolveComponent("Rules");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",_hoisted_1,[createVNode(E,{ref:"form",tags:((a=e.getTagsTask.last)==null?void 0:a.value)||[],page:e.page,tag:e.tag},null,8,["tags","page","tag"]),_hoisted_2,createBaseVNode("div",_hoisted_3,[createBaseVNode("div",_hoisted_4,[createBaseVNode("p",_hoisted_5,[createBaseVNode("a",{class:"button is-primary",onClick:t[0]||(t[0]=(...f)=>e.search&&e.search(...f))},[createBaseVNode("span",_hoisted_6,[createVNode(T,{icon:"search"})]),_hoisted_7])])])])]),e.getRulesTask.performCount>0?(openBlock(),createElementBlock("div",_hoisted_8,[_hoisted_9,e.getRulesTask.isRunning?(openBlock(),createBlock(c,{key:0})):createCommentVNode("",!0),e.getRulesTask.isError?(openBlock(),createBlock(C,{key:1,error:($=e.getRulesTask.last)==null?void 0:$.error},null,8,["error"])):createCommentVNode("",!0),(l=e.getRulesTask.last)!=null&&l.value?(openBlock(),createBlock(o,{key:2,rules:e.getRulesTask.last.value,onRefreshPage:e.refreshPage,onUpdatePage:e.updatePage,onUpdateTag:e.updateTag},null,8,["rules","onRefreshPage","onUpdatePage","onUpdateTag"])):createCommentVNode("",!0)])):createCommentVNode("",!0)],64)}const Rules$1=_export_sfc(_sfc_main$1,[["render",_sfc_render$1]]),_sfc_main=defineComponent({name:"RulesView",components:{Rules:Rules$1},setup(){useTitle("Rules - Mihari")}});function _sfc_render(e,t,n,r,A,S){const E=resolveComponent("Rules",!0);return openBlock(),createBlock(E)}const Rules=_export_sfc(_sfc_main,[["render",_sfc_render]]),routes=[{path:"/",name:"Alerts",component:Alerts$1},{path:"/configs",name:"Configs",component:Configs},{path:"/artifacts/:id",name:"Artifact",component:Artifact,props:!0},{path:"/rules",name:"Rules",component:Rules},{path:"/rules/new",name:"NewRule",component:NewRule},{path:"/rules/:id",name:"Rule",component:Rule,props:!0},{path:"/rules/:id/edit",name:"EditRule",component:EditRule,props:!0}],router=createRouter({history:createWebHashHistory(),routes});library$1.add(faArrowRight,faCheck,faEdit,faExclamation,faInfoCircle,faLightbulb,faPlus,faSearch,faSpinner,faTimes);const app=createApp(App);app.component("font-awesome-icon",FontAwesomeIcon);app.use(router).mount("#app");