Cozy-Nest/client/assets/index.js

1769 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var QM=Object.defineProperty;var ZM=(e,t,n)=>t in e?QM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ld=(e,t,n)=>(ZM(e,typeof t!="symbol"?t+"":t,n),n);function JM(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const e3=`:root{--nevysha-margin-left: 175px;--ae-primary-color: rgb(92, 175, 214);--nevysha-gradiant-1: rgb(101,0,94);--nevysha-text-md: 12px;--nevysha-color-from-luminance: black;--extra-network-card-width: 13em;--extra-network-card-height: 8em;--nevysha-font-color: #d4d4d4;--nevysha-font-color-subdued: #9ca3af;--menu-top-height: 1px;--main-container-height: 1px}:root,.dark{--nevysha-gradiant-2: rgb(28 28 28);--body-background-fill: rgba(255, 255, 255, 0) !important;--button-primary-background-fill: var(--primary-500);--tab-nav-background-color: #262626ad;--tab-nav-background-color-selected: var(--input-background-fill);--vertical-line-bg-color: #ffffff59;--checkbox-background-color: var(--nevysha-dark);--button-border-width: 0px;--tabmenu-button-color: var(--nevysha-font-color);--nevysha-dark: #1c1c1c;--nevysha-light-dark: #292a2e;--nevysha-white: var(--nevysha-font-color);--nevysha-input-border-color: hsl(214deg 5% 30%);--nevysha-color2: #f0a6caff;--nevysha-color3: #efc3e6ff;--nevysha-color4: #f0e6efff;--main-tabs-background-color: #14141485;--background-fill-primary: var(--nevysha-light-dark);--ae-slider-bg-overlay: repeating-linear-gradient( 90deg, transparent, transparent max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(4px, calc(.671141% + 0px)) );--ae-subgroup-input-bg-color: hsl(225deg 6% 13%);--ae-input-border-color: hsl(214deg 5% 30%);--ae-panel-border-radius: 0px;--ae-input-bg-color: hsl(225deg 6% 13%);--ae-input-color: var(--nevysha-font-color);--block-title-text-color: var(--nevysha-font-color);--primary-50: var(--nevysha-color4);--primary-100: var(--nevysha-color4);--primary-200: var(--nevysha-color3);--primary-300: var(--nevysha-color3);--primary-400: var(--nevysha-light-dark);--primary-500: var(--nevysha-light-dark);--primary-600: var(--nevysha-dark);--primary-700: var(--nevysha-dark);--primary-800: var(--nevysha-dark);--primary-900: var(--nevysha-dark);--primary-950: var(--nevysha-dark);--secondary-50: var(--nevysha-color4);--secondary-100: var(--nevysha-color4);--secondary-200: var(--nevysha-color3);--secondary-300: var(--nevysha-color3);--secondary-400: var(--nevysha-light-dark);--secondary-500: var(--nevysha-light-dark);--secondary-600: var(--nevysha-dark);--secondary-700: var(--nevysha-dark);--secondary-800: var(--nevysha-dark);--secondary-900: var(--nevysha-dark);--secondary-950: var(--nevysha-dark);--neutral-50: #f9fafb;--neutral-100: #f3f4f6;--neutral-200: #e5e7eb;--neutral-300: #d1d5db;--neutral-400: #9ca3af;--neutral-500: #6b7280;--neutral-600: var(--nevysha-light-dark);--neutral-700: var(--nevysha-light-dark);--neutral-800: var(--nevysha-light-dark);--neutral-900: var(--nevysha-light-dark);--neutral-950: var(--nevysha-light-dark);--slider-color: var(--nevysha-dark);--button-secondary-background-fill: var(--nevysha-dark);--button-secondary-background-fill-hover: var(--nevysha-dark);--checkbox-border-color: var(--nevysha-white);--checkbox-border-color-hover: var(--ae-primary-color);--color-accent: var(--ae-primary-color);--link-text-color: var(--nevysha-white);--body-text-color: var(--nevysha-font-color);--color-accent-soft: var(--neutral-700);--background-fill-secondary: var(--neutral-900);--border-color-accent: var(--neutral-600);--border-color-primary: var(--neutral-700);--link-text-color-active: var(--secondary-500);--link-text-color-hover: var(--ae-primary-color);--link-text-color-visited: var(--secondary-600);--body-text-color-subdued: var(--nevysha-font-color-subdued);--shadow-drop: rgba(0,0,0,.05) 0px 1px 2px 0px;--shadow-drop-lg: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-inset: rgba(0,0,0,.05) 0px 2px 4px 0px inset;--block-background-fill: var(--neutral-800);--block-label-border-color: var(--nevysha-input-border-color);--block-label-text-color: var(--neutral-200);--checkbox-background-color-selected: var(--secondary-600);--checkbox-border-color-focus: var(--secondary-500);--checkbox-border-color-selected: var(--checkbox-border-color);--checkbox-label-background-fill: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--checkbox-label-background-fill-hover: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--error-background-fill: var(--background-fill-primary);--error-text-color: #ef4444;--input-background-fill: var(--nevysha-dark);--input-background-fill-focus: var(--secondary-600);--input-background-fill-hover: var(--input-background-fill);--input-border-color-focus: var(--neutral-700);--input-placeholder-color: var(--neutral-500);--input-shadow-focus: 0 0 0 var(--shadow-spread) var(--neutral-700), var(--shadow-inset);--stat-background-fill: linear-gradient(to right, var(--primary-400), var(--primary-600));--table-border-color: var(--neutral-700);--table-even-background-fill: var(--neutral-950);--table-odd-background-fill: var(--neutral-900);--button-cancel-background-fill: linear-gradient(to bottom right, #dc2626, #b91c1c);--button-cancel-background-fill-hover: linear-gradient(to bottom right, #dc2626, #dc2626);--button-cancel-border-color: #dc2626;--button-cancel-border-color-hover: var(--button-cancel-border-color);--button-cancel-text-color: white;--button-cancel-text-color-hover: var(--button-cancel-text-color);--button-primary-background-fill-hover: linear-gradient(to bottom right, var(--primary-500), var(--primary-500));--button-primary-border-color: var(--primary-500);--button-primary-text-color: white;--button-primary-text-color-hover: var(--button-primary-text-color);--button-secondary-border-color: var(--neutral-600);--button-secondary-text-color: var(--nevysha-font-color);--button-secondary-text-color-hover: var(--button-secondary-text-color);--shadow-spread: 1px;--block-border-color: var(--border-color-primary);--block_border_width: None;--block-info-text-color: var(--nevysha-font-color-subdued);--block-label-background-fill: var(--background-fill-secondary);--block_label_border_width: None;--block_shadow: None;--block_title_background_fill: None;--block_title_border_color: None;--block_title_border_width: None;--panel-background-fill: var(--background-fill-secondary);--panel-border-color: var(--border-color-primary);--panel_border_width: None;--checkbox-background-color-focus: var(--checkbox-background-color);--checkbox-background-color-hover: var(--checkbox-background-color);--checkbox-border-width: var(--input-border-width);--checkbox-label-background-fill-selected: var(--checkbox-label-background-fill);--checkbox-label-border-color: var(--border-color-primary);--checkbox-label-border-color-hover: var(--checkbox-label-border-color);--checkbox-label-border-width: var(--input-border-width);--checkbox-label-text-color: var(--body-text-color);--checkbox-label-text-color-selected: var(--checkbox-label-text-color);--error-border-color: var(--border-color-primary);--error_border_width: None;--input-border-color: var(--border-color-primary);--input-border-color-hover: var(--input-border-color);--input_border_width: None;--input_shadow: None;--loader_color: None;--slider_color: None;--table-row-focus: var(--color-accent-soft);--button-primary-border-color-hover: var(--button-primary-border-color);--button-secondary-border-color-hover: var(--button-secondary-border-color);--spacing-xxs: 1px;--spacing-xs: 2px;--spacing-sm: 3px;--spacing-md: 6px;--spacing-lg: 4px;--spacing-xl: 10px;--spacing-xxl: 16px;--radius-xxs: 1px;--radius-xs: 2px;--radius-sm: 0;--radius-md: 6px;--radius-lg: 2px !important;--radius-xl: 12px;--radius-xxl: 22px;--text-xxs: 9px;--text-xs: 10px;--text-sm: 12px;--text-lg: 12px;--text-xl: 22px;--text-xxl: 26px;--font: "Source Sans Pro", "ui-sans-serif", "system-ui", sans-serif;--font-mono: "IBM Plex Mono", "ui-monospace", "Consolas", monospace;--body-text-size: var(--nevysha-text-md);--body-text-weight: 400;--embed-radius: var(--radius-lg);--block-border-width: 1px;--block-info-text-size: var(--text-sm);--block-info-text-weight: 400;--block-label-border-width: 1px;--block-label-margin: 0;--block-label-padding: var(--spacing-sm) var(--spacing-lg);--block-label-radius: calc(var(--radius-lg) - 1px) 0 calc(var(--radius-lg) - 1px) 0;--block-label-right-radius: 0 calc(var(--radius-lg) - 1px) 0 calc(var(--radius-lg) - 1px);--block-label-text-size: var(--text-sm);--block-label-text-weight: 400;--block-padding: var(--spacing-xl) calc(var(--spacing-xl) + 2px);--block-radius: var(--radius-lg);--block-shadow: var(--shadow-drop);--block-title-background-fill: none;--block-title-border-color: none;--block-title-border-width: 1px;--block-title-padding: 0;--block-title-radius: none;--block-title-text-size: var(--nevysha-text-md);--block-title-text-weight: 400;--container-radius: var(--radius-lg);--form-gap-width: 1px;--layout-gap: var(--spacing-xxl);--panel-border-width: 0;--section-header-text-size: var(--nevysha-text-md);--section-header-text-weight: 400;--checkbox-border-radius: var(--radius-sm);--checkbox-label-gap: var(--spacing-lg);--checkbox-label-padding: var(--spacing-md) calc(2 * var(--spacing-md));--checkbox-label-shadow: var(--shadow-drop);--checkbox-label-text-size: var(--nevysha-text-md);--checkbox-label-text-weight: 400;--checkbox-check: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");--radio-circle: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");--checkbox-shadow: var(--input-shadow);--error-border-width: 1px;--input-border-width: 1px;--input-padding: var(--spacing-xl);--input-radius: var(--radius-lg);--input-shadow: 0 0 0 var(--shadow-spread) transparent, var(--shadow-inset);--input-text-size: var(--nevysha-text-md);--input-text-weight: 400;--loader-color: var(--color-accent);--prose-text-size: var(--nevysha-text-md);--prose-text-weight: 400;--prose-header-text-weight: 600;--table-radius: var(--radius-lg);--button-large-padding: 2px;--button-large-radius: var(--radius-lg);--button-large-text-size: var(--nevysha-text-md);--button-large-text-weight: 600;--button-shadow: var(--shadow-drop);--button-shadow-active: var(--shadow-inset);--button-shadow-hover: var(--shadow-drop-lg);--button-small-padding: var(--spacing-sm) calc(2 * var(--spacing-sm));--button-small-radius: var(--radius-lg);--button-small-text-size: var(--nevysha-text-md);--button-small-text-weight: 400;--button-transition: none}.nevysha-light{--nevysha-gradiant-2: #fefefe;--nevysha-white: var(--nevysha-font-color);--nevysha-dark: #fefefe;--nevysha-light-dark: #efefef;--neutral-50: var(--nevysha-white);--neutral-100: var(--nevysha-white);--neutral-200: var(--nevysha-white);--neutral-400: var(--nevysha-white);--neutral-600: var(--nevysha-light-dark);--neutral-700: var(--nevysha-light-dark);--neutral-800: var(--nevysha-light-dark);--neutral-900: var(--nevysha-light-dark);--neutral-950: var(--nevysha-light-dark);--link-text-color-hover: var(--ae-primary-color);--ae-slider-bg-overlay: repeating-linear-gradient( 90deg, transparent, transparent max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(4px, calc(.671141% + 0px)) );--ae-subgroup-input-bg-color: hsl(225deg 6% 13%);--ae-input-border-color: hsl(0deg 0% 84.25%);--ae-input-color: hsl(0, 0%, 0%);--ae-input-bg-color: hsl(0, 0%, 100%);--button-secondary-background-fill: var(--nevysha-dark);--block-label-background-fill: var(--background-fill-secondary);--checkbox-label-background-fill-hover: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--vertical-line-bg-color: #18181859;--checkbox-background-color: var(--nevysha-dark);--checkbox-background-color-focus: var(--checkbox-background-color);--checkbox-label-background-fill: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--checkbox-label-background-fill-selected: var(--checkbox-label-background-fill);--checkbox-label-text-color: var(--body-text-color);--checkbox-label-text-color-selected: var(--checkbox-label-text-color);--background-fill-secondary: var(--neutral-900);--panel-background-fill: var(--background-fill-secondary);--body-text-color-subdued: var(--nevysha-font-color-subdued);--block-label-text-color: var(--neutral-200);--button-secondary-text-color: var(--nevysha-white);--button-secondary-text-color-hover: var(--button-secondary-text-color);--checkbox-border-color-hover: var(--ae-primary-color);--checkbox-background-color-hover: var(--nevysha-dark);--button-secondary-background-fill-hover: var(--ae-primary-color);--body-background-fill: rgba(255, 255, 255, 0) !important;--tab-nav-background-color: var(--nevysha-light-dark);--tab-nav-background-color-selected: var(--nevysha-dark);--border-color-primary: #acacac;--input-border-color: var(--border-color-primary);--block-border-color: var(--border-color-primary);--input-border-color-focus: var(--ae-primary-color);--ae-panel-border-radius: 0px;--tabnav-button-color: var(--nevysha-white);--input-background-fill: var(--nevysha-dark);--body-text-color: var(--neutral-100);--tabmenu-button-color: var(--nevysha-white);--background-fill-primary: var(--nevysha-light-dark);--block-background-fill: var(--neutral-800);--secondary-text-color: var(--nevysha-white);--block-title-text-color: var(--nevysha-font-color);--main-tabs-background-color: #e5e5e585}#kofi_nevysha_support{transform:rotate(360deg)}.gradio-button.secondary-down:hover{background:var(--button-secondary-background-fill-hover);color:var(--button-secondary-text-color-hover)}.gradio-dropdown ul.options li.item.selected{background-color:var(--ae-primary-color)!important}.gradio-dropdown ul.options li.item:hover{background-color:var(--color-accent)}.progressDiv .progress{background:var(--ae-primary-color)!important}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0;position:relative}input[type=number]::-webkit-inner-spin-button:before{content:"▲";display:block;position:absolute;top:0;left:0;right:0;bottom:50%;text-align:center;color:red;font-size:10px}input[type=number]::-webkit-inner-spin-button:after{content:"▼";display:block;position:absolute;top:50%;left:0;right:0;bottom:0;text-align:center;color:red;font-size:10px}.gradio-accordion{background-color:var(--nevysha-light-dark)!important;border:none!important;border-radius:3px!important;color:var(--secondary-text-color)!important;margin:4px 0!important}.gradio-slider input[type=range]{align-self:flex-start}.gradio-container.app{padding:2px!important;transform:rotate(360deg)}input[type=range]{overflow:hidden;width:100%;-webkit-appearance:none;background-color:var(--ae-input-bg-color);border:1px solid var(--ae-input-border-color);position:relative;accent-color:var(--ae-primary-color)!important}input[type=range]:after{content:"";position:absolute;height:13px;background-image:var(--ae-slider-bg-overlay);opacity:.15;width:100%}input[type=range]::-webkit-slider-runnable-track{height:14px;-webkit-appearance:none;color:var(--ae-primary-color);margin-top:-1px}input[type=range]::-moz-range-thumb,input[type=range]::-webkit-slider-thumb{color:var(--ae-primary-color);border-radius:0}.nevysha.nevysha-tabnav{display:flex;position:fixed;z-index:2;flex-direction:column;width:175px;background-color:var(--tab-nav-background-color);border-bottom:none!important}.nevysha.nevysha-tabnav.center-menu-items{justify-content:center}.nevysha.nevysha-tabnav.center-menu-items>button:nth-child(1){margin-left:auto}.nevysha.nevysha-tabnav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color);border-radius:0}.nevysha.nevysha-tabnav>button{color:var(--tabmenu-button-color)}#quicksettings_gap{display:none}#quicksettings_gap.nevysha-quicksettings-gap{display:block;flex:1;max-width:none}#tabs>.nevysha.tabitem{margin-left:calc(var(--nevysha-margin-left) + 10px);background-color:var(--main-tabs-background-color);border:none;border-radius:0;overflow-y:auto;height:var(--main-container-height);padding:0 10px}#tabs>.nevysha.tabitem::-webkit-scrollbar{width:5px}#tabs>.nevysha.tabitem::-webkit-scrollbar-track{background-color:transparent}#tabs>.nevysha.tabitem::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.btn{display:inline-flex;justify-content:center;align-items:center;transition:var(--button-transition);padding:var(--size-0-5) var(--size-2);text-align:center;border:var(--button-border-width) solid var(--button-primary-border-color);background:var(--button-primary-background-fill);color:var(--button-primary-text-color);border-radius:var(--button-large-radius);padding:var(--button-large-padding);font-size:var(--button-large-text-size);--checkbox-background-color: var(--neutral-800)}.nevysha.btn.refresh{width:50px;max-width:50px;text-align:center;vertical-align:middle;height:50px;background-color:var(--nevysha-dark);display:none}.block.padded:not(.gradio-accordion){padding:10px!important}.nevysha.settings-child{background-color:var(--nevysha-light-dark)!important}.gradio-button.tool{border-radius:0!important;border:none!important}#quicksettings{width:auto;align-items:stretch;gap:20px}#quicksettings>.block.gradio-slider{display:flex;flex-direction:row;align-content:space-between}#quicksettings>div.block{padding:0!important;display:flex;flex-direction:row;align-content:space-between}#quicksettings>div.block>*{width:100%}#quicksettings>div.block>input[type=range]{margin-bottom:2px}#quicksettings>.gradio-button.tool{height:33px;margin-left:-20px}#quicksettings.centered-quicksettings{justify-content:center!important}#footer{text-align:center;position:fixed;bottom:0;left:0;display:flex;justify-content:center;width:100%}#footer>div{display:flex;position:fixed;left:10px;bottom:2px}#footer .versions{font-size:85%!important;opacity:.85!important;position:fixed!important;right:10px!important;left:auto!important;bottom:2px}.nevysha.svg-icon{height:20px;fill:var(--nevysha-white);margin:3px 0}.nevysha.svg-icon.rotate{transform:rotate(315deg)}/*!*versions*!*/.token-remove>svg{width:20px;height:20px;fill:var(--neutral-50)}html{overflow-y:hidden}body,#nevysha-loading{font-family:-apple-system,BlinkMacSystemFont,sans-serif;overflow:auto;background:linear-gradient(330deg,var(--nevysha-gradiant-1) 3%,var(--nevysha-gradiant-2) 38%);animation:gradient 35s ease infinite;background-size:400% 400%;background-attachment:fixed;display:flex;height:100vh}@keyframes gradient{0%{background-position:0% 0%}50%{background-position:75% 75%}to{background-position:0% 0%}}.wave{background:rgb(94 26 145 / 16%);border-radius:1000% 1000% 0 0;position:fixed;width:200%;height:3.5em;animation:wave 10s -3s linear infinite;transform:translateZ(0);opacity:.8;bottom:0;left:0;z-index:0}.wave:nth-of-type(2){bottom:-1.25em;animation:wave 18s linear reverse infinite;opacity:.8}.wave:nth-of-type(3){bottom:-2.5em;animation:wave 20s -1s reverse infinite;opacity:.9}@keyframes wave{2%{transform:translate(1)}25%{transform:translate(-25%)}50%{transform:translate(-50%)}75%{transform:translate(-25%)}to{transform:translate(1)}}.block{padding:10px!important}.block.padded:not(.gradio-accordion){padding:0!important}.block.token-counter span{background:var(--nevysha-dark)!important;box-shadow:none!important;border:none!important;border-radius:0!important}.gradio-group{margin-top:10px!important}button.secondary,button.primary{border:1px solid var(--ae-input-border-color)!important;border-radius:var(--ae-panel-border-radius)!important;background:var(--ae-input-bg-color)!important;color:var(--ae-input-color)!important}.nevysha.skip-interrupt-wrapper{display:flex!important;flex-direction:row}.nevysha.skip-interrupt-wrapper>button{position:relative}.nevysha.settings-wrapper{flex:1;margin-top:15px;overflow-y:scroll;padding:0 5px 15px 0}.nevysha.settings-wrapper::-webkit-scrollbar{width:5px}.nevysha.settings-wrapper::-webkit-scrollbar-track{background-color:transparent}.nevysha.settings-wrapper::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.txt2img_toprow-wrapper{display:flex;flex-direction:column}#txt2img_settings,#img2img_settings{flex:1;height:100%;display:flex;flex-direction:column;flex-wrap:nowrap}#txt2img_script_container,#img2img_script_container{padding:0!important}#txt2img_tools,#img2img_tools{gap:0}#txt2img_tools>.form,#img2img_tools>.form{gap:0;justify-content:space-between}#txt2img_toprow,#img2img_toprow{background-color:var(--nevysha-light-dark)!important;padding:10px!important;margin-bottom:6px;display:flex;flex-direction:column}#txt2img_script_container,#img2img_script_container{background-color:transparent!important}#tab_txt2img>div,#tab_img2img>div,#tab_img2img>div>div{height:100%}.settings-gradio-parent{height:100%;padding:10px 0 0}#txt2img_results,#img2img_results{height:100%}#txt2img_gallery_container,#img2img_gallery_container{flex:1;max-height:100%;overflow-y:auto}.nevysha.nevysha-scrollable::-webkit-scrollbar{width:5px}.nevysha.nevysha-scrollable::-webkit-scrollbar-track{background-color:transparent}.nevysha.nevysha-scrollable::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.nevysha-scrollable>div>div:nth-child(2){overflow-y:visible}#txt2img_gallery,#img2img_gallery{height:100%;display:flex;flex-direction:column}#txt2img_gallery>div:nth-child(2),#img2img_gallery>div:nth-child(2){flex:1;min-height:auto!important;max-height:none!important}#txt2img_settings,#img2img_settings,#txt2img_results,#img2img_results{flex-grow:1;flex-shrink:0}#txt2img_settings,#img2img_settings,#txt2img_results,#img2img_results{flex-basis:50%}#txt2img_seed_row,#img2img_seed_row{display:flex;align-content:center;align-items:center}#txt2img_seed_row>button,#img2img_seed_row>button{align-self:auto}#image_browser_tabs_container>:not(:nth-child(-n+2)){background-color:var(--nevysha-light-dark)!important}#tab_settings{background-color:var(--nevysha-light-dark)!important}#img2img_settings .tabs>:not(:first-child){background-color:var(--nevysha-light-dark)!important}.nevysha.resizable-children-container{flex-wrap:nowrap;width:calc(100% - 33px)!important;display:flex;flex-direction:row}.vertical-line-wrapper{width:10px!important;max-width:10px!important;min-width:10px!important;height:calc(100% - 30px);cursor:ew-resize;display:flex;justify-content:center;margin:15px -10px 0}.slide-right-browser-panel>.vertical-line-wrapper{position:absolute}.slide-right-browser-panel>.slide-right-browser-panel-container{flex:1;padding:10px;margin-left:15px}#cozy-img-browser_panel{border:1px solid var(--ae-input-border-color)!important}.vertical-line{width:2px!important;max-width:2px!important;min-width:2px!important;height:100%;cursor:ew-resize;background-image:linear-gradient(to bottom,var(--vertical-line-bg-color) 7px,transparent 0);background-size:100% 13px}.gradio-image{padding:0!important}#expendBtn{position:absolute;bottom:10px;right:35px;z-index:99999}#img2maskimg>div:nth-child(3)>div>div{display:flex;justify-content:center}canvas.nevysha{inset:auto}.brush>input[type=range]{min-width:200px}.block.gradio-checkbox{margin:0!important}.nevysha-accent{background-color:var(--ae-primary-color)!important}#txt2img_extra_networks_parent,#img2img_extra_networks_parent{position:fixed;z-index:9999;background-color:var(--block-background-fill)!important;width:75vw;right:0;height:calc(100% - (100px + var(--menu-top-height)));top:calc(75px + var(--menu-top-height));padding-right:15px;border:1px solid var(--ae-input-border-color)!important}#txt2img_extra_networks_nevysha_wrapper,#img2img_extra_networks_nevysha_wrapper{display:flex;flex-direction:row;height:100%}#txt2img_extra_networks_nevysha_wrapper>.vertical-line-wrapper,#img2img_extra_networks_nevysha_wrapper>.vertical-line-wrapper,.slide-right-browser-panel>.vertical-line-wrapper{z-index:100;margin:15px 0 0 5px}.nevysha-right-button-wrapper{position:fixed;right:0;top:calc(75px + var(--menu-top-height));z-index:999;height:calc(100vh - (100px + var(--menu-top-height)));width:25px;min-width:25px!important;display:flex;flex-direction:column}.nevysha-right-button-wrapper>button{flex:1;min-height:auto!important;max-height:none!important;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0!important;margin:0!important}.nevysha-right-button-wrapper>button>div,.nevysha-extra-network-floating-btn>div{writing-mode:vertical-rl;width:25px;min-width:25px!important}.nevysha-extra-network-floating-btn{height:100px;position:absolute;top:calc(50% - 50px)}.extra-network-cards{overflow-x:hidden}.extra-network-cards>.card{width:var(--extra-network-card-width);height:var(--extra-network-card-height)}.extra-network-cards .card .actions .name{font-size:var(--nevysha-text-md);line-break:normal;text-overflow:ellipsis;width:100%;display:block}.slide-right-browser-panel{position:fixed;z-index:9999;background-color:var(--block-background-fill)!important;width:75vw;right:0;height:calc(100% - (100px + var(--menu-top-height)));top:calc(75px + var(--menu-top-height));padding-right:15px;display:flex;flex-direction:row}.extra-network-subdirs{overflow:scroll}[id$=_subdirs]{padding:0;margin:0;overflow:visible}[id$=cards_html]{display:flex;flex-direction:column;width:100%;padding:0;margin:0;align-items:stretch;overflow:auto}[id$=cards_html]::-webkit-scrollbar{width:5px}[id$=cards_html]::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}[id$=cards_html]::-webkit-scrollbar-track{background-color:transparent}[id$=_cards]{height:auto;overflow:visible;position:relative}input[type=number]{width:100px}.nevysha.settings-nevyui-title{position:absolute;top:0;width:100%;text-align:center}.nevysha.settings-nevyui-title>h2{font-size:1.8em;color:var(--ae-primary-color);font-family:Caveat Variable,sans-serif}.nevysha.settings-nevyui-title>.subtitle{font-size:10px;font-style:italic}.nevysha.settings-nevyui-top>.info{color:var(--body-text-color);margin-bottom:5px;font-style:italic}.nevysha-reporting{color:var(--body-text-color)!important;margin:15px 0!important;border-left:4px solid var(--ae-primary-color);padding-left:5px;display:flex;flex-wrap:wrap}.nevysha.settings-nevyui-top>.nevysha-reporting>a{color:var(--ae-primary-color);text-decoration:underline}#cozy_nest_settings_tabs .block{background-color:transparent}.nevysha-emphasis{margin-top:5px;font-weight:700;background-color:var(--ae-primary-color);color:var(--nevysha-color-from-luminance)!important;padding:8px;border-radius:2px}.nevysha-tabnav.nevysha-tabnav-settings>h2{font-size:1.6em;margin-top:20px}#nevyui_update_info_panel>article{border-left:4px solid var(--ae-primary-color);padding-left:15px;margin-left:5px}#nevysha-version-info{display:flex;justify-content:space-between}.nevysha-version-info-text{flex:1;margin-left:10px!important}.nevysha.settings-nevyui-bottom{position:absolute;bottom:0}.nevysha.settings-nevyui-bottom>p{font-size:.8em;color:var(--body-text-color)}#cozy_nest_settings_tabs{background-color:var(--tab-nav-background-color-selected)}#cozy_nest_settings_tabs>.tabitem{overflow-y:auto;height:520px}#cozy_nest_settings_tabs>.tab-nav{background-color:var(--tab-nav-background-color)}.tab-nav>*{border-radius:0}#cozy_nest_settings_tabs>.tab-nav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color)}[id$=_extra_tabs]{background-color:var(--tab-nav-background-color-selected)}[id$=_extra_tabs]>.tabitem{background-color:var(--tab-nav-background-color-selected)!important}[id$=_extra_tabs]>.tab-nav{background-color:var(--tab-nav-background-color)}[id$=_extra_tabs]>.tab-nav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color)}.nevysha-draggable-anchor-icon{cursor:pointer;position:relative;top:2px;left:2px;width:60px;height:35px;display:flex;align-content:center;justify-content:center;flex-wrap:wrap;background:var(--ae-input-bg-color);border:1px solid var(--ae-input-border-color)}.nevysha-draggable-anchor-icon>svg{height:15px;fill:var(--body-text-color)}.nevysha-draggable-anchor{position:absolute;top:0;left:0;cursor:pointer;z-index:9999;width:60px;height:35px}#img_browser_main_block{gap:0}#img_browser_main_block .form{align-items:center}textarea.nevysha-image-browser-folder{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);resize:none}#cnib_output_folder>label>textarea{display:none}.nevysha-image-browser-folder-container{display:flex;flex-direction:row}.nevysha-image-browser-folder-btn{border:1px solid var(--ae-input-border-color)!important;border-radius:var(--ae-panel-border-radius)!important;background:var(--ae-input-bg-color)!important;color:var(--ae-input-color)!important;padding:0 10px!important;min-width:60px}.nevysha.nevysha-tabnav.menu-fix-top{position:fixed;flex-direction:row;width:100%;top:0}.gradio-container.app{z-index:1;height:100vh!important}.gradio-container.app.menu-fix-top{padding-top:0!important;padding-bottom:20px!important}#tab_nevyui>div{height:100%}#nevyui-ui-wrapper{background-color:var(--block-background-fill)}.nevysha-tab-settings{position:fixed;right:5px;top:30px;height:fit-content;width:max(800px,50vw);z-index:9999;background-color:var(--block-background-fill);border:1px solid var(--ae-input-border-color)}.nevysha-btn-menu-wrapper{display:flex;justify-content:center;margin:15px 0}.nevysha-btn-menu-wrapper.menu-fix-top{position:relative;right:20px;margin:0 0 0 auto;display:flex;gap:10px;justify-content:end}.nevysha-btn-menu-wrapper>button>svg{fill:var(--ae-primary-color);width:20px}#nevysha-saved-feedback-wrapper{height:1px}.nevysha-feedback{margin:auto;width:100%;text-align:center;margin-top:-15px!important;color:var(--ae-primary-color)!important}#nevyui_update_info_panel{padding:5px}.markdown-body{font-size:1em;color:var(--body-text-color);line-height:1.5;font-weight:400;letter-spacing:.00938em;word-wrap:break-word;padding:0 10px;max-height:400px;overflow-y:auto}.markdown-body code{font-family:monospace;font-size:.9em;background-color:var(--ae-input-bg-color);color:var(--body-text-color);padding:2px;border-radius:2px}.markdown-body>h1{font-size:medium;color:var(--body-text-color);margin-top:30px}.markdown-body>h2{font-size:1.4em;color:var(--body-text-color);margin-top:30px}.markdown-body>ul{margin-left:20px}.markdown-body>ul>li>ul{margin-left:20px}.markdown-body>ul>li{margin-bottom:10px}#nevysha_other_tabs:empty{height:200px;width:200px}#nevysha_other_tabs:empty:before{content:"Drop tabs here to hide them";display:flex;justify-content:center;align-items:center;height:100%;width:100%;color:var(--body-text-color);font-size:1.2em;font-weight:500;text-align:center}#nevysha_other_tabs{background-color:var(--block-background-fill);position:absolute;display:flex;flex-direction:column;border:1px solid var(--ae-input-border-color)}#nevysha_other_tabs>button{text-align:left}.nevysha-other-tab-text{padding:3px 10px;text-align:left}.remove-nevysha-other-tab{padding-right:4px;padding-left:4px}.nevysha-cozy-nest-app-name{font-size:4em;margin-bottom:30%;color:var(--ae-primary-color);font-family:Caveat Variable,sans-serif;text-transform:uppercase}#nevysha-loading>div.nevysha-loading-progress>div.subtext1{font-size:1em;color:var(--body-text-color);opacity:1;margin-top:30%}#nevysha-loading>div.nevysha-loading-progress>div.subtext2{font-size:.8em;color:var(--body-text-color);opacity:.2}#nevysha-loading-wrap{background-color:var(--nevysha-gradiant-2);position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9000}#nevysha-loading-wrap>#nevysha-loading>.footer{position:fixed;bottom:calc(3.5em + 25px);right:25px;color:var(--body-text-color);font-size:.7em;opacity:.3}#nevysha-loading{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;z-index:9001}#loading_step_estimator{font-size:.8em}.nevysha-loading-progress{margin:auto;color:var(--ae-primary-color);text-align:center}.lds-roller{display:inline-block;position:relative;width:80px;height:80px}.lds-roller div{animation:lds-roller 1.2s cubic-bezier(.5,0,.5,1) infinite;transform-origin:40px 40px}.lds-roller div:after{content:" ";display:block;position:absolute;width:7px;height:7px;border-radius:50%;background:var(--ae-primary-color);margin:-4px 0 0 -4px}.lds-roller div:nth-child(1){animation-delay:-36ms}.lds-roller div:nth-child(1):after{top:63px;left:63px}.lds-roller div:nth-child(2){animation-delay:-72ms}.lds-roller div:nth-child(2):after{top:68px;left:56px}.lds-roller div:nth-child(3){animation-delay:-.108s}.lds-roller div:nth-child(3):after{top:71px;left:48px}.lds-roller div:nth-child(4){animation-delay:-.144s}.lds-roller div:nth-child(4):after{top:72px;left:40px}.lds-roller div:nth-child(5){animation-delay:-.18s}.lds-roller div:nth-child(5):after{top:71px;left:32px}.lds-roller div:nth-child(6){animation-delay:-.216s}.lds-roller div:nth-child(6):after{top:68px;left:24px}.lds-roller div:nth-child(7){animation-delay:-.252s}.lds-roller div:nth-child(7):after{top:63px;left:17px}.lds-roller div:nth-child(8){animation-delay:-.288s}.lds-roller div:nth-child(8):after{top:56px;left:12px}@keyframes lds-roller{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--ae-primary-color);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}#kofi_nevysha_support>img{height:15px!important}.nevysha-kofi-tab{width:auto;height:auto}.livePreview{background-color:var(--background-fill-primary)!important}:root{--error-handler-white: #eeeeee}#dialog-message-wrap,#cozy-alert-wrap{font-size:12px;position:fixed;z-index:1000;width:100vw;height:100vh;top:0;backdrop-filter:blur(10px);display:flex;justify-content:center}#dialog-message{display:flex;flex-direction:column;padding:10px;margin:50px;background-color:var(--nevysha-gradiant-2)}#dialog-message>.header{display:flex;justify-content:space-between}#dialog-message>.header>h1{font-size:1.5em}#cozy-alert-wrap>div{height:fit-content;width:auto;margin:auto;background-color:var(--nevysha-gradiant-2);padding:15px;display:flex;flex-direction:column;border:1px solid var(--ae-input-border-color);color:var(--nevysha-font-color)}#cozy-alert-wrap>div>.header{display:flex;justify-content:space-between;flex-direction:row}#cozy-alert-title{font-size:1.5em;margin:0 auto}#cozy-alert-close{margin:auto}.ui-dialog-title,#cozy_nest_error_handling_display{color:var(--error-handler-white)}#cozy_nest_error_handling_display_stack{color:red;font-weight:700;font-family:monospace;white-space:pre-wrap;background-color:#222;padding:25px;border-radius:3px;border-color:red}#cozynest-error-extentions>table>tbody>tr>td>a{color:var(--error-handler-white);font-style:italic}#dialog-message>fieldset{color:var(--error-handler-white);margin-bottom:40px}#dialog-message>fieldset.extensions-list{height:100%;overflow-y:auto}#cozynest-error-instance-info>a{color:#0ff!important;text-decoration:underline;font-weight:700}.cozynest-error-tips{font-weight:700;color:var(--error-handler-white);background-color:#d57411;padding:10px;font-size:15px}.cozynest-error-tips>a{color:#0ff;text-decoration:underline;font-weight:700}.ui-dialog{background-color:#101010;border:none}.ui-dialog-titlebar,.ui-dialog-buttonpane{background-color:#000;border:none;color:var(--error-handler-white)}.ui-button{background-color:#222;border:none;color:var(--error-handler-white)}.ui-button:hover,.ui-widget.ui-widget-content{border:none}.blocInfo,textarea{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);border-color:var(--input-border-color)!important;border-radius:var(--input-radius)!important;background:var(--input-background-fill)!important;background-color:var(--input-background-fill)!important;width:100%;color:var(--body-text-color)!important;font-weight:var(--input-text-weight)!important;font-size:var(--input-text-size)!important;line-height:var(--line-sm)!important;font-family:monospace!important}.infotext{max-height:200px;overflow-y:auto}.infotext::-webkit-scrollbar{width:5px}.infotext::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.infotext::-webkit-scrollbar-track{background-color:transparent}ul.options{overflow-y:auto;z-index:303;border:1px solid var(--ae-input-border-color)}ul.options::-webkit-scrollbar{width:5px}ul.options::-webkit-scrollbar-track{background-color:transparent}ul.options::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}button:hover,.nevysha-button:hover{filter:brightness(1.2)!important}body.nevysha-light button:hover,body.nevysha-light .nevysha-button:hover{filter:brightness(.95)!important}.nevysha-enhanced-prompt-field{padding:10px!important}.nevysha-enhanced-prompt-field>.prompt{height:289px;display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-radius);background:var(--input-background-fill);width:100%;color:var(--body-text-color)!important;font-weight:var(--input-text-weight)!important;font-size:var(--input-text-size)!important;line-height:var(--line-sm)!important;font-family:monospace!important;overflow:auto;min-height:45px;padding:10px}.nevysha-enhanced-prompt-field-bracket{font-weight:700;font-size:1.2em}#kofi_nevysha_support,#kofi_nevysha_support_img{display:none}[id$=_gallery_clear_button]{position:absolute;top:3px;right:10px;z-index:30;background-color:var(--block-background-fill)}[id$=_gallery_clear_button]>svg{height:15px;width:15px;fill:var(--body-text-color)}#nevyui_update_info_close_btn,#nevyui_update_btn{width:60px}#cozynest_others_settings_header>p:nth-child(1){font-style:italic}#nevysha_cozy_nest{display:none}body.nsfw img:not([id="kofi_nevysha_support_img"]){filter:blur(20px)}body.nsfw .infoModal>.image-wrapper>img{filter:blur(50px)}body.nsfw .card{filter:blur(10px)}
`;var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eC={exports:{}};(function(e){(function(){function t(v){var b={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(v===!1)return JSON.parse(JSON.stringify(b));var y={};for(var m in b)b.hasOwnProperty(m)&&(y[m]=b[m].defaultValue);return y}function n(){var v=t(!0),b={};for(var y in v)v.hasOwnProperty(y)&&(b[y]=!0);return b}var r={},i={},o={},l=t(!0),d="vanilla",a={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(v,b){return l[v]=b,this},r.getOption=function(v){return l[v]},r.getOptions=function(){return l},r.resetOptions=function(){l=t(!0)},r.setFlavor=function(v){if(!a.hasOwnProperty(v))throw Error(v+" flavor was not found");r.resetOptions();var b=a[v];d=v;for(var y in b)b.hasOwnProperty(y)&&(l[y]=b[y])},r.getFlavor=function(){return d},r.getFlavorOptions=function(v){if(a.hasOwnProperty(v))return a[v]},r.getDefaultOptions=function(v){return t(v)},r.subParser=function(v,b){if(r.helper.isString(v))if(typeof b<"u")i[v]=b;else{if(i.hasOwnProperty(v))return i[v];throw Error("SubParser named "+v+" not registered!")}},r.extension=function(v,b){if(!r.helper.isString(v))throw Error("Extension 'name' must be a string");if(v=r.helper.stdExtName(v),r.helper.isUndefined(b)){if(!o.hasOwnProperty(v))throw Error("Extension named "+v+" is not registered!");return o[v]}else{typeof b=="function"&&(b=b()),r.helper.isArray(b)||(b=[b]);var y=c(b,v);if(y.valid)o[v]=b;else throw Error(y.error)}},r.getAllExtensions=function(){return o},r.removeExtension=function(v){delete o[v]},r.resetExtensions=function(){o={}};function c(v,b){var y=b?"Error in "+b+" extension->":"Error in unnamed extension",m={valid:!0,error:""};r.helper.isArray(v)||(v=[v]);for(var E=0;E<v.length;++E){var M=y+" sub-extension "+E+": ",C=v[E];if(typeof C!="object")return m.valid=!1,m.error=M+"must be an object, but "+typeof C+" given",m;if(!r.helper.isString(C.type))return m.valid=!1,m.error=M+'property "type" must be a string, but '+typeof C.type+" given",m;var k=C.type=C.type.toLowerCase();if(k==="language"&&(k=C.type="lang"),k==="html"&&(k=C.type="output"),k!=="lang"&&k!=="output"&&k!=="listener")return m.valid=!1,m.error=M+"type "+k+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',m;if(k==="listener"){if(r.helper.isUndefined(C.listeners))return m.valid=!1,m.error=M+'. Extensions of type "listener" must have a property called "listeners"',m}else if(r.helper.isUndefined(C.filter)&&r.helper.isUndefined(C.regex))return m.valid=!1,m.error=M+k+' extensions must define either a "regex" property or a "filter" method',m;if(C.listeners){if(typeof C.listeners!="object")return m.valid=!1,m.error=M+'"listeners" property must be an object but '+typeof C.listeners+" given",m;for(var O in C.listeners)if(C.listeners.hasOwnProperty(O)&&typeof C.listeners[O]!="function")return m.valid=!1,m.error=M+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+O+" must be a function but "+typeof C.listeners[O]+" given",m}if(C.filter){if(typeof C.filter!="function")return m.valid=!1,m.error=M+'"filter" must be a function, but '+typeof C.filter+" given",m}else if(C.regex){if(r.helper.isString(C.regex)&&(C.regex=new RegExp(C.regex,"g")),!(C.regex instanceof RegExp))return m.valid=!1,m.error=M+'"regex" property must either be a string or a RegExp object, but '+typeof C.regex+" given",m;if(r.helper.isUndefined(C.replace))return m.valid=!1,m.error=M+'"regex" extensions must implement a replace string or function',m}}return m}r.validateExtension=function(v){var b=c(v,null);return b.valid?!0:(console.warn(b.error),!1)},r.hasOwnProperty("helper")||(r.helper={}),r.helper.isString=function(v){return typeof v=="string"||v instanceof String},r.helper.isFunction=function(v){var b={};return v&&b.toString.call(v)==="[object Function]"},r.helper.isArray=function(v){return Array.isArray(v)},r.helper.isUndefined=function(v){return typeof v>"u"},r.helper.forEach=function(v,b){if(r.helper.isUndefined(v))throw new Error("obj param is required");if(r.helper.isUndefined(b))throw new Error("callback param is required");if(!r.helper.isFunction(b))throw new Error("callback param must be a function/closure");if(typeof v.forEach=="function")v.forEach(b);else if(r.helper.isArray(v))for(var y=0;y<v.length;y++)b(v[y],y,v);else if(typeof v=="object")for(var m in v)v.hasOwnProperty(m)&&b(v[m],m,v);else throw new Error("obj does not seem to be an array or an iterable object")},r.helper.stdExtName=function(v){return v.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()};function s(v,b){var y=b.charCodeAt(0);return"¨E"+y+"E"}r.helper.escapeCharactersCallback=s,r.helper.escapeCharacters=function(v,b,y){var m="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";y&&(m="\\\\"+m);var E=new RegExp(m,"g");return v=v.replace(E,s),v},r.helper.unescapeHTMLEntities=function(v){return v.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var u=function(v,b,y,m){var E=m||"",M=E.indexOf("g")>-1,C=new RegExp(b+"|"+y,"g"+E.replace(/g/g,"")),k=new RegExp(b,E.replace(/g/g,"")),O=[],R,A,I,P,z;do for(R=0;I=C.exec(v);)if(k.test(I[0]))R++||(A=C.lastIndex,P=A-I[0].length);else if(R&&!--R){z=I.index+I[0].length;var B={left:{start:P,end:A},match:{start:A,end:I.index},right:{start:I.index,end:z},wholeMatch:{start:P,end:z}};if(O.push(B),!M)return O}while(R&&(C.lastIndex=A));return O};r.helper.matchRecursiveRegExp=function(v,b,y,m){for(var E=u(v,b,y,m),M=[],C=0;C<E.length;++C)M.push([v.slice(E[C].wholeMatch.start,E[C].wholeMatch.end),v.slice(E[C].match.start,E[C].match.end),v.slice(E[C].left.start,E[C].left.end),v.slice(E[C].right.start,E[C].right.end)]);return M},r.helper.replaceRecursiveRegExp=function(v,b,y,m,E){if(!r.helper.isFunction(b)){var M=b;b=function(){return M}}var C=u(v,y,m,E),k=v,O=C.length;if(O>0){var R=[];C[0].wholeMatch.start!==0&&R.push(v.slice(0,C[0].wholeMatch.start));for(var A=0;A<O;++A)R.push(b(v.slice(C[A].wholeMatch.start,C[A].wholeMatch.end),v.slice(C[A].match.start,C[A].match.end),v.slice(C[A].left.start,C[A].left.end),v.slice(C[A].right.start,C[A].right.end))),A<O-1&&R.push(v.slice(C[A].wholeMatch.end,C[A+1].wholeMatch.start));C[O-1].wholeMatch.end<v.length&&R.push(v.slice(C[O-1].wholeMatch.end)),k=R.join("")}return k},r.helper.regexIndexOf=function(v,b,y){if(!r.helper.isString(v))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(!(b instanceof RegExp))throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var m=v.substring(y||0).search(b);return m>=0?m+(y||0):m},r.helper.splitAtIndex=function(v,b){if(!r.helper.isString(v))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[v.substring(0,b),v.substring(b)]},r.helper.encodeEmailAddress=function(v){var b=[function(y){return"&#"+y.charCodeAt(0)+";"},function(y){return"&#x"+y.charCodeAt(0).toString(16)+";"},function(y){return y}];return v=v.replace(/./g,function(y){if(y==="@")y=b[Math.floor(Math.random()*2)](y);else{var m=Math.random();y=m>.9?b[2](y):m>.45?b[1](y):b[0](y)}return y}),v},r.helper.padEnd=function(b,y,m){return y=y>>0,m=String(m||" "),b.length>y?String(b):(y=y-b.length,y>m.length&&(m+=m.repeat(y/m.length)),String(b)+m.slice(0,y))},typeof console>"u"&&(console={warn:function(v){alert(v)},log:function(v){alert(v)},error:function(v){throw v}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️&zwj;♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴&zwj;♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱&zwj;♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇&zwj;♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷&zwj;♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨&zwj;❤️&zwj;👨",couple_with_heart_woman_woman:"👩&zwj;❤️&zwj;👩",couplekiss_man_man:"👨&zwj;❤️&zwj;💋&zwj;👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩&zwj;❤️&zwj;💋&zwj;👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯&zwj;♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁&zwj;🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨&zwj;👦",family_man_boy_boy:"👨&zwj;👦&zwj;👦",family_man_girl:"👨&zwj;👧",family_man_girl_boy:"👨&zwj;👧&zwj;👦",family_man_girl_girl:"👨&zwj;👧&zwj;👧",family_man_man_boy:"👨&zwj;👨&zwj;👦",family_man_man_boy_boy:"👨&zwj;👨&zwj;👦&zwj;👦",family_man_man_girl:"👨&zwj;👨&zwj;👧",family_man_man_girl_boy:"👨&zwj;👨&zwj;👧&zwj;👦",family_man_man_girl_girl:"👨&zwj;👨&zwj;👧&zwj;👧",family_man_woman_boy_boy:"👨&zwj;👩&zwj;👦&zwj;👦",family_man_woman_girl:"👨&zwj;👩&zwj;👧",family_man_woman_girl_boy:"👨&zwj;👩&zwj;👧&zwj;👦",family_man_woman_girl_girl:"👨&zwj;👩&zwj;👧&zwj;👧",family_woman_boy:"👩&zwj;👦",family_woman_boy_boy:"👩&zwj;👦&zwj;👦",family_woman_girl:"👩&zwj;👧",family_woman_girl_boy:"👩&zwj;👧&zwj;👦",family_woman_girl_girl:"👩&zwj;👧&zwj;👧",family_woman_woman_boy:"👩&zwj;👩&zwj;👦",family_woman_woman_boy_boy:"👩&zwj;👩&zwj;👦&zwj;👦",family_woman_woman_girl:"👩&zwj;👩&zwj;👧",family_woman_woman_girl_boy:"👩&zwj;👩&zwj;👧&zwj;👦",family_woman_woman_girl_girl:"👩&zwj;👩&zwj;👧&zwj;👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️&zwj;♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍&zwj;♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️&zwj;♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂&zwj;♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇&zwj;♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"",heavy_multiplication_x:"✖️",heavy_plus_sign:"",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨&zwj;🎨",man_astronaut:"👨&zwj;🚀",man_cartwheeling:"🤸&zwj;♂️",man_cook:"👨&zwj;🍳",man_dancing:"🕺",man_facepalming:"🤦&zwj;♂️",man_factory_worker:"👨&zwj;🏭",man_farmer:"👨&zwj;🌾",man_firefighter:"👨&zwj;🚒",man_health_worker:"👨&zwj;⚕️",man_in_tuxedo:"🤵",man_judge:"👨&zwj;⚖️",man_juggling:"🤹&zwj;♂️",man_mechanic:"👨&zwj;🔧",man_office_worker:"👨&zwj;💼",man_pilot:"👨&zwj;✈️",man_playing_handball:"🤾&zwj;♂️",man_playing_water_polo:"🤽&zwj;♂️",man_scientist:"👨&zwj;🔬",man_shrugging:"🤷&zwj;♂️",man_singer:"👨&zwj;🎤",man_student:"👨&zwj;🎓",man_teacher:"👨&zwj;🏫",man_technologist:"👨&zwj;💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆&zwj;♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼&zwj;♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵&zwj;♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅&zwj;♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆&zwj;♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮&zwj;♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎&zwj;♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️&zwj;🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋&zwj;♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣&zwj;♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃&zwj;♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄&zwj;♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊&zwj;♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁&zwj;♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶&zwj;♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️&zwj;♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩&zwj;🎨",woman_astronaut:"👩&zwj;🚀",woman_cartwheeling:"🤸&zwj;♀️",woman_cook:"👩&zwj;🍳",woman_facepalming:"🤦&zwj;♀️",woman_factory_worker:"👩&zwj;🏭",woman_farmer:"👩&zwj;🌾",woman_firefighter:"👩&zwj;🚒",woman_health_worker:"👩&zwj;⚕️",woman_judge:"👩&zwj;⚖️",woman_juggling:"🤹&zwj;♀️",woman_mechanic:"👩&zwj;🔧",woman_office_worker:"👩&zwj;💼",woman_pilot:"👩&zwj;✈️",woman_playing_handball:"🤾&zwj;♀️",woman_playing_water_polo:"🤽&zwj;♀️",woman_scientist:"👩&zwj;🔬",woman_shrugging:"🤷&zwj;♀️",woman_singer:"👩&zwj;🎤",woman_student:"👩&zwj;🎓",woman_teacher:"👩&zwj;🏫",woman_technologist:"👩&zwj;💻",woman_with_turban:"👳&zwj;♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼&zwj;♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:`<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`},r.Converter=function(v){var b={},y=[],m=[],E={},M=d,C={parsed:{},raw:"",format:""};k();function k(){v=v||{};for(var P in l)l.hasOwnProperty(P)&&(b[P]=l[P]);if(typeof v=="object")for(var z in v)v.hasOwnProperty(z)&&(b[z]=v[z]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof v+" was passed instead.");b.extensions&&r.helper.forEach(b.extensions,O)}function O(P,z){if(z=z||null,r.helper.isString(P))if(P=r.helper.stdExtName(P),z=P,r.extensions[P]){console.warn("DEPRECATION WARNING: "+P+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),R(r.extensions[P],P);return}else if(!r.helper.isUndefined(o[P]))P=o[P];else throw Error('Extension "'+P+'" could not be loaded. It was either not found or is not a valid extension.');typeof P=="function"&&(P=P()),r.helper.isArray(P)||(P=[P]);var B=c(P,z);if(!B.valid)throw Error(B.error);for(var V=0;V<P.length;++V){switch(P[V].type){case"lang":y.push(P[V]);break;case"output":m.push(P[V]);break}if(P[V].hasOwnProperty("listeners"))for(var K in P[V].listeners)P[V].listeners.hasOwnProperty(K)&&A(K,P[V].listeners[K])}}function R(P,z){typeof P=="function"&&(P=P(new r.Converter)),r.helper.isArray(P)||(P=[P]);var B=c(P,z);if(!B.valid)throw Error(B.error);for(var V=0;V<P.length;++V)switch(P[V].type){case"lang":y.push(P[V]);break;case"output":m.push(P[V]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function A(P,z){if(!r.helper.isString(P))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof P+" given");if(typeof z!="function")throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof z+" given");E.hasOwnProperty(P)||(E[P]=[]),E[P].push(z)}function I(P){var z=P.match(/^\s*/)[0].length,B=new RegExp("^\\s{0,"+z+"}","gm");return P.replace(B,"")}this._dispatch=function(z,B,V,K){if(E.hasOwnProperty(z))for(var q=0;q<E[z].length;++q){var re=E[z][q](z,B,this,V,K);re&&typeof re<"u"&&(B=re)}return B},this.listen=function(P,z){return A(P,z),this},this.makeHtml=function(P){if(!P)return P;var z={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:y,outputModifiers:m,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return P=P.replace(/¨/g,"¨T"),P=P.replace(/\$/g,"¨D"),P=P.replace(/\r\n/g,`
`),P=P.replace(/\r/g,`
`),P=P.replace(/\u00A0/g,"&nbsp;"),b.smartIndentationFix&&(P=I(P)),P=`
`+P+`
`,P=r.subParser("detab")(P,b,z),P=P.replace(/^[ \t]+$/mg,""),r.helper.forEach(y,function(B){P=r.subParser("runExtension")(B,P,b,z)}),P=r.subParser("metadata")(P,b,z),P=r.subParser("hashPreCodeTags")(P,b,z),P=r.subParser("githubCodeBlocks")(P,b,z),P=r.subParser("hashHTMLBlocks")(P,b,z),P=r.subParser("hashCodeTags")(P,b,z),P=r.subParser("stripLinkDefinitions")(P,b,z),P=r.subParser("blockGamut")(P,b,z),P=r.subParser("unhashHTMLSpans")(P,b,z),P=r.subParser("unescapeSpecialChars")(P,b,z),P=P.replace(/¨D/g,"$$"),P=P.replace(/¨T/g,"¨"),P=r.subParser("completeHTMLDocument")(P,b,z),r.helper.forEach(m,function(B){P=r.subParser("runExtension")(B,P,b,z)}),C=z.metadata,P},this.makeMarkdown=this.makeMd=function(P,z){if(P=P.replace(/\r\n/g,`
`),P=P.replace(/\r/g,`
`),P=P.replace(/>[ \t]+</,">¨NBSP;<"),!z)if(window&&window.document)z=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var B=z.createElement("div");B.innerHTML=P;var V={preList:Z(B)};Y(B);for(var K=B.childNodes,q="",re=0;re<K.length;re++)q+=r.subParser("makeMarkdown.node")(K[re],V);function Y(te){for(var ie=0;ie<te.childNodes.length;++ie){var ce=te.childNodes[ie];ce.nodeType===3?!/\S/.test(ce.nodeValue)&&!/^[ ]+$/.test(ce.nodeValue)?(te.removeChild(ce),--ie):(ce.nodeValue=ce.nodeValue.split(`
`).join(" "),ce.nodeValue=ce.nodeValue.replace(/(\s)+/g,"$1")):ce.nodeType===1&&Y(ce)}}function Z(te){for(var ie=te.querySelectorAll("pre"),ce=[],he=0;he<ie.length;++he)if(ie[he].childElementCount===1&&ie[he].firstChild.tagName.toLowerCase()==="code"){var ve=ie[he].firstChild.innerHTML.trim(),Ce=ie[he].firstChild.getAttribute("data-language")||"";if(Ce==="")for(var _e=ie[he].firstChild.className.split(" "),Re=0;Re<_e.length;++Re){var ot=_e[Re].match(/^language-(.+)$/);if(ot!==null){Ce=ot[1];break}}ve=r.helper.unescapeHTMLEntities(ve),ce.push(ve),ie[he].outerHTML='<precode language="'+Ce+'" precodenum="'+he.toString()+'"></precode>'}else ce.push(ie[he].innerHTML),ie[he].innerHTML="",ie[he].setAttribute("prenum",he.toString());return ce}return q},this.setOption=function(P,z){b[P]=z},this.getOption=function(P){return b[P]},this.getOptions=function(){return b},this.addExtension=function(P,z){z=z||null,O(P,z)},this.useExtension=function(P){O(P)},this.setFlavor=function(P){if(!a.hasOwnProperty(P))throw Error(P+" flavor was not found");var z=a[P];M=P;for(var B in z)z.hasOwnProperty(B)&&(b[B]=z[B])},this.getFlavor=function(){return M},this.removeExtension=function(P){r.helper.isArray(P)||(P=[P]);for(var z=0;z<P.length;++z){for(var B=P[z],V=0;V<y.length;++V)y[V]===B&&y.splice(V,1);for(var K=0;K<m.length;++K)m[K]===B&&m.splice(K,1)}},this.getAllExtensions=function(){return{language:y,output:m}},this.getMetadata=function(P){return P?C.raw:C.parsed},this.getMetadataFormat=function(){return C.format},this._setMetadataPair=function(P,z){C.parsed[P]=z},this._setMetadataFormat=function(P){C.format=P},this._setMetadataRaw=function(P){C.raw=P}},r.subParser("anchors",function(v,b,y){v=y.converter._dispatch("anchors.before",v,b,y);var m=function(E,M,C,k,O,R,A){if(r.helper.isUndefined(A)&&(A=""),C=C.toLowerCase(),E.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)k="";else if(!k)if(C||(C=M.toLowerCase().replace(/ ?\n/g," ")),k="#"+C,!r.helper.isUndefined(y.gUrls[C]))k=y.gUrls[C],r.helper.isUndefined(y.gTitles[C])||(A=y.gTitles[C]);else return E;k=k.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var I='<a href="'+k+'"';return A!==""&&A!==null&&(A=A.replace(/"/g,"&quot;"),A=A.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),I+=' title="'+A+'"'),b.openLinksInNewWindow&&!/^#/.test(k)&&(I+=' rel="noopener noreferrer" target="¨E95Eblank"'),I+=">"+M+"</a>",I};return v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,m),v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,m),v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,m),v=v.replace(/\[([^\[\]]+)]()()()()()/g,m),b.ghMentions&&(v=v.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(E,M,C,k,O){if(C==="\\")return M+k;if(!r.helper.isString(b.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var R=b.ghMentionsLink.replace(/\{u}/g,O),A="";return b.openLinksInNewWindow&&(A=' rel="noopener noreferrer" target="¨E95Eblank"'),M+'<a href="'+R+'"'+A+">"+k+"</a>"})),v=y.converter._dispatch("anchors.after",v,b,y),v});var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,p=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,g=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,w=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,x=function(v){return function(b,y,m,E,M,C,k){m=m.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var O=m,R="",A="",I=y||"",P=k||"";return/^www\./i.test(m)&&(m=m.replace(/^www\./i,"http://www.")),v.excludeTrailingPunctuationFromURLs&&C&&(R=C),v.openLinksInNewWindow&&(A=' rel="noopener noreferrer" target="¨E95Eblank"'),I+'<a href="'+m+'"'+A+">"+O+"</a>"+R+P}},S=function(v,b){return function(y,m,E){var M="mailto:";return m=m||"",E=r.subParser("unescapeSpecialChars")(E,v,b),v.encodeEmails?(M=r.helper.encodeEmailAddress(M+E),E=r.helper.encodeEmailAddress(E)):M=M+E,m+'<a href="'+M+'">'+E+"</a>"}};r.subParser("autoLinks",function(v,b,y){return v=y.converter._dispatch("autoLinks.before",v,b,y),v=v.replace(p,x(b)),v=v.replace(w,S(b,y)),v=y.converter._dispatch("autoLinks.after",v,b,y),v}),r.subParser("simplifiedAutoLinks",function(v,b,y){return b.simplifiedAutoLink&&(v=y.converter._dispatch("simplifiedAutoLinks.before",v,b,y),b.excludeTrailingPunctuationFromURLs?v=v.replace(h,x(b)):v=v.replace(f,x(b)),v=v.replace(g,S(b,y)),v=y.converter._dispatch("simplifiedAutoLinks.after",v,b,y)),v}),r.subParser("blockGamut",function(v,b,y){return v=y.converter._dispatch("blockGamut.before",v,b,y),v=r.subParser("blockQuotes")(v,b,y),v=r.subParser("headers")(v,b,y),v=r.subParser("horizontalRule")(v,b,y),v=r.subParser("lists")(v,b,y),v=r.subParser("codeBlocks")(v,b,y),v=r.subParser("tables")(v,b,y),v=r.subParser("hashHTMLBlocks")(v,b,y),v=r.subParser("paragraphs")(v,b,y),v=y.converter._dispatch("blockGamut.after",v,b,y),v}),r.subParser("blockQuotes",function(v,b,y){v=y.converter._dispatch("blockQuotes.before",v,b,y),v=v+`
`;var m=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return b.splitAdjacentBlockquotes&&(m=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),v=v.replace(m,function(E){return E=E.replace(/^[ \t]*>[ \t]?/gm,""),E=E.replace(/¨0/g,""),E=E.replace(/^[ \t]+$/gm,""),E=r.subParser("githubCodeBlocks")(E,b,y),E=r.subParser("blockGamut")(E,b,y),E=E.replace(/(^|\n)/g,"$1 "),E=E.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(M,C){var k=C;return k=k.replace(/^ /mg,"¨0"),k=k.replace(/¨0/g,""),k}),r.subParser("hashBlock")(`<blockquote>
`+E+`
</blockquote>`,b,y)}),v=y.converter._dispatch("blockQuotes.after",v,b,y),v}),r.subParser("codeBlocks",function(v,b,y){v=y.converter._dispatch("codeBlocks.before",v,b,y),v+="¨0";var m=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return v=v.replace(m,function(E,M,C){var k=M,O=C,R=`
`;return k=r.subParser("outdent")(k,b,y),k=r.subParser("encodeCode")(k,b,y),k=r.subParser("detab")(k,b,y),k=k.replace(/^\n+/g,""),k=k.replace(/\n+$/g,""),b.omitExtraWLInCodeBlocks&&(R=""),k="<pre><code>"+k+R+"</code></pre>",r.subParser("hashBlock")(k,b,y)+O}),v=v.replace(/¨0/,""),v=y.converter._dispatch("codeBlocks.after",v,b,y),v}),r.subParser("codeSpans",function(v,b,y){return v=y.converter._dispatch("codeSpans.before",v,b,y),typeof v>"u"&&(v=""),v=v.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(m,E,M,C){var k=C;return k=k.replace(/^([ \t]*)/g,""),k=k.replace(/[ \t]*$/g,""),k=r.subParser("encodeCode")(k,b,y),k=E+"<code>"+k+"</code>",k=r.subParser("hashHTMLSpans")(k,b,y),k}),v=y.converter._dispatch("codeSpans.after",v,b,y),v}),r.subParser("completeHTMLDocument",function(v,b,y){if(!b.completeHTMLDocument)return v;v=y.converter._dispatch("completeHTMLDocument.before",v,b,y);var m="html",E=`<!DOCTYPE HTML>
`,M="",C=`<meta charset="utf-8">
`,k="",O="";typeof y.metadata.parsed.doctype<"u"&&(E="<!DOCTYPE "+y.metadata.parsed.doctype+`>
`,m=y.metadata.parsed.doctype.toString().toLowerCase(),(m==="html"||m==="html5")&&(C='<meta charset="utf-8">'));for(var R in y.metadata.parsed)if(y.metadata.parsed.hasOwnProperty(R))switch(R.toLowerCase()){case"doctype":break;case"title":M="<title>"+y.metadata.parsed.title+`</title>
`;break;case"charset":m==="html"||m==="html5"?C='<meta charset="'+y.metadata.parsed.charset+`">
`:C='<meta name="charset" content="'+y.metadata.parsed.charset+`">
`;break;case"language":case"lang":k=' lang="'+y.metadata.parsed[R]+'"',O+='<meta name="'+R+'" content="'+y.metadata.parsed[R]+`">
`;break;default:O+='<meta name="'+R+'" content="'+y.metadata.parsed[R]+`">
`}return v=E+"<html"+k+`>
<head>
`+M+C+O+`</head>
<body>
`+v.trim()+`
</body>
</html>`,v=y.converter._dispatch("completeHTMLDocument.after",v,b,y),v}),r.subParser("detab",function(v,b,y){return v=y.converter._dispatch("detab.before",v,b,y),v=v.replace(/\t(?=\t)/g," "),v=v.replace(/\t/g,"¨A¨B"),v=v.replace(/¨B(.+?)¨A/g,function(m,E){for(var M=E,C=4-M.length%4,k=0;k<C;k++)M+=" ";return M}),v=v.replace(/¨A/g," "),v=v.replace(/¨B/g,""),v=y.converter._dispatch("detab.after",v,b,y),v}),r.subParser("ellipsis",function(v,b,y){return b.ellipsis&&(v=y.converter._dispatch("ellipsis.before",v,b,y),v=v.replace(/\.\.\./g,"…"),v=y.converter._dispatch("ellipsis.after",v,b,y)),v}),r.subParser("emoji",function(v,b,y){if(!b.emoji)return v;v=y.converter._dispatch("emoji.before",v,b,y);var m=/:([\S]+?):/g;return v=v.replace(m,function(E,M){return r.helper.emojis.hasOwnProperty(M)?r.helper.emojis[M]:E}),v=y.converter._dispatch("emoji.after",v,b,y),v}),r.subParser("encodeAmpsAndAngles",function(v,b,y){return v=y.converter._dispatch("encodeAmpsAndAngles.before",v,b,y),v=v.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),v=v.replace(/<(?![a-z\/?$!])/gi,"&lt;"),v=v.replace(/</g,"&lt;"),v=v.replace(/>/g,"&gt;"),v=y.converter._dispatch("encodeAmpsAndAngles.after",v,b,y),v}),r.subParser("encodeBackslashEscapes",function(v,b,y){return v=y.converter._dispatch("encodeBackslashEscapes.before",v,b,y),v=v.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),v=v.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,r.helper.escapeCharactersCallback),v=y.converter._dispatch("encodeBackslashEscapes.after",v,b,y),v}),r.subParser("encodeCode",function(v,b,y){return v=y.converter._dispatch("encodeCode.before",v,b,y),v=v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),v=y.converter._dispatch("encodeCode.after",v,b,y),v}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(v,b,y){v=y.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",v,b,y);var m=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,E=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return v=v.replace(m,function(M){return M.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),v=v.replace(E,function(M){return M.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),v=y.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",v,b,y),v}),r.subParser("githubCodeBlocks",function(v,b,y){return b.ghCodeBlocks?(v=y.converter._dispatch("githubCodeBlocks.before",v,b,y),v+="¨0",v=v.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(m,E,M,C){var k=b.omitExtraWLInCodeBlocks?"":`
`;return C=r.subParser("encodeCode")(C,b,y),C=r.subParser("detab")(C,b,y),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),C="<pre><code"+(M?' class="'+M+" language-"+M+'"':"")+">"+C+k+"</code></pre>",C=r.subParser("hashBlock")(C,b,y),`
¨G`+(y.ghCodeBlocks.push({text:m,codeblock:C})-1)+`G
`}),v=v.replace(/¨0/,""),y.converter._dispatch("githubCodeBlocks.after",v,b,y)):v}),r.subParser("hashBlock",function(v,b,y){return v=y.converter._dispatch("hashBlock.before",v,b,y),v=v.replace(/(^\n+|\n+$)/g,""),v=`
¨K`+(y.gHtmlBlocks.push(v)-1)+`K
`,v=y.converter._dispatch("hashBlock.after",v,b,y),v}),r.subParser("hashCodeTags",function(v,b,y){v=y.converter._dispatch("hashCodeTags.before",v,b,y);var m=function(E,M,C,k){var O=C+r.subParser("encodeCode")(M,b,y)+k;return"¨C"+(y.gHtmlSpans.push(O)-1)+"C"};return v=r.helper.replaceRecursiveRegExp(v,m,"<code\\b[^>]*>","</code>","gim"),v=y.converter._dispatch("hashCodeTags.after",v,b,y),v}),r.subParser("hashElement",function(v,b,y){return function(m,E){var M=E;return M=M.replace(/\n\n/g,`
`),M=M.replace(/^\n/,""),M=M.replace(/\n+$/g,""),M=`
¨K`+(y.gHtmlBlocks.push(M)-1)+`K
`,M}}),r.subParser("hashHTMLBlocks",function(v,b,y){v=y.converter._dispatch("hashHTMLBlocks.before",v,b,y);var m=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],E=function(P,z,B,V){var K=P;return B.search(/\bmarkdown\b/)!==-1&&(K=B+y.converter.makeHtml(z)+V),`
¨K`+(y.gHtmlBlocks.push(K)-1)+`K
`};b.backslashEscapesHTMLTags&&(v=v.replace(/\\<(\/?[^>]+?)>/g,function(P,z){return"&lt;"+z+"&gt;"}));for(var M=0;M<m.length;++M)for(var C,k=new RegExp("^ {0,3}(<"+m[M]+"\\b[^>]*>)","im"),O="<"+m[M]+"\\b[^>]*>",R="</"+m[M]+">";(C=r.helper.regexIndexOf(v,k))!==-1;){var A=r.helper.splitAtIndex(v,C),I=r.helper.replaceRecursiveRegExp(A[1],E,O,R,"im");if(I===A[1])break;v=A[0].concat(I)}return v=v.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(v,b,y)),v=r.helper.replaceRecursiveRegExp(v,function(P){return`
¨K`+(y.gHtmlBlocks.push(P)-1)+`K
`},"^ {0,3}<!--","-->","gm"),v=v.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(v,b,y)),v=y.converter._dispatch("hashHTMLBlocks.after",v,b,y),v}),r.subParser("hashHTMLSpans",function(v,b,y){v=y.converter._dispatch("hashHTMLSpans.before",v,b,y);function m(E){return"¨C"+(y.gHtmlSpans.push(E)-1)+"C"}return v=v.replace(/<[^>]+?\/>/gi,function(E){return m(E)}),v=v.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(E){return m(E)}),v=v.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(E){return m(E)}),v=v.replace(/<[^>]+?>/gi,function(E){return m(E)}),v=y.converter._dispatch("hashHTMLSpans.after",v,b,y),v}),r.subParser("unhashHTMLSpans",function(v,b,y){v=y.converter._dispatch("unhashHTMLSpans.before",v,b,y);for(var m=0;m<y.gHtmlSpans.length;++m){for(var E=y.gHtmlSpans[m],M=0;/¨C(\d+)C/.test(E);){var C=RegExp.$1;if(E=E.replace("¨C"+C+"C",y.gHtmlSpans[C]),M===10){console.error("maximum nesting of 10 spans reached!!!");break}++M}v=v.replace("¨C"+m+"C",E)}return v=y.converter._dispatch("unhashHTMLSpans.after",v,b,y),v}),r.subParser("hashPreCodeTags",function(v,b,y){v=y.converter._dispatch("hashPreCodeTags.before",v,b,y);var m=function(E,M,C,k){var O=C+r.subParser("encodeCode")(M,b,y)+k;return`
¨G`+(y.ghCodeBlocks.push({text:E,codeblock:O})-1)+`G
`};return v=r.helper.replaceRecursiveRegExp(v,m,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),v=y.converter._dispatch("hashPreCodeTags.after",v,b,y),v}),r.subParser("headers",function(v,b,y){v=y.converter._dispatch("headers.before",v,b,y);var m=isNaN(parseInt(b.headerLevelStart))?1:parseInt(b.headerLevelStart),E=b.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,M=b.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;v=v.replace(E,function(O,R){var A=r.subParser("spanGamut")(R,b,y),I=b.noHeaderId?"":' id="'+k(R)+'"',P=m,z="<h"+P+I+">"+A+"</h"+P+">";return r.subParser("hashBlock")(z,b,y)}),v=v.replace(M,function(O,R){var A=r.subParser("spanGamut")(R,b,y),I=b.noHeaderId?"":' id="'+k(R)+'"',P=m+1,z="<h"+P+I+">"+A+"</h"+P+">";return r.subParser("hashBlock")(z,b,y)});var C=b.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;v=v.replace(C,function(O,R,A){var I=A;b.customizedHeaderId&&(I=A.replace(/\s?\{([^{]+?)}\s*$/,""));var P=r.subParser("spanGamut")(I,b,y),z=b.noHeaderId?"":' id="'+k(A)+'"',B=m-1+R.length,V="<h"+B+z+">"+P+"</h"+B+">";return r.subParser("hashBlock")(V,b,y)});function k(O){var R,A;if(b.customizedHeaderId){var I=O.match(/\{([^{]+?)}\s*$/);I&&I[1]&&(O=I[1])}return R=O,r.helper.isString(b.prefixHeaderId)?A=b.prefixHeaderId:b.prefixHeaderId===!0?A="section-":A="",b.rawPrefixHeaderId||(R=A+R),b.ghCompatibleHeaderId?R=R.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():b.rawHeaderId?R=R.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():R=R.replace(/[^\w]/g,"").toLowerCase(),b.rawPrefixHeaderId&&(R=A+R),y.hashLinkCounts[R]?R=R+"-"+y.hashLinkCounts[R]++:y.hashLinkCounts[R]=1,R}return v=y.converter._dispatch("headers.after",v,b,y),v}),r.subParser("horizontalRule",function(v,b,y){v=y.converter._dispatch("horizontalRule.before",v,b,y);var m=r.subParser("hashBlock")("<hr />",b,y);return v=v.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,m),v=v.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,m),v=v.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,m),v=y.converter._dispatch("horizontalRule.after",v,b,y),v}),r.subParser("images",function(v,b,y){v=y.converter._dispatch("images.before",v,b,y);var m=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,E=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,M=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,C=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,k=/!\[([^\[\]]+)]()()()()()/g;function O(A,I,P,z,B,V,K,q){return z=z.replace(/\s/g,""),R(A,I,P,z,B,V,K,q)}function R(A,I,P,z,B,V,K,q){var re=y.gUrls,Y=y.gTitles,Z=y.gDimensions;if(P=P.toLowerCase(),q||(q=""),A.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)z="";else if(z===""||z===null)if((P===""||P===null)&&(P=I.toLowerCase().replace(/ ?\n/g," ")),z="#"+P,!r.helper.isUndefined(re[P]))z=re[P],r.helper.isUndefined(Y[P])||(q=Y[P]),r.helper.isUndefined(Z[P])||(B=Z[P].width,V=Z[P].height);else return A;I=I.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),z=z.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var te='<img src="'+z+'" alt="'+I+'"';return q&&r.helper.isString(q)&&(q=q.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),te+=' title="'+q+'"'),B&&V&&(B=B==="*"?"auto":B,V=V==="*"?"auto":V,te+=' width="'+B+'"',te+=' height="'+V+'"'),te+=" />",te}return v=v.replace(C,R),v=v.replace(M,O),v=v.replace(E,R),v=v.replace(m,R),v=v.replace(k,R),v=y.converter._dispatch("images.after",v,b,y),v}),r.subParser("italicsAndBold",function(v,b,y){v=y.converter._dispatch("italicsAndBold.before",v,b,y);function m(E,M,C){return M+E+C}return b.literalMidWordUnderscores?(v=v.replace(/\b___(\S[\s\S]*?)___\b/g,function(E,M){return m(M,"<strong><em>","</em></strong>")}),v=v.replace(/\b__(\S[\s\S]*?)__\b/g,function(E,M){return m(M,"<strong>","</strong>")}),v=v.replace(/\b_(\S[\s\S]*?)_\b/g,function(E,M){return m(M,"<em>","</em>")})):(v=v.replace(/___(\S[\s\S]*?)___/g,function(E,M){return/\S$/.test(M)?m(M,"<strong><em>","</em></strong>"):E}),v=v.replace(/__(\S[\s\S]*?)__/g,function(E,M){return/\S$/.test(M)?m(M,"<strong>","</strong>"):E}),v=v.replace(/_([^\s_][\s\S]*?)_/g,function(E,M){return/\S$/.test(M)?m(M,"<em>","</em>"):E})),b.literalMidWordAsterisks?(v=v.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(E,M,C){return m(C,M+"<strong><em>","</em></strong>")}),v=v.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(E,M,C){return m(C,M+"<strong>","</strong>")}),v=v.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(E,M,C){return m(C,M+"<em>","</em>")})):(v=v.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(E,M){return/\S$/.test(M)?m(M,"<strong><em>","</em></strong>"):E}),v=v.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(E,M){return/\S$/.test(M)?m(M,"<strong>","</strong>"):E}),v=v.replace(/\*([^\s*][\s\S]*?)\*/g,function(E,M){return/\S$/.test(M)?m(M,"<em>","</em>"):E})),v=y.converter._dispatch("italicsAndBold.after",v,b,y),v}),r.subParser("lists",function(v,b,y){function m(C,k){y.gListLevel++,C=C.replace(/\n{2,}$/,`
`),C+="¨0";var O=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,R=/\n[ \t]*\n(?!¨0)/.test(C);return b.disableForced4SpacesIndentedSublists&&(O=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),C=C.replace(O,function(A,I,P,z,B,V,K){K=K&&K.trim()!=="";var q=r.subParser("outdent")(B,b,y),re="";return V&&b.tasklists&&(re=' class="task-list-item" style="list-style-type: none;"',q=q.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Y='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return K&&(Y+=" checked"),Y+=">",Y})),q=q.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(Y){return"¨A"+Y}),I||q.search(/\n{2,}/)>-1?(q=r.subParser("githubCodeBlocks")(q,b,y),q=r.subParser("blockGamut")(q,b,y)):(q=r.subParser("lists")(q,b,y),q=q.replace(/\n$/,""),q=r.subParser("hashHTMLBlocks")(q,b,y),q=q.replace(/\n\n+/g,`
`),R?q=r.subParser("paragraphs")(q,b,y):q=r.subParser("spanGamut")(q,b,y)),q=q.replace("¨A",""),q="<li"+re+">"+q+`</li>
`,q}),C=C.replace(/¨0/g,""),y.gListLevel--,k&&(C=C.replace(/\s+$/,"")),C}function E(C,k){if(k==="ol"){var O=C.match(/^ *(\d+)\./);if(O&&O[1]!=="1")return' start="'+O[1]+'"'}return""}function M(C,k,O){var R=b.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,A=b.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,I=k==="ul"?R:A,P="";if(C.search(I)!==-1)(function B(V){var K=V.search(I),q=E(C,k);K!==-1?(P+=`
<`+k+q+`>
`+m(V.slice(0,K),!!O)+"</"+k+`>
`,k=k==="ul"?"ol":"ul",I=k==="ul"?R:A,B(V.slice(K))):P+=`
<`+k+q+`>
`+m(V,!!O)+"</"+k+`>
`})(C);else{var z=E(C,k);P=`
<`+k+z+`>
`+m(C,!!O)+"</"+k+`>
`}return P}return v=y.converter._dispatch("lists.before",v,b,y),v+="¨0",y.gListLevel?v=v.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,k,O){var R=O.search(/[*+-]/g)>-1?"ul":"ol";return M(k,R,!0)}):v=v.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,k,O,R){var A=R.search(/[*+-]/g)>-1?"ul":"ol";return M(O,A,!1)}),v=v.replace(/¨0/,""),v=y.converter._dispatch("lists.after",v,b,y),v}),r.subParser("metadata",function(v,b,y){if(!b.metadata)return v;v=y.converter._dispatch("metadata.before",v,b,y);function m(E){y.metadata.raw=E,E=E.replace(/&/g,"&amp;").replace(/"/g,"&quot;"),E=E.replace(/\n {4}/g," "),E.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(M,C,k){return y.metadata.parsed[C]=k,""})}return v=v.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(E,M,C){return m(C),"¨M"}),v=v.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(E,M,C){return M&&(y.metadata.format=M),m(C),"¨M"}),v=v.replace(/¨M/g,""),v=y.converter._dispatch("metadata.after",v,b,y),v}),r.subParser("outdent",function(v,b,y){return v=y.converter._dispatch("outdent.before",v,b,y),v=v.replace(/^(\t|[ ]{1,4})/gm,"¨0"),v=v.replace(/¨0/g,""),v=y.converter._dispatch("outdent.after",v,b,y),v}),r.subParser("paragraphs",function(v,b,y){v=y.converter._dispatch("paragraphs.before",v,b,y),v=v.replace(/^\n+/g,""),v=v.replace(/\n+$/g,"");for(var m=v.split(/\n{2,}/g),E=[],M=m.length,C=0;C<M;C++){var k=m[C];k.search(/¨(K|G)(\d+)\1/g)>=0?E.push(k):k.search(/\S/)>=0&&(k=r.subParser("spanGamut")(k,b,y),k=k.replace(/^([ \t]*)/g,"<p>"),k+="</p>",E.push(k))}for(M=E.length,C=0;C<M;C++){for(var O="",R=E[C],A=!1;/¨(K|G)(\d+)\1/.test(R);){var I=RegExp.$1,P=RegExp.$2;I==="K"?O=y.gHtmlBlocks[P]:A?O=r.subParser("encodeCode")(y.ghCodeBlocks[P].text,b,y):O=y.ghCodeBlocks[P].codeblock,O=O.replace(/\$/g,"$$$$"),R=R.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,O),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(R)&&(A=!0)}E[C]=R}return v=E.join(`
`),v=v.replace(/^\n+/g,""),v=v.replace(/\n+$/g,""),y.converter._dispatch("paragraphs.after",v,b,y)}),r.subParser("runExtension",function(v,b,y,m){if(v.filter)b=v.filter(b,m.converter,y);else if(v.regex){var E=v.regex;E instanceof RegExp||(E=new RegExp(E,"g")),b=b.replace(E,v.replace)}return b}),r.subParser("spanGamut",function(v,b,y){return v=y.converter._dispatch("spanGamut.before",v,b,y),v=r.subParser("codeSpans")(v,b,y),v=r.subParser("escapeSpecialCharsWithinTagAttributes")(v,b,y),v=r.subParser("encodeBackslashEscapes")(v,b,y),v=r.subParser("images")(v,b,y),v=r.subParser("anchors")(v,b,y),v=r.subParser("autoLinks")(v,b,y),v=r.subParser("simplifiedAutoLinks")(v,b,y),v=r.subParser("emoji")(v,b,y),v=r.subParser("underline")(v,b,y),v=r.subParser("italicsAndBold")(v,b,y),v=r.subParser("strikethrough")(v,b,y),v=r.subParser("ellipsis")(v,b,y),v=r.subParser("hashHTMLSpans")(v,b,y),v=r.subParser("encodeAmpsAndAngles")(v,b,y),b.simpleLineBreaks?/\n\n¨K/.test(v)||(v=v.replace(/\n+/g,`<br />
`)):v=v.replace(/ +\n/g,`<br />
`),v=y.converter._dispatch("spanGamut.after",v,b,y),v}),r.subParser("strikethrough",function(v,b,y){function m(E){return b.simplifiedAutoLink&&(E=r.subParser("simplifiedAutoLinks")(E,b,y)),"<del>"+E+"</del>"}return b.strikethrough&&(v=y.converter._dispatch("strikethrough.before",v,b,y),v=v.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(E,M){return m(M)}),v=y.converter._dispatch("strikethrough.after",v,b,y)),v}),r.subParser("stripLinkDefinitions",function(v,b,y){var m=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,E=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;v+="¨0";var M=function(C,k,O,R,A,I,P){return k=k.toLowerCase(),v.toLowerCase().split(k).length-1<2?C:(O.match(/^data:.+?\/.+?;base64,/)?y.gUrls[k]=O.replace(/\s/g,""):y.gUrls[k]=r.subParser("encodeAmpsAndAngles")(O,b,y),I?I+P:(P&&(y.gTitles[k]=P.replace(/"|'/g,"&quot;")),b.parseImgDimensions&&R&&A&&(y.gDimensions[k]={width:R,height:A}),""))};return v=v.replace(E,M),v=v.replace(m,M),v=v.replace(/¨0/,""),v}),r.subParser("tables",function(v,b,y){if(!b.tables)return v;var m=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,E=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function M(A){return/^:[ \t]*--*$/.test(A)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(A)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(A)?' style="text-align:center;"':""}function C(A,I){var P="";return A=A.trim(),(b.tablesHeaderId||b.tableHeaderId)&&(P=' id="'+A.replace(/ /g,"_").toLowerCase()+'"'),A=r.subParser("spanGamut")(A,b,y),"<th"+P+I+">"+A+`</th>
`}function k(A,I){var P=r.subParser("spanGamut")(A,b,y);return"<td"+I+">"+P+`</td>
`}function O(A,I){for(var P=`<table>
<thead>
<tr>
`,z=A.length,B=0;B<z;++B)P+=A[B];for(P+=`</tr>
</thead>
<tbody>
`,B=0;B<I.length;++B){P+=`<tr>
`;for(var V=0;V<z;++V)P+=I[B][V];P+=`</tr>
`}return P+=`</tbody>
</table>
`,P}function R(A){var I,P=A.split(`
`);for(I=0;I<P.length;++I)/^ {0,3}\|/.test(P[I])&&(P[I]=P[I].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(P[I])&&(P[I]=P[I].replace(/\|[ \t]*$/,"")),P[I]=r.subParser("codeSpans")(P[I],b,y);var z=P[0].split("|").map(function(te){return te.trim()}),B=P[1].split("|").map(function(te){return te.trim()}),V=[],K=[],q=[],re=[];for(P.shift(),P.shift(),I=0;I<P.length;++I)P[I].trim()!==""&&V.push(P[I].split("|").map(function(te){return te.trim()}));if(z.length<B.length)return A;for(I=0;I<B.length;++I)q.push(M(B[I]));for(I=0;I<z.length;++I)r.helper.isUndefined(q[I])&&(q[I]=""),K.push(C(z[I],q[I]));for(I=0;I<V.length;++I){for(var Y=[],Z=0;Z<K.length;++Z)r.helper.isUndefined(V[I][Z]),Y.push(k(V[I][Z],q[Z]));re.push(Y)}return O(K,re)}return v=y.converter._dispatch("tables.before",v,b,y),v=v.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),v=v.replace(m,R),v=v.replace(E,R),v=y.converter._dispatch("tables.after",v,b,y),v}),r.subParser("underline",function(v,b,y){return b.underline&&(v=y.converter._dispatch("underline.before",v,b,y),b.literalMidWordUnderscores?(v=v.replace(/\b___(\S[\s\S]*?)___\b/g,function(m,E){return"<u>"+E+"</u>"}),v=v.replace(/\b__(\S[\s\S]*?)__\b/g,function(m,E){return"<u>"+E+"</u>"})):(v=v.replace(/___(\S[\s\S]*?)___/g,function(m,E){return/\S$/.test(E)?"<u>"+E+"</u>":m}),v=v.replace(/__(\S[\s\S]*?)__/g,function(m,E){return/\S$/.test(E)?"<u>"+E+"</u>":m})),v=v.replace(/(_)/g,r.helper.escapeCharactersCallback),v=y.converter._dispatch("underline.after",v,b,y)),v}),r.subParser("unescapeSpecialChars",function(v,b,y){return v=y.converter._dispatch("unescapeSpecialChars.before",v,b,y),v=v.replace(/¨E(\d+)E/g,function(m,E){var M=parseInt(E);return String.fromCharCode(M)}),v=y.converter._dispatch("unescapeSpecialChars.after",v,b,y),v}),r.subParser("makeMarkdown.blockquote",function(v,b){var y="";if(v.hasChildNodes())for(var m=v.childNodes,E=m.length,M=0;M<E;++M){var C=r.subParser("makeMarkdown.node")(m[M],b);C!==""&&(y+=C)}return y=y.trim(),y="> "+y.split(`
`).join(`
> `),y}),r.subParser("makeMarkdown.codeBlock",function(v,b){var y=v.getAttribute("language"),m=v.getAttribute("precodenum");return"```"+y+`
`+b.preList[m]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(v){return"`"+v.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(v,b){var y="";if(v.hasChildNodes()){y+="*";for(var m=v.childNodes,E=m.length,M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b);y+="*"}return y}),r.subParser("makeMarkdown.header",function(v,b,y){var m=new Array(y+1).join("#"),E="";if(v.hasChildNodes()){E=m+" ";for(var M=v.childNodes,C=M.length,k=0;k<C;++k)E+=r.subParser("makeMarkdown.node")(M[k],b)}return E}),r.subParser("makeMarkdown.hr",function(){return"---"}),r.subParser("makeMarkdown.image",function(v){var b="";return v.hasAttribute("src")&&(b+="!["+v.getAttribute("alt")+"](",b+="<"+v.getAttribute("src")+">",v.hasAttribute("width")&&v.hasAttribute("height")&&(b+=" ="+v.getAttribute("width")+"x"+v.getAttribute("height")),v.hasAttribute("title")&&(b+=' "'+v.getAttribute("title")+'"'),b+=")"),b}),r.subParser("makeMarkdown.links",function(v,b){var y="";if(v.hasChildNodes()&&v.hasAttribute("href")){var m=v.childNodes,E=m.length;y="[";for(var M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b);y+="](",y+="<"+v.getAttribute("href")+">",v.hasAttribute("title")&&(y+=' "'+v.getAttribute("title")+'"'),y+=")"}return y}),r.subParser("makeMarkdown.list",function(v,b,y){var m="";if(!v.hasChildNodes())return"";for(var E=v.childNodes,M=E.length,C=v.getAttribute("start")||1,k=0;k<M;++k)if(!(typeof E[k].tagName>"u"||E[k].tagName.toLowerCase()!=="li")){var O="";y==="ol"?O=C.toString()+". ":O="- ",m+=O+r.subParser("makeMarkdown.listItem")(E[k],b),++C}return m+=`
<!-- -->
`,m.trim()}),r.subParser("makeMarkdown.listItem",function(v,b){for(var y="",m=v.childNodes,E=m.length,M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b);return/\n$/.test(y)?y=y.split(`
`).join(`
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
`):y+=`
`,y}),r.subParser("makeMarkdown.node",function(v,b,y){y=y||!1;var m="";if(v.nodeType===3)return r.subParser("makeMarkdown.txt")(v,b);if(v.nodeType===8)return"<!--"+v.data+`-->
`;if(v.nodeType!==1)return"";var E=v.tagName.toLowerCase();switch(E){case"h1":y||(m=r.subParser("makeMarkdown.header")(v,b,1)+`
`);break;case"h2":y||(m=r.subParser("makeMarkdown.header")(v,b,2)+`
`);break;case"h3":y||(m=r.subParser("makeMarkdown.header")(v,b,3)+`
`);break;case"h4":y||(m=r.subParser("makeMarkdown.header")(v,b,4)+`
`);break;case"h5":y||(m=r.subParser("makeMarkdown.header")(v,b,5)+`
`);break;case"h6":y||(m=r.subParser("makeMarkdown.header")(v,b,6)+`
`);break;case"p":y||(m=r.subParser("makeMarkdown.paragraph")(v,b)+`
`);break;case"blockquote":y||(m=r.subParser("makeMarkdown.blockquote")(v,b)+`
`);break;case"hr":y||(m=r.subParser("makeMarkdown.hr")(v,b)+`
`);break;case"ol":y||(m=r.subParser("makeMarkdown.list")(v,b,"ol")+`
`);break;case"ul":y||(m=r.subParser("makeMarkdown.list")(v,b,"ul")+`
`);break;case"precode":y||(m=r.subParser("makeMarkdown.codeBlock")(v,b)+`
`);break;case"pre":y||(m=r.subParser("makeMarkdown.pre")(v,b)+`
`);break;case"table":y||(m=r.subParser("makeMarkdown.table")(v,b)+`
`);break;case"code":m=r.subParser("makeMarkdown.codeSpan")(v,b);break;case"em":case"i":m=r.subParser("makeMarkdown.emphasis")(v,b);break;case"strong":case"b":m=r.subParser("makeMarkdown.strong")(v,b);break;case"del":m=r.subParser("makeMarkdown.strikethrough")(v,b);break;case"a":m=r.subParser("makeMarkdown.links")(v,b);break;case"img":m=r.subParser("makeMarkdown.image")(v,b);break;default:m=v.outerHTML+`
`}return m}),r.subParser("makeMarkdown.paragraph",function(v,b){var y="";if(v.hasChildNodes())for(var m=v.childNodes,E=m.length,M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b);return y=y.trim(),y}),r.subParser("makeMarkdown.pre",function(v,b){var y=v.getAttribute("prenum");return"<pre>"+b.preList[y]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(v,b){var y="";if(v.hasChildNodes()){y+="~~";for(var m=v.childNodes,E=m.length,M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b);y+="~~"}return y}),r.subParser("makeMarkdown.strong",function(v,b){var y="";if(v.hasChildNodes()){y+="**";for(var m=v.childNodes,E=m.length,M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b);y+="**"}return y}),r.subParser("makeMarkdown.table",function(v,b){var y="",m=[[],[]],E=v.querySelectorAll("thead>tr>th"),M=v.querySelectorAll("tbody>tr"),C,k;for(C=0;C<E.length;++C){var O=r.subParser("makeMarkdown.tableCell")(E[C],b),R="---";if(E[C].hasAttribute("style")){var A=E[C].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(A){case"text-align:left;":R=":---";break;case"text-align:right;":R="---:";break;case"text-align:center;":R=":---:";break}}m[0][C]=O.trim(),m[1][C]=R}for(C=0;C<M.length;++C){var I=m.push([])-1,P=M[C].getElementsByTagName("td");for(k=0;k<E.length;++k){var z=" ";typeof P[k]<"u"&&(z=r.subParser("makeMarkdown.tableCell")(P[k],b)),m[I].push(z)}}var B=3;for(C=0;C<m.length;++C)for(k=0;k<m[C].length;++k){var V=m[C][k].length;V>B&&(B=V)}for(C=0;C<m.length;++C){for(k=0;k<m[C].length;++k)C===1?m[C][k].slice(-1)===":"?m[C][k]=r.helper.padEnd(m[C][k].slice(-1),B-1,"-")+":":m[C][k]=r.helper.padEnd(m[C][k],B,"-"):m[C][k]=r.helper.padEnd(m[C][k],B);y+="| "+m[C].join(" | ")+` |
`}return y.trim()}),r.subParser("makeMarkdown.tableCell",function(v,b){var y="";if(!v.hasChildNodes())return"";for(var m=v.childNodes,E=m.length,M=0;M<E;++M)y+=r.subParser("makeMarkdown.node")(m[M],b,!0);return y.trim()}),r.subParser("makeMarkdown.txt",function(v){var b=v.nodeValue;return b=b.replace(/ +/g," "),b=b.replace(/¨NBSP;/g," "),b=r.helper.unescapeHTMLEntities(b),b=b.replace(/([*_~|`])/g,"\\$1"),b=b.replace(/^(\s*)>/g,"\\$1>"),b=b.replace(/^#/gm,"\\#"),b=b.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),b=b.replace(/^( {0,3}\d+)\./gm,"$1\\."),b=b.replace(/^( {0,3})([+-])/gm,"$1\\$2"),b=b.replace(/]([\s]*)\(/g,"\\]$1\\("),b=b.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),b});var T=this;e.exports?e.exports=r:T.showdown=r}).call(Be)})(eC);var t3=eC.exports;const n3=ks(t3);var tC={exports:{}};/*!
* jQuery JavaScript Library v3.7.0
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-05-11T18:29Z
*/(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window<"u"?window:Be,function(t,n){var r=[],i=Object.getPrototypeOf,o=r.slice,l=r.flat?function(_){return r.flat.call(_)}:function(_){return r.concat.apply([],_)},d=r.push,a=r.indexOf,c={},s=c.toString,u=c.hasOwnProperty,f=u.toString,h=f.call(Object),p={},g=function(L){return typeof L=="function"&&typeof L.nodeType!="number"&&typeof L.item!="function"},w=function(L){return L!=null&&L===L.window},x=t.document,S={type:!0,src:!0,nonce:!0,noModule:!0};function T(_,L,F){F=F||x;var D,j,H=F.createElement("script");if(H.text=_,L)for(D in S)j=L[D]||L.getAttribute&&L.getAttribute(D),j&&H.setAttribute(D,j);F.head.appendChild(H).parentNode.removeChild(H)}function v(_){return _==null?_+"":typeof _=="object"||typeof _=="function"?c[s.call(_)]||"object":typeof _}var b="3.7.0",y=/HTML$/i,m=function(_,L){return new m.fn.init(_,L)};m.fn=m.prototype={jquery:b,constructor:m,length:0,toArray:function(){return o.call(this)},get:function(_){return _==null?o.call(this):_<0?this[_+this.length]:this[_]},pushStack:function(_){var L=m.merge(this.constructor(),_);return L.prevObject=this,L},each:function(_){return m.each(this,_)},map:function(_){return this.pushStack(m.map(this,function(L,F){return _.call(L,F,L)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(m.grep(this,function(_,L){return(L+1)%2}))},odd:function(){return this.pushStack(m.grep(this,function(_,L){return L%2}))},eq:function(_){var L=this.length,F=+_+(_<0?L:0);return this.pushStack(F>=0&&F<L?[this[F]]:[])},end:function(){return this.prevObject||this.constructor()},push:d,sort:r.sort,splice:r.splice},m.extend=m.fn.extend=function(){var _,L,F,D,j,H,G=arguments[0]||{},ne=1,ee=arguments.length,le=!1;for(typeof G=="boolean"&&(le=G,G=arguments[ne]||{},ne++),typeof G!="object"&&!g(G)&&(G={}),ne===ee&&(G=this,ne--);ne<ee;ne++)if((_=arguments[ne])!=null)for(L in _)D=_[L],!(L==="__proto__"||G===D)&&(le&&D&&(m.isPlainObject(D)||(j=Array.isArray(D)))?(F=G[L],j&&!Array.isArray(F)?H=[]:!j&&!m.isPlainObject(F)?H={}:H=F,j=!1,G[L]=m.extend(le,H,D)):D!==void 0&&(G[L]=D));return G},m.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(_){throw new Error(_)},noop:function(){},isPlainObject:function(_){var L,F;return!_||s.call(_)!=="[object Object]"?!1:(L=i(_),L?(F=u.call(L,"constructor")&&L.constructor,typeof F=="function"&&f.call(F)===h):!0)},isEmptyObject:function(_){var L;for(L in _)return!1;return!0},globalEval:function(_,L,F){T(_,{nonce:L&&L.nonce},F)},each:function(_,L){var F,D=0;if(E(_))for(F=_.length;D<F&&L.call(_[D],D,_[D])!==!1;D++);else for(D in _)if(L.call(_[D],D,_[D])===!1)break;return _},text:function(_){var L,F="",D=0,j=_.nodeType;if(j){if(j===1||j===9||j===11)return _.textContent;if(j===3||j===4)return _.nodeValue}else for(;L=_[D++];)F+=m.text(L);return F},makeArray:function(_,L){var F=L||[];return _!=null&&(E(Object(_))?m.merge(F,typeof _=="string"?[_]:_):d.call(F,_)),F},inArray:function(_,L,F){return L==null?-1:a.call(L,_,F)},isXMLDoc:function(_){var L=_&&_.namespaceURI,F=_&&(_.ownerDocument||_).documentElement;return!y.test(L||F&&F.nodeName||"HTML")},merge:function(_,L){for(var F=+L.length,D=0,j=_.length;D<F;D++)_[j++]=L[D];return _.length=j,_},grep:function(_,L,F){for(var D,j=[],H=0,G=_.length,ne=!F;H<G;H++)D=!L(_[H],H),D!==ne&&j.push(_[H]);return j},map:function(_,L,F){var D,j,H=0,G=[];if(E(_))for(D=_.length;H<D;H++)j=L(_[H],H,F),j!=null&&G.push(j);else for(H in _)j=L(_[H],H,F),j!=null&&G.push(j);return l(G)},guid:1,support:p}),typeof Symbol=="function"&&(m.fn[Symbol.iterator]=r[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_,L){c["[object "+L+"]"]=L.toLowerCase()});function E(_){var L=!!_&&"length"in _&&_.length,F=v(_);return g(_)||w(_)?!1:F==="array"||L===0||typeof L=="number"&&L>0&&L-1 in _}function M(_,L){return _.nodeName&&_.nodeName.toLowerCase()===L.toLowerCase()}var C=r.pop,k=r.sort,O=r.splice,R="[\\x20\\t\\r\\n\\f]",A=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g");m.contains=function(_,L){var F=L&&L.parentNode;return _===F||!!(F&&F.nodeType===1&&(_.contains?_.contains(F):_.compareDocumentPosition&&_.compareDocumentPosition(F)&16))};var I=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function P(_,L){return L?_==="\0"?"<22>":_.slice(0,-1)+"\\"+_.charCodeAt(_.length-1).toString(16)+" ":"\\"+_}m.escapeSelector=function(_){return(_+"").replace(I,P)};var z=x,B=d;(function(){var _,L,F,D,j,H=B,G,ne,ee,le,ge,be=m.expando,fe=0,ke=0,tt=Ed(),yt=Ed(),st=Ed(),_n=Ed(),dn=function(X,oe){return X===oe&&(j=!0),0},Ci="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ki="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",ht="\\["+R+"*("+ki+")(?:"+R+"*([*^$|!~]?=)"+R+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+ki+"))|)"+R+"*\\]",Ba=":("+ki+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+ht+")*)|.*)\\)|)",bt=new RegExp(R+"+","g"),Zt=new RegExp("^"+R+"*,"+R+"*"),_u=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),Tg=new RegExp(R+"|>"),Ei=new RegExp(Ba),Cu=new RegExp("^"+ki+"$"),$i={ID:new RegExp("^#("+ki+")"),CLASS:new RegExp("^\\.("+ki+")"),TAG:new RegExp("^("+ki+"|[*])"),ATTR:new RegExp("^"+ht),PSEUDO:new RegExp("^"+Ba),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+Ci+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Vo=/^(?:input|select|textarea|button)$/i,Wo=/^h\d$/i,Or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ag=/[+~]/,no=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ro=function(X,oe){var de="0x"+X.slice(1)-65536;return oe||(de<0?String.fromCharCode(de+65536):String.fromCharCode(de>>10|55296,de&1023|56320))},WM=function(){Uo()},UM=Ad(function(X){return X.disabled===!0&&M(X,"fieldset")},{dir:"parentNode",next:"legend"});function GM(){try{return G.activeElement}catch{}}try{H.apply(r=o.call(z.childNodes),z.childNodes),r[z.childNodes.length].nodeType}catch{H={apply:function(oe,de){B.apply(oe,o.call(de))},call:function(oe){B.apply(oe,o.call(arguments,1))}}}function It(X,oe,de,pe){var ye,$e,Me,De,Le,dt,Ze,nt=oe&&oe.ownerDocument,ft=oe?oe.nodeType:9;if(de=de||[],typeof X!="string"||!X||ft!==1&&ft!==9&&ft!==11)return de;if(!pe&&(Uo(oe),oe=oe||G,ee)){if(ft!==11&&(Le=Or.exec(X)))if(ye=Le[1]){if(ft===9)if(Me=oe.getElementById(ye)){if(Me.id===ye)return H.call(de,Me),de}else return de;else if(nt&&(Me=nt.getElementById(ye))&&It.contains(oe,Me)&&Me.id===ye)return H.call(de,Me),de}else{if(Le[2])return H.apply(de,oe.getElementsByTagName(X)),de;if((ye=Le[3])&&oe.getElementsByClassName)return H.apply(de,oe.getElementsByClassName(ye)),de}if(!_n[X+" "]&&(!le||!le.test(X))){if(Ze=X,nt=oe,ft===1&&(Tg.test(X)||_u.test(X))){for(nt=Ag.test(X)&&Mg(oe.parentNode)||oe,(nt!=oe||!p.scope)&&((De=oe.getAttribute("id"))?De=m.escapeSelector(De):oe.setAttribute("id",De=be)),dt=$d(X),$e=dt.length;$e--;)dt[$e]=(De?"#"+De:":scope")+" "+Td(dt[$e]);Ze=dt.join(",")}try{return H.apply(de,nt.querySelectorAll(Ze)),de}catch{_n(X,!0)}finally{De===be&&oe.removeAttribute("id")}}}return ww(X.replace(A,"$1"),oe,de,pe)}function Ed(){var X=[];function oe(de,pe){return X.push(de+" ")>L.cacheLength&&delete oe[X.shift()],oe[de+" "]=pe}return oe}function ri(X){return X[be]=!0,X}function Js(X){var oe=G.createElement("fieldset");try{return!!X(oe)}catch{return!1}finally{oe.parentNode&&oe.parentNode.removeChild(oe),oe=null}}function KM(X){return function(oe){return M(oe,"input")&&oe.type===X}}function qM(X){return function(oe){return(M(oe,"input")||M(oe,"button"))&&oe.type===X}}function yw(X){return function(oe){return"form"in oe?oe.parentNode&&oe.disabled===!1?"label"in oe?"label"in oe.parentNode?oe.parentNode.disabled===X:oe.disabled===X:oe.isDisabled===X||oe.isDisabled!==!X&&UM(oe)===X:oe.disabled===X:"label"in oe?oe.disabled===X:!1}}function ja(X){return ri(function(oe){return oe=+oe,ri(function(de,pe){for(var ye,$e=X([],de.length,oe),Me=$e.length;Me--;)de[ye=$e[Me]]&&(de[ye]=!(pe[ye]=de[ye]))})})}function Mg(X){return X&&typeof X.getElementsByTagName<"u"&&X}function Uo(X){var oe,de=X?X.ownerDocument||X:z;return de==G||de.nodeType!==9||!de.documentElement||(G=de,ne=G.documentElement,ee=!m.isXMLDoc(G),ge=ne.matches||ne.webkitMatchesSelector||ne.msMatchesSelector,z!=G&&(oe=G.defaultView)&&oe.top!==oe&&oe.addEventListener("unload",WM),p.getById=Js(function(pe){return ne.appendChild(pe).id=m.expando,!G.getElementsByName||!G.getElementsByName(m.expando).length}),p.disconnectedMatch=Js(function(pe){return ge.call(pe,"*")}),p.scope=Js(function(){return G.querySelectorAll(":scope")}),p.cssHas=Js(function(){try{return G.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),p.getById?(L.filter.ID=function(pe){var ye=pe.replace(no,ro);return function($e){return $e.getAttribute("id")===ye}},L.find.ID=function(pe,ye){if(typeof ye.getElementById<"u"&&ee){var $e=ye.getElementById(pe);return $e?[$e]:[]}}):(L.filter.ID=function(pe){var ye=pe.replace(no,ro);return function($e){var Me=typeof $e.getAttributeNode<"u"&&$e.getAttributeNode("id");return Me&&Me.value===ye}},L.find.ID=function(pe,ye){if(typeof ye.getElementById<"u"&&ee){var $e,Me,De,Le=ye.getElementById(pe);if(Le){if($e=Le.getAttributeNode("id"),$e&&$e.value===pe)return[Le];for(De=ye.getElementsByName(pe),Me=0;Le=De[Me++];)if($e=Le.getAttributeNode("id"),$e&&$e.value===pe)return[Le]}return[]}}),L.find.TAG=function(pe,ye){return typeof ye.getElementsByTagName<"u"?ye.getElementsByTagName(pe):ye.querySelectorAll(pe)},L.find.CLASS=function(pe,ye){if(typeof ye.getElementsByClassName<"u"&&ee)return ye.getElementsByClassName(pe)},le=[],Js(function(pe){var ye;ne.appendChild(pe).innerHTML="<a id='"+be+"' href='' disabled='disabled'></a><select id='"+be+"-\r\\' disabled='disabled'><option selected=''></option></select>",pe.querySelectorAll("[selected]").length||le.push("\\["+R+"*(?:value|"+Ci+")"),pe.querySelectorAll("[id~="+be+"-]").length||le.push("~="),pe.querySelectorAll("a#"+be+"+*").length||le.push(".#.+[+~]"),pe.querySelectorAll(":checked").length||le.push(":checked"),ye=G.createElement("input"),ye.setAttribute("type","hidden"),pe.appendChild(ye).setAttribute("name","D"),ne.appendChild(pe).disabled=!0,pe.querySelectorAll(":disabled").length!==2&&le.push(":enabled",":disabled"),ye=G.createElement("input"),ye.setAttribute("name",""),pe.appendChild(ye),pe.querySelectorAll("[name='']").length||le.push("\\["+R+"*name"+R+"*="+R+`*(?:''|"")`)}),p.cssHas||le.push(":has"),le=le.length&&new RegExp(le.join("|")),dn=function(pe,ye){if(pe===ye)return j=!0,0;var $e=!pe.compareDocumentPosition-!ye.compareDocumentPosition;return $e||($e=(pe.ownerDocument||pe)==(ye.ownerDocument||ye)?pe.compareDocumentPosition(ye):1,$e&1||!p.sortDetached&&ye.compareDocumentPosition(pe)===$e?pe===G||pe.ownerDocument==z&&It.contains(z,pe)?-1:ye===G||ye.ownerDocument==z&&It.contains(z,ye)?1:D?a.call(D,pe)-a.call(D,ye):0:$e&4?-1:1)}),G}It.matches=function(X,oe){return It(X,null,null,oe)},It.matchesSelector=function(X,oe){if(Uo(X),ee&&!_n[oe+" "]&&(!le||!le.test(oe)))try{var de=ge.call(X,oe);if(de||p.disconnectedMatch||X.document&&X.document.nodeType!==11)return de}catch{_n(oe,!0)}return It(oe,G,null,[X]).length>0},It.contains=function(X,oe){return(X.ownerDocument||X)!=G&&Uo(X),m.contains(X,oe)},It.attr=function(X,oe){(X.ownerDocument||X)!=G&&Uo(X);var de=L.attrHandle[oe.toLowerCase()],pe=de&&u.call(L.attrHandle,oe.toLowerCase())?de(X,oe,!ee):void 0;return pe!==void 0?pe:X.getAttribute(oe)},It.error=function(X){throw new Error("Syntax error, unrecognized expression: "+X)},m.uniqueSort=function(X){var oe,de=[],pe=0,ye=0;if(j=!p.sortStable,D=!p.sortStable&&o.call(X,0),k.call(X,dn),j){for(;oe=X[ye++];)oe===X[ye]&&(pe=de.push(ye));for(;pe--;)O.call(X,de[pe],1)}return D=null,X},m.fn.uniqueSort=function(){return this.pushStack(m.uniqueSort(o.apply(this)))},L=m.expr={cacheLength:50,createPseudo:ri,match:$i,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(X){return X[1]=X[1].replace(no,ro),X[3]=(X[3]||X[4]||X[5]||"").replace(no,ro),X[2]==="~="&&(X[3]=" "+X[3]+" "),X.slice(0,4)},CHILD:function(X){return X[1]=X[1].toLowerCase(),X[1].slice(0,3)==="nth"?(X[3]||It.error(X[0]),X[4]=+(X[4]?X[5]+(X[6]||1):2*(X[3]==="even"||X[3]==="odd")),X[5]=+(X[7]+X[8]||X[3]==="odd")):X[3]&&It.error(X[0]),X},PSEUDO:function(X){var oe,de=!X[6]&&X[2];return $i.CHILD.test(X[0])?null:(X[3]?X[2]=X[4]||X[5]||"":de&&Ei.test(de)&&(oe=$d(de,!0))&&(oe=de.indexOf(")",de.length-oe)-de.length)&&(X[0]=X[0].slice(0,oe),X[2]=de.slice(0,oe)),X.slice(0,3))}},filter:{TAG:function(X){var oe=X.replace(no,ro).toLowerCase();return X==="*"?function(){return!0}:function(de){return M(de,oe)}},CLASS:function(X){var oe=tt[X+" "];return oe||(oe=new RegExp("(^|"+R+")"+X+"("+R+"|$)"))&&tt(X,function(de){return oe.test(typeof de.className=="string"&&de.className||typeof de.getAttribute<"u"&&de.getAttribute("class")||"")})},ATTR:function(X,oe,de){return function(pe){var ye=It.attr(pe,X);return ye==null?oe==="!=":oe?(ye+="",oe==="="?ye===de:oe==="!="?ye!==de:oe==="^="?de&&ye.indexOf(de)===0:oe==="*="?de&&ye.indexOf(de)>-1:oe==="$="?de&&ye.slice(-de.length)===de:oe==="~="?(" "+ye.replace(bt," ")+" ").indexOf(de)>-1:oe==="|="?ye===de||ye.slice(0,de.length+1)===de+"-":!1):!0}},CHILD:function(X,oe,de,pe,ye){var $e=X.slice(0,3)!=="nth",Me=X.slice(-4)!=="last",De=oe==="of-type";return pe===1&&ye===0?function(Le){return!!Le.parentNode}:function(Le,dt,Ze){var nt,ft,We,Ft,tr,Fn=$e!==Me?"nextSibling":"previousSibling",Fr=Le.parentNode,Ti=De&&Le.nodeName.toLowerCase(),el=!Ze&&!De,Hn=!1;if(Fr){if($e){for(;Fn;){for(We=Le;We=We[Fn];)if(De?M(We,Ti):We.nodeType===1)return!1;tr=Fn=X==="only"&&!tr&&"nextSibling"}return!0}if(tr=[Me?Fr.firstChild:Fr.lastChild],Me&&el){for(ft=Fr[be]||(Fr[be]={}),nt=ft[X]||[],Ft=nt[0]===fe&&nt[1],Hn=Ft&&nt[2],We=Ft&&Fr.childNodes[Ft];We=++Ft&&We&&We[Fn]||(Hn=Ft=0)||tr.pop();)if(We.nodeType===1&&++Hn&&We===Le){ft[X]=[fe,Ft,Hn];break}}else if(el&&(ft=Le[be]||(Le[be]={}),nt=ft[X]||[],Ft=nt[0]===fe&&nt[1],Hn=Ft),Hn===!1)for(;(We=++Ft&&We&&We[Fn]||(Hn=Ft=0)||tr.pop())&&!((De?M(We,Ti):We.nodeType===1)&&++Hn&&(el&&(ft=We[be]||(We[be]={}),ft[X]=[fe,Hn]),We===Le)););return Hn-=ye,Hn===pe||Hn%pe===0&&Hn/pe>=0}}},PSEUDO:function(X,oe){var de,pe=L.pseudos[X]||L.setFilters[X.toLowerCase()]||It.error("unsupported pseudo: "+X);return pe[be]?pe(oe):pe.length>1?(de=[X,X,"",oe],L.setFilters.hasOwnProperty(X.toLowerCase())?ri(function(ye,$e){for(var Me,De=pe(ye,oe),Le=De.length;Le--;)Me=a.call(ye,De[Le]),ye[Me]=!($e[Me]=De[Le])}):function(ye){return pe(ye,0,de)}):pe}},pseudos:{not:ri(function(X){var oe=[],de=[],pe=Ig(X.replace(A,"$1"));return pe[be]?ri(function(ye,$e,Me,De){for(var Le,dt=pe(ye,null,De,[]),Ze=ye.length;Ze--;)(Le=dt[Ze])&&(ye[Ze]=!($e[Ze]=Le))}):function(ye,$e,Me){return oe[0]=ye,pe(oe,null,Me,de),oe[0]=null,!de.pop()}}),has:ri(function(X){return function(oe){return It(X,oe).length>0}}),contains:ri(function(X){return X=X.replace(no,ro),function(oe){return(oe.textContent||m.text(oe)).indexOf(X)>-1}}),lang:ri(function(X){return Cu.test(X||"")||It.error("unsupported lang: "+X),X=X.replace(no,ro).toLowerCase(),function(oe){var de;do if(de=ee?oe.lang:oe.getAttribute("xml:lang")||oe.getAttribute("lang"))return de=de.toLowerCase(),de===X||de.indexOf(X+"-")===0;while((oe=oe.parentNode)&&oe.nodeType===1);return!1}}),target:function(X){var oe=t.location&&t.location.hash;return oe&&oe.slice(1)===X.id},root:function(X){return X===ne},focus:function(X){return X===GM()&&G.hasFocus()&&!!(X.type||X.href||~X.tabIndex)},enabled:yw(!1),disabled:yw(!0),checked:function(X){return M(X,"input")&&!!X.checked||M(X,"option")&&!!X.selected},selected:function(X){return X.parentNode&&X.parentNode.selectedIndex,X.selected===!0},empty:function(X){for(X=X.firstChild;X;X=X.nextSibling)if(X.nodeType<6)return!1;return!0},parent:function(X){return!L.pseudos.empty(X)},header:function(X){return Wo.test(X.nodeName)},input:function(X){return Vo.test(X.nodeName)},button:function(X){return M(X,"input")&&X.type==="button"||M(X,"button")},text:function(X){var oe;return M(X,"input")&&X.type==="text"&&((oe=X.getAttribute("type"))==null||oe.toLowerCase()==="text")},first:ja(function(){return[0]}),last:ja(function(X,oe){return[oe-1]}),eq:ja(function(X,oe,de){return[de<0?de+oe:de]}),even:ja(function(X,oe){for(var de=0;de<oe;de+=2)X.push(de);return X}),odd:ja(function(X,oe){for(var de=1;de<oe;de+=2)X.push(de);return X}),lt:ja(function(X,oe,de){var pe;for(de<0?pe=de+oe:de>oe?pe=oe:pe=de;--pe>=0;)X.push(pe);return X}),gt:ja(function(X,oe,de){for(var pe=de<0?de+oe:de;++pe<oe;)X.push(pe);return X})}},L.pseudos.nth=L.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})L.pseudos[_]=KM(_);for(_ in{submit:!0,reset:!0})L.pseudos[_]=qM(_);function bw(){}bw.prototype=L.filters=L.pseudos,L.setFilters=new bw;function $d(X,oe){var de,pe,ye,$e,Me,De,Le,dt=yt[X+" "];if(dt)return oe?0:dt.slice(0);for(Me=X,De=[],Le=L.preFilter;Me;){(!de||(pe=Zt.exec(Me)))&&(pe&&(Me=Me.slice(pe[0].length)||Me),De.push(ye=[])),de=!1,(pe=_u.exec(Me))&&(de=pe.shift(),ye.push({value:de,type:pe[0].replace(A," ")}),Me=Me.slice(de.length));for($e in L.filter)(pe=$i[$e].exec(Me))&&(!Le[$e]||(pe=Le[$e](pe)))&&(de=pe.shift(),ye.push({value:de,type:$e,matches:pe}),Me=Me.slice(de.length));if(!de)break}return oe?Me.length:Me?It.error(X):yt(X,De).slice(0)}function Td(X){for(var oe=0,de=X.length,pe="";oe<de;oe++)pe+=X[oe].value;return pe}function Ad(X,oe,de){var pe=oe.dir,ye=oe.next,$e=ye||pe,Me=de&&$e==="parentNode",De=ke++;return oe.first?function(Le,dt,Ze){for(;Le=Le[pe];)if(Le.nodeType===1||Me)return X(Le,dt,Ze);return!1}:function(Le,dt,Ze){var nt,ft,We=[fe,De];if(Ze){for(;Le=Le[pe];)if((Le.nodeType===1||Me)&&X(Le,dt,Ze))return!0}else for(;Le=Le[pe];)if(Le.nodeType===1||Me)if(ft=Le[be]||(Le[be]={}),ye&&M(Le,ye))Le=Le[pe]||Le;else{if((nt=ft[$e])&&nt[0]===fe&&nt[1]===De)return We[2]=nt[2];if(ft[$e]=We,We[2]=X(Le,dt,Ze))return!0}return!1}}function Lg(X){return X.length>1?function(oe,de,pe){for(var ye=X.length;ye--;)if(!X[ye](oe,de,pe))return!1;return!0}:X[0]}function YM(X,oe,de){for(var pe=0,ye=oe.length;pe<ye;pe++)It(X,oe[pe],de);return de}function Md(X,oe,de,pe,ye){for(var $e,Me=[],De=0,Le=X.length,dt=oe!=null;De<Le;De++)($e=X[De])&&(!de||de($e,pe,ye))&&(Me.push($e),dt&&oe.push(De));return Me}function Rg(X,oe,de,pe,ye,$e){return pe&&!pe[be]&&(pe=Rg(pe)),ye&&!ye[be]&&(ye=Rg(ye,$e)),ri(function(Me,De,Le,dt){var Ze,nt,ft,We,Ft=[],tr=[],Fn=De.length,Fr=Me||YM(oe||"*",Le.nodeType?[Le]:Le,[]),Ti=X&&(Me||!oe)?Md(Fr,Ft,X,Le,dt):Fr;if(de?(We=ye||(Me?X:Fn||pe)?[]:De,de(Ti,We,Le,dt)):We=Ti,pe)for(Ze=Md(We,tr),pe(Ze,[],Le,dt),nt=Ze.length;nt--;)(ft=Ze[nt])&&(We[tr[nt]]=!(Ti[tr[nt]]=ft));if(Me){if(ye||X){if(ye){for(Ze=[],nt=We.length;nt--;)(ft=We[nt])&&Ze.push(Ti[nt]=ft);ye(null,We=[],Ze,dt)}for(nt=We.length;nt--;)(ft=We[nt])&&(Ze=ye?a.call(Me,ft):Ft[nt])>-1&&(Me[Ze]=!(De[Ze]=ft))}}else We=Md(We===De?We.splice(Fn,We.length):We),ye?ye(null,De,We,dt):H.apply(De,We)})}function Pg(X){for(var oe,de,pe,ye=X.length,$e=L.relative[X[0].type],Me=$e||L.relative[" "],De=$e?1:0,Le=Ad(function(nt){return nt===oe},Me,!0),dt=Ad(function(nt){return a.call(oe,nt)>-1},Me,!0),Ze=[function(nt,ft,We){var Ft=!$e&&(We||ft!=F)||((oe=ft).nodeType?Le(nt,ft,We):dt(nt,ft,We));return oe=null,Ft}];De<ye;De++)if(de=L.relative[X[De].type])Ze=[Ad(Lg(Ze),de)];else{if(de=L.filter[X[De].type].apply(null,X[De].matches),de[be]){for(pe=++De;pe<ye&&!L.relative[X[pe].type];pe++);return Rg(De>1&&Lg(Ze),De>1&&Td(X.slice(0,De-1).concat({value:X[De-2].type===" "?"*":""})).replace(A,"$1"),de,De<pe&&Pg(X.slice(De,pe)),pe<ye&&Pg(X=X.slice(pe)),pe<ye&&Td(X))}Ze.push(de)}return Lg(Ze)}function XM(X,oe){var de=oe.length>0,pe=X.length>0,ye=function($e,Me,De,Le,dt){var Ze,nt,ft,We=0,Ft="0",tr=$e&&[],Fn=[],Fr=F,Ti=$e||pe&&L.find.TAG("*",dt),el=fe+=Fr==null?1:Math.random()||.1,Hn=Ti.length;for(dt&&(F=Me==G||Me||dt);Ft!==Hn&&(Ze=Ti[Ft])!=null;Ft++){if(pe&&Ze){for(nt=0,!Me&&Ze.ownerDocument!=G&&(Uo(Ze),De=!ee);ft=X[nt++];)if(ft(Ze,Me||G,De)){H.call(Le,Ze);break}dt&&(fe=el)}de&&((Ze=!ft&&Ze)&&We--,$e&&tr.push(Ze))}if(We+=Ft,de&&Ft!==We){for(nt=0;ft=oe[nt++];)ft(tr,Fn,Me,De);if($e){if(We>0)for(;Ft--;)tr[Ft]||Fn[Ft]||(Fn[Ft]=C.call(Le));Fn=Md(Fn)}H.apply(Le,Fn),dt&&!$e&&Fn.length>0&&We+oe.length>1&&m.uniqueSort(Le)}return dt&&(fe=el,F=Fr),tr};return de?ri(ye):ye}function Ig(X,oe){var de,pe=[],ye=[],$e=st[X+" "];if(!$e){for(oe||(oe=$d(X)),de=oe.length;de--;)$e=Pg(oe[de]),$e[be]?pe.push($e):ye.push($e);$e=st(X,XM(ye,pe)),$e.selector=X}return $e}function ww(X,oe,de,pe){var ye,$e,Me,De,Le,dt=typeof X=="function"&&X,Ze=!pe&&$d(X=dt.selector||X);if(de=de||[],Ze.length===1){if($e=Ze[0]=Ze[0].slice(0),$e.length>2&&(Me=$e[0]).type==="ID"&&oe.nodeType===9&&ee&&L.relative[$e[1].type]){if(oe=(L.find.ID(Me.matches[0].replace(no,ro),oe)||[])[0],oe)dt&&(oe=oe.parentNode);else return de;X=X.slice($e.shift().value.length)}for(ye=$i.needsContext.test(X)?0:$e.length;ye--&&(Me=$e[ye],!L.relative[De=Me.type]);)if((Le=L.find[De])&&(pe=Le(Me.matches[0].replace(no,ro),Ag.test($e[0].type)&&Mg(oe.parentNode)||oe))){if($e.splice(ye,1),X=pe.length&&Td($e),!X)return H.apply(de,pe),de;break}}return(dt||Ig(X,Ze))(pe,oe,!ee,de,!oe||Ag.test(X)&&Mg(oe.parentNode)||oe),de}p.sortStable=be.split("").sort(dn).join("")===be,Uo(),p.sortDetached=Js(function(X){return X.compareDocumentPosition(G.createElement("fieldset"))&1}),m.find=It,m.expr[":"]=m.expr.pseudos,m.unique=m.uniqueSort,It.compile=Ig,It.select=ww,It.setDocument=Uo,It.escape=m.escapeSelector,It.getText=m.text,It.isXML=m.isXMLDoc,It.selectors=m.expr,It.support=m.support,It.uniqueSort=m.uniqueSort})();var V=function(_,L,F){for(var D=[],j=F!==void 0;(_=_[L])&&_.nodeType!==9;)if(_.nodeType===1){if(j&&m(_).is(F))break;D.push(_)}return D},K=function(_,L){for(var F=[];_;_=_.nextSibling)_.nodeType===1&&_!==L&&F.push(_);return F},q=m.expr.match.needsContext,re=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Y(_,L,F){return g(L)?m.grep(_,function(D,j){return!!L.call(D,j,D)!==F}):L.nodeType?m.grep(_,function(D){return D===L!==F}):typeof L!="string"?m.grep(_,function(D){return a.call(L,D)>-1!==F}):m.filter(L,_,F)}m.filter=function(_,L,F){var D=L[0];return F&&(_=":not("+_+")"),L.length===1&&D.nodeType===1?m.find.matchesSelector(D,_)?[D]:[]:m.find.matches(_,m.grep(L,function(j){return j.nodeType===1}))},m.fn.extend({find:function(_){var L,F,D=this.length,j=this;if(typeof _!="string")return this.pushStack(m(_).filter(function(){for(L=0;L<D;L++)if(m.contains(j[L],this))return!0}));for(F=this.pushStack([]),L=0;L<D;L++)m.find(_,j[L],F);return D>1?m.uniqueSort(F):F},filter:function(_){return this.pushStack(Y(this,_||[],!1))},not:function(_){return this.pushStack(Y(this,_||[],!0))},is:function(_){return!!Y(this,typeof _=="string"&&q.test(_)?m(_):_||[],!1).length}});var Z,te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,ie=m.fn.init=function(_,L,F){var D,j;if(!_)return this;if(F=F||Z,typeof _=="string")if(_[0]==="<"&&_[_.length-1]===">"&&_.length>=3?D=[null,_,null]:D=te.exec(_),D&&(D[1]||!L))if(D[1]){if(L=L instanceof m?L[0]:L,m.merge(this,m.parseHTML(D[1],L&&L.nodeType?L.ownerDocument||L:x,!0)),re.test(D[1])&&m.isPlainObject(L))for(D in L)g(this[D])?this[D](L[D]):this.attr(D,L[D]);return this}else return j=x.getElementById(D[2]),j&&(this[0]=j,this.length=1),this;else return!L||L.jquery?(L||F).find(_):this.constructor(L).find(_);else{if(_.nodeType)return this[0]=_,this.length=1,this;if(g(_))return F.ready!==void 0?F.ready(_):_(m)}return m.makeArray(_,this)};ie.prototype=m.fn,Z=m(x);var ce=/^(?:parents|prev(?:Until|All))/,he={children:!0,contents:!0,next:!0,prev:!0};m.fn.extend({has:function(_){var L=m(_,this),F=L.length;return this.filter(function(){for(var D=0;D<F;D++)if(m.contains(this,L[D]))return!0})},closest:function(_,L){var F,D=0,j=this.length,H=[],G=typeof _!="string"&&m(_);if(!q.test(_)){for(;D<j;D++)for(F=this[D];F&&F!==L;F=F.parentNode)if(F.nodeType<11&&(G?G.index(F)>-1:F.nodeType===1&&m.find.matchesSelector(F,_))){H.push(F);break}}return this.pushStack(H.length>1?m.uniqueSort(H):H)},index:function(_){return _?typeof _=="string"?a.call(m(_),this[0]):a.call(this,_.jquery?_[0]:_):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(_,L){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(_,L))))},addBack:function(_){return this.add(_==null?this.prevObject:this.prevObject.filter(_))}});function ve(_,L){for(;(_=_[L])&&_.nodeType!==1;);return _}m.each({parent:function(_){var L=_.parentNode;return L&&L.nodeType!==11?L:null},parents:function(_){return V(_,"parentNode")},parentsUntil:function(_,L,F){return V(_,"parentNode",F)},next:function(_){return ve(_,"nextSibling")},prev:function(_){return ve(_,"previousSibling")},nextAll:function(_){return V(_,"nextSibling")},prevAll:function(_){return V(_,"previousSibling")},nextUntil:function(_,L,F){return V(_,"nextSibling",F)},prevUntil:function(_,L,F){return V(_,"previousSibling",F)},siblings:function(_){return K((_.parentNode||{}).firstChild,_)},children:function(_){return K(_.firstChild)},contents:function(_){return _.contentDocument!=null&&i(_.contentDocument)?_.contentDocument:(M(_,"template")&&(_=_.content||_),m.merge([],_.childNodes))}},function(_,L){m.fn[_]=function(F,D){var j=m.map(this,L,F);return _.slice(-5)!=="Until"&&(D=F),D&&typeof D=="string"&&(j=m.filter(D,j)),this.length>1&&(he[_]||m.uniqueSort(j),ce.test(_)&&j.reverse()),this.pushStack(j)}});var Ce=/[^\x20\t\r\n\f]+/g;function _e(_){var L={};return m.each(_.match(Ce)||[],function(F,D){L[D]=!0}),L}m.Callbacks=function(_){_=typeof _=="string"?_e(_):m.extend({},_);var L,F,D,j,H=[],G=[],ne=-1,ee=function(){for(j=j||_.once,D=L=!0;G.length;ne=-1)for(F=G.shift();++ne<H.length;)H[ne].apply(F[0],F[1])===!1&&_.stopOnFalse&&(ne=H.length,F=!1);_.memory||(F=!1),L=!1,j&&(F?H=[]:H="")},le={add:function(){return H&&(F&&!L&&(ne=H.length-1,G.push(F)),function ge(be){m.each(be,function(fe,ke){g(ke)?(!_.unique||!le.has(ke))&&H.push(ke):ke&&ke.length&&v(ke)!=="string"&&ge(ke)})}(arguments),F&&!L&&ee()),this},remove:function(){return m.each(arguments,function(ge,be){for(var fe;(fe=m.inArray(be,H,fe))>-1;)H.splice(fe,1),fe<=ne&&ne--}),this},has:function(ge){return ge?m.inArray(ge,H)>-1:H.length>0},empty:function(){return H&&(H=[]),this},disable:function(){return j=G=[],H=F="",this},disabled:function(){return!H},lock:function(){return j=G=[],!F&&!L&&(H=F=""),this},locked:function(){return!!j},fireWith:function(ge,be){return j||(be=be||[],be=[ge,be.slice?be.slice():be],G.push(be),L||ee()),this},fire:function(){return le.fireWith(this,arguments),this},fired:function(){return!!D}};return le};function Re(_){return _}function ot(_){throw _}function Te(_,L,F,D){var j;try{_&&g(j=_.promise)?j.call(_).done(L).fail(F):_&&g(j=_.then)?j.call(_,L,F):L.apply(void 0,[_].slice(D))}catch(H){F.apply(void 0,[H])}}m.extend({Deferred:function(_){var L=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],F="pending",D={state:function(){return F},always:function(){return j.done(arguments).fail(arguments),this},catch:function(H){return D.then(null,H)},pipe:function(){var H=arguments;return m.Deferred(function(G){m.each(L,function(ne,ee){var le=g(H[ee[4]])&&H[ee[4]];j[ee[1]](function(){var ge=le&&le.apply(this,arguments);ge&&g(ge.promise)?ge.promise().progress(G.notify).done(G.resolve).fail(G.reject):G[ee[0]+"With"](this,le?[ge]:arguments)})}),H=null}).promise()},then:function(H,G,ne){var ee=0;function le(ge,be,fe,ke){return function(){var tt=this,yt=arguments,st=function(){var dn,Ci;if(!(ge<ee)){if(dn=fe.apply(tt,yt),dn===be.promise())throw new TypeError("Thenable self-resolution");Ci=dn&&(typeof dn=="object"||typeof dn=="function")&&dn.then,g(Ci)?ke?Ci.call(dn,le(ee,be,Re,ke),le(ee,be,ot,ke)):(ee++,Ci.call(dn,le(ee,be,Re,ke),le(ee,be,ot,ke),le(ee,be,Re,be.notifyWith))):(fe!==Re&&(tt=void 0,yt=[dn]),(ke||be.resolveWith)(tt,yt))}},_n=ke?st:function(){try{st()}catch(dn){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(dn,_n.error),ge+1>=ee&&(fe!==ot&&(tt=void 0,yt=[dn]),be.rejectWith(tt,yt))}};ge?_n():(m.Deferred.getErrorHook?_n.error=m.Deferred.getErrorHook():m.Deferred.getStackHook&&(_n.error=m.Deferred.getStackHook()),t.setTimeout(_n))}}return m.Deferred(function(ge){L[0][3].add(le(0,ge,g(ne)?ne:Re,ge.notifyWith)),L[1][3].add(le(0,ge,g(H)?H:Re)),L[2][3].add(le(0,ge,g(G)?G:ot))}).promise()},promise:function(H){return H!=null?m.extend(H,D):D}},j={};return m.each(L,function(H,G){var ne=G[2],ee=G[5];D[G[1]]=ne.add,ee&&ne.add(function(){F=ee},L[3-H][2].disable,L[3-H][3].disable,L[0][2].lock,L[0][3].lock),ne.add(G[3].fire),j[G[0]]=function(){return j[G[0]+"With"](this===j?void 0:this,arguments),this},j[G[0]+"With"]=ne.fireWith}),D.promise(j),_&&_.call(j,j),j},when:function(_){var L=arguments.length,F=L,D=Array(F),j=o.call(arguments),H=m.Deferred(),G=function(ne){return function(ee){D[ne]=this,j[ne]=arguments.length>1?o.call(arguments):ee,--L||H.resolveWith(D,j)}};if(L<=1&&(Te(_,H.done(G(F)).resolve,H.reject,!L),H.state()==="pending"||g(j[F]&&j[F].then)))return H.then();for(;F--;)Te(j[F],G(F),H.reject);return H.promise()}});var it=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(_,L){t.console&&t.console.warn&&_&&it.test(_.name)&&t.console.warn("jQuery.Deferred exception: "+_.message,_.stack,L)},m.readyException=function(_){t.setTimeout(function(){throw _})};var vt=m.Deferred();m.fn.ready=function(_){return vt.then(_).catch(function(L){m.readyException(L)}),this},m.extend({isReady:!1,readyWait:1,ready:function(_){(_===!0?--m.readyWait:m.isReady)||(m.isReady=!0,!(_!==!0&&--m.readyWait>0)&&vt.resolveWith(x,[m]))}}),m.ready.then=vt.then;function Qt(){x.removeEventListener("DOMContentLoaded",Qt),t.removeEventListener("load",Qt),m.ready()}x.readyState==="complete"||x.readyState!=="loading"&&!x.documentElement.doScroll?t.setTimeout(m.ready):(x.addEventListener("DOMContentLoaded",Qt),t.addEventListener("load",Qt));var Ut=function(_,L,F,D,j,H,G){var ne=0,ee=_.length,le=F==null;if(v(F)==="object"){j=!0;for(ne in F)Ut(_,L,ne,F[ne],!0,H,G)}else if(D!==void 0&&(j=!0,g(D)||(G=!0),le&&(G?(L.call(_,D),L=null):(le=L,L=function(ge,be,fe){return le.call(m(ge),fe)})),L))for(;ne<ee;ne++)L(_[ne],F,G?D:D.call(_[ne],ne,L(_[ne],F)));return j?_:le?L.call(_):ee?L(_[0],F):H},Tr=/^-ms-/,Ln=/-([a-z])/g;function Qn(_,L){return L.toUpperCase()}function Ht(_){return _.replace(Tr,"ms-").replace(Ln,Qn)}var me=function(_){return _.nodeType===1||_.nodeType===9||!+_.nodeType};function Ae(){this.expando=m.expando+Ae.uid++}Ae.uid=1,Ae.prototype={cache:function(_){var L=_[this.expando];return L||(L={},me(_)&&(_.nodeType?_[this.expando]=L:Object.defineProperty(_,this.expando,{value:L,configurable:!0}))),L},set:function(_,L,F){var D,j=this.cache(_);if(typeof L=="string")j[Ht(L)]=F;else for(D in L)j[Ht(D)]=L[D];return j},get:function(_,L){return L===void 0?this.cache(_):_[this.expando]&&_[this.expando][Ht(L)]},access:function(_,L,F){return L===void 0||L&&typeof L=="string"&&F===void 0?this.get(_,L):(this.set(_,L,F),F!==void 0?F:L)},remove:function(_,L){var F,D=_[this.expando];if(D!==void 0){if(L!==void 0)for(Array.isArray(L)?L=L.map(Ht):(L=Ht(L),L=L in D?[L]:L.match(Ce)||[]),F=L.length;F--;)delete D[L[F]];(L===void 0||m.isEmptyObject(D))&&(_.nodeType?_[this.expando]=void 0:delete _[this.expando])}},hasData:function(_){var L=_[this.expando];return L!==void 0&&!m.isEmptyObject(L)}};var we=new Ae,He=new Ae,ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xe=/[A-Z]/g;function Fe(_){return _==="true"?!0:_==="false"?!1:_==="null"?null:_===+_+""?+_:ct.test(_)?JSON.parse(_):_}function Ne(_,L,F){var D;if(F===void 0&&_.nodeType===1)if(D="data-"+L.replace(xe,"-$&").toLowerCase(),F=_.getAttribute(D),typeof F=="string"){try{F=Fe(F)}catch{}He.set(_,L,F)}else F=void 0;return F}m.extend({hasData:function(_){return He.hasData(_)||we.hasData(_)},data:function(_,L,F){return He.access(_,L,F)},removeData:function(_,L){He.remove(_,L)},_data:function(_,L,F){return we.access(_,L,F)},_removeData:function(_,L){we.remove(_,L)}}),m.fn.extend({data:function(_,L){var F,D,j,H=this[0],G=H&&H.attributes;if(_===void 0){if(this.length&&(j=He.get(H),H.nodeType===1&&!we.get(H,"hasDataAttrs"))){for(F=G.length;F--;)G[F]&&(D=G[F].name,D.indexOf("data-")===0&&(D=Ht(D.slice(5)),Ne(H,D,j[D])));we.set(H,"hasDataAttrs",!0)}return j}return typeof _=="object"?this.each(function(){He.set(this,_)}):Ut(this,function(ne){var ee;if(H&&ne===void 0)return ee=He.get(H,_),ee!==void 0||(ee=Ne(H,_),ee!==void 0)?ee:void 0;this.each(function(){He.set(this,_,ne)})},null,L,arguments.length>1,null,!0)},removeData:function(_){return this.each(function(){He.remove(this,_)})}}),m.extend({queue:function(_,L,F){var D;if(_)return L=(L||"fx")+"queue",D=we.get(_,L),F&&(!D||Array.isArray(F)?D=we.access(_,L,m.makeArray(F)):D.push(F)),D||[]},dequeue:function(_,L){L=L||"fx";var F=m.queue(_,L),D=F.length,j=F.shift(),H=m._queueHooks(_,L),G=function(){m.dequeue(_,L)};j==="inprogress"&&(j=F.shift(),D--),j&&(L==="fx"&&F.unshift("inprogress"),delete H.stop,j.call(_,G,H)),!D&&H&&H.empty.fire()},_queueHooks:function(_,L){var F=L+"queueHooks";return we.get(_,F)||we.access(_,F,{empty:m.Callbacks("once memory").add(function(){we.remove(_,[L+"queue",F])})})}}),m.fn.extend({queue:function(_,L){var F=2;return typeof _!="string"&&(L=_,_="fx",F--),arguments.length<F?m.queue(this[0],_):L===void 0?this:this.each(function(){var D=m.queue(this,_,L);m._queueHooks(this,_),_==="fx"&&D[0]!=="inprogress"&&m.dequeue(this,_)})},dequeue:function(_){return this.each(function(){m.dequeue(this,_)})},clearQueue:function(_){return this.queue(_||"fx",[])},promise:function(_,L){var F,D=1,j=m.Deferred(),H=this,G=this.length,ne=function(){--D||j.resolveWith(H,[H])};for(typeof _!="string"&&(L=_,_=void 0),_=_||"fx";G--;)F=we.get(H[G],_+"queueHooks"),F&&F.empty&&(D++,F.empty.add(ne));return ne(),j.promise(L)}});var Ye=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,et=new RegExp("^(?:([+-])=|)("+Ye+")([a-z%]*)$","i"),kt=["Top","Right","Bottom","Left"],on=x.documentElement,Rn=function(_){return m.contains(_.ownerDocument,_)},Ar={composed:!0};on.getRootNode&&(Rn=function(_){return m.contains(_.ownerDocument,_)||_.getRootNode(Ar)===_.ownerDocument});var Mr=function(_,L){return _=L||_,_.style.display==="none"||_.style.display===""&&Rn(_)&&m.css(_,"display")==="none"};function Rs(_,L,F,D){var j,H,G=20,ne=D?function(){return D.cur()}:function(){return m.css(_,L,"")},ee=ne(),le=F&&F[3]||(m.cssNumber[L]?"":"px"),ge=_.nodeType&&(m.cssNumber[L]||le!=="px"&&+ee)&&et.exec(m.css(_,L));if(ge&&ge[3]!==le){for(ee=ee/2,le=le||ge[3],ge=+ee||1;G--;)m.style(_,L,ge+le),(1-H)*(1-(H=ne()/ee||.5))<=0&&(G=0),ge=ge/H;ge=ge*2,m.style(_,L,ge+le),F=F||[]}return F&&(ge=+ge||+ee||0,j=F[1]?ge+(F[1]+1)*F[2]:+F[2],D&&(D.unit=le,D.start=ge,D.end=j)),j}var hr={};function Ps(_){var L,F=_.ownerDocument,D=_.nodeName,j=hr[D];return j||(L=F.body.appendChild(F.createElement(D)),j=m.css(L,"display"),L.parentNode.removeChild(L),j==="none"&&(j="block"),hr[D]=j,j)}function Qr(_,L){for(var F,D,j=[],H=0,G=_.length;H<G;H++)D=_[H],D.style&&(F=D.style.display,L?(F==="none"&&(j[H]=we.get(D,"display")||null,j[H]||(D.style.display="")),D.style.display===""&&Mr(D)&&(j[H]=Ps(D))):F!=="none"&&(j[H]="none",we.set(D,"display",F)));for(H=0;H<G;H++)j[H]!=null&&(_[H].style.display=j[H]);return _}m.fn.extend({show:function(){return Qr(this,!0)},hide:function(){return Qr(this)},toggle:function(_){return typeof _=="boolean"?_?this.show():this.hide():this.each(function(){Mr(this)?m(this).show():m(this).hide()})}});var pr=/^(?:checkbox|radio)$/i,Po=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Pn=/^$|^module$|\/(?:java|ecma)script/i;(function(){var _=x.createDocumentFragment(),L=_.appendChild(x.createElement("div")),F=x.createElement("input");F.setAttribute("type","radio"),F.setAttribute("checked","checked"),F.setAttribute("name","t"),L.appendChild(F),p.checkClone=L.cloneNode(!0).cloneNode(!0).lastChild.checked,L.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!L.cloneNode(!0).lastChild.defaultValue,L.innerHTML="<option></option>",p.option=!!L.lastChild})();var mn={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};mn.tbody=mn.tfoot=mn.colgroup=mn.caption=mn.thead,mn.th=mn.td,p.option||(mn.optgroup=mn.option=[1,"<select multiple='multiple'>","</select>"]);function an(_,L){var F;return typeof _.getElementsByTagName<"u"?F=_.getElementsByTagName(L||"*"):typeof _.querySelectorAll<"u"?F=_.querySelectorAll(L||"*"):F=[],L===void 0||L&&M(_,L)?m.merge([_],F):F}function qi(_,L){for(var F=0,D=_.length;F<D;F++)we.set(_[F],"globalEval",!L||we.get(L[F],"globalEval"))}var Yi=/<|&#?\w+;/;function Is(_,L,F,D,j){for(var H,G,ne,ee,le,ge,be=L.createDocumentFragment(),fe=[],ke=0,tt=_.length;ke<tt;ke++)if(H=_[ke],H||H===0)if(v(H)==="object")m.merge(fe,H.nodeType?[H]:H);else if(!Yi.test(H))fe.push(L.createTextNode(H));else{for(G=G||be.appendChild(L.createElement("div")),ne=(Po.exec(H)||["",""])[1].toLowerCase(),ee=mn[ne]||mn._default,G.innerHTML=ee[1]+m.htmlPrefilter(H)+ee[2],ge=ee[0];ge--;)G=G.lastChild;m.merge(fe,G.childNodes),G=be.firstChild,G.textContent=""}for(be.textContent="",ke=0;H=fe[ke++];){if(D&&m.inArray(H,D)>-1){j&&j.push(H);continue}if(le=Rn(H),G=an(be.appendChild(H),"script"),le&&qi(G),F)for(ge=0;H=G[ge++];)Pn.test(H.type||"")&&F.push(H)}return be}var Zn=/^([^.]*)(?:\.(.+)|)/;function yi(){return!0}function bi(){return!1}function Aa(_,L,F,D,j,H){var G,ne;if(typeof L=="object"){typeof F!="string"&&(D=D||F,F=void 0);for(ne in L)Aa(_,ne,F,D,L[ne],H);return _}if(D==null&&j==null?(j=F,D=F=void 0):j==null&&(typeof F=="string"?(j=D,D=void 0):(j=D,D=F,F=void 0)),j===!1)j=bi;else if(!j)return _;return H===1&&(G=j,j=function(ee){return m().off(ee),G.apply(this,arguments)},j.guid=G.guid||(G.guid=m.guid++)),_.each(function(){m.event.add(this,L,j,D,F)})}m.event={global:{},add:function(_,L,F,D,j){var H,G,ne,ee,le,ge,be,fe,ke,tt,yt,st=we.get(_);if(me(_))for(F.handler&&(H=F,F=H.handler,j=H.selector),j&&m.find.matchesSelector(on,j),F.guid||(F.guid=m.guid++),(ee=st.events)||(ee=st.events=Object.create(null)),(G=st.handle)||(G=st.handle=function(_n){return typeof m<"u"&&m.event.triggered!==_n.type?m.event.dispatch.apply(_,arguments):void 0}),L=(L||"").match(Ce)||[""],le=L.length;le--;)ne=Zn.exec(L[le])||[],ke=yt=ne[1],tt=(ne[2]||"").split(".").sort(),ke&&(be=m.event.special[ke]||{},ke=(j?be.delegateType:be.bindType)||ke,be=m.event.special[ke]||{},ge=m.extend({type:ke,origType:yt,data:D,handler:F,guid:F.guid,selector:j,needsContext:j&&m.expr.match.needsContext.test(j),namespace:tt.join(".")},H),(fe=ee[ke])||(fe=ee[ke]=[],fe.delegateCount=0,(!be.setup||be.setup.call(_,D,tt,G)===!1)&&_.addEventListener&&_.addEventListener(ke,G)),be.add&&(be.add.call(_,ge),ge.handler.guid||(ge.handler.guid=F.guid)),j?fe.splice(fe.delegateCount++,0,ge):fe.push(ge),m.event.global[ke]=!0)},remove:function(_,L,F,D,j){var H,G,ne,ee,le,ge,be,fe,ke,tt,yt,st=we.hasData(_)&&we.get(_);if(!(!st||!(ee=st.events))){for(L=(L||"").match(Ce)||[""],le=L.length;le--;){if(ne=Zn.exec(L[le])||[],ke=yt=ne[1],tt=(ne[2]||"").split(".").sort(),!ke){for(ke in ee)m.event.remove(_,ke+L[le],F,D,!0);continue}for(be=m.event.special[ke]||{},ke=(D?be.delegateType:be.bindType)||ke,fe=ee[ke]||[],ne=ne[2]&&new RegExp("(^|\\.)"+tt.join("\\.(?:.*\\.|)")+"(\\.|$)"),G=H=fe.length;H--;)ge=fe[H],(j||yt===ge.origType)&&(!F||F.guid===ge.guid)&&(!ne||ne.test(ge.namespace))&&(!D||D===ge.selector||D==="**"&&ge.selector)&&(fe.splice(H,1),ge.selector&&fe.delegateCount--,be.remove&&be.remove.call(_,ge));G&&!fe.length&&((!be.teardown||be.teardown.call(_,tt,st.handle)===!1)&&m.removeEvent(_,ke,st.handle),delete ee[ke])}m.isEmptyObject(ee)&&we.remove(_,"handle events")}},dispatch:function(_){var L,F,D,j,H,G,ne=new Array(arguments.length),ee=m.event.fix(_),le=(we.get(this,"events")||Object.create(null))[ee.type]||[],ge=m.event.special[ee.type]||{};for(ne[0]=ee,L=1;L<arguments.length;L++)ne[L]=arguments[L];if(ee.delegateTarget=this,!(ge.preDispatch&&ge.preDispatch.call(this,ee)===!1)){for(G=m.event.handlers.call(this,ee,le),L=0;(j=G[L++])&&!ee.isPropagationStopped();)for(ee.currentTarget=j.elem,F=0;(H=j.handlers[F++])&&!ee.isImmediatePropagationStopped();)(!ee.rnamespace||H.namespace===!1||ee.rnamespace.test(H.namespace))&&(ee.handleObj=H,ee.data=H.data,D=((m.event.special[H.origType]||{}).handle||H.handler).apply(j.elem,ne),D!==void 0&&(ee.result=D)===!1&&(ee.preventDefault(),ee.stopPropagation()));return ge.postDispatch&&ge.postDispatch.call(this,ee),ee.result}},handlers:function(_,L){var F,D,j,H,G,ne=[],ee=L.delegateCount,le=_.target;if(ee&&le.nodeType&&!(_.type==="click"&&_.button>=1)){for(;le!==this;le=le.parentNode||this)if(le.nodeType===1&&!(_.type==="click"&&le.disabled===!0)){for(H=[],G={},F=0;F<ee;F++)D=L[F],j=D.selector+" ",G[j]===void 0&&(G[j]=D.needsContext?m(j,this).index(le)>-1:m.find(j,this,null,[le]).length),G[j]&&H.push(D);H.length&&ne.push({elem:le,handlers:H})}}return le=this,ee<L.length&&ne.push({elem:le,handlers:L.slice(ee)}),ne},addProp:function(_,L){Object.defineProperty(m.Event.prototype,_,{enumerable:!0,configurable:!0,get:g(L)?function(){if(this.originalEvent)return L(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[_]},set:function(F){Object.defineProperty(this,_,{enumerable:!0,configurable:!0,writable:!0,value:F})}})},fix:function(_){return _[m.expando]?_:new m.Event(_)},special:{load:{noBubble:!0},click:{setup:function(_){var L=this||_;return pr.test(L.type)&&L.click&&M(L,"input")&&Xi(L,"click",!0),!1},trigger:function(_){var L=this||_;return pr.test(L.type)&&L.click&&M(L,"input")&&Xi(L,"click"),!0},_default:function(_){var L=_.target;return pr.test(L.type)&&L.click&&M(L,"input")&&we.get(L,"click")||M(L,"a")}},beforeunload:{postDispatch:function(_){_.result!==void 0&&_.originalEvent&&(_.originalEvent.returnValue=_.result)}}}};function Xi(_,L,F){if(!F){we.get(_,L)===void 0&&m.event.add(_,L,yi);return}we.set(_,L,!1),m.event.add(_,L,{namespace:!1,handler:function(D){var j,H=we.get(this,L);if(D.isTrigger&1&&this[L]){if(H)(m.event.special[L]||{}).delegateType&&D.stopPropagation();else if(H=o.call(arguments),we.set(this,L,H),this[L](),j=we.get(this,L),we.set(this,L,!1),H!==j)return D.stopImmediatePropagation(),D.preventDefault(),j}else H&&(we.set(this,L,m.event.trigger(H[0],H.slice(1),this)),D.stopPropagation(),D.isImmediatePropagationStopped=yi)}})}m.removeEvent=function(_,L,F){_.removeEventListener&&_.removeEventListener(L,F)},m.Event=function(_,L){if(!(this instanceof m.Event))return new m.Event(_,L);_&&_.type?(this.originalEvent=_,this.type=_.type,this.isDefaultPrevented=_.defaultPrevented||_.defaultPrevented===void 0&&_.returnValue===!1?yi:bi,this.target=_.target&&_.target.nodeType===3?_.target.parentNode:_.target,this.currentTarget=_.currentTarget,this.relatedTarget=_.relatedTarget):this.type=_,L&&m.extend(this,L),this.timeStamp=_&&_.timeStamp||Date.now(),this[m.expando]=!0},m.Event.prototype={constructor:m.Event,isDefaultPrevented:bi,isPropagationStopped:bi,isImmediatePropagationStopped:bi,isSimulated:!1,preventDefault:function(){var _=this.originalEvent;this.isDefaultPrevented=yi,_&&!this.isSimulated&&_.preventDefault()},stopPropagation:function(){var _=this.originalEvent;this.isPropagationStopped=yi,_&&!this.isSimulated&&_.stopPropagation()},stopImmediatePropagation:function(){var _=this.originalEvent;this.isImmediatePropagationStopped=yi,_&&!this.isSimulated&&_.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},m.event.addProp),m.each({focus:"focusin",blur:"focusout"},function(_,L){function F(D){if(x.documentMode){var j=we.get(this,"handle"),H=m.event.fix(D);H.type=D.type==="focusin"?"focus":"blur",H.isSimulated=!0,j(D),H.target===H.currentTarget&&j(H)}else m.event.simulate(L,D.target,m.event.fix(D))}m.event.special[_]={setup:function(){var D;if(Xi(this,_,!0),x.documentMode)D=we.get(this,L),D||this.addEventListener(L,F),we.set(this,L,(D||0)+1);else return!1},trigger:function(){return Xi(this,_),!0},teardown:function(){var D;if(x.documentMode)D=we.get(this,L)-1,D?we.set(this,L,D):(this.removeEventListener(L,F),we.remove(this,L));else return!1},_default:function(D){return we.get(D.target,_)},delegateType:L},m.event.special[L]={setup:function(){var D=this.ownerDocument||this.document||this,j=x.documentMode?this:D,H=we.get(j,L);H||(x.documentMode?this.addEventListener(L,F):D.addEventListener(_,F,!0)),we.set(j,L,(H||0)+1)},teardown:function(){var D=this.ownerDocument||this.document||this,j=x.documentMode?this:D,H=we.get(j,L)-1;H?we.set(j,L,H):(x.documentMode?this.removeEventListener(L,F):D.removeEventListener(_,F,!0),we.remove(j,L))}}}),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(_,L){m.event.special[_]={delegateType:L,bindType:L,handle:function(F){var D,j=this,H=F.relatedTarget,G=F.handleObj;return(!H||H!==j&&!m.contains(j,H))&&(F.type=G.origType,D=G.handler.apply(this,arguments),F.type=L),D}}}),m.fn.extend({on:function(_,L,F,D){return Aa(this,_,L,F,D)},one:function(_,L,F,D){return Aa(this,_,L,F,D,1)},off:function(_,L,F){var D,j;if(_&&_.preventDefault&&_.handleObj)return D=_.handleObj,m(_.delegateTarget).off(D.namespace?D.origType+"."+D.namespace:D.origType,D.selector,D.handler),this;if(typeof _=="object"){for(j in _)this.off(j,L,_[j]);return this}return(L===!1||typeof L=="function")&&(F=L,L=void 0),F===!1&&(F=bi),this.each(function(){m.event.remove(this,_,F,L)})}});var Ma=/<script|<style|<link/i,In=/checked\s*(?:[^=]|=\s*.checked.)/i,yu=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Os(_,L){return M(_,"table")&&M(L.nodeType!==11?L:L.firstChild,"tr")&&m(_).children("tbody")[0]||_}function bu(_){return _.type=(_.getAttribute("type")!==null)+"/"+_.type,_}function wu(_){return(_.type||"").slice(0,5)==="true/"?_.type=_.type.slice(5):_.removeAttribute("type"),_}function Fs(_,L){var F,D,j,H,G,ne,ee;if(L.nodeType===1){if(we.hasData(_)&&(H=we.get(_),ee=H.events,ee)){we.remove(L,"handle events");for(j in ee)for(F=0,D=ee[j].length;F<D;F++)m.event.add(L,j,ee[j][F])}He.hasData(_)&&(G=He.access(_),ne=m.extend({},G),He.set(L,ne))}}function vn(_,L){var F=L.nodeName.toLowerCase();F==="input"&&pr.test(_.type)?L.checked=_.checked:(F==="input"||F==="textarea")&&(L.defaultValue=_.defaultValue)}function wi(_,L,F,D){L=l(L);var j,H,G,ne,ee,le,ge=0,be=_.length,fe=be-1,ke=L[0],tt=g(ke);if(tt||be>1&&typeof ke=="string"&&!p.checkClone&&In.test(ke))return _.each(function(yt){var st=_.eq(yt);tt&&(L[0]=ke.call(this,yt,st.html())),wi(st,L,F,D)});if(be&&(j=Is(L,_[0].ownerDocument,!1,_,D),H=j.firstChild,j.childNodes.length===1&&(j=H),H||D)){for(G=m.map(an(j,"script"),bu),ne=G.length;ge<be;ge++)ee=j,ge!==fe&&(ee=m.clone(ee,!0,!0),ne&&m.merge(G,an(ee,"script"))),F.call(_[ge],ee,ge);if(ne)for(le=G[G.length-1].ownerDocument,m.map(G,wu),ge=0;ge<ne;ge++)ee=G[ge],Pn.test(ee.type||"")&&!we.access(ee,"globalEval")&&m.contains(le,ee)&&(ee.src&&(ee.type||"").toLowerCase()!=="module"?m._evalUrl&&!ee.noModule&&m._evalUrl(ee.src,{nonce:ee.nonce||ee.getAttribute("nonce")},le):T(ee.textContent.replace(yu,""),ee,le))}return _}function Ds(_,L,F){for(var D,j=L?m.filter(L,_):_,H=0;(D=j[H])!=null;H++)!F&&D.nodeType===1&&m.cleanData(an(D)),D.parentNode&&(F&&Rn(D)&&qi(an(D,"script")),D.parentNode.removeChild(D));return _}m.extend({htmlPrefilter:function(_){return _},clone:function(_,L,F){var D,j,H,G,ne=_.cloneNode(!0),ee=Rn(_);if(!p.noCloneChecked&&(_.nodeType===1||_.nodeType===11)&&!m.isXMLDoc(_))for(G=an(ne),H=an(_),D=0,j=H.length;D<j;D++)vn(H[D],G[D]);if(L)if(F)for(H=H||an(_),G=G||an(ne),D=0,j=H.length;D<j;D++)Fs(H[D],G[D]);else Fs(_,ne);return G=an(ne,"script"),G.length>0&&qi(G,!ee&&an(_,"script")),ne},cleanData:function(_){for(var L,F,D,j=m.event.special,H=0;(F=_[H])!==void 0;H++)if(me(F)){if(L=F[we.expando]){if(L.events)for(D in L.events)j[D]?m.event.remove(F,D):m.removeEvent(F,D,L.handle);F[we.expando]=void 0}F[He.expando]&&(F[He.expando]=void 0)}}}),m.fn.extend({detach:function(_){return Ds(this,_,!0)},remove:function(_){return Ds(this,_)},text:function(_){return Ut(this,function(L){return L===void 0?m.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=L)})},null,_,arguments.length)},append:function(){return wi(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var L=Os(this,_);L.appendChild(_)}})},prepend:function(){return wi(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var L=Os(this,_);L.insertBefore(_,L.firstChild)}})},before:function(){return wi(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this)})},after:function(){return wi(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this.nextSibling)})},empty:function(){for(var _,L=0;(_=this[L])!=null;L++)_.nodeType===1&&(m.cleanData(an(_,!1)),_.textContent="");return this},clone:function(_,L){return _=_??!1,L=L??_,this.map(function(){return m.clone(this,_,L)})},html:function(_){return Ut(this,function(L){var F=this[0]||{},D=0,j=this.length;if(L===void 0&&F.nodeType===1)return F.innerHTML;if(typeof L=="string"&&!Ma.test(L)&&!mn[(Po.exec(L)||["",""])[1].toLowerCase()]){L=m.htmlPrefilter(L);try{for(;D<j;D++)F=this[D]||{},F.nodeType===1&&(m.cleanData(an(F,!1)),F.innerHTML=L);F=0}catch{}}F&&this.empty().append(L)},null,_,arguments.length)},replaceWith:function(){var _=[];return wi(this,arguments,function(L){var F=this.parentNode;m.inArray(this,_)<0&&(m.cleanData(an(this)),F&&F.replaceChild(L,this))},_)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(_,L){m.fn[_]=function(F){for(var D,j=[],H=m(F),G=H.length-1,ne=0;ne<=G;ne++)D=ne===G?this:this.clone(!0),m(H[ne])[L](D),d.apply(j,D.get());return this.pushStack(j)}});var La=new RegExp("^("+Ye+")(?!px)[a-z%]+$","i"),Ra=/^--/,Io=function(_){var L=_.ownerDocument.defaultView;return(!L||!L.opener)&&(L=t),L.getComputedStyle(_)},Lr=function(_,L,F){var D,j,H={};for(j in L)H[j]=_.style[j],_.style[j]=L[j];D=F.call(_);for(j in L)_.style[j]=H[j];return D},Pa=new RegExp(kt.join("|"),"i");(function(){function _(){if(le){ee.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",le.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",on.appendChild(ee).appendChild(le);var ge=t.getComputedStyle(le);F=ge.top!=="1%",ne=L(ge.marginLeft)===12,le.style.right="60%",H=L(ge.right)===36,D=L(ge.width)===36,le.style.position="absolute",j=L(le.offsetWidth/3)===12,on.removeChild(ee),le=null}}function L(ge){return Math.round(parseFloat(ge))}var F,D,j,H,G,ne,ee=x.createElement("div"),le=x.createElement("div");le.style&&(le.style.backgroundClip="content-box",le.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle=le.style.backgroundClip==="content-box",m.extend(p,{boxSizingReliable:function(){return _(),D},pixelBoxStyles:function(){return _(),H},pixelPosition:function(){return _(),F},reliableMarginLeft:function(){return _(),ne},scrollboxSize:function(){return _(),j},reliableTrDimensions:function(){var ge,be,fe,ke;return G==null&&(ge=x.createElement("table"),be=x.createElement("tr"),fe=x.createElement("div"),ge.style.cssText="position:absolute;left:-11111px;border-collapse:separate",be.style.cssText="border:1px solid",be.style.height="1px",fe.style.height="9px",fe.style.display="block",on.appendChild(ge).appendChild(be).appendChild(fe),ke=t.getComputedStyle(be),G=parseInt(ke.height,10)+parseInt(ke.borderTopWidth,10)+parseInt(ke.borderBottomWidth,10)===be.offsetHeight,on.removeChild(ge)),G}}))})();function Qi(_,L,F){var D,j,H,G,ne=Ra.test(L),ee=_.style;return F=F||Io(_),F&&(G=F.getPropertyValue(L)||F[L],ne&&G&&(G=G.replace(A,"$1")||void 0),G===""&&!Rn(_)&&(G=m.style(_,L)),!p.pixelBoxStyles()&&La.test(G)&&Pa.test(L)&&(D=ee.width,j=ee.minWidth,H=ee.maxWidth,ee.minWidth=ee.maxWidth=ee.width=G,G=F.width,ee.width=D,ee.minWidth=j,ee.maxWidth=H)),G!==void 0?G+"":G}function Zi(_,L){return{get:function(){if(_()){delete this.get;return}return(this.get=L).apply(this,arguments)}}}var Oo=["Webkit","Moz","ms"],Ns=x.createElement("div").style,Rr={};function zs(_){for(var L=_[0].toUpperCase()+_.slice(1),F=Oo.length;F--;)if(_=Oo[F]+L,_ in Ns)return _}function Ia(_){var L=m.cssProps[_]||Rr[_];return L||(_ in Ns?_:Rr[_]=zs(_)||_)}var Pr=/^(none|table(?!-c[ea]).+)/,Su={position:"absolute",visibility:"hidden",display:"block"},Oa={letterSpacing:"0",fontWeight:"400"};function Bs(_,L,F){var D=et.exec(L);return D?Math.max(0,D[2]-(F||0))+(D[3]||"px"):L}function Fa(_,L,F,D,j,H){var G=L==="width"?1:0,ne=0,ee=0,le=0;if(F===(D?"border":"content"))return 0;for(;G<4;G+=2)F==="margin"&&(le+=m.css(_,F+kt[G],!0,j)),D?(F==="content"&&(ee-=m.css(_,"padding"+kt[G],!0,j)),F!=="margin"&&(ee-=m.css(_,"border"+kt[G]+"Width",!0,j))):(ee+=m.css(_,"padding"+kt[G],!0,j),F!=="padding"?ee+=m.css(_,"border"+kt[G]+"Width",!0,j):ne+=m.css(_,"border"+kt[G]+"Width",!0,j));return!D&&H>=0&&(ee+=Math.max(0,Math.ceil(_["offset"+L[0].toUpperCase()+L.slice(1)]-H-ee-ne-.5))||0),ee+le}function js(_,L,F){var D=Io(_),j=!p.boxSizingReliable()||F,H=j&&m.css(_,"boxSizing",!1,D)==="border-box",G=H,ne=Qi(_,L,D),ee="offset"+L[0].toUpperCase()+L.slice(1);if(La.test(ne)){if(!F)return ne;ne="auto"}return(!p.boxSizingReliable()&&H||!p.reliableTrDimensions()&&M(_,"tr")||ne==="auto"||!parseFloat(ne)&&m.css(_,"display",!1,D)==="inline")&&_.getClientRects().length&&(H=m.css(_,"boxSizing",!1,D)==="border-box",G=ee in _,G&&(ne=_[ee])),ne=parseFloat(ne)||0,ne+Fa(_,L,F||(H?"border":"content"),G,D,ne)+"px"}m.extend({cssHooks:{opacity:{get:function(_,L){if(L){var F=Qi(_,"opacity");return F===""?"1":F}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(_,L,F,D){if(!(!_||_.nodeType===3||_.nodeType===8||!_.style)){var j,H,G,ne=Ht(L),ee=Ra.test(L),le=_.style;if(ee||(L=Ia(ne)),G=m.cssHooks[L]||m.cssHooks[ne],F!==void 0){if(H=typeof F,H==="string"&&(j=et.exec(F))&&j[1]&&(F=Rs(_,L,j),H="number"),F==null||F!==F)return;H==="number"&&!ee&&(F+=j&&j[3]||(m.cssNumber[ne]?"":"px")),!p.clearCloneStyle&&F===""&&L.indexOf("background")===0&&(le[L]="inherit"),(!G||!("set"in G)||(F=G.set(_,F,D))!==void 0)&&(ee?le.setProperty(L,F):le[L]=F)}else return G&&"get"in G&&(j=G.get(_,!1,D))!==void 0?j:le[L]}},css:function(_,L,F,D){var j,H,G,ne=Ht(L),ee=Ra.test(L);return ee||(L=Ia(ne)),G=m.cssHooks[L]||m.cssHooks[ne],G&&"get"in G&&(j=G.get(_,!0,F)),j===void 0&&(j=Qi(_,L,D)),j==="normal"&&L in Oa&&(j=Oa[L]),F===""||F?(H=parseFloat(j),F===!0||isFinite(H)?H||0:j):j}}),m.each(["height","width"],function(_,L){m.cssHooks[L]={get:function(F,D,j){if(D)return Pr.test(m.css(F,"display"))&&(!F.getClientRects().length||!F.getBoundingClientRect().width)?Lr(F,Su,function(){return js(F,L,j)}):js(F,L,j)},set:function(F,D,j){var H,G=Io(F),ne=!p.scrollboxSize()&&G.position==="absolute",ee=ne||j,le=ee&&m.css(F,"boxSizing",!1,G)==="border-box",ge=j?Fa(F,L,j,le,G):0;return le&&ne&&(ge-=Math.ceil(F["offset"+L[0].toUpperCase()+L.slice(1)]-parseFloat(G[L])-Fa(F,L,"border",!1,G)-.5)),ge&&(H=et.exec(D))&&(H[3]||"px")!=="px"&&(F.style[L]=D,D=m.css(F,L)),Bs(F,D,ge)}}}),m.cssHooks.marginLeft=Zi(p.reliableMarginLeft,function(_,L){if(L)return(parseFloat(Qi(_,"marginLeft"))||_.getBoundingClientRect().left-Lr(_,{marginLeft:0},function(){return _.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(_,L){m.cssHooks[_+L]={expand:function(F){for(var D=0,j={},H=typeof F=="string"?F.split(" "):[F];D<4;D++)j[_+kt[D]+L]=H[D]||H[D-2]||H[0];return j}},_!=="margin"&&(m.cssHooks[_+L].set=Bs)}),m.fn.extend({css:function(_,L){return Ut(this,function(F,D,j){var H,G,ne={},ee=0;if(Array.isArray(D)){for(H=Io(F),G=D.length;ee<G;ee++)ne[D[ee]]=m.css(F,D[ee],!1,H);return ne}return j!==void 0?m.style(F,D,j):m.css(F,D)},_,L,arguments.length>1)}});function yn(_,L,F,D,j){return new yn.prototype.init(_,L,F,D,j)}m.Tween=yn,yn.prototype={constructor:yn,init:function(_,L,F,D,j,H){this.elem=_,this.prop=F,this.easing=j||m.easing._default,this.options=L,this.start=this.now=this.cur(),this.end=D,this.unit=H||(m.cssNumber[F]?"":"px")},cur:function(){var _=yn.propHooks[this.prop];return _&&_.get?_.get(this):yn.propHooks._default.get(this)},run:function(_){var L,F=yn.propHooks[this.prop];return this.options.duration?this.pos=L=m.easing[this.easing](_,this.options.duration*_,0,1,this.options.duration):this.pos=L=_,this.now=(this.end-this.start)*L+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),F&&F.set?F.set(this):yn.propHooks._default.set(this),this}},yn.prototype.init.prototype=yn.prototype,yn.propHooks={_default:{get:function(_){var L;return _.elem.nodeType!==1||_.elem[_.prop]!=null&&_.elem.style[_.prop]==null?_.elem[_.prop]:(L=m.css(_.elem,_.prop,""),!L||L==="auto"?0:L)},set:function(_){m.fx.step[_.prop]?m.fx.step[_.prop](_):_.elem.nodeType===1&&(m.cssHooks[_.prop]||_.elem.style[Ia(_.prop)]!=null)?m.style(_.elem,_.prop,_.now+_.unit):_.elem[_.prop]=_.now}}},yn.propHooks.scrollTop=yn.propHooks.scrollLeft={set:function(_){_.elem.nodeType&&_.elem.parentNode&&(_.elem[_.prop]=_.now)}},m.easing={linear:function(_){return _},swing:function(_){return .5-Math.cos(_*Math.PI)/2},_default:"swing"},m.fx=yn.prototype.init,m.fx.step={};var gr,Fo,Ji=/^(?:toggle|show|hide)$/,Hs=/queueHooks$/;function Do(){Fo&&(x.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Do):t.setTimeout(Do,m.fx.interval),m.fx.tick())}function Vs(){return t.setTimeout(function(){gr=void 0}),gr=Date.now()}function Zr(_,L){var F,D=0,j={height:_};for(L=L?1:0;D<4;D+=2-L)F=kt[D],j["margin"+F]=j["padding"+F]=_;return L&&(j.opacity=j.width=_),j}function No(_,L,F){for(var D,j=(On.tweeners[L]||[]).concat(On.tweeners["*"]),H=0,G=j.length;H<G;H++)if(D=j[H].call(F,L,_))return D}function xu(_,L,F){var D,j,H,G,ne,ee,le,ge,be="width"in L||"height"in L,fe=this,ke={},tt=_.style,yt=_.nodeType&&Mr(_),st=we.get(_,"fxshow");F.queue||(G=m._queueHooks(_,"fx"),G.unqueued==null&&(G.unqueued=0,ne=G.empty.fire,G.empty.fire=function(){G.unqueued||ne()}),G.unqueued++,fe.always(function(){fe.always(function(){G.unqueued--,m.queue(_,"fx").length||G.empty.fire()})}));for(D in L)if(j=L[D],Ji.test(j)){if(delete L[D],H=H||j==="toggle",j===(yt?"hide":"show"))if(j==="show"&&st&&st[D]!==void 0)yt=!0;else continue;ke[D]=st&&st[D]||m.style(_,D)}if(ee=!m.isEmptyObject(L),!(!ee&&m.isEmptyObject(ke))){be&&_.nodeType===1&&(F.overflow=[tt.overflow,tt.overflowX,tt.overflowY],le=st&&st.display,le==null&&(le=we.get(_,"display")),ge=m.css(_,"display"),ge==="none"&&(le?ge=le:(Qr([_],!0),le=_.style.display||le,ge=m.css(_,"display"),Qr([_]))),(ge==="inline"||ge==="inline-block"&&le!=null)&&m.css(_,"float")==="none"&&(ee||(fe.done(function(){tt.display=le}),le==null&&(ge=tt.display,le=ge==="none"?"":ge)),tt.display="inline-block")),F.overflow&&(tt.overflow="hidden",fe.always(function(){tt.overflow=F.overflow[0],tt.overflowX=F.overflow[1],tt.overflowY=F.overflow[2]})),ee=!1;for(D in ke)ee||(st?"hidden"in st&&(yt=st.hidden):st=we.access(_,"fxshow",{display:le}),H&&(st.hidden=!yt),yt&&Qr([_],!0),fe.done(function(){yt||Qr([_]),we.remove(_,"fxshow");for(D in ke)m.style(_,D,ke[D])})),ee=No(yt?st[D]:0,D,fe),D in st||(st[D]=ee.start,yt&&(ee.end=ee.start,ee.start=0))}}function Ws(_,L){var F,D,j,H,G;for(F in _)if(D=Ht(F),j=L[D],H=_[F],Array.isArray(H)&&(j=H[1],H=_[F]=H[0]),F!==D&&(_[D]=H,delete _[F]),G=m.cssHooks[D],G&&"expand"in G){H=G.expand(H),delete _[D];for(F in H)F in _||(_[F]=H[F],L[F]=j)}else L[D]=j}function On(_,L,F){var D,j,H=0,G=On.prefilters.length,ne=m.Deferred().always(function(){delete ee.elem}),ee=function(){if(j)return!1;for(var be=gr||Vs(),fe=Math.max(0,le.startTime+le.duration-be),ke=fe/le.duration||0,tt=1-ke,yt=0,st=le.tweens.length;yt<st;yt++)le.tweens[yt].run(tt);return ne.notifyWith(_,[le,tt,fe]),tt<1&&st?fe:(st||ne.notifyWith(_,[le,1,0]),ne.resolveWith(_,[le]),!1)},le=ne.promise({elem:_,props:m.extend({},L),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},F),originalProperties:L,originalOptions:F,startTime:gr||Vs(),duration:F.duration,tweens:[],createTween:function(be,fe){var ke=m.Tween(_,le.opts,be,fe,le.opts.specialEasing[be]||le.opts.easing);return le.tweens.push(ke),ke},stop:function(be){var fe=0,ke=be?le.tweens.length:0;if(j)return this;for(j=!0;fe<ke;fe++)le.tweens[fe].run(1);return be?(ne.notifyWith(_,[le,1,0]),ne.resolveWith(_,[le,be])):ne.rejectWith(_,[le,be]),this}}),ge=le.props;for(Ws(ge,le.opts.specialEasing);H<G;H++)if(D=On.prefilters[H].call(le,_,ge,le.opts),D)return g(D.stop)&&(m._queueHooks(le.elem,le.opts.queue).stop=D.stop.bind(D)),D;return m.map(ge,No,le),g(le.opts.start)&&le.opts.start.call(_,le),le.progress(le.opts.progress).done(le.opts.done,le.opts.complete).fail(le.opts.fail).always(le.opts.always),m.fx.timer(m.extend(ee,{elem:_,anim:le,queue:le.opts.queue})),le}m.Animation=m.extend(On,{tweeners:{"*":[function(_,L){var F=this.createTween(_,L);return Rs(F.elem,_,et.exec(L),F),F}]},tweener:function(_,L){g(_)?(L=_,_=["*"]):_=_.match(Ce);for(var F,D=0,j=_.length;D<j;D++)F=_[D],On.tweeners[F]=On.tweeners[F]||[],On.tweeners[F].unshift(L)},prefilters:[xu],prefilter:function(_,L){L?On.prefilters.unshift(_):On.prefilters.push(_)}}),m.speed=function(_,L,F){var D=_&&typeof _=="object"?m.extend({},_):{complete:F||!F&&L||g(_)&&_,duration:_,easing:F&&L||L&&!g(L)&&L};return m.fx.off?D.duration=0:typeof D.duration!="number"&&(D.duration in m.fx.speeds?D.duration=m.fx.speeds[D.duration]:D.duration=m.fx.speeds._default),(D.queue==null||D.queue===!0)&&(D.queue="fx"),D.old=D.complete,D.complete=function(){g(D.old)&&D.old.call(this),D.queue&&m.dequeue(this,D.queue)},D},m.fn.extend({fadeTo:function(_,L,F,D){return this.filter(Mr).css("opacity",0).show().end().animate({opacity:L},_,F,D)},animate:function(_,L,F,D){var j=m.isEmptyObject(_),H=m.speed(L,F,D),G=function(){var ne=On(this,m.extend({},_),H);(j||we.get(this,"finish"))&&ne.stop(!0)};return G.finish=G,j||H.queue===!1?this.each(G):this.queue(H.queue,G)},stop:function(_,L,F){var D=function(j){var H=j.stop;delete j.stop,H(F)};return typeof _!="string"&&(F=L,L=_,_=void 0),L&&this.queue(_||"fx",[]),this.each(function(){var j=!0,H=_!=null&&_+"queueHooks",G=m.timers,ne=we.get(this);if(H)ne[H]&&ne[H].stop&&D(ne[H]);else for(H in ne)ne[H]&&ne[H].stop&&Hs.test(H)&&D(ne[H]);for(H=G.length;H--;)G[H].elem===this&&(_==null||G[H].queue===_)&&(G[H].anim.stop(F),j=!1,G.splice(H,1));(j||!F)&&m.dequeue(this,_)})},finish:function(_){return _!==!1&&(_=_||"fx"),this.each(function(){var L,F=we.get(this),D=F[_+"queue"],j=F[_+"queueHooks"],H=m.timers,G=D?D.length:0;for(F.finish=!0,m.queue(this,_,[]),j&&j.stop&&j.stop.call(this,!0),L=H.length;L--;)H[L].elem===this&&H[L].queue===_&&(H[L].anim.stop(!0),H.splice(L,1));for(L=0;L<G;L++)D[L]&&D[L].finish&&D[L].finish.call(this);delete F.finish})}}),m.each(["toggle","show","hide"],function(_,L){var F=m.fn[L];m.fn[L]=function(D,j,H){return D==null||typeof D=="boolean"?F.apply(this,arguments):this.animate(Zr(L,!0),D,j,H)}}),m.each({slideDown:Zr("show"),slideUp:Zr("hide"),slideToggle:Zr("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(_,L){m.fn[_]=function(F,D,j){return this.animate(L,F,D,j)}}),m.timers=[],m.fx.tick=function(){var _,L=0,F=m.timers;for(gr=Date.now();L<F.length;L++)_=F[L],!_()&&F[L]===_&&F.splice(L--,1);F.length||m.fx.stop(),gr=void 0},m.fx.timer=function(_){m.timers.push(_),m.fx.start()},m.fx.interval=13,m.fx.start=function(){Fo||(Fo=!0,Do())},m.fx.stop=function(){Fo=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(_,L){return _=m.fx&&m.fx.speeds[_]||_,L=L||"fx",this.queue(L,function(F,D){var j=t.setTimeout(F,_);D.stop=function(){t.clearTimeout(j)}})},function(){var _=x.createElement("input"),L=x.createElement("select"),F=L.appendChild(x.createElement("option"));_.type="checkbox",p.checkOn=_.value!=="",p.optSelected=F.selected,_=x.createElement("input"),_.value="t",_.type="radio",p.radioValue=_.value==="t"}();var Us,Si=m.expr.attrHandle;m.fn.extend({attr:function(_,L){return Ut(this,m.attr,_,L,arguments.length>1)},removeAttr:function(_){return this.each(function(){m.removeAttr(this,_)})}}),m.extend({attr:function(_,L,F){var D,j,H=_.nodeType;if(!(H===3||H===8||H===2)){if(typeof _.getAttribute>"u")return m.prop(_,L,F);if((H!==1||!m.isXMLDoc(_))&&(j=m.attrHooks[L.toLowerCase()]||(m.expr.match.bool.test(L)?Us:void 0)),F!==void 0){if(F===null){m.removeAttr(_,L);return}return j&&"set"in j&&(D=j.set(_,F,L))!==void 0?D:(_.setAttribute(L,F+""),F)}return j&&"get"in j&&(D=j.get(_,L))!==null?D:(D=m.find.attr(_,L),D??void 0)}},attrHooks:{type:{set:function(_,L){if(!p.radioValue&&L==="radio"&&M(_,"input")){var F=_.value;return _.setAttribute("type",L),F&&(_.value=F),L}}}},removeAttr:function(_,L){var F,D=0,j=L&&L.match(Ce);if(j&&_.nodeType===1)for(;F=j[D++];)_.removeAttribute(F)}}),Us={set:function(_,L,F){return L===!1?m.removeAttr(_,F):_.setAttribute(F,F),F}},m.each(m.expr.match.bool.source.match(/\w+/g),function(_,L){var F=Si[L]||m.find.attr;Si[L]=function(D,j,H){var G,ne,ee=j.toLowerCase();return H||(ne=Si[ee],Si[ee]=G,G=F(D,j,H)!=null?ee:null,Si[ee]=ne),G}});var zo=/^(?:input|select|textarea|button)$/i,Jr=/^(?:a|area)$/i;m.fn.extend({prop:function(_,L){return Ut(this,m.prop,_,L,arguments.length>1)},removeProp:function(_){return this.each(function(){delete this[m.propFix[_]||_]})}}),m.extend({prop:function(_,L,F){var D,j,H=_.nodeType;if(!(H===3||H===8||H===2))return(H!==1||!m.isXMLDoc(_))&&(L=m.propFix[L]||L,j=m.propHooks[L]),F!==void 0?j&&"set"in j&&(D=j.set(_,F,L))!==void 0?D:_[L]=F:j&&"get"in j&&(D=j.get(_,L))!==null?D:_[L]},propHooks:{tabIndex:{get:function(_){var L=m.find.attr(_,"tabindex");return L?parseInt(L,10):zo.test(_.nodeName)||Jr.test(_.nodeName)&&_.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(m.propHooks.selected={get:function(_){var L=_.parentNode;return L&&L.parentNode&&L.parentNode.selectedIndex,null},set:function(_){var L=_.parentNode;L&&(L.selectedIndex,L.parentNode&&L.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this});function ei(_){var L=_.match(Ce)||[];return L.join(" ")}function ti(_){return _.getAttribute&&_.getAttribute("class")||""}function Jn(_){return Array.isArray(_)?_:typeof _=="string"?_.match(Ce)||[]:[]}m.fn.extend({addClass:function(_){var L,F,D,j,H,G;return g(_)?this.each(function(ne){m(this).addClass(_.call(this,ne,ti(this)))}):(L=Jn(_),L.length?this.each(function(){if(D=ti(this),F=this.nodeType===1&&" "+ei(D)+" ",F){for(H=0;H<L.length;H++)j=L[H],F.indexOf(" "+j+" ")<0&&(F+=j+" ");G=ei(F),D!==G&&this.setAttribute("class",G)}}):this)},removeClass:function(_){var L,F,D,j,H,G;return g(_)?this.each(function(ne){m(this).removeClass(_.call(this,ne,ti(this)))}):arguments.length?(L=Jn(_),L.length?this.each(function(){if(D=ti(this),F=this.nodeType===1&&" "+ei(D)+" ",F){for(H=0;H<L.length;H++)for(j=L[H];F.indexOf(" "+j+" ")>-1;)F=F.replace(" "+j+" "," ");G=ei(F),D!==G&&this.setAttribute("class",G)}}):this):this.attr("class","")},toggleClass:function(_,L){var F,D,j,H,G=typeof _,ne=G==="string"||Array.isArray(_);return g(_)?this.each(function(ee){m(this).toggleClass(_.call(this,ee,ti(this),L),L)}):typeof L=="boolean"&&ne?L?this.addClass(_):this.removeClass(_):(F=Jn(_),this.each(function(){if(ne)for(H=m(this),j=0;j<F.length;j++)D=F[j],H.hasClass(D)?H.removeClass(D):H.addClass(D);else(_===void 0||G==="boolean")&&(D=ti(this),D&&we.set(this,"__className__",D),this.setAttribute&&this.setAttribute("class",D||_===!1?"":we.get(this,"__className__")||""))}))},hasClass:function(_){var L,F,D=0;for(L=" "+_+" ";F=this[D++];)if(F.nodeType===1&&(" "+ei(ti(F))+" ").indexOf(L)>-1)return!0;return!1}});var Da=/\r/g;m.fn.extend({val:function(_){var L,F,D,j=this[0];return arguments.length?(D=g(_),this.each(function(H){var G;this.nodeType===1&&(D?G=_.call(this,H,m(this).val()):G=_,G==null?G="":typeof G=="number"?G+="":Array.isArray(G)&&(G=m.map(G,function(ne){return ne==null?"":ne+""})),L=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],(!L||!("set"in L)||L.set(this,G,"value")===void 0)&&(this.value=G))})):j?(L=m.valHooks[j.type]||m.valHooks[j.nodeName.toLowerCase()],L&&"get"in L&&(F=L.get(j,"value"))!==void 0?F:(F=j.value,typeof F=="string"?F.replace(Da,""):F??"")):void 0}}),m.extend({valHooks:{option:{get:function(_){var L=m.find.attr(_,"value");return L??ei(m.text(_))}},select:{get:function(_){var L,F,D,j=_.options,H=_.selectedIndex,G=_.type==="select-one",ne=G?null:[],ee=G?H+1:j.length;for(H<0?D=ee:D=G?H:0;D<ee;D++)if(F=j[D],(F.selected||D===H)&&!F.disabled&&(!F.parentNode.disabled||!M(F.parentNode,"optgroup"))){if(L=m(F).val(),G)return L;ne.push(L)}return ne},set:function(_,L){for(var F,D,j=_.options,H=m.makeArray(L),G=j.length;G--;)D=j[G],(D.selected=m.inArray(m.valHooks.option.get(D),H)>-1)&&(F=!0);return F||(_.selectedIndex=-1),H}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(_,L){if(Array.isArray(L))return _.checked=m.inArray(m(_).val(),L)>-1}},p.checkOn||(m.valHooks[this].get=function(_){return _.getAttribute("value")===null?"on":_.value})});var eo=t.location,Gs={guid:Date.now()},Na=/\?/;m.parseXML=function(_){var L,F;if(!_||typeof _!="string")return null;try{L=new t.DOMParser().parseFromString(_,"text/xml")}catch{}return F=L&&L.getElementsByTagName("parsererror")[0],(!L||F)&&m.error("Invalid XML: "+(F?m.map(F.childNodes,function(D){return D.textContent}).join(`
`):_)),L};var to=/^(?:focusinfocus|focusoutblur)$/,er=function(_){_.stopPropagation()};m.extend(m.event,{trigger:function(_,L,F,D){var j,H,G,ne,ee,le,ge,be,fe=[F||x],ke=u.call(_,"type")?_.type:_,tt=u.call(_,"namespace")?_.namespace.split("."):[];if(H=be=G=F=F||x,!(F.nodeType===3||F.nodeType===8)&&!to.test(ke+m.event.triggered)&&(ke.indexOf(".")>-1&&(tt=ke.split("."),ke=tt.shift(),tt.sort()),ee=ke.indexOf(":")<0&&"on"+ke,_=_[m.expando]?_:new m.Event(ke,typeof _=="object"&&_),_.isTrigger=D?2:3,_.namespace=tt.join("."),_.rnamespace=_.namespace?new RegExp("(^|\\.)"+tt.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,_.result=void 0,_.target||(_.target=F),L=L==null?[_]:m.makeArray(L,[_]),ge=m.event.special[ke]||{},!(!D&&ge.trigger&&ge.trigger.apply(F,L)===!1))){if(!D&&!ge.noBubble&&!w(F)){for(ne=ge.delegateType||ke,to.test(ne+ke)||(H=H.parentNode);H;H=H.parentNode)fe.push(H),G=H;G===(F.ownerDocument||x)&&fe.push(G.defaultView||G.parentWindow||t)}for(j=0;(H=fe[j++])&&!_.isPropagationStopped();)be=H,_.type=j>1?ne:ge.bindType||ke,le=(we.get(H,"events")||Object.create(null))[_.type]&&we.get(H,"handle"),le&&le.apply(H,L),le=ee&&H[ee],le&&le.apply&&me(H)&&(_.result=le.apply(H,L),_.result===!1&&_.preventDefault());return _.type=ke,!D&&!_.isDefaultPrevented()&&(!ge._default||ge._default.apply(fe.pop(),L)===!1)&&me(F)&&ee&&g(F[ke])&&!w(F)&&(G=F[ee],G&&(F[ee]=null),m.event.triggered=ke,_.isPropagationStopped()&&be.addEventListener(ke,er),F[ke](),_.isPropagationStopped()&&be.removeEventListener(ke,er),m.event.triggered=void 0,G&&(F[ee]=G)),_.result}},simulate:function(_,L,F){var D=m.extend(new m.Event,F,{type:_,isSimulated:!0});m.event.trigger(D,null,L)}}),m.fn.extend({trigger:function(_,L){return this.each(function(){m.event.trigger(_,L,this)})},triggerHandler:function(_,L){var F=this[0];if(F)return m.event.trigger(_,L,F,!0)}});var Bo=/\[\]$/,jo=/\r?\n/g,Ho=/^(?:submit|button|image|reset|file)$/i,Ks=/^(?:input|select|textarea|keygen)/i;function ni(_,L,F,D){var j;if(Array.isArray(L))m.each(L,function(H,G){F||Bo.test(_)?D(_,G):ni(_+"["+(typeof G=="object"&&G!=null?H:"")+"]",G,F,D)});else if(!F&&v(L)==="object")for(j in L)ni(_+"["+j+"]",L[j],F,D);else D(_,L)}m.param=function(_,L){var F,D=[],j=function(H,G){var ne=g(G)?G():G;D[D.length]=encodeURIComponent(H)+"="+encodeURIComponent(ne??"")};if(_==null)return"";if(Array.isArray(_)||_.jquery&&!m.isPlainObject(_))m.each(_,function(){j(this.name,this.value)});else for(F in _)ni(F,_[F],L,j);return D.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var _=m.prop(this,"elements");return _?m.makeArray(_):this}).filter(function(){var _=this.type;return this.name&&!m(this).is(":disabled")&&Ks.test(this.nodeName)&&!Ho.test(_)&&(this.checked||!pr.test(_))}).map(function(_,L){var F=m(this).val();return F==null?null:Array.isArray(F)?m.map(F,function(D){return{name:L.name,value:D.replace(jo,`\r
`)}}):{name:L.name,value:F.replace(jo,`\r
`)}}).get()}});var qs=/%20/g,Ir=/#.*$/,xi=/([?&])_=[^&]*/,Ys=/^(.*?):[ \t]*([^\r\n]*)$/mg,_i=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Xs=/^(?:GET|HEAD)$/,Qs=/^\/\//,Zs={},za={},Q="*/".concat("*"),se=x.createElement("a");se.href=eo.href;function U(_){return function(L,F){typeof L!="string"&&(F=L,L="*");var D,j=0,H=L.toLowerCase().match(Ce)||[];if(g(F))for(;D=H[j++];)D[0]==="+"?(D=D.slice(1)||"*",(_[D]=_[D]||[]).unshift(F)):(_[D]=_[D]||[]).push(F)}}function J(_,L,F,D){var j={},H=_===za;function G(ne){var ee;return j[ne]=!0,m.each(_[ne]||[],function(le,ge){var be=ge(L,F,D);if(typeof be=="string"&&!H&&!j[be])return L.dataTypes.unshift(be),G(be),!1;if(H)return!(ee=be)}),ee}return G(L.dataTypes[0])||!j["*"]&&G("*")}function ue(_,L){var F,D,j=m.ajaxSettings.flatOptions||{};for(F in L)L[F]!==void 0&&((j[F]?_:D||(D={}))[F]=L[F]);return D&&m.extend(!0,_,D),_}function Se(_,L,F){for(var D,j,H,G,ne=_.contents,ee=_.dataTypes;ee[0]==="*";)ee.shift(),D===void 0&&(D=_.mimeType||L.getResponseHeader("Content-Type"));if(D){for(j in ne)if(ne[j]&&ne[j].test(D)){ee.unshift(j);break}}if(ee[0]in F)H=ee[0];else{for(j in F){if(!ee[0]||_.converters[j+" "+ee[0]]){H=j;break}G||(G=j)}H=H||G}if(H)return H!==ee[0]&&ee.unshift(H),F[H]}function ze(_,L,F,D){var j,H,G,ne,ee,le={},ge=_.dataTypes.slice();if(ge[1])for(G in _.converters)le[G.toLowerCase()]=_.converters[G];for(H=ge.shift();H;)if(_.responseFields[H]&&(F[_.responseFields[H]]=L),!ee&&D&&_.dataFilter&&(L=_.dataFilter(L,_.dataType)),ee=H,H=ge.shift(),H){if(H==="*")H=ee;else if(ee!=="*"&&ee!==H){if(G=le[ee+" "+H]||le["* "+H],!G){for(j in le)if(ne=j.split(" "),ne[1]===H&&(G=le[ee+" "+ne[0]]||le["* "+ne[0]],G)){G===!0?G=le[j]:le[j]!==!0&&(H=ne[0],ge.unshift(ne[1]));break}}if(G!==!0)if(G&&_.throws)L=G(L);else try{L=G(L)}catch(be){return{state:"parsererror",error:G?be:"No conversion from "+ee+" to "+H}}}}return{state:"success",data:L}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:eo.href,type:"GET",isLocal:_i.test(eo.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Q,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(_,L){return L?ue(ue(_,m.ajaxSettings),L):ue(m.ajaxSettings,_)},ajaxPrefilter:U(Zs),ajaxTransport:U(za),ajax:function(_,L){typeof _=="object"&&(L=_,_=void 0),L=L||{};var F,D,j,H,G,ne,ee,le,ge,be,fe=m.ajaxSetup({},L),ke=fe.context||fe,tt=fe.context&&(ke.nodeType||ke.jquery)?m(ke):m.event,yt=m.Deferred(),st=m.Callbacks("once memory"),_n=fe.statusCode||{},dn={},Ci={},ki="canceled",ht={readyState:0,getResponseHeader:function(bt){var Zt;if(ee){if(!H)for(H={};Zt=Ys.exec(j);)H[Zt[1].toLowerCase()+" "]=(H[Zt[1].toLowerCase()+" "]||[]).concat(Zt[2]);Zt=H[bt.toLowerCase()+" "]}return Zt==null?null:Zt.join(", ")},getAllResponseHeaders:function(){return ee?j:null},setRequestHeader:function(bt,Zt){return ee==null&&(bt=Ci[bt.toLowerCase()]=Ci[bt.toLowerCase()]||bt,dn[bt]=Zt),this},overrideMimeType:function(bt){return ee==null&&(fe.mimeType=bt),this},statusCode:function(bt){var Zt;if(bt)if(ee)ht.always(bt[ht.status]);else for(Zt in bt)_n[Zt]=[_n[Zt],bt[Zt]];return this},abort:function(bt){var Zt=bt||ki;return F&&F.abort(Zt),Ba(0,Zt),this}};if(yt.promise(ht),fe.url=((_||fe.url||eo.href)+"").replace(Qs,eo.protocol+"//"),fe.type=L.method||L.type||fe.method||fe.type,fe.dataTypes=(fe.dataType||"*").toLowerCase().match(Ce)||[""],fe.crossDomain==null){ne=x.createElement("a");try{ne.href=fe.url,ne.href=ne.href,fe.crossDomain=se.protocol+"//"+se.host!=ne.protocol+"//"+ne.host}catch{fe.crossDomain=!0}}if(fe.data&&fe.processData&&typeof fe.data!="string"&&(fe.data=m.param(fe.data,fe.traditional)),J(Zs,fe,L,ht),ee)return ht;le=m.event&&fe.global,le&&m.active++===0&&m.event.trigger("ajaxStart"),fe.type=fe.type.toUpperCase(),fe.hasContent=!Xs.test(fe.type),D=fe.url.replace(Ir,""),fe.hasContent?fe.data&&fe.processData&&(fe.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(fe.data=fe.data.replace(qs,"+")):(be=fe.url.slice(D.length),fe.data&&(fe.processData||typeof fe.data=="string")&&(D+=(Na.test(D)?"&":"?")+fe.data,delete fe.data),fe.cache===!1&&(D=D.replace(xi,"$1"),be=(Na.test(D)?"&":"?")+"_="+Gs.guid+++be),fe.url=D+be),fe.ifModified&&(m.lastModified[D]&&ht.setRequestHeader("If-Modified-Since",m.lastModified[D]),m.etag[D]&&ht.setRequestHeader("If-None-Match",m.etag[D])),(fe.data&&fe.hasContent&&fe.contentType!==!1||L.contentType)&&ht.setRequestHeader("Content-Type",fe.contentType),ht.setRequestHeader("Accept",fe.dataTypes[0]&&fe.accepts[fe.dataTypes[0]]?fe.accepts[fe.dataTypes[0]]+(fe.dataTypes[0]!=="*"?", "+Q+"; q=0.01":""):fe.accepts["*"]);for(ge in fe.headers)ht.setRequestHeader(ge,fe.headers[ge]);if(fe.beforeSend&&(fe.beforeSend.call(ke,ht,fe)===!1||ee))return ht.abort();if(ki="abort",st.add(fe.complete),ht.done(fe.success),ht.fail(fe.error),F=J(za,fe,L,ht),!F)Ba(-1,"No Transport");else{if(ht.readyState=1,le&&tt.trigger("ajaxSend",[ht,fe]),ee)return ht;fe.async&&fe.timeout>0&&(G=t.setTimeout(function(){ht.abort("timeout")},fe.timeout));try{ee=!1,F.send(dn,Ba)}catch(bt){if(ee)throw bt;Ba(-1,bt)}}function Ba(bt,Zt,_u,Tg){var Ei,Cu,$i,Vo,Wo,Or=Zt;ee||(ee=!0,G&&t.clearTimeout(G),F=void 0,j=Tg||"",ht.readyState=bt>0?4:0,Ei=bt>=200&&bt<300||bt===304,_u&&(Vo=Se(fe,ht,_u)),!Ei&&m.inArray("script",fe.dataTypes)>-1&&m.inArray("json",fe.dataTypes)<0&&(fe.converters["text script"]=function(){}),Vo=ze(fe,Vo,ht,Ei),Ei?(fe.ifModified&&(Wo=ht.getResponseHeader("Last-Modified"),Wo&&(m.lastModified[D]=Wo),Wo=ht.getResponseHeader("etag"),Wo&&(m.etag[D]=Wo)),bt===204||fe.type==="HEAD"?Or="nocontent":bt===304?Or="notmodified":(Or=Vo.state,Cu=Vo.data,$i=Vo.error,Ei=!$i)):($i=Or,(bt||!Or)&&(Or="error",bt<0&&(bt=0))),ht.status=bt,ht.statusText=(Zt||Or)+"",Ei?yt.resolveWith(ke,[Cu,Or,ht]):yt.rejectWith(ke,[ht,Or,$i]),ht.statusCode(_n),_n=void 0,le&&tt.trigger(Ei?"ajaxSuccess":"ajaxError",[ht,fe,Ei?Cu:$i]),st.fireWith(ke,[ht,Or]),le&&(tt.trigger("ajaxComplete",[ht,fe]),--m.active||m.event.trigger("ajaxStop")))}return ht},getJSON:function(_,L,F){return m.get(_,L,F,"json")},getScript:function(_,L){return m.get(_,void 0,L,"script")}}),m.each(["get","post"],function(_,L){m[L]=function(F,D,j,H){return g(D)&&(H=H||j,j=D,D=void 0),m.ajax(m.extend({url:F,type:L,dataType:H,data:D,success:j},m.isPlainObject(F)&&F))}}),m.ajaxPrefilter(function(_){var L;for(L in _.headers)L.toLowerCase()==="content-type"&&(_.contentType=_.headers[L]||"")}),m._evalUrl=function(_,L,F){return m.ajax({url:_,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(D){m.globalEval(D,L,F)}})},m.fn.extend({wrapAll:function(_){var L;return this[0]&&(g(_)&&(_=_.call(this[0])),L=m(_,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&L.insertBefore(this[0]),L.map(function(){for(var F=this;F.firstElementChild;)F=F.firstElementChild;return F}).append(this)),this},wrapInner:function(_){return g(_)?this.each(function(L){m(this).wrapInner(_.call(this,L))}):this.each(function(){var L=m(this),F=L.contents();F.length?F.wrapAll(_):L.append(_)})},wrap:function(_){var L=g(_);return this.each(function(F){m(this).wrapAll(L?_.call(this,F):_)})},unwrap:function(_){return this.parent(_).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(_){return!m.expr.pseudos.visible(_)},m.expr.pseudos.visible=function(_){return!!(_.offsetWidth||_.offsetHeight||_.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Xe={0:200,1223:204},Qe=m.ajaxSettings.xhr();p.cors=!!Qe&&"withCredentials"in Qe,p.ajax=Qe=!!Qe,m.ajaxTransport(function(_){var L,F;if(p.cors||Qe&&!_.crossDomain)return{send:function(D,j){var H,G=_.xhr();if(G.open(_.type,_.url,_.async,_.username,_.password),_.xhrFields)for(H in _.xhrFields)G[H]=_.xhrFields[H];_.mimeType&&G.overrideMimeType&&G.overrideMimeType(_.mimeType),!_.crossDomain&&!D["X-Requested-With"]&&(D["X-Requested-With"]="XMLHttpRequest");for(H in D)G.setRequestHeader(H,D[H]);L=function(ne){return function(){L&&(L=F=G.onload=G.onerror=G.onabort=G.ontimeout=G.onreadystatechange=null,ne==="abort"?G.abort():ne==="error"?typeof G.status!="number"?j(0,"error"):j(G.status,G.statusText):j(Xe[G.status]||G.status,G.statusText,(G.responseType||"text")!=="text"||typeof G.responseText!="string"?{binary:G.response}:{text:G.responseText},G.getAllResponseHeaders()))}},G.onload=L(),F=G.onerror=G.ontimeout=L("error"),G.onabort!==void 0?G.onabort=F:G.onreadystatechange=function(){G.readyState===4&&t.setTimeout(function(){L&&F()})},L=L("abort");try{G.send(_.hasContent&&_.data||null)}catch(ne){if(L)throw ne}},abort:function(){L&&L()}}}),m.ajaxPrefilter(function(_){_.crossDomain&&(_.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(_){return m.globalEval(_),_}}}),m.ajaxPrefilter("script",function(_){_.cache===void 0&&(_.cache=!1),_.crossDomain&&(_.type="GET")}),m.ajaxTransport("script",function(_){if(_.crossDomain||_.scriptAttrs){var L,F;return{send:function(D,j){L=m("<script>").attr(_.scriptAttrs||{}).prop({charset:_.scriptCharset,src:_.url}).on("load error",F=function(H){L.remove(),F=null,H&&j(H.type==="error"?404:200,H.type)}),x.head.appendChild(L[0])},abort:function(){F&&F()}}}});var Oe=[],at=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var _=Oe.pop()||m.expando+"_"+Gs.guid++;return this[_]=!0,_}}),m.ajaxPrefilter("json jsonp",function(_,L,F){var D,j,H,G=_.jsonp!==!1&&(at.test(_.url)?"url":typeof _.data=="string"&&(_.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&at.test(_.data)&&"data");if(G||_.dataTypes[0]==="jsonp")return D=_.jsonpCallback=g(_.jsonpCallback)?_.jsonpCallback():_.jsonpCallback,G?_[G]=_[G].replace(at,"$1"+D):_.jsonp!==!1&&(_.url+=(Na.test(_.url)?"&":"?")+_.jsonp+"="+D),_.converters["script json"]=function(){return H||m.error(D+" was not called"),H[0]},_.dataTypes[0]="json",j=t[D],t[D]=function(){H=arguments},F.always(function(){j===void 0?m(t).removeProp(D):t[D]=j,_[D]&&(_.jsonpCallback=L.jsonpCallback,Oe.push(D)),H&&g(j)&&j(H[0]),H=j=void 0}),"script"}),p.createHTMLDocument=function(){var _=x.implementation.createHTMLDocument("").body;return _.innerHTML="<form></form><form></form>",_.childNodes.length===2}(),m.parseHTML=function(_,L,F){if(typeof _!="string")return[];typeof L=="boolean"&&(F=L,L=!1);var D,j,H;return L||(p.createHTMLDocument?(L=x.implementation.createHTMLDocument(""),D=L.createElement("base"),D.href=x.location.href,L.head.appendChild(D)):L=x),j=re.exec(_),H=!F&&[],j?[L.createElement(j[1])]:(j=Is([_],L,H),H&&H.length&&m(H).remove(),m.merge([],j.childNodes))},m.fn.load=function(_,L,F){var D,j,H,G=this,ne=_.indexOf(" ");return ne>-1&&(D=ei(_.slice(ne)),_=_.slice(0,ne)),g(L)?(F=L,L=void 0):L&&typeof L=="object"&&(j="POST"),G.length>0&&m.ajax({url:_,type:j||"GET",dataType:"html",data:L}).done(function(ee){H=arguments,G.html(D?m("<div>").append(m.parseHTML(ee)).find(D):ee)}).always(F&&function(ee,le){G.each(function(){F.apply(this,H||[ee.responseText,le,ee])})}),this},m.expr.pseudos.animated=function(_){return m.grep(m.timers,function(L){return _===L.elem}).length},m.offset={setOffset:function(_,L,F){var D,j,H,G,ne,ee,le,ge=m.css(_,"position"),be=m(_),fe={};ge==="static"&&(_.style.position="relative"),ne=be.offset(),H=m.css(_,"top"),ee=m.css(_,"left"),le=(ge==="absolute"||ge==="fixed")&&(H+ee).indexOf("auto")>-1,le?(D=be.position(),G=D.top,j=D.left):(G=parseFloat(H)||0,j=parseFloat(ee)||0),g(L)&&(L=L.call(_,F,m.extend({},ne))),L.top!=null&&(fe.top=L.top-ne.top+G),L.left!=null&&(fe.left=L.left-ne.left+j),"using"in L?L.using.call(_,fe):be.css(fe)}},m.fn.extend({offset:function(_){if(arguments.length)return _===void 0?this:this.each(function(j){m.offset.setOffset(this,_,j)});var L,F,D=this[0];if(D)return D.getClientRects().length?(L=D.getBoundingClientRect(),F=D.ownerDocument.defaultView,{top:L.top+F.pageYOffset,left:L.left+F.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var _,L,F,D=this[0],j={top:0,left:0};if(m.css(D,"position")==="fixed")L=D.getBoundingClientRect();else{for(L=this.offset(),F=D.ownerDocument,_=D.offsetParent||F.documentElement;_&&(_===F.body||_===F.documentElement)&&m.css(_,"position")==="static";)_=_.parentNode;_&&_!==D&&_.nodeType===1&&(j=m(_).offset(),j.top+=m.css(_,"borderTopWidth",!0),j.left+=m.css(_,"borderLeftWidth",!0))}return{top:L.top-j.top-m.css(D,"marginTop",!0),left:L.left-j.left-m.css(D,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var _=this.offsetParent;_&&m.css(_,"position")==="static";)_=_.offsetParent;return _||on})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(_,L){var F=L==="pageYOffset";m.fn[_]=function(D){return Ut(this,function(j,H,G){var ne;if(w(j)?ne=j:j.nodeType===9&&(ne=j.defaultView),G===void 0)return ne?ne[L]:j[H];ne?ne.scrollTo(F?ne.pageXOffset:G,F?G:ne.pageYOffset):j[H]=G},_,D,arguments.length)}}),m.each(["top","left"],function(_,L){m.cssHooks[L]=Zi(p.pixelPosition,function(F,D){if(D)return D=Qi(F,L),La.test(D)?m(F).position()[L]+"px":D})}),m.each({Height:"height",Width:"width"},function(_,L){m.each({padding:"inner"+_,content:L,"":"outer"+_},function(F,D){m.fn[D]=function(j,H){var G=arguments.length&&(F||typeof j!="boolean"),ne=F||(j===!0||H===!0?"margin":"border");return Ut(this,function(ee,le,ge){var be;return w(ee)?D.indexOf("outer")===0?ee["inner"+_]:ee.document.documentElement["client"+_]:ee.nodeType===9?(be=ee.documentElement,Math.max(ee.body["scroll"+_],be["scroll"+_],ee.body["offset"+_],be["offset"+_],be["client"+_])):ge===void 0?m.css(ee,le,ne):m.style(ee,le,ge,ne)},L,G?j:void 0,G)}})}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_,L){m.fn[L]=function(F){return this.on(L,F)}}),m.fn.extend({bind:function(_,L,F){return this.on(_,null,L,F)},unbind:function(_,L){return this.off(_,null,L)},delegate:function(_,L,F,D){return this.on(L,_,F,D)},undelegate:function(_,L,F){return arguments.length===1?this.off(_,"**"):this.off(L,_||"**",F)},hover:function(_,L){return this.mouseenter(_).mouseleave(L||_)}}),m.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(_,L){m.fn[L]=function(F,D){return arguments.length>0?this.on(L,null,F,D):this.trigger(L)}});var Ot=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;m.proxy=function(_,L){var F,D,j;if(typeof L=="string"&&(F=_[L],L=_,_=F),!!g(_))return D=o.call(arguments,2),j=function(){return _.apply(L||this,D.concat(o.call(arguments)))},j.guid=_.guid=_.guid||m.guid++,j},m.holdReady=function(_){_?m.readyWait++:m.ready(!0)},m.isArray=Array.isArray,m.parseJSON=JSON.parse,m.nodeName=M,m.isFunction=g,m.isWindow=w,m.camelCase=Ht,m.type=v,m.now=Date.now,m.isNumeric=function(_){var L=m.type(_);return(L==="number"||L==="string")&&!isNaN(_-parseFloat(_))},m.trim=function(_){return _==null?"":(_+"").replace(Ot,"$1")};var St=t.jQuery,sn=t.$;return m.noConflict=function(_){return t.$===m&&(t.$=sn),_&&t.jQuery===m&&(t.jQuery=St),m},typeof n>"u"&&(t.jQuery=t.$=m),m})})(tC);var r3=tC.exports;const ar=ks(r3);var jr;let jt=(jr=class{static init(t){return jr._instance||(jr._instance=new jr(t)),jr._instance}static enable(){jr._instance.enabled=!0}static disable(){jr._instance.enabled=!1}static debug(...t){jr._instance.enabled&&console.log("CozyNest:DEBUG:",...t)}static log(...t){console.log("CozyNest:",...t)}constructor(t){this.enabled=t}},Ld(jr,"_instance",null),jr);jt.init(!1);window.CozyLogger=jt;const ts=class{static time(t){return ts.timers[t]=new ts(t),ts.timers[t]}static end(t){const n=ts.timers[t].end();return jt.debug(`SimpleTimer: end ${t} in ${n}ms`),n}static last(t){return localStorage.getItem(t)&&Number(localStorage.getItem(t))}static get(t){return ts.timers[t].get()}constructor(t){this.timerName=t,this.startTime=new Date}get(){return new Date-this.startTime}end(){const n=new Date-this.startTime;return localStorage.setItem(this.timerName,`${n}`),n}};let vo=ts;Ld(vo,"timers",{});const th=()=>{const e=window.location.href;return e.includes("?__theme=")?e.split("?__theme=")[1]:"dark"},pp=e=>{const t=parseInt(e.replace("#",""),16),n=t>>16&255,r=t>>8&255,i=t&255;return`${n} ${r} ${i}`},i3=(e,t)=>{const n=e.split("."),r=t.split(".");for(let i=0;i<Math.max(n.length,r.length);i++){const o=parseInt(n[i])||0,l=parseInt(r[i])||0;if(o<l)return!1;if(o>l)return!0}return!0},nC=e=>{const t=e.replace("#",""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),i=parseInt(t.substr(4,2),16);return(.2126*n+.7152*r+.0722*i)/255},Og=.75,o3=e=>{e=e.replace("#","");const t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16),i=Math.floor(t*Og),o=Math.floor(n*Og),l=Math.floor(r*Og);return`rgb(${i},${o},${l})`},a3=()=>{const e=document.querySelector("#txt2img_lora_cards"),t=e.firstChild;for(let n=0;n<100;n++){const r=e.querySelector(".card").cloneNode(!0);e.insertBefore(r,t)}},s3=()=>{const t=document.querySelector("#txt2img_controlnet").parentElement;for(let n=0;n<100;n++){const r=t.cloneNode(!0);t.parentElement.insertBefore(r,t)}},l3=()=>{const e=$("#txt2img_lora_subdirs");e.append(e.html())},rC="CozyNest:tweakLoadDuration",nh="CozyNest:gradioLoadDuration",Sw=420,xw=320,rh=200,u3="unknown",Ec="sd.next",iC="auto1111",oC="<div id='nevy_waves'><div class='wave'></div> <div class='wave'></div><div class='wave'></div></div>",c3='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"/></svg>',d3='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39V184c0-13.3-10.7-24-24-24s-24 10.7-24 24V318.1l-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z"/></svg>',f3='<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>',h3='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="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"/></svg>';function aC(e){COZY_NEST_CONFIG.waves_color=e;const t=pp(e);document.querySelectorAll(".wave").forEach(n=>{n.setAttribute("style",`background: rgb(${t} / 16%)`)})}function sC(e){COZY_NEST_CONFIG.font_color=e;const t=pp(e);document.querySelector(":root").style.setProperty("--nevysha-font-color",`rgb(${t})`),document.querySelector(":root").style.setProperty("--nevysha-font-color-subdued",o3(e))}function lC(e){COZY_NEST_CONFIG.bg_gradiant_color=e;const t=pp(e);document.querySelector(":root").style.setProperty("--nevysha-gradiant-1",`rgb(${t})`)}function uC(e,t){COZY_NEST_CONFIG.accent_color=e;const n=pp(e);document.querySelector(":root").style.setProperty("--ae-primary-color",`rgb(${n})`),nC(t)>.5?document.querySelector(":root").style.setProperty("--nevysha-color-from-luminance","black"):document.querySelector(":root").style.setProperty("--nevysha-color-from-luminance","white")}const p3=e=>{COZY_NEST_CONFIG.disable_waves_and_gradiant=e;const t=ar(".wave"),n=ar("body");e?(t.css("animation","none"),n.css("animation","none"),n.css("background-position","75% 75%")):(t.css("animation",""),n.css("animation",""),n.css("background-position",""))},g3=(e,t)=>{COZY_NEST_CONFIG.accent_generate_button=e,document.querySelectorAll('button[id$="_generate"]').forEach(n=>{if(e){let r="";nC(t)>.5&&(r="color: black !important"),n.setAttribute("style",`background: var(--ae-primary-color) !important; ${r}`)}else n.setAttribute("style","")})},m3=e=>{COZY_NEST_CONFIG.font_size=e,document.querySelector(":root").style.setProperty("--nevysha-text-md",`${e}px`),gp()},v3=e=>{COZY_NEST_CONFIG.card_height=e,document.querySelector(":root").style.setProperty("--extra-network-card-height",`${e}em`)},y3=e=>{COZY_NEST_CONFIG.card_width=e,document.querySelector(":root").style.setProperty("--extra-network-card-width",`${e}em`)},b3=e=>{var t,n;COZY_NEST_CONFIG.main_menu_position=e,e==="top"||e==="top_centered"?(document.querySelector(".nevysha.nevysha-tabnav").classList.add("menu-fix-top"),document.querySelector(".gradio-container.app").classList.add("menu-fix-top"),(t=document.querySelector("#nevysha-btn-menu-wrapper"))==null||t.classList.add("menu-fix-top"),document.querySelector(":root").style.setProperty("--nevysha-margin-left","0"),document.querySelector(":root").style.setProperty("--menu-top-height","25px"),e==="top_centered"?document.querySelector(".nevysha.nevysha-tabnav").classList.add("center-menu-items"):document.querySelector(".nevysha.nevysha-tabnav").classList.remove("center-menu-items")):(document.querySelector(".nevysha.nevysha-tabnav").classList.remove("center-menu-items"),document.querySelector(".nevysha.nevysha-tabnav").classList.remove("menu-fix-top"),document.querySelector(".gradio-container.app").classList.remove("menu-fix-top"),(n=document.querySelector("#nevysha-btn-menu-wrapper"))==null||n.classList.remove("menu-fix-top"),document.querySelector(":root").style.setProperty("--nevysha-margin-left","175px"),document.querySelector(":root").style.setProperty("--menu-top-height","1px")),gp()},w3=e=>{COZY_NEST_CONFIG.quicksettings_position=e,e==="split"?(document.querySelector("#quicksettings_gap").classList.add("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.remove("centered-quicksettings")):e==="centered"?(document.querySelector("#quicksettings_gap").classList.remove("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.add("centered-quicksettings")):(document.querySelector("#quicksettings_gap").classList.remove("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.remove("centered-quicksettings"))},S3=e=>{COZY_NEST_CONFIG.sfw_mode=e,e?document.querySelector("body").classList.add("nsfw"):document.querySelector("body").classList.remove("nsfw")},gp=()=>{let e=0;const t=document.getElementById("tabs"),n=document.querySelector("#footer #footer");let r;if(n?r=n.offsetHeight:COZY_NEST_CONFIG.webui===Ec?r=5:r=0,COZY_NEST_CONFIG.main_menu_position!=="left"){e=document.querySelector(".tab-nav.nevysha-tabnav").offsetHeight+2,document.querySelector(":root").style.setProperty("--menu-top-height",`${e}px`);const o=ar(".gradio-container.app");o.attr("style",`${o.attr("style")} padding-top: ${e}px !important;`);const d=t.getBoundingClientRect().top;document.querySelector(":root").style.setProperty("--main-container-height",`${window.innerHeight-(d+r)}px`),window.troubleshootSize={menuHeight:e,footerHeight:r,tabsTop:d,WindowInnerHeight:window.innerHeight,bodyHeight:window.innerHeight-(d+r),"main-container-height":`${window.innerHeight-(d+r)}px`}}else{document.querySelector(":root").style.setProperty("--menu-top-height","1px");const i=ar(".gradio-container.app");i.attr("style",`${i.attr("style")} padding-top: ${e}px !important;`);const l=t.getBoundingClientRect().top;document.querySelector(":root").style.setProperty("--main-container-height",`${window.innerHeight-(l+r)}px`),window.troubleshootSize={menuHeight:e,footerHeight:r,tabsTop:l,WindowInnerHeight:window.innerHeight,bodyHeight:window.innerHeight-(l+r),"main-container-height":`${window.innerHeight-(l+r)}px`}}},x3=({prefix:e})=>{const t=document.querySelectorAll(`#tab_${e} div#${e}_results > *:not(#${e}_results)`),n=t[1].querySelectorAll(`#html_info_${e}, #html_log_${e}`),r=document.createElement("div");r.classList.add("preview-block-wrapper");const i=document.createElement("button");i.id="toggleGenInfoButton",i.classList.add("nevysha","lg","primary","gradio-button","btn"),i.textContent="Show/Hide Generation Info",i.addEventListener("click",()=>{n.forEach(o=>o.style.display=o.style.display==="none"?"":"none")}),r.appendChild(i),n.forEach(o=>r.appendChild(o)),t[1].appendChild(r),n.forEach(o=>o.style.display="none"),t[1].style=""};function _3({prefix:e}){const t=document.getElementById(`${e}_settings`);t.parentElement.classList.add("nevysha","settings-gradio-parent");const n=document.getElementById(`${e}_toprow`),r=document.getElementById(`${e}_generate`),i=t.querySelectorAll(`:scope > :not(#${e}_toprow)`),o=document.createElement("div");o.classList.add("nevysha","settings-wrapper");for(let c of i)c.classList.add("nevysha","settings-child"),o.appendChild(c);t.appendChild(o),o.insertBefore(n,o.firstChild),r.classList.add("nevysha","generate-button"),t.insertBefore(r,t.firstChild);const l=document.getElementById(`${e}_skip`);l.classList.add("nevysha","skip-button");const d=document.getElementById(`${e}_interrupt`);d.classList.add("nevysha","interrupt-button");const a=document.createElement("div");a.classList.add("nevysha","skip-interrupt-wrapper"),a.appendChild(l),a.appendChild(d),t.insertBefore(a,t.firstChild)}function cC(){const e=document.createElement("div");e.classList.add("vertical-line-wrapper");const t=document.createElement("div");return t.classList.add("vertical-line"),e.appendChild(t),e}var Hr;let _w=(Hr=class{static start(){Hr._instance||(Hr._instance=new Hr),Hr._instance.pushLoading(),Hr._instance.setupObserver()}static stop(){Hr._instance&&Hr._instance.observer.disconnect(),document.querySelector("#nevysha-loading-wrap").remove()}constructor(){this.observer=null}setupObserver(){const t=vo.last(nh)+2e3,n=t||15e3;this.observer=new MutationObserver(i=>{if(i[0].target.id!=="loading_step_estimator"){const o=vo.get(nh);if(o<n+1e3){const l=Math.min(Math.round(o/n*100),99);document.querySelector("#loading_step_estimator").innerText=`${l}%`}else document.querySelector("#loading_step_estimator").innerText="Woops, it's taking longer than expected...";this.pushLoading()}});const r={attributes:!0,childList:!0,subtree:!0};this.observer.observe(document.body,r)}pushLoading(){if(document.querySelector("#nevysha-loading"))return;const n=`<div id='nevysha-loading-wrap' class='nevysha ${th()==="light"?"nevysha-light":""}'>
<div id='nevysha-loading' class='nevysha'>
<div class="nevysha-loading-progress">
<div class="nevysha-cozy-nest-app-name animate__animated animate__backInLeft">
Cozy Nest
</div>
${f3}
<div id="loading_step_estimator" class="subtext3 animate__animated animate__pulse animate__infinite">
1
</div>
<div class="subtext1 animate__animated animate__pulse animate__infinite">
Loading The Magic
</div>
<div class="subtext2 animate__animated animate__pulse animate__infinite">
(and gradio)
</div>
</div>
${oC}
<div class="footer">Made by Nevysha with <span class="heart">❤</span> and <span class="coffee">☕</span></div>
</div>
</div>`;document.querySelector("body").insertAdjacentHTML("beforeend",n);let r=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG"));r={waves_color:"#ffffff",bg_gradiant_color:"#ffffff",accent_color:"#ffffff",font_color:"#ffffff",font_color_light:"#000000",...r},aC(r.waves_color),lC(r.bg_gradiant_color),uC(r.accent_color,r.accent_color),sC(th()==="light"?r.font_color_light:r.font_color)}},Ld(Hr,"_instance",null),Hr);function C3(){const e=`
<div id="dialog-message-wrap" title="🥺 Woops - Cozy Nest Error ?" style="display:none;">
<div id="dialog-message">
<div class="header">
<h1>🥺 Woops - Cozy Nest Error ?</h1>
<button class="lg primary gradio-button svelte-1ipelgc nevysha" onClick="hideInstanceInfoDialog();return false;">Close</button>
</div>
<p class="cozynest-error-tips">Want to report an issue ? Screenshot me and post me on <a href="https://github.com/Nevysha/Cozy-Nest">Github</a></p>
<fieldset>
<legend>Instance info</legend>
<div class="versions cozyerror" id="cozynest-error-instance-info"></div>
</fieldset>
<fieldset class="extensions-list">
<legend>Extensions</legend>
<div class="cozyerror" id="cozynest-error-extentions"></div>
</fieldset>
<div id="cozy_nest_error_handling_display"></div>
<div id="cozy_nest_error_handling_display_stack" /></div>
</div>
</div>
`;document.querySelector("body").insertAdjacentHTML("beforeend",e)}function dC(){document.querySelector("#cozy_nest_error_handling_display").innerHTML="",document.querySelector("#cozy_nest_error_handling_display_stack").innerHTML="",document.querySelector("#cozy_nest_error_handling_display_stack").setAttribute("style","display: none;"),document.querySelector("#cozynest-error-instance-info").innerHTML=document.querySelector(".versions").innerHTML+`<br><br>Browser: <span>${navigator.userAgent}</span><br><br>Window size: <span>${window.innerWidth}x${window.innerHeight}</span><br><br>WebUI: <span>${COZY_NEST_CONFIG.webui}</span>`,document.querySelector("#cozynest-error-extentions").innerHTML=document.querySelector("#tabs_extensions").querySelector("#extensions").parentElement.innerHTML,document.querySelector("#cozynest-error-extentions > table").querySelectorAll("tr").forEach(e=>{var n;if(!e.querySelector("td"))return;let t=e.querySelector("td").querySelector("label > input");t||(t=e.querySelector("td").querySelector("input"),(n=e.querySelector("button"))==null||n.setAttribute("disabled","disabled")),t.checked?t.setAttribute("disabled","disabled"):e.setAttribute("style","display: none;")})}function fC(){ar("#dialog-message-wrap").css("display","flex")}function k3(){ar("#dialog-message-wrap").css("display","none")}window.hideInstanceInfoDialog=k3;function E3(){dC(),fC()}window.gatherInfoAndShowDialog=E3;function $3({prefix:e}){if(!COZY_NEST_CONFIG.enable_clear_button){jt.debug("Clear button is disabled");return}const t=document.querySelector(`#${e}_gallery`);function n(c){a.style.display="block"}const r={childList:!0,subtree:!0};function i(c,s){var u;for(const f of c)f.type==="childList"&&f.removedNodes.length>0&&(u=f.removedNodes[0].classList)!=null&&u.contains("empty")&&n()}new MutationObserver(i).observe(t,r);function l(){const c=document.createElement("button");return c.id=`${e}_gallery_clear_button`,c.classList.add("nevysha","lg","primary","gradio-button"),c.style.display="none",c.title="Clear generated images gallery",c.innerHTML=h3,c.addEventListener("click",()=>{t.querySelectorAll("img").forEach(s=>{s&&(s.parentNode.style.display="none",d(s))}),c.style.display="none"}),t.insertAdjacentElement("beforebegin",c),c}function d(c){function s(h,p){for(const g of h)g.type==="attributes"&&g.attributeName==="src"&&(c.parentNode.style.display="block",p.disconnect(),a.style.display="block")}const u={attributes:!0,attributeFilter:["src"]};new MutationObserver(s).observe(c,u)}const a=l()}let dv,hC,pC;function T3(){const e=`
<div id="cozy-alert-wrap" title="Cozy Alert" style="display:none;">
<div>
<div class="header">
<h1 id="cozy-alert-title"></h1>
</div>
<p id="cozy-alert-msg"></p>
<button class="lg primary gradio-button svelte-1ipelgc nevysha" id="cozy-alert-close">Close</button>
</div>
</div>
`;document.querySelector("body").insertAdjacentHTML("beforeend",e),dv=document.querySelector("#cozy-alert-wrap"),hC=document.querySelector("#cozy-alert-title"),pC=document.querySelector("#cozy-alert-msg"),document.querySelector("#cozy-alert-close").addEventListener("click",()=>{dv.setAttribute("style","display: none;")})}function i0(e,t){hC.innerHTML=e,pC.innerHTML=t,dv.setAttribute("style","display: flex;")}window.showAlert=i0;window.$=window.jQuery=ar;const A3=({prefix:e})=>{const t=document.getElementById(`${e}_settings`);t.style.minWidth=`min(${Sw}px, 100%)`;const n=cC();t.insertAdjacentElement("afterend",n);const r=t.parentElement;r.classList.add("nevysha","resizable-children-container");const i=document.getElementById(`${e}_results`);t.style.minWidth=`min(${xw}px, 100%)`;let o=localStorage.getItem(`${e}_linePosition`);o||(o=50,localStorage.setItem(`${e}_linePosition`,`${o}`)),t.style.flexBasis=`${o}%`,i.style.flexBasis=`${100-o}%`;let l=!1;n.addEventListener("mousedown",d=>{l=!0,d.preventDefault()}),document.addEventListener("mousemove",d=>{if(!l)return;const a=document.querySelector(`#tab_${e}`);let c=a.offsetLeft,s=a.offsetParent;for(;s;)c+=s.offsetLeft,s=s.offsetParent;const u=r.offsetWidth,h=(d.clientX-c)/u*100;h<=Sw/u*100||h>=(1-xw/u)*100||(localStorage.setItem(`${e}_linePosition`,`${h}`),t.style.flexBasis=`${h}%`,i.style.flexBasis=`${100-h}%`)}),document.addEventListener("mouseup",()=>{l=!1})},M3=()=>{document.querySelectorAll("button").forEach(e=>{e.textContent.includes("📂")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"/></svg>'),e.textContent.includes("🔄")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"/></svg>'),e.textContent.includes("↙️")&&(e.innerHTML='<svg class="nevysha svg-icon rotate" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>'),e.textContent.includes("🗑️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>'),e.textContent.includes("🎴")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>'),e.textContent.includes("📋")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M280 64h40c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128C0 92.7 28.7 64 64 64h40 9.6C121 27.5 153.3 0 192 0s71 27.5 78.4 64H280zM64 112c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320c8.8 0 16-7.2 16-16V128c0-8.8-7.2-16-16-16H304v24c0 13.3-10.7 24-24 24H192 104c-13.3 0-24-10.7-24-24V112H64zm128-8a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/></svg>'),e.textContent.includes("💾")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M48 96V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V170.5c0-4.2-1.7-8.3-4.7-11.3l33.9-33.9c12 12 18.7 28.3 18.7 45.3V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H309.5c17 0 33.3 6.7 45.3 18.7l74.5 74.5-33.9 33.9L320.8 84.7c-.3-.3-.5-.5-.8-.8V184c0 13.3-10.7 24-24 24H104c-13.3 0-24-10.7-24-24V80H64c-8.8 0-16 7.2-16 16zm80-16v80H272V80H128zm32 240a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/></svg>'),e.textContent.includes("🎲️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!-- Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"/></svg>'),e.textContent.includes("♻️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M174.7 45.1C192.2 17 223 0 256 0s63.8 17 81.3 45.1l38.6 61.7 27-15.6c8.4-4.9 18.9-4.2 26.6 1.7s11.1 15.9 8.6 25.3l-23.4 87.4c-3.4 12.8-16.6 20.4-29.4 17l-87.4-23.4c-9.4-2.5-16.3-10.4-17.6-20s3.4-19.1 11.8-23.9l28.4-16.4L283 79c-5.8-9.3-16-15-27-15s-21.2 5.7-27 15l-17.5 28c-9.2 14.8-28.6 19.5-43.6 10.5c-15.3-9.2-20.2-29.2-10.7-44.4l17.5-28zM429.5 251.9c15-9 34.4-4.3 43.6 10.5l24.4 39.1c9.4 15.1 14.4 32.4 14.6 50.2c.3 53.1-42.7 96.4-95.8 96.4L320 448v32c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-64-64c-9.4-9.4-9.4-24.6 0-33.9l64-64c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2v32l96.2 0c17.6 0 31.9-14.4 31.8-32c0-5.9-1.7-11.7-4.8-16.7l-24.4-39.1c-9.5-15.2-4.7-35.2 10.7-44.4zm-364.6-31L36 204.2c-8.4-4.9-13.1-14.3-11.8-23.9s8.2-17.5 17.6-20l87.4-23.4c12.8-3.4 26 4.2 29.4 17L182 241.2c2.5 9.4-.9 19.3-8.6 25.3s-18.2 6.6-26.6 1.7l-26.5-15.3L68.8 335.3c-3.1 5-4.8 10.8-4.8 16.7c-.1 17.6 14.2 32 31.8 32l32.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32.2 0C42.7 448-.3 404.8 0 351.6c.1-17.8 5.1-35.1 14.6-50.2l50.3-80.5z"/></svg>')})};function L3(){const e=document.getElementById("img2maskimg"),t=document.createElement("button");t.setAttribute("id","expendBtn"),t.setAttribute("class","nevysha lg primary gradio-button btn"),t.textContent="Expand",e.insertAdjacentElement("beforeend",t);const n=document.getElementById("img2maskimg");let r=n.getAttribute("style"),i=[],o=!1;t.addEventListener("click",()=>{if(document.querySelectorAll("canvas")){if(o)t.textContent="Expand",t.style.position="absolute",n.setAttribute("style",r),document.querySelector("#img2maskimg > .image-container").querySelector("button:nth-child(3)").style.display="block",i.forEach(l=>{document.getElementById(l.id).setAttribute("style",l.defaultStyle)});else{t.textContent="Reduce",t.style.position="fixed",n.style.position="fixed",n.style.zIndex=999,n.style.top="5px",n.style.left="5px",n.style.width="calc(100vw - 10px)",n.style.height="calc(100vh - 10px)",n.style.overflow="",document.querySelector("#img2maskimg > .image-container").querySelector("button:nth-child(3)").style.display="none";const l=document.querySelectorAll("canvas");i=[],l.forEach(d=>{let a=`nevysha-${d.getAttribute("key")}-canvas`;d.setAttribute("id",a),d.classList.add("nevysha"),i.push({id:a,defaultStyle:d.getAttribute("style")}),d.style.maxWidth="calc(100vw - 20px)",d.style.width="",d.style.maxHeight="calc(100vh - 20px)",d.style.height=""})}o=!o}})}function R3(e){document.getElementById(`${e.prefix}_gallery_container`).classList.add("nevysha","nevysha-scrollable")}function P3(){const e=new MutationObserver((r,i)=>{for(const o of r)if(o.type==="childList"&&Array.from(o.addedNodes).find(a=>a.id==="AWQ-container")){i.disconnect(),n();break}}),t={childList:!0,subtree:!0};e.observe(document.documentElement,t);const n=()=>{const r=document.querySelector("#AWQ-container"),i=document.createElement("div");i.id="nevysha_awq_wrapper",i.style.zIndex="9999",i.style.display="none",i.style.position="fixed",i.style.bottom="30px",document.body.appendChild(i),i.appendChild(r);const o=document.createElement("button");o.classList.add("nevysha-btn-menu","nevysha-btn-menu-awq","gradio-button","primary","nevysha"),o.id="nevyui_awq_btn",o.innerHTML="Show/Hide AWQ",o.title="Show/Hide AWQ",o.setAttribute("style","position: fixed; bottom: 0; left: calc(50% - 75px); width: 150px;"),document.querySelector("div.app").insertAdjacentElement("beforeend",o),o.addEventListener("click",()=>{i.style.display==="none"?i.style.display="block":i.style.display="none"})}}const I3=()=>{const e=document.createElement("div");e.classList.add("nevysha-btn-menu-wrapper"),e.id="nevysha-btn-menu-wrapper";const t=`<button class="nevysha-btn-menu" id="nevyui_update_info" title="Nevysha Cozy Nest Update Info">${d3}</button>`;e.insertAdjacentHTML("beforeend",t),document.querySelector("#tabs > div.tab-nav").insertAdjacentElement("beforeend",e);const n=document.createElement("div");n.classList.add("nevysha-update-tab","nevysha","nevysha-tab","nevysha-tab-settings"),n.id="nevyui_update_info_panel",n.style="display: none;",document.querySelector("#tabs").insertAdjacentElement("beforeend",n);function r(){let i=!1;document.querySelector("#nevyui_update_info").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),document.querySelector("#tab_nevyui").style.display="block",i?ar("#nevyui_update_info_panel").slideUp(rh):ar("#nevyui_update_info_panel").slideDown(rh),i=!i})}r(),O3().then(i=>i)};async function O3(){const e=await(await fetch(`file=extensions/Cozy-Nest/version_data.json?${new Date}`)).json(),t=await(await fetch(`https://raw.githubusercontent.com/Nevysha/Cozy-Nest/main/version_data.json?${new Date}`)).json();let n=await(await fetch(`https://raw.githubusercontent.com/Nevysha/Cozy-Nest/main/PATCHNOTE.md?t=${new Date}`)).text(),r=`<div class="nevysha-tabnav nevysha-tabnav-settings"><h2 class="nevysha-tabnav-title">Patchnote [${t.version}]</h2></div>`;document.querySelector("#nevyui_update_info_panel").insertAdjacentHTML("beforeend",r);const i=/\[x\]/g;n=n.replace(i,"");const o=/\[ \]/g;n=n.replace(o,"");const d=`<article class="markdown-body nevysha nevysha-scrollable">${new n3.Converter().makeHtml(n)}</article>`;document.querySelector("#nevyui_update_info_panel").insertAdjacentHTML("beforeend",d);const a=document.createElement("div");a.classList.add("nevysha-version-info","nevysha-emphasis"),a.id="nevysha-version-info",document.querySelector("#nevyui_update_info_panel").insertAdjacentElement("afterbegin",a);const c='<button class="nevysha-btn-menu lg primary gradio-button nevysha generate-button" id="nevyui_update_btn" title="Update Cozy Nest">Update</button>';if(document.querySelector("#nevysha-version-info").insertAdjacentHTML("beforeend",c),document.querySelector("#nevyui_update_btn").addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),document.querySelector("#nevyui_sh_options_update").click(),document.querySelector("#nevyui_update_btn").innerHTML="Update in progress...",setTimeout(()=>{document.querySelector("#settings_restart_gradio").click()},5e3)}),i3(e.version,t.version)){const u=`<p class="nevysha-version-info-text">You are up to date! (installed: v${e.version})</p>`;document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",u),document.querySelector("#nevyui_update_btn").style.display="none",document.getElementsByClassName("versions")[0].innerHTML+='Cozy Nest: <a href="https://github.com/Nevysha/Cozy-Nest" target="_blank">v'+e.version+"</a>"}else{const u=`<p class="nevysha-version-info-text">An update is available! (installed: v${e.version}, new : v${t.version})</p>`;document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",u),document.querySelector("#nevyui_update_info > svg").style.fill="red",document.getElementsByClassName("versions")[0].innerHTML+=`Cozy Nest:<span style="color: #f9e02d; text-decoration: underline;" title="Nevysha's Cozy Nest Update Available! Latest version: v`+t.version+`.
View update info in the top-right corner for more details.">v`+e.version+"</span>"}const s='<button class="nevysha-btn-menu lg primary gradio-button nevysha generate-button" id="nevyui_update_info_close_btn" title="Close">Close</button>';document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",s),document.querySelector("#nevyui_update_info_close_btn").addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),document.querySelector("#nevyui_update_info").click()})}const F3=()=>{const e=document.createElement("button"),t=document.querySelector("div#tabs > .tab-nav");e.setAttribute("id","nevysha_tab_wrapper"),e.classList.add("nevysha","tab-wrapper"),t.querySelector("button").classList.forEach(h=>{h.startsWith("svelte-")&&e.classList.add(h)}),e.innerHTML="Others",t.insertBefore(e,t.lastChild);const n=document.createElement("div");n.setAttribute("id","nevysha_other_tabs"),n.classList.add("nevysha","other-tabs"),n.style.display="none",e.appendChild(n);let r=!1;e.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),r?ar("#nevysha_other_tabs").slideUp(100):ar("#nevysha_other_tabs").slideDown(200),r=!r});function i(h){h.dataTransfer.setData("text/plain",h.target.id)}function o(h){const p=JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[];p.includes(h.target.id)||(p.push(h.target.id),localStorage.setItem("nevysha_moved_tabs",JSON.stringify(p)))}function l(h){h.preventDefault()}function d(h){if(n.querySelector(`button #${h.id}`))return;const p=document.createElement("button");p.setAttribute("id",h.id),p.classList.add("nevysha","tab-nav","nevysha-other-tab"),p.setAttribute("draggable",!0),p.addEventListener("dragstart",i),p.addEventListener("dragend",o),p.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),document.querySelector(`div#tabs > .tab-nav > #${h.id}`).click(),ar("#nevysha_other_tabs").slideUp(),r=!r}),h.style.display="none",n.appendChild(p);const g=document.createElement("span");g.setAttribute("id",`remove-${h.id}`),g.classList.add("remove-nevysha-other-tab"),g.innerHTML="X",g.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),n.removeChild(p),document.querySelector(`div#tabs > .tab-nav > #${h.id}`).style.display="block";const S=JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[],T=S.indexOf(h.id);T>-1&&S.splice(T,1),localStorage.setItem("nevysha_moved_tabs",JSON.stringify(S))}),p.appendChild(g);const w=document.createElement("span");w.classList.add("nevysha-other-tab-text"),w.innerHTML=h.innerHTML,p.appendChild(w)}function a(h){h.preventDefault();const p=document.querySelector(`button#${h.dataTransfer.getData("text/plain")}`);d(p),r=!r}n.addEventListener("dragover",l),n.addEventListener("drop",a);const c=t.querySelectorAll("button");function s(h){h.id||!h.innerText||(h.id=h.innerText.toLowerCase().replace(/\s/g,"_").replace(/[0-9]/g,""),h.setAttribute("draggable",!0),h.addEventListener("dragstart",i),h.addEventListener("dragend",o))}c.forEach(h=>{s(h),(JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[]).includes(h.id)&&d(h)});const u=new MutationObserver(h=>{h.forEach(p=>{if(p.type!=="childList"||p.addedNodes.length===0)return;const g=p.addedNodes[0];s(g),(JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[]).includes(g.id)&&(g.style.display="none",d(g))})}),f={attributes:!1,childList:!0,subtree:!1};u.observe(t,f)};function Fg(e,t,n,r){const i=document.createElement("button");i.setAttribute("id",`${e}_right_button`),i.classList.add("nevysha","lg","primary","gradio-button"),i.innerHTML=`<div>${t}</div>`,n.appendChild(i);const o=`<div id="${e}_panel" class="nevysha slide-right-browser-panel" style="display: none">
<div class="nevysha slide-right-browser-panel-container nevysha-scrollable">
<div class="nevysha" id="${e}-react"/>
</div>
</div>`;r.insertAdjacentHTML("beforeend",o);const l=cC(),d=document.querySelector(`#${e}_panel`),a=localStorage.getItem(`${e}_panelWidth`);a&&(d.style.width=a),d.appendChild(l);const c=document.createElement("button");c.setAttribute("id",`floating_close_${e}__panel_button`),c.classList.add("nevysha","lg","primary","gradio-button","nevysha-extra-network-floating-btn"),c.innerHTML="<div>Close</div>",c.addEventListener("click",s=>{i.click()}),l.insertBefore(c,l.firstChild),l.addEventListener("mousedown",function(s){s.preventDefault();let u=d.offsetWidth,f=s.clientX;document.addEventListener("mousemove",h),document.addEventListener("mouseup",p);function h(g){const w=g.clientX-f;d.style.width=u-w+"px"}function p(){localStorage.setItem(`${e}_panelWidth`,d.style.width),document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",p)}}),i.addEventListener("click",function(s){s.preventDefault(),s.stopPropagation();const u=document.querySelector(`#${e}_panel`);u.style.display==="none"?(u.style.display="flex",u.style.marginRight=`-${u.offsetWidth}px`,ar(u).animate({"margin-right":`+=${u.offsetWidth}`},rh)):ar(u).animate({"margin-right":`-=${u.offsetWidth}`},rh,()=>{u.style.display="none"})})}function D3(){const e=document.querySelector("div#tabs"),t=document.createElement("div");t.setAttribute("id","right_button_wrapper"),t.classList.add("nevysha","nevysha-right-button-wrapper"),e.insertAdjacentElement("beforeend",t),ir.enable_extra_network_tweaks===!0&&(Fg("cozy-txt2img-extra-network","Extra Network",t,e),document.getElementById("cozy-txt2img-extra-network-react").classList.add("cozy-extra-network"),Fg("cozy-img2img-extra-network","Extra Network",t,e),document.getElementById("cozy-img2img-extra-network-react").classList.add("cozy-extra-network"),document.querySelector("#cozy-img2img-extra-network_right_button").style.display="none"),ir.disable_image_browser!==!0&&Fg("cozy-img-browser","Cozy Image Browser",t,e)}function N3(e){jt.debug(`setButtonVisibilityFromCurrentTab(${e})`),document.querySelector("#cozy-txt2img-extra-network_right_button").style.display="none",document.querySelector("#cozy-img2img-extra-network_right_button").style.display="none",e==="tab_txt2img"?document.querySelector("#cozy-txt2img-extra-network_right_button").style.display="flex":e==="tab_img2img"&&(document.querySelector("#cozy-img2img-extra-network_right_button").style.display="flex")}function z3(e){dC(),document.querySelector("#cozy_nest_error_handling_display").innerHTML="An error in socket handler",document.querySelector("#cozy_nest_error_handling_display_stack").innerHTML=e.error,document.querySelector("#cozy_nest_error_handling_display_stack").setAttribute("style","display: block;"),fC()}window.errorPipe=z3;async function B3(e,t){class n{constructor(d){this.files=[d]}}let r=document.querySelector("#nevysha-send-to > #nevysha_pnginfo_image > div.image-container > div");const i=await fetch(t.src).then(l=>l.blob());let o=new DragEvent("drop",{bubbles:!0,cancelable:!0});Object.defineProperty(o,"dataTransfer",{value:new n(i)}),r.dispatchEvent(o),e==="txt2img"?document.querySelector("#tabs > div.tab-nav").querySelector("#txtimg").click():e==="img2img"?(document.querySelector("#tabs > div.tab-nav").querySelector("#imgimg").click(),document.querySelectorAll("#mode_img2img > div > button")[0].click()):e==="inpainting"&&(document.querySelector("#tabs > div.tab-nav").querySelector("#imgimg").click(),document.querySelectorAll("#mode_img2img > div > button")[2].click()),setTimeout(()=>{let l;e==="txt2img"?l=document.querySelector("#nevysha-send-to-button > button#txt2img_tab"):e==="img2img"?l=document.querySelector("#nevysha-send-to-button > button#img2img_tab"):e==="inpainting"&&(l=document.querySelector("#nevysha-send-to-button > button#inpaint_tab")),l.click()},1e3)}window.sendToPipe=B3;window.troubleshootSize={};function j3(){const e=document.body;function t(o){const l=o;l.style.position="fixed";const d=l.parentElement;l.style.width=d.offsetWidth+"px";const a=d.getBoundingClientRect(),c=window.innerHeight,s=a.top,u=c-a.bottom;s<u?l.style.top=a.top+a.height+"px":l.style.bottom=window.innerHeight-a.top+"px"}const n=function(o,l){for(const d of o)if(d.type==="childList")for(const a of d.addedNodes)a.nodeType===1&&a.classList.contains("options")&&t(a)},r=new MutationObserver(n),i={childList:!0,subtree:!0};r.observe(e,i)}const fv=e=>{H3(e)},H3=e=>{let t=window.gradioApp;if(typeof t!="function"){setTimeout(()=>fv(e),200);return}if(!t().getElementById("quicksettings")){setTimeout(()=>fv(e),200);return}if(vo.time(rC),document.querySelector("#setting_gradio_theme input")){const a=document.querySelector("#setting_gradio_theme input").value;a!=="gradio/default"&&a!==""&&a!=="Default"&&i0("Warning",'Cozy Nest may not be compatible with this theme. Please switch to the default theme. You can do this by going to the settings tab and selecting "gradio/default" or "Default" from the dropdown menu under "User interface > UI theme".')}const r=document.querySelector("#refresh_sd_model_checkpoint"),i="<div id='quicksettings_gap' class='nevysha' />";r.insertAdjacentHTML("afterend",i);const o=document.querySelector("body");o.style="",o.insertAdjacentHTML("beforeend",oC),document.querySelectorAll("#tabs > .tabitem").forEach(a=>a.setAttribute("class",`${a.getAttribute("class")} nevysha`)),document.querySelectorAll("#tabs > div.tab-nav").forEach(a=>a.setAttribute("class",`${a.getAttribute("class")} nevysha nevysha-tabnav`)),document.querySelectorAll('input[type="number"]').forEach(a=>a.setAttribute("class",`${a.getAttribute("class")} nevysha`)),document.querySelectorAll(".extra-network-cards").forEach(a=>a.setAttribute("class",`${a.getAttribute("class")} nevysha nevysha-scrollable`)),document.querySelectorAll("#cozy_nest_settings_tabs > .tabitem").forEach(a=>a.classList.add("nevysha","nevysha-scrollable")),document.querySelector("#nevysha-send-to").setAttribute("style","display: none;"),D3(),onUiTabChange(()=>{jt.debug("onUiTabChange",get_uiCurrentTabContent().id),ir.enable_extra_network_tweaks&&N3(get_uiCurrentTabContent().id)});const d=a=>{_3(a),x3(a),A3(a),R3(a),$3(a)};d({prefix:"txt2img"}),d({prefix:"img2img"}),M3(),t().querySelector(".tabs").querySelectorAll(".block.padded:not(.gradio-accordion, .gradio-dropdown, #nevyui_sh_options)").forEach(a=>a.setAttribute("style",`${a.getAttribute("style")} padding: 10px !important;`)),t().querySelectorAll("#quicksettings > div.block").forEach(a=>a.style.padding="0 !important"),L3(),I3(),gp(),F3(),th()==="light"?(document.querySelector("body").classList.add("nevysha-light"),document.querySelectorAll(".gradio-accordion").forEach(a=>a.setAttribute("style",`${a.getAttribute("style")} box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3) !important;`))):document.querySelector("body").classList.remove("nevysha-light"),j3(),ir.extensions&&ir.extensions.length>0&&ir.extensions.includes("SDAtom-WebUi-client-queue-ext")&&P3(),e()};async function gC(e){e=e||ir,await fetch("/cozy-nest/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function V3(){var e;if(ir.webui===u3){jt.debug("webui is UNKNOWN. Trying to detect it.");const t=(e=document.querySelector('meta[property="og:title"]'))==null?void 0:e.getAttribute("content");t&&t===Ec?(ir.webui=Ec,mC=!0):ir.webui=iC,await gC()}jt.debug(`webui is ${ir.webui}`)}async function W3(e){if(new URLSearchParams(window.location.search).get("CozyNest")==="No"){jt.log("disabled by url param"),document.querySelectorAll("link").forEach(r=>{r.href.includes("Cozy-Nest")&&r.remove()});return}return await vC(),await V3(),_w.start(),T3(),C3(),U3(),new Promise(r=>{fv(async()=>{await e(),_w.stop(),jt.log("running."),vo.end(rC),vo.end(nh),mC&&i0("Warning","Cozy Nest detected that you are using SD.Next and running Cozy Nest for the first time. To ensure compatibility, please restart the server."),r()})})}function U3(){window.addEventListener("error",function({message:e,filename:t,lineno:n,colno:r,error:i}){})}let ir,mC=!1;async function vC(){const e=await fetch(`file=extensions/Cozy-Nest/nevyui_settings.json?t=${Date.now()}`);e.ok&&(ir=await e.json(),localStorage.setItem("COZY_NEST_CONFIG",JSON.stringify(ir)),window.COZY_NEST_CONFIG=ir)}var yC={exports:{}},mp={},bC={exports:{}},pt={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ad=Symbol.for("react.element"),G3=Symbol.for("react.portal"),K3=Symbol.for("react.fragment"),q3=Symbol.for("react.strict_mode"),Y3=Symbol.for("react.profiler"),X3=Symbol.for("react.provider"),Q3=Symbol.for("react.context"),Z3=Symbol.for("react.forward_ref"),J3=Symbol.for("react.suspense"),eL=Symbol.for("react.memo"),tL=Symbol.for("react.lazy"),Cw=Symbol.iterator;function nL(e){return e===null||typeof e!="object"?null:(e=Cw&&e[Cw]||e["@@iterator"],typeof e=="function"?e:null)}var wC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},SC=Object.assign,xC={};function du(e,t,n){this.props=e,this.context=t,this.refs=xC,this.updater=n||wC}du.prototype.isReactComponent={};du.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};du.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _C(){}_C.prototype=du.prototype;function o0(e,t,n){this.props=e,this.context=t,this.refs=xC,this.updater=n||wC}var a0=o0.prototype=new _C;a0.constructor=o0;SC(a0,du.prototype);a0.isPureReactComponent=!0;var kw=Array.isArray,CC=Object.prototype.hasOwnProperty,s0={current:null},kC={key:!0,ref:!0,__self:!0,__source:!0};function EC(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)CC.call(t,r)&&!kC.hasOwnProperty(r)&&(i[r]=t[r]);var d=arguments.length-2;if(d===1)i.children=n;else if(1<d){for(var a=Array(d),c=0;c<d;c++)a[c]=arguments[c+2];i.children=a}if(e&&e.defaultProps)for(r in d=e.defaultProps,d)i[r]===void 0&&(i[r]=d[r]);return{$$typeof:ad,type:e,key:o,ref:l,props:i,_owner:s0.current}}function rL(e,t){return{$$typeof:ad,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function l0(e){return typeof e=="object"&&e!==null&&e.$$typeof===ad}function iL(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ew=/\/+/g;function Dg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?iL(""+e.key):t.toString(36)}function yf(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case ad:case G3:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+Dg(l,0):r,kw(i)?(n="",e!=null&&(n=e.replace(Ew,"$&/")+"/"),yf(i,t,n,"",function(c){return c})):i!=null&&(l0(i)&&(i=rL(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(Ew,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",kw(e))for(var d=0;d<e.length;d++){o=e[d];var a=r+Dg(o,d);l+=yf(o,t,n,a,i)}else if(a=nL(e),typeof a=="function")for(e=a.call(e),d=0;!(o=e.next()).done;)o=o.value,a=r+Dg(o,d++),l+=yf(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Rd(e,t,n){if(e==null)return e;var r=[],i=0;return yf(e,r,"","",function(o){return t.call(n,o,i++)}),r}function oL(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yn={current:null},bf={transition:null},aL={ReactCurrentDispatcher:Yn,ReactCurrentBatchConfig:bf,ReactCurrentOwner:s0};pt.Children={map:Rd,forEach:function(e,t,n){Rd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Rd(e,function(){t++}),t},toArray:function(e){return Rd(e,function(t){return t})||[]},only:function(e){if(!l0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pt.Component=du;pt.Fragment=K3;pt.Profiler=Y3;pt.PureComponent=o0;pt.StrictMode=q3;pt.Suspense=J3;pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aL;pt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=SC({},e.props),i=e.key,o=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,l=s0.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var d=e.type.defaultProps;for(a in t)CC.call(t,a)&&!kC.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&d!==void 0?d[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){d=Array(a);for(var c=0;c<a;c++)d[c]=arguments[c+2];r.children=d}return{$$typeof:ad,type:e.type,key:i,ref:o,props:r,_owner:l}};pt.createContext=function(e){return e={$$typeof:Q3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:X3,_context:e},e.Consumer=e};pt.createElement=EC;pt.createFactory=function(e){var t=EC.bind(null,e);return t.type=e,t};pt.createRef=function(){return{current:null}};pt.forwardRef=function(e){return{$$typeof:Z3,render:e}};pt.isValidElement=l0;pt.lazy=function(e){return{$$typeof:tL,_payload:{_status:-1,_result:e},_init:oL}};pt.memo=function(e,t){return{$$typeof:eL,type:e,compare:t===void 0?null:t}};pt.startTransition=function(e){var t=bf.transition;bf.transition={};try{e()}finally{bf.transition=t}};pt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};pt.useCallback=function(e,t){return Yn.current.useCallback(e,t)};pt.useContext=function(e){return Yn.current.useContext(e)};pt.useDebugValue=function(){};pt.useDeferredValue=function(e){return Yn.current.useDeferredValue(e)};pt.useEffect=function(e,t){return Yn.current.useEffect(e,t)};pt.useId=function(){return Yn.current.useId()};pt.useImperativeHandle=function(e,t,n){return Yn.current.useImperativeHandle(e,t,n)};pt.useInsertionEffect=function(e,t){return Yn.current.useInsertionEffect(e,t)};pt.useLayoutEffect=function(e,t){return Yn.current.useLayoutEffect(e,t)};pt.useMemo=function(e,t){return Yn.current.useMemo(e,t)};pt.useReducer=function(e,t,n){return Yn.current.useReducer(e,t,n)};pt.useRef=function(e){return Yn.current.useRef(e)};pt.useState=function(e){return Yn.current.useState(e)};pt.useSyncExternalStore=function(e,t,n){return Yn.current.useSyncExternalStore(e,t,n)};pt.useTransition=function(){return Yn.current.useTransition()};pt.version="18.2.0";bC.exports=pt;var N=bC.exports;const ut=ks(N),$w=JM({__proto__:null,default:ut},[N]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var sL=N,lL=Symbol.for("react.element"),uL=Symbol.for("react.fragment"),cL=Object.prototype.hasOwnProperty,dL=sL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fL={key:!0,ref:!0,__self:!0,__source:!0};function $C(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)cL.call(t,r)&&!fL.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:lL,type:e,key:o,ref:l,props:i,_owner:dL.current}}mp.Fragment=uL;mp.jsx=$C;mp.jsxs=$C;yC.exports=mp;var W=yC.exports,ql={},TC={exports:{}},Cr={},AC={exports:{}},MC={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(B,V){var K=B.length;B.push(V);e:for(;0<K;){var q=K-1>>>1,re=B[q];if(0<i(re,V))B[q]=V,B[K]=re,K=q;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var V=B[0],K=B.pop();if(K!==V){B[0]=K;e:for(var q=0,re=B.length,Y=re>>>1;q<Y;){var Z=2*(q+1)-1,te=B[Z],ie=Z+1,ce=B[ie];if(0>i(te,K))ie<re&&0>i(ce,te)?(B[q]=ce,B[ie]=K,q=ie):(B[q]=te,B[Z]=K,q=Z);else if(ie<re&&0>i(ce,K))B[q]=ce,B[ie]=K,q=ie;else break e}}return V}function i(B,V){var K=B.sortIndex-V.sortIndex;return K!==0?K:B.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var a=[],c=[],s=1,u=null,f=3,h=!1,p=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(B){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=B)r(c),V.sortIndex=V.expirationTime,t(a,V);else break;V=n(c)}}function v(B){if(g=!1,T(B),!p)if(n(a)!==null)p=!0,P(b);else{var V=n(c);V!==null&&z(v,V.startTime-B)}}function b(B,V){p=!1,g&&(g=!1,x(E),E=-1),h=!0;var K=f;try{for(T(V),u=n(a);u!==null&&(!(u.expirationTime>V)||B&&!k());){var q=u.callback;if(typeof q=="function"){u.callback=null,f=u.priorityLevel;var re=q(u.expirationTime<=V);V=e.unstable_now(),typeof re=="function"?u.callback=re:u===n(a)&&r(a),T(V)}else r(a);u=n(a)}if(u!==null)var Y=!0;else{var Z=n(c);Z!==null&&z(v,Z.startTime-V),Y=!1}return Y}finally{u=null,f=K,h=!1}}var y=!1,m=null,E=-1,M=5,C=-1;function k(){return!(e.unstable_now()-C<M)}function O(){if(m!==null){var B=e.unstable_now();C=B;var V=!0;try{V=m(!0,B)}finally{V?R():(y=!1,m=null)}}else y=!1}var R;if(typeof S=="function")R=function(){S(O)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,I=A.port2;A.port1.onmessage=O,R=function(){I.postMessage(null)}}else R=function(){w(O,0)};function P(B){m=B,y||(y=!0,R())}function z(B,V){E=w(function(){B(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,P(b))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(B){switch(f){case 1:case 2:case 3:var V=3;break;default:V=f}var K=f;f=V;try{return B()}finally{f=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,V){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=f;f=B;try{return V()}finally{f=K}},e.unstable_scheduleCallback=function(B,V,K){var q=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?q+K:q):K=q,B){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=K+re,B={id:s++,callback:V,priorityLevel:B,startTime:K,expirationTime:re,sortIndex:-1},K>q?(B.sortIndex=K,t(c,B),n(a)===null&&B===n(c)&&(g?(x(E),E=-1):g=!0,z(v,K-q))):(B.sortIndex=re,t(a,B),p||h||(p=!0,P(b))),B},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(B){var V=f;return function(){var K=f;f=V;try{return B.apply(this,arguments)}finally{f=K}}}})(MC);AC.exports=MC;var hL=AC.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var LC=N,xr=hL;function Ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var RC=new Set,$c={};function Es(e,t){Yl(e,t),Yl(e+"Capture",t)}function Yl(e,t){for($c[e]=t,e=0;e<t.length;e++)RC.add(t[e])}var _o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hv=Object.prototype.hasOwnProperty,pL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Tw={},Aw={};function gL(e){return hv.call(Aw,e)?!0:hv.call(Tw,e)?!1:pL.test(e)?Aw[e]=!0:(Tw[e]=!0,!1)}function mL(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function vL(e,t,n,r){if(t===null||typeof t>"u"||mL(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Xn(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Mn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mn[e]=new Xn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mn[t]=new Xn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mn[e]=new Xn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mn[e]=new Xn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mn[e]=new Xn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mn[e]=new Xn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mn[e]=new Xn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mn[e]=new Xn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mn[e]=new Xn(e,5,!1,e.toLowerCase(),null,!1,!1)});var u0=/[\-:]([a-z])/g;function c0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(u0,c0);Mn[t]=new Xn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(u0,c0);Mn[t]=new Xn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(u0,c0);Mn[t]=new Xn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mn[e]=new Xn(e,1,!1,e.toLowerCase(),null,!1,!1)});Mn.xlinkHref=new Xn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mn[e]=new Xn(e,1,!1,e.toLowerCase(),null,!0,!0)});function d0(e,t,n,r){var i=Mn.hasOwnProperty(t)?Mn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(vL(t,n,i,r)&&(n=null),r||i===null?gL(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ao=LC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pd=Symbol.for("react.element"),fl=Symbol.for("react.portal"),hl=Symbol.for("react.fragment"),f0=Symbol.for("react.strict_mode"),pv=Symbol.for("react.profiler"),PC=Symbol.for("react.provider"),IC=Symbol.for("react.context"),h0=Symbol.for("react.forward_ref"),gv=Symbol.for("react.suspense"),mv=Symbol.for("react.suspense_list"),p0=Symbol.for("react.memo"),Jo=Symbol.for("react.lazy"),OC=Symbol.for("react.offscreen"),Mw=Symbol.iterator;function ku(e){return e===null||typeof e!="object"?null:(e=Mw&&e[Mw]||e["@@iterator"],typeof e=="function"?e:null)}var Xt=Object.assign,Ng;function Vu(e){if(Ng===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ng=t&&t[1]||""}return`
`+Ng+e}var zg=!1;function Bg(e,t){if(!e||zg)return"";zg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
`),o=r.stack.split(`
`),l=i.length-1,d=o.length-1;1<=l&&0<=d&&i[l]!==o[d];)d--;for(;1<=l&&0<=d;l--,d--)if(i[l]!==o[d]){if(l!==1||d!==1)do if(l--,d--,0>d||i[l]!==o[d]){var a=`
`+i[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=d);break}}}finally{zg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vu(e):""}function yL(e){switch(e.tag){case 5:return Vu(e.type);case 16:return Vu("Lazy");case 13:return Vu("Suspense");case 19:return Vu("SuspenseList");case 0:case 2:case 15:return e=Bg(e.type,!1),e;case 11:return e=Bg(e.type.render,!1),e;case 1:return e=Bg(e.type,!0),e;default:return""}}function vv(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hl:return"Fragment";case fl:return"Portal";case pv:return"Profiler";case f0:return"StrictMode";case gv:return"Suspense";case mv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case IC:return(e.displayName||"Context")+".Consumer";case PC:return(e._context.displayName||"Context")+".Provider";case h0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case p0:return t=e.displayName||null,t!==null?t:vv(e.type)||"Memo";case Jo:t=e._payload,e=e._init;try{return vv(e(t))}catch{}}return null}function bL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vv(t);case 8:return t===f0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function FC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wL(e){var t=FC(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Id(e){e._valueTracker||(e._valueTracker=wL(e))}function DC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=FC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ih(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yv(e,t){var n=t.checked;return Xt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Lw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function NC(e,t){t=t.checked,t!=null&&d0(e,"checked",t,!1)}function bv(e,t){NC(e,t);var n=wa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wv(e,t.type,n):t.hasOwnProperty("defaultValue")&&wv(e,t.type,wa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wv(e,t,n){(t!=="number"||ih(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wu=Array.isArray;function Pl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+wa(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Sv(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ee(91));return Xt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ee(92));if(Wu(n)){if(1<n.length)throw Error(Ee(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:wa(n)}}function zC(e,t){var n=wa(t.value),r=wa(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Iw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function BC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xv(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?BC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Od,jC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Od=Od||document.createElement("div"),Od.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Od.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ic={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},SL=["Webkit","ms","Moz","O"];Object.keys(ic).forEach(function(e){SL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ic[t]=ic[e]})});function HC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ic.hasOwnProperty(e)&&ic[e]?(""+t).trim():t+"px"}function VC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=HC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var xL=Xt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _v(e,t){if(t){if(xL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function Cv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kv=null;function g0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ev=null,Il=null,Ol=null;function Ow(e){if(e=ud(e)){if(typeof Ev!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=Sp(t),Ev(e.stateNode,e.type,t))}}function WC(e){Il?Ol?Ol.push(e):Ol=[e]:Il=e}function UC(){if(Il){var e=Il,t=Ol;if(Ol=Il=null,Ow(e),t)for(e=0;e<t.length;e++)Ow(t[e])}}function GC(e,t){return e(t)}function KC(){}var jg=!1;function qC(e,t,n){if(jg)return e(t,n);jg=!0;try{return GC(e,t,n)}finally{jg=!1,(Il!==null||Ol!==null)&&(KC(),UC())}}function Ac(e,t){var n=e.stateNode;if(n===null)return null;var r=Sp(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ee(231,t,typeof n));return n}var $v=!1;if(_o)try{var Eu={};Object.defineProperty(Eu,"passive",{get:function(){$v=!0}}),window.addEventListener("test",Eu,Eu),window.removeEventListener("test",Eu,Eu)}catch{$v=!1}function _L(e,t,n,r,i,o,l,d,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(s){this.onError(s)}}var oc=!1,oh=null,ah=!1,Tv=null,CL={onError:function(e){oc=!0,oh=e}};function kL(e,t,n,r,i,o,l,d,a){oc=!1,oh=null,_L.apply(CL,arguments)}function EL(e,t,n,r,i,o,l,d,a){if(kL.apply(this,arguments),oc){if(oc){var c=oh;oc=!1,oh=null}else throw Error(Ee(198));ah||(ah=!0,Tv=c)}}function $s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function YC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Fw(e){if($s(e)!==e)throw Error(Ee(188))}function $L(e){var t=e.alternate;if(!t){if(t=$s(e),t===null)throw Error(Ee(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Fw(i),e;if(o===r)return Fw(i),t;o=o.sibling}throw Error(Ee(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,d=i.child;d;){if(d===n){l=!0,n=i,r=o;break}if(d===r){l=!0,r=i,n=o;break}d=d.sibling}if(!l){for(d=o.child;d;){if(d===n){l=!0,n=o,r=i;break}if(d===r){l=!0,r=o,n=i;break}d=d.sibling}if(!l)throw Error(Ee(189))}}if(n.alternate!==r)throw Error(Ee(190))}if(n.tag!==3)throw Error(Ee(188));return n.stateNode.current===n?e:t}function XC(e){return e=$L(e),e!==null?QC(e):null}function QC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=QC(e);if(t!==null)return t;e=e.sibling}return null}var ZC=xr.unstable_scheduleCallback,Dw=xr.unstable_cancelCallback,TL=xr.unstable_shouldYield,AL=xr.unstable_requestPaint,nn=xr.unstable_now,ML=xr.unstable_getCurrentPriorityLevel,m0=xr.unstable_ImmediatePriority,JC=xr.unstable_UserBlockingPriority,sh=xr.unstable_NormalPriority,LL=xr.unstable_LowPriority,ek=xr.unstable_IdlePriority,vp=null,zi=null;function RL(e){if(zi&&typeof zi.onCommitFiberRoot=="function")try{zi.onCommitFiberRoot(vp,e,void 0,(e.current.flags&128)===128)}catch{}}var pi=Math.clz32?Math.clz32:OL,PL=Math.log,IL=Math.LN2;function OL(e){return e>>>=0,e===0?32:31-(PL(e)/IL|0)|0}var Fd=64,Dd=4194304;function Uu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var d=l&~i;d!==0?r=Uu(d):(o&=l,o!==0&&(r=Uu(o)))}else l=n&~i,l!==0?r=Uu(l):o!==0&&(r=Uu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pi(t),i=1<<n,r|=e[n],t&=~i;return r}function FL(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-pi(o),d=1<<l,a=i[l];a===-1?(!(d&n)||d&r)&&(i[l]=FL(d,t)):a<=t&&(e.expiredLanes|=d),o&=~d}}function Av(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tk(){var e=Fd;return Fd<<=1,!(Fd&4194240)&&(Fd=64),e}function Hg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function sd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pi(t),e[t]=n}function NL(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pi(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function v0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pi(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Rt=0;function nk(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var rk,y0,ik,ok,ak,Mv=!1,Nd=[],ua=null,ca=null,da=null,Mc=new Map,Lc=new Map,ra=[],zL="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nw(e,t){switch(e){case"focusin":case"focusout":ua=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":Mc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lc.delete(t.pointerId)}}function $u(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=ud(t),t!==null&&y0(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function BL(e,t,n,r,i){switch(t){case"focusin":return ua=$u(ua,e,t,n,r,i),!0;case"dragenter":return ca=$u(ca,e,t,n,r,i),!0;case"mouseover":return da=$u(da,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Mc.set(o,$u(Mc.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Lc.set(o,$u(Lc.get(o)||null,e,t,n,r,i)),!0}return!1}function sk(e){var t=ns(e.target);if(t!==null){var n=$s(t);if(n!==null){if(t=n.tag,t===13){if(t=YC(n),t!==null){e.blockedOn=t,ak(e.priority,function(){ik(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);kv=r,n.target.dispatchEvent(r),kv=null}else return t=ud(n),t!==null&&y0(t),e.blockedOn=n,!1;t.shift()}return!0}function zw(e,t,n){wf(e)&&n.delete(t)}function jL(){Mv=!1,ua!==null&&wf(ua)&&(ua=null),ca!==null&&wf(ca)&&(ca=null),da!==null&&wf(da)&&(da=null),Mc.forEach(zw),Lc.forEach(zw)}function Tu(e,t){e.blockedOn===t&&(e.blockedOn=null,Mv||(Mv=!0,xr.unstable_scheduleCallback(xr.unstable_NormalPriority,jL)))}function Rc(e){function t(i){return Tu(i,e)}if(0<Nd.length){Tu(Nd[0],e);for(var n=1;n<Nd.length;n++){var r=Nd[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ua!==null&&Tu(ua,e),ca!==null&&Tu(ca,e),da!==null&&Tu(da,e),Mc.forEach(t),Lc.forEach(t),n=0;n<ra.length;n++)r=ra[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ra.length&&(n=ra[0],n.blockedOn===null);)sk(n),n.blockedOn===null&&ra.shift()}var Fl=Ao.ReactCurrentBatchConfig,uh=!0;function HL(e,t,n,r){var i=Rt,o=Fl.transition;Fl.transition=null;try{Rt=1,b0(e,t,n,r)}finally{Rt=i,Fl.transition=o}}function VL(e,t,n,r){var i=Rt,o=Fl.transition;Fl.transition=null;try{Rt=4,b0(e,t,n,r)}finally{Rt=i,Fl.transition=o}}function b0(e,t,n,r){if(uh){var i=Lv(e,t,n,r);if(i===null)Zg(e,t,r,ch,n),Nw(e,r);else if(BL(i,e,t,n,r))r.stopPropagation();else if(Nw(e,r),t&4&&-1<zL.indexOf(e)){for(;i!==null;){var o=ud(i);if(o!==null&&rk(o),o=Lv(e,t,n,r),o===null&&Zg(e,t,r,ch,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Zg(e,t,r,null,n)}}var ch=null;function Lv(e,t,n,r){if(ch=null,e=g0(r),e=ns(e),e!==null)if(t=$s(e),t===null)e=null;else if(n=t.tag,n===13){if(e=YC(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ch=e,null}function lk(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ML()){case m0:return 1;case JC:return 4;case sh:case LL:return 16;case ek:return 536870912;default:return 16}default:return 16}}var aa=null,w0=null,Sf=null;function uk(){if(Sf)return Sf;var e,t=w0,n=t.length,r,i="value"in aa?aa.value:aa.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[o-r];r++);return Sf=i.slice(e,1<r?1-r:void 0)}function xf(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zd(){return!0}function Bw(){return!1}function kr(e){function t(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(o):o[d]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?zd:Bw,this.isPropagationStopped=Bw,this}return Xt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zd)},persist:function(){},isPersistent:zd}),t}var fu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},S0=kr(fu),ld=Xt({},fu,{view:0,detail:0}),WL=kr(ld),Vg,Wg,Au,yp=Xt({},ld,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:x0,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Au&&(Au&&e.type==="mousemove"?(Vg=e.screenX-Au.screenX,Wg=e.screenY-Au.screenY):Wg=Vg=0,Au=e),Vg)},movementY:function(e){return"movementY"in e?e.movementY:Wg}}),jw=kr(yp),UL=Xt({},yp,{dataTransfer:0}),GL=kr(UL),KL=Xt({},ld,{relatedTarget:0}),Ug=kr(KL),qL=Xt({},fu,{animationName:0,elapsedTime:0,pseudoElement:0}),YL=kr(qL),XL=Xt({},fu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QL=kr(XL),ZL=Xt({},fu,{data:0}),Hw=kr(ZL),JL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},tR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tR[e])?!!t[e]:!1}function x0(){return nR}var rR=Xt({},ld,{key:function(e){if(e.key){var t=JL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:x0,charCode:function(e){return e.type==="keypress"?xf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iR=kr(rR),oR=Xt({},yp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vw=kr(oR),aR=Xt({},ld,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:x0}),sR=kr(aR),lR=Xt({},fu,{propertyName:0,elapsedTime:0,pseudoElement:0}),uR=kr(lR),cR=Xt({},yp,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),dR=kr(cR),fR=[9,13,27,32],_0=_o&&"CompositionEvent"in window,ac=null;_o&&"documentMode"in document&&(ac=document.documentMode);var hR=_o&&"TextEvent"in window&&!ac,ck=_o&&(!_0||ac&&8<ac&&11>=ac),Ww=String.fromCharCode(32),Uw=!1;function dk(e,t){switch(e){case"keyup":return fR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function pR(e,t){switch(e){case"compositionend":return fk(t);case"keypress":return t.which!==32?null:(Uw=!0,Ww);case"textInput":return e=t.data,e===Ww&&Uw?null:e;default:return null}}function gR(e,t){if(pl)return e==="compositionend"||!_0&&dk(e,t)?(e=uk(),Sf=w0=aa=null,pl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ck&&t.locale!=="ko"?null:t.data;default:return null}}var mR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mR[e.type]:t==="textarea"}function hk(e,t,n,r){WC(r),t=dh(t,"onChange"),0<t.length&&(n=new S0("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var sc=null,Pc=null;function vR(e){Ck(e,0)}function bp(e){var t=vl(e);if(DC(t))return e}function yR(e,t){if(e==="change")return t}var pk=!1;if(_o){var Gg;if(_o){var Kg="oninput"in document;if(!Kg){var Kw=document.createElement("div");Kw.setAttribute("oninput","return;"),Kg=typeof Kw.oninput=="function"}Gg=Kg}else Gg=!1;pk=Gg&&(!document.documentMode||9<document.documentMode)}function qw(){sc&&(sc.detachEvent("onpropertychange",gk),Pc=sc=null)}function gk(e){if(e.propertyName==="value"&&bp(Pc)){var t=[];hk(t,Pc,e,g0(e)),qC(vR,t)}}function bR(e,t,n){e==="focusin"?(qw(),sc=t,Pc=n,sc.attachEvent("onpropertychange",gk)):e==="focusout"&&qw()}function wR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bp(Pc)}function SR(e,t){if(e==="click")return bp(t)}function xR(e,t){if(e==="input"||e==="change")return bp(t)}function _R(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mi=typeof Object.is=="function"?Object.is:_R;function Ic(e,t){if(mi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!hv.call(t,i)||!mi(e[i],t[i]))return!1}return!0}function Yw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xw(e,t){var n=Yw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yw(n)}}function mk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vk(){for(var e=window,t=ih();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ih(e.document)}return t}function C0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CR(e){var t=vk(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mk(n.ownerDocument.documentElement,n)){if(r!==null&&C0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Xw(n,o);var l=Xw(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var kR=_o&&"documentMode"in document&&11>=document.documentMode,gl=null,Rv=null,lc=null,Pv=!1;function Qw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pv||gl==null||gl!==ih(r)||(r=gl,"selectionStart"in r&&C0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),lc&&Ic(lc,r)||(lc=r,r=dh(Rv,"onSelect"),0<r.length&&(t=new S0("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gl)))}function Bd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ml={animationend:Bd("Animation","AnimationEnd"),animationiteration:Bd("Animation","AnimationIteration"),animationstart:Bd("Animation","AnimationStart"),transitionend:Bd("Transition","TransitionEnd")},qg={},yk={};_o&&(yk=document.createElement("div").style,"AnimationEvent"in window||(delete ml.animationend.animation,delete ml.animationiteration.animation,delete ml.animationstart.animation),"TransitionEvent"in window||delete ml.transitionend.transition);function wp(e){if(qg[e])return qg[e];if(!ml[e])return e;var t=ml[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in yk)return qg[e]=t[n];return e}var bk=wp("animationend"),wk=wp("animationiteration"),Sk=wp("animationstart"),xk=wp("transitionend"),_k=new Map,Zw="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ka(e,t){_k.set(e,t),Es(t,[e])}for(var Yg=0;Yg<Zw.length;Yg++){var Xg=Zw[Yg],ER=Xg.toLowerCase(),$R=Xg[0].toUpperCase()+Xg.slice(1);ka(ER,"on"+$R)}ka(bk,"onAnimationEnd");ka(wk,"onAnimationIteration");ka(Sk,"onAnimationStart");ka("dblclick","onDoubleClick");ka("focusin","onFocus");ka("focusout","onBlur");ka(xk,"onTransitionEnd");Yl("onMouseEnter",["mouseout","mouseover"]);Yl("onMouseLeave",["mouseout","mouseover"]);Yl("onPointerEnter",["pointerout","pointerover"]);Yl("onPointerLeave",["pointerout","pointerover"]);Es("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Es("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Es("onBeforeInput",["compositionend","keypress","textInput","paste"]);Es("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Es("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Es("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TR=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gu));function Jw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,EL(r,t,void 0,e),e.currentTarget=null}function Ck(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var l=r.length-1;0<=l;l--){var d=r[l],a=d.instance,c=d.currentTarget;if(d=d.listener,a!==o&&i.isPropagationStopped())break e;Jw(i,d,c),o=a}else for(l=0;l<r.length;l++){if(d=r[l],a=d.instance,c=d.currentTarget,d=d.listener,a!==o&&i.isPropagationStopped())break e;Jw(i,d,c),o=a}}}if(ah)throw e=Tv,ah=!1,Tv=null,e}function Nt(e,t){var n=t[Nv];n===void 0&&(n=t[Nv]=new Set);var r=e+"__bubble";n.has(r)||(kk(t,e,2,!1),n.add(r))}function Qg(e,t,n){var r=0;t&&(r|=4),kk(n,e,r,t)}var jd="_reactListening"+Math.random().toString(36).slice(2);function Oc(e){if(!e[jd]){e[jd]=!0,RC.forEach(function(n){n!=="selectionchange"&&(TR.has(n)||Qg(n,!1,e),Qg(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Qg("selectionchange",!1,t))}}function kk(e,t,n,r){switch(lk(t)){case 1:var i=HL;break;case 4:i=VL;break;default:i=b0}n=i.bind(null,t,n,e),i=void 0,!$v||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Zg(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var d=r.stateNode.containerInfo;if(d===i||d.nodeType===8&&d.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;d!==null;){if(l=ns(d),l===null)return;if(a=l.tag,a===5||a===6){r=o=l;continue e}d=d.parentNode}}r=r.return}qC(function(){var c=o,s=g0(n),u=[];e:{var f=_k.get(e);if(f!==void 0){var h=S0,p=e;switch(e){case"keypress":if(xf(n)===0)break e;case"keydown":case"keyup":h=iR;break;case"focusin":p="focus",h=Ug;break;case"focusout":p="blur",h=Ug;break;case"beforeblur":case"afterblur":h=Ug;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=jw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=GL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=sR;break;case bk:case wk:case Sk:h=YL;break;case xk:h=uR;break;case"scroll":h=WL;break;case"wheel":h=dR;break;case"copy":case"cut":case"paste":h=QL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Vw}var g=(t&4)!==0,w=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var S=c,T;S!==null;){T=S;var v=T.stateNode;if(T.tag===5&&v!==null&&(T=v,x!==null&&(v=Ac(S,x),v!=null&&g.push(Fc(S,v,T)))),w)break;S=S.return}0<g.length&&(f=new h(f,p,null,n,s),u.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==kv&&(p=n.relatedTarget||n.fromElement)&&(ns(p)||p[Co]))break e;if((h||f)&&(f=s.window===s?s:(f=s.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?ns(p):null,p!==null&&(w=$s(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(g=jw,v="onMouseLeave",x="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(g=Vw,v="onPointerLeave",x="onPointerEnter",S="pointer"),w=h==null?f:vl(h),T=p==null?f:vl(p),f=new g(v,S+"leave",h,n,s),f.target=w,f.relatedTarget=T,v=null,ns(s)===c&&(g=new g(x,S+"enter",p,n,s),g.target=T,g.relatedTarget=w,v=g),w=v,h&&p)t:{for(g=h,x=p,S=0,T=g;T;T=tl(T))S++;for(T=0,v=x;v;v=tl(v))T++;for(;0<S-T;)g=tl(g),S--;for(;0<T-S;)x=tl(x),T--;for(;S--;){if(g===x||x!==null&&g===x.alternate)break t;g=tl(g),x=tl(x)}g=null}else g=null;h!==null&&e1(u,f,h,g,!1),p!==null&&w!==null&&e1(u,w,p,g,!0)}}e:{if(f=c?vl(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var b=yR;else if(Gw(f))if(pk)b=xR;else{b=wR;var y=bR}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(b=SR);if(b&&(b=b(e,c))){hk(u,b,n,s);break e}y&&y(e,f,c),e==="focusout"&&(y=f._wrapperState)&&y.controlled&&f.type==="number"&&wv(f,"number",f.value)}switch(y=c?vl(c):window,e){case"focusin":(Gw(y)||y.contentEditable==="true")&&(gl=y,Rv=c,lc=null);break;case"focusout":lc=Rv=gl=null;break;case"mousedown":Pv=!0;break;case"contextmenu":case"mouseup":case"dragend":Pv=!1,Qw(u,n,s);break;case"selectionchange":if(kR)break;case"keydown":case"keyup":Qw(u,n,s)}var m;if(_0)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else pl?dk(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(ck&&n.locale!=="ko"&&(pl||E!=="onCompositionStart"?E==="onCompositionEnd"&&pl&&(m=uk()):(aa=s,w0="value"in aa?aa.value:aa.textContent,pl=!0)),y=dh(c,E),0<y.length&&(E=new Hw(E,e,null,n,s),u.push({event:E,listeners:y}),m?E.data=m:(m=fk(n),m!==null&&(E.data=m)))),(m=hR?pR(e,n):gR(e,n))&&(c=dh(c,"onBeforeInput"),0<c.length&&(s=new Hw("onBeforeInput","beforeinput",null,n,s),u.push({event:s,listeners:c}),s.data=m))}Ck(u,t)})}function Fc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function dh(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Ac(e,n),o!=null&&r.unshift(Fc(e,o,i)),o=Ac(e,t),o!=null&&r.push(Fc(e,o,i))),e=e.return}return r}function tl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function e1(e,t,n,r,i){for(var o=t._reactName,l=[];n!==null&&n!==r;){var d=n,a=d.alternate,c=d.stateNode;if(a!==null&&a===r)break;d.tag===5&&c!==null&&(d=c,i?(a=Ac(n,o),a!=null&&l.unshift(Fc(n,a,d))):i||(a=Ac(n,o),a!=null&&l.push(Fc(n,a,d)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var AR=/\r\n?/g,MR=/\u0000|\uFFFD/g;function t1(e){return(typeof e=="string"?e:""+e).replace(AR,`
`).replace(MR,"")}function Hd(e,t,n){if(t=t1(t),t1(e)!==t&&n)throw Error(Ee(425))}function fh(){}var Iv=null,Ov=null;function Fv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Dv=typeof setTimeout=="function"?setTimeout:void 0,LR=typeof clearTimeout=="function"?clearTimeout:void 0,n1=typeof Promise=="function"?Promise:void 0,RR=typeof queueMicrotask=="function"?queueMicrotask:typeof n1<"u"?function(e){return n1.resolve(null).then(e).catch(PR)}:Dv;function PR(e){setTimeout(function(){throw e})}function Jg(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Rc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Rc(t)}function fa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function r1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var hu=Math.random().toString(36).slice(2),Fi="__reactFiber$"+hu,Dc="__reactProps$"+hu,Co="__reactContainer$"+hu,Nv="__reactEvents$"+hu,IR="__reactListeners$"+hu,OR="__reactHandles$"+hu;function ns(e){var t=e[Fi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Co]||n[Fi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=r1(e);e!==null;){if(n=e[Fi])return n;e=r1(e)}return t}e=n,n=e.parentNode}return null}function ud(e){return e=e[Fi]||e[Co],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ee(33))}function Sp(e){return e[Dc]||null}var zv=[],yl=-1;function Ea(e){return{current:e}}function Bt(e){0>yl||(e.current=zv[yl],zv[yl]=null,yl--)}function Dt(e,t){yl++,zv[yl]=e.current,e.current=t}var Sa={},jn=Ea(Sa),sr=Ea(!1),vs=Sa;function Xl(e,t){var n=e.type.contextTypes;if(!n)return Sa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function lr(e){return e=e.childContextTypes,e!=null}function hh(){Bt(sr),Bt(jn)}function i1(e,t,n){if(jn.current!==Sa)throw Error(Ee(168));Dt(jn,t),Dt(sr,n)}function Ek(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ee(108,bL(e)||"Unknown",i));return Xt({},n,r)}function ph(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sa,vs=jn.current,Dt(jn,e),Dt(sr,sr.current),!0}function o1(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=Ek(e,t,vs),r.__reactInternalMemoizedMergedChildContext=e,Bt(sr),Bt(jn),Dt(jn,e)):Bt(sr),Dt(sr,n)}var lo=null,xp=!1,em=!1;function $k(e){lo===null?lo=[e]:lo.push(e)}function FR(e){xp=!0,$k(e)}function $a(){if(!em&&lo!==null){em=!0;var e=0,t=Rt;try{var n=lo;for(Rt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}lo=null,xp=!1}catch(i){throw lo!==null&&(lo=lo.slice(e+1)),ZC(m0,$a),i}finally{Rt=t,em=!1}}return null}var bl=[],wl=0,gh=null,mh=0,Vr=[],Wr=0,ys=null,ho=1,po="";function Wa(e,t){bl[wl++]=mh,bl[wl++]=gh,gh=e,mh=t}function Tk(e,t,n){Vr[Wr++]=ho,Vr[Wr++]=po,Vr[Wr++]=ys,ys=e;var r=ho;e=po;var i=32-pi(r)-1;r&=~(1<<i),n+=1;var o=32-pi(t)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,ho=1<<32-pi(t)+i|n<<i|r,po=o+e}else ho=1<<o|n<<i|r,po=e}function k0(e){e.return!==null&&(Wa(e,1),Tk(e,1,0))}function E0(e){for(;e===gh;)gh=bl[--wl],bl[wl]=null,mh=bl[--wl],bl[wl]=null;for(;e===ys;)ys=Vr[--Wr],Vr[Wr]=null,po=Vr[--Wr],Vr[Wr]=null,ho=Vr[--Wr],Vr[Wr]=null}var yr=null,vr=null,Vt=!1,ui=null;function Ak(e,t){var n=Ur(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function a1(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yr=e,vr=fa(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yr=e,vr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ys!==null?{id:ho,overflow:po}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ur(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yr=e,vr=null,!0):!1;default:return!1}}function Bv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jv(e){if(Vt){var t=vr;if(t){var n=t;if(!a1(e,t)){if(Bv(e))throw Error(Ee(418));t=fa(n.nextSibling);var r=yr;t&&a1(e,t)?Ak(r,n):(e.flags=e.flags&-4097|2,Vt=!1,yr=e)}}else{if(Bv(e))throw Error(Ee(418));e.flags=e.flags&-4097|2,Vt=!1,yr=e}}}function s1(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yr=e}function Vd(e){if(e!==yr)return!1;if(!Vt)return s1(e),Vt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Fv(e.type,e.memoizedProps)),t&&(t=vr)){if(Bv(e))throw Mk(),Error(Ee(418));for(;t;)Ak(e,t),t=fa(t.nextSibling)}if(s1(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ee(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){vr=fa(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}vr=null}}else vr=yr?fa(e.stateNode.nextSibling):null;return!0}function Mk(){for(var e=vr;e;)e=fa(e.nextSibling)}function Ql(){vr=yr=null,Vt=!1}function $0(e){ui===null?ui=[e]:ui.push(e)}var DR=Ao.ReactCurrentBatchConfig;function si(e,t){if(e&&e.defaultProps){t=Xt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var vh=Ea(null),yh=null,Sl=null,T0=null;function A0(){T0=Sl=yh=null}function M0(e){var t=vh.current;Bt(vh),e._currentValue=t}function Hv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Dl(e,t){yh=e,T0=Sl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(or=!0),e.firstContext=null)}function Yr(e){var t=e._currentValue;if(T0!==e)if(e={context:e,memoizedValue:t,next:null},Sl===null){if(yh===null)throw Error(Ee(308));Sl=e,yh.dependencies={lanes:0,firstContext:e}}else Sl=Sl.next=e;return t}var rs=null;function L0(e){rs===null?rs=[e]:rs.push(e)}function Lk(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,L0(t)):(n.next=i.next,i.next=n),t.interleaved=n,ko(e,r)}function ko(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ea=!1;function R0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rk(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,wt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ko(e,n)}return i=r.interleaved,i===null?(t.next=t,L0(r)):(t.next=i.next,i.next=t),r.interleaved=t,ko(e,n)}function _f(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}function l1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bh(e,t,n,r){var i=e.updateQueue;ea=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,d=i.shared.pending;if(d!==null){i.shared.pending=null;var a=d,c=a.next;a.next=null,l===null?o=c:l.next=c,l=a;var s=e.alternate;s!==null&&(s=s.updateQueue,d=s.lastBaseUpdate,d!==l&&(d===null?s.firstBaseUpdate=c:d.next=c,s.lastBaseUpdate=a))}if(o!==null){var u=i.baseState;l=0,s=c=a=null,d=o;do{var f=d.lane,h=d.eventTime;if((r&f)===f){s!==null&&(s=s.next={eventTime:h,lane:0,tag:d.tag,payload:d.payload,callback:d.callback,next:null});e:{var p=e,g=d;switch(f=t,h=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){u=p.call(h,u,f);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(h,u,f):p,f==null)break e;u=Xt({},u,f);break e;case 2:ea=!0}}d.callback!==null&&d.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[d]:f.push(d))}else h={eventTime:h,lane:f,tag:d.tag,payload:d.payload,callback:d.callback,next:null},s===null?(c=s=h,a=u):s=s.next=h,l|=f;if(d=d.next,d===null){if(d=i.shared.pending,d===null)break;f=d,d=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(s===null&&(a=u),i.baseState=a,i.firstBaseUpdate=c,i.lastBaseUpdate=s,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);ws|=l,e.lanes=l,e.memoizedState=u}}function u1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ee(191,i));i.call(r)}}}var Pk=new LC.Component().refs;function Vv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Xt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _p={isMounted:function(e){return(e=e._reactInternals)?$s(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kn(),i=ga(e),o=yo(r,i);o.payload=t,n!=null&&(o.callback=n),t=ha(e,o,i),t!==null&&(gi(t,e,i,r),_f(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kn(),i=ga(e),o=yo(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ha(e,o,i),t!==null&&(gi(t,e,i,r),_f(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kn(),r=ga(e),i=yo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ha(e,i,r),t!==null&&(gi(t,e,r,n),_f(t,e,r))}};function c1(e,t,n,r,i,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Ic(n,r)||!Ic(i,o):!0}function Ik(e,t,n){var r=!1,i=Sa,o=t.contextType;return typeof o=="object"&&o!==null?o=Yr(o):(i=lr(t)?vs:jn.current,r=t.contextTypes,o=(r=r!=null)?Xl(e,i):Sa),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_p,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function d1(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_p.enqueueReplaceState(t,t.state,null)}function Wv(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Pk,R0(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Yr(o):(o=lr(t)?vs:jn.current,i.context=Xl(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Vv(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_p.enqueueReplaceState(i,i.state,null),bh(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Mu(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ee(309));var r=n.stateNode}if(!r)throw Error(Ee(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var d=i.refs;d===Pk&&(d=i.refs={}),l===null?delete d[o]:d[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(Ee(284));if(!n._owner)throw Error(Ee(290,e))}return e}function Wd(e,t){throw e=Object.prototype.toString.call(t),Error(Ee(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function f1(e){var t=e._init;return t(e._payload)}function Ok(e){function t(x,S){if(e){var T=x.deletions;T===null?(x.deletions=[S],x.flags|=16):T.push(S)}}function n(x,S){if(!e)return null;for(;S!==null;)t(x,S),S=S.sibling;return null}function r(x,S){for(x=new Map;S!==null;)S.key!==null?x.set(S.key,S):x.set(S.index,S),S=S.sibling;return x}function i(x,S){return x=ma(x,S),x.index=0,x.sibling=null,x}function o(x,S,T){return x.index=T,e?(T=x.alternate,T!==null?(T=T.index,T<S?(x.flags|=2,S):T):(x.flags|=2,S)):(x.flags|=1048576,S)}function l(x){return e&&x.alternate===null&&(x.flags|=2),x}function d(x,S,T,v){return S===null||S.tag!==6?(S=sm(T,x.mode,v),S.return=x,S):(S=i(S,T),S.return=x,S)}function a(x,S,T,v){var b=T.type;return b===hl?s(x,S,T.props.children,v,T.key):S!==null&&(S.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Jo&&f1(b)===S.type)?(v=i(S,T.props),v.ref=Mu(x,S,T),v.return=x,v):(v=Af(T.type,T.key,T.props,null,x.mode,v),v.ref=Mu(x,S,T),v.return=x,v)}function c(x,S,T,v){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=lm(T,x.mode,v),S.return=x,S):(S=i(S,T.children||[]),S.return=x,S)}function s(x,S,T,v,b){return S===null||S.tag!==7?(S=cs(T,x.mode,v,b),S.return=x,S):(S=i(S,T),S.return=x,S)}function u(x,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return S=sm(""+S,x.mode,T),S.return=x,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Pd:return T=Af(S.type,S.key,S.props,null,x.mode,T),T.ref=Mu(x,null,S),T.return=x,T;case fl:return S=lm(S,x.mode,T),S.return=x,S;case Jo:var v=S._init;return u(x,v(S._payload),T)}if(Wu(S)||ku(S))return S=cs(S,x.mode,T,null),S.return=x,S;Wd(x,S)}return null}function f(x,S,T,v){var b=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return b!==null?null:d(x,S,""+T,v);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Pd:return T.key===b?a(x,S,T,v):null;case fl:return T.key===b?c(x,S,T,v):null;case Jo:return b=T._init,f(x,S,b(T._payload),v)}if(Wu(T)||ku(T))return b!==null?null:s(x,S,T,v,null);Wd(x,T)}return null}function h(x,S,T,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return x=x.get(T)||null,d(S,x,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pd:return x=x.get(v.key===null?T:v.key)||null,a(S,x,v,b);case fl:return x=x.get(v.key===null?T:v.key)||null,c(S,x,v,b);case Jo:var y=v._init;return h(x,S,T,y(v._payload),b)}if(Wu(v)||ku(v))return x=x.get(T)||null,s(S,x,v,b,null);Wd(S,v)}return null}function p(x,S,T,v){for(var b=null,y=null,m=S,E=S=0,M=null;m!==null&&E<T.length;E++){m.index>E?(M=m,m=null):M=m.sibling;var C=f(x,m,T[E],v);if(C===null){m===null&&(m=M);break}e&&m&&C.alternate===null&&t(x,m),S=o(C,S,E),y===null?b=C:y.sibling=C,y=C,m=M}if(E===T.length)return n(x,m),Vt&&Wa(x,E),b;if(m===null){for(;E<T.length;E++)m=u(x,T[E],v),m!==null&&(S=o(m,S,E),y===null?b=m:y.sibling=m,y=m);return Vt&&Wa(x,E),b}for(m=r(x,m);E<T.length;E++)M=h(m,x,E,T[E],v),M!==null&&(e&&M.alternate!==null&&m.delete(M.key===null?E:M.key),S=o(M,S,E),y===null?b=M:y.sibling=M,y=M);return e&&m.forEach(function(k){return t(x,k)}),Vt&&Wa(x,E),b}function g(x,S,T,v){var b=ku(T);if(typeof b!="function")throw Error(Ee(150));if(T=b.call(T),T==null)throw Error(Ee(151));for(var y=b=null,m=S,E=S=0,M=null,C=T.next();m!==null&&!C.done;E++,C=T.next()){m.index>E?(M=m,m=null):M=m.sibling;var k=f(x,m,C.value,v);if(k===null){m===null&&(m=M);break}e&&m&&k.alternate===null&&t(x,m),S=o(k,S,E),y===null?b=k:y.sibling=k,y=k,m=M}if(C.done)return n(x,m),Vt&&Wa(x,E),b;if(m===null){for(;!C.done;E++,C=T.next())C=u(x,C.value,v),C!==null&&(S=o(C,S,E),y===null?b=C:y.sibling=C,y=C);return Vt&&Wa(x,E),b}for(m=r(x,m);!C.done;E++,C=T.next())C=h(m,x,E,C.value,v),C!==null&&(e&&C.alternate!==null&&m.delete(C.key===null?E:C.key),S=o(C,S,E),y===null?b=C:y.sibling=C,y=C);return e&&m.forEach(function(O){return t(x,O)}),Vt&&Wa(x,E),b}function w(x,S,T,v){if(typeof T=="object"&&T!==null&&T.type===hl&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Pd:e:{for(var b=T.key,y=S;y!==null;){if(y.key===b){if(b=T.type,b===hl){if(y.tag===7){n(x,y.sibling),S=i(y,T.props.children),S.return=x,x=S;break e}}else if(y.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Jo&&f1(b)===y.type){n(x,y.sibling),S=i(y,T.props),S.ref=Mu(x,y,T),S.return=x,x=S;break e}n(x,y);break}else t(x,y);y=y.sibling}T.type===hl?(S=cs(T.props.children,x.mode,v,T.key),S.return=x,x=S):(v=Af(T.type,T.key,T.props,null,x.mode,v),v.ref=Mu(x,S,T),v.return=x,x=v)}return l(x);case fl:e:{for(y=T.key;S!==null;){if(S.key===y)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){n(x,S.sibling),S=i(S,T.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=lm(T,x.mode,v),S.return=x,x=S}return l(x);case Jo:return y=T._init,w(x,S,y(T._payload),v)}if(Wu(T))return p(x,S,T,v);if(ku(T))return g(x,S,T,v);Wd(x,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,S!==null&&S.tag===6?(n(x,S.sibling),S=i(S,T),S.return=x,x=S):(n(x,S),S=sm(T,x.mode,v),S.return=x,x=S),l(x)):n(x,S)}return w}var Zl=Ok(!0),Fk=Ok(!1),cd={},Bi=Ea(cd),Nc=Ea(cd),zc=Ea(cd);function is(e){if(e===cd)throw Error(Ee(174));return e}function P0(e,t){switch(Dt(zc,t),Dt(Nc,e),Dt(Bi,cd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xv(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xv(t,e)}Bt(Bi),Dt(Bi,t)}function Jl(){Bt(Bi),Bt(Nc),Bt(zc)}function Dk(e){is(zc.current);var t=is(Bi.current),n=xv(t,e.type);t!==n&&(Dt(Nc,e),Dt(Bi,n))}function I0(e){Nc.current===e&&(Bt(Bi),Bt(Nc))}var Kt=Ea(0);function wh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var tm=[];function O0(){for(var e=0;e<tm.length;e++)tm[e]._workInProgressVersionPrimary=null;tm.length=0}var Cf=Ao.ReactCurrentDispatcher,nm=Ao.ReactCurrentBatchConfig,bs=0,Yt=null,fn=null,bn=null,Sh=!1,uc=!1,Bc=0,NR=0;function Dn(){throw Error(Ee(321))}function F0(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mi(e[n],t[n]))return!1;return!0}function D0(e,t,n,r,i,o){if(bs=o,Yt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cf.current=e===null||e.memoizedState===null?HR:VR,e=n(r,i),uc){o=0;do{if(uc=!1,Bc=0,25<=o)throw Error(Ee(301));o+=1,bn=fn=null,t.updateQueue=null,Cf.current=WR,e=n(r,i)}while(uc)}if(Cf.current=xh,t=fn!==null&&fn.next!==null,bs=0,bn=fn=Yt=null,Sh=!1,t)throw Error(Ee(300));return e}function N0(){var e=Bc!==0;return Bc=0,e}function Li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?Yt.memoizedState=bn=e:bn=bn.next=e,bn}function Xr(){if(fn===null){var e=Yt.alternate;e=e!==null?e.memoizedState:null}else e=fn.next;var t=bn===null?Yt.memoizedState:bn.next;if(t!==null)bn=t,fn=e;else{if(e===null)throw Error(Ee(310));fn=e,e={memoizedState:fn.memoizedState,baseState:fn.baseState,baseQueue:fn.baseQueue,queue:fn.queue,next:null},bn===null?Yt.memoizedState=bn=e:bn=bn.next=e}return bn}function jc(e,t){return typeof t=="function"?t(e):t}function rm(e){var t=Xr(),n=t.queue;if(n===null)throw Error(Ee(311));n.lastRenderedReducer=e;var r=fn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var d=l=null,a=null,c=o;do{var s=c.lane;if((bs&s)===s)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:s,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(d=a=u,l=r):a=a.next=u,Yt.lanes|=s,ws|=s}c=c.next}while(c!==null&&c!==o);a===null?l=r:a.next=d,mi(r,t.memoizedState)||(or=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Yt.lanes|=o,ws|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function im(e){var t=Xr(),n=t.queue;if(n===null)throw Error(Ee(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=e(o,l.action),l=l.next;while(l!==i);mi(o,t.memoizedState)||(or=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Nk(){}function zk(e,t){var n=Yt,r=Xr(),i=t(),o=!mi(r.memoizedState,i);if(o&&(r.memoizedState=i,or=!0),r=r.queue,z0(Hk.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||bn!==null&&bn.memoizedState.tag&1){if(n.flags|=2048,Hc(9,jk.bind(null,n,r,i,t),void 0,null),wn===null)throw Error(Ee(349));bs&30||Bk(n,t,i)}return i}function Bk(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Yt.updateQueue,t===null?(t={lastEffect:null,stores:null},Yt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function jk(e,t,n,r){t.value=n,t.getSnapshot=r,Vk(t)&&Wk(e)}function Hk(e,t,n){return n(function(){Vk(t)&&Wk(e)})}function Vk(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mi(e,n)}catch{return!0}}function Wk(e){var t=ko(e,1);t!==null&&gi(t,e,1,-1)}function h1(e){var t=Li();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:e},t.queue=e,e=e.dispatch=jR.bind(null,Yt,e),[t.memoizedState,e]}function Hc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Yt.updateQueue,t===null?(t={lastEffect:null,stores:null},Yt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Uk(){return Xr().memoizedState}function kf(e,t,n,r){var i=Li();Yt.flags|=e,i.memoizedState=Hc(1|t,n,void 0,r===void 0?null:r)}function Cp(e,t,n,r){var i=Xr();r=r===void 0?null:r;var o=void 0;if(fn!==null){var l=fn.memoizedState;if(o=l.destroy,r!==null&&F0(r,l.deps)){i.memoizedState=Hc(t,n,o,r);return}}Yt.flags|=e,i.memoizedState=Hc(1|t,n,o,r)}function p1(e,t){return kf(8390656,8,e,t)}function z0(e,t){return Cp(2048,8,e,t)}function Gk(e,t){return Cp(4,2,e,t)}function Kk(e,t){return Cp(4,4,e,t)}function qk(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Yk(e,t,n){return n=n!=null?n.concat([e]):null,Cp(4,4,qk.bind(null,t,e),n)}function B0(){}function Xk(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&F0(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qk(e,t){var n=Xr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&F0(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zk(e,t,n){return bs&21?(mi(n,t)||(n=tk(),Yt.lanes|=n,ws|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,or=!0),e.memoizedState=n)}function zR(e,t){var n=Rt;Rt=n!==0&&4>n?n:4,e(!0);var r=nm.transition;nm.transition={};try{e(!1),t()}finally{Rt=n,nm.transition=r}}function Jk(){return Xr().memoizedState}function BR(e,t,n){var r=ga(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eE(e))tE(t,n);else if(n=Lk(e,t,n,r),n!==null){var i=Kn();gi(n,e,r,i),nE(n,t,r)}}function jR(e,t,n){var r=ga(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eE(e))tE(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,d=o(l,n);if(i.hasEagerState=!0,i.eagerState=d,mi(d,l)){var a=t.interleaved;a===null?(i.next=i,L0(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Lk(e,t,i,r),n!==null&&(i=Kn(),gi(n,e,r,i),nE(n,t,r))}}function eE(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function tE(e,t){uc=Sh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nE(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v0(e,n)}}var xh={readContext:Yr,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},HR={readContext:Yr,useCallback:function(e,t){return Li().memoizedState=[e,t===void 0?null:t],e},useContext:Yr,useEffect:p1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kf(4194308,4,qk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kf(4194308,4,e,t)},useInsertionEffect:function(e,t){return kf(4,2,e,t)},useMemo:function(e,t){var n=Li();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Li();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=BR.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=Li();return e={current:e},t.memoizedState=e},useState:h1,useDebugValue:B0,useDeferredValue:function(e){return Li().memoizedState=e},useTransition:function(){var e=h1(!1),t=e[0];return e=zR.bind(null,e[1]),Li().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,i=Li();if(Vt){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=t(),wn===null)throw Error(Ee(349));bs&30||Bk(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,p1(Hk.bind(null,r,o,e),[e]),r.flags|=2048,Hc(9,jk.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Li(),t=wn.identifierPrefix;if(Vt){var n=po,r=ho;n=(r&~(1<<32-pi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=NR++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},VR={readContext:Yr,useCallback:Xk,useContext:Yr,useEffect:z0,useImperativeHandle:Yk,useInsertionEffect:Gk,useLayoutEffect:Kk,useMemo:Qk,useReducer:rm,useRef:Uk,useState:function(){return rm(jc)},useDebugValue:B0,useDeferredValue:function(e){var t=Xr();return Zk(t,fn.memoizedState,e)},useTransition:function(){var e=rm(jc)[0],t=Xr().memoizedState;return[e,t]},useMutableSource:Nk,useSyncExternalStore:zk,useId:Jk,unstable_isNewReconciler:!1},WR={readContext:Yr,useCallback:Xk,useContext:Yr,useEffect:z0,useImperativeHandle:Yk,useInsertionEffect:Gk,useLayoutEffect:Kk,useMemo:Qk,useReducer:im,useRef:Uk,useState:function(){return im(jc)},useDebugValue:B0,useDeferredValue:function(e){var t=Xr();return fn===null?t.memoizedState=e:Zk(t,fn.memoizedState,e)},useTransition:function(){var e=im(jc)[0],t=Xr().memoizedState;return[e,t]},useMutableSource:Nk,useSyncExternalStore:zk,useId:Jk,unstable_isNewReconciler:!1};function eu(e,t){try{var n="",r=t;do n+=yL(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function om(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Uv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UR=typeof WeakMap=="function"?WeakMap:Map;function rE(e,t,n){n=yo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ch||(Ch=!0,ty=r),Uv(e,t)},n}function iE(e,t,n){n=yo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Uv(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Uv(e,t),typeof r!="function"&&(pa===null?pa=new Set([this]):pa.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function g1(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UR;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=oP.bind(null,e,t,n),t.then(e,e))}function m1(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function v1(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yo(-1,1),t.tag=2,ha(n,t,1))),n.lanes|=1),e)}var GR=Ao.ReactCurrentOwner,or=!1;function Un(e,t,n,r){t.child=e===null?Fk(t,null,n,r):Zl(t,e.child,n,r)}function y1(e,t,n,r,i){n=n.render;var o=t.ref;return Dl(t,i),r=D0(e,t,n,r,o,i),n=N0(),e!==null&&!or?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Eo(e,t,i)):(Vt&&n&&k0(t),t.flags|=1,Un(e,t,r,i),t.child)}function b1(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!q0(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,oE(e,t,o,r,i)):(e=Af(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ic,n(l,r)&&e.ref===t.ref)return Eo(e,t,i)}return t.flags|=1,e=ma(o,r),e.ref=t.ref,e.return=t,t.child=e}function oE(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ic(o,r)&&e.ref===t.ref)if(or=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(or=!0);else return t.lanes=e.lanes,Eo(e,t,i)}return Gv(e,t,n,r,i)}function aE(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dt(_l,mr),mr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Dt(_l,mr),mr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Dt(_l,mr),mr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Dt(_l,mr),mr|=r;return Un(e,t,i,n),t.child}function sE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Gv(e,t,n,r,i){var o=lr(n)?vs:jn.current;return o=Xl(t,o),Dl(t,i),n=D0(e,t,n,r,o,i),r=N0(),e!==null&&!or?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Eo(e,t,i)):(Vt&&r&&k0(t),t.flags|=1,Un(e,t,n,i),t.child)}function w1(e,t,n,r,i){if(lr(n)){var o=!0;ph(t)}else o=!1;if(Dl(t,i),t.stateNode===null)Ef(e,t),Ik(t,n,r),Wv(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,d=t.memoizedProps;l.props=d;var a=l.context,c=n.contextType;typeof c=="object"&&c!==null?c=Yr(c):(c=lr(n)?vs:jn.current,c=Xl(t,c));var s=n.getDerivedStateFromProps,u=typeof s=="function"||typeof l.getSnapshotBeforeUpdate=="function";u||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(d!==r||a!==c)&&d1(t,l,r,c),ea=!1;var f=t.memoizedState;l.state=f,bh(t,r,l,i),a=t.memoizedState,d!==r||f!==a||sr.current||ea?(typeof s=="function"&&(Vv(t,n,s,r),a=t.memoizedState),(d=ea||c1(t,n,d,r,f,a,c))?(u||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=c,r=d):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Rk(e,t),d=t.memoizedProps,c=t.type===t.elementType?d:si(t.type,d),l.props=c,u=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=Yr(a):(a=lr(n)?vs:jn.current,a=Xl(t,a));var h=n.getDerivedStateFromProps;(s=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(d!==u||f!==a)&&d1(t,l,r,a),ea=!1,f=t.memoizedState,l.state=f,bh(t,r,l,i);var p=t.memoizedState;d!==u||f!==p||sr.current||ea?(typeof h=="function"&&(Vv(t,n,h,r),p=t.memoizedState),(c=ea||c1(t,n,c,r,f,p,a)||!1)?(s||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,p,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,p,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),l.props=r,l.state=p,l.context=a,r=c):(typeof l.componentDidUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Kv(e,t,n,r,o,i)}function Kv(e,t,n,r,i,o){sE(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&o1(t,n,!1),Eo(e,t,o);r=t.stateNode,GR.current=t;var d=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Zl(t,e.child,null,o),t.child=Zl(t,null,d,o)):Un(e,t,d,o),t.memoizedState=r.state,i&&o1(t,n,!0),t.child}function lE(e){var t=e.stateNode;t.pendingContext?i1(e,t.pendingContext,t.pendingContext!==t.context):t.context&&i1(e,t.context,!1),P0(e,t.containerInfo)}function S1(e,t,n,r,i){return Ql(),$0(i),t.flags|=256,Un(e,t,n,r),t.child}var qv={dehydrated:null,treeContext:null,retryLane:0};function Yv(e){return{baseLanes:e,cachePool:null,transitions:null}}function uE(e,t,n){var r=t.pendingProps,i=Kt.current,o=!1,l=(t.flags&128)!==0,d;if((d=l)||(d=e!==null&&e.memoizedState===null?!1:(i&2)!==0),d?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Dt(Kt,i&1),e===null)return jv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=$p(l,r,0,null),e=cs(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Yv(n),t.memoizedState=qv,e):j0(t,l));if(i=e.memoizedState,i!==null&&(d=i.dehydrated,d!==null))return KR(e,t,l,r,d,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,d=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=ma(i,a),r.subtreeFlags=i.subtreeFlags&14680064),d!==null?o=ma(d,o):(o=cs(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Yv(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=qv,r}return o=e.child,e=o.sibling,r=ma(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function j0(e,t){return t=$p({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ud(e,t,n,r){return r!==null&&$0(r),Zl(t,e.child,null,n),e=j0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function KR(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=om(Error(Ee(422))),Ud(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$p({mode:"visible",children:r.children},i,0,null),o=cs(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Zl(t,e.child,null,l),t.child.memoizedState=Yv(l),t.memoizedState=qv,o);if(!(t.mode&1))return Ud(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var d=r.dgst;return r=d,o=Error(Ee(419)),r=om(o,r,void 0),Ud(e,t,l,r)}if(d=(l&e.childLanes)!==0,or||d){if(r=wn,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ko(e,i),gi(r,e,i,-1))}return K0(),r=om(Error(Ee(421))),Ud(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=aP.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,vr=fa(i.nextSibling),yr=t,Vt=!0,ui=null,e!==null&&(Vr[Wr++]=ho,Vr[Wr++]=po,Vr[Wr++]=ys,ho=e.id,po=e.overflow,ys=t),t=j0(t,r.children),t.flags|=4096,t)}function x1(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hv(e.return,t,n)}function am(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function cE(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Un(e,t,r.children,n),r=Kt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&x1(e,n,t);else if(e.tag===19)x1(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Dt(Kt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&wh(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),am(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&wh(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}am(t,!0,n,null,o);break;case"together":am(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ef(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Eo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ws|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ee(153));if(t.child!==null){for(e=t.child,n=ma(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ma(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qR(e,t,n){switch(t.tag){case 3:lE(t),Ql();break;case 5:Dk(t);break;case 1:lr(t.type)&&ph(t);break;case 4:P0(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Dt(vh,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Dt(Kt,Kt.current&1),t.flags|=128,null):n&t.child.childLanes?uE(e,t,n):(Dt(Kt,Kt.current&1),e=Eo(e,t,n),e!==null?e.sibling:null);Dt(Kt,Kt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return cE(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Dt(Kt,Kt.current),r)break;return null;case 22:case 23:return t.lanes=0,aE(e,t,n)}return Eo(e,t,n)}var dE,Xv,fE,hE;dE=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xv=function(){};fE=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,is(Bi.current);var o=null;switch(n){case"input":i=yv(e,i),r=yv(e,r),o=[];break;case"select":i=Xt({},i,{value:void 0}),r=Xt({},r,{value:void 0}),o=[];break;case"textarea":i=Sv(e,i),r=Sv(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fh)}_v(n,r);var l;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var d=i[c];for(l in d)d.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&($c.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(d=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&a!==d&&(a!=null||d!=null))if(c==="style")if(d){for(l in d)!d.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&d[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,d=d?d.__html:void 0,a!=null&&d!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&($c.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&Nt("scroll",e),o||d===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};hE=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lu(e,t){if(!Vt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function YR(e,t,n){var r=t.pendingProps;switch(E0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(t),null;case 1:return lr(t.type)&&hh(),Nn(t),null;case 3:return r=t.stateNode,Jl(),Bt(sr),Bt(jn),O0(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ui!==null&&(iy(ui),ui=null))),Xv(e,t),Nn(t),null;case 5:I0(t);var i=is(zc.current);if(n=t.type,e!==null&&t.stateNode!=null)fE(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ee(166));return Nn(t),null}if(e=is(Bi.current),Vd(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Fi]=t,r[Dc]=o,e=(t.mode&1)!==0,n){case"dialog":Nt("cancel",r),Nt("close",r);break;case"iframe":case"object":case"embed":Nt("load",r);break;case"video":case"audio":for(i=0;i<Gu.length;i++)Nt(Gu[i],r);break;case"source":Nt("error",r);break;case"img":case"image":case"link":Nt("error",r),Nt("load",r);break;case"details":Nt("toggle",r);break;case"input":Lw(r,o),Nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Nt("invalid",r);break;case"textarea":Pw(r,o),Nt("invalid",r)}_v(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var d=o[l];l==="children"?typeof d=="string"?r.textContent!==d&&(o.suppressHydrationWarning!==!0&&Hd(r.textContent,d,e),i=["children",d]):typeof d=="number"&&r.textContent!==""+d&&(o.suppressHydrationWarning!==!0&&Hd(r.textContent,d,e),i=["children",""+d]):$c.hasOwnProperty(l)&&d!=null&&l==="onScroll"&&Nt("scroll",r)}switch(n){case"input":Id(r),Rw(r,o,!0);break;case"textarea":Id(r),Iw(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=fh)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=BC(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Fi]=t,e[Dc]=r,dE(e,t,!1,!1),t.stateNode=e;e:{switch(l=Cv(n,r),n){case"dialog":Nt("cancel",e),Nt("close",e),i=r;break;case"iframe":case"object":case"embed":Nt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Gu.length;i++)Nt(Gu[i],e);i=r;break;case"source":Nt("error",e),i=r;break;case"img":case"image":case"link":Nt("error",e),Nt("load",e),i=r;break;case"details":Nt("toggle",e),i=r;break;case"input":Lw(e,r),i=yv(e,r),Nt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Xt({},r,{value:void 0}),Nt("invalid",e);break;case"textarea":Pw(e,r),i=Sv(e,r),Nt("invalid",e);break;default:i=r}_v(n,i),d=i;for(o in d)if(d.hasOwnProperty(o)){var a=d[o];o==="style"?VC(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&jC(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Tc(e,a):typeof a=="number"&&Tc(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&($c.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Nt("scroll",e):a!=null&&d0(e,o,a,l))}switch(n){case"input":Id(e),Rw(e,r,!1);break;case"textarea":Id(e),Iw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+wa(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Pl(e,!!r.multiple,o,!1):r.defaultValue!=null&&Pl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=fh)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Nn(t),null;case 6:if(e&&t.stateNode!=null)hE(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ee(166));if(n=is(zc.current),is(Bi.current),Vd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Fi]=t,(o=r.nodeValue!==n)&&(e=yr,e!==null))switch(e.tag){case 3:Hd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hd(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Fi]=t,t.stateNode=r}return Nn(t),null;case 13:if(Bt(Kt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Vt&&vr!==null&&t.mode&1&&!(t.flags&128))Mk(),Ql(),t.flags|=98560,o=!1;else if(o=Vd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Ee(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Ee(317));o[Fi]=t}else Ql(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nn(t),o=!1}else ui!==null&&(iy(ui),ui=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Kt.current&1?pn===0&&(pn=3):K0())),t.updateQueue!==null&&(t.flags|=4),Nn(t),null);case 4:return Jl(),Xv(e,t),e===null&&Oc(t.stateNode.containerInfo),Nn(t),null;case 10:return M0(t.type._context),Nn(t),null;case 17:return lr(t.type)&&hh(),Nn(t),null;case 19:if(Bt(Kt),o=t.memoizedState,o===null)return Nn(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)Lu(o,!1);else{if(pn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=wh(e),l!==null){for(t.flags|=128,Lu(o,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Dt(Kt,Kt.current&1|2),t.child}e=e.sibling}o.tail!==null&&nn()>tu&&(t.flags|=128,r=!0,Lu(o,!1),t.lanes=4194304)}else{if(!r)if(e=wh(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Vt)return Nn(t),null}else 2*nn()-o.renderingStartTime>tu&&n!==1073741824&&(t.flags|=128,r=!0,Lu(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=nn(),t.sibling=null,n=Kt.current,Dt(Kt,r?n&1|2:n&1),t):(Nn(t),null);case 22:case 23:return G0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?mr&1073741824&&(Nn(t),t.subtreeFlags&6&&(t.flags|=8192)):Nn(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function XR(e,t){switch(E0(t),t.tag){case 1:return lr(t.type)&&hh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jl(),Bt(sr),Bt(jn),O0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return I0(t),null;case 13:if(Bt(Kt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bt(Kt),null;case 4:return Jl(),null;case 10:return M0(t.type._context),null;case 22:case 23:return G0(),null;case 24:return null;default:return null}}var Gd=!1,Bn=!1,QR=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function xl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function Qv(e,t,n){try{n()}catch(r){en(e,t,r)}}var _1=!1;function ZR(e,t){if(Iv=uh,e=vk(),C0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,d=-1,a=-1,c=0,s=0,u=e,f=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(d=l+i),u!==o||r!==0&&u.nodeType!==3||(a=l+r),u.nodeType===3&&(l+=u.nodeValue.length),(h=u.firstChild)!==null;)f=u,u=h;for(;;){if(u===e)break t;if(f===n&&++c===i&&(d=l),f===o&&++s===r&&(a=l),(h=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=h}n=d===-1||a===-1?null:{start:d,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ov={focusedElem:e,selectionRange:n},uh=!1,Pe=t;Pe!==null;)if(t=Pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Pe=e;else for(;Pe!==null;){t=Pe;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,w=p.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:si(t.type,g),w);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(v){en(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,Pe=e;break}Pe=t.return}return p=_1,_1=!1,p}function cc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Qv(t,n,o)}i=i.next}while(i!==r)}}function kp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zv(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pE(e){var t=e.alternate;t!==null&&(e.alternate=null,pE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fi],delete t[Dc],delete t[Nv],delete t[IR],delete t[OR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gE(e){return e.tag===5||e.tag===3||e.tag===4}function C1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fh));else if(r!==4&&(e=e.child,e!==null))for(Jv(e,t,n),e=e.sibling;e!==null;)Jv(e,t,n),e=e.sibling}function ey(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ey(e,t,n),e=e.sibling;e!==null;)ey(e,t,n),e=e.sibling}var kn=null,li=!1;function Go(e,t,n){for(n=n.child;n!==null;)mE(e,t,n),n=n.sibling}function mE(e,t,n){if(zi&&typeof zi.onCommitFiberUnmount=="function")try{zi.onCommitFiberUnmount(vp,n)}catch{}switch(n.tag){case 5:Bn||xl(n,t);case 6:var r=kn,i=li;kn=null,Go(e,t,n),kn=r,li=i,kn!==null&&(li?(e=kn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kn.removeChild(n.stateNode));break;case 18:kn!==null&&(li?(e=kn,n=n.stateNode,e.nodeType===8?Jg(e.parentNode,n):e.nodeType===1&&Jg(e,n),Rc(e)):Jg(kn,n.stateNode));break;case 4:r=kn,i=li,kn=n.stateNode.containerInfo,li=!0,Go(e,t,n),kn=r,li=i;break;case 0:case 11:case 14:case 15:if(!Bn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Qv(n,t,l),i=i.next}while(i!==r)}Go(e,t,n);break;case 1:if(!Bn&&(xl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(d){en(n,t,d)}Go(e,t,n);break;case 21:Go(e,t,n);break;case 22:n.mode&1?(Bn=(r=Bn)||n.memoizedState!==null,Go(e,t,n),Bn=r):Go(e,t,n);break;default:Go(e,t,n)}}function k1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QR),t.forEach(function(r){var i=sP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ii(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,d=l;e:for(;d!==null;){switch(d.tag){case 5:kn=d.stateNode,li=!1;break e;case 3:kn=d.stateNode.containerInfo,li=!0;break e;case 4:kn=d.stateNode.containerInfo,li=!0;break e}d=d.return}if(kn===null)throw Error(Ee(160));mE(o,l,i),kn=null,li=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(c){en(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vE(t,e),t=t.sibling}function vE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ii(t,e),Ai(e),r&4){try{cc(3,e,e.return),kp(3,e)}catch(g){en(e,e.return,g)}try{cc(5,e,e.return)}catch(g){en(e,e.return,g)}}break;case 1:ii(t,e),Ai(e),r&512&&n!==null&&xl(n,n.return);break;case 5:if(ii(t,e),Ai(e),r&512&&n!==null&&xl(n,n.return),e.flags&32){var i=e.stateNode;try{Tc(i,"")}catch(g){en(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,d=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{d==="input"&&o.type==="radio"&&o.name!=null&&NC(i,o),Cv(d,l);var c=Cv(d,o);for(l=0;l<a.length;l+=2){var s=a[l],u=a[l+1];s==="style"?VC(i,u):s==="dangerouslySetInnerHTML"?jC(i,u):s==="children"?Tc(i,u):d0(i,s,u,c)}switch(d){case"input":bv(i,o);break;case"textarea":zC(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Pl(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Pl(i,!!o.multiple,o.defaultValue,!0):Pl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Dc]=o}catch(g){en(e,e.return,g)}}break;case 6:if(ii(t,e),Ai(e),r&4){if(e.stateNode===null)throw Error(Ee(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){en(e,e.return,g)}}break;case 3:if(ii(t,e),Ai(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rc(t.containerInfo)}catch(g){en(e,e.return,g)}break;case 4:ii(t,e),Ai(e);break;case 13:ii(t,e),Ai(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(W0=nn())),r&4&&k1(e);break;case 22:if(s=n!==null&&n.memoizedState!==null,e.mode&1?(Bn=(c=Bn)||s,ii(t,e),Bn=c):ii(t,e),Ai(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!s&&e.mode&1)for(Pe=e,s=e.child;s!==null;){for(u=Pe=s;Pe!==null;){switch(f=Pe,h=f.child,f.tag){case 0:case 11:case 14:case 15:cc(4,f,f.return);break;case 1:xl(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){en(r,n,g)}}break;case 5:xl(f,f.return);break;case 22:if(f.memoizedState!==null){$1(u);continue}}h!==null?(h.return=f,Pe=h):$1(u)}s=s.sibling}e:for(s=null,u=e;;){if(u.tag===5){if(s===null){s=u;try{i=u.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(d=u.stateNode,a=u.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,d.style.display=HC("display",l))}catch(g){en(e,e.return,g)}}}else if(u.tag===6){if(s===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){en(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;s===u&&(s=null),u=u.return}s===u&&(s=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:ii(t,e),Ai(e),r&4&&k1(e);break;case 21:break;default:ii(t,e),Ai(e)}}function Ai(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gE(n)){var r=n;break e}n=n.return}throw Error(Ee(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Tc(i,""),r.flags&=-33);var o=C1(e);ey(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,d=C1(e);Jv(e,d,l);break;default:throw Error(Ee(161))}}catch(a){en(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function JR(e,t,n){Pe=e,yE(e)}function yE(e,t,n){for(var r=(e.mode&1)!==0;Pe!==null;){var i=Pe,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||Gd;if(!l){var d=i.alternate,a=d!==null&&d.memoizedState!==null||Bn;d=Gd;var c=Bn;if(Gd=l,(Bn=a)&&!c)for(Pe=i;Pe!==null;)l=Pe,a=l.child,l.tag===22&&l.memoizedState!==null?T1(i):a!==null?(a.return=l,Pe=a):T1(i);for(;o!==null;)Pe=o,yE(o),o=o.sibling;Pe=i,Gd=d,Bn=c}E1(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Pe=o):E1(e)}}function E1(e){for(;Pe!==null;){var t=Pe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Bn||kp(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Bn)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:si(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&u1(t,o,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}u1(t,l,n)}break;case 5:var d=t.stateNode;if(n===null&&t.flags&4){n=d;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var s=c.memoizedState;if(s!==null){var u=s.dehydrated;u!==null&&Rc(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ee(163))}Bn||t.flags&512&&Zv(t)}catch(f){en(t,t.return,f)}}if(t===e){Pe=null;break}if(n=t.sibling,n!==null){n.return=t.return,Pe=n;break}Pe=t.return}}function $1(e){for(;Pe!==null;){var t=Pe;if(t===e){Pe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Pe=n;break}Pe=t.return}}function T1(e){for(;Pe!==null;){var t=Pe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kp(4,t)}catch(a){en(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){en(t,i,a)}}var o=t.return;try{Zv(t)}catch(a){en(t,o,a)}break;case 5:var l=t.return;try{Zv(t)}catch(a){en(t,l,a)}}}catch(a){en(t,t.return,a)}if(t===e){Pe=null;break}var d=t.sibling;if(d!==null){d.return=t.return,Pe=d;break}Pe=t.return}}var eP=Math.ceil,_h=Ao.ReactCurrentDispatcher,H0=Ao.ReactCurrentOwner,Kr=Ao.ReactCurrentBatchConfig,wt=0,wn=null,cn=null,An=0,mr=0,_l=Ea(0),pn=0,Vc=null,ws=0,Ep=0,V0=0,dc=null,nr=null,W0=0,tu=1/0,so=null,Ch=!1,ty=null,pa=null,Kd=!1,sa=null,kh=0,fc=0,ny=null,$f=-1,Tf=0;function Kn(){return wt&6?nn():$f!==-1?$f:$f=nn()}function ga(e){return e.mode&1?wt&2&&An!==0?An&-An:DR.transition!==null?(Tf===0&&(Tf=tk()),Tf):(e=Rt,e!==0||(e=window.event,e=e===void 0?16:lk(e.type)),e):1}function gi(e,t,n,r){if(50<fc)throw fc=0,ny=null,Error(Ee(185));sd(e,n,r),(!(wt&2)||e!==wn)&&(e===wn&&(!(wt&2)&&(Ep|=n),pn===4&&ia(e,An)),ur(e,r),n===1&&wt===0&&!(t.mode&1)&&(tu=nn()+500,xp&&$a()))}function ur(e,t){var n=e.callbackNode;DL(e,t);var r=lh(e,e===wn?An:0);if(r===0)n!==null&&Dw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Dw(n),t===1)e.tag===0?FR(A1.bind(null,e)):$k(A1.bind(null,e)),RR(function(){!(wt&6)&&$a()}),n=null;else{switch(nk(r)){case 1:n=m0;break;case 4:n=JC;break;case 16:n=sh;break;case 536870912:n=ek;break;default:n=sh}n=EE(n,bE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bE(e,t){if($f=-1,Tf=0,wt&6)throw Error(Ee(327));var n=e.callbackNode;if(Nl()&&e.callbackNode!==n)return null;var r=lh(e,e===wn?An:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Eh(e,r);else{t=r;var i=wt;wt|=2;var o=SE();(wn!==e||An!==t)&&(so=null,tu=nn()+500,us(e,t));do try{rP();break}catch(d){wE(e,d)}while(1);A0(),_h.current=o,wt=i,cn!==null?t=0:(wn=null,An=0,t=pn)}if(t!==0){if(t===2&&(i=Av(e),i!==0&&(r=i,t=ry(e,i))),t===1)throw n=Vc,us(e,0),ia(e,r),ur(e,nn()),n;if(t===6)ia(e,r);else{if(i=e.current.alternate,!(r&30)&&!tP(i)&&(t=Eh(e,r),t===2&&(o=Av(e),o!==0&&(r=o,t=ry(e,o))),t===1))throw n=Vc,us(e,0),ia(e,r),ur(e,nn()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ee(345));case 2:Ua(e,nr,so);break;case 3:if(ia(e,r),(r&130023424)===r&&(t=W0+500-nn(),10<t)){if(lh(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Kn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Dv(Ua.bind(null,e,nr,so),t);break}Ua(e,nr,so);break;case 4:if(ia(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-pi(r);o=1<<l,l=t[l],l>i&&(i=l),r&=~o}if(r=i,r=nn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*eP(r/1960))-r,10<r){e.timeoutHandle=Dv(Ua.bind(null,e,nr,so),r);break}Ua(e,nr,so);break;case 5:Ua(e,nr,so);break;default:throw Error(Ee(329))}}}return ur(e,nn()),e.callbackNode===n?bE.bind(null,e):null}function ry(e,t){var n=dc;return e.current.memoizedState.isDehydrated&&(us(e,t).flags|=256),e=Eh(e,t),e!==2&&(t=nr,nr=n,t!==null&&iy(t)),e}function iy(e){nr===null?nr=e:nr.push.apply(nr,e)}function tP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!mi(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ia(e,t){for(t&=~V0,t&=~Ep,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pi(t),r=1<<n;e[n]=-1,t&=~r}}function A1(e){if(wt&6)throw Error(Ee(327));Nl();var t=lh(e,0);if(!(t&1))return ur(e,nn()),null;var n=Eh(e,t);if(e.tag!==0&&n===2){var r=Av(e);r!==0&&(t=r,n=ry(e,r))}if(n===1)throw n=Vc,us(e,0),ia(e,t),ur(e,nn()),n;if(n===6)throw Error(Ee(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ua(e,nr,so),ur(e,nn()),null}function U0(e,t){var n=wt;wt|=1;try{return e(t)}finally{wt=n,wt===0&&(tu=nn()+500,xp&&$a())}}function Ss(e){sa!==null&&sa.tag===0&&!(wt&6)&&Nl();var t=wt;wt|=1;var n=Kr.transition,r=Rt;try{if(Kr.transition=null,Rt=1,e)return e()}finally{Rt=r,Kr.transition=n,wt=t,!(wt&6)&&$a()}}function G0(){mr=_l.current,Bt(_l)}function us(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,LR(n)),cn!==null)for(n=cn.return;n!==null;){var r=n;switch(E0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&hh();break;case 3:Jl(),Bt(sr),Bt(jn),O0();break;case 5:I0(r);break;case 4:Jl();break;case 13:Bt(Kt);break;case 19:Bt(Kt);break;case 10:M0(r.type._context);break;case 22:case 23:G0()}n=n.return}if(wn=e,cn=e=ma(e.current,null),An=mr=t,pn=0,Vc=null,V0=Ep=ws=0,nr=dc=null,rs!==null){for(t=0;t<rs.length;t++)if(n=rs[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}rs=null}return e}function wE(e,t){do{var n=cn;try{if(A0(),Cf.current=xh,Sh){for(var r=Yt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Sh=!1}if(bs=0,bn=fn=Yt=null,uc=!1,Bc=0,H0.current=null,n===null||n.return===null){pn=1,Vc=t,cn=null;break}e:{var o=e,l=n.return,d=n,a=t;if(t=An,d.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,s=d,u=s.tag;if(!(s.mode&1)&&(u===0||u===11||u===15)){var f=s.alternate;f?(s.updateQueue=f.updateQueue,s.memoizedState=f.memoizedState,s.lanes=f.lanes):(s.updateQueue=null,s.memoizedState=null)}var h=m1(l);if(h!==null){h.flags&=-257,v1(h,l,d,o,t),h.mode&1&&g1(o,c,t),t=h,a=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(a),t.updateQueue=g}else p.add(a);break e}else{if(!(t&1)){g1(o,c,t),K0();break e}a=Error(Ee(426))}}else if(Vt&&d.mode&1){var w=m1(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),v1(w,l,d,o,t),$0(eu(a,d));break e}}o=a=eu(a,d),pn!==4&&(pn=2),dc===null?dc=[o]:dc.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=rE(o,a,t);l1(o,x);break e;case 1:d=a;var S=o.type,T=o.stateNode;if(!(o.flags&128)&&(typeof S.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(pa===null||!pa.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=iE(o,d,t);l1(o,v);break e}}o=o.return}while(o!==null)}_E(n)}catch(b){t=b,cn===n&&n!==null&&(cn=n=n.return);continue}break}while(1)}function SE(){var e=_h.current;return _h.current=xh,e===null?xh:e}function K0(){(pn===0||pn===3||pn===2)&&(pn=4),wn===null||!(ws&268435455)&&!(Ep&268435455)||ia(wn,An)}function Eh(e,t){var n=wt;wt|=2;var r=SE();(wn!==e||An!==t)&&(so=null,us(e,t));do try{nP();break}catch(i){wE(e,i)}while(1);if(A0(),wt=n,_h.current=r,cn!==null)throw Error(Ee(261));return wn=null,An=0,pn}function nP(){for(;cn!==null;)xE(cn)}function rP(){for(;cn!==null&&!TL();)xE(cn)}function xE(e){var t=kE(e.alternate,e,mr);e.memoizedProps=e.pendingProps,t===null?_E(e):cn=t,H0.current=null}function _E(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=XR(n,t),n!==null){n.flags&=32767,cn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pn=6,cn=null;return}}else if(n=YR(n,t,mr),n!==null){cn=n;return}if(t=t.sibling,t!==null){cn=t;return}cn=t=e}while(t!==null);pn===0&&(pn=5)}function Ua(e,t,n){var r=Rt,i=Kr.transition;try{Kr.transition=null,Rt=1,iP(e,t,n,r)}finally{Kr.transition=i,Rt=r}return null}function iP(e,t,n,r){do Nl();while(sa!==null);if(wt&6)throw Error(Ee(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ee(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(NL(e,o),e===wn&&(cn=wn=null,An=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Kd||(Kd=!0,EE(sh,function(){return Nl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Kr.transition,Kr.transition=null;var l=Rt;Rt=1;var d=wt;wt|=4,H0.current=null,ZR(e,n),vE(n,e),CR(Ov),uh=!!Iv,Ov=Iv=null,e.current=n,JR(n),AL(),wt=d,Rt=l,Kr.transition=o}else e.current=n;if(Kd&&(Kd=!1,sa=e,kh=i),o=e.pendingLanes,o===0&&(pa=null),RL(n.stateNode),ur(e,nn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ch)throw Ch=!1,e=ty,ty=null,e;return kh&1&&e.tag!==0&&Nl(),o=e.pendingLanes,o&1?e===ny?fc++:(fc=0,ny=e):fc=0,$a(),null}function Nl(){if(sa!==null){var e=nk(kh),t=Kr.transition,n=Rt;try{if(Kr.transition=null,Rt=16>e?16:e,sa===null)var r=!1;else{if(e=sa,sa=null,kh=0,wt&6)throw Error(Ee(331));var i=wt;for(wt|=4,Pe=e.current;Pe!==null;){var o=Pe,l=o.child;if(Pe.flags&16){var d=o.deletions;if(d!==null){for(var a=0;a<d.length;a++){var c=d[a];for(Pe=c;Pe!==null;){var s=Pe;switch(s.tag){case 0:case 11:case 15:cc(8,s,o)}var u=s.child;if(u!==null)u.return=s,Pe=u;else for(;Pe!==null;){s=Pe;var f=s.sibling,h=s.return;if(pE(s),s===c){Pe=null;break}if(f!==null){f.return=h,Pe=f;break}Pe=h}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}Pe=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,Pe=l;else e:for(;Pe!==null;){if(o=Pe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:cc(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,Pe=x;break e}Pe=o.return}}var S=e.current;for(Pe=S;Pe!==null;){l=Pe;var T=l.child;if(l.subtreeFlags&2064&&T!==null)T.return=l,Pe=T;else e:for(l=S;Pe!==null;){if(d=Pe,d.flags&2048)try{switch(d.tag){case 0:case 11:case 15:kp(9,d)}}catch(b){en(d,d.return,b)}if(d===l){Pe=null;break e}var v=d.sibling;if(v!==null){v.return=d.return,Pe=v;break e}Pe=d.return}}if(wt=i,$a(),zi&&typeof zi.onPostCommitFiberRoot=="function")try{zi.onPostCommitFiberRoot(vp,e)}catch{}r=!0}return r}finally{Rt=n,Kr.transition=t}}return!1}function M1(e,t,n){t=eu(n,t),t=rE(e,t,1),e=ha(e,t,1),t=Kn(),e!==null&&(sd(e,1,t),ur(e,t))}function en(e,t,n){if(e.tag===3)M1(e,e,n);else for(;t!==null;){if(t.tag===3){M1(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pa===null||!pa.has(r))){e=eu(n,e),e=iE(t,e,1),t=ha(t,e,1),e=Kn(),t!==null&&(sd(t,1,e),ur(t,e));break}}t=t.return}}function oP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Kn(),e.pingedLanes|=e.suspendedLanes&n,wn===e&&(An&n)===n&&(pn===4||pn===3&&(An&130023424)===An&&500>nn()-W0?us(e,0):V0|=n),ur(e,t)}function CE(e,t){t===0&&(e.mode&1?(t=Dd,Dd<<=1,!(Dd&130023424)&&(Dd=4194304)):t=1);var n=Kn();e=ko(e,t),e!==null&&(sd(e,t,n),ur(e,n))}function aP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),CE(e,n)}function sP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ee(314))}r!==null&&r.delete(t),CE(e,n)}var kE;kE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sr.current)or=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return or=!1,qR(e,t,n);or=!!(e.flags&131072)}else or=!1,Vt&&t.flags&1048576&&Tk(t,mh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ef(e,t),e=t.pendingProps;var i=Xl(t,jn.current);Dl(t,n),i=D0(null,t,r,e,i,n);var o=N0();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lr(r)?(o=!0,ph(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,R0(t),i.updater=_p,t.stateNode=i,i._reactInternals=t,Wv(t,r,e,n),t=Kv(null,t,r,!0,o,n)):(t.tag=0,Vt&&o&&k0(t),Un(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ef(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=uP(r),e=si(r,e),i){case 0:t=Gv(null,t,r,e,n);break e;case 1:t=w1(null,t,r,e,n);break e;case 11:t=y1(null,t,r,e,n);break e;case 14:t=b1(null,t,r,si(r.type,e),n);break e}throw Error(Ee(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:si(r,i),Gv(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:si(r,i),w1(e,t,r,i,n);case 3:e:{if(lE(t),e===null)throw Error(Ee(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Rk(e,t),bh(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=eu(Error(Ee(423)),t),t=S1(e,t,r,n,i);break e}else if(r!==i){i=eu(Error(Ee(424)),t),t=S1(e,t,r,n,i);break e}else for(vr=fa(t.stateNode.containerInfo.firstChild),yr=t,Vt=!0,ui=null,n=Fk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ql(),r===i){t=Eo(e,t,n);break e}Un(e,t,r,n)}t=t.child}return t;case 5:return Dk(t),e===null&&jv(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Fv(r,i)?l=null:o!==null&&Fv(r,o)&&(t.flags|=32),sE(e,t),Un(e,t,l,n),t.child;case 6:return e===null&&jv(t),null;case 13:return uE(e,t,n);case 4:return P0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zl(t,null,r,n):Un(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:si(r,i),y1(e,t,r,i,n);case 7:return Un(e,t,t.pendingProps,n),t.child;case 8:return Un(e,t,t.pendingProps.children,n),t.child;case 12:return Un(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Dt(vh,r._currentValue),r._currentValue=l,o!==null)if(mi(o.value,l)){if(o.children===i.children&&!sr.current){t=Eo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var d=o.dependencies;if(d!==null){l=o.child;for(var a=d.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=yo(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var s=c.pending;s===null?a.next=a:(a.next=s.next,s.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Hv(o.return,n,t),d.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(Ee(341));l.lanes|=n,d=l.alternate,d!==null&&(d.lanes|=n),Hv(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Un(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Dl(t,n),i=Yr(i),r=r(i),t.flags|=1,Un(e,t,r,n),t.child;case 14:return r=t.type,i=si(r,t.pendingProps),i=si(r.type,i),b1(e,t,r,i,n);case 15:return oE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:si(r,i),Ef(e,t),t.tag=1,lr(r)?(e=!0,ph(t)):e=!1,Dl(t,n),Ik(t,r,i),Wv(t,r,i,n),Kv(null,t,r,!0,e,n);case 19:return cE(e,t,n);case 22:return aE(e,t,n)}throw Error(Ee(156,t.tag))};function EE(e,t){return ZC(e,t)}function lP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(e,t,n,r){return new lP(e,t,n,r)}function q0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uP(e){if(typeof e=="function")return q0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===h0)return 11;if(e===p0)return 14}return 2}function ma(e,t){var n=e.alternate;return n===null?(n=Ur(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Af(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")q0(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case hl:return cs(n.children,i,o,t);case f0:l=8,i|=8;break;case pv:return e=Ur(12,n,t,i|2),e.elementType=pv,e.lanes=o,e;case gv:return e=Ur(13,n,t,i),e.elementType=gv,e.lanes=o,e;case mv:return e=Ur(19,n,t,i),e.elementType=mv,e.lanes=o,e;case OC:return $p(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case PC:l=10;break e;case IC:l=9;break e;case h0:l=11;break e;case p0:l=14;break e;case Jo:l=16,r=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=Ur(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function cs(e,t,n,r){return e=Ur(7,e,r,t),e.lanes=n,e}function $p(e,t,n,r){return e=Ur(22,e,r,t),e.elementType=OC,e.lanes=n,e.stateNode={isHidden:!1},e}function sm(e,t,n){return e=Ur(6,e,null,t),e.lanes=n,e}function lm(e,t,n){return t=Ur(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cP(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hg(0),this.expirationTimes=Hg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Y0(e,t,n,r,i,o,l,d,a){return e=new cP(e,t,n,d,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ur(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},R0(o),e}function dP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $E(e){if(!e)return Sa;e=e._reactInternals;e:{if($s(e)!==e||e.tag!==1)throw Error(Ee(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ee(171))}if(e.tag===1){var n=e.type;if(lr(n))return Ek(e,n,t)}return t}function TE(e,t,n,r,i,o,l,d,a){return e=Y0(n,r,!0,e,i,o,l,d,a),e.context=$E(null),n=e.current,r=Kn(),i=ga(n),o=yo(r,i),o.callback=t??null,ha(n,o,i),e.current.lanes=i,sd(e,i,r),ur(e,r),e}function Tp(e,t,n,r){var i=t.current,o=Kn(),l=ga(i);return n=$E(n),t.context===null?t.context=n:t.pendingContext=n,t=yo(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ha(i,t,l),e!==null&&(gi(e,i,l,o),_f(e,i,l)),l}function $h(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function L1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function X0(e,t){L1(e,t),(e=e.alternate)&&L1(e,t)}function fP(){return null}var AE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Q0(e){this._internalRoot=e}Ap.prototype.render=Q0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ee(409));Tp(e,t,null,null)};Ap.prototype.unmount=Q0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ss(function(){Tp(null,e,null,null)}),t[Co]=null}};function Ap(e){this._internalRoot=e}Ap.prototype.unstable_scheduleHydration=function(e){if(e){var t=ok();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ra.length&&t!==0&&t<ra[n].priority;n++);ra.splice(n,0,e),n===0&&sk(e)}};function Z0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function R1(){}function hP(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=$h(l);o.call(c)}}var l=TE(t,r,e,0,null,!1,!1,"",R1);return e._reactRootContainer=l,e[Co]=l.current,Oc(e.nodeType===8?e.parentNode:e),Ss(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var d=r;r=function(){var c=$h(a);d.call(c)}}var a=Y0(e,0,!1,null,null,!1,!1,"",R1);return e._reactRootContainer=a,e[Co]=a.current,Oc(e.nodeType===8?e.parentNode:e),Ss(function(){Tp(t,a,n,r)}),a}function Lp(e,t,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var d=i;i=function(){var a=$h(l);d.call(a)}}Tp(t,l,e,i)}else l=hP(n,t,e,i,r);return $h(l)}rk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Uu(t.pendingLanes);n!==0&&(v0(t,n|1),ur(t,nn()),!(wt&6)&&(tu=nn()+500,$a()))}break;case 13:Ss(function(){var r=ko(e,1);if(r!==null){var i=Kn();gi(r,e,1,i)}}),X0(e,1)}};y0=function(e){if(e.tag===13){var t=ko(e,134217728);if(t!==null){var n=Kn();gi(t,e,134217728,n)}X0(e,134217728)}};ik=function(e){if(e.tag===13){var t=ga(e),n=ko(e,t);if(n!==null){var r=Kn();gi(n,e,t,r)}X0(e,t)}};ok=function(){return Rt};ak=function(e,t){var n=Rt;try{return Rt=e,t()}finally{Rt=n}};Ev=function(e,t,n){switch(t){case"input":if(bv(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Sp(r);if(!i)throw Error(Ee(90));DC(r),bv(r,i)}}}break;case"textarea":zC(e,n);break;case"select":t=n.value,t!=null&&Pl(e,!!n.multiple,t,!1)}};GC=U0;KC=Ss;var pP={usingClientEntryPoint:!1,Events:[ud,vl,Sp,WC,UC,U0]},Ru={findFiberByHostInstance:ns,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},gP={bundleType:Ru.bundleType,version:Ru.version,rendererPackageName:Ru.rendererPackageName,rendererConfig:Ru.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ao.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=XC(e),e===null?null:e.stateNode},findFiberByHostInstance:Ru.findFiberByHostInstance||fP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qd.isDisabled&&qd.supportsFiber)try{vp=qd.inject(gP),zi=qd}catch{}}Cr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pP;Cr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Z0(t))throw Error(Ee(200));return dP(e,t,null,n)};Cr.createRoot=function(e,t){if(!Z0(e))throw Error(Ee(299));var n=!1,r="",i=AE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Y0(e,1,!1,null,null,n,!1,r,i),e[Co]=t.current,Oc(e.nodeType===8?e.parentNode:e),new Q0(t)};Cr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ee(188)):(e=Object.keys(e).join(","),Error(Ee(268,e)));return e=XC(t),e=e===null?null:e.stateNode,e};Cr.flushSync=function(e){return Ss(e)};Cr.hydrate=function(e,t,n){if(!Mp(t))throw Error(Ee(200));return Lp(null,e,t,!0,n)};Cr.hydrateRoot=function(e,t,n){if(!Z0(e))throw Error(Ee(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=AE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=TE(t,null,e,1,n??null,i,!1,o,l),e[Co]=t.current,Oc(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ap(t)};Cr.render=function(e,t,n){if(!Mp(t))throw Error(Ee(200));return Lp(null,e,t,!1,n)};Cr.unmountComponentAtNode=function(e){if(!Mp(e))throw Error(Ee(40));return e._reactRootContainer?(Ss(function(){Lp(null,null,e,!1,function(){e._reactRootContainer=null,e[Co]=null})}),!0):!1};Cr.unstable_batchedUpdates=U0;Cr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Mp(n))throw Error(Ee(200));if(e==null||e._reactInternals===void 0)throw Error(Ee(38));return Lp(e,t,n,!1,r)};Cr.version="18.2.0-next-9e3b772b8-20220608";function ME(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ME)}catch(e){console.error(e)}}ME(),TC.exports=Cr;var dd=TC.exports;const Yd=ks(dd);var P1=dd;ql.createRoot=P1.createRoot,ql.hydrateRoot=P1.hydrateRoot;var zr={},pu={},Mo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEventSourceSupported=e.isReactNative=e.ReadyState=e.UNPARSABLE_JSON_OBJECT=e.DEFAULT_RECONNECT_INTERVAL_MS=e.DEFAULT_RECONNECT_LIMIT=e.SOCKET_IO_PING_CODE=e.SOCKET_IO_PATH=e.SOCKET_IO_PING_INTERVAL=e.DEFAULT_EVENT_SOURCE_OPTIONS=e.EMPTY_EVENT_HANDLERS=e.DEFAULT_OPTIONS=void 0;var t=1,n=1e3*t;e.DEFAULT_OPTIONS={},e.EMPTY_EVENT_HANDLERS={},e.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:e.EMPTY_EVENT_HANDLERS},e.SOCKET_IO_PING_INTERVAL=25*n,e.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",e.SOCKET_IO_PING_CODE="2",e.DEFAULT_RECONNECT_LIMIT=20,e.DEFAULT_RECONNECT_INTERVAL_MS=5e3,e.UNPARSABLE_JSON_OBJECT={},function(i){i[i.UNINSTANTIATED=-1]="UNINSTANTIATED",i[i.CONNECTING=0]="CONNECTING",i[i.OPEN=1]="OPEN",i[i.CLOSING=2]="CLOSING",i[i.CLOSED=3]="CLOSED"}(e.ReadyState||(e.ReadyState={}));var r=function(){try{return"EventSource"in globalThis}catch{return!1}};e.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative",e.isEventSourceSupported=!e.isReactNative&&r()})(Mo);var Rp={},Pp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetWebSockets=e.sharedWebSockets=void 0,e.sharedWebSockets={},e.resetWebSockets=function(t){if(t&&e.sharedWebSockets.hasOwnProperty(t))delete e.sharedWebSockets[t];else for(var n in e.sharedWebSockets)e.sharedWebSockets.hasOwnProperty(n)&&delete e.sharedWebSockets[n]}})(Pp);var Ip={},ji={};Object.defineProperty(ji,"__esModule",{value:!0});ji.setUpSocketIOPing=ji.appendQueryParams=ji.parseSocketIOUrl=void 0;var Th=Mo;ji.parseSocketIOUrl=function(e){if(e){var t=/^https|wss/.test(e),n=e.replace(/^(https?|wss?)(:\/\/)?/,""),r=n.replace(/\/$/,""),i=t?"wss":"ws";return i+"://"+r+Th.SOCKET_IO_PATH}else if(e===""){var t=/^https/.test(window.location.protocol),i=t?"wss":"ws",o=window.location.port?":"+window.location.port:"";return i+"://"+window.location.hostname+o+Th.SOCKET_IO_PATH}return e};ji.appendQueryParams=function(e,t){t===void 0&&(t={});var n=/\?([\w]+=[\w]+)/,r=n.test(e),i=""+Object.entries(t).reduce(function(o,l){var d=l[0],a=l[1];return o+(d+"="+a+"&")},"").slice(0,-1);return""+e+(r?"&":"?")+i};ji.setUpSocketIOPing=function(e,t){t===void 0&&(t=Th.SOCKET_IO_PING_INTERVAL);var n=function(){return e(Th.SOCKET_IO_PING_CODE)};return setInterval(n,t)};var xa={},Op={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetSubscribers=e.removeSubscriber=e.addSubscriber=e.hasSubscribers=e.getSubscribers=void 0;var t={},n=[];e.getSubscribers=function(r){return e.hasSubscribers(r)?Array.from(t[r]):n},e.hasSubscribers=function(r){var i;return((i=t[r])===null||i===void 0?void 0:i.size)>0},e.addSubscriber=function(r,i){t[r]=t[r]||new Set,t[r].add(i)},e.removeSubscriber=function(r,i){t[r].delete(i)},e.resetSubscribers=function(r){if(r&&t.hasOwnProperty(r))delete t[r];else for(var i in t)t.hasOwnProperty(i)&&delete t[i]}})(Op);Object.defineProperty(xa,"__esModule",{value:!0});xa.resetGlobalState=xa.assertIsWebSocket=void 0;var mP=Pp,vP=Op;function yP(e){if(!(e instanceof WebSocket))throw new Error("")}xa.assertIsWebSocket=yP;function bP(e){vP.resetSubscribers(e),mP.resetWebSockets(e)}xa.resetGlobalState=bP;var Ah=Be&&Be.__assign||function(){return Ah=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ah.apply(this,arguments)};Object.defineProperty(Ip,"__esModule",{value:!0});Ip.attachListeners=void 0;var wP=ji,Ni=Mo,SP=xa,xP=function(e,t,n){e.onmessage=function(r){t.current.onMessage&&t.current.onMessage(r),!(typeof t.current.filter=="function"&&t.current.filter(r)!==!0)&&n(r)}},_P=function(e,t,n,r){e.onopen=function(i){t.current.onOpen&&t.current.onOpen(i),r.current=0,n(Ni.ReadyState.OPEN)}},CP=function(e,t,n,r,i){if(Ni.isEventSourceSupported&&e instanceof EventSource)return function(){};SP.assertIsWebSocket(e);var o;return e.onclose=function(l){var d,a;if(t.current.onClose&&t.current.onClose(l),n(Ni.ReadyState.CLOSED),t.current.shouldReconnect&&t.current.shouldReconnect(l)){var c=(d=t.current.reconnectAttempts)!==null&&d!==void 0?d:Ni.DEFAULT_RECONNECT_LIMIT;i.current<c?o=window.setTimeout(function(){i.current++,r()},(a=t.current.reconnectInterval)!==null&&a!==void 0?a:Ni.DEFAULT_RECONNECT_INTERVAL_MS):(t.current.onReconnectStop&&t.current.onReconnectStop(c),console.warn("Max reconnect attempts of "+c+" exceeded"))}},function(){return o&&window.clearTimeout(o)}},kP=function(e,t,n,r,i){var o;return e.onerror=function(l){var d,a;t.current.onError&&t.current.onError(l),Ni.isEventSourceSupported&&e instanceof EventSource&&(t.current.onClose&&t.current.onClose(Ah(Ah({},l),{code:1006,reason:"An error occurred with the EventSource: "+l,wasClean:!1})),n(Ni.ReadyState.CLOSED),e.close()),t.current.retryOnError&&(i.current<((d=t.current.reconnectAttempts)!==null&&d!==void 0?d:Ni.DEFAULT_RECONNECT_LIMIT)?o=window.setTimeout(function(){i.current++,r()},(a=t.current.reconnectInterval)!==null&&a!==void 0?a:Ni.DEFAULT_RECONNECT_INTERVAL_MS):(t.current.onReconnectStop&&t.current.onReconnectStop(t.current.reconnectAttempts),console.warn("Max reconnect attempts of "+t.current.reconnectAttempts+" exceeded")))},function(){return o&&window.clearTimeout(o)}};Ip.attachListeners=function(e,t,n,r,i,o){var l=t.setLastMessage,d=t.setReadyState,a,c,s;return n.current.fromSocketIO&&(a=wP.setUpSocketIOPing(o)),xP(e,n,l),_P(e,n,d,i),c=CP(e,n,d,r,i),s=kP(e,n,d,r,i),function(){d(Ni.ReadyState.CLOSING),c(),s(),e.close(),a&&clearInterval(a)}};var Fp={},Mh=Be&&Be.__assign||function(){return Mh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Mh.apply(this,arguments)};Object.defineProperty(Fp,"__esModule",{value:!0});Fp.attachSharedListeners=void 0;var EP=Pp,ds=Mo,Wc=Op,$P=ji,TP=function(e,t){e.onmessage=function(n){Wc.getSubscribers(t).forEach(function(r){r.optionsRef.current.onMessage&&r.optionsRef.current.onMessage(n),!(typeof r.optionsRef.current.filter=="function"&&r.optionsRef.current.filter(n)!==!0)&&r.setLastMessage(n)})}},AP=function(e,t){e.onopen=function(n){Wc.getSubscribers(t).forEach(function(r){r.reconnectCount.current=0,r.optionsRef.current.onOpen&&r.optionsRef.current.onOpen(n),r.setReadyState(ds.ReadyState.OPEN)})}},MP=function(e,t){e instanceof WebSocket&&(e.onclose=function(n){Wc.getSubscribers(t).forEach(function(r){r.optionsRef.current.onClose&&r.optionsRef.current.onClose(n),r.setReadyState(ds.ReadyState.CLOSED)}),delete EP.sharedWebSockets[t],Wc.getSubscribers(t).forEach(function(r){var i,o;if(r.optionsRef.current.shouldReconnect&&r.optionsRef.current.shouldReconnect(n)){var l=(i=r.optionsRef.current.reconnectAttempts)!==null&&i!==void 0?i:ds.DEFAULT_RECONNECT_LIMIT;r.reconnectCount.current<l?setTimeout(function(){r.reconnectCount.current++,r.reconnect.current()},(o=r.optionsRef.current.reconnectInterval)!==null&&o!==void 0?o:ds.DEFAULT_RECONNECT_INTERVAL_MS):(r.optionsRef.current.onReconnectStop&&r.optionsRef.current.onReconnectStop(r.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of "+l+" exceeded"))}})})},LP=function(e,t){e.onerror=function(n){Wc.getSubscribers(t).forEach(function(r){r.optionsRef.current.onError&&r.optionsRef.current.onError(n),ds.isEventSourceSupported&&e instanceof EventSource&&(r.optionsRef.current.onClose&&r.optionsRef.current.onClose(Mh(Mh({},n),{code:1006,reason:"An error occurred with the EventSource: "+n,wasClean:!1})),r.setReadyState(ds.ReadyState.CLOSED))}),ds.isEventSourceSupported&&e instanceof EventSource&&e.close()}};Fp.attachSharedListeners=function(e,t,n,r){var i;return n.current.fromSocketIO&&(i=$P.setUpSocketIOPing(r)),TP(e,t),MP(e,t),AP(e,t),LP(e,t),function(){i&&clearInterval(i)}};Object.defineProperty(Rp,"__esModule",{value:!0});Rp.createOrJoinSocket=void 0;var ta=Pp,Ku=Mo,RP=Ip,PP=Fp,oy=Op,IP=function(e,t,n,r,i){return function(){if(oy.removeSubscriber(e,t),!oy.hasSubscribers(e)){try{var o=ta.sharedWebSockets[e];o instanceof WebSocket&&(o.onclose=function(l){n.current.onClose&&n.current.onClose(l),r(Ku.ReadyState.CLOSED)}),o.close()}catch{}i&&i(),delete ta.sharedWebSockets[e]}}};Rp.createOrJoinSocket=function(e,t,n,r,i,o,l,d){if(!Ku.isEventSourceSupported&&r.current.eventSourceOptions)throw Ku.isReactNative?new Error("EventSource is not supported in ReactNative"):new Error("EventSource is not supported");if(r.current.share){var a=null;ta.sharedWebSockets[t]===void 0?(ta.sharedWebSockets[t]=r.current.eventSourceOptions?new EventSource(t,r.current.eventSourceOptions):new WebSocket(t,r.current.protocols),e.current=ta.sharedWebSockets[t],n(Ku.ReadyState.CONNECTING),a=PP.attachSharedListeners(ta.sharedWebSockets[t],t,r,d)):(e.current=ta.sharedWebSockets[t],n(ta.sharedWebSockets[t].readyState));var c={setLastMessage:i,setReadyState:n,optionsRef:r,reconnectCount:l,reconnect:o};return oy.addSubscriber(t,c),IP(t,c,r,n,a)}else{if(e.current=r.current.eventSourceOptions?new EventSource(t,r.current.eventSourceOptions):new WebSocket(t,r.current.protocols),n(Ku.ReadyState.CONNECTING),!e.current)throw new Error("WebSocket failed to be created");return RP.attachListeners(e.current,{setLastMessage:i,setReadyState:n},r,o.current,l,d)}};var Dp={},OP=Be&&Be.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function d(s){try{c(r.next(s))}catch(u){l(u)}}function a(s){try{c(r.throw(s))}catch(u){l(u)}}function c(s){s.done?o(s.value):i(s.value).then(d,a)}c((r=r.apply(e,t||[])).next())})},FP=Be&&Be.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(c){return function(s){return a([c,s])}}function a(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(s){c=[6,s],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Dp,"__esModule",{value:!0});Dp.getUrl=void 0;var I1=ji;Dp.getUrl=function(e,t){return OP(void 0,void 0,void 0,function(){var n,r,i;return FP(this,function(o){switch(o.label){case 0:return typeof e!="function"?[3,2]:[4,e()];case 1:return n=o.sent(),[3,3];case 2:n=e,o.label=3;case 3:return r=t.current.fromSocketIO?I1.parseSocketIOUrl(n):n,i=t.current.queryParams?I1.appendQueryParams(r,t.current.queryParams):r,[2,i]}})})};var LE={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.websocketWrapper=void 0,e.websocketWrapper=function(t,n){return new Proxy(t,{get:function(r,i){var o=r[i];return i==="reconnect"?n:typeof o=="function"?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):o},set:function(r,i,o){return/^on/.test(i)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(r[i]=o,!0)}})},e.default=e.websocketWrapper})(LE);var Cl=Be&&Be.__assign||function(){return Cl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cl.apply(this,arguments)},DP=Be&&Be.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function d(s){try{c(r.next(s))}catch(u){l(u)}}function a(s){try{c(r.throw(s))}catch(u){l(u)}}function c(s){s.done?o(s.value):i(s.value).then(d,a)}c((r=r.apply(e,t||[])).next())})},NP=Be&&Be.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(c){return function(s){return a([c,s])}}function a(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(s){c=[6,s],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},zP=Be&&Be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pu,"__esModule",{value:!0});pu.useWebSocket=void 0;var Vn=N,io=Mo,BP=Rp,jP=Dp,HP=zP(LE),O1=xa;pu.useWebSocket=function(e,t,n){t===void 0&&(t=io.DEFAULT_OPTIONS),n===void 0&&(n=!0);var r=Vn.useState(null),i=r[0],o=r[1],l=Vn.useState({}),d=l[0],a=l[1],c=Vn.useMemo(function(){if(i)try{return JSON.parse(i.data)}catch{return io.UNPARSABLE_JSON_OBJECT}return null},[i]),s=Vn.useRef(null),u=Vn.useRef(null),f=Vn.useRef(function(){}),h=Vn.useRef(0),p=Vn.useRef([]),g=Vn.useRef(null),w=Vn.useRef(t);w.current=t;var x=s.current&&d[s.current]!==void 0?d[s.current]:e!==null&&n===!0?io.ReadyState.CONNECTING:io.ReadyState.UNINSTANTIATED,S=t.queryParams?JSON.stringify(t.queryParams):null,T=Vn.useCallback(function(y,m){var E;if(m===void 0&&(m=!0),io.isEventSourceSupported&&u.current instanceof EventSource){console.warn("Unable to send a message from an eventSource");return}((E=u.current)===null||E===void 0?void 0:E.readyState)===io.ReadyState.OPEN?(O1.assertIsWebSocket(u.current),u.current.send(y)):m&&p.current.push(y)},[]),v=Vn.useCallback(function(y,m){m===void 0&&(m=!0),T(JSON.stringify(y),m)},[T]),b=Vn.useCallback(function(){return w.current.share!==!0||io.isEventSourceSupported&&u.current instanceof EventSource?u.current:(g.current===null&&u.current&&(O1.assertIsWebSocket(u.current),g.current=HP.default(u.current,f)),g.current)},[]);return Vn.useEffect(function(){if(e!==null&&n===!0){var y,m=!1,E=function(){return DP(void 0,void 0,void 0,function(){var M,C,k;return NP(this,function(O){switch(O.label){case 0:return M=s,[4,jP.getUrl(e,w)];case 1:return M.current=O.sent(),C=function(R){m||o(R)},k=function(R){m||a(function(A){var I;return Cl(Cl({},A),s.current&&(I={},I[s.current]=R,I))})},y=BP.createOrJoinSocket(u,s.current,k,w,C,f,h,T),[2]}})})};return f.current=function(){m||(g.current&&(g.current=null),y==null||y(),E())},E(),function(){m=!0,g.current&&(g.current=null),y==null||y(),o(null)}}else(e===null||n===!1)&&(h.current=0,a(function(M){var C;return Cl(Cl({},M),s.current&&(C={},C[s.current]=io.ReadyState.CLOSED,C))}))},[e,n,S,T]),Vn.useEffect(function(){x===io.ReadyState.OPEN&&p.current.splice(0).forEach(function(y){T(y)})},[x]),{sendMessage:T,sendJsonMessage:v,lastMessage:i,lastJsonMessage:c,readyState:x,getWebSocket:b}};var Np={},Lh=Be&&Be.__assign||function(){return Lh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Lh.apply(this,arguments)};Object.defineProperty(Np,"__esModule",{value:!0});Np.useSocketIO=void 0;var F1=N,VP=pu,WP=Mo,um={type:"empty",payload:null},UP=function(e){if(!e||!e.data)return um;var t=e.data.match(/\[.*]/);if(!t)return um;var n=JSON.parse(t);return!Array.isArray(n)||!n[1]?um:{type:n[0],payload:n[1]}};Np.useSocketIO=function(e,t,n){t===void 0&&(t=WP.DEFAULT_OPTIONS),n===void 0&&(n=!0);var r=F1.useMemo(function(){return Lh(Lh({},t),{fromSocketIO:!0})},[]),i=VP.useWebSocket(e,r,n),o=i.sendMessage,l=i.sendJsonMessage,d=i.lastMessage,a=i.readyState,c=i.getWebSocket,s=F1.useMemo(function(){return UP(d)},[d]);return{sendMessage:o,sendJsonMessage:l,lastMessage:s,lastJsonMessage:s,readyState:a,getWebSocket:c}};var zp={},Rh=Be&&Be.__assign||function(){return Rh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Rh.apply(this,arguments)},GP=Be&&Be.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(zp,"__esModule",{value:!0});zp.useEventSource=void 0;var D1=N,KP=pu,N1=Mo;zp.useEventSource=function(e,t,n){t===void 0&&(t=N1.DEFAULT_EVENT_SOURCE_OPTIONS),n===void 0&&(n=!0);var r=t.withCredentials,i=t.events,o=GP(t,["withCredentials","events"]),l=Rh(Rh({},o),{eventSourceOptions:{withCredentials:r}}),d=D1.useRef(N1.EMPTY_EVENT_HANDLERS);i&&(d.current=i);var a=KP.useWebSocket(e,l,n),c=a.lastMessage,s=a.readyState,u=a.getWebSocket;return D1.useEffect(function(){c!=null&&c.type&&Object.entries(d.current).forEach(function(f){var h=f[0],p=f[1];h===c.type&&p(c)})},[c]),{lastEvent:c,readyState:s,getEventSource:u}};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=pu;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.useWebSocket}});var n=Np;Object.defineProperty(e,"useSocketIO",{enumerable:!0,get:function(){return n.useSocketIO}});var r=Mo;Object.defineProperty(e,"ReadyState",{enumerable:!0,get:function(){return r.ReadyState}});var i=zp;Object.defineProperty(e,"useEventSource",{enumerable:!0,get:function(){return i.useEventSource}});var o=xa;Object.defineProperty(e,"resetGlobalState",{enumerable:!0,get:function(){return o.resetGlobalState}})})(zr);const qP=ks(zr);function En(e){const t=e.className?e.className+" flex-row":"flex-row";return W.jsx("div",{...e,className:t,children:e.children})}const Ha=e=>W.jsx(En,{...e,style:{width:"100%",justifyContent:"space-between",gap:"30px"}});function uo(e){const t=e.className?e.className+" flex-column":"flex-column";return W.jsx("div",{...e,className:t,children:e.children})}var RE={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var i=function(s,u,f){if(typeof s!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(f=u),i.modules[s]||(i.payloads[s]=f,i.modules[s]=null)};i.modules={},i.payloads={};var o=function(s,u,f){if(typeof u=="string"){var h=a(s,u);if(h!=null)return f&&f(),h}else if(Object.prototype.toString.call(u)==="[object Array]"){for(var p=[],g=0,w=u.length;g<w;++g){var x=a(s,u[g]);if(x==null&&l.original)return;p.push(x)}return f&&f.apply(null,p)||!0}},l=function(s,u){var f=o("",s,u);return f==null&&l.original?l.original.apply(this,arguments):f},d=function(s,u){if(u.indexOf("!")!==-1){var f=u.split("!");return d(s,f[0])+"!"+d(s,f[1])}if(u.charAt(0)=="."){var h=s.split("/").slice(0,-1).join("/");for(u=h+"/"+u;u.indexOf(".")!==-1&&p!=u;){var p=u;u=u.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return u},a=function(s,u){u=d(s,u);var f=i.modules[u];if(!f){if(f=i.payloads[u],typeof f=="function"){var h={},p={id:u,uri:"",exports:h,packaged:!0},g=function(x,S){return o(u,x,S)},w=f(g,h,p);h=w||p.exports,i.modules[u]=h,delete i.payloads[u]}f=i.modules[u]=h||f}return f};function c(s){var u=r;s&&(r[s]||(r[s]={}),u=r[s]),(!u.define||!u.define.packaged)&&(i.original=u.define,u.define=i,u.define.packaged=!0),(!u.require||!u.require.packaged)&&(l.original=u.require,u.require=l,u.require.packaged=!0)}c(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,i){function o(l,d,a){Object.defineProperty(l,d,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",function(l,d){return d=d||0,this.lastIndexOf(l,d)===d}),String.prototype.endsWith||o(String.prototype,"endsWith",function(l,d){var a=this;(d===void 0||d>a.length)&&(d=a.length),d-=l.length;var c=a.indexOf(l,d);return c!==-1&&c===d}),String.prototype.repeat||o(String.prototype,"repeat",function(l){for(var d="",a=this;l>0;)l&1&&(d+=a),(l>>=1)&&(a+=a);return d}),String.prototype.includes||o(String.prototype,"includes",function(l,d){return this.indexOf(l,d)!=-1}),Object.assign||(Object.assign=function(l){if(l==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(l),a=1;a<arguments.length;a++){var c=arguments[a];c!=null&&Object.keys(c).forEach(function(s){d[s]=c[s]})}return d}),Object.values||(Object.values=function(l){return Object.keys(l).map(function(d){return l[d]})}),Array.prototype.find||o(Array.prototype,"find",function(l){for(var d=this.length,a=arguments[1],c=0;c<d;c++){var s=this[c];if(l.call(a,s,c,this))return s}}),Array.prototype.findIndex||o(Array.prototype,"findIndex",function(l){for(var d=this.length,a=arguments[1],c=0;c<d;c++){var s=this[c];if(l.call(a,s,c,this))return c}}),Array.prototype.includes||o(Array.prototype,"includes",function(l,d){return this.indexOf(l,d)!=-1}),Array.prototype.fill||o(Array.prototype,"fill",function(l){for(var d=this,a=d.length>>>0,c=arguments[1],s=c>>0,u=s<0?Math.max(a+s,0):Math.min(s,a),f=arguments[2],h=f===void 0?a:f>>0,p=h<0?Math.max(a+h,0):Math.min(h,a);u<p;)d[u]=l,u++;return d}),Array.of||o(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,i){n("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(n,r,i){r.last=function(d){return d[d.length-1]},r.stringReverse=function(d){return d.split("").reverse().join("")},r.stringRepeat=function(d,a){for(var c="";a>0;)a&1&&(c+=d),(a>>=1)&&(d+=d);return c};var o=/^\s\s*/,l=/\s\s*$/;r.stringTrimLeft=function(d){return d.replace(o,"")},r.stringTrimRight=function(d){return d.replace(l,"")},r.copyObject=function(d){var a={};for(var c in d)a[c]=d[c];return a},r.copyArray=function(d){for(var a=[],c=0,s=d.length;c<s;c++)d[c]&&typeof d[c]=="object"?a[c]=this.copyObject(d[c]):a[c]=d[c];return a},r.deepCopy=function d(a){if(typeof a!="object"||!a)return a;var c;if(Array.isArray(a)){c=[];for(var s=0;s<a.length;s++)c[s]=d(a[s]);return c}if(Object.prototype.toString.call(a)!=="[object Object]")return a;c={};for(var s in a)c[s]=d(a[s]);return c},r.arrayToMap=function(d){for(var a={},c=0;c<d.length;c++)a[d[c]]=1;return a},r.createMap=function(d){var a=Object.create(null);for(var c in d)a[c]=d[c];return a},r.arrayRemove=function(d,a){for(var c=0;c<=d.length;c++)a===d[c]&&d.splice(c,1)},r.escapeRegExp=function(d){return d.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(d){return(""+d).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(d,a){var c=[];return d.replace(a,function(s){c.push({offset:arguments[arguments.length-2],length:s.length})}),c},r.deferredCall=function(d){var a=null,c=function(){a=null,d()},s=function(u){return s.cancel(),a=setTimeout(c,u||0),s};return s.schedule=s,s.call=function(){return this.cancel(),d(),s},s.cancel=function(){return clearTimeout(a),a=null,s},s.isPending=function(){return a},s},r.delayedCall=function(d,a){var c=null,s=function(){c=null,d()},u=function(f){c==null&&(c=setTimeout(s,f||a))};return u.delay=function(f){c&&clearTimeout(c),c=setTimeout(s,f||a)},u.schedule=u,u.call=function(){this.cancel(),d()},u.cancel=function(){c&&clearTimeout(c),c=null},u.isPending=function(){return c},u}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,i){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var o=typeof navigator=="object"?navigator:{},l=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),d=o.userAgent||"",a=o.appName||"";r.isWin=l=="win",r.isMac=l=="mac",r.isLinux=l=="linux",r.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=d.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,r.isAIR=d.indexOf("AdobeAIR")>=0,r.isAndroid=d.indexOf("Android")>=0,r.isChromeOS=d.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(d)&&!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,i){var o=n("./useragent"),l="http://www.w3.org/1999/xhtml";r.buildDom=function f(h,p,g){if(typeof h=="string"&&h){var w=document.createTextNode(h);return p&&p.appendChild(w),w}if(!Array.isArray(h))return h&&h.appendChild&&p&&p.appendChild(h),h;if(typeof h[0]!="string"||!h[0]){for(var x=[],S=0;S<h.length;S++){var T=f(h[S],p,g);T&&x.push(T)}return x}var v=document.createElement(h[0]),b=h[1],y=1;b&&typeof b=="object"&&!Array.isArray(b)&&(y=2);for(var S=y;S<h.length;S++)f(h[S],v,g);return y==2&&Object.keys(b).forEach(function(m){var E=b[m];m==="class"?v.className=Array.isArray(E)?E.join(" "):E:typeof E=="function"||m=="value"||m[0]=="$"?v[m]=E:m==="ref"?g&&(g[E]=v):m==="style"?typeof E=="string"&&(v.style.cssText=E):E!=null&&v.setAttribute(m,E)}),p&&p.appendChild(v),v},r.getDocumentHead=function(f){return f||(f=document),f.head||f.getElementsByTagName("head")[0]||f.documentElement},r.createElement=function(f,h){return document.createElementNS?document.createElementNS(h||l,f):document.createElement(f)},r.removeChildren=function(f){f.innerHTML=""},r.createTextNode=function(f,h){var p=h?h.ownerDocument:document;return p.createTextNode(f)},r.createFragment=function(f){var h=f?f.ownerDocument:document;return h.createDocumentFragment()},r.hasCssClass=function(f,h){var p=(f.className+"").split(/\s+/g);return p.indexOf(h)!==-1},r.addCssClass=function(f,h){r.hasCssClass(f,h)||(f.className+=" "+h)},r.removeCssClass=function(f,h){for(var p=f.className.split(/\s+/g);;){var g=p.indexOf(h);if(g==-1)break;p.splice(g,1)}f.className=p.join(" ")},r.toggleCssClass=function(f,h){for(var p=f.className.split(/\s+/g),g=!0;;){var w=p.indexOf(h);if(w==-1)break;g=!1,p.splice(w,1)}return g&&p.push(h),f.className=p.join(" "),g},r.setCssClass=function(f,h,p){p?r.addCssClass(f,h):r.removeCssClass(f,h)},r.hasCssString=function(f,h){var p=0,g;if(h=h||document,g=h.querySelectorAll("style")){for(;p<g.length;)if(g[p++].id===f)return!0}},r.removeElementById=function(f,h){h=h||document,h.getElementById(f)&&h.getElementById(f).remove()};var d,a=[];r.useStrictCSP=function(f){d=f,f==!1?c():a||(a=[])};function c(){var f=a;a=null,f&&f.forEach(function(h){s(h[0],h[1])})}function s(f,h,p){if(!(typeof document>"u")){if(a){if(p)c();else if(p===!1)return a.push([f,h])}if(!d){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var w=g.ownerDocument||g;if(h&&r.hasCssString(h,g))return null;h&&(f+=`
/*# sourceURL=ace/css/`+h+" */");var x=r.createElement("style");x.appendChild(w.createTextNode(f)),h&&(x.id=h),g==w&&(g=r.getDocumentHead(w)),g.insertBefore(x,g.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(f,h){r.buildDom(["link",{rel:"stylesheet",href:f}],r.getDocumentHead(h))},r.scrollbarWidth=function(f){var h=r.createElement("ace_inner");h.style.width="100%",h.style.minWidth="0px",h.style.height="200px",h.style.display="block";var p=r.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(h);var w=f&&f.documentElement||document&&document.documentElement;if(!w)return 0;w.appendChild(p);var x=h.offsetWidth;g.overflow="scroll";var S=h.offsetWidth;return x===S&&(S=p.clientWidth),w.removeChild(p),x-S},r.computedStyle=function(f,h){return window.getComputedStyle(f,"")||{}},r.setStyle=function(f,h,p){f[h]!==p&&(f[h]=p)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=o.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,o.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var u=document.createElement("div");r.HI_DPI&&u.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!o.isEdge&&typeof u.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),u=null}r.HAS_CSS_TRANSFORMS?r.translate=function(f,h,p){f.style.transform="translate("+Math.round(h)+"px, "+Math.round(p)+"px)"}:r.translate=function(f,h,p){f.style.top=Math.round(p)+"px",f.style.left=Math.round(h)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,i){/*
* 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 o=n("./dom");r.get=function(l,d){var a=new XMLHttpRequest;a.open("GET",l,!0),a.onreadystatechange=function(){a.readyState===4&&d(a.responseText)},a.send(null)},r.loadScript=function(l,d){var a=o.getDocumentHead(),c=document.createElement("script");c.src=l,a.appendChild(c),c.onload=c.onreadystatechange=function(s,u){(u||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,u||d())}},r.qualifyURL=function(l){var d=document.createElement("a");return d.href=l,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,i){r.inherits=function(o,l){o.super_=l,o.prototype=Object.create(l.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(o,l){for(var d in l)o[d]=l[d];return o},r.implement=function(o,l){r.mixin(o,l)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,i){var o={},l=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[a]||[],u=this._defaultHandlers[a];if(!(!s.length&&!u)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=l),c.preventDefault||(c.preventDefault=d),s=s.slice();for(var f=0;f<s.length&&(s[f](c,this),!c.propagationStopped);f++);if(u&&!c.defaultPrevented)return u(c,this)}},o._signal=function(a,c){var s=(this._eventRegistry||{})[a];if(s){s=s.slice();for(var u=0;u<s.length;u++)s[u](c,this)}},o.once=function(a,c){var s=this;if(this.on(a,function u(){s.off(a,u),c.apply(null,arguments)}),!c)return new Promise(function(u){c=u})},o.setDefaultHandler=function(a,c){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[a]){var u=s[a],f=s._disabled_[a];f||(s._disabled_[a]=f=[]),f.push(u);var h=f.indexOf(c);h!=-1&&f.splice(h,1)}s[a]=c},o.removeDefaultHandler=function(a,c){var s=this._defaultHandlers;if(s){var u=s._disabled_[a];if(s[a]==c)u&&this.setDefaultHandler(a,u.pop());else if(u){var f=u.indexOf(c);f!=-1&&u.splice(f,1)}}},o.on=o.addEventListener=function(a,c,s){this._eventRegistry=this._eventRegistry||{};var u=this._eventRegistry[a];return u||(u=this._eventRegistry[a]=[]),u.indexOf(c)==-1&&u[s?"unshift":"push"](c),c},o.off=o.removeListener=o.removeEventListener=function(a,c){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[a];if(s){var u=s.indexOf(c);u!==-1&&s.splice(u,1)}},o.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},r.EventEmitter=o}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){"no use strict";var o=n("./oop"),l=n("./event_emitter").EventEmitter,d={setOptions:function(f){Object.keys(f).forEach(function(h){this.setOption(h,f[h])},this)},getOptions:function(f){var h={};if(f)Array.isArray(f)||(h=f,f=Object.keys(h));else{var p=this.$options;f=Object.keys(p).filter(function(g){return!p[g].hidden})}return f.forEach(function(g){h[g]=this.getOption(g)},this),h},setOption:function(f,h){if(this["$"+f]!==h){var p=this.$options[f];if(!p)return a('misspelled option "'+f+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(f,h);p.handlesSet||(this["$"+f]=h),p&&p.set&&p.set.call(this,h)}},getOption:function(f){var h=this.$options[f];return h?h.forwardTo?this[h.forwardTo]&&this[h.forwardTo].getOption(f):h&&h.get?h.get.call(this):this["$"+f]:a('misspelled option "'+f+'"')}};function a(f){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}function c(f,h){var p=new Error(f);p.data=h,typeof console=="object"&&console.error&&console.error(p),setTimeout(function(){throw p})}var s,u=function(){function f(){this.$defaultOptions={}}return f.prototype.defineOptions=function(h,p,g){return h.$options||(this.$defaultOptions[p]=h.$options={}),Object.keys(g).forEach(function(w){var x=g[w];typeof x=="string"&&(x={forwardTo:x}),x.name||(x.name=w),h.$options[x.name]=x,"initialValue"in x&&(h["$"+x.name]=x.initialValue)}),o.implement(h,d),this},f.prototype.resetOptions=function(h){Object.keys(h.$options).forEach(function(p){var g=h.$options[p];"value"in g&&h.setOption(p,g.value)})},f.prototype.setDefaultValue=function(h,p,g){if(!h){for(h in this.$defaultOptions)if(this.$defaultOptions[h][p])break;if(!this.$defaultOptions[h][p])return!1}var w=this.$defaultOptions[h]||(this.$defaultOptions[h]={});w[p]&&(w.forwardTo?this.setDefaultValue(w.forwardTo,p,g):w[p].value=g)},f.prototype.setDefaultValues=function(h,p){Object.keys(p).forEach(function(g){this.setDefaultValue(h,g,p[g])},this)},f.prototype.setMessages=function(h){s=h},f.prototype.nls=function(h,p){var g=s&&s[h]||h;return p&&(g=g.replace(/\$(\$|[\d]+)/g,function(w,x){return x=="$"?"$":p[x]})),g},f}();u.prototype.warn=a,u.prototype.reportError=c,o.implement(u.prototype,l),r.AppConfig=u}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(n,r,i){i.exports=`.ace-tm .ace_gutter {
background: #f0f0f0;
color: #333;
}
.ace-tm .ace_print-margin {
width: 1px;
background: #e8e8e8;
}
.ace-tm .ace_fold {
background-color: #6B72E6;
}
.ace-tm {
background-color: #FFFFFF;
color: black;
}
.ace-tm .ace_cursor {
color: black;
}
.ace-tm .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-tm .ace_storage,
.ace-tm .ace_keyword {
color: blue;
}
.ace-tm .ace_constant {
color: rgb(197, 6, 11);
}
.ace-tm .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-tm .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-tm .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-tm .ace_invalid {
background-color: rgba(255, 0, 0, 0.1);
color: red;
}
.ace-tm .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-tm .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-tm .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-tm .ace_string {
color: rgb(3, 106, 7);
}
.ace-tm .ace_comment {
color: rgb(76, 136, 107);
}
.ace-tm .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-tm .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-tm .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-tm .ace_variable {
color: rgb(49, 132, 149);
}
.ace-tm .ace_xml-pe {
color: rgb(104, 104, 91);
}
.ace-tm .ace_entity.ace_name.ace_function {
color: #0000A2;
}
.ace-tm .ace_heading {
color: rgb(12, 7, 255);
}
.ace-tm .ace_list {
color:rgb(185, 6, 144);
}
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-tm .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-tm .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-tm .ace_marker-layer .ace_active-line {
background: rgba(0, 0, 0, 0.07);
}
.ace-tm .ace_gutter-active-line {
background-color : #dcdcdc;
}
.ace-tm .ace_marker-layer .ace_selected-word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-tm .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}
.ace-tm .ace_indent-guide-active {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(n,r,i){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate.css"),r.$id="ace/theme/textmate";var o=n("../lib/dom");o.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,i){"no use strict";var o=n("./lib/lang"),l=n("./lib/net"),d=n("./lib/dom"),a=n("./lib/app_config").AppConfig;i.exports=r=new a;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(f){if(!c.hasOwnProperty(f))throw new Error("Unknown config key: "+f);return c[f]},r.set=function(f,h){if(c.hasOwnProperty(f))c[f]=h;else if(this.setDefaultValue("",f,h)==!1)throw new Error("Unknown config key: "+f);f=="useStrictCSP"&&d.useStrictCSP(h)},r.all=function(){return o.copyObject(c)},r.$modes={},r.moduleUrl=function(f,h){if(c.$moduleUrls[f])return c.$moduleUrls[f];var p=f.split("/");h=h||p[p.length-2]||"";var g=h=="snippets"?"/":"-",w=p[p.length-1];if(h=="worker"&&g=="-"){var x=new RegExp("^"+h+"[\\-_]|[\\-_]"+h+"$","g");w=w.replace(x,"")}(!w||w==h)&&p.length>1&&(w=p[p.length-2]);var S=c[h+"Path"];return S==null?S=c.basePath:g=="/"&&(h=g=""),S&&S.slice(-1)!="/"&&(S+="/"),S+h+g+w+this.get("suffix")},r.setModuleUrl=function(f,h){return c.$moduleUrls[f]=h};var s=function(f,h){return f==="ace/theme/textmate"||f==="./theme/textmate"?h(null,n("./theme/textmate")):console.error("loader is not configured")};r.setLoader=function(f){s=f},r.dynamicModules=Object.create(null),r.$loading={},r.loadModule=function(f,h){var p,g;Array.isArray(f)&&(g=f[0],f=f[1]);var w=function(x){if(x&&!r.$loading[f])return h&&h(x);if(r.$loading[f]||(r.$loading[f]=[]),r.$loading[f].push(h),!(r.$loading[f].length>1)){var S=function(){s(f,function(T,v){r._emit("load.module",{name:f,module:v});var b=r.$loading[f];r.$loading[f]=null,b.forEach(function(y){y&&y(v)})})};if(!r.get("packaged"))return S();l.loadScript(r.moduleUrl(f,g),S),u()}};if(r.dynamicModules[f])r.dynamicModules[f]().then(function(x){x.default?w(x.default):w(x)});else{try{p=n(f)}catch{}w(p)}},r.setModuleLoader=function(f,h){r.dynamicModules[f]=h};var u=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"),u=function(){})};r.version="1.22.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,i){n("./lib/fixoldbrowsers");var o=n("./config");o.setLoader(function(c,s){n([c],function(u){s(null,u)})});var l=function(){return this||typeof window<"u"&&window}();i.exports=function(c){o.init=d,c.require=n},d(!0);function d(c){if(!(!l||!l.document)){o.set("packaged",c||n.packaged||i.packaged||l.define&&(void 0).packaged);var s={},u="",f=document.currentScript||document._currentScript,h=f&&f.ownerDocument||document;f&&f.src&&(u=f.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=h.getElementsByTagName("script"),g=0;g<p.length;g++){var w=p[g],x=w.src||w.getAttribute("src");if(x){for(var S=w.attributes,T=0,v=S.length;T<v;T++){var b=S[T];b.name.indexOf("data-ace-")===0&&(s[a(b.name.replace(/^data-ace-/,""))]=b.value)}var y=x.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);y&&(u=y[1])}}u&&(s.base=s.base||u,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var m in s)typeof s[m]<"u"&&o.set(m,s[m])}}function a(c){return c.replace(/-(.)/g,function(s,u){return u.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,i){var o=function(d,a){return d.row-a.row||d.column-a.column},l=function(){function d(a,c,s,u){this.start={row:a,column:c},this.end={row:s,column:u}}return d.prototype.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},d.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},d.prototype.contains=function(a,c){return this.compare(a,c)==0},d.prototype.compareRange=function(a){var c,s=a.end,u=a.start;return c=this.compare(s.row,s.column),c==1?(c=this.compare(u.row,u.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(u.row,u.column),c==-1?-1:c==1?42:0)},d.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},d.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},d.prototype.intersects=function(a){var c=this.compareRange(a);return c==-1||c==0||c==1},d.prototype.isEnd=function(a,c){return this.end.row==a&&this.end.column==c},d.prototype.isStart=function(a,c){return this.start.row==a&&this.start.column==c},d.prototype.setStart=function(a,c){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=c)},d.prototype.setEnd=function(a,c){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=c)},d.prototype.inside=function(a,c){return this.compare(a,c)==0?!(this.isEnd(a,c)||this.isStart(a,c)):!1},d.prototype.insideStart=function(a,c){return this.compare(a,c)==0?!this.isEnd(a,c):!1},d.prototype.insideEnd=function(a,c){return this.compare(a,c)==0?!this.isStart(a,c):!1},d.prototype.compare=function(a,c){return!this.isMultiLine()&&a===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:a<this.start.row?-1:a>this.end.row?1:this.start.row===a?c>=this.start.column?0:-1:this.end.row===a?c<=this.end.column?0:1:0},d.prototype.compareStart=function(a,c){return this.start.row==a&&this.start.column==c?-1:this.compare(a,c)},d.prototype.compareEnd=function(a,c){return this.end.row==a&&this.end.column==c?1:this.compare(a,c)},d.prototype.compareInside=function(a,c){return this.end.row==a&&this.end.column==c?1:this.start.row==a&&this.start.column==c?-1:this.compare(a,c)},d.prototype.clipRows=function(a,c){if(this.end.row>c)var s={row:c+1,column:0};else if(this.end.row<a)var s={row:a,column:0};if(this.start.row>c)var u={row:c+1,column:0};else if(this.start.row<a)var u={row:a,column:0};return d.fromPoints(u||this.start,s||this.end)},d.prototype.extend=function(a,c){var s=this.compare(a,c);if(s==0)return this;if(s==-1)var u={row:a,column:c};else var f={row:a,column:c};return d.fromPoints(u||this.start,f||this.end)},d.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},d.prototype.isMultiLine=function(){return this.start.row!==this.end.row},d.prototype.clone=function(){return d.fromPoints(this.start,this.end)},d.prototype.collapseRows=function(){return this.end.column==0?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},d.prototype.toScreenRange=function(a){var c=a.documentToScreenPosition(this.start),s=a.documentToScreenPosition(this.end);return new d(c.row,c.column,s.row,s.column)},d.prototype.moveBy=function(a,c){this.start.row+=a,this.start.column+=c,this.end.row+=a,this.end.column+=c},d}();l.fromPoints=function(d,a){return new l(d.row,d.column,a.row,a.column)},l.comparePoints=o,l.comparePoints=function(d,a){return d.row-a.row||d.column-a.column},r.Range=l}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,i){/*! @license
==========================================================================
SproutCore -- JavaScript Application Framework
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
For more information about SproutCore, visit http://www.sproutcore.com
==========================================================================
@license */var o=n("./oop"),l=function(){var d={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};d.PRINTABLE_KEYS[173]="-";var a,c;for(c in d.FUNCTION_KEYS)a=d.FUNCTION_KEYS[c].toLowerCase(),d[a]=parseInt(c,10);for(c in d.PRINTABLE_KEYS)a=d.PRINTABLE_KEYS[c].toLowerCase(),d[a]=parseInt(c,10);return o.mixin(d,d.MODIFIER_KEYS),o.mixin(d,d.PRINTABLE_KEYS),o.mixin(d,d.FUNCTION_KEYS),d.enter=d.return,d.escape=d.esc,d.del=d.delete,function(){for(var s=["cmd","ctrl","alt","shift"],u=Math.pow(2,s.length);u--;)d.KEY_MODS[u]=s.filter(function(f){return u&d.KEY_MODS[f]}).join("-")+"-"}(),d.KEY_MODS[0]="",d.KEY_MODS[-1]="input-",d}();o.mixin(r,l),r.keyCodeToString=function(d){var a=l[d];return typeof a!="string"&&(a=String.fromCharCode(d)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,i){var o=n("./keys"),l=n("./useragent"),d=null,a=0,c;function s(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){c={passive:!1}}})}catch{}}function u(){return c==null&&s(),c}function f(T,v,b){this.elem=T,this.type=v,this.callback=b}f.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=r.addListener=function(T,v,b,y){T.addEventListener(v,b,u()),y&&y.$toDestroy.push(new f(T,v,b))},p=r.removeListener=function(T,v,b){T.removeEventListener(v,b,u())};r.stopEvent=function(T){return r.stopPropagation(T),r.preventDefault(T),!1},r.stopPropagation=function(T){T.stopPropagation&&T.stopPropagation()},r.preventDefault=function(T){T.preventDefault&&T.preventDefault()},r.getButton=function(T){return T.type=="dblclick"?0:T.type=="contextmenu"||l.isMac&&T.ctrlKey&&!T.altKey&&!T.shiftKey?2:T.button},r.capture=function(T,v,b){var y=T&&T.ownerDocument||document;function m(E){v&&v(E),b&&b(E),p(y,"mousemove",v),p(y,"mouseup",m),p(y,"dragstart",m)}return h(y,"mousemove",v),h(y,"mouseup",m),h(y,"dragstart",m),m},r.addMouseWheelListener=function(T,v,b){h(T,"wheel",function(y){var m=.15,E=y.deltaX||0,M=y.deltaY||0;switch(y.deltaMode){case y.DOM_DELTA_PIXEL:y.wheelX=E*m,y.wheelY=M*m;break;case y.DOM_DELTA_LINE:var C=15;y.wheelX=E*C,y.wheelY=M*C;break;case y.DOM_DELTA_PAGE:var k=150;y.wheelX=E*k,y.wheelY=M*k;break}v(y)},b)},r.addMultiMouseDownListener=function(T,v,b,y,m){var E=0,M,C,k,O={2:"dblclick",3:"tripleclick",4:"quadclick"};function R(A){if(r.getButton(A)!==0?E=0:A.detail>1?(E++,E>4&&(E=1)):E=1,l.isIE){var I=Math.abs(A.clientX-M)>5||Math.abs(A.clientY-C)>5;(!k||I)&&(E=1),k&&clearTimeout(k),k=setTimeout(function(){k=null},v[E-1]||600),E==1&&(M=A.clientX,C=A.clientY)}if(A._clicks=E,b[y]("mousedown",A),E>4)E=0;else if(E>1)return b[y](O[E],A)}Array.isArray(T)||(T=[T]),T.forEach(function(A){h(A,"mousedown",R,m)})};var g=function(T){return 0|(T.ctrlKey?1:0)|(T.altKey?2:0)|(T.shiftKey?4:0)|(T.metaKey?8:0)};r.getModifierString=function(T){return o.KEY_MODS[g(T)]};function w(T,v,b){var y=g(v);if(!l.isMac&&d){if(v.getModifierState&&(v.getModifierState("OS")||v.getModifierState("Win"))&&(y|=8),d.altGr)if((3&y)!=3)d.altGr=0;else return;if(b===18||b===17){var m="location"in v?v.location:v.keyLocation;if(b===17&&m===1)d[b]==1&&(a=v.timeStamp);else if(b===18&&y===3&&m===2){var E=v.timeStamp-a;E<50&&(d.altGr=!0)}}}if(b in o.MODIFIER_KEYS&&(b=-1),!y&&b===13){var m="location"in v?v.location:v.keyLocation;if(m===3&&(T(v,y,-b),v.defaultPrevented))return}if(l.isChromeOS&&y&8){if(T(v,y,b),v.defaultPrevented)return;y&=-9}return!y&&!(b in o.FUNCTION_KEYS)&&!(b in o.PRINTABLE_KEYS)?!1:T(v,y,b)}r.addCommandKeyListener=function(T,v,b){if(l.isOldGecko||l.isOpera&&!("KeyboardEvent"in window)){var y=null;h(T,"keydown",function(E){y=E.keyCode},b),h(T,"keypress",function(E){return w(v,E,y)},b)}else{var m=null;h(T,"keydown",function(E){d[E.keyCode]=(d[E.keyCode]||0)+1;var M=w(v,E,E.keyCode);return m=E.defaultPrevented,M},b),h(T,"keypress",function(E){m&&(E.ctrlKey||E.altKey||E.shiftKey||E.metaKey)&&(r.stopEvent(E),m=null)},b),h(T,"keyup",function(E){d[E.keyCode]=null},b),d||(x(),h(window,"focus",x))}};function x(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!l.isOldIE){var S=1;r.nextTick=function(T,v){v=v||window;var b="zero-timeout-message-"+S++,y=function(m){m.data==b&&(r.stopPropagation(m),p(v,"message",y),T())};h(v,"message",y),v.postMessage(b,"*")}}r.$idleBlocked=!1,r.onIdle=function(T,v){return setTimeout(function b(){r.$idleBlocked?setTimeout(b,100):T()},v)},r.$idleBlockId=null,r.blockIdle=function(T){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},T||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(T){setTimeout(T,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,i){var o;i.exports={lineMode:!1,pasteCancelled:function(){return o&&o>Date.now()-50?!0:o=!1},cancel:function(){o=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,i){var o=n("../lib/event"),l=n("../config").nls,d=n("../lib/useragent"),a=n("../lib/dom"),c=n("../lib/lang"),s=n("../clipboard"),u=d.isChrome<18,f=d.isIE,h=d.isChrome>63,p=400,g=n("../lib/keys"),w=g.KEY_MODS,x=d.isIOS,S=x?/\s/:/\n/,T=d.isMobile,v=function(b,y){var m=a.createElement("textarea");m.className="ace_text-input",m.setAttribute("wrap","off"),m.setAttribute("autocorrect","off"),m.setAttribute("autocapitalize","off"),m.setAttribute("spellcheck",!1),m.style.opacity="0",b.insertBefore(m,b.firstChild);var E=!1,M=!1,C=!1,k=!1,O="";T||(m.style.fontSize="1px");var R=!1,A=!1,I="",P=0,z=0,B=0;try{var V=document.activeElement===m}catch{}this.setAriaOptions=function(me){me.activeDescendant?(m.setAttribute("aria-haspopup","true"),m.setAttribute("aria-autocomplete",me.inline?"both":"list"),m.setAttribute("aria-activedescendant",me.activeDescendant)):(m.setAttribute("aria-haspopup","false"),m.setAttribute("aria-autocomplete","both"),m.removeAttribute("aria-activedescendant")),me.role&&m.setAttribute("role",me.role)},this.setAriaLabel=function(){if(y.session&&y.renderer.enableKeyboardAccessibility){var me=y.session.selection.cursor.row;m.setAttribute("aria-roledescription",l("editor")),m.setAttribute("aria-label",l("Cursor at row $0",[me+1]))}else m.removeAttribute("aria-roledescription"),m.removeAttribute("aria-label")},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),o.addListener(m,"blur",function(me){A||(y.onBlur(me),V=!1,T&&!x&&document.removeEventListener("selectionchange",Y))},y),o.addListener(m,"focus",function(me){if(!A){if(V=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}y.onFocus(me),d.isEdge?setTimeout(K):K(),T&&!x&&document.addEventListener("selectionchange",Y)}},y),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),O||h||this.$focusScroll=="browser")return m.focus({preventScroll:!0});var me=m.style.top;m.style.position="fixed",m.style.top="0px";try{var Ae=m.getBoundingClientRect().top!=0}catch{return}var we=[];if(Ae)for(var He=m.parentElement;He&&He.nodeType==1;)we.push(He),He.setAttribute("ace_nocontext",!0),!He.parentElement&&He.getRootNode?He=He.getRootNode().host:He=He.parentElement;m.focus({preventScroll:!0}),Ae&&we.forEach(function(ct){ct.removeAttribute("ace_nocontext")}),setTimeout(function(){m.style.position="",m.style.top=="0px"&&(m.style.top=me)},0)},this.blur=function(){m.blur()},this.isFocused=function(){return V},y.on("beforeEndOperation",function(){var me=y.curOp,Ae=me&&me.command&&me.command.name;if(Ae!="insertstring"){var we=Ae&&(me.docChanged||me.selectionChanged);C&&we&&(I=m.value="",it()),K()}});var K=x?function(me){if(!(!V||E&&!me||k)){me||(me="");var Ae=`
ab`+me+`cde fg
`;Ae!=m.value&&(m.value=I=Ae);var we=4,He=4+(me.length||(y.selection.isEmpty()?0:1));(P!=we||z!=He)&&m.setSelectionRange(we,He),P=we,z=He}}:function(){if(!(C||k)&&!(!V&&!te)){C=!0;var me=0,Ae=0,we="";if(y.session){var He=y.selection,ct=He.getRange(),xe=He.cursor.row;if(me=ct.start.column,Ae=ct.end.column,we=y.session.getLine(xe),ct.start.row!=xe){var Fe=y.session.getLine(xe-1);me=ct.start.row<xe-1?0:me,Ae+=Fe.length+1,we=Fe+`
`+we}else if(ct.end.row!=xe){var Ne=y.session.getLine(xe+1);Ae=ct.end.row>xe+1?Ne.length:Ae,Ae+=we.length+1,we=we+`
`+Ne}else T&&xe>0&&(we=`
`+we,Ae+=1,me+=1);we.length>p&&(me<p&&Ae<p?we=we.slice(0,p):(we=`
`,me==Ae?me=Ae=0:(me=0,Ae=1)))}var Ye=we+`
`;if(Ye!=I&&(m.value=I=Ye,P=z=Ye.length),te&&(P=m.selectionStart,z=m.selectionEnd),z!=Ae||P!=me||m.selectionEnd!=z)try{m.setSelectionRange(me,Ae),P=me,z=Ae}catch{}C=!1}};this.resetSelection=K,V&&y.onFocus();var q=function(me){return me.selectionStart===0&&me.selectionEnd>=I.length&&me.value===I&&I&&me.selectionEnd!==z},re=function(me){C||(E?E=!1:q(m)?(y.selectAll(),K()):T&&m.selectionStart!=P&&K())};function Y(me){if((!m||!m.parentNode)&&document.removeEventListener("selectionchange",Y),!C&&m.selectionStart===m.selectionEnd){var Ae=m.selectionStart-P,we=z-P;Ae>0?Ae=Math.max(Ae-we,1):Ae===0&&we&&(Ae=-1);for(var He=Math.abs(Ae),ct=Ae>0?g.right:g.left,xe=0;xe<He;xe++)y.onCommandKey({},0,ct)}}var Z=null;this.setInputHandler=function(me){Z=me},this.getInputHandler=function(){return Z};var te=!1,ie=function(me,Ae){if(te&&(te=!1),M)return K(),me&&y.onPaste(me),M=!1,"";for(var we=m.selectionStart,He=m.selectionEnd,ct=P,xe=I.length-z,Fe=me,Ne=me.length-we,Ye=me.length-He,et=0;ct>0&&I[et]==me[et];)et++,ct--;for(Fe=Fe.slice(et),et=1;xe>0&&I.length-et>P-1&&I[I.length-et]==me[me.length-et];)et++,xe--;Ne-=et-1,Ye-=et-1;var kt=Fe.length-et+1;if(kt<0&&(ct=-kt,kt=0),Fe=Fe.slice(0,kt),!Ae&&!Fe&&!Ne&&!ct&&!xe&&!Ye)return"";k=!0;var on=!1;return d.isAndroid&&Fe==". "&&(Fe=" ",on=!0),Fe&&!ct&&!xe&&!Ne&&!Ye||R?y.onTextInput(Fe):y.onTextInput(Fe,{extendLeft:ct,extendRight:xe,restoreStart:Ne,restoreEnd:Ye}),k=!1,I=me,P=we,z=He,B=Ye,on?`
`:Fe},ce=function(me){if(C)return Te();if(me&&me.inputType){if(me.inputType=="historyUndo")return y.execCommand("undo");if(me.inputType=="historyRedo")return y.execCommand("redo")}var Ae=m.value,we=ie(Ae,!0);(Ae.length>p+100||S.test(we)||T&&P<1&&P==z)&&K()},he=function(me,Ae,we){var He=me.clipboardData||window.clipboardData;if(!(!He||u)){var ct=f||we?"Text":"text/plain";try{return Ae?He.setData(ct,Ae)!==!1:He.getData(ct)}catch(xe){if(!we)return he(xe,Ae,!0)}}},ve=function(me,Ae){var we=y.getCopyText();if(!we)return o.preventDefault(me);he(me,we)?(x&&(K(we),E=we,setTimeout(function(){E=!1},10)),Ae?y.onCut():y.onCopy(),o.preventDefault(me)):(E=!0,m.value=we,m.select(),setTimeout(function(){E=!1,K(),Ae?y.onCut():y.onCopy()}))},Ce=function(me){ve(me,!0)},_e=function(me){ve(me,!1)},Re=function(me){var Ae=he(me);s.pasteCancelled()||(typeof Ae=="string"?(Ae&&y.onPaste(Ae,me),d.isIE&&setTimeout(K),o.preventDefault(me)):(m.value="",M=!0))};o.addCommandKeyListener(m,y.onCommandKey.bind(y),y),o.addListener(m,"select",re,y),o.addListener(m,"input",ce,y),o.addListener(m,"cut",Ce,y),o.addListener(m,"copy",_e,y),o.addListener(m,"paste",Re,y),(!("oncut"in m)||!("oncopy"in m)||!("onpaste"in m))&&o.addListener(b,"keydown",function(me){if(!(d.isMac&&!me.metaKey||!me.ctrlKey))switch(me.keyCode){case 67:_e(me);break;case 86:Re(me);break;case 88:Ce(me);break}},y);var ot=function(me){if(!(C||!y.onCompositionStart||y.$readOnly)&&(C={},!R)){me.data&&(C.useTextareaForIME=!1),setTimeout(Te,0),y._signal("compositionStart"),y.on("mousedown",vt);var Ae=y.getSelectionRange();Ae.end.row=Ae.start.row,Ae.end.column=Ae.start.column,C.markerRange=Ae,C.selectionStart=P,y.onCompositionStart(C),C.useTextareaForIME?(I=m.value="",P=0,z=0):(m.msGetInputContext&&(C.context=m.msGetInputContext()),m.getInputContext&&(C.context=m.getInputContext()))}},Te=function(){if(!(!C||!y.onCompositionUpdate||y.$readOnly)){if(R)return vt();if(C.useTextareaForIME)y.onCompositionUpdate(m.value);else{var me=m.value;ie(me),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+z-C.selectionStart+B)}}},it=function(me){!y.onCompositionEnd||y.$readOnly||(C=!1,y.onCompositionEnd(),y.off("mousedown",vt),me&&ce())};function vt(){A=!0,m.blur(),m.focus(),A=!1}var Qt=c.delayedCall(Te,50).schedule.bind(null,null);function Ut(me){me.keyCode==27&&m.value.length<m.selectionStart&&(C||(I=m.value),P=z=-1,K()),Qt()}o.addListener(m,"compositionstart",ot,y),o.addListener(m,"compositionupdate",Te,y),o.addListener(m,"keyup",Ut,y),o.addListener(m,"keydown",Qt,y),o.addListener(m,"compositionend",it,y),this.getElement=function(){return m},this.setCommandMode=function(me){R=me,m.readOnly=!1},this.setReadOnly=function(me){R||(m.readOnly=me)},this.setCopyWithEmptySelection=function(me){},this.onContextMenu=function(me){te=!0,K(),y._emit("nativecontextmenu",{target:y,domEvent:me}),this.moveToMouse(me,!0)},this.moveToMouse=function(me,Ae){O||(O=m.style.cssText),m.style.cssText=(Ae?"z-index:100000;":"")+(d.isIE?"opacity:0.1;":"")+"text-indent: -"+(P+z)*y.renderer.characterWidth*.5+"px;";var we=y.container.getBoundingClientRect(),He=a.computedStyle(y.container),ct=we.top+(parseInt(He.borderTopWidth)||0),xe=we.left+(parseInt(we.borderLeftWidth)||0),Fe=we.bottom-ct-m.clientHeight-2,Ne=function(Ye){a.translate(m,Ye.clientX-xe-2,Math.min(Ye.clientY-ct-2,Fe))};Ne(me),me.type=="mousedown"&&(y.renderer.$isMousePressed=!0,clearTimeout(Tr),d.isWin&&o.capture(y.container,Ne,Ln))},this.onContextMenuClose=Ln;var Tr;function Ln(){clearTimeout(Tr),Tr=setTimeout(function(){O&&(m.style.cssText=O,O=""),y.renderer.$isMousePressed=!1,y.renderer.$keepTextAreaAtCursor&&y.renderer.$moveTextAreaToCursor()},0)}var Qn=function(me){y.textInput.onContextMenu(me),Ln()};o.addListener(m,"mouseup",Qn,y),o.addListener(m,"mousedown",function(me){me.preventDefault(),Ln()},y),o.addListener(y.renderer.scroller,"contextmenu",Qn,y),o.addListener(m,"contextmenu",Qn,y),x&&Ht(b,y,m);function Ht(me,Ae,we){var He=null,ct=!1;we.addEventListener("keydown",function(Fe){He&&clearTimeout(He),ct=!0},!0),we.addEventListener("keyup",function(Fe){He=setTimeout(function(){ct=!1},100)},!0);var xe=function(Fe){if(document.activeElement===we&&!(ct||C||Ae.$mouseHandler.isMousePressed)&&!E){var Ne=we.selectionStart,Ye=we.selectionEnd,et=null,kt=0;if(Ne==0?et=g.up:Ne==1?et=g.home:Ye>z&&I[Ye]==`
`?et=g.end:Ne<P&&I[Ne-1]==" "?(et=g.left,kt=w.option):Ne<P||Ne==P&&z!=P&&Ne==Ye?et=g.left:Ye>z&&I.slice(0,Ye).split(`
`).length>2?et=g.down:Ye>z&&I[Ye-1]==" "?(et=g.right,kt=w.option):(Ye>z||Ye==z&&z!=P&&Ne==Ye)&&(et=g.right),Ne!==Ye&&(kt|=w.shift),et){var on=Ae.onCommandKey({},kt,et);if(!on&&Ae.commands){et=g.keyCodeToString(et);var Rn=Ae.commands.findKeyCommand(kt,et);Rn&&Ae.execCommand(Rn)}P=Ne,z=Ye,K("")}}};document.addEventListener("selectionchange",xe),Ae.on("destroy",function(){document.removeEventListener("selectionchange",xe)})}this.destroy=function(){m.parentElement&&m.parentElement.removeChild(m)}};r.TextInput=v,r.$setUserAgentForTests=function(b,y){T=b,x=y}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,i){var o=n("../lib/useragent"),l=0,d=550,a=function(){function u(f){f.$clickSelection=null;var h=f.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(f)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(f)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(f)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(f)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(f));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){f[g]=this[g]},this),f.selectByLines=this.extendSelectionBy.bind(f,"getLineRange"),f.selectByWords=this.extendSelectionBy.bind(f,"getWordRange")}return u.prototype.onMouseDown=function(f){var h=f.inSelection(),p=f.getDocumentPosition();this.mousedownEvent=f;var g=this.editor,w=f.getButton();if(w!==0){var x=g.getSelectionRange(),S=x.isEmpty();(S||w==1)&&g.selection.moveToPosition(p),w==2&&(g.textInput.onContextMenu(f.domEvent),o.isMozilla||f.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(f);return}return this.captureMouse(f),this.startSelect(p,f.domEvent._clicks>1),f.preventDefault()},u.prototype.startSelect=function(f,h){f=f||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(f):h||p.selection.moveToPosition(f),h||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},u.prototype.select=function(){var f,h=this.editor,p=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)f=this.$clickSelection.end;else if(g==1)f=this.$clickSelection.start;else{var w=s(this.$clickSelection,p);p=w.cursor,f=w.anchor}h.selection.setSelectionAnchor(f.row,f.column)}h.selection.selectToPosition(p),h.renderer.scrollCursorIntoView()},u.prototype.extendSelectionBy=function(f){var h,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),w=p.selection[f](g.row,g.column);if(this.$clickSelection){var x=this.$clickSelection.comparePoint(w.start),S=this.$clickSelection.comparePoint(w.end);if(x==-1&&S<=0)h=this.$clickSelection.end,(w.end.row!=g.row||w.end.column!=g.column)&&(g=w.start);else if(S==1&&x>=0)h=this.$clickSelection.start,(w.start.row!=g.row||w.start.column!=g.column)&&(g=w.end);else if(x==-1&&S==1)g=w.end,h=w.start;else{var T=s(this.$clickSelection,g);g=T.cursor,h=T.anchor}p.selection.setSelectionAnchor(h.row,h.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},u.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},u.prototype.focusWait=function(){var f=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(f>l||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},u.prototype.onDoubleClick=function(f){var h=f.getDocumentPosition(),p=this.editor,g=p.session,w=g.getBracketRange(h);w?(w.isEmpty()&&(w.start.column--,w.end.column++),this.setState("select")):(w=p.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=w,this.select()},u.prototype.onTripleClick=function(f){var h=f.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(h.row,h.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(h.row),this.select()},u.prototype.onQuadClick=function(f){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},u.prototype.onMouseWheel=function(f){if(!f.getAccelKey()){f.getShiftKey()&&f.wheelY&&!f.wheelX&&(f.wheelX=f.wheelY,f.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=f.domEvent.timeStamp,w=g-p.t,x=w?f.wheelX/w:p.vx,S=w?f.wheelY/w:p.vy;w<d&&(x=(x+p.vx)/2,S=(S+p.vy)/2);var T=Math.abs(x/S),v=!1;if(T>=1&&h.renderer.isScrollableBy(f.wheelX*f.speed,0)&&(v=!0),T<=1&&h.renderer.isScrollableBy(0,f.wheelY*f.speed)&&(v=!0),v)p.allowed=g;else if(g-p.allowed<d){var b=Math.abs(x)<=1.5*Math.abs(p.vx)&&Math.abs(S)<=1.5*Math.abs(p.vy);b?(v=!0,p.allowed=g):p.allowed=0}if(p.t=g,p.vx=x,p.vy=S,v)return h.renderer.scrollBy(f.wheelX*f.speed,f.wheelY*f.speed),f.stop()}},u}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,r.DefaultHandlers=a;function c(u,f,h,p){return Math.sqrt(Math.pow(h-u,2)+Math.pow(p-f,2))}function s(u,f){if(u.start.row==u.end.row)var h=2*f.column-u.start.column-u.end.column;else if(u.start.row==u.end.row-1&&!u.start.column&&!u.end.column)var h=f.column-4;else var h=2*f.row-u.start.row-u.end.row;return h<0?{cursor:u.start,anchor:u.end}:{cursor:u.end,anchor:u.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(n,r,i){var o=this&&this.__extends||function(){var p=function(g,w){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(x[T]=S[T])},p(g,w)};return function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");p(g,w);function x(){this.constructor=g}g.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),l=this&&this.__values||function(p){var g=typeof Symbol=="function"&&Symbol.iterator,w=g&&p[g],x=0;if(w)return w.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&x>=p.length&&(p=void 0),{value:p&&p[x++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("./lib/dom"),a=n("./range").Range,c="ace_tooltip",s=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,w){this.getElement().style.left=g+"px",this.getElement().style.top=w+"px"},p.prototype.setClassName=function(g){d.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=c+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,w,x){g!=null&&this.setText(g),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),u=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var w=this.popups.indexOf(g);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,w,x,S;this.popups.sort(function(k,O){return O.priority-k.priority});var T=[];try{for(var v=l(this.popups),b=v.next();!b.done;b=v.next()){var y=b.value,m=!0;try{for(var E=(x=void 0,l(T)),M=E.next();!M.done;M=E.next()){var C=M.value;if(this.doPopupsOverlap(C,y)){m=!1;break}}}catch(k){x={error:k}}finally{try{M&&!M.done&&(S=E.return)&&S.call(E)}finally{if(x)throw x.error}}m?T.push(y):y.hide()}}catch(k){g={error:k}}finally{try{b&&!b.done&&(w=v.return)&&w.call(v)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,w){var x=g.getElement().getBoundingClientRect(),S=w.getElement().getBoundingClientRect();return x.left<S.right&&x.right>S.left&&x.top<S.bottom&&x.bottom>S.top},p}(),f=new u;r.popupManager=f,r.Tooltip=s;var h=function(p){o(g,p);function g(w){w===void 0&&(w=document.body);var x=p.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var S=x.getElement();return S.style.whiteSpace="pre-wrap",S.style.pointerEvents="auto",S.addEventListener("mouseout",x.onMouseOut),S.tabIndex=-1,S.addEventListener("blur",function(){S.contains(document.activeElement)||this.hide()}.bind(x)),x}return g.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var S=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||S||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||S||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(w){var x=w.editor,S=w.getDocumentPosition(),T=x.session.getLine(S.row);if(S.column==T.length){var v=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),b=x.session.documentToScreenPosition(S.row,S.column);if(b.column!=v.column||b.row!=v.row)return!0}return!1},g.prototype.setDataProvider=function(w){this.$gatherData=w},g.prototype.showForRange=function(w,x,S,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=w.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=a.fromPoints(x.start,x.end);var b=this.getElement();b.innerHTML="",b.appendChild(S),b.style.display="block";var y=v.textToScreenCoordinates(x.start.row,x.start.column),m=w.getCursorPosition(),E=b.clientHeight,M=v.scroller.getBoundingClientRect(),C=!0;this.row>m.row?C=!0:this.row<m.row&&(C=!1),y.pageY-E+v.lineHeight<M.top?C=!0:y.pageY+E>M.bottom&&(C=!1),C?y.pageY+=v.lineHeight:y.pageY-=E,b.style.maxWidth=M.width-(y.pageX-M.left)+"px",this.setPosition(y.pageX,y.pageY)}},g.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},g.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.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,f.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||w.relatedTarget==this.getElement()||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},g}(s);r.HoverTooltip=h}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,i){var o=this&&this.__extends||function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function w(){this.constructor=p}p.prototype=g===null?Object.create(g):(w.prototype=g.prototype,new w)}}(),l=this&&this.__values||function(h){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&h[p],w=0;if(g)return g.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&w>=h.length&&(h=void 0),{value:h&&h[w++],done:!h}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("../lib/dom"),a=n("../lib/event"),c=n("../tooltip").Tooltip,s=n("../config").nls;function u(h){var p=h.editor,g=p.renderer.$gutterLayer,w=new f(p);h.editor.setDefaultHandler("guttermousedown",function(y){if(!(!p.isFocused()||y.getButton()!=0)){var m=g.getRegion(y);if(m!="foldWidgets"){var E=y.getDocumentPosition().row,M=p.session.selection;if(y.getShiftKey())M.selectTo(E,0);else{if(y.domEvent.detail==2)return p.selectAll(),y.preventDefault();h.$clickSelection=p.selection.getLineRange(E)}return h.setState("selectByLines"),h.captureMouse(y),y.preventDefault()}}});var x,S;function T(){var y=S.getDocumentPosition().row,m=p.session.getLength();if(y==m){var E=p.renderer.pixelToScreenCoordinates(0,S.y).row,M=S.$pos;if(E>p.session.documentToScreenRow(M.row,M.column))return v()}if(w.showTooltip(y),!!w.isOpen)if(p.on("mousewheel",v),h.$tooltipFollowsMouse)b(S);else{var C=g.$lines.cells[y].element.querySelector("[class*=ace_icon]"),k=C.getBoundingClientRect(),O=w.getElement().style;O.left=k.right+"px",O.top=k.bottom+"px"}}function v(){x&&(x=clearTimeout(x)),w.isOpen&&(w.hide(),p._signal("hideGutterTooltip",w),p.off("mousewheel",v))}function b(y){w.setPosition(y.x,y.y)}h.editor.setDefaultHandler("guttermousemove",function(y){var m=y.domEvent.target||y.domEvent.srcElement;if(d.hasCssClass(m,"ace_fold-widget"))return v();w.isOpen&&h.$tooltipFollowsMouse&&b(y),S=y,!x&&(x=setTimeout(function(){x=null,S&&!h.isMousePressed?T():v()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(y){S=null,!(!w.isOpen||x)&&(x=setTimeout(function(){x=null,v()},50))},p),p.on("changeSession",v),p.on("input",v)}r.GutterHandler=u;var f=function(h){o(p,h);function p(g){var w=h.call(this,g.container)||this;return w.editor=g,w}return p.prototype.setPosition=function(g,w){var x=window.innerWidth||document.documentElement.clientWidth,S=window.innerHeight||document.documentElement.clientHeight,T=this.getWidth(),v=this.getHeight();g+=15,w+=15,g+T>x&&(g-=g+T-x),w+v>S&&(w-=20+v),c.prototype.setPosition.call(this,g,w)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:s("error"),plural:s("errors")},warning:{singular:s("warning"),plural:s("warnings")},info:{singular:s("information message"),plural:s("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var w=this.editor.renderer.$gutterLayer,x=w.$annotations[g],S;x?S={text:Array.from(x.text),type:Array.from(x.type)}:S={text:[],type:[]};var T=w.session.getFoldLine(g);if(T&&w.$showFoldedAnnotations){for(var v={error:[],warning:[],info:[]},b,y=g+1;y<=T.end.row;y++)if(w.$annotations[y])for(var m=0;m<w.$annotations[y].text.length;m++){var E=w.$annotations[y].type[m];if(v[E].push(w.$annotations[y].text[m]),E==="error"){b="error_fold";continue}if(E==="warning"){b="warning_fold";continue}}if(b==="error_fold"||b==="warning_fold"){var M="".concat(p.annotationsToSummaryString(v)," in folded code.");S.text.push(M),S.type.push(b)}}if(S.text.length===0)return this.hide();for(var C={error:[],warning:[],info:[]},k=w.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",y=0;y<S.text.length;y++){var O="<span class='ace_".concat(S.type[y]," ").concat(k,"' aria-label='").concat(p.annotationLabels[S.type[y].replace("_fold","")].singular,"' role=img> </span> ").concat(S.text[y]);C[S.type[y].replace("_fold","")].push(O)}var R=[].concat(C.error,C.warning,C.info).join("<br>");this.setHtml(R),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},p.annotationsToSummaryString=function(g){var w,x,S=[],T=["error","warning","info"];try{for(var v=l(T),b=v.next();!b.done;b=v.next()){var y=b.value;if(g[y].length){var m=g[y].length===1?p.annotationLabels[y].singular:p.annotationLabels[y].plural;S.push("".concat(g[y].length," ").concat(m))}}}catch(E){w={error:E}}finally{try{b&&!b.done&&(x=v.return)&&x.call(v)}finally{if(w)throw w.error}}return S.join(", ")},p}(c);r.GutterTooltip=f}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/event"),l=n("../lib/useragent"),d=function(){function a(c,s){this.domEvent=c,this.editor=s,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 a.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,s=c.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var u=this.getDocumentPosition();this.$inSelection=s.contains(u.row,u.column)}return this.$inSelection},a.prototype.getButton=function(){return o.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return l.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=d}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/dom"),l=n("../lib/event"),d=n("../lib/useragent"),a=200,c=200,s=5;function u(h){var p=h.editor,g=o.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var w=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];w.forEach(function(Y){h[Y]=this[Y]},this),p.on("mousedown",this.onMouseDown.bind(h));var x=p.container,S,T,v,b,y,m,E=0,M,C,k,O,R;this.onDragStart=function(Y){if(this.cancelDrag||!x.draggable){var Z=this;return setTimeout(function(){Z.startSelect(),Z.captureMouse(Y)},0),Y.preventDefault()}y=p.getSelectionRange();var te=Y.dataTransfer;te.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),te.setDragImage&&te.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),te.clearData(),te.setData("Text",p.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(Y){if(x.draggable=!1,C=!1,this.setState(null),!p.getReadOnly()){var Z=Y.dataTransfer.dropEffect;!M&&Z=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Y){if(!(p.getReadOnly()||!q(Y.dataTransfer)))return T=Y.clientX,v=Y.clientY,S||z(),E++,Y.dataTransfer.dropEffect=M=re(Y),l.preventDefault(Y)},this.onDragOver=function(Y){if(!(p.getReadOnly()||!q(Y.dataTransfer)))return T=Y.clientX,v=Y.clientY,S||(z(),E++),V!==null&&(V=null),Y.dataTransfer.dropEffect=M=re(Y),l.preventDefault(Y)},this.onDragLeave=function(Y){if(E--,E<=0&&S)return B(),M=null,l.preventDefault(Y)},this.onDrop=function(Y){if(m){var Z=Y.dataTransfer;if(C)switch(M){case"move":y.contains(m.row,m.column)?y={start:m,end:m}:y=p.moveText(y,m);break;case"copy":y=p.moveText(y,m,!0);break}else{var te=Z.getData("Text");y={start:m,end:p.session.insert(m,te)},p.focus(),M=null}return B(),l.preventDefault(Y)}},l.addListener(x,"dragstart",this.onDragStart.bind(h),p),l.addListener(x,"dragend",this.onDragEnd.bind(h),p),l.addListener(x,"dragenter",this.onDragEnter.bind(h),p),l.addListener(x,"dragover",this.onDragOver.bind(h),p),l.addListener(x,"dragleave",this.onDragLeave.bind(h),p),l.addListener(x,"drop",this.onDrop.bind(h),p);function A(Y,Z){var te=Date.now(),ie=!Z||Y.row!=Z.row,ce=!Z||Y.column!=Z.column;if(!O||ie||ce)p.moveCursorToPosition(Y),O=te,R={x:T,y:v};else{var he=f(R.x,R.y,T,v);he>s?O=null:te-O>=c&&(p.renderer.scrollCursorIntoView(),O=null)}}function I(Y,Z){var te=Date.now(),ie=p.renderer.layerConfig.lineHeight,ce=p.renderer.layerConfig.characterWidth,he=p.renderer.scroller.getBoundingClientRect(),ve={x:{left:T-he.left,right:he.right-T},y:{top:v-he.top,bottom:he.bottom-v}},Ce=Math.min(ve.x.left,ve.x.right),_e=Math.min(ve.y.top,ve.y.bottom),Re={row:Y.row,column:Y.column};Ce/ce<=2&&(Re.column+=ve.x.left<ve.x.right?-3:2),_e/ie<=1&&(Re.row+=ve.y.top<ve.y.bottom?-1:1);var ot=Y.row!=Re.row,Te=Y.column!=Re.column,it=!Z||Y.row!=Z.row;ot||Te&&!it?k?te-k>=a&&p.renderer.scrollCursorIntoView(Re):k=te:k=null}function P(){var Y=m;m=p.renderer.screenToTextCoordinates(T,v),A(m,Y),I(m,Y)}function z(){y=p.selection.toOrientedRange(),S=p.session.addMarker(y,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),P(),b=setInterval(P,20),E=0,l.addListener(document,"mousemove",K)}function B(){clearInterval(b),p.session.removeMarker(S),S=null,p.selection.fromOrientedRange(y),p.isFocused()&&!C&&p.$resetCursorStyle(),y=null,m=null,E=0,k=null,O=null,l.removeListener(document,"mousemove",K)}var V=null;function K(){V==null&&(V=setTimeout(function(){V!=null&&S&&B()},20))}function q(Y){var Z=Y.types;return!Z||Array.prototype.some.call(Z,function(te){return te=="text/plain"||te=="Text"})}function re(Y){var Z=["copy","copymove","all","uninitialized"],te=["move","copymove","linkmove","all","uninitialized"],ie=d.isMac?Y.altKey:Y.ctrlKey,ce="uninitialized";try{ce=Y.dataTransfer.effectAllowed.toLowerCase()}catch{}var he="none";return ie&&Z.indexOf(ce)>=0?he="copy":te.indexOf(ce)>=0?he="move":Z.indexOf(ce)>=0&&(he="copy"),he}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,p=h.container;p.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var g=d.isWin?"default":"move";h.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(h){var p=this.editor.container;if(d.isIE&&this.state=="dragReady"){var g=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var p=this.editor,g=h.inSelection(),w=h.getButton(),x=h.domEvent.detail||1;if(x===1&&w===0&&g){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var S=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in S&&(S.unselectable="on"),p.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var T=p.container;T.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(u.prototype);function f(h,p,g,w){return Math.sqrt(Math.pow(g-h,2)+Math.pow(w-p,2))}r.DragdropHandler=u}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,i){var o=n("./mouse_event").MouseEvent,l=n("../lib/event"),d=n("../lib/dom");r.addTouchListeners=function(a,c){var s="scroll",u,f,h,p,g,w,x=0,S,T=0,v=0,b=0,y,m;function E(){var A=window.navigator&&window.navigator.clipboard,I=!1,P=function(){var B=c.getCopyText(),V=c.session.getUndoManager().hasUndo();m.replaceChild(d.buildDom(I?["span",!B&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],B&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],B&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],V&&["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"]),m.firstChild)},z=function(B){var V=B.target.getAttribute("action");if(V=="more"||!I)return I=!I,P();V=="paste"?A.readText().then(function(K){c.execCommand(V,K)}):V&&((V=="cut"||V=="copy")&&(A?A.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(V)),m.firstChild.style.display="none",I=!1,V!="openCommandPallete"&&c.focus()};m=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(B){s="menu",B.stopPropagation(),B.preventDefault(),c.textInput.focus()},ontouchend:function(B){B.stopPropagation(),B.preventDefault(),z(B)},onclick:z},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function M(){m||E();var A=c.selection.cursor,I=c.renderer.textToScreenCoordinates(A.row,A.column),P=c.renderer.textToScreenCoordinates(0,0).pageX,z=c.renderer.scrollLeft,B=c.container.getBoundingClientRect();m.style.top=I.pageY-B.top-3+"px",I.pageX-B.left<B.width-70?(m.style.left="",m.style.right="10px"):(m.style.right="",m.style.left=P+z-B.left+"px"),m.style.display="",m.firstChild.style.display="none",c.on("input",C)}function C(A){m&&(m.style.display="none"),c.off("input",C)}function k(){g=null,clearTimeout(g);var A=c.selection.getRange(),I=A.contains(S.row,S.column);(A.isEmpty()||!I)&&(c.selection.moveToPosition(S),c.selection.selectWord()),s="wait",M()}function O(){g=null,clearTimeout(g),c.selection.moveToPosition(S);var A=T>=2?c.selection.getLineRange(S.row):c.session.getBracketRange(S);A&&!A.isEmpty()?c.selection.setRange(A):c.selection.selectWord(),s="wait"}l.addListener(a,"contextmenu",function(A){if(y){var I=c.textInput.getElement();I.focus()}},c),l.addListener(a,"touchstart",function(A){var I=A.touches;if(g||I.length>1){clearTimeout(g),g=null,h=-1,s="zoom";return}y=c.$mouseHandler.isMousePressed=!0;var P=c.renderer.layerConfig.lineHeight,z=c.renderer.layerConfig.lineHeight,B=A.timeStamp;p=B;var V=I[0],K=V.clientX,q=V.clientY;Math.abs(u-K)+Math.abs(f-q)>P&&(h=-1),u=A.clientX=K,f=A.clientY=q,v=b=0;var re=new o(A,c);if(S=re.getDocumentPosition(),B-h<500&&I.length==1&&!x)T++,A.preventDefault(),A.button=0,O();else{T=0;var Y=c.selection.cursor,Z=c.selection.isEmpty()?Y:c.selection.anchor,te=c.renderer.$cursorLayer.getPixelPosition(Y,!0),ie=c.renderer.$cursorLayer.getPixelPosition(Z,!0),ce=c.renderer.scroller.getBoundingClientRect(),he=c.renderer.layerConfig.offset,ve=c.renderer.scrollLeft,Ce=function(ot,Te){return ot=ot/z,Te=Te/P-.75,ot*ot+Te*Te};if(A.clientX<ce.left){s="zoom";return}var _e=Ce(A.clientX-ce.left-te.left+ve,A.clientY-ce.top-te.top+he),Re=Ce(A.clientX-ce.left-ie.left+ve,A.clientY-ce.top-ie.top+he);_e<3.5&&Re<3.5&&(s=_e>Re?"cursor":"anchor"),Re<3.5?s="anchor":_e<3.5?s="cursor":s="scroll",g=setTimeout(k,450)}h=B},c),l.addListener(a,"touchend",function(A){y=c.$mouseHandler.isMousePressed=!1,w&&clearInterval(w),s=="zoom"?(s="",x=0):g?(c.selection.moveToPosition(S),x=0,M()):s=="scroll"?(R(),C()):M(),clearTimeout(g),g=null},c),l.addListener(a,"touchmove",function(A){g&&(clearTimeout(g),g=null);var I=A.touches;if(!(I.length>1||s=="zoom")){var P=I[0],z=u-P.clientX,B=f-P.clientY;if(s=="wait")if(z*z+B*B>4)s="cursor";else return A.preventDefault();u=P.clientX,f=P.clientY,A.clientX=P.clientX,A.clientY=P.clientY;var V=A.timeStamp,K=V-p;if(p=V,s=="scroll"){var q=new o(A,c);q.speed=1,q.wheelX=z,q.wheelY=B,10*Math.abs(z)<Math.abs(B)&&(z=0),10*Math.abs(B)<Math.abs(z)&&(B=0),K!=0&&(v=z/K,b=B/K),c._emit("mousewheel",q),q.propagationStopped||(v=b=0)}else{var re=new o(A,c),Y=re.getDocumentPosition();s=="cursor"?c.selection.moveCursorToPosition(Y):s=="anchor"&&c.selection.setSelectionAnchor(Y.row,Y.column),c.renderer.scrollCursorIntoView(Y),A.preventDefault()}}},c);function R(){x+=60,w=setInterval(function(){x--<=0&&(clearInterval(w),w=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),x<20&&(v=.9*v),x<20&&(b=.9*b);var A=c.session.getScrollTop();c.renderer.scrollBy(10*v,10*b),A==c.session.getScrollTop()&&(x=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,i){var o=n("../lib/event"),l=n("../lib/useragent"),d=n("./default_handlers").DefaultHandlers,a=n("./default_gutter_handler").GutterHandler,c=n("./mouse_event").MouseEvent,s=n("./dragdrop_handler").DragdropHandler,u=n("./touch_handler").addTouchListeners,f=n("../config"),h=function(){function p(g){var w=this;this.editor=g,new d(this),new a(this),new s(this);var x=function(v){var b=!document.hasFocus||!document.hasFocus()||!g.isFocused()&&document.activeElement==(g.textInput&&g.textInput.getElement());b&&window.focus(),g.focus(),setTimeout(function(){g.isFocused()||g.focus()})},S=g.renderer.getMouseEventTarget();o.addListener(S,"click",this.onMouseEvent.bind(this,"click"),g),o.addListener(S,"mousemove",this.onMouseMove.bind(this,"mousemove"),g),o.addMultiMouseDownListener([S,g.renderer.scrollBarV&&g.renderer.scrollBarV.inner,g.renderer.scrollBarH&&g.renderer.scrollBarH.inner,g.textInput&&g.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",g),o.addMouseWheelListener(g.container,this.onMouseWheel.bind(this,"mousewheel"),g),u(g.container,g);var T=g.renderer.$gutter;o.addListener(T,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),g),o.addListener(T,"click",this.onMouseEvent.bind(this,"gutterclick"),g),o.addListener(T,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),g),o.addListener(T,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),g),o.addListener(S,"mousedown",x,g),o.addListener(T,"mousedown",x,g),l.isIE&&g.renderer.scrollBarV&&(o.addListener(g.renderer.scrollBarV.element,"mousedown",x,g),o.addListener(g.renderer.scrollBarH.element,"mousedown",x,g)),g.on("mousemove",function(v){if(!(w.state||w.$dragDelay||!w.$dragEnabled)){var b=g.renderer.screenToTextCoordinates(v.x,v.y),y=g.session.selection.getRange(),m=g.renderer;!y.isEmpty()&&y.insideStart(b.row,b.column)?m.setCursorStyle("default"):m.setCursorStyle("")}},g)}return p.prototype.onMouseEvent=function(g,w){this.editor.session&&this.editor._emit(g,new c(w,this.editor))},p.prototype.onMouseMove=function(g,w){var x=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!x||!x.length||this.editor._emit(g,new c(w,this.editor))},p.prototype.onMouseWheel=function(g,w){var x=new c(w,this.editor);x.speed=this.$scrollSpeed*2,x.wheelX=w.wheelX,x.wheelY=w.wheelY,this.editor._emit(g,x)},p.prototype.setState=function(g){this.state=g},p.prototype.captureMouse=function(g,w){this.x=g.x,this.y=g.y,this.isMousePressed=!0;var x=this.editor,S=this.editor.renderer;S.$isMousePressed=!0;var T=this,v=function(M){if(M){if(l.isWebKit&&!M.which&&T.releaseMouse)return T.releaseMouse();T.x=M.clientX,T.y=M.clientY,w&&w(M),T.mouseEvent=new c(M,T.editor),T.$mouseMoved=!0}},b=function(M){x.off("beforeEndOperation",m),clearInterval(E),x.session&&y(),T[T.state+"End"]&&T[T.state+"End"](M),T.state="",T.isMousePressed=S.$isMousePressed=!1,S.$keepTextAreaAtCursor&&S.$moveTextAreaToCursor(),T.$onCaptureMouseMove=T.releaseMouse=null,M&&T.onMouseEvent("mouseup",M),x.endOperation()},y=function(){T[T.state]&&T[T.state](),T.$mouseMoved=!1};if(l.isOldIE&&g.domEvent.type=="dblclick")return setTimeout(function(){b(g)});var m=function(M){T.releaseMouse&&x.curOp.command.name&&x.curOp.selectionChanged&&(T[T.state+"End"]&&T[T.state+"End"](),T.state="",T.releaseMouse())};x.on("beforeEndOperation",m),x.startOperation({command:{name:"mouse"}}),T.$onCaptureMouseMove=v,T.releaseMouse=o.capture(this.editor.container,v,b);var E=setInterval(y,20)},p.prototype.cancelContextMenu=function(){var g=function(w){w&&w.domEvent&&w.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",g),w&&w.domEvent&&o.stopEvent(w.domEvent))}.bind(this);setTimeout(g,10),this.editor.on("nativecontextmenu",g)},p.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},p}();h.prototype.releaseMouse=null,f.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:l.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),l=function(){function d(a){a.on("click",function(c){var s=c.getDocumentPosition(),u=a.session,f=u.getFoldAt(s.row,s.column,1);f&&(c.getAccelKey()?u.removeFold(f):u.expandFold(f),c.stop());var h=c.domEvent&&c.domEvent.target;h&&o.hasCssClass(h,"ace_inline_button")&&o.hasCssClass(h,"ace_toggle_wrap")&&(u.setOption("wrap",!u.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(c){var s=a.renderer.$gutterLayer.getRegion(c);if(s=="foldWidgets"){var u=c.getDocumentPosition().row,f=a.session;f.foldWidgets&&f.foldWidgets[u]&&a.session.onFoldWidgetClick(u,c),a.isFocused()||a.focus(),c.stop()}}),a.on("gutterdblclick",function(c){var s=a.renderer.$gutterLayer.getRegion(c);if(s=="foldWidgets"){var u=c.getDocumentPosition().row,f=a.session,h=f.getParentFoldRangeData(u,!0),p=h.range||h.firstRange;if(p){u=p.start.row;var g=f.getFoldAt(u,f.getLine(u).length,1);g?f.removeFold(g):(f.addFold("...",p),a.renderer.scrollCursorIntoView({row:p.start.row,column:0}))}c.stop()}})}return d}();r.FoldHandler=l}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,i){var o=n("../lib/keys"),l=n("../lib/event"),d=function(){function a(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return a.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},a.prototype.setKeyboardHandler=function(c){var s=this.$handlers;if(s[s.length-1]!=c){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(c,1)}},a.prototype.addKeyboardHandler=function(c,s){if(c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var u=this.$handlers.indexOf(c);u!=-1&&this.$handlers.splice(u,1),s==null?this.$handlers.push(c):this.$handlers.splice(s,0,c),u==-1&&c.attach&&c.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(c){var s=this.$handlers.indexOf(c);return s==-1?!1:(this.$handlers.splice(s,1),c.detach&&c.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var c=this.$data,s=c.editor;return this.$handlers.map(function(u){return u.getStatusText&&u.getStatusText(s,c)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(c,s,u,f){for(var h,p=!1,g=this.$editor.commands,w=this.$handlers.length;w--&&(h=this.$handlers[w].handleKeyboard(this.$data,c,s,u,f),!(!(!h||!h.command)&&(h.command=="null"?p=!0:p=g.exec(h.command,this.$editor,h.args,f),p&&f&&c!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&l.stopEvent(f),p))););return!p&&c==-1&&(h={command:"insertstring"},p=g.exec("insertstring",this.$editor,s)),p&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),p},a.prototype.onCommandKey=function(c,s,u){var f=o.keyCodeToString(u);return this.$callKeyboardHandlers(s,f,u,c)},a.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},a}();r.KeyBinding=d}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,i){var o=0,l=0,d=!1,a=!1,c=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],u=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f=0,h=1,p=0,g=1,w=2,x=3,S=4,T=5,v=6,b=7,y=8,m=9,E=10,M=11,C=12,k=13,O=14,R=15,A=16,I=17,P=18,z=[P,P,P,P,P,P,P,P,P,v,T,v,y,T,P,P,P,P,P,P,P,P,P,P,P,P,P,P,T,T,T,v,y,S,S,M,M,M,S,S,S,S,S,E,m,E,m,m,w,w,w,w,w,w,w,w,w,w,m,S,S,S,S,S,S,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,S,S,S,S,S,S,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,S,S,S,S,P,P,P,P,P,P,T,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,m,S,M,M,M,M,S,S,S,S,p,S,S,P,S,S,M,M,w,w,S,p,S,S,S,w,p,S,S,S,S,S],B=[y,y,y,y,y,y,y,y,y,y,y,P,P,P,p,g,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,y,T,k,O,R,A,I,m,M,M,M,M,M,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,m,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,y];function V(Y,Z,te,ie){var ce=o?u:s,he=null,ve=null,Ce=null,_e=0,Re=null,ot=null,Te=-1,it=null,vt=null,Qt=[];if(!ie)for(it=0,ie=[];it<te;it++)ie[it]=re(Y[it]);for(l=o,d=!1,a=!1,c=!1,vt=0;vt<te;vt++){if(he=_e,Qt[vt]=ve=q(Y,ie,Qt,vt),_e=ce[he][ve],Re=_e&240,_e&=15,Z[vt]=Ce=ce[_e][5],Re>0)if(Re==16){for(it=Te;it<vt;it++)Z[it]=1;Te=-1}else Te=-1;if(ot=ce[_e][6],ot)Te==-1&&(Te=vt);else if(Te>-1){for(it=Te;it<vt;it++)Z[it]=Ce;Te=-1}ie[vt]==T&&(Z[vt]=0),l|=Ce}if(c){for(it=0;it<te;it++)if(ie[it]==v){Z[it]=o;for(var Ut=it-1;Ut>=0&&ie[Ut]==y;Ut--)Z[Ut]=o}}}function K(Y,Z,te){if(!(l<Y)){if(Y==1&&o==h&&!a){te.reverse();return}for(var ie=te.length,ce=0,he,ve,Ce,_e;ce<ie;){if(Z[ce]>=Y){for(he=ce+1;he<ie&&Z[he]>=Y;)he++;for(ve=ce,Ce=he-1;ve<Ce;ve++,Ce--)_e=te[ve],te[ve]=te[Ce],te[Ce]=_e;ce=he}ce++}}}function q(Y,Z,te,ie){var ce=Z[ie],he,ve,Ce,_e;switch(ce){case p:case g:d=!1;case S:case x:return ce;case w:return d?x:w;case b:return d=!0,g;case y:return S;case m:return ie<1||ie+1>=Z.length||(he=te[ie-1])!=w&&he!=x||(ve=Z[ie+1])!=w&&ve!=x?S:(d&&(ve=x),ve==he?ve:S);case E:return he=ie>0?te[ie-1]:T,he==w&&ie+1<Z.length&&Z[ie+1]==w?w:S;case M:if(ie>0&&te[ie-1]==w)return w;if(d)return S;for(_e=ie+1,Ce=Z.length;_e<Ce&&Z[_e]==M;)_e++;return _e<Ce&&Z[_e]==w?w:S;case C:for(Ce=Z.length,_e=ie+1;_e<Ce&&Z[_e]==C;)_e++;if(_e<Ce){var Re=Y[ie],ot=Re>=1425&&Re<=2303||Re==64286;if(he=Z[_e],ot&&(he==g||he==b))return g}return ie<1||(he=Z[ie-1])==T?S:te[ie-1];case T:return d=!1,a=!0,o;case v:return c=!0,S;case k:case O:case A:case I:case R:d=!1;case P:return S}}function re(Y){var Z=Y.charCodeAt(0),te=Z>>8;return te==0?Z>191?p:z[Z]:te==5?/[\u0591-\u05f4]/.test(Y)?g:p:te==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(Y)?C:/[\u0660-\u0669\u066b-\u066c]/.test(Y)?x:Z==1642?M:/[\u06f0-\u06f9]/.test(Y)?w:b:te==32&&Z<=8287?B[Z&255]:te==254&&Z>=65136?b:S}r.L=p,r.R=g,r.EN=w,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(Y,Z,te){if(Y.length<2)return{};var ie=Y.split(""),ce=new Array(ie.length),he=new Array(ie.length),ve=[];o=te?h:f,V(ie,ve,ie.length,Z);for(var Ce=0;Ce<ce.length;ce[Ce]=Ce,Ce++);K(2,ve,ce),K(1,ve,ce);for(var Ce=0;Ce<ce.length-1;Ce++)Z[Ce]===x?ve[Ce]=r.AN:ve[Ce]===g&&(Z[Ce]>b&&Z[Ce]<k||Z[Ce]===S||Z[Ce]===P)?ve[Ce]=r.ON_R:Ce>0&&ie[Ce-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ie[Ce])&&(ve[Ce-1]=ve[Ce]=r.R_H,Ce++);ie[ie.length-1]===r.DOT&&(ve[ie.length-1]=r.B),ie[0]===""&&(ve[0]=r.RLE);for(var Ce=0;Ce<ce.length;Ce++)he[Ce]=ve[ce[Ce]];return{logicalFromVisual:ce,bidiLevels:he}},r.hasBidiCharacters=function(Y,Z){for(var te=!1,ie=0;ie<Y.length;ie++)Z[ie]=re(Y.charAt(ie)),!te&&(Z[ie]==g||Z[ie]==b||Z[ie]==x)&&(te=!0);return te},r.getVisualFromLogicalIdx=function(Y,Z){for(var te=0;te<Z.logicalFromVisual.length;te++)if(Z.logicalFromVisual[te]==Y)return te;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,i){var o=n("./lib/bidiutil"),l=n("./lib/lang"),d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function c(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=d.test(s.getValue())}return c.prototype.isBidiRow=function(s,u,f){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(u,f),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&d.test(s.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var s=0,u=this.session.$screenRowCache;if(u.length){var f=this.session.$getRowCacheIndex(u,this.currentRow);f>=0&&(s=this.session.$docRowCache[f])}return s},c.prototype.getSplitIndex=function(){var s=0,u=this.session.$screenRowCache;if(u.length)for(var f,h=this.session.$getRowCacheIndex(u,this.currentRow);this.currentRow-s>0&&(f=this.session.$getRowCacheIndex(u,this.currentRow-s-1),f===h);)h=f,s++;else s=this.currentRow;return s},c.prototype.updateRowLine=function(s,u){s===void 0&&(s=this.getDocumentRow());var f=s===this.session.getLength()-1,h=f?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[s];p&&(u===void 0&&(u=this.getSplitIndex()),u>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=u<p.length?this.line.substring(p[u-1],p[u]):this.line.substring(p[p.length-1])):this.line=this.line.substring(0,p[u]),u==p.length&&(this.line+=this.showInvisibles?h:o.DOT))}else this.line+=this.showInvisibles?h:o.DOT;var g=this.session,w=0,x;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(S,T){return S===" "||g.isFullWidth(S.charCodeAt(0))?(x=S===" "?g.getScreenTabSize(T+w):2,w+=x-1,l.stringRepeat(o.DOT,x)):S}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var s=[];o.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var u=this.characterWidth=s.$characterSize.width,f=s.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=u,this.charWidths[o.R]=this.charWidths[o.AN]=f,this.charWidths[o.R_H]=f*.45,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},c.prototype.setEolChar=function(s){this.EOL=s},c.prototype.setContentWidth=function(s){this.contentWidth=s},c.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(s,u){for(var f=s.getCursorPosition(),h=s.selection.getSelectionAnchor().row;h<=f.row;h++)!u&&s.session.getLine(h).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(h,0,1):u&&s.session.getLine(h).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:h},s.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(s){s-=this.wrapIndent;var u=this.line.charAt(0)===this.RLE?1:0,f=s>u?this.session.getOverwrite()?s:s-1:u,h=o.getVisualFromLogicalIdx(f,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&s<=u&&p[h]%2!==0&&h++;for(var w=0;w<h;w++)g+=this.charWidths[p[w]];return!this.session.getOverwrite()&&s>u&&p[h]%2===0&&(g+=this.charWidths[p[h]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},c.prototype.getSelections=function(s,u){var f=this.bidiMap,h=f.bidiLevels,p,g=[],w=0,x=Math.min(s,u)-this.wrapIndent,S=Math.max(s,u)-this.wrapIndent,T=!1,v=!1,b=0;this.wrapIndent&&(w+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var y,m=0;m<h.length;m++)y=f.logicalFromVisual[m],p=h[m],T=y>=x&&y<S,T&&!v?b=w:!T&&v&&g.push({left:b,width:w-b}),w+=this.charWidths[p],v=T;if(T&&m===h.length&&g.push({left:b,width:w-b}),this.isRtlDir)for(var E=0;E<g.length;E++)g[E].left+=this.rtlLineOffset;return g},c.prototype.offsetToCol=function(f){this.isRtlDir&&(f-=this.rtlLineOffset);var u=0,f=Math.max(f,0),h=0,p=0,g=this.bidiMap.bidiLevels,w=this.charWidths[g[p]];for(this.wrapIndent&&(f-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);f>h+w/2;){if(h+=w,p===g.length-1){w=0;break}w=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(f<h&&p--,u=this.bidiMap.logicalFromVisual[p]):p>0&&g[p-1]%2===0&&g[p]%2!==0?u=1+(f>h?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&w===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?u=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&w!==0&&p--,u=this.bidiMap.logicalFromVisual[p]),u===0&&this.isRtlDir&&u++,u+this.wrapIndent},c}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,i){var o=n("./lib/oop"),l=n("./lib/lang"),d=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,c=function(s){this.session=s,this.doc=s.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(f){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})};(function(){o.implement(this,d),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(s,u){this.$isEmpty=!1,this.anchor.setPosition(s,u)},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 s=this.anchor,u=this.lead;return s.row>u.row||s.row==u.row&&s.column>u.column},this.getRange=function(){var s=this.anchor,u=this.lead;return this.$isEmpty?a.fromPoints(u,u):this.isBackwards()?a.fromPoints(u,s):a.fromPoints(s,u)},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(s,u){var f=u?s.end:s.start,h=u?s.start:s.end;this.$setSelection(f.row,f.column,h.row,h.column)},this.$setSelection=function(s,u,f,h){if(!this.$silent){var p=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(s,u),this.cursor.setPosition(f,h),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||p!=this.$isEmpty||g)&&this._emit("changeSelection")}},this.$moveSelection=function(s){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),s.call(this)},this.selectTo=function(s,u){this.$moveSelection(function(){this.moveCursorTo(s,u)})},this.selectToPosition=function(s){this.$moveSelection(function(){this.moveCursorToPosition(s)})},this.moveTo=function(s,u){this.clearSelection(),this.moveCursorTo(s,u)},this.moveToPosition=function(s){this.clearSelection(),this.moveCursorToPosition(s)},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(s,u){if(typeof u>"u"){var f=s||this.lead;s=f.row,u=f.column}return this.session.getWordRange(s,u)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var s=this.getCursor(),u=this.session.getAWordRange(s.row,s.column);this.setSelectionRange(u)},this.getLineRange=function(s,u){var f=typeof s=="number"?s:this.lead.row,h,p=this.session.getFoldLine(f);return p?(f=p.start.row,h=p.end.row):h=f,u===!0?new a(f,0,h,this.session.getLine(h).length):new a(f,0,h+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(s,u,f){var h=s.column,p=s.column+u;return f<0&&(h=s.column-u,p=s.column),this.session.isTabStop(s)&&this.doc.getLine(s.row).slice(h,p).split(" ").length-1==u},this.moveCursorLeft=function(){var s=this.lead.getPosition(),u;if(u=this.session.getFoldAt(s.row,s.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(s.column===0)s.row>0&&this.moveCursorTo(s.row-1,this.doc.getLine(s.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(s,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var s=this.lead.getPosition(),u;if(u=this.session.getFoldAt(s.row,s.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var f=this.session.getTabSize(),s=this.lead;this.wouldMoveIntoSoftTab(s,f,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,f):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var s=this.lead.row,u=this.lead.column,f=this.session.documentToScreenRow(s,u),h=this.session.screenToDocumentPosition(f,0),p=this.session.getDisplayLine(s,null,h.row,h.column),g=p.match(/^\s*/);g[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(h.column+=g[0].length),this.moveCursorToPosition(h)},this.moveCursorLineEnd=function(){var s=this.lead,u=this.session.getDocumentLastRowColumnPosition(s.row,s.column);if(this.lead.column==u.column){var f=this.session.getLine(u.row);if(u.column==f.length){var h=f.search(/\s+$/);h>0&&(u.column=h)}}this.moveCursorTo(u.row,u.column)},this.moveCursorFileEnd=function(){var s=this.doc.getLength()-1,u=this.doc.getLine(s).length;this.moveCursorTo(s,u)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var s=this.lead.row,u=this.lead.column,f=this.doc.getLine(s),h=f.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var p=this.session.getFoldAt(s,u,1);if(p){this.moveCursorTo(p.end.row,p.end.column);return}if(this.session.nonTokenRe.exec(h)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,h=f.substring(u)),u>=f.length){this.moveCursorTo(s,f.length),this.moveCursorRight(),s<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(h)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,u)},this.moveCursorLongWordLeft=function(){var s=this.lead.row,u=this.lead.column,f;if(f=this.session.getFoldAt(s,u,-1)){this.moveCursorTo(f.start.row,f.start.column);return}var h=this.session.getFoldStringAt(s,u,-1);h==null&&(h=this.doc.getLine(s).substring(0,u));var p=l.stringReverse(h);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(p)&&(u-=this.session.nonTokenRe.lastIndex,p=p.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(s,0),this.moveCursorLeft(),s>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(p)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,u)},this.$shortWordEndIndex=function(s){var u=0,f,h=/\s/,p=this.session.tokenRe;if(p.lastIndex=0,this.session.tokenRe.exec(s))u=this.session.tokenRe.lastIndex;else{for(;(f=s[u])&&h.test(f);)u++;if(u<1){for(p.lastIndex=0;(f=s[u])&&!p.test(f);)if(p.lastIndex=0,u++,h.test(f))if(u>2){u--;break}else{for(;(f=s[u])&&h.test(f);)u++;if(u>2)break}}}return p.lastIndex=0,u},this.moveCursorShortWordRight=function(){var s=this.lead.row,u=this.lead.column,f=this.doc.getLine(s),h=f.substring(u),p=this.session.getFoldAt(s,u,1);if(p)return this.moveCursorTo(p.end.row,p.end.column);if(u==f.length){var g=this.doc.getLength();do s++,h=this.doc.getLine(s);while(s<g&&/^\s*$/.test(h));/^\s+/.test(h)||(h=""),u=0}var w=this.$shortWordEndIndex(h);this.moveCursorTo(s,u+w)},this.moveCursorShortWordLeft=function(){var s=this.lead.row,u=this.lead.column,f;if(f=this.session.getFoldAt(s,u,-1))return this.moveCursorTo(f.start.row,f.start.column);var h=this.session.getLine(s).substring(0,u);if(u===0){do s--,h=this.doc.getLine(s);while(s>0&&/^\s*$/.test(h));u=h.length,/\s+$/.test(h)||(h="")}var p=l.stringReverse(h),g=this.$shortWordEndIndex(p);return this.moveCursorTo(s,u-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(s,u){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),h;if(u===0&&(s!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(h=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(h/this.session.$bidiHandler.charWidths[0])):h=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),s!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var p=this.session.lineWidgets[this.lead.row];s<0?s-=p.rowsAbove||0:s>0&&(s+=p.rowCount-(p.rowsAbove||0))}var g=this.session.screenToDocumentPosition(f.row+s,f.column,h);s!==0&&u===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+u,u===0)},this.moveCursorToPosition=function(s){this.moveCursorTo(s.row,s.column)},this.moveCursorTo=function(s,u,f){var h=this.session.getFoldAt(s,u,1);h&&(s=h.start.row,u=h.start.column),this.$keepDesiredColumnOnChange=!0;var p=this.session.getLine(s);/[\uDC00-\uDFFF]/.test(p.charAt(u))&&p.charAt(u-1)&&(this.lead.row==s&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(s,u),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},this.moveCursorToScreen=function(s,u,f){var h=this.session.screenToDocumentPosition(s,u);this.moveCursorTo(h.row,h.column,f)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(s){this.setSelectionRange(s,s.cursor==s.start),this.$desiredColumn=s.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(s){var u=this.getRange();return s?(s.start.column=u.start.column,s.start.row=u.start.row,s.end.column=u.end.column,s.end.row=u.end.row):s=u,s.cursor=this.isBackwards()?s.start:s.end,s.desiredColumn=this.$desiredColumn,s},this.getRangeOfMovements=function(s){var u=this.getCursor();try{s(this);var f=this.getCursor();return a.fromPoints(u,f)}catch{return a.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},this.toJSON=function(){if(this.rangeCount)var s=this.ranges.map(function(u){var f=u.clone();return f.isBackwards=u.cursor==u.start,f});else{var s=this.getRange();s.isBackwards=this.isBackwards()}return s},this.fromJSON=function(s){if(s.start==null)if(this.rangeList&&s.length>1){this.toSingleRange(s[0]);for(var u=s.length;u--;){var f=a.fromPoints(s[u].start,s[u].end);s[u].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else s=s[0];this.rangeList&&this.toSingleRange(s),this.setSelectionRange(s,s.isBackwards)},this.isEqual=function(s){if((s.length||this.rangeCount)&&s.length!=this.rangeCount)return!1;if(!s.length||!this.ranges)return this.getRange().isEqual(s);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(s[u]))return!1;return!0}}).call(c.prototype),r.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(n,r,i){var o=n("./config"),l=2e3,d=function(){function a(c){this.states=c,this.regExps={},this.matchMappings={};for(var s in this.states){for(var u=this.states[s],f=[],h=0,p=this.matchMappings[s]={defaultToken:"text"},g="g",w=[],x=0;x<u.length;x++){var S=u[x];if(S.defaultToken&&(p.defaultToken=S.defaultToken),S.caseInsensitive&&g.indexOf("i")===-1&&(g+="i"),S.unicode&&g.indexOf("u")===-1&&(g+="u"),S.regex!=null){S.regex instanceof RegExp&&(S.regex=S.regex.toString().slice(1,-1));var T=S.regex,v=new RegExp("(?:("+T+")|(.))").exec("a").length-2;Array.isArray(S.token)?S.token.length==1||v==1?S.token=S.token[0]:v-1!=S.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:S,groupCount:v-1}),S.token=S.token[0]):(S.tokenArray=S.token,S.token=null,S.onMatch=this.$arrayTokens):typeof S.token=="function"&&!S.onMatch&&(v>1?S.onMatch=this.$applyToken:S.onMatch=S.token),v>1&&(/\\\d/.test(S.regex)?T=S.regex.replace(/\\([0-9]+)/g,function(b,y){return"\\"+(parseInt(y,10)+h+1)}):(v=1,T=this.removeCapturingGroups(S.regex)),!S.splitRegex&&typeof S.token!="string"&&w.push(S)),p[h]=x,h+=v,f.push(T),S.onMatch||(S.onMatch=null)}}f.length||(p[0]=0,f.push("$")),w.forEach(function(b){b.splitRegex=this.createSplitterRegexp(b.regex,g)},this),this.regExps[s]=new RegExp("("+f.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(c){l=c|0},a.prototype.$applyToken=function(c){var s=this.splitRegex.exec(c).slice(1),u=this.token.apply(this,s);if(typeof u=="string")return[{type:u,value:c}];for(var f=[],h=0,p=u.length;h<p;h++)s[h]&&(f[f.length]={type:u[h],value:s[h]});return f},a.prototype.$arrayTokens=function(c){if(!c)return[];var s=this.splitRegex.exec(c);if(!s)return"text";for(var u=[],f=this.tokenArray,h=0,p=f.length;h<p;h++)s[h+1]&&(u[u.length]={type:f[h],value:s[h+1]});return u},a.prototype.removeCapturingGroups=function(c){var s=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(u,f){return f?"(?:":u});return s},a.prototype.createSplitterRegexp=function(c,s){if(c.indexOf("(?=")!=-1){var u=0,f=!1,h={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(p,g,w,x,S,T){return f?f=S!="]":S?f=!0:x?(u==h.stack&&(h.end=T+1,h.stack=-1),u--):w&&(u++,w.length!=1&&(h.stack=u,h.start=T)),p}),h.end!=null&&/^\)*$/.test(c.substr(h.end))&&(c=c.substring(0,h.start)+c.substr(h.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(s||"").replace("g",""))},a.prototype.getLineTokens=function(c,s){if(s&&typeof s!="string"){var u=s.slice(0);s=u[0],s==="#tmp"&&(u.shift(),s=u.shift())}else var u=[];var f=s||"start",h=this.states[f];h||(f="start",h=this.states[f]);var p=this.matchMappings[f],g=this.regExps[f];g.lastIndex=0;for(var w,x=[],S=0,T=0,v={type:null,value:""};w=g.exec(c);){var b=p.defaultToken,y=null,m=w[0],E=g.lastIndex;if(E-m.length>S){var M=c.substring(S,E-m.length);v.type==b?v.value+=M:(v.type&&x.push(v),v={type:b,value:M})}for(var C=0;C<w.length-2;C++)if(w[C+1]!==void 0){y=h[p[C]],y.onMatch?b=y.onMatch(m,f,u,c):b=y.token,y.next&&(typeof y.next=="string"?f=y.next:f=y.next(f,u),h=this.states[f],h||(this.reportError("state doesn't exist",f),f="start",h=this.states[f]),p=this.matchMappings[f],S=E,g=this.regExps[f],g.lastIndex=E),y.consumeLineEnd&&(S=E);break}if(m){if(typeof b=="string")(!y||y.merge!==!1)&&v.type===b?v.value+=m:(v.type&&x.push(v),v={type:b,value:m});else if(b){v.type&&x.push(v),v={type:null,value:""};for(var C=0;C<b.length;C++)x.push(b[C])}}if(S==c.length)break;if(S=E,T++>l){for(T>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:c});S<c.length;)v.type&&x.push(v),v={value:c.substring(S,S+=500),type:"overflow"};f="start",u=[];break}}return v.type&&x.push(v),u.length>1&&u[0]!==f&&u.unshift("#tmp",f),{tokens:x,state:u.length?u:f}},a}();d.prototype.reportError=o.reportError,r.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(n,r,i){var o=n("../lib/lang"),l=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(c,s){if(!s){for(var u in c)this.$rules[u]=c[u];return}for(var u in c){for(var f=c[u],h=0;h<f.length;h++){var p=f[h];(p.next||p.onMatch)&&(typeof p.next=="string"&&p.next.indexOf(s)!==0&&(p.next=s+p.next),p.nextState&&p.nextState.indexOf(s)!==0&&(p.nextState=s+p.nextState))}this.$rules[s+u]=f}},this.getRules=function(){return this.$rules},this.embedRules=function(c,s,u,f,h){var p=typeof c=="function"?new c().getRules():c;if(f)for(var g=0;g<f.length;g++)f[g]=s+f[g];else{f=[];for(var w in p)f.push(s+w)}if(this.addRules(p,s),u)for(var x=Array.prototype[h?"push":"unshift"],g=0;g<f.length;g++)x.apply(this.$rules[f[g]],o.deepCopy(u));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var d=function(c,s){return(c!="start"||s.length)&&s.unshift(this.nextState,c),this.nextState},a=function(c,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var c=0,s=this.$rules;function u(f){var h=s[f];h.processed=!0;for(var p=0;p<h.length;p++){var g=h[p],w=null;Array.isArray(g)&&(w=g,g={}),!g.regex&&g.start&&(g.regex=g.start,g.next||(g.next=[]),g.next.push({defaultToken:g.token},{token:g.token+".end",regex:g.end||g.start,next:"pop"}),g.token=g.token+".start",g.push=!0);var x=g.next||g.push;if(x&&Array.isArray(x)){var S=g.stateName;S||(S=g.token,typeof S!="string"&&(S=S[0]||""),s[S]&&(S+=c++)),s[S]=x,g.next=S,u(S)}else x=="pop"&&(g.next=a);if(g.push&&(g.nextState=g.next||g.push,g.next=d,delete g.push),g.rules)for(var T in g.rules)s[T]?s[T].push&&s[T].push.apply(s[T],g.rules[T]):s[T]=g.rules[T];var v=typeof g=="string"?g:g.include;if(v&&(v==="$self"&&(v="start"),Array.isArray(v)?w=v.map(function(y){return s[y]}):w=s[v]),w){var b=[p,1].concat(w);g.noEscape&&(b=b.filter(function(y){return!y.next})),h.splice.apply(h,b),p--}g.keywordMap&&(g.token=this.createKeywordMapper(g.keywordMap,g.defaultToken||"text",g.caseInsensitive),delete g.defaultToken)}}Object.keys(s).forEach(u,this)},this.createKeywordMapper=function(c,s,u,f){var h=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(p){for(var g=c[p],w=g.split(f||"|"),x=w.length;x--;){var S=w[x];this.$keywordList.push(S),u&&(S=S.toLowerCase()),h[S]=p}},this),c=null,u?function(p){return h[p.toLowerCase()]||s}:function(p){return h[p]||s}},this.getKeywords=function(){return this.$keywords}}).call(l.prototype),r.TextHighlightRules=l}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,i){var o=function(){this.$behaviours={}};(function(){this.add=function(l,d,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[l]:this.$behaviours[l]={}}this.$behaviours[l][d]=a},this.addBehaviours=function(l){for(var d in l)for(var a in l[d])this.add(d,a,l[d][a])},this.remove=function(l){this.$behaviours&&this.$behaviours[l]&&delete this.$behaviours[l]},this.inherit=function(l,d){if(typeof l=="function")var a=new l().getBehaviours(d);else var a=l.getBehaviours(d);this.addBehaviours(a)},this.getBehaviours=function(l){if(l){for(var d={},a=0;a<l.length;a++)this.$behaviours[l[a]]&&(d[l[a]]=this.$behaviours[l[a]]);return d}else return this.$behaviours}}).call(o.prototype),r.Behaviour=o}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,i){var o=n("./range").Range,l=function(){function d(a,c,s){this.$session=a,this.$row=c,this.$rowTokens=a.getTokens(c);var u=a.getTokenAt(c,s);this.$tokenIndex=u?u.index:-1}return d.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},d.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,s=a[c].start;if(s!==void 0)return s;for(s=0;c>0;)c-=1,s+=a[c].value.length;return s},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new o(this.$row,c,this.$row,c+a.value.length)},d}();r.TokenIterator=l}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,i){var o=n("../../lib/oop"),l=n("../behaviour").Behaviour,d=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u,f={},h={'"':'"',"'":"'"},p=function(x){var S=-1;if(x.multiSelect&&(S=x.selection.index,f.rangeCount!=x.multiSelect.rangeCount&&(f={rangeCount:x.multiSelect.rangeCount})),f[S])return u=f[S];u=f[S]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(x,S,T,v){var b=x.end.row-x.start.row;return{text:T+S+v,selection:[0,x.start.column+1,b,x.end.column+(b?0:1)]}},w=function(x){x=x||{},this.add("braces","insertion",function(S,T,v,b,y){var m=v.getCursorPosition(),E=b.doc.getLine(m.row);if(y=="{"){p(v);var M=v.getSelectionRange(),C=b.doc.getTextRange(M);if(C!==""&&C!=="{"&&v.getWrapBehavioursEnabled())return g(M,C,"{","}");if(w.isSaneInsertion(v,b))return/[\]\}\)]/.test(E[m.column])||v.inMultiSelectMode||x.braces?(w.recordAutoInsert(v,b,"}"),{text:"{}",selection:[1,1]}):(w.recordMaybeInsert(v,b,"{"),{text:"{",selection:[1,1]})}else if(y=="}"){p(v);var k=E.substring(m.column,m.column+1);if(k=="}"){var O=b.$findOpeningBracket("}",{column:m.column+1,row:m.row});if(O!==null&&w.isAutoInsertedClosing(m,E,y))return w.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(y==`
`||y==`\r
`){p(v);var R="";w.isMaybeInsertedClosing(m,E)&&(R=a.stringRepeat("}",u.maybeInsertedBrackets),w.clearMaybeInsertedClosing());var k=E.substring(m.column,m.column+1);if(k==="}"){var A=b.findMatchingBracket({row:m.row,column:m.column+1},"}");if(!A)return null;var I=this.$getIndent(b.getLine(A.row))}else if(R)var I=this.$getIndent(E);else{w.clearMaybeInsertedClosing();return}var P=I+b.getTabString();return{text:`
`+P+`
`+I+R,selection:[1,P.length,1,P.length]}}else w.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(S,T,v,b,y){var m=b.doc.getTextRange(y);if(!y.isMultiLine()&&m=="{"){p(v);var E=b.doc.getLine(y.start.row),M=E.substring(y.end.column,y.end.column+1);if(M=="}")return y.end.column++,y;u.maybeInsertedBrackets--}}),this.add("parens","insertion",function(S,T,v,b,y){if(y=="("){p(v);var m=v.getSelectionRange(),E=b.doc.getTextRange(m);if(E!==""&&v.getWrapBehavioursEnabled())return g(m,E,"(",")");if(w.isSaneInsertion(v,b))return w.recordAutoInsert(v,b,")"),{text:"()",selection:[1,1]}}else if(y==")"){p(v);var M=v.getCursorPosition(),C=b.doc.getLine(M.row),k=C.substring(M.column,M.column+1);if(k==")"){var O=b.$findOpeningBracket(")",{column:M.column+1,row:M.row});if(O!==null&&w.isAutoInsertedClosing(M,C,y))return w.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(S,T,v,b,y){var m=b.doc.getTextRange(y);if(!y.isMultiLine()&&m=="("){p(v);var E=b.doc.getLine(y.start.row),M=E.substring(y.start.column+1,y.start.column+2);if(M==")")return y.end.column++,y}}),this.add("brackets","insertion",function(S,T,v,b,y){if(y=="["){p(v);var m=v.getSelectionRange(),E=b.doc.getTextRange(m);if(E!==""&&v.getWrapBehavioursEnabled())return g(m,E,"[","]");if(w.isSaneInsertion(v,b))return w.recordAutoInsert(v,b,"]"),{text:"[]",selection:[1,1]}}else if(y=="]"){p(v);var M=v.getCursorPosition(),C=b.doc.getLine(M.row),k=C.substring(M.column,M.column+1);if(k=="]"){var O=b.$findOpeningBracket("]",{column:M.column+1,row:M.row});if(O!==null&&w.isAutoInsertedClosing(M,C,y))return w.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(S,T,v,b,y){var m=b.doc.getTextRange(y);if(!y.isMultiLine()&&m=="["){p(v);var E=b.doc.getLine(y.start.row),M=E.substring(y.start.column+1,y.start.column+2);if(M=="]")return y.end.column++,y}}),this.add("string_dquotes","insertion",function(S,T,v,b,y){var m=b.$mode.$quotes||h;if(y.length==1&&m[y]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(y)!=-1)return;p(v);var E=y,M=v.getSelectionRange(),C=b.doc.getTextRange(M);if(C!==""&&(C.length!=1||!m[C])&&v.getWrapBehavioursEnabled())return g(M,C,E,E);if(!C){var k=v.getCursorPosition(),O=b.doc.getLine(k.row),R=O.substring(k.column-1,k.column),A=O.substring(k.column,k.column+1),I=b.getTokenAt(k.row,k.column),P=b.getTokenAt(k.row,k.column+1);if(R=="\\"&&I&&/escape/.test(I.type))return null;var z=I&&/string|escape/.test(I.type),B=!P||/string|escape/.test(P.type),V;if(A==E)V=z!==B,V&&/string\.end/.test(P.type)&&(V=!1);else{if(z&&!B||z&&B)return null;var K=b.$mode.tokenRe;K.lastIndex=0;var q=K.test(R);K.lastIndex=0;var re=K.test(A),Y=b.$mode.$pairQuotesAfter,Z=Y&&Y[E]&&Y[E].test(R);if(!Z&&q||re||A&&!/[\s;,.})\]\\]/.test(A))return null;var te=O[k.column-2];if(R==E&&(te==E||K.test(te)))return null;V=!0}return{text:V?E+E:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(S,T,v,b,y){var m=b.$mode.$quotes||h,E=b.doc.getTextRange(y);if(!y.isMultiLine()&&m.hasOwnProperty(E)){p(v);var M=b.doc.getLine(y.start.row),C=M.substring(y.start.column+1,y.start.column+2);if(C==E)return y.end.column++,y}}),x.closeDocComment!==!1&&this.add("doc comment end","insertion",function(S,T,v,b,y){if(S==="doc-start"&&(y===`
`||y===`\r
`)&&v.selection.isEmpty()){var m=v.getCursorPosition(),E=b.doc.getLine(m.row),M=b.doc.getLine(m.row+1),C=this.$getIndent(E);if(/\s*\*/.test(M))return/^\s*\*/.test(E)?{text:y+C+"* ",selection:[1,3+C.length,1,3+C.length]}:{text:y+C+" * ",selection:[1,3+C.length,1,3+C.length]};if(/\/\*\*/.test(E.substring(0,m.column)))return{text:y+C+" * "+y+" "+C+"*/",selection:[1,4+C.length,1,4+C.length]}}})};w.isSaneInsertion=function(x,S){var T=x.getCursorPosition(),v=new d(S,T.row,T.column);if(!this.$matchTokenType(v.getCurrentToken()||"text",c)){if(/[)}\]]/.test(x.session.getLine(T.row)[T.column]))return!0;var b=new d(S,T.row,T.column+1);if(!this.$matchTokenType(b.getCurrentToken()||"text",c))return!1}return v.stepForward(),v.getCurrentTokenRow()!==T.row||this.$matchTokenType(v.getCurrentToken()||"text",s)},w.$matchTokenType=function(x,S){return S.indexOf(x.type||x)>-1},w.recordAutoInsert=function(x,S,T){var v=x.getCursorPosition(),b=S.doc.getLine(v.row);this.isAutoInsertedClosing(v,b,u.autoInsertedLineEnd[0])||(u.autoInsertedBrackets=0),u.autoInsertedRow=v.row,u.autoInsertedLineEnd=T+b.substr(v.column),u.autoInsertedBrackets++},w.recordMaybeInsert=function(x,S,T){var v=x.getCursorPosition(),b=S.doc.getLine(v.row);this.isMaybeInsertedClosing(v,b)||(u.maybeInsertedBrackets=0),u.maybeInsertedRow=v.row,u.maybeInsertedLineStart=b.substr(0,v.column)+T,u.maybeInsertedLineEnd=b.substr(v.column),u.maybeInsertedBrackets++},w.isAutoInsertedClosing=function(x,S,T){return u.autoInsertedBrackets>0&&x.row===u.autoInsertedRow&&T===u.autoInsertedLineEnd[0]&&S.substr(x.column)===u.autoInsertedLineEnd},w.isMaybeInsertedClosing=function(x,S){return u.maybeInsertedBrackets>0&&x.row===u.maybeInsertedRow&&S.substr(x.column)===u.maybeInsertedLineEnd&&S.substr(0,x.column)==u.maybeInsertedLineStart},w.popAutoInsertedClosing=function(){u.autoInsertedLineEnd=u.autoInsertedLineEnd.substr(1),u.autoInsertedBrackets--},w.clearMaybeInsertedClosing=function(){u&&(u.maybeInsertedBrackets=0,u.maybeInsertedRow=-1)},o.inherits(w,l),r.CstyleBehaviour=w}),ace.define("ace/unicode",["require","exports","module"],function(n,r,i){for(var o=[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],l=0,d=[],a=0;a<o.length;a+=2)d.push(l+=o[a]),o[a+1]&&d.push(45,l+=o[a+1]);r.wordChars=String.fromCharCode.apply(null,d)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,r,i){var o=n("../config"),l=n("../tokenizer").Tokenizer,d=n("./text_highlight_rules").TextHighlightRules,a=n("./behaviour/cstyle").CstyleBehaviour,c=n("../unicode"),s=n("../lib/lang"),u=n("../token_iterator").TokenIterator,f=n("../range").Range,h=function(){this.HighlightRules=d};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new l(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(p,g,w,x){var S=g.doc,T=!0,v=!0,b=1/0,y=g.getTabSize(),m=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var C=this.lineCommentStart.map(s.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var C=s.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;C=new RegExp("^(\\s*)(?:"+C+") ?"),m=g.getUseSoftTabs();var R=function(re,Y){var Z=re.match(C);if(Z){var te=Z[1].length,ie=Z[0].length;!P(re,te,ie)&&Z[0][ie-1]==" "&&ie--,S.removeInLine(Y,te,ie)}},I=E+" ",O=function(re,Y){(!T||/\S/.test(re))&&(P(re,b,b)?S.insertInLine({row:Y,column:b},I):S.insertInLine({row:Y,column:b},E))},A=function(re,Y){return C.test(re)},P=function(re,Y,Z){for(var te=0;Y--&&re.charAt(Y)==" ";)te++;if(te%y!=0)return!1;for(var te=0;re.charAt(Z++)==" ";)te++;return y>2?te%y!=y-1:te%y==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,M=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+s.escapeRegExp(E)+")"),k=new RegExp("(?:"+s.escapeRegExp(M)+")\\s*$"),O=function(V,K){A(V,K)||(!T||/\S/.test(V))&&(S.insertInLine({row:K,column:V.length},M),S.insertInLine({row:K,column:b},E))},R=function(V,K){var q;(q=V.match(k))&&S.removeInLine(K,V.length-q[0].length,V.length),(q=V.match(C))&&S.removeInLine(K,q[1].length,q[0].length)},A=function(V,K){if(C.test(V))return!0;for(var q=g.getTokens(K),re=0;re<q.length;re++)if(q[re].type==="comment")return!0}}function z(V){for(var K=w;K<=x;K++)V(S.getLine(K),K)}var B=1/0;z(function(V,K){var q=V.search(/\S/);q!==-1?(q<b&&(b=q),v&&!A(V,K)&&(v=!1)):B>V.length&&(B=V.length)}),b==1/0&&(b=B,T=!1,v=!1),m&&b%y!=0&&(b=Math.floor(b/y)*y),z(v?R:O)},this.toggleBlockComment=function(p,g,w,x){var S=this.blockComment;if(S){!S.start&&S[0]&&(S=S[0]);var T=new u(g,x.row,x.column),v=T.getCurrentToken();g.selection;var b=g.selection.toOrientedRange(),y,m;if(v&&/comment/.test(v.type)){for(var E,M;v&&/comment/.test(v.type);){var C=v.value.indexOf(S.start);if(C!=-1){var k=T.getCurrentTokenRow(),O=T.getCurrentTokenColumn()+C;E=new f(k,O,k,O+S.start.length);break}v=T.stepBackward()}for(var T=new u(g,x.row,x.column),v=T.getCurrentToken();v&&/comment/.test(v.type);){var C=v.value.indexOf(S.end);if(C!=-1){var k=T.getCurrentTokenRow(),O=T.getCurrentTokenColumn()+C;M=new f(k,O,k,O+S.end.length);break}v=T.stepForward()}M&&g.remove(M),E&&(g.remove(E),y=E.start.row,m=-S.start.length)}else m=S.start.length,y=w.start.row,g.insert(w.end,S.end),g.insert(w.start,S.start);b.start.row==y&&(b.start.column+=m),b.end.row==y&&(b.end.column+=m),g.selection.fromOrientedRange(b)}},this.getNextLineIndent=function(p,g,w){return this.$getIndent(g)},this.checkOutdent=function(p,g,w){return!1},this.autoOutdent=function(p,g,w){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var w=p[g],x=w.prototype.$id,S=o.$modes[x];S||(o.$modes[x]=S=new w),o.$modes[g]||(o.$modes[g]=S),this.$embeds.push(g),this.$modes[g]=S}for(var T=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g<T.length;g++)(function(b){var y=T[g],m=b[y];b[T[g]]=function(){return this.$delegator(y,arguments,m)}})(this)},this.$delegator=function(p,g,w){var x=g[0]||"start";if(typeof x!="string"){if(Array.isArray(x[2])){var S=x[2][x[2].length-1],T=this.$modes[S];if(T)return T[p].apply(T,[x[1]].concat([].slice.call(g,1)))}x=x[0]||"start"}for(var v=0;v<this.$embeds.length;v++)if(this.$modes[this.$embeds[v]]){var b=x.split(this.$embeds[v]);if(!b[0]&&b[1]){g[0]=b[1];var T=this.$modes[this.$embeds[v]];return T[p].apply(T,g)}}var y=w.apply(this,g);return w?y:void 0},this.transformAction=function(p,g,w,x,S){if(this.$behaviour){var T=this.$behaviour.getBehaviours();for(var v in T)if(T[v][g]){var b=T[v][g].apply(this,arguments);if(b)return b}}},this.getKeywords=function(p){if(!this.completionKeywords){var g=this.$tokenizer.rules,w=[];for(var x in g)for(var S=g[x],T=0,v=S.length;T<v;T++)if(typeof S[T].token=="string")/keyword|support|storage/.test(S[T].token)&&w.push(S[T].regex);else if(typeof S[T].token=="object"){for(var b=0,y=S[T].token.length;b<y;b++)if(/keyword|support|storage/.test(S[T].token[b])){var x=S[T].regex.match(/\(.+?\)/g)[b];w.push(x.substr(1,x.length-2))}}this.completionKeywords=w}return p?w.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(p,g,w,x){var S=this.$keywordList||this.$createKeywordList();return S.map(function(T){return{name:T,value:T,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),r.Mode=h}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,i){r.applyDelta=function(o,l,d){var a=l.start.row,c=l.start.column,s=o[a]||"";switch(l.action){case"insert":var u=l.lines;if(u.length===1)o[a]=s.substring(0,c)+l.lines[0]+s.substring(c);else{var f=[a,1].concat(l.lines);o.splice.apply(o,f),o[a]=s.substring(0,c)+o[a],o[a+l.lines.length-1]+=s.substring(c)}break;case"remove":var h=l.end.column,p=l.end.row;a===p?o[a]=s.substring(0,c)+s.substring(h):o.splice(a,p-a+1,s.substring(0,c)+o[p].substring(h));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("./lib/oop"),l=n("./lib/event_emitter").EventEmitter,d=function(){function s(u,f,h){this.$onChange=this.onChange.bind(this),this.attach(u),typeof h>"u"?this.setPosition(f.row,f.column):this.setPosition(f,h)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(u){if(!(u.start.row==u.end.row&&u.start.row!=this.row)&&!(u.start.row>this.row)){var f=c(u,{row:this.row,column:this.column},this.$insertRight);this.setPosition(f.row,f.column,!0)}},s.prototype.setPosition=function(u,f,h){var p;if(h?p={row:u,column:f}:p=this.$clipPositionToDocument(u,f),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(u){this.document=u||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(u,f){var h={};return u>=this.document.getLength()?(h.row=Math.max(0,this.document.getLength()-1),h.column=this.document.getLine(h.row).length):u<0?(h.row=0,h.column=0):(h.row=u,h.column=Math.min(this.document.getLine(h.row).length,Math.max(0,f))),f<0&&(h.column=0),h},s}();d.prototype.$insertRight=!1,o.implement(d.prototype,l);function a(s,u,f){var h=f?s.column<=u.column:s.column<u.column;return s.row<u.row||s.row==u.row&&h}function c(s,u,f){var h=s.action=="insert",p=(h?1:-1)*(s.end.row-s.start.row),g=(h?1:-1)*(s.end.column-s.start.column),w=s.start,x=h?w:s.end;return a(u,w,f)?{row:u.row,column:u.column}:a(x,u,!f)?{row:u.row+p,column:u.column+(u.row==x.row?g:0)}:{row:w.row,column:w.column}}r.Anchor=d}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,r,i){var o=n("./lib/oop"),l=n("./apply_delta").applyDelta,d=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,c=n("./anchor").Anchor,s=function(){function u(f){this.$lines=[""],f.length===0?this.$lines=[""]:Array.isArray(f)?this.insertMergedLines({row:0,column:0},f):this.insert({row:0,column:0},f)}return u.prototype.setValue=function(f){var h=this.getLength()-1;this.remove(new a(0,0,h,this.getLine(h).length)),this.insert({row:0,column:0},f||"")},u.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},u.prototype.createAnchor=function(f,h){return new c(this,f,h)},u.prototype.$detectNewLine=function(f){var h=f.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=h?h[1]:`
`,this._signal("changeNewLineMode")},u.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},u.prototype.setNewLineMode=function(f){this.$newLineMode!==f&&(this.$newLineMode=f,this._signal("changeNewLineMode"))},u.prototype.getNewLineMode=function(){return this.$newLineMode},u.prototype.isNewLine=function(f){return f==`\r
`||f=="\r"||f==`
`},u.prototype.getLine=function(f){return this.$lines[f]||""},u.prototype.getLines=function(f,h){return this.$lines.slice(f,h+1)},u.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},u.prototype.getLength=function(){return this.$lines.length},u.prototype.getTextRange=function(f){return this.getLinesForRange(f).join(this.getNewLineCharacter())},u.prototype.getLinesForRange=function(f){var h;if(f.start.row===f.end.row)h=[this.getLine(f.start.row).substring(f.start.column,f.end.column)];else{h=this.getLines(f.start.row,f.end.row),h[0]=(h[0]||"").substring(f.start.column);var p=h.length-1;f.end.row-f.start.row==p&&(h[p]=h[p].substring(0,f.end.column))}return h},u.prototype.insertLines=function(f,h){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(f,h)},u.prototype.removeLines=function(f,h){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(f,h)},u.prototype.insertNewLine=function(f){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(f,["",""])},u.prototype.insert=function(f,h){return this.getLength()<=1&&this.$detectNewLine(h),this.insertMergedLines(f,this.$split(h))},u.prototype.insertInLine=function(f,h){var p=this.clippedPos(f.row,f.column),g=this.pos(f.row,f.column+h.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[h]},!0),this.clonePos(g)},u.prototype.clippedPos=function(f,h){var p=this.getLength();f===void 0?f=p:f<0?f=0:f>=p&&(f=p-1,h=void 0);var g=this.getLine(f);return h==null&&(h=g.length),h=Math.min(Math.max(h,0),g.length),{row:f,column:h}},u.prototype.clonePos=function(f){return{row:f.row,column:f.column}},u.prototype.pos=function(f,h){return{row:f,column:h}},u.prototype.$clipPosition=function(f){var h=this.getLength();return f.row>=h?(f.row=Math.max(0,h-1),f.column=this.getLine(h-1).length):(f.row=Math.max(0,f.row),f.column=Math.min(Math.max(f.column,0),this.getLine(f.row).length)),f},u.prototype.insertFullLines=function(f,h){f=Math.min(Math.max(f,0),this.getLength());var p=0;f<this.getLength()?(h=h.concat([""]),p=0):(h=[""].concat(h),f--,p=this.$lines[f].length),this.insertMergedLines({row:f,column:p},h)},u.prototype.insertMergedLines=function(f,h){var p=this.clippedPos(f.row,f.column),g={row:p.row+h.length-1,column:(h.length==1?p.column:0)+h[h.length-1].length};return this.applyDelta({start:p,end:g,action:"insert",lines:h}),this.clonePos(g)},u.prototype.remove=function(f){var h=this.clippedPos(f.start.row,f.start.column),p=this.clippedPos(f.end.row,f.end.column);return this.applyDelta({start:h,end:p,action:"remove",lines:this.getLinesForRange({start:h,end:p})}),this.clonePos(h)},u.prototype.removeInLine=function(f,h,p){var g=this.clippedPos(f,h),w=this.clippedPos(f,p);return this.applyDelta({start:g,end:w,action:"remove",lines:this.getLinesForRange({start:g,end:w})},!0),this.clonePos(g)},u.prototype.removeFullLines=function(f,h){f=Math.min(Math.max(0,f),this.getLength()-1),h=Math.min(Math.max(0,h),this.getLength()-1);var p=h==this.getLength()-1&&f>0,g=h<this.getLength()-1,w=p?f-1:f,x=p?this.getLine(w).length:0,S=g?h+1:h,T=g?0:this.getLine(S).length,v=new a(w,x,S,T),b=this.$lines.slice(f,h+1);return this.applyDelta({start:v.start,end:v.end,action:"remove",lines:this.getLinesForRange(v)}),b},u.prototype.removeNewLine=function(f){f<this.getLength()-1&&f>=0&&this.applyDelta({start:this.pos(f,this.getLine(f).length),end:this.pos(f+1,0),action:"remove",lines:["",""]})},u.prototype.replace=function(f,h){if(f instanceof a||(f=a.fromPoints(f.start,f.end)),h.length===0&&f.isEmpty())return f.start;if(h==this.getTextRange(f))return f.end;this.remove(f);var p;return h?p=this.insert(f.start,h):p=f.start,p},u.prototype.applyDeltas=function(f){for(var h=0;h<f.length;h++)this.applyDelta(f[h])},u.prototype.revertDeltas=function(f){for(var h=f.length-1;h>=0;h--)this.revertDelta(f[h])},u.prototype.applyDelta=function(f,h){var p=f.action=="insert";(p?f.lines.length<=1&&!f.lines[0]:!a.comparePoints(f.start,f.end))||(p&&f.lines.length>2e4?this.$splitAndapplyLargeDelta(f,2e4):(l(this.$lines,f,h),this._signal("change",f)))},u.prototype.$safeApplyDelta=function(f){var h=this.$lines.length;(f.action=="remove"&&f.start.row<h&&f.end.row<h||f.action=="insert"&&f.start.row<=h)&&this.applyDelta(f)},u.prototype.$splitAndapplyLargeDelta=function(f,h){for(var p=f.lines,g=p.length-h+1,w=f.start.row,x=f.start.column,S=0,T=0;S<g;S=T){T+=h-1;var v=p.slice(S,T);v.push(""),this.applyDelta({start:this.pos(w+S,x),end:this.pos(w+T,x=0),action:f.action,lines:v},!0)}f.lines=p.slice(S),f.start.row=w+S,f.start.column=x,this.applyDelta(f,!0)},u.prototype.revertDelta=function(f){this.$safeApplyDelta({start:this.clonePos(f.start),end:this.clonePos(f.end),action:f.action=="insert"?"remove":"insert",lines:f.lines.slice()})},u.prototype.indexToPosition=function(f,h){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,w=h||0,x=p.length;w<x;w++)if(f-=p[w].length+g,f<0)return{row:w,column:f+p[w].length+g};return{row:x-1,column:f+p[x-1].length+g}},u.prototype.positionToIndex=function(f,h){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,w=0,x=Math.min(f.row,p.length),S=h||0;S<x;++S)w+=p[S].length+g;return w+f.column},u.prototype.$split=function(f){return f.split(/\r\n|\r|\n/)},u}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",o.implement(s.prototype,d),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("./lib/oop"),l=n("./lib/event_emitter").EventEmitter,d=function(){function a(c,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var u=this;this.$worker=function(){if(u.running){for(var f=new Date,h=u.currentLine,p=-1,g=u.doc,w=h;u.lines[h];)h++;var x=g.getLength(),S=0;for(u.running=!1;h<x;){u.$tokenizeRow(h),p=h;do h++;while(u.lines[h]);if(S++,S%5===0&&new Date-f>20){u.running=setTimeout(u.$worker,20);break}}u.currentLine=h,p==-1&&(p=h),w<=p&&u.fireUpdateEvent(w,p)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,s){var u={first:c,last:s};this._signal("update",{data:u})},a.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)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var s=c.start.row,u=c.end.row-s;if(u===0)this.lines[s]=null;else if(c.action=="remove")this.lines.splice(s,u+1,null),this.states.splice(s,u+1,null);else{var f=Array(u+1);f.unshift(s,1),this.lines.splice.apply(this.lines,f),this.states.splice.apply(this.states,f)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var s=this.doc.getLine(c),u=this.states[c-1],f=this.tokenizer.getLineTokens(s,u,c);return this.states[c]+""!=f.state+""?(this.states[c]=f.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=f.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();o.implement(d.prototype,l),r.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,i){var o=n("./lib/lang"),l=n("./range").Range,d=function(){function a(c,s,u){u===void 0&&(u="text"),this.setRegexp(c),this.clazz=s,this.type=u}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,s,u,f){if(this.regExp)for(var h=f.firstRow,p=f.lastRow,g={},w=h;w<=p;w++){var x=this.cache[w];x==null&&(x=o.getMatchOffsets(u.getLine(w),this.regExp),x.length>this.MAX_RANGES&&(x=x.slice(0,this.MAX_RANGES)),x=x.map(function(b){return new l(w,b.offset,w,b.offset+b.length)}),this.cache[w]=x.length?x:"");for(var S=x.length;S--;){var T=x[S].toScreenRange(u),v=T.toString();g[v]||(g[v]=!0,s.drawSingleLineMarker(c,T,this.clazz,f))}}},a}();d.prototype.MAX_RANGES=500,r.SearchHighlight=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,l=function(){function d(a,c){this.foldData=a,Array.isArray(c)?this.folds=c:c=this.folds=[c];var s=c[c.length-1];this.range=new o(c[0].start.row,c[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(u){u.setFoldLine(this)},this)}return d.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(c){c.start.row+=a,c.end.row+=a})},d.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,s){return-c.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},d.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},d.prototype.walk=function(a,c,s){var u=0,f=this.folds,h,p,g,w=!0;c==null&&(c=this.end.row,s=this.end.column);for(var x=0;x<f.length;x++){if(h=f[x],p=h.range.compareStart(c,s),p==-1){a(null,c,s,u,w);return}if(g=a(null,h.start.row,h.start.column,u,w),g=!g&&a(h.placeholder,h.start.row,h.start.column,u),g||p===0)return;w=!h.sameRow,u=h.end.column}a(null,c,s,u,w)},d.prototype.getNextFoldTo=function(a,c){for(var s,u,f=0;f<this.folds.length;f++){if(s=this.folds[f],u=s.range.compareEnd(a,c),u==-1)return{fold:s,kind:"after"};if(u===0)return{fold:s,kind:"inside"}}return null},d.prototype.addRemoveChars=function(a,c,s){var u=this.getNextFoldTo(a,c),f,h;if(u){if(f=u.fold,u.kind=="inside"&&f.start.column!=c&&f.start.row!=a)window.console&&window.console.log(a,c,f);else if(f.start.row==a){h=this.folds;var p=h.indexOf(f);for(p===0&&(this.start.column+=s),p;p<h.length;p++){if(f=h[p],f.start.column+=s,!f.sameRow)return;f.end.column+=s}this.end.column+=s}}},d.prototype.split=function(a,c){var s=this.getNextFoldTo(a,c);if(!s||s.kind=="inside")return null;var u=s.fold,f=this.folds,h=this.foldData,p=f.indexOf(u),g=f[p-1];this.end.row=g.end.row,this.end.column=g.end.column,f=f.splice(p,f.length-p);var w=new d(h,f);return h.splice(h.indexOf(this)+1,0,w),w},d.prototype.merge=function(a){for(var c=a.folds,s=0;s<c.length;s++)this.addFold(c[s]);var u=this.foldData;u.splice(u.indexOf(a),1)},d.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(c){a.push(" "+c.toString())}),a.push("]"),a.join(`
`)},d.prototype.idxToPosition=function(a){for(var c=0,s=0;s<this.folds.length;s++){var u=this.folds[s];if(a-=u.start.column-c,a<0)return{row:u.start.row,column:u.start.column+a};if(a-=u.placeholder.length,a<0)return u.start;c=u.end.column}return{row:this.end.row,column:this.end.column+a}},d}();r.FoldLine=l}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,i){var o=n("./range").Range,l=o.comparePoints,d=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(c,s,u){for(var f=this.ranges,h=u||0;h<f.length;h++){var p=f[h],g=l(c,p.end);if(!(g>0)){var w=l(c,p.start);return g===0?s&&w!==0?-h-2:h:w>0||w===0&&!s?h:-h-1}}return-h-1},a.prototype.add=function(c){var s=!c.isEmpty(),u=this.pointIndex(c.start,s);u<0&&(u=-u-1);var f=this.pointIndex(c.end,s,u);return f<0?f=-f-1:f++,this.ranges.splice(u,f-u,c)},a.prototype.addList=function(c){for(var s=[],u=c.length;u--;)s.push.apply(s,this.add(c[u]));return s},a.prototype.substractPoint=function(c){var s=this.pointIndex(c);if(s>=0)return this.ranges.splice(s,1)},a.prototype.merge=function(){var c=[],s=this.ranges;s=s.sort(function(g,w){return l(g.start,w.start)});for(var u=s[0],f,h=1;h<s.length;h++){f=u,u=s[h];var p=l(f.end,u.start);p<0||p==0&&!f.isEmpty()&&!u.isEmpty()||(l(f.end,u.end)<0&&(f.end.row=u.end.row,f.end.column=u.end.column),s.splice(h,1),c.push(u),u=f,h--)}return this.ranges=s,c},a.prototype.contains=function(c,s){return this.pointIndex({row:c,column:s})>=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var s=this.pointIndex(c);if(s>=0)return this.ranges[s]},a.prototype.clipRows=function(c,s){var u=this.ranges;if(u[0].start.row>s||u[u.length-1].start.row<c)return[];var f=this.pointIndex({row:c,column:0});f<0&&(f=-f-1);var h=this.pointIndex({row:s,column:0},f);h<0&&(h=-h-1);for(var p=[],g=f;g<h;g++)p.push(u[g]);return p},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(c){for(var s=c.start,u=c.end,f=s.row,h=u.row,p=this.ranges,g=0,w=p.length;g<w;g++){var x=p[g];if(x.end.row>=f)break}if(c.action=="insert")for(var S=h-f,T=-s.column+u.column;g<w;g++){var x=p[g];if(x.start.row>f)break;if(x.start.row==f&&x.start.column>=s.column&&(x.start.column==s.column&&this.$bias<=0||(x.start.column+=T,x.start.row+=S)),x.end.row==f&&x.end.column>=s.column){if(x.end.column==s.column&&this.$bias<0)continue;x.end.column==s.column&&T>0&&g<w-1&&x.end.column>x.start.column&&x.end.column==p[g+1].start.column&&(x.end.column-=T),x.end.column+=T,x.end.row+=S}}else for(var S=f-h,T=s.column-u.column;g<w;g++){var x=p[g];if(x.start.row>h)break;x.end.row<h&&(f<x.end.row||f==x.end.row&&s.column<x.end.column)?(x.end.row=f,x.end.column=s.column):x.end.row==h?x.end.column<=u.column?(S||x.end.column>s.column)&&(x.end.column=s.column,x.end.row=s.row):(x.end.column+=T,x.end.row+=S):x.end.row>h&&(x.end.row+=S),x.start.row<h&&(f<x.start.row||f==x.start.row&&s.column<x.start.column)?(x.start.row=f,x.start.column=s.column):x.start.row==h?x.start.column<=u.column?(S||x.start.column>s.column)&&(x.start.column=s.column,x.start.row=s.row):(x.start.column+=T,x.start.row+=S):x.start.row>h&&(x.start.row+=S)}if(S!=0&&g<w)for(;g<w;g++){var x=p[g];x.start.row+=S,x.end.row+=S}},a}();d.prototype.comparePoints=l,r.RangeList=d}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,i){var o=this&&this.__extends||function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,w){g.__proto__=w}||function(g,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(g[x]=w[x])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),l=n("../range_list").RangeList,d=function(f){o(h,f);function h(p,g){var w=f.call(this)||this;return w.foldLine=null,w.placeholder=g,w.range=p,w.start=p.start,w.end=p.end,w.sameRow=p.start.row==p.end.row,w.subFolds=w.ranges=[],w}return h.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},h.prototype.setFoldLine=function(p){this.foldLine=p,this.subFolds.forEach(function(g){g.setFoldLine(p)})},h.prototype.clone=function(){var p=this.range.clone(),g=new h(p,this.placeholder);return this.subFolds.forEach(function(w){g.subFolds.push(w.clone())}),g.collapseChildren=this.collapseChildren,g},h.prototype.addSubFold=function(p){if(!this.range.isEqual(p)){c(p,this.start);for(var T=p.start.row,v=p.start.column,g=0,w=-1;g<this.subFolds.length&&(w=this.subFolds[g].range.compare(T,v),w==1);g++);var x=this.subFolds[g],S=0;if(w==0){if(x.range.containsRange(p))return x.addSubFold(p);S=1}for(var T=p.range.end.row,v=p.range.end.column,b=g,w=-1;b<this.subFolds.length&&(w=this.subFolds[b].range.compare(T,v),w==1);b++);w==0&&b++;for(var y=this.subFolds.splice(g,b-g,p),m=w==0?y.length-1:y.length,E=S;E<m;E++)p.addSubFold(y[E]);return p.setFoldLine(this.foldLine),p}},h.prototype.restoreRange=function(p){return u(p,this.start)},h}(l);function a(f,h){f.row-=h.row,f.row==0&&(f.column-=h.column)}function c(f,h){a(f.start,h),a(f.end,h)}function s(f,h){f.row==0&&(f.column+=h.column),f.row+=h.row}function u(f,h){s(f.start,h),s(f.end,h)}r.Fold=d}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,i){var o=n("../range").Range,l=n("./fold_line").FoldLine,d=n("./fold").Fold,a=n("../token_iterator").TokenIterator,c=n("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(u,f,h){var p=this.getFoldLine(u);if(!p)return null;for(var g=p.folds,w=0;w<g.length;w++){var x=g[w].range;if(x.contains(u,f)){if(h==1&&x.isEnd(u,f)&&!x.isEmpty())continue;if(h==-1&&x.isStart(u,f)&&!x.isEmpty())continue;return g[w]}}},this.getFoldsInRange=function(u){var f=u.start,h=u.end,p=this.$foldData,g=[];f.column+=1,h.column-=1;for(var w=0;w<p.length;w++){var x=p[w].range.compareRange(u);if(x!=2){if(x==-2)break;for(var S=p[w].folds,T=0;T<S.length;T++){var v=S[T];if(x=v.range.compareRange(u),x==-2)break;if(x==2)continue;if(x==42)break;g.push(v)}}}return f.column-=1,h.column+=1,g},this.getFoldsInRangeList=function(u){if(Array.isArray(u)){var f=[];u.forEach(function(h){f=f.concat(this.getFoldsInRange(h))},this)}else var f=this.getFoldsInRange(u);return f},this.getAllFolds=function(){for(var u=[],f=this.$foldData,h=0;h<f.length;h++)for(var p=0;p<f[h].folds.length;p++)u.push(f[h].folds[p]);return u},this.getFoldStringAt=function(u,f,h,p){if(p=p||this.getFoldLine(u),!p)return null;for(var g={end:{column:0}},w,x,S=0;S<p.folds.length;S++){x=p.folds[S];var T=x.range.compareEnd(u,f);if(T==-1){w=this.getLine(x.start.row).substring(g.end.column,x.start.column);break}else if(T===0)return null;g=x}return w||(w=this.getLine(x.start.row).substring(g.end.column)),h==-1?w.substring(0,f-g.end.column):h==1?w.substring(f-g.end.column):w},this.getFoldLine=function(u,f){var h=this.$foldData,p=0;for(f&&(p=h.indexOf(f)),p==-1&&(p=0),p;p<h.length;p++){var g=h[p];if(g.start.row<=u&&g.end.row>=u)return g;if(g.end.row>u)return null}return null},this.getNextFoldLine=function(u,f){var h=this.$foldData,p=0;for(f&&(p=h.indexOf(f)),p==-1&&(p=0),p;p<h.length;p++){var g=h[p];if(g.end.row>=u)return g}return null},this.getFoldedRowCount=function(u,f){for(var h=this.$foldData,p=f-u+1,g=0;g<h.length;g++){var w=h[g],x=w.end.row,S=w.start.row;if(x>=f){S<f&&(S>=u?p-=f-S:p=0);break}else x>=u&&(S>=u?p-=x-S:p-=x-u+1)}return p},this.$addFoldLine=function(u){return this.$foldData.push(u),this.$foldData.sort(function(f,h){return f.start.row-h.start.row}),u},this.addFold=function(u,f){var h=this.$foldData,p=!1,g;u instanceof d?g=u:(g=new d(f,u),g.collapseChildren=f.collapseChildren),this.$clipRangeToDocument(g.range);var w=g.start.row,x=g.start.column,S=g.end.row,T=g.end.column,v=this.getFoldAt(w,x,1),b=this.getFoldAt(S,T,-1);if(v&&b==v)return v.addSubFold(g);v&&!v.range.isStart(w,x)&&this.removeFold(v),b&&!b.range.isEnd(S,T)&&this.removeFold(b);var y=this.getFoldsInRange(g.range);y.length>0&&(this.removeFolds(y),g.collapseChildren||y.forEach(function(C){g.addSubFold(C)}));for(var m=0;m<h.length;m++){var E=h[m];if(S==E.start.row){E.addFold(g),p=!0;break}else if(w==E.end.row){if(E.addFold(g),p=!0,!g.sameRow){var M=h[m+1];if(M&&M.start.row==S){E.merge(M);break}}break}else if(S<=E.start.row)break}return p||(E=this.$addFoldLine(new l(this.$foldData,g))),this.$useWrapMode?this.$updateWrapData(E.start.row,E.start.row):this.$updateRowLengthCache(E.start.row,E.start.row),this.$modified=!0,this._signal("changeFold",{data:g,action:"add"}),g},this.addFolds=function(u){u.forEach(function(f){this.addFold(f)},this)},this.removeFold=function(u){var f=u.foldLine,h=f.start.row,p=f.end.row,g=this.$foldData,w=f.folds;if(w.length==1)g.splice(g.indexOf(f),1);else if(f.range.isEnd(u.end.row,u.end.column))w.pop(),f.end.row=w[w.length-1].end.row,f.end.column=w[w.length-1].end.column;else if(f.range.isStart(u.start.row,u.start.column))w.shift(),f.start.row=w[0].start.row,f.start.column=w[0].start.column;else if(u.sameRow)w.splice(w.indexOf(u),1);else{var x=f.split(u.start.row,u.start.column);w=x.folds,w.shift(),x.start.row=w[0].start.row,x.start.column=w[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(h,p):this.$updateRowLengthCache(h,p)),this.$modified=!0,this._signal("changeFold",{data:u,action:"remove"})},this.removeFolds=function(u){for(var f=[],h=0;h<u.length;h++)f.push(u[h]);f.forEach(function(p){this.removeFold(p)},this),this.$modified=!0},this.expandFold=function(u){this.removeFold(u),u.subFolds.forEach(function(f){u.restoreRange(f),this.addFold(f)},this),u.collapseChildren>0&&this.foldAll(u.start.row+1,u.end.row,u.collapseChildren-1),u.subFolds=[]},this.expandFolds=function(u){u.forEach(function(f){this.expandFold(f)},this)},this.unfold=function(u,f){var h,p;if(u==null)h=new o(0,0,this.getLength(),0),f==null&&(f=!0);else if(typeof u=="number")h=new o(u,0,u,this.getLine(u).length);else if("row"in u)h=o.fromPoints(u,u);else{if(Array.isArray(u))return p=[],u.forEach(function(w){p=p.concat(this.unfold(w))},this),p;h=u}p=this.getFoldsInRangeList(h);for(var g=p;p.length==1&&o.comparePoints(p[0].start,h.start)<0&&o.comparePoints(p[0].end,h.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(h);if(f!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(u,f){return!!this.getFoldLine(u,f)},this.getRowFoldEnd=function(u,f){var h=this.getFoldLine(u,f);return h?h.end.row:u},this.getRowFoldStart=function(u,f){var h=this.getFoldLine(u,f);return h?h.start.row:u},this.getFoldDisplayLine=function(u,f,h,p,g){p==null&&(p=u.start.row),g==null&&(g=0),f==null&&(f=u.end.row),h==null&&(h=this.getLine(f).length);var w=this.doc,x="";return u.walk(function(S,T,v,b){if(!(T<p)){if(T==p){if(v<g)return;b=Math.max(g,b)}S!=null?x+=S:x+=w.getLine(T).substring(b,v)}},f,h),x},this.getDisplayLine=function(u,f,h,p){var g=this.getFoldLine(u);if(g)return this.getFoldDisplayLine(g,u,f,h,p);var w;return w=this.doc.getLine(u),w.substring(p||0,f||w.length)},this.$cloneFoldData=function(){var u=[];return u=this.$foldData.map(function(f){var h=f.folds.map(function(p){return p.clone()});return new l(u,h)}),u},this.toggleFold=function(u){var f=this.selection,h=f.getRange(),p,g;if(h.isEmpty()){var w=h.start;if(p=this.getFoldAt(w.row,w.column),p){this.expandFold(p);return}else(g=this.findMatchingBracket(w))?h.comparePoint(g)==1?h.end=g:(h.start=g,h.start.column++,h.end.column--):(g=this.findMatchingBracket({row:w.row,column:w.column+1}))?(h.comparePoint(g)==1?h.end=g:h.start=g,h.start.column++):h=this.getCommentFoldRange(w.row,w.column)||h}else{var x=this.getFoldsInRange(h);if(u&&x.length){this.expandFolds(x);return}else x.length==1&&(p=x[0])}if(p||(p=this.getFoldAt(h.start.row,h.start.column)),p&&p.range.toString()==h.toString()){this.expandFold(p);return}var S="...";if(!h.isMultiLine()){if(S=this.getTextRange(h),S.length<4)return;S=S.trim().substring(0,2)+".."}this.addFold(S,h)},this.getCommentFoldRange=function(u,f,h){var p=new a(this,u,f),g=p.getCurrentToken(),w=g&&g.type;if(g&&/^comment|string/.test(w)){w=w.match(/comment|string/)[0],w=="comment"&&(w+="|doc-start");var x=new RegExp(w),S=new o;if(h!=1){do g=p.stepBackward();while(g&&x.test(g.type)&&!/^comment.end/.test(g.type));g=p.stepForward()}if(S.start.row=p.getCurrentTokenRow(),S.start.column=p.getCurrentTokenColumn()+(/^comment.start/.test(g.type)?g.value.length:2),p=new a(this,u,f),h!=-1){var T=-1;do if(g=p.stepForward(),T==-1){var v=this.getState(p.$row);x.test(v)||(T=p.$row)}else if(p.$row>T)break;while(g&&x.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return S.end.row=p.getCurrentTokenRow(),S.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(S.end.column+=g.value.length-2),S}},this.foldAll=function(u,f,h,p){h==null&&(h=1e5);var g=this.foldWidgets;if(g){f=f||this.getLength(),u=u||0;for(var w=u;w<f;w++)if(g[w]==null&&(g[w]=this.getFoldWidget(w)),g[w]=="start"&&!(p&&!p(w))){var x=this.getFoldWidgetRange(w);x&&x.isMultiLine()&&x.end.row<=f&&x.start.row>=u&&(w=x.end.row,x.collapseChildren=h,this.addFold("...",x))}}},this.foldToLevel=function(u){for(this.foldAll();u-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var u=this;this.foldAll(null,null,null,function(f){for(var h=u.getTokens(f),p=0;p<h.length;p++){var g=h[p];if(!(g.type=="text"&&/^\s+$/.test(g.value)))return!!/comment/.test(g.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(u){if(!this.$foldStyles[u])throw new Error("invalid fold style: "+u+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=u){this.$foldStyle=u,u=="manual"&&this.unfold();var f=this.$foldMode;this.$setFolding(null),this.$setFolding(f)}},this.$setFolding=function(u){if(this.$foldMode!=u){if(this.$foldMode=u,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!u||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=u.getFoldWidget.bind(u,this,this.$foldStyle),this.getFoldWidgetRange=u.getFoldWidgetRange.bind(u,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(u,f){var h=this.foldWidgets;if(!h||f&&h[u])return{};for(var p=u-1,g;p>=0;){var w=h[p];if(w==null&&(w=h[p]=this.getFoldWidget(p)),w=="start"){var x=this.getFoldWidgetRange(p);if(g||(g=x),x&&x.end.row>=u)break}p--}return{range:p!==-1&&x,firstRange:g}},this.onFoldWidgetClick=function(u,f){f instanceof c&&(f=f.domEvent);var h={children:f.shiftKey,all:f.ctrlKey||f.metaKey,siblings:f.altKey},p=this.$toggleFoldWidget(u,h);if(!p){var g=f.target||f.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(u,f){if(this.getFoldWidget){var h=this.getFoldWidget(u),p=this.getLine(u),g=h==="end"?-1:1,w=this.getFoldAt(u,g===-1?0:p.length,g);if(w)return f.children||f.all?this.removeFold(w):this.expandFold(w),w;var x=this.getFoldWidgetRange(u,!0);if(x&&!x.isMultiLine()&&(w=this.getFoldAt(x.start.row,x.start.column,1),w&&x.isEqual(w.range)))return this.removeFold(w),w;if(f.siblings){var S=this.getParentFoldRangeData(u);if(S.range)var T=S.range.start.row+1,v=S.range.end.row;this.foldAll(T,v,f.all?1e4:0)}else f.children?(v=x?x.end.row:this.getLength(),this.foldAll(u+1,v,f.all?1e4:0)):x&&(f.all&&(x.collapseChildren=1e4),this.addFold("...",x));return x}},this.toggleFoldWidget=function(u){var f=this.selection.getCursor().row;f=this.getRowFoldStart(f);var h=this.$toggleFoldWidget(f,{});if(!h){var p=this.getParentFoldRangeData(f,!0);if(h=p.range||p.firstRange,h){f=h.start.row;var g=this.getFoldAt(f,this.getLine(f).length,1);g?this.removeFold(g):this.addFold("...",h)}}},this.updateFoldWidgets=function(u){var f=u.start.row,h=u.end.row-f;if(h===0)this.foldWidgets[f]=null;else if(u.action=="remove")this.foldWidgets.splice(f,h+1,null);else{var p=Array(h+1);p.unshift(f,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(u){var f=u.data;f.first!=f.last&&this.foldWidgets.length>f.first&&this.foldWidgets.splice(f.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,i){var o=n("../token_iterator").TokenIterator,l=n("../range").Range;function d(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var s=c||this.getLine(a.row).charAt(a.column-1);if(s=="")return null;var u=s.match(/([\(\[\{])|([\)\]\}])/);return u?u[1]?this.$findClosingBracket(u[1],a):this.$findOpeningBracket(u[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),s=!0,u,f=c.charAt(a.column-1),h=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(h||(f=c.charAt(a.column),a={row:a.row,column:a.column+1},h=f&&f.match(/([\(\[\{])|([\)\]\}])/),s=!1),!h)return null;if(h[1]){var p=this.$findClosingBracket(h[1],a);if(!p)return null;u=l.fromPoints(a,p),s||(u.end.column++,u.start.column--),u.cursor=u.end}else{var p=this.$findOpeningBracket(h[2],a);if(!p)return null;u=l.fromPoints(p,a),s||(u.start.column++,u.end.column--),u.cursor=u.start}return u},this.getMatchingBracketRanges=function(a,c){var s=this.getLine(a.row),u=/([\(\[\{])|([\)\]\}])/,f=!c&&s.charAt(a.column-1),h=f&&f.match(u);if(h||(f=(c===void 0||c)&&s.charAt(a.column),a={row:a.row,column:a.column+1},h=f&&f.match(u)),!h)return null;var p=new l(a.row,a.column-1,a.row,a.column),g=h[1]?this.$findClosingBracket(h[1],a):this.$findOpeningBracket(h[2],a);if(!g)return[p];var w=new l(g.row,g.column,g.row,g.column+1);return[p,w]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,s){var u=this.$brackets[a],f=1,h=new o(this,c.row,c.column),p=h.getCurrentToken();if(p||(p=h.stepForward()),!!p){s||(s=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=c.column-h.getCurrentTokenColumn()-2,w=p.value;;){for(;g>=0;){var x=w.charAt(g);if(x==u){if(f-=1,f==0)return{row:h.getCurrentTokenRow(),column:g+h.getCurrentTokenColumn()}}else x==a&&(f+=1);g-=1}do p=h.stepBackward();while(p&&!s.test(p.type));if(p==null)break;w=p.value,g=w.length-1}return null}},this.$findClosingBracket=function(a,c,s){var u=this.$brackets[a],f=1,h=new o(this,c.row,c.column),p=h.getCurrentToken();if(p||(p=h.stepForward()),!!p){s||(s=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=c.column-h.getCurrentTokenColumn();;){for(var w=p.value,x=w.length;g<x;){var S=w.charAt(g);if(S==u){if(f-=1,f==0)return{row:h.getCurrentTokenRow(),column:g+h.getCurrentTokenColumn()}}else S==a&&(f+=1);g+=1}do p=h.stepForward();while(p&&!s.test(p.type));if(p==null)break;g=0}return null}},this.getMatchingTags=function(a){var c=new o(this,a.row,a.column),s=this.$findTagName(c);if(s){var u=c.stepBackward();return u.value==="<"?this.$findClosingTag(c,s):this.$findOpeningTag(c,s)}},this.$findTagName=function(a){var c=a.getCurrentToken(),s=!1,u=!1;if(c&&c.type.indexOf("tag-name")===-1)do u?c=a.stepBackward():c=a.stepForward(),c&&(c.value==="/>"?u=!0:c.type.indexOf("tag-name")!==-1&&(s=!0));while(c&&!s);return c},this.$findClosingTag=function(a,c){var s,u=c.value,f=c.value,h=0,p=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var g=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),w=!1;do if(s=c,c=a.stepForward(),c){if(c.value===">"&&!w){var x=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);w=!0}if(c.type.indexOf("tag-name")!==-1){if(u=c.value,f===u){if(s.value==="<")h++;else if(s.value==="</"&&(h--,h<0)){a.stepBackward();var S=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);c=a.stepForward();var T=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),c&&c.value===">")var v=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(f===u&&c.value==="/>"&&(h--,h<0))var S=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),T=S,v=T,x=new l(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(c&&h>=0);if(p&&x&&S&&v&&g&&T)return{openTag:new l(p.start.row,p.start.column,x.end.row,x.end.column),closeTag:new l(S.start.row,S.start.column,v.end.row,v.end.column),openTagName:g,closeTagName:T}},this.$findOpeningTag=function(a,c){var s=a.getCurrentToken(),u=c.value,f=0,h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,w=new l(h,p,h,g);a.stepForward();var x=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),!(!c||c.value!==">")){var S=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=s,h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+c.value.length,s=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(u===c.value)if(s.value==="<"){if(f++,f>0){var T=new l(h,p,h,g),v=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var b=new l(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else s.value==="</"&&f--}else if(c.value==="/>"){for(var y=0,m=s;m;){if(m.type.indexOf("tag-name")!==-1&&m.value===u){f--;break}else if(m.value==="<")break;m=a.stepBackward(),y++}for(var E=0;E<y;E++)a.stepForward()}}while(s&&f<=0);if(v&&b&&w&&S&&T&&x)return{openTag:new l(v.start.row,v.start.column,b.end.row,b.end.column),closeTag:new l(w.start.row,w.start.column,S.end.row,S.end.column),openTagName:T,closeTagName:x}}}}r.BracketMatch=d}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,r,i){var o=n("./lib/oop"),l=n("./lib/lang"),d=n("./bidihandler").BidiHandler,a=n("./config"),c=n("./lib/event_emitter").EventEmitter,s=n("./selection").Selection,u=n("./mode/text").Mode,f=n("./range").Range,h=n("./document").Document,p=n("./background_tokenizer").BackgroundTokenizer,g=n("./search_highlight").SearchHighlight,w=function(){function C(k,O){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++C.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new p(new u().getTokenizer(),this);var R=this;this.bgTokenizer.on("update",function(A){R._signal("tokenizerUpdate",A)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof k!="object"||!k.getLine)&&(k=new h(k)),this.setDocument(k),this.selection=new s(this),this.$bidiHandler=new d(this),a.resetOptions(this),this.setMode(O),a._signal("session",this),this.destroyed=!1}return C.prototype.setDocument=function(k){this.doc&&this.doc.off("change",this.$onChange),this.doc=k,k.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},C.prototype.getDocument=function(){return this.doc},C.prototype.$resetRowCache=function(k){if(!k){this.$docRowCache=[],this.$screenRowCache=[];return}var O=this.$docRowCache.length,R=this.$getRowCacheIndex(this.$docRowCache,k)+1;O>R&&(this.$docRowCache.splice(R,O),this.$screenRowCache.splice(R,O))},C.prototype.$getRowCacheIndex=function(k,O){for(var R=0,A=k.length-1;R<=A;){var I=R+A>>1,P=k[I];if(O>P)R=I+1;else if(O<P)A=I-1;else return I}return R-1},C.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},C.prototype.onChangeFold=function(k){var O=k.data;this.$resetRowCache(O.start.row)},C.prototype.onChange=function(k){this.$modified=!0,this.$bidiHandler.onChange(k),this.$resetRowCache(k.start.row);var O=this.$updateInternalDataOnChange(k);!this.$fromUndo&&this.$undoManager&&(O&&O.length&&(this.$undoManager.add({action:"removeFolds",folds:O},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(k,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(k),this._signal("change",k)},C.prototype.setValue=function(k){this.doc.setValue(k),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},C.prototype.toString=function(){return this.doc.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.getState=function(k){return this.bgTokenizer.getState(k)},C.prototype.getTokens=function(k){return this.bgTokenizer.getTokens(k)},C.prototype.getTokenAt=function(k,O){var R=this.bgTokenizer.getTokens(k),A,I=0;if(O==null){var P=R.length-1;I=this.getLine(k).length}else for(var P=0;P<R.length&&(I+=R[P].value.length,!(I>=O));P++);return A=R[P],A?(A.index=P,A.start=I-A.value.length,A):null},C.prototype.setUndoManager=function(k){if(this.$undoManager=k,this.$informUndoManager&&this.$informUndoManager.cancel(),k){var O=this;k.addSession(this),this.$syncInformUndoManager=function(){O.$informUndoManager.cancel(),O.mergeUndoDeltas=!1},this.$informUndoManager=l.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},C.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},C.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},C.prototype.getTabString=function(){return this.getUseSoftTabs()?l.stringRepeat(" ",this.getTabSize()):" "},C.prototype.setUseSoftTabs=function(k){this.setOption("useSoftTabs",k)},C.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},C.prototype.setTabSize=function(k){this.setOption("tabSize",k)},C.prototype.getTabSize=function(){return this.$tabSize},C.prototype.isTabStop=function(k){return this.$useSoftTabs&&k.column%this.$tabSize===0},C.prototype.setNavigateWithinSoftTabs=function(k){this.setOption("navigateWithinSoftTabs",k)},C.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},C.prototype.setOverwrite=function(k){this.setOption("overwrite",k)},C.prototype.getOverwrite=function(){return this.$overwrite},C.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},C.prototype.addGutterDecoration=function(k,O){this.$decorations[k]||(this.$decorations[k]=""),this.$decorations[k]+=" "+O,this._signal("changeBreakpoint",{})},C.prototype.removeGutterDecoration=function(k,O){this.$decorations[k]=(this.$decorations[k]||"").replace(" "+O,""),this._signal("changeBreakpoint",{})},C.prototype.getBreakpoints=function(){return this.$breakpoints},C.prototype.setBreakpoints=function(k){this.$breakpoints=[];for(var O=0;O<k.length;O++)this.$breakpoints[k[O]]="ace_breakpoint";this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},C.prototype.setBreakpoint=function(k,O){O===void 0&&(O="ace_breakpoint"),O?this.$breakpoints[k]=O:delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoint=function(k){delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},C.prototype.addMarker=function(k,O,R,A){var I=this.$markerId++,P={range:k,type:R||"line",renderer:typeof R=="function"?R:null,clazz:O,inFront:!!A,id:I};return A?(this.$frontMarkers[I]=P,this._signal("changeFrontMarker")):(this.$backMarkers[I]=P,this._signal("changeBackMarker")),I},C.prototype.addDynamicMarker=function(k,O){if(k.update){var R=this.$markerId++;return k.id=R,k.inFront=!!O,O?(this.$frontMarkers[R]=k,this._signal("changeFrontMarker")):(this.$backMarkers[R]=k,this._signal("changeBackMarker")),k}},C.prototype.removeMarker=function(k){var O=this.$frontMarkers[k]||this.$backMarkers[k];if(O){var R=O.inFront?this.$frontMarkers:this.$backMarkers;delete R[k],this._signal(O.inFront?"changeFrontMarker":"changeBackMarker")}},C.prototype.getMarkers=function(k){return k?this.$frontMarkers:this.$backMarkers},C.prototype.highlight=function(k){if(!this.$searchHighlight){var O=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(O)}this.$searchHighlight.setRegexp(k)},C.prototype.highlightLines=function(k,O,R,A){typeof O!="number"&&(R=O,O=k),R||(R="ace_step");var I=new f(k,0,O,1/0);return I.id=this.addMarker(I,R,"fullLine",A),I},C.prototype.setAnnotations=function(k){this.$annotations=k,this._signal("changeAnnotation",{})},C.prototype.getAnnotations=function(){return this.$annotations||[]},C.prototype.clearAnnotations=function(){this.setAnnotations([])},C.prototype.$detectNewLine=function(k){var O=k.match(/^.*?(\r?\n)/m);O?this.$autoNewLine=O[1]:this.$autoNewLine=`
`},C.prototype.getWordRange=function(k,O){var R=this.getLine(k),A=!1;if(O>0&&(A=!!R.charAt(O-1).match(this.tokenRe)),A||(A=!!R.charAt(O).match(this.tokenRe)),A)var I=this.tokenRe;else if(/^\s+$/.test(R.slice(O-1,O+1)))var I=/\s/;else var I=this.nonTokenRe;var P=O;if(P>0){do P--;while(P>=0&&R.charAt(P).match(I));P++}for(var z=O;z<R.length&&R.charAt(z).match(I);)z++;return new f(k,P,k,z)},C.prototype.getAWordRange=function(k,O){for(var R=this.getWordRange(k,O),A=this.getLine(R.end.row);A.charAt(R.end.column).match(/[ \t]/);)R.end.column+=1;return R},C.prototype.setNewLineMode=function(k){this.doc.setNewLineMode(k)},C.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},C.prototype.setUseWorker=function(k){this.setOption("useWorker",k)},C.prototype.getUseWorker=function(){return this.$useWorker},C.prototype.onReloadTokenizer=function(k){var O=k.data;this.bgTokenizer.start(O.first),this._signal("tokenizerUpdate",k)},C.prototype.setMode=function(k,O){if(k&&typeof k=="object"){if(k.getTokenizer)return this.$onChangeMode(k);var R=k,A=R.path}else A=k||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new u),this.$modes[A]&&!R){this.$onChangeMode(this.$modes[A]),O&&O();return}this.$modeId=A,a.loadModule(["mode",A],function(I){if(this.$modeId!==A)return O&&O();this.$modes[A]&&!R?this.$onChangeMode(this.$modes[A]):I&&I.Mode&&(I=new I.Mode(R),R||(this.$modes[A]=I,I.$id=A),this.$onChangeMode(I)),O&&O()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},C.prototype.$onChangeMode=function(k,O){if(O||(this.$modeId=k.$id),this.$mode!==k){var R=this.$mode;this.$mode=k,this.$stopWorker(),this.$useWorker&&this.$startWorker();var A=k.getTokenizer();if(A.on!==void 0){var I=this.onReloadTokenizer.bind(this);A.on("update",I)}this.bgTokenizer.setTokenizer(A),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=k.tokenRe,this.nonTokenRe=k.nonTokenRe,O||(k.attachToSession&&k.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(k.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:R,mode:k}))}},C.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},C.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(k){a.warn("Could not load worker",k),this.$worker=null}},C.prototype.getMode=function(){return this.$mode},C.prototype.setScrollTop=function(k){this.$scrollTop===k||isNaN(k)||(this.$scrollTop=k,this._signal("changeScrollTop",k))},C.prototype.getScrollTop=function(){return this.$scrollTop},C.prototype.setScrollLeft=function(k){this.$scrollLeft===k||isNaN(k)||(this.$scrollLeft=k,this._signal("changeScrollLeft",k))},C.prototype.getScrollLeft=function(){return this.$scrollLeft},C.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},C.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var k=0;return this.lineWidgets.forEach(function(O){O&&O.screenWidth>k&&(k=O.screenWidth)}),this.lineWidgetWidth=k},C.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var O=this.doc.getAllLines(),R=this.$rowLengthCache,A=0,I=0,P=this.$foldData[I],z=P?P.start.row:1/0,B=O.length,V=0;V<B;V++){if(V>z){if(V=P.end.row+1,V>=B)break;P=this.$foldData[I++],z=P?P.start.row:1/0}R[V]==null&&(R[V]=this.$getStringScreenWidth(O[V])[0]),R[V]>A&&(A=R[V])}this.screenWidth=A}},C.prototype.getLine=function(k){return this.doc.getLine(k)},C.prototype.getLines=function(k,O){return this.doc.getLines(k,O)},C.prototype.getLength=function(){return this.doc.getLength()},C.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},C.prototype.insert=function(k,O){return this.doc.insert(k,O)},C.prototype.remove=function(k){return this.doc.remove(k)},C.prototype.removeFullLines=function(k,O){return this.doc.removeFullLines(k,O)},C.prototype.undoChanges=function(k,O){if(k.length){this.$fromUndo=!0;for(var R=k.length-1;R!=-1;R--){var A=k[R];A.action=="insert"||A.action=="remove"?this.doc.revertDelta(A):A.folds&&this.addFolds(A.folds)}!O&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},C.prototype.redoChanges=function(k,O){if(k.length){this.$fromUndo=!0;for(var R=0;R<k.length;R++){var A=k[R];(A.action=="insert"||A.action=="remove")&&this.doc.$safeApplyDelta(A)}!O&&this.$undoSelect&&(k.selectionAfter?this.selection.fromJSON(k.selectionAfter):this.selection.setRange(this.$getUndoSelection(k,!1))),this.$fromUndo=!1}},C.prototype.setUndoSelect=function(k){this.$undoSelect=k},C.prototype.$getUndoSelection=function(k,O){function R(B){return O?B.action!=="insert":B.action==="insert"}for(var A,I,P=0;P<k.length;P++){var z=k[P];if(z.start){if(!A){R(z)?A=f.fromPoints(z.start,z.end):A=f.fromPoints(z.start,z.start);continue}R(z)?(I=z.start,A.compare(I.row,I.column)==-1&&A.setStart(I),I=z.end,A.compare(I.row,I.column)==1&&A.setEnd(I)):(I=z.start,A.compare(I.row,I.column)==-1&&(A=f.fromPoints(z.start,z.start)))}}return A},C.prototype.replace=function(k,O){return this.doc.replace(k,O)},C.prototype.moveText=function(k,O,R){var A=this.getTextRange(k),I=this.getFoldsInRange(k),P=f.fromPoints(O,O);if(!R){this.remove(k);var z=k.start.row-k.end.row,B=z?-k.end.column:k.start.column-k.end.column;B&&(P.start.row==k.end.row&&P.start.column>k.end.column&&(P.start.column+=B),P.end.row==k.end.row&&P.end.column>k.end.column&&(P.end.column+=B)),z&&P.start.row>=k.end.row&&(P.start.row+=z,P.end.row+=z)}if(P.end=this.insert(P.start,A),I.length){var V=k.start,K=P.start,z=K.row-V.row,B=K.column-V.column;this.addFolds(I.map(function(Y){return Y=Y.clone(),Y.start.row==V.row&&(Y.start.column+=B),Y.end.row==V.row&&(Y.end.column+=B),Y.start.row+=z,Y.end.row+=z,Y}))}return P},C.prototype.indentRows=function(k,O,R){R=R.replace(/\t/g,this.getTabString());for(var A=k;A<=O;A++)this.doc.insertInLine({row:A,column:0},R)},C.prototype.outdentRows=function(k){for(var O=k.collapseRows(),R=new f(0,0,0,0),A=this.getTabSize(),I=O.start.row;I<=O.end.row;++I){var P=this.getLine(I);R.start.row=I,R.end.row=I;for(var z=0;z<A&&P.charAt(z)==" ";++z);z<A&&P.charAt(z)==" "?(R.start.column=z,R.end.column=z+1):(R.start.column=0,R.end.column=z),this.remove(R)}},C.prototype.$moveLines=function(k,O,R){if(k=this.getRowFoldStart(k),O=this.getRowFoldEnd(O),R<0){var A=this.getRowFoldStart(k+R);if(A<0)return 0;var I=A-k}else if(R>0){var A=this.getRowFoldEnd(O+R);if(A>this.doc.getLength()-1)return 0;var I=A-O}else{k=this.$clipRowToDocument(k),O=this.$clipRowToDocument(O);var I=O-k+1}var P=new f(k,0,O,Number.MAX_VALUE),z=this.getFoldsInRange(P).map(function(V){return V=V.clone(),V.start.row+=I,V.end.row+=I,V}),B=R==0?this.doc.getLines(k,O):this.doc.removeFullLines(k,O);return this.doc.insertFullLines(k+I,B),z.length&&this.addFolds(z),I},C.prototype.moveLinesUp=function(k,O){return this.$moveLines(k,O,-1)},C.prototype.moveLinesDown=function(k,O){return this.$moveLines(k,O,1)},C.prototype.duplicateLines=function(k,O){return this.$moveLines(k,O,0)},C.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},C.prototype.$clipColumnToRow=function(k,O){return O<0?0:Math.min(this.doc.getLine(k).length,O)},C.prototype.$clipPositionToDocument=function(k,O){if(O=Math.max(0,O),k<0)k=0,O=0;else{var R=this.doc.getLength();k>=R?(k=R-1,O=this.doc.getLine(R-1).length):O=Math.min(this.doc.getLine(k).length,O)}return{row:k,column:O}},C.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var O=this.doc.getLength()-1;return k.end.row>O?(k.end.row=O,k.end.column=this.doc.getLine(O).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},C.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var O=this.getLength();this.$wrapData=Array(O),this.$updateWrapData(0,O-1)}this._signal("changeWrapMode")}},C.prototype.getUseWrapMode=function(){return this.$useWrapMode},C.prototype.setWrapLimitRange=function(k,O){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==O)&&(this.$wrapLimitRange={min:k,max:O},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},C.prototype.adjustWrapLimit=function(k,O){var R=this.$wrapLimitRange;R.max<0&&(R={min:O,max:O});var A=this.$constrainWrapLimit(k,R.min,R.max);return A!=this.$wrapLimit&&A>1?(this.$wrapLimit=A,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},C.prototype.$constrainWrapLimit=function(k,O,R){return O&&(k=Math.max(O,k)),R&&(k=Math.min(R,k)),k},C.prototype.getWrapLimit=function(){return this.$wrapLimit},C.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},C.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},C.prototype.$updateInternalDataOnChange=function(k){var O=this.$useWrapMode,R=k.action,A=k.start,I=k.end,P=A.row,z=I.row,B=z-P,V=null;if(this.$updating=!0,B!=0)if(R==="remove"){this[O?"$wrapData":"$rowLengthCache"].splice(P,B);var K=this.$foldData;V=this.getFoldsInRange(k),this.removeFolds(V);var q=this.getFoldLine(I.row),re=0;if(q){q.addRemoveChars(I.row,I.column,A.column-I.column),q.shiftRow(-B);var Y=this.getFoldLine(P);Y&&Y!==q&&(Y.merge(q),q=Y),re=K.indexOf(q)+1}for(re;re<K.length;re++){var q=K[re];q.start.row>=I.row&&q.shiftRow(-B)}z=P}else{var Z=Array(B);Z.unshift(P,0);var te=O?this.$wrapData:this.$rowLengthCache;te.splice.apply(te,Z);var K=this.$foldData,q=this.getFoldLine(P),re=0;if(q){var ie=q.range.compareInside(A.row,A.column);ie==0?(q=q.split(A.row,A.column),q&&(q.shiftRow(B),q.addRemoveChars(z,0,I.column-A.column))):ie==-1&&(q.addRemoveChars(P,0,I.column-A.column),q.shiftRow(B)),re=K.indexOf(q)+1}for(re;re<K.length;re++){var q=K[re];q.start.row>=P&&q.shiftRow(B)}}else{B=Math.abs(k.start.column-k.end.column),R==="remove"&&(V=this.getFoldsInRange(k),this.removeFolds(V),B=-B);var q=this.getFoldLine(P);q&&q.addRemoveChars(P,A.column,B)}return O&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,O?this.$updateWrapData(P,z):this.$updateRowLengthCache(P,z),V},C.prototype.$updateRowLengthCache=function(k,O,R){this.$rowLengthCache[k]=null,this.$rowLengthCache[O]=null},C.prototype.$updateWrapData=function(k,O){var R=this.doc.getAllLines(),A=this.getTabSize(),I=this.$wrapData,P=this.$wrapLimit,z,B,V=k;for(O=Math.min(O,R.length-1);V<=O;)B=this.getFoldLine(V,B),B?(z=[],B.walk(function(K,q,re,Y){var Z;if(K!=null){Z=this.$getDisplayTokens(K,z.length),Z[0]=T;for(var te=1;te<Z.length;te++)Z[te]=v}else Z=this.$getDisplayTokens(R[q].substring(Y,re),z.length);z=z.concat(Z)}.bind(this),B.end.row,R[B.end.row].length+1),I[B.start.row]=this.$computeWrapSplits(z,P,A),V=B.end.row+1):(z=this.$getDisplayTokens(R[V]),I[V]=this.$computeWrapSplits(z,P,A),V++)},C.prototype.$computeWrapSplits=function(k,O,R){if(k.length==0)return[];var A=[],I=k.length,P=0,z=0,B=this.$wrapAsCode,V=this.$indentedSoftWrap,K=O<=Math.max(2*R,8)||V===!1?0:Math.floor(O/2);function q(){var ie=0;if(K===0)return ie;if(V)for(var ce=0;ce<k.length;ce++){var he=k[ce];if(he==y)ie+=1;else if(he==m)ie+=R;else{if(he==E)continue;break}}return B&&V!==!1&&(ie+=R),Math.min(ie,K)}function re(ie){for(var ce=ie-P,he=P;he<ie;he++){var ve=k[he];(ve===12||ve===2)&&(ce-=1)}A.length||(Y=q(),A.indent=Y),z+=ce,A.push(z),P=ie}for(var Y=0;I-P>O-Y;){var Z=P+O-Y;if(k[Z-1]>=y&&k[Z]>=y){re(Z);continue}if(k[Z]==T||k[Z]==v){for(Z;Z!=P-1&&k[Z]!=T;Z--);if(Z>P){re(Z);continue}for(Z=P+O,Z;Z<k.length&&k[Z]==v;Z++);if(Z==k.length)break;re(Z);continue}for(var te=Math.max(Z-(O-(O>>2)),P-1);Z>te&&k[Z]<T;)Z--;if(B){for(;Z>te&&k[Z]<T;)Z--;for(;Z>te&&k[Z]==b;)Z--}else for(;Z>te&&k[Z]<y;)Z--;if(Z>te){re(++Z);continue}Z=P+O,k[Z]==S&&Z--,re(Z-Y)}return A},C.prototype.$getDisplayTokens=function(k,O){var R=[],A;O=O||0;for(var I=0;I<k.length;I++){var P=k.charCodeAt(I);if(P==9){A=this.getScreenTabSize(R.length+O),R.push(m);for(var z=1;z<A;z++)R.push(E)}else P==32?R.push(y):P>39&&P<48||P>57&&P<64?R.push(b):P>=4352&&M(P)?R.push(x,S):R.push(x)}return R},C.prototype.$getStringScreenWidth=function(k,O,R){if(O==0)return[0,0];O==null&&(O=1/0),R=R||0;var A,I;for(I=0;I<k.length&&(A=k.charCodeAt(I),A==9?R+=this.getScreenTabSize(R):A>=4352&&M(A)?R+=2:R+=1,!(R>O));I++);return[R,I]},C.prototype.getRowLength=function(k){var O=1;return this.lineWidgets&&(O+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?O:this.$wrapData[k].length+O},C.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},C.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var O=this.screenToDocumentPosition(k,Number.MAX_VALUE),R=this.$wrapData[O.row];return R.length&&R[0]<O.column?R.indent:0}else return 0},C.prototype.getScreenLastRowColumn=function(k){var O=this.screenToDocumentPosition(k,Number.MAX_VALUE);return this.documentToScreenColumn(O.row,O.column)},C.prototype.getDocumentLastRowColumn=function(k,O){var R=this.documentToScreenRow(k,O);return this.getScreenLastRowColumn(R)},C.prototype.getDocumentLastRowColumnPosition=function(k,O){var R=this.documentToScreenRow(k,O);return this.screenToDocumentPosition(R,Number.MAX_VALUE/10)},C.prototype.getRowSplitData=function(k){if(this.$useWrapMode)return this.$wrapData[k]},C.prototype.getScreenTabSize=function(k){return this.$tabSize-(k%this.$tabSize|0)},C.prototype.screenToDocumentRow=function(k,O){return this.screenToDocumentPosition(k,O).row},C.prototype.screenToDocumentColumn=function(k,O){return this.screenToDocumentPosition(k,O).column},C.prototype.screenToDocumentPosition=function(k,O,R){if(k<0)return{row:0,column:0};var A,I=0,P=0,z,B=0,V=0,K=this.$screenRowCache,q=this.$getRowCacheIndex(K,k),re=K.length;if(re&&q>=0)var B=K[q],I=this.$docRowCache[q],Y=k>K[re-1];else var Y=!re;for(var Z=this.getLength()-1,te=this.getNextFoldLine(I),ie=te?te.start.row:1/0;B<=k&&(V=this.getRowLength(I),!(B+V>k||I>=Z));)B+=V,I++,I>ie&&(I=te.end.row+1,te=this.getNextFoldLine(I,te),ie=te?te.start.row:1/0),Y&&(this.$docRowCache.push(I),this.$screenRowCache.push(B));if(te&&te.start.row<=I)A=this.getFoldDisplayLine(te),I=te.start.row;else{if(B+V<=k||I>Z)return{row:Z,column:this.getLine(Z).length};A=this.getLine(I),te=null}var ce=0,he=Math.floor(k-B);if(this.$useWrapMode){var ve=this.$wrapData[I];ve&&(z=ve[he],he>0&&ve.length&&(ce=ve.indent,P=ve[he-1]||ve[ve.length-1],A=A.substring(P)))}return R!==void 0&&this.$bidiHandler.isBidiRow(B+he,I,he)&&(O=this.$bidiHandler.offsetToCol(R)),P+=this.$getStringScreenWidth(A,O-ce)[1],this.$useWrapMode&&P>=z&&(P=z-1),te?te.idxToPosition(P):{row:I,column:P}},C.prototype.documentToScreenPosition=function(k,O){if(typeof O>"u")var R=this.$clipPositionToDocument(k.row,k.column);else R=this.$clipPositionToDocument(k,O);k=R.row,O=R.column;var A=0,I=null,P=null;P=this.getFoldAt(k,O,1),P&&(k=P.start.row,O=P.start.column);var z,B=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,k),q=V.length;if(q&&K>=0)var B=V[K],A=this.$screenRowCache[K],re=k>V[q-1];else var re=!q;for(var Y=this.getNextFoldLine(B),Z=Y?Y.start.row:1/0;B<k;){if(B>=Z){if(z=Y.end.row+1,z>k)break;Y=this.getNextFoldLine(z,Y),Z=Y?Y.start.row:1/0}else z=B+1;A+=this.getRowLength(B),B=z,re&&(this.$docRowCache.push(B),this.$screenRowCache.push(A))}var te="";Y&&B>=Z?(te=this.getFoldDisplayLine(Y,k,O),I=Y.start.row):(te=this.getLine(k).substring(0,O),I=k);var ie=0;if(this.$useWrapMode){var ce=this.$wrapData[I];if(ce){for(var he=0;te.length>=ce[he];)A++,he++;te=te.substring(ce[he-1]||0,te.length),ie=he>0?ce.indent:0}}return this.lineWidgets&&this.lineWidgets[B]&&this.lineWidgets[B].rowsAbove&&(A+=this.lineWidgets[B].rowsAbove),{row:A,column:ie+this.$getStringScreenWidth(te)[0]}},C.prototype.documentToScreenColumn=function(k,O){return this.documentToScreenPosition(k,O).column},C.prototype.documentToScreenRow=function(k,O){return this.documentToScreenPosition(k,O).row},C.prototype.getScreenLength=function(){var k=0,O=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,P=0,A=0,O=this.$foldData[A++],z=O?O.start.row:1/0;P<I;){var B=this.$wrapData[P];k+=B?B.length+1:1,P++,P>z&&(P=O.end.row+1,O=this.$foldData[A++],z=O?O.start.row:1/0)}else{k=this.getLength();for(var R=this.$foldData,A=0;A<R.length;A++)O=R[A],k-=O.end.row-O.start.row}return this.lineWidgets&&(k+=this.$getWidgetScreenLength()),k},C.prototype.$setFontMetrics=function(k){this.$enableVarChar&&(this.$getStringScreenWidth=function(O,R,A){if(R===0)return[0,0];R||(R=1/0),A=A||0;var I,P;for(P=0;P<O.length&&(I=O.charAt(P),I===" "?A+=this.getScreenTabSize(A):A+=k.getCharacterWidth(I),!(A>R));P++);return[A,P]})},C.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()},C}();w.$uid=0,w.prototype.$modes=a.$modes,w.prototype.getValue=w.prototype.toString,w.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},w.prototype.$overwrite=!1,w.prototype.$mode=null,w.prototype.$modeId=null,w.prototype.$scrollTop=0,w.prototype.$scrollLeft=0,w.prototype.$wrapLimit=80,w.prototype.$useWrapMode=!1,w.prototype.$wrapLimitRange={min:null,max:null},w.prototype.lineWidgets=null,w.prototype.isFullWidth=M,o.implement(w.prototype,c);var x=1,S=2,T=3,v=4,b=9,y=10,m=11,E=12;function M(C){return C<4352?!1:C>=4352&&C<=4447||C>=4515&&C<=4519||C>=4602&&C<=4607||C>=9001&&C<=9002||C>=11904&&C<=11929||C>=11931&&C<=12019||C>=12032&&C<=12245||C>=12272&&C<=12283||C>=12288&&C<=12350||C>=12353&&C<=12438||C>=12441&&C<=12543||C>=12549&&C<=12589||C>=12593&&C<=12686||C>=12688&&C<=12730||C>=12736&&C<=12771||C>=12784&&C<=12830||C>=12832&&C<=12871||C>=12880&&C<=13054||C>=13056&&C<=19903||C>=19968&&C<=42124||C>=42128&&C<=42182||C>=43360&&C<=43388||C>=44032&&C<=55203||C>=55216&&C<=55238||C>=55243&&C<=55291||C>=63744&&C<=64255||C>=65040&&C<=65049||C>=65072&&C<=65106||C>=65108&&C<=65126||C>=65128&&C<=65131||C>=65281&&C<=65376||C>=65504&&C<=65510}n("./edit_session/folding").Folding.call(w.prototype),n("./edit_session/bracket_match").BracketMatch.call(w.prototype),a.defineOptions(w.prototype,"session",{wrap:{set:function(C){if(!C||C=="off"?C=!1:C=="free"?C=!0:C=="printMargin"?C=-1:typeof C=="string"&&(C=parseInt(C,10)||!1),this.$wrap!=C)if(this.$wrap=C,!C)this.setUseWrapMode(!1);else{var k=typeof C=="number"?C:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(C){C=C=="auto"?this.$mode.type!="text":C!="text",C!=this.$wrapAsCode&&(this.$wrapAsCode=C,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(C){this.$useWorker=C,this.$stopWorker(),C&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(C){C=parseInt(C),C>0&&this.$tabSize!==C&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=C,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(C){this.setFoldStyle(C)},handlesSet:!0},overwrite:{set:function(C){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(C){this.doc.setNewLineMode(C)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(C){this.setMode(C)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=w}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,i){var o=n("./lib/lang"),l=n("./lib/oop"),d=n("./range").Range,a=function(){function s(){this.$options={}}return s.prototype.set=function(u){return l.mixin(this.$options,u),this},s.prototype.getOptions=function(){return o.copyObject(this.$options)},s.prototype.setOptions=function(u){this.$options=u},s.prototype.find=function(u){var f=this.$options,h=this.$matchIterator(u,f);if(!h)return!1;var p=null;return h.forEach(function(g,w,x,S){return p=new d(g,w,x,S),w==S&&f.start&&f.start.start&&f.skipCurrent!=!1&&p.isEqual(f.start)?(p=null,!1):!0}),p},s.prototype.findAll=function(u){var f=this.$options;if(!f.needle)return[];this.$assembleRegExp(f);var h=f.range,p=h?u.getLines(h.start.row,h.end.row):u.doc.getAllLines(),g=[],w=f.re;if(f.$isMultiLine){var x=w.length,S=p.length-x,T;e:for(var v=w.offset||0;v<=S;v++){for(var b=0;b<x;b++)if(p[v+b].search(w[b])==-1)continue e;var y=p[v],m=p[v+x-1],E=y.length-y.match(w[0])[0].length,M=m.match(w[x-1])[0].length;T&&T.end.row===v&&T.end.column>E||(g.push(T=new d(v,E,v+x-1,M)),x>2&&(v=v+x-2))}}else for(var C=0;C<p.length;C++)for(var k=o.getMatchOffsets(p[C],w),b=0;b<k.length;b++){var O=k[b];g.push(new d(C,O.offset,C,O.offset+O.length))}if(h){for(var R=h.start.column,A=h.end.column,C=0,b=g.length-1;C<b&&g[C].start.column<R&&g[C].start.row==0;)C++;for(var I=h.end.row-h.start.row;C<b&&g[b].end.column>A&&g[b].end.row==I;)b--;for(g=g.slice(C,b+1),C=0,b=g.length;C<b;C++)g[C].start.row+=h.start.row,g[C].end.row+=h.start.row}return g},s.prototype.replace=function(u,f){var h=this.$options,p=this.$assembleRegExp(h);if(h.$isMultiLine)return f;if(p){var g=p.exec(u);if(!g||g[0].length!=u.length)return null;if(f=u.replace(p,f),h.preserveCase){f=f.split("");for(var w=Math.min(u.length,u.length);w--;){var x=u[w];x&&x.toLowerCase()!=x?f[w]=f[w].toUpperCase():f[w]=f[w].toLowerCase()}f=f.join("")}return f}},s.prototype.$assembleRegExp=function(u,f){if(u.needle instanceof RegExp)return u.re=u.needle;var h=u.needle;if(!u.needle)return u.re=!1;u.regExp||(h=o.escapeRegExp(h)),u.wholeWord&&(h=c(h,u));var p=u.caseSensitive?"gm":"gmi";if(u.$isMultiLine=!f&&/[\n\r]/.test(h),u.$isMultiLine)return u.re=this.$assembleMultilineRegExp(h,p);try{var g=new RegExp(h,p)}catch{g=!1}return u.re=g},s.prototype.$assembleMultilineRegExp=function(u,f){for(var h=u.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),p=[],g=0;g<h.length;g++)try{p.push(new RegExp(h[g],f))}catch{return!1}return p},s.prototype.$matchIterator=function(u,f){var h=this.$assembleRegExp(f);if(!h)return!1;var p=f.backwards==!0,g=f.skipCurrent!=!1,w=f.range,x=f.start;x||(x=w?w[p?"end":"start"]:u.selection.getRange()),x.start&&(x=x[g!=p?"end":"start"]);var S=w?w.start.row:0,T=w?w.end.row:u.getLength()-1;if(p)var v=function(m){var E=x.row;if(!y(E,x.column,m)){for(E--;E>=S;E--)if(y(E,Number.MAX_VALUE,m))return;if(f.wrap!=!1){for(E=T,S=x.row;E>=S;E--)if(y(E,Number.MAX_VALUE,m))return}}};else var v=function(E){var M=x.row;if(!y(M,x.column,E)){for(M=M+1;M<=T;M++)if(y(M,0,E))return;if(f.wrap!=!1){for(M=S,T=x.row;M<=T;M++)if(y(M,0,E))return}}};if(f.$isMultiLine)var b=h.length,y=function(m,E,M){var C=p?m-b+1:m;if(!(C<0||C+b>u.getLength())){var k=u.getLine(C),O=k.search(h[0]);if(!(!p&&O<E||O===-1)){for(var R=1;R<b;R++)if(k=u.getLine(C+R),k.search(h[R])==-1)return;var A=k.match(h[b-1])[0].length;if(!(p&&A>E)&&M(C,O,C+b-1,A))return!0}}};else if(p)var y=function(E,M,C){var k=u.getLine(E),O=[],R,A=0;for(h.lastIndex=0;R=h.exec(k);){var I=R[0].length;if(A=R.index,!I){if(A>=k.length)break;h.lastIndex=A+=1}if(R.index+I>M)break;O.push(R.index,I)}for(var P=O.length-1;P>=0;P-=2){var z=O[P-1],I=O[P];if(C(E,z,E,z+I))return!0}};else var y=function(E,M,C){var k=u.getLine(E),O,R;for(h.lastIndex=M;R=h.exec(k);){var A=R[0].length;if(O=R.index,C(E,O,E,O+A))return!0;if(!A&&(h.lastIndex=O+=1,O>=k.length))return!1}};return{forEach:v}},s}();function c(s,u){function f(h){return/\w/.test(h)||u.regExp?"\\b":""}return f(s[0])+s+f(s[s.length-1])}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,i){var o=n("../lib/keys"),l=n("../lib/useragent"),d=o.KEY_MODS;function a(s,u){this.platform=u||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(s),this.$singleCommand=!0}function c(s,u){a.call(this,s,u),this.$singleCommand=!1}c.prototype=a.prototype,function(){this.addCommand=function(u){this.commands[u.name]&&this.removeCommand(u),this.commands[u.name]=u,u.bindKey&&this._buildKeyHash(u)},this.removeCommand=function(u,f){var h=u&&(typeof u=="string"?u:u.name);u=this.commands[h],f||delete this.commands[h];var p=this.commandKeyBinding;for(var g in p){var w=p[g];if(w==u)delete p[g];else if(Array.isArray(w)){var x=w.indexOf(u);x!=-1&&(w.splice(x,1),w.length==1&&(p[g]=w[0]))}}},this.bindKey=function(u,f,h){if(typeof u=="object"&&u&&(h==null&&(h=u.position),u=u[this.platform]),!!u){if(typeof f=="function")return this.addCommand({exec:f,bindKey:u,name:f.name||u});u.split("|").forEach(function(p){var g="";if(p.indexOf(" ")!=-1){var w=p.split(/\s+/);p=w.pop(),w.forEach(function(T){var v=this.parseKeys(T),b=d[v.hashId]+v.key;g+=(g?" ":"")+b,this._addCommandToBinding(g,"chainKeys")},this),g+=" "}var x=this.parseKeys(p),S=d[x.hashId]+x.key;this._addCommandToBinding(g+S,f,h)},this)}};function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}this._addCommandToBinding=function(u,f,h){var p=this.commandKeyBinding,g;if(!f)delete p[u];else if(!p[u]||this.$singleCommand)p[u]=f;else{Array.isArray(p[u])?(g=p[u].indexOf(f))!=-1&&p[u].splice(g,1):p[u]=[p[u]],typeof h!="number"&&(h=s(f));var w=p[u];for(g=0;g<w.length;g++){var x=w[g],S=s(x);if(S>h)break}w.splice(g,0,f)}},this.addCommands=function(u){u&&Object.keys(u).forEach(function(f){var h=u[f];if(h){if(typeof h=="string")return this.bindKey(h,f);typeof h=="function"&&(h={exec:h}),typeof h=="object"&&(h.name||(h.name=f),this.addCommand(h))}},this)},this.removeCommands=function(u){Object.keys(u).forEach(function(f){this.removeCommand(u[f])},this)},this.bindKeys=function(u){Object.keys(u).forEach(function(f){this.bindKey(f,u[f])},this)},this._buildKeyHash=function(u){this.bindKey(u.bindKey,u)},this.parseKeys=function(u){var f=u.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),h=f.pop(),p=o[h];if(o.FUNCTION_KEYS[p])h=o.FUNCTION_KEYS[p].toLowerCase();else if(f.length){if(f.length==1&&f[0]=="shift")return{key:h.toUpperCase(),hashId:-1}}else return{key:h,hashId:-1};for(var g=0,w=f.length;w--;){var x=o.KEY_MODS[f[w]];if(x==null)return typeof console<"u"&&console.error("invalid modifier "+f[w]+" in "+u),!1;g|=x}return{key:h,hashId:g}},this.findKeyCommand=function(f,h){var p=d[f]+h;return this.commandKeyBinding[p]},this.handleKeyboard=function(u,f,h,p){if(!(p<0)){var g=d[f]+h,w=this.commandKeyBinding[g];return u.$keyChain&&(u.$keyChain+=" "+g,w=this.commandKeyBinding[u.$keyChain]||w),w&&(w=="chainKeys"||w[w.length-1]=="chainKeys")?(u.$keyChain=u.$keyChain||g,{command:"null"}):(u.$keyChain&&((!f||f==4)&&h.length==1?u.$keyChain=u.$keyChain.slice(0,-g.length-1):(f==-1||p>0)&&(u.$keyChain="")),{command:w})}},this.getStatusText=function(u,f){return f.$keyChain||""}}.call(a.prototype),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,i){var o=this&&this.__extends||function(){var s=function(u,f){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},s(u,f)};return function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");s(u,f);function h(){this.constructor=u}u.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}}(),l=n("../lib/oop"),d=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,c=function(s){o(u,s);function u(f,h){var p=s.call(this,h,f)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return u.prototype.exec=function(f,h,p){if(Array.isArray(f)){for(var g=f.length;g--;)if(this.exec(f[g],h,p))return!0;return!1}if(typeof f=="string"&&(f=this.commands[f]),!f||h&&h.$readOnly&&!f.readOnly||this.$checkCommandState!=!1&&f.isAvailable&&!f.isAvailable(h))return!1;var w={editor:h,command:f,args:p};return w.returnValue=this._emit("exec",w),this._signal("afterExec",w),w.returnValue!==!1},u.prototype.toggleRecording=function(f){if(!this.$inReplay)return f&&f._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(h){this.macro.push([h.command,h.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},u.prototype.replay=function(f){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(f);try{this.$inReplay=!0,this.macro.forEach(function(h){typeof h=="string"?this.exec(h,f):this.exec(h[0],f,h[1])},this)}finally{this.$inReplay=!1}}},u.prototype.trimMacro=function(f){return f.map(function(h){return typeof h[0]!="string"&&(h[0]=h[0].name),h[1]||(h=h[0]),h})},u}(d);l.implement(c.prototype,a),r.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,i){var o=n("../lib/lang"),l=n("../config"),d=n("../range").Range;function a(s,u){return{win:s,mac:u}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(s){l.loadModule("ace/ext/settings_menu",function(u){u.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(s){l.loadModule("ace/ext/error_marker",function(u){u.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(s){l.loadModule("ace/ext/error_marker",function(u){u.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(s,u){typeof u=="number"&&!isNaN(u)&&s.gotoLine(u),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(s){l.loadModule("ace/ext/searchbox",function(u){u.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(s,u){s.navigateUp(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(s,u){s.navigateDown(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(s,u){s.navigateLeft(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(s,u){s.navigateRight(u.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var u=s.$copyWithEmptySelection&&s.selection.isEmpty(),f=u?s.selection.getLineRange():s.selection.getRange();s._emit("cut",f),f.isEmpty()||s.session.remove(f),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,u){s.$handlePaste(u)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(s){l.loadModule("ace/ext/searchbox",function(u){u.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(s){var u=s.selection.getRange();u.start.column=0,s.session.remove(u)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(s){var u=s.selection.getRange();u.end.column=Number.MAX_VALUE,s.session.remove(u)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,u){s.insert(u)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,u){s.insert(o.stringRepeat(u.text||"",u.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(s){s.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var u=s.selection.getRange();u.start.column=u.end.column=0,u.end.row++,s.selection.setRange(u,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(s){for(var u=s.selection.isBackwards(),f=u?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),h=u?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),p=s.session.doc.getLine(f.row).length,g=s.session.doc.getTextRange(s.selection.getRange()),w=g.replace(/\n\s*/," ").length,x=s.session.doc.getLine(f.row),S=f.row+1;S<=h.row+1;S++){var T=o.stringTrimLeft(o.stringTrimRight(s.session.doc.getLine(S)));T.length!==0&&(T=" "+T),x+=T}h.row+1<s.session.doc.getLength()-1&&(x+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new d(f.row,0,h.row+2,0),x),w>0?(s.selection.moveCursorTo(f.row,f.column),s.selection.selectTo(f.row,f.column+w)):(p=s.session.doc.getLine(f.row).length>p?p+1:p,s.selection.moveCursorTo(f.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(s){var u=s.session.doc.getLength()-1,f=s.session.doc.getLine(u).length,h=s.selection.rangeList.ranges,p=[];h.length<1&&(h=[s.selection.getRange()]);for(var g=0;g<h.length;g++)g==h.length-1&&(h[g].end.row===u&&h[g].end.column===f||p.push(new d(h[g].end.row,h[g].end.column,u,f))),g===0?h[g].start.row===0&&h[g].start.column===0||p.push(new d(0,0,h[g].start.row,h[g].start.column)):p.push(new d(h[g-1].end.row,h[g-1].end.column,h[g].start.row,h[g].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var g=0;g<p.length;g++)s.selection.addRange(p[g],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var u=s.getCursorPosition();s.selection.moveTo(u.row-1,Number.MAX_VALUE),s.insert(`
`),u.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:a("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)r.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("./lib/dom"),l=function(){function d(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return d.prototype.getRowLength=function(a){var c;return this.lineWidgets?c=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[a]?1+c:this.$wrapData[a].length+1+c},d.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(a+=c.rowCount)}),a},d.prototype.$onChangeEditor=function(a){this.attach(a.editor)},d.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},d.prototype.detach=function(a){var c=this.editor;if(c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(u){u&&u.el&&u.el.parentNode&&(u._inDocument=!1,u.el.parentNode.removeChild(u.el))})}},d.prototype.updateOnFold=function(a,c){var s=c.lineWidgets;if(!(!s||!a.action)){for(var u=a.data,f=u.start.row,h=u.end.row,p=a.action=="add",g=f+1;g<h;g++)s[g]&&(s[g].hidden=p);s[h]&&(p?s[f]?s[h].hidden=p:s[f]=s[h]:(s[f]==s[h]&&(s[f]=void 0),s[h].hidden=p))}},d.prototype.updateOnChange=function(a){var c=this.session.lineWidgets;if(c){var s=a.start.row,u=a.end.row-s;if(u!==0)if(a.action=="remove"){var f=c.splice(s+1,u);!c[s]&&f[f.length-1]&&(c[s]=f.pop()),f.forEach(function(p){p&&this.removeLineWidget(p)},this),this.$updateRows()}else{var h=new Array(u);c[s]&&c[s].column!=null&&a.start.column>c[s].column&&s++,h.unshift(s,0),c.splice.apply(c,h),this.$updateRows()}}},d.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(s,u){if(s)for(c=!1,s.row=u;s.$oldWidget;)s.$oldWidget.row=u,s=s.$oldWidget}),c&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},d.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=o.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=o.createElement("div"),a.el.textContent=a.text),a.el&&(o.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&o.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var s=this.session.getFoldAt(a.row,0);if(a.$fold=s,s){var u=this.session.lineWidgets;a.row==s.end.row&&!u[s.start.row]?u[s.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},d.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,s=c&&c[a],u=[];s;)u.push(s),s=s.$oldWidget;return u},d.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(a,c){var s=this.session._changedWidgets,u=c.layerConfig;if(!(!s||!s.length)){for(var f=1/0,h=0;h<s.length;h++){var p=s[h];if(!(!p||!p.el)&&p.session==this.session){if(!p._inDocument){if(this.session.lineWidgets[p.row]!=p)continue;p._inDocument=!0,c.container.appendChild(p.el)}p.h=p.el.offsetHeight,p.fixedWidth||(p.w=p.el.offsetWidth,p.screenWidth=Math.ceil(p.w/u.characterWidth));var g=p.h/u.lineHeight;p.coverLine&&(g-=this.session.getRowLineCount(p.row),g<0&&(g=0)),p.rowCount!=g&&(p.rowCount=g,p.row<f&&(f=p.row))}}f!=1/0&&(this.session._emit("changeFold",{data:{start:{row:f}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},d.prototype.renderWidgets=function(a,c){var s=c.layerConfig,u=this.session.lineWidgets;if(u){for(var f=Math.min(this.firstRow,s.firstRow),h=Math.max(this.lastRow,s.lastRow,u.length);f>0&&!u[f];)f--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,c.$cursorLayer.config=s;for(var p=f;p<=h;p++){var g=u[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,c.container.appendChild(g.el));var w=c.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(w+=s.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=w-s.offset+"px";var x=g.coverGutter?0:c.gutterWidth;g.fixedWidth||(x-=c.scrollLeft),g.el.style.left=x+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=s.width+2*s.padding+"px"),g.fixedWidth?g.el.style.right=c.scrollBar.getWidth()+"px":g.el.style.right=""}}}},d}();r.LineWidgets=l}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,i){var o=n("../lib/keys"),l=n("../mouse/default_gutter_handler").GutterTooltip,d=function(){function a(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new l(this.editor)}return a.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))},a.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))},a.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===o.escape&&this.annotationTooltip.hide();return}if(c.target===this.element){if(c.keyCode!=o.enter)return;c.preventDefault();var s=this.editor.getCursorPosition().row;this.editor.isRowVisible(s)||this.editor.scrollToLine(s,!0,!0),setTimeout(function(){var g=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),w=this.$findNearestFoldWidget(g),x=this.$findNearestAnnotation(g);if(!(w===null&&x===null)){if(w===null&&x!==null){this.activeRowIndex=x,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(w!==null&&x===null){this.activeRowIndex=w,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(x-g)<Math.abs(w-g)){this.activeRowIndex=x,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=w,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}if(c.keyCode===o.tab){c.preventDefault();return}if(c.keyCode===o.escape){c.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(c.keyCode===o.up){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(c.keyCode===o.down){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(c.keyCode===o.left&&(c.preventDefault(),this.$switchLane("annotation")),c.keyCode===o.right&&(c.preventDefault(),this.$switchLane("fold")),c.keyCode===o.enter||c.keyCode===o.space){switch(c.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var u=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),c),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==u&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(u),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var f=this.lines.cells[this.activeRowIndex].element.childNodes[2],h=f.getBoundingClientRect(),p=this.annotationTooltip.getElement().style;p.left=h.right+"px",p.top=h.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(c){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),u=this.$getFoldWidget(c).style.display!=="none";return s&&u},a.prototype.$isAnnotationVisible=function(c){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),u=this.$getAnnotation(c).style.display!=="none";return s&&u},a.prototype.$getFoldWidget=function(c){var s=this.lines.get(c),u=s.element;return u.childNodes[1]},a.prototype.$getAnnotation=function(c){var s=this.lines.get(c),u=s.element;return u.childNodes[2]},a.prototype.$findNearestFoldWidget=function(c){if(this.$isFoldWidgetVisible(c))return c;for(var s=0;c-s>0||c+s<this.lines.getLength()-1;){if(s++,c-s>=0&&this.$isFoldWidgetVisible(c-s))return c-s;if(c+s<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+s))return c+s}return null},a.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var s=0;c-s>0||c+s<this.lines.getLength()-1;){if(s++,c-s>=0&&this.$isAnnotationVisible(c-s))return c-s;if(c+s<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+s))return c+s}return null},a.prototype.$focusFoldWidget=function(c){if(c!=null){var s=this.$getFoldWidget(c);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.focus()}},a.prototype.$focusAnnotation=function(c){if(c!=null){var s=this.$getAnnotation(c);s.classList.add(this.editor.renderer.keyboardFocusClassName),s.setAttribute("role","button"),s.focus()}},a.prototype.$blurFoldWidget=function(c){var s=this.$getFoldWidget(c);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.blur()},a.prototype.$blurAnnotation=function(c){var s=this.$getAnnotation(c);s.classList.remove(this.editor.renderer.keyboardFocusClassName),s.removeAttribute("role"),s.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$switchLane=function(c){switch(c){case"annotation":if(this.activeLane==="annotation")break;var s=this.$findNearestAnnotation(this.activeRowIndex);if(s==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldWidget(this.activeRowIndex);if(u==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(c){var s=this.lines.get(c);return s?s.row:null},a.prototype.$rowToRowIndex=function(c){for(var s=0;s<this.lines.getLength();s++){var u=this.lines.get(s);if(u.row==c)return s}return null},a}();r.GutterKeyboardHandler=d}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,r,i){var o=this&&this.__values||function(R){var A=typeof Symbol=="function"&&Symbol.iterator,I=A&&R[A],P=0;if(I)return I.call(R);if(R&&typeof R.length=="number")return{next:function(){return R&&P>=R.length&&(R=void 0),{value:R&&R[P++],done:!R}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},l=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/lang"),c=n("./lib/useragent"),s=n("./keyboard/textinput").TextInput,u=n("./mouse/mouse_handler").MouseHandler,f=n("./mouse/fold_handler").FoldHandler,h=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,w=n("./range").Range,x=n("./lib/event_emitter").EventEmitter,S=n("./commands/command_manager").CommandManager,T=n("./commands/default_commands").commands,v=n("./config"),b=n("./token_iterator").TokenIterator,y=n("./line_widgets").LineWidgets,m=n("./keyboard/gutter_handler").GutterKeyboardHandler,E=n("./config").nls,M=n("./clipboard"),C=n("./lib/keys"),k=function(){function R(A,I,P){this.$toDestroy=[];var z=A.getContainerElement();this.container=z,this.renderer=A,this.id="editor"+ ++R.$uid,this.commands=new S(c.isMac?"mac":"win",T),typeof document=="object"&&(this.textInput=new s(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new u(this),new f(this)),this.keyBinding=new h(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(B,V){V._$emitInputEvent.schedule(31)}),this.setSession(I||P&&P.session||new p("")),v.resetOptions(this),P&&this.setOptions(P),v._signal("editor",this)}return R.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.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)},R.prototype.startOperation=function(A){if(this.curOp){if(!A||this.curOp.command)return;this.prevOp=this.curOp}A||(this.previousCommand=null,A={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:A.command||{},args:A.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},R.prototype.endOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1||!this.session)return this.curOp=null;if(A==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var I=this.curOp.command,P=I&&I.scrollIntoView;if(P){switch(P){case"center-animate":P="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var z=this.selection.getRange(),B=this.renderer.layerConfig;(z.start.row>=B.lastRow||z.end.row<=B.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}P=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var V=this.selection.toJSON();this.curOp.selectionAfter=V,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(V),this.prevOp=this.curOp,this.curOp=null}},R.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var I=this.prevOp,P=this.$mergeableCommands,z=I.command&&A.command.name==I.command.name;if(A.command.name=="insertstring"){var B=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),z=z&&this.mergeNextCommand&&(!/\s/.test(B)||/\s/.test(I.args)),this.mergeNextCommand=!0}else z=z&&P.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(z=!1),z?this.session.mergeUndoDeltas=!0:P.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},R.prototype.setKeyboardHandler=function(A,I){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var P=this;v.loadModule(["keybinding",A],function(z){P.$keybindingId==A&&P.keyBinding.setKeyboardHandler(z&&z.handler),I&&I()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),I&&I()},R.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},R.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var I=this.session;if(I){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 P=this.session.getSelection();P.off("changeCursor",this.$onCursorChange),P.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.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=A.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(A)),this._signal("changeSession",{session:A,oldSession:I}),this.curOp=null,I&&I._signal("changeEditor",{oldEditor:this}),A&&A._signal("changeEditor",{editor:this}),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},R.prototype.getSession=function(){return this.session},R.prototype.setValue=function(A,I){return this.session.doc.setValue(A),I?I==1?this.navigateFileEnd():I==-1&&this.navigateFileStart():this.selectAll(),A},R.prototype.getValue=function(){return this.session.getValue()},R.prototype.getSelection=function(){return this.selection},R.prototype.resize=function(A){this.renderer.onResize(A)},R.prototype.setTheme=function(A,I){this.renderer.setTheme(A,I)},R.prototype.getTheme=function(){return this.renderer.getTheme()},R.prototype.setStyle=function(A){this.renderer.setStyle(A)},R.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},R.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},R.prototype.setFontSize=function(A){this.setOption("fontSize",A)},R.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var I=A.session;if(!(!I||I.destroyed)){I.$bracketHighlight&&(I.$bracketHighlight.markerIds.forEach(function(Z){I.removeMarker(Z)}),I.$bracketHighlight=null);var P=A.getCursorPosition(),z=A.getKeyboardHandler(),B=z&&z.$getDirectionForHighlight&&z.$getDirectionForHighlight(A),V=I.getMatchingBracketRanges(P,B);if(!V){var K=new b(I,P.row,P.column),q=K.getCurrentToken();if(q&&/\b(?:tag-open|tag-name)/.test(q.type)){var re=I.getMatchingTags(P);re&&(V=[re.openTagName,re.closeTagName])}}if(!V&&I.$mode.getMatching&&(V=I.$mode.getMatching(A.session)),!V){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var Y="ace_bracket";Array.isArray(V)?V.length==1&&(Y="ace_error_bracket"):V=[V],V.length==2&&(w.comparePoints(V[0].end,V[1].start)==0?V=[w.fromPoints(V[0].start,V[1].end)]:w.comparePoints(V[0].start,V[1].end)==0&&(V=[w.fromPoints(V[1].start,V[0].end)])),I.$bracketHighlight={ranges:V,markerIds:V.map(function(Z){return I.addMarker(Z,Y,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},R.prototype.focus=function(){this.textInput.focus()},R.prototype.isFocused=function(){return this.textInput.isFocused()},R.prototype.blur=function(){this.textInput.blur()},R.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},R.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},R.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},R.prototype.onDocumentChange=function(A){var I=this.session.$useWrapMode,P=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,P,I),this._signal("change",A),this.$cursorChange()},R.prototype.onTokenizerUpdate=function(A){var I=A.data;this.renderer.updateLines(I.first,I.last)},R.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},R.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},R.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},R.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),I;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(I=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(I=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(I=!1)),A.$highlightLineMarker&&!I)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&I){var P=new w(I.row,I.column,I.row,1/0);P.id=A.addMarker(P,"ace_active-line","screenLine"),A.$highlightLineMarker=P}else I&&(A.$highlightLineMarker.start.row=I.row,A.$highlightLineMarker.end.row=I.row,A.$highlightLineMarker.start.column=I.column,A._signal("changeBackMarker"))},R.prototype.onSelectionChange=function(A){var I=this.session;if(I.$selectionMarker&&I.removeMarker(I.$selectionMarker),I.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var P=this.selection.getRange(),z=this.getSelectionStyle();I.$selectionMarker=I.addMarker(P,"ace_selection",z)}var B=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(B),this._signal("changeSelection")},R.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,I=this.getSelectionRange();if(!(I.isEmpty()||I.isMultiLine())){var P=I.start.column,z=I.end.column,B=A.getLine(I.start.row),V=B.substring(P,z);if(!(V.length>5e3||!/[\w\d]/.test(V))){var K=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:V}),q=B.substring(P-1,z+1);if(K.test(q))return K}}},R.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},R.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},R.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},R.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},R.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},R.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},R.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},R.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},R.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},R.prototype.getCopyText=function(){var A=this.getSelectedText(),I=this.session.doc.getNewLineCharacter(),P=!1;if(!A&&this.$copyWithEmptySelection){P=!0;for(var z=this.selection.getAllRanges(),B=0;B<z.length;B++){var V=z[B];B&&z[B-1].start.row==V.start.row||(A+=this.session.getLine(V.start.row)+I)}}var K={text:A};return this._signal("copy",K),M.lineMode=P?K.text:!1,K.text},R.prototype.onCopy=function(){this.commands.exec("copy",this)},R.prototype.onCut=function(){this.commands.exec("cut",this)},R.prototype.onPaste=function(A,I){var P={text:A,event:I};this.commands.exec("paste",this,P)},R.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var I=A.text,P=I===M.lineMode,z=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)P?z.insert({row:this.selection.lead.row,column:0},I):this.insert(I);else if(P)this.selection.rangeList.ranges.forEach(function(Y){z.insert({row:Y.start.row,column:0},I)});else{var B=I.split(/\r\n|\r|\n/),V=this.selection.rangeList.ranges,K=B.length==2&&(!B[0]||!B[1]);if(B.length!=V.length||K)return this.commands.exec("insertstring",this,I);for(var q=V.length;q--;){var re=V[q];re.isEmpty()||z.remove(re),z.insert(re.start,B[q])}}},R.prototype.execCommand=function(A,I){return this.commands.exec(A,this,I)},R.prototype.insert=function(A,I){var P=this.session,z=P.getMode(),B=this.getCursorPosition();if(this.getBehavioursEnabled()&&!I){var V=z.transformAction(P.getState(B.row),"insertion",this,P,A);V&&(A!==V.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=V.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
`)==-1){var K=new w.fromPoints(B,B);K.end.column+=A.length,this.session.remove(K)}}else{var K=this.getSelectionRange();B=this.session.remove(K),this.clearSelection()}if(A==`
`||A==`\r
`){var Z=P.getLine(B.row);if(B.column>Z.search(/\S|$/)){var q=Z.substr(B.column).search(/\S|$/);P.doc.removeInLine(B.row,B.column,B.column+q)}}this.clearSelection();var re=B.column,Y=P.getState(B.row),Z=P.getLine(B.row),te=z.checkOutdent(Y,Z,A);if(P.insert(B,A),V&&V.selection&&(V.selection.length==2?this.selection.setSelectionRange(new w(B.row,re+V.selection[0],B.row,re+V.selection[1])):this.selection.setSelectionRange(new w(B.row+V.selection[0],V.selection[1],B.row+V.selection[2],V.selection[3]))),this.$enableAutoIndent){if(P.getDocument().isNewLine(A)){var ie=z.getNextLineIndent(Y,Z.slice(0,B.column),P.getTabString());P.insert({row:B.row+1,column:0},ie)}te&&z.autoOutdent(Y,P,B.row)}},R.prototype.autoIndent=function(){var A=this.session,I=A.getMode(),P,z;if(this.selection.isEmpty())P=0,z=A.doc.getLength()-1;else{var B=this.getSelectionRange();P=B.start.row,z=B.end.row}for(var V="",K="",q="",re,Y,Z,te=A.getTabString(),ie=P;ie<=z;ie++)ie>0&&(V=A.getState(ie-1),K=A.getLine(ie-1),q=I.getNextLineIndent(V,K,te)),re=A.getLine(ie),Y=I.$getIndent(re),q!==Y&&(Y.length>0&&(Z=new w(ie,0,ie,Y.length),A.remove(Z)),q.length>0&&A.insert({row:ie,column:0},q)),I.autoOutdent(V,A,ie)},R.prototype.onTextInput=function(A,I){if(!I)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var P=this.applyComposition.bind(this,A,I);this.selection.rangeCount?this.forEachSelection(P):P(),this.endOperation()},R.prototype.applyComposition=function(A,I){if(I.extendLeft||I.extendRight){var P=this.selection.getRange();P.start.column-=I.extendLeft,P.end.column+=I.extendRight,P.start.column<0&&(P.start.row--,P.start.column+=this.session.getLine(P.start.row).length+1),this.selection.setRange(P),!A&&!P.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),I.restoreStart||I.restoreEnd){var P=this.selection.getRange();P.start.column-=I.restoreStart,P.end.column-=I.restoreEnd,this.selection.setRange(P)}},R.prototype.onCommandKey=function(A,I,P){return this.keyBinding.onCommandKey(A,I,P)},R.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},R.prototype.getOverwrite=function(){return this.session.getOverwrite()},R.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},R.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},R.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},R.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},R.prototype.getDragDelay=function(){return this.getOption("dragDelay")},R.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},R.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},R.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},R.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},R.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},R.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},R.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},R.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},R.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},R.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},R.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},R.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},R.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},R.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},R.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},R.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},R.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},R.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},R.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},R.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},R.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},R.prototype.getReadOnly=function(){return this.getOption("readOnly")},R.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},R.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},R.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},R.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},R.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},R.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},R.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},R.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},R.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var I=this.getSelectionRange();if(this.getBehavioursEnabled()){var P=this.session,z=P.getState(I.start.row),B=P.getMode().transformAction(z,"deletion",this,P,I);if(I.end.column===0){var V=P.getTextRange(I);if(V[V.length-1]==`
`){var K=P.getLine(I.end.row);/^\s+$/.test(K)&&(I.end.column=K.length)}}B&&(I=B)}this.session.remove(I),this.clearSelection()},R.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},R.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},R.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},R.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},R.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(A)},R.prototype.setGhostText=function(A,I){this.session.widgetManager||(this.session.widgetManager=new y(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(A,I)},R.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},R.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),I=A.column;if(I!==0){var P=this.session.getLine(A.row),z,B;I<P.length?(z=P.charAt(I)+P.charAt(I-1),B=new w(A.row,I-1,A.row,I+1)):(z=P.charAt(I-1)+P.charAt(I-2),B=new w(A.row,I-2,A.row,I)),this.session.replace(B,z),this.session.selection.moveToPosition(B.end)}}},R.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var I=this.getSelectionRange(),P=this.session.getTextRange(I);this.session.replace(I,P.toLowerCase()),this.selection.setSelectionRange(A)},R.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var I=this.getSelectionRange(),P=this.session.getTextRange(I);this.session.replace(I,P.toUpperCase()),this.selection.setSelectionRange(A)},R.prototype.indent=function(){var A=this.session,I=this.getSelectionRange();if(I.start.row<I.end.row){var P=this.$getSelectedRows();A.indentRows(P.first,P.last," ");return}else if(I.start.column<I.end.column){var z=A.getTextRange(I);if(!/^\s+$/.test(z)){var P=this.$getSelectedRows();A.indentRows(P.first,P.last," ");return}}var B=A.getLine(I.start.row),V=I.start,K=A.getTabSize(),q=A.documentToScreenColumn(V.row,V.column);if(this.session.getUseSoftTabs())var re=K-q%K,Y=a.stringRepeat(" ",re);else{for(var re=q%K;B[I.start.column-1]==" "&&re;)I.start.column--,re--;this.selection.setSelectionRange(I),Y=" "}return this.insert(Y)},R.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},R.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},R.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),I=this.session,P=[],z=A.first;z<=A.last;z++)P.push(I.getLine(z));P.sort(function(K,q){return K.toLowerCase()<q.toLowerCase()?-1:K.toLowerCase()>q.toLowerCase()?1:0});for(var B=new w(0,0,0,0),z=A.first;z<=A.last;z++){var V=I.getLine(z);B.start.row=z,B.end.row=z,B.end.column=V.length,I.replace(B,P[z-A.first])}},R.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),I=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,I.first,I.last)},R.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),I=this.session.getState(A.row),P=this.getSelectionRange();this.session.getMode().toggleBlockComment(I,this.session,P,A)},R.prototype.getNumberAt=function(A,I){var P=/[\-]?[0-9]+(?:\.[0-9]+)?/g;P.lastIndex=0;for(var z=this.session.getLine(A);P.lastIndex<I;){var B=P.exec(z);if(B.index<=I&&B.index+B[0].length>=I){var V={value:B[0],start:B.index,end:B.index+B[0].length};return V}}return null},R.prototype.modifyNumber=function(A){var I=this.selection.getCursor().row,P=this.selection.getCursor().column,z=new w(I,P-1,I,P),B=this.session.getTextRange(z);if(!isNaN(parseFloat(B))&&isFinite(B)){var V=this.getNumberAt(I,P);if(V){var K=V.value.indexOf(".")>=0?V.start+V.value.indexOf(".")+1:V.end,q=V.start+V.value.length-K,re=parseFloat(V.value);re*=Math.pow(10,q),K!==V.end&&P<K?A*=Math.pow(10,V.end-P-1):A*=Math.pow(10,V.end-P),re+=A,re/=Math.pow(10,q);var Y=re.toFixed(q),Z=new w(I,V.start,I,V.end);this.session.replace(Z,Y),this.moveCursorTo(I,Math.max(V.start+1,P+Y.length-V.value.length))}}else this.toggleWord()},R.prototype.toggleWord=function(){var A=this.selection.getCursor().row,I=this.selection.getCursor().column;this.selection.selectWord();var P=this.getSelectedText(),z=this.selection.getWordRange().start.column,B=P.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),V=I-z-1;V<0&&(V=0);var K=0,q=0,re=this;P.match(/[A-Za-z0-9_]+/)&&B.forEach(function(_e,Re){q=K+_e.length,V>=K&&V<=q&&(P=_e,re.selection.clearSelection(),re.moveCursorTo(A,K+z),re.selection.selectTo(A,q+z)),K=q});for(var Y=this.$toggleWordPairs,Z,te=0;te<Y.length;te++)for(var ie=Y[te],ce=0;ce<=1;ce++){var he=+!ce,ve=P.match(new RegExp("^\\s?_?("+a.escapeRegExp(ie[ce])+")\\s?$","i"));if(ve){var Ce=P.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(ve[1])+")($|\\s)","g"));Ce&&(Z=P.replace(new RegExp(a.escapeRegExp(ie[ce]),"i"),function(_e){var Re=ie[he];return _e.toUpperCase()==_e?Re=Re.toUpperCase():_e.charAt(0).toUpperCase()==_e.charAt(0)&&(Re=Re.substr(0,0)+ie[he].charAt(0).toUpperCase()+Re.substr(1)),Re}),this.insert(Z),Z="")}}},R.prototype.findLinkAt=function(A,I){var P,z,B=this.session.getLine(A),V=B.split(/((?:https?|ftp):\/\/[\S]+)/),K=I;K<0&&(K=0);var q=0,re=0,Y;try{for(var Z=o(V),te=Z.next();!te.done;te=Z.next()){var ie=te.value;if(re=q+ie.length,K>=q&&K<=re&&ie.match(/((?:https?|ftp):\/\/[\S]+)/)){Y=ie.replace(/[\s:.,'";}\]]+$/,"");break}q=re}}catch(ce){P={error:ce}}finally{try{te&&!te.done&&(z=Z.return)&&z.call(Z)}finally{if(P)throw P.error}}return Y},R.prototype.openLink=function(){var A=this.selection.getCursor(),I=this.findLinkAt(A.row,A.column);return I&&window.open(I,"_blank"),I!=null},R.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},R.prototype.duplicateSelection=function(){var A=this.selection,I=this.session,P=A.getRange(),z=A.isBackwards();if(P.isEmpty()){var B=P.start.row;I.duplicateLines(B,B)}else{var V=z?P.start:P.end,K=I.insert(V,I.getTextRange(P),!1);P.start=V,P.end=K,A.setSelectionRange(P,z)}},R.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},R.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},R.prototype.moveText=function(A,I,P){return this.session.moveText(A,I,P)},R.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},R.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},R.prototype.$moveLines=function(A,I){var P,z,B=this.selection;if(!B.inMultiSelectMode||this.inVirtualSelectionMode){var V=B.toOrientedRange();P=this.$getSelectedRows(V),z=this.session.$moveLines(P.first,P.last,I?0:A),I&&A==-1&&(z=0),V.moveBy(z,0),B.fromOrientedRange(V)}else{var K=B.rangeList.ranges;B.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var q=0,re=0,Y=K.length,Z=0;Z<Y;Z++){var te=Z;K[Z].moveBy(q,0),P=this.$getSelectedRows(K[Z]);for(var ie=P.first,ce=P.last;++Z<Y;){re&&K[Z].moveBy(re,0);var he=this.$getSelectedRows(K[Z]);if(I&&he.first!=ce)break;if(!I&&he.first>ce+1)break;ce=he.last}for(Z--,q=this.session.$moveLines(ie,ce,I?0:A),I&&A==-1&&(te=Z+1);te<=Z;)K[te].moveBy(q,0),te++;I||(q=0),re+=q}B.fromOrientedRange(B.ranges[0]),B.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},R.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},R.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},R.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},R.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},R.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},R.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},R.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},R.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},R.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},R.prototype.$moveByPage=function(A,I){var P=this.renderer,z=this.renderer.layerConfig,B=A*Math.floor(z.height/z.lineHeight);I===!0?this.selection.$moveSelection(function(){this.moveCursorBy(B,0)}):I===!1&&(this.selection.moveCursorBy(B,0),this.selection.clearSelection());var V=P.scrollTop;P.scrollBy(0,B*z.lineHeight),I!=null&&P.scrollCursorIntoView(null,.5),P.animateScrolling(V)},R.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},R.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},R.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},R.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},R.prototype.scrollPageDown=function(){this.$moveByPage(1)},R.prototype.scrollPageUp=function(){this.$moveByPage(-1)},R.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},R.prototype.scrollToLine=function(A,I,P,z){this.renderer.scrollToLine(A,I,P,z)},R.prototype.centerSelection=function(){var A=this.getSelectionRange(),I={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(I,.5)},R.prototype.getCursorPosition=function(){return this.selection.getCursor()},R.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},R.prototype.getSelectionRange=function(){return this.selection.getRange()},R.prototype.selectAll=function(){this.selection.selectAll()},R.prototype.clearSelection=function(){this.selection.clearSelection()},R.prototype.moveCursorTo=function(A,I){this.selection.moveCursorTo(A,I)},R.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},R.prototype.jumpToMatching=function(A,I){var P=this.getCursorPosition(),z=new b(this.session,P.row,P.column),B=z.getCurrentToken(),V=0;B&&B.type.indexOf("tag-name")!==-1&&(B=z.stepBackward());var K=B||z.stepForward();if(K){var q,re=!1,Y={},Z=P.column-K.start,te,ie={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(K.value.match(/[{}()\[\]]/g)){for(;Z<K.value.length&&!re;Z++)if(ie[K.value[Z]])switch(te=ie[K.value[Z]]+"."+K.type.replace("rparen","lparen"),isNaN(Y[te])&&(Y[te]=0),K.value[Z]){case"(":case"[":case"{":Y[te]++;break;case")":case"]":case"}":Y[te]--,Y[te]===-1&&(q="bracket",re=!0);break}}else K.type.indexOf("tag-name")!==-1&&(isNaN(Y[K.value])&&(Y[K.value]=0),B.value==="<"&&V>1?Y[K.value]++:B.value==="</"&&Y[K.value]--,Y[K.value]===-1&&(q="tag",re=!0));re||(B=K,V++,K=z.stepForward(),Z=0)}while(K&&!re);if(q){var ce,he;if(q==="bracket")ce=this.session.getBracketRange(P),ce||(ce=new w(z.getCurrentTokenRow(),z.getCurrentTokenColumn()+Z-1,z.getCurrentTokenRow(),z.getCurrentTokenColumn()+Z-1),he=ce.start,(I||he.row===P.row&&Math.abs(he.column-P.column)<2)&&(ce=this.session.getBracketRange(he)));else if(q==="tag"){if(!K||K.type.indexOf("tag-name")===-1)return;if(ce=new w(z.getCurrentTokenRow(),z.getCurrentTokenColumn()-2,z.getCurrentTokenRow(),z.getCurrentTokenColumn()-2),ce.compare(P.row,P.column)===0){var ve=this.session.getMatchingTags(P);ve&&(ve.openTag.contains(P.row,P.column)?(ce=ve.closeTag,he=ce.start):(ce=ve.openTag,ve.closeTag.start.row===P.row&&ve.closeTag.start.column===P.column?he=ce.end:he=ce.start))}he=he||ce.start}he=ce&&ce.cursor||he,he&&(A?ce&&I?this.selection.setRange(ce):ce&&ce.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(he.row,he.column):this.selection.moveTo(he.row,he.column))}}},R.prototype.gotoLine=function(A,I,P){this.selection.clearSelection(),this.session.unfold({row:A-1,column:I||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,I||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,P)},R.prototype.navigateTo=function(A,I){this.selection.moveTo(A,I)},R.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var I=this.selection.anchor.getPosition();return this.moveCursorToPosition(I)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},R.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var I=this.selection.anchor.getPosition();return this.moveCursorToPosition(I)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},R.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var I=this.getSelectionRange().start;this.moveCursorToPosition(I)}this.clearSelection()},R.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var I=this.getSelectionRange().end;this.moveCursorToPosition(I)}this.clearSelection()},R.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},R.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},R.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},R.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},R.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},R.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},R.prototype.replace=function(A,I){I&&this.$search.set(I);var P=this.$search.find(this.session),z=0;return P&&(this.$tryReplace(P,A)&&(z=1),this.selection.setSelectionRange(P),this.renderer.scrollSelectionIntoView(P.start,P.end)),z},R.prototype.replaceAll=function(A,I){I&&this.$search.set(I);var P=this.$search.findAll(this.session),z=0;if(!P.length)return z;var B=this.getSelectionRange();this.selection.moveTo(0,0);for(var V=P.length-1;V>=0;--V)this.$tryReplace(P[V],A)&&z++;return this.selection.setSelectionRange(B),z},R.prototype.$tryReplace=function(A,I){var P=this.session.getTextRange(A);return I=this.$search.replace(P,I),I!==null?(A.end=this.session.replace(A,I),A):null},R.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},R.prototype.find=function(A,I,P){I||(I={}),typeof A=="string"||A instanceof RegExp?I.needle=A:typeof A=="object"&&l.mixin(I,A);var z=this.selection.getRange();I.needle==null&&(A=this.session.getTextRange(z)||this.$search.$options.needle,A||(z=this.session.getWordRange(z.start.row,z.start.column),A=this.session.getTextRange(z)),this.$search.set({needle:A})),this.$search.set(I),I.start||this.$search.set({start:z});var B=this.$search.find(this.session);if(I.preventScroll)return B;if(B)return this.revealRange(B,P),B;I.backwards?z.start=z.end:z.end=z.start,this.selection.setRange(z)},R.prototype.findNext=function(A,I){this.find({skipCurrent:!0,backwards:!1},A,I)},R.prototype.findPrevious=function(A,I){this.find(A,{skipCurrent:!0,backwards:!0},I)},R.prototype.revealRange=function(A,I){this.session.unfold(A),this.selection.setSelectionRange(A);var P=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),I!==!1&&this.renderer.animateScrolling(P)},R.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},R.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},R.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.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()},R.prototype.setAutoScrollEditorIntoView=function(A){if(A){var I,P=this,z=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var B=this.$scrollAnchor;B.style.cssText="position:absolute",this.container.insertBefore(B,this.container.firstChild);var V=this.on("changeSelection",function(){z=!0}),K=this.renderer.on("beforeRender",function(){z&&(I=P.renderer.container.getBoundingClientRect())}),q=this.renderer.on("afterRender",function(){if(z&&I&&(P.isFocused()||P.searchBox&&P.searchBox.isFocused())){var re=P.renderer,Y=re.$cursorLayer.$pixelPos,Z=re.layerConfig,te=Y.top-Z.offset;Y.top>=0&&te+I.top<0?z=!0:Y.top<Z.height&&Y.top+I.top+Z.lineHeight>window.innerHeight?z=!1:z=null,z!=null&&(B.style.top=te+"px",B.style.left=Y.left+"px",B.style.height=Z.lineHeight+"px",B.scrollIntoView(z)),z=I=null}});this.setAutoScrollEditorIntoView=function(re){re||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",V),this.renderer.off("afterRender",q),this.renderer.off("beforeRender",K))}}},R.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",I=this.renderer.$cursorLayer;I&&(I.setSmoothBlinking(/smooth/.test(A)),I.isBlinking=!this.$readOnly&&A!="wide",d.setCssClass(I.element,"ace_slim-cursors",/slim/.test(A)))},R.prototype.prompt=function(A,I,P){var z=this;v.loadModule("ace/ext/prompt",function(B){B.prompt(z,A,I,P)})},R}();k.$uid=0,k.prototype.curOp=null,k.prototype.prevOp={},k.prototype.$mergeableCommands=["backspace","del","insertstring"],k.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"],["&&","||"],["==","!="]],l.implement(k.prototype,x),v.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(R){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:R})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(R){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(R){this.textInput.setReadOnly(R),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(R){this.textInput.setCopyWithEmptySelection(R)},initialValue:!1},cursorStyle:{set:function(R){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(R){this.setAutoScrollEditorIntoView(R)}},keyboardHandler:{set:function(R){this.setKeyboardHandler(R)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(R){this.session.setValue(R)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(R){this.setSession(R)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(R){this.renderer.$gutterLayer.setShowLineNumbers(R),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),R&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(R){this.$showLineNumbers&&R?O.attach(this):O.detach(this)}},placeholder:{set:function(R){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var I=d.createElement("div");I.className="ace_placeholder",I.textContent=this.$placeholder||"",this.renderer.placeholderNode=I,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(R){var A={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},I=function(z){if(z.target==this.renderer.scroller&&z.keyCode===C.enter){z.preventDefault();var B=this.getCursorPosition().row;this.isRowVisible(B)||this.scrollToLine(B,!0,!0),this.focus()}},P;R?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",I.bind(this)),this.commands.addCommand(A),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",E("editor")),this.renderer.$gutter.setAttribute("aria-label",E("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),P||(P=new m(this)),P.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",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",I.bind(this)),this.commands.removeCommand(A),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),P&&P.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 O={getText:function(R,A){return(Math.abs(R.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(R,A,I){return Math.max(A.toString().length,(I.lastRow+1).toString().length,2)*I.characterWidth},update:function(R,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(R){R.renderer.$gutterLayer.$renderer=this,R.on("changeSelection",this.update),this.update(null,R)},detach:function(R){R.renderer.$gutterLayer.$renderer==this&&(R.renderer.$gutterLayer.$renderer=null),R.off("changeSelection",this.update),this.update(null,R)}};r.Editor=k}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,i){var o=function(){function b(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return b.prototype.addSession=function(y){this.$session=y},b.prototype.add=function(y,m,E){if(!this.$fromUndo&&y!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),m===!1||!this.lastDeltas){this.lastDeltas=[];var M=this.$undoStack.length;M>this.$undoDepth-1&&this.$undoStack.splice(0,M-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),y.id=this.$rev=++this.$maxRev}(y.action=="remove"||y.action=="insert")&&(this.$lastDelta=y),this.lastDeltas.push(y)}},b.prototype.addSelection=function(y,m){this.selections.push({value:y,rev:m||this.$rev})},b.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},b.prototype.markIgnored=function(y,m){m==null&&(m=this.$rev+1);for(var E=this.$undoStack,M=E.length;M--;){var C=E[M][0];if(C.id<=y)break;C.id<m&&(C.ignore=!0)}this.lastDeltas=null},b.prototype.getSelection=function(y,m){for(var E=this.selections,M=E.length;M--;){var C=E[M];if(C.rev<y)return m&&(C=E[M+1]),C}},b.prototype.getRevision=function(){return this.$rev},b.prototype.getDeltas=function(y,m){m==null&&(m=this.$rev+1);for(var E=this.$undoStack,M=null,C=0,k=E.length;k--;){var O=E[k][0];if(O.id<m&&!M&&(M=k+1),O.id<=y){C=k+1;break}}return E.slice(C,M)},b.prototype.getChangedRanges=function(y,m){m==null&&(m=this.$rev+1)},b.prototype.getChangedLines=function(y,m){m==null&&(m=this.$rev+1)},b.prototype.undo=function(y,m){this.lastDeltas=null;var E=this.$undoStack;if(l(E,E.length)){y||(y=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var M=E.pop(),C=null;return M&&(C=y.undoChanges(M,m),this.$redoStack.push(M),this.$syncRev()),this.$fromUndo=!1,C}},b.prototype.redo=function(y,m){if(this.lastDeltas=null,y||(y=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var E=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);v(this.$redoStack,E),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(k){k[0].id=++this.$maxRev},this)}var M=this.$redoStack.pop(),C=null;return M&&(C=y.redoChanges(M,m),this.$undoStack.push(M),this.$syncRev()),this.$fromUndo=!1,C},b.prototype.$syncRev=function(){var y=this.$undoStack,m=y[y.length-1],E=m&&m[0].id||0;this.$redoStackBaseRev=E,this.$rev=E},b.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},b.prototype.canUndo=function(){return this.$undoStack.length>0},b.prototype.canRedo=function(){return this.$redoStack.length>0},b.prototype.bookmark=function(y){y==null&&(y=this.$rev),this.mark=y},b.prototype.isAtBookmark=function(){return this.$rev===this.mark},b.prototype.toJSON=function(){},b.prototype.fromJSON=function(){},b.prototype.$prettyPrint=function(y){return y?u(y):u(this.$undoStack)+`
---
`+u(this.$redoStack)},b}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;function l(b,y){for(var m=y;m--;){var E=b[m];if(E&&!E[0].ignore){for(;m<y-1;){var M=p(b[m],b[m+1]);b[m]=M[0],b[m+1]=M[1],m++}return!0}}}var d=n("./range").Range,a=d.comparePoints;d.comparePoints;function c(b){return{row:b.row,column:b.column}}function s(b){return{start:c(b.start),end:c(b.end),action:b.action,lines:b.lines.slice()}}function u(b){if(b=b||this,Array.isArray(b))return b.map(u).join(`
`);var y="";return b.action?(y=b.action=="insert"?"+":"-",y+="["+b.lines+"]"):b.value&&(Array.isArray(b.value)?y=b.value.map(f).join(`
`):y=f(b.value)),b.start&&(y+=f(b)),(b.id||b.rev)&&(y+=" ("+(b.id||b.rev)+")"),y}function f(b){return b.start.row+":"+b.start.column+"=>"+b.end.row+":"+b.end.column}function h(b,y){var m=b.action=="insert",E=y.action=="insert";if(m&&E)if(a(y.start,b.end)>=0)w(y,b,-1);else if(a(y.start,b.start)<=0)w(b,y,1);else return null;else if(m&&!E)if(a(y.start,b.end)>=0)w(y,b,-1);else if(a(y.end,b.start)<=0)w(b,y,-1);else return null;else if(!m&&E)if(a(y.start,b.start)>=0)w(y,b,1);else if(a(y.start,b.start)<=0)w(b,y,1);else return null;else if(!m&&!E)if(a(y.start,b.start)>=0)w(y,b,1);else if(a(y.end,b.start)<=0)w(b,y,-1);else return null;return[y,b]}function p(b,y){for(var m=b.length;m--;)for(var E=0;E<y.length;E++)if(!h(b[m],y[E])){for(;m<b.length;){for(;E--;)h(y[E],b[m]);E=y.length,m++}return[b,y]}return b.selectionBefore=y.selectionBefore=b.selectionAfter=y.selectionAfter=null,[y,b]}function g(b,y){var m=b.action=="insert",E=y.action=="insert";if(m&&E)a(b.start,y.start)<0?w(y,b,1):w(b,y,1);else if(m&&!E)a(b.start,y.end)>=0?w(b,y,-1):(a(b.start,y.start)<=0||w(b,d.fromPoints(y.start,b.start),-1),w(y,b,1));else if(!m&&E)a(y.start,b.end)>=0?w(y,b,-1):(a(y.start,b.start)<=0||w(y,d.fromPoints(b.start,y.start),-1),w(b,y,1));else if(!m&&!E)if(a(y.start,b.end)>=0)w(y,b,-1);else if(a(y.end,b.start)<=0)w(b,y,-1);else{var M,C;return a(b.start,y.start)<0&&(M=b,b=S(b,y.start)),a(b.end,y.end)>0&&(C=S(b,y.end)),x(y.end,b.start,b.end,-1),C&&!M&&(b.lines=C.lines,b.start=C.start,b.end=C.end,C=b),[y,M,C].filter(Boolean)}return[y,b]}function w(b,y,m){x(b.start,y.start,y.end,m),x(b.end,y.start,y.end,m)}function x(b,y,m,E){b.row==(E==1?y:m).row&&(b.column+=E*(m.column-y.column)),b.row+=E*(m.row-y.row)}function S(b,y){var m=b.lines,E=b.end;b.end=c(y);var M=b.end.row-b.start.row,C=m.splice(M,m.length),k=M?y.column:y.column-b.start.column;m.push(C[0].substring(0,k)),C[0]=C[0].substr(k);var O={start:c(y),end:E,lines:C,action:b.action};return O}function T(b,y){y=s(y);for(var m=b.length;m--;){for(var E=b[m],M=0;M<E.length;M++){var C=E[M],k=g(C,y);y=k[0],k.length!=2&&(k[2]?(E.splice(M+1,1,k[1],k[2]),M++):k[1]||(E.splice(M,1),M--))}E.length||b.splice(m,1)}return b}function v(b,y){for(var m=0;m<y.length;m++)for(var E=y[m],M=0;M<E.length;M++)T(b,E[M])}r.UndoManager=o}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),l=function(){function d(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(a){o.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(a,c,s){var u=c.firstRowScreen*c.lineHeight,f=Math.floor(u/this.canvasHeight),h=s.documentToScreenRow(a,0)*c.lineHeight;return h-f*this.canvasHeight},d.prototype.computeLineHeight=function(a,c,s){return c.lineHeight*s.getRowLineCount(a)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(a){return this.cells[a]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=o.createFragment(this.element),s=0;s<a.length;s++)c.appendChild(a[s].element);this.element.appendChild(c)}else this.cells.push(a),this.element.appendChild(a.element)},d.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var c=o.createFragment(this.element),s=0;s<a.length;s++)c.appendChild(a[s].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},d.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},d.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},d.prototype.createCell=function(a,c,s,u){var f=this.cellCache.pop();if(!f){var h=o.createElement("div");u&&u(h),this.element.appendChild(h),f={element:h,text:"",row:a}}return f.row=a,f},d}();r.Lines=l}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,i){var o=n("../lib/dom"),l=n("../lib/oop"),d=n("../lib/lang"),a=n("../lib/event_emitter").EventEmitter,c=n("./lines").Lines,s=n("../config").nls,u=function(){function h(p){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",p.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}return h.prototype.setSession=function(p){this.session&&this.session.off("change",this.$updateAnnotations),this.session=p,p&&p.on("change",this.$updateAnnotations)},h.prototype.addGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(p,g)},h.prototype.removeGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(p,g)},h.prototype.setAnnotations=function(p){this.$annotations=[];for(var g=0;g<p.length;g++){var w=p[g],x=w.row,S=this.$annotations[x];S||(S=this.$annotations[x]={text:[],type:[]});var T=w.text,v=w.type;T=T?d.escapeHTML(T):w.html||"",S.text.indexOf(T)===-1&&(S.text.push(T),S.type.push(v));var b=w.className;b?S.className=b:v=="error"?S.className=" ace_error":v=="warning"&&S.className!=" ace_error"?S.className=" ace_warning":v=="info"&&!S.className&&(S.className=" ace_info")}},h.prototype.$updateAnnotations=function(p){if(this.$annotations.length){var g=p.start.row,w=p.end.row-g;if(w!==0)if(p.action=="remove")this.$annotations.splice(g,w+1,null);else{var x=new Array(w+1);x.unshift(g,1),this.$annotations.splice.apply(this.$annotations,x)}}},h.prototype.update=function(p){this.config=p;var g=this.session,w=p.firstRow,x=Math.min(p.lastRow+p.gutterOffset,g.getLength()-1);this.oldLastRow=x,this.config=p,this.$lines.moveContainer(p),this.$updateCursorRow();for(var S=g.getNextFoldLine(w),T=S?S.start.row:1/0,v=null,b=-1,y=w;;){if(y>T&&(y=S.end.row+1,S=g.getNextFoldLine(y,S),T=S?S.start.row:1/0),y>x){for(;this.$lines.getLength()>b+1;)this.$lines.pop();break}v=this.$lines.get(++b),v?v.row=y:(v=this.$lines.createCell(y,p,this.session,f),this.$lines.push(v)),this.$renderCell(v,p,S,y),y++}this._signal("afterRender"),this.$updateGutterWidth(p)},h.prototype.$updateGutterWidth=function(p){var g=this.session,w=g.gutterRenderer||this.$renderer,x=g.$firstLineNumber,S=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(S=g.getLength()+x-1);var T=w?w.getWidth(g,S,p):S.toString().length*p.characterWidth,v=this.$padding||this.$computePadding();T+=v.left+v.right,T!==this.gutterWidth&&!isNaN(T)&&(this.gutterWidth=T,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",T))},h.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},h.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var w=0;w<g.length;w++){var x=g[w];if(x.row>=this.$cursorRow){if(x.row>this.$cursorRow){var S=this.session.getFoldLine(this.$cursorRow);if(w>0&&S&&S.start.row==g[w-1].row)x=g[w-1];else break}x.element.className="ace_gutter-active-line "+x.element.className,this.$cursorCell=x;break}}}}},h.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var w=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),x=this.oldLastRow;if(this.oldLastRow=w,!g||x<p.firstRow)return this.update(p);if(w<g.firstRow)return this.update(p);if(g.firstRow<p.firstRow)for(var S=this.session.getFoldedRowCount(g.firstRow,p.firstRow-1);S>0;S--)this.$lines.shift();if(x>w)for(var S=this.session.getFoldedRowCount(w+1,x);S>0;S--)this.$lines.pop();p.firstRow<g.firstRow&&this.$lines.unshift(this.$renderLines(p,p.firstRow,g.firstRow-1)),w>x&&this.$lines.push(this.$renderLines(p,x+1,w)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},h.prototype.$renderLines=function(p,g,w){for(var x=[],S=g,T=this.session.getNextFoldLine(S),v=T?T.start.row:1/0;S>v&&(S=T.end.row+1,T=this.session.getNextFoldLine(S,T),v=T?T.start.row:1/0),!(S>w);){var b=this.$lines.createCell(S,p,this.session,f);this.$renderCell(b,p,T,S),x.push(b),S++}return x},h.prototype.$renderCell=function(p,g,w,x){var S=p.element,T=this.session,v=S.childNodes[0],b=S.childNodes[1],y=S.childNodes[2],m=y.firstChild,E=T.$firstLineNumber,M=T.$breakpoints,C=T.$decorations,k=T.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&T.foldWidgets,R=w?w.start.row:Number.MAX_VALUE,A=g.lineHeight+"px",I=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",P=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",z=(k?k.getText(T,x):x+E).toString();if(this.$highlightGutterLine&&(x==this.$cursorRow||w&&x<this.$cursorRow&&x>=R&&this.$cursorRow<=w.end.row)&&(I+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),M[x]&&(I+=M[x]),C[x]&&(I+=C[x]),this.$annotations[x]&&x!==R&&(I+=this.$annotations[x].className),S.className!=I&&(S.className=I),O){var B=O[x];B==null&&(B=O[x]=T.getFoldWidget(x))}if(B){var I="ace_fold-widget ace_"+B;if(B=="start"&&x==R&&x<w.end.row){I+=" ace_closed";for(var V,K=!1,q=x+1;q<=w.end.row;q++)if(this.$annotations[q]){if(this.$annotations[q].className===" ace_error"){K=!0,V=" ace_error_fold";break}if(this.$annotations[q].className===" ace_warning"){K=!0,V=" ace_warning_fold";continue}}S.className+=V}else I+=" ace_open";b.className!=I&&(b.className=I),o.setStyle(b.style,"height",A),o.setStyle(b.style,"display","inline-block"),b.setAttribute("role","button"),b.setAttribute("tabindex","-1");var w=T.getFoldLine(z-1);w?(b.setAttribute("aria-label",s("Unfold rows $0 to $1",[z,w.end.row+1])),b.setAttribute("title",s("Unfold code"))):(b.setAttribute("aria-label",s("Fold at row $0",[z])),b.setAttribute("title",s("Fold code")))}else b&&(o.setStyle(b.style,"display","none"),b.setAttribute("tabindex","0"),b.removeAttribute("role"),b.removeAttribute("aria-label"));return K&&this.$showFoldedAnnotations?(y.className="ace_gutter_annotation",m.className=P,m.className+=V,o.setStyle(m.style,"height",A),o.setStyle(y.style,"display","block"),o.setStyle(y.style,"height",A),y.setAttribute("aria-label",s("Read annotations row $0",[z])),y.setAttribute("tabindex","-1"),y.setAttribute("role","button")):this.$annotations[x]?(y.className="ace_gutter_annotation",m.className=P,this.$useSvgGutterIcons?m.className+=this.$annotations[x].className:S.classList.add(this.$annotations[x].className.replace(" ","")),o.setStyle(m.style,"height",A),o.setStyle(y.style,"display","block"),o.setStyle(y.style,"height",A),y.setAttribute("aria-label",s("Read annotations row $0",[z])),y.setAttribute("tabindex","-1"),y.setAttribute("role","button")):(o.setStyle(y.style,"display","none"),y.removeAttribute("aria-label"),y.removeAttribute("role"),y.setAttribute("tabindex","0")),z!==v.data&&(v.data=z),o.setStyle(p.element.style,"height",this.$lines.computeLineHeight(x,g,T)+"px"),o.setStyle(p.element.style,"top",this.$lines.computeLineTop(x,g,T)+"px"),p.text=z,y.style.display==="none"&&b.style.display==="none"?p.element.setAttribute("aria-hidden",!0):p.element.setAttribute("aria-hidden",!1),p},h.prototype.setHighlightGutterLine=function(p){this.$highlightGutterLine=p},h.prototype.setShowLineNumbers=function(p){this.$renderer=!p&&{getWidth:function(){return 0},getText:function(){return""}}},h.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},h.prototype.setShowFoldWidgets=function(p){p?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=p,this.$padding=null},h.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},h.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var p=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(p.borderLeftWidth)||0)+(parseInt(p.paddingLeft)||0)+1,this.$padding.right=(parseInt(p.borderRightWidth)||0)+(parseInt(p.paddingRight)||0),this.$padding},h.prototype.getRegion=function(p){var g=this.$padding||this.$computePadding(),w=this.element.getBoundingClientRect();if(p.x<g.left+w.left)return"markers";if(this.$showFoldWidgets&&p.x>w.right-g.right)return"foldWidgets"},h}();u.prototype.$fixedWidth=!1,u.prototype.$highlightGutterLine=!0,u.prototype.$renderer="",u.prototype.$showLineNumbers=!0,u.prototype.$showFoldWidgets=!0,l.implement(u.prototype,a);function f(h){var p=document.createTextNode("");h.appendChild(p);var g=o.createElement("span");h.appendChild(g);var w=o.createElement("span");h.appendChild(w);var x=o.createElement("span");return w.appendChild(x),h}r.Gutter=u}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,i){var o=n("../range").Range,l=n("../lib/dom"),d=function(){function c(s){this.element=l.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return c.prototype.setPadding=function(s){this.$padding=s},c.prototype.setSession=function(s){this.session=s},c.prototype.setMarkers=function(s){this.markers=s},c.prototype.elt=function(s,u){var f=this.i!=-1&&this.element.childNodes[this.i];f?this.i++:(f=document.createElement("div"),this.element.appendChild(f),this.i=-1),f.style.cssText=u,f.className=s},c.prototype.update=function(s){if(s){this.config=s,this.i=0;var u;for(var f in this.markers){var h=this.markers[f];if(!h.range){h.update(u,this,this.session,s);continue}var p=h.range.clipRows(s.firstRow,s.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),h.renderer){var g=this.$getTop(p.start.row,s),w=this.$padding+p.start.column*s.characterWidth;h.renderer(u,p,w,g,s)}else h.type=="fullLine"?this.drawFullLineMarker(u,p,h.clazz,s):h.type=="screenLine"?this.drawScreenLineMarker(u,p,h.clazz,s):p.isMultiLine()?h.type=="text"?this.drawTextMarker(u,p,h.clazz,s):this.drawMultiLineMarker(u,p,h.clazz,s):this.drawSingleLineMarker(u,p,h.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(s,u){return(s-u.firstRowScreen)*u.lineHeight},c.prototype.drawTextMarker=function(s,u,f,h,p){for(var g=this.session,w=u.start.row,x=u.end.row,S=w,T=0,v=0,b=g.getScreenLastRowColumn(S),y=new o(S,u.start.column,S,v);S<=x;S++)y.start.row=y.end.row=S,y.start.column=S==w?u.start.column:g.getRowWrapIndent(S),y.end.column=b,T=v,v=b,b=S+1<x?g.getScreenLastRowColumn(S+1):S==x?0:u.end.column,this.drawSingleLineMarker(s,y,f+(S==w?" ace_start":"")+" ace_br"+a(S==w||S==w+1&&u.start.column,T<v,v>b,S==x),h,S==x?0:1,p)},c.prototype.drawMultiLineMarker=function(s,u,f,h,p){var g=this.$padding,w=h.lineHeight,x=this.$getTop(u.start.row,h),S=g+u.start.column*h.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(u.start.row)){var T=u.clone();T.end.row=T.start.row,T.end.column=this.session.getLine(T.start.row).length,this.drawBidiSingleLineMarker(s,T,f+" ace_br1 ace_start",h,null,p)}else this.elt(f+" ace_br1 ace_start","height:"+w+"px;right:0;top:"+x+"px;left:"+S+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(u.end.row)){var T=u.clone();T.start.row=T.end.row,T.start.column=0,this.drawBidiSingleLineMarker(s,T,f+" ace_br12",h,null,p)}else{x=this.$getTop(u.end.row,h);var v=u.end.column*h.characterWidth;this.elt(f+" ace_br12","height:"+w+"px;width:"+v+"px;top:"+x+"px;left:"+g+"px;"+(p||""))}if(w=(u.end.row-u.start.row-1)*h.lineHeight,!(w<=0)){x=this.$getTop(u.start.row+1,h);var b=(u.start.column?1:0)|(u.end.column?0:8);this.elt(f+(b?" ace_br"+b:""),"height:"+w+"px;right:0;top:"+x+"px;left:"+g+"px;"+(p||""))}},c.prototype.drawSingleLineMarker=function(s,u,f,h,p,g){if(this.session.$bidiHandler.isBidiRow(u.start.row))return this.drawBidiSingleLineMarker(s,u,f,h,p,g);var w=h.lineHeight,x=(u.end.column+(p||0)-u.start.column)*h.characterWidth,S=this.$getTop(u.start.row,h),T=this.$padding+u.start.column*h.characterWidth;this.elt(f,"height:"+w+"px;width:"+x+"px;top:"+S+"px;left:"+T+"px;"+(g||""))},c.prototype.drawBidiSingleLineMarker=function(s,u,f,h,p,g){var w=h.lineHeight,x=this.$getTop(u.start.row,h),S=this.$padding,T=this.session.$bidiHandler.getSelections(u.start.column,u.end.column);T.forEach(function(v){this.elt(f,"height:"+w+"px;width:"+(v.width+(p||0))+"px;top:"+x+"px;left:"+(S+v.left)+"px;"+(g||""))},this)},c.prototype.drawFullLineMarker=function(s,u,f,h,p){var g=this.$getTop(u.start.row,h),w=h.lineHeight;u.start.row!=u.end.row&&(w+=this.$getTop(u.end.row,h)-g),this.elt(f,"height:"+w+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c.prototype.drawScreenLineMarker=function(s,u,f,h,p){var g=this.$getTop(u.start.row,h),w=h.lineHeight;this.elt(f,"height:"+w+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c}();d.prototype.$padding=0;function a(c,s,u,f){return(c?1:0)|(s?2:0)|(u?4:0)|(f?8:0)}r.Marker=d}),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,i){var o=n("../lib/oop"),l=n("../lib/dom"),d=n("../lib/lang"),a=n("./lines").Lines,c=n("../lib/event_emitter").EventEmitter,s=n("../config").nls,u=function(){function f(h){this.dom=l,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",h.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return f.prototype.$updateEolChar=function(){var h=this.session.doc,p=h.getNewLineCharacter()==`
`&&h.getNewLineMode()!="windows",g=p?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},f.prototype.setPadding=function(h){this.$padding=h,this.element.style.margin="0 "+h+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(h){this.$fontMetrics=h,this.$fontMetrics.on("changeCharacterSize",function(p){this._signal("changeCharacterSize",p)}.bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(h){this.session=h,h&&this.$computeTabString()},f.prototype.setShowInvisibles=function(h){return this.showInvisibles==h?!1:(this.showInvisibles=h,typeof h=="string"?(this.showSpaces=/tab/i.test(h),this.showTabs=/space/i.test(h),this.showEOL=/eol/i.test(h)):this.showSpaces=this.showTabs=this.showEOL=h,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(h){return this.displayIndentGuides==h?!1:(this.displayIndentGuides=h,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(h){return this.$highlightIndentGuides===h?!1:(this.$highlightIndentGuides=h,h)},f.prototype.$computeTabString=function(){var h=this.session.getTabSize();this.tabSize=h;for(var p=this.$tabStrings=[0],g=1;g<h+1;g++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=d.stringRepeat(this.TAB_CHAR,g),p.push(w)}else p.push(this.dom.createTextNode(d.stringRepeat(" ",g),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",S=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?d.stringRepeat(this.SPACE_CHAR,this.tabSize):d.stringRepeat(" ",this.tabSize),v=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?d.stringRepeat(this.TAB_CHAR,this.tabSize):T,w=this.dom.createElement("span");w.className=x+S,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+v,w.textContent=b,this.$tabStrings[" "]=w}},f.prototype.updateLines=function(h,p,g){if(this.config.lastRow!=h.lastRow||this.config.firstRow!=h.firstRow)return this.update(h);this.config=h;for(var w=Math.max(p,h.firstRow),x=Math.min(g,h.lastRow),S=this.element.childNodes,T=0,b=h.firstRow;b<w;b++){var y=this.session.getFoldLine(b);if(y)if(y.containsRow(w)){w=y.start.row;break}else b=y.end.row;T++}for(var v=!1,b=w,y=this.session.getNextFoldLine(b),m=y?y.start.row:1/0;b>m&&(b=y.end.row+1,y=this.session.getNextFoldLine(b,y),m=y?y.start.row:1/0),!(b>x);){var E=S[T++];if(E){this.dom.removeChildren(E),this.$renderLine(E,b,b==m?y:!1),v&&(E.style.top=this.$lines.computeLineTop(b,h,this.session)+"px");var M=h.lineHeight*this.session.getRowLength(b)+"px";E.style.height!=M&&(v=!0,E.style.height=M)}b++}if(v)for(;T<this.$lines.cells.length;){var C=this.$lines.cells[T++];C.element.style.top=this.$lines.computeLineTop(C.row,h,this.session)+"px"}},f.prototype.scrollLines=function(h){var p=this.config;if(this.config=h,this.$lines.pageChanged(p,h))return this.update(h);this.$lines.moveContainer(h);var g=h.lastRow,w=p?p.lastRow:-1;if(!p||w<h.firstRow)return this.update(h);if(g<p.firstRow)return this.update(h);if(!p||p.lastRow<h.firstRow)return this.update(h);if(h.lastRow<p.firstRow)return this.update(h);if(p.firstRow<h.firstRow)for(var x=this.session.getFoldedRowCount(p.firstRow,h.firstRow-1);x>0;x--)this.$lines.shift();if(p.lastRow>h.lastRow)for(var x=this.session.getFoldedRowCount(h.lastRow+1,p.lastRow);x>0;x--)this.$lines.pop();h.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLinesFragment(h,h.firstRow,p.firstRow-1)),h.lastRow>p.lastRow&&this.$lines.push(this.$renderLinesFragment(h,p.lastRow+1,h.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(h,p,g){for(var w=[],x=p,S=this.session.getNextFoldLine(x),T=S?S.start.row:1/0;x>T&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),T=S?S.start.row:1/0),!(x>g);){var v=this.$lines.createCell(x,h,this.session),b=v.element;this.dom.removeChildren(b),l.setStyle(b.style,"height",this.$lines.computeLineHeight(x,h,this.session)+"px"),l.setStyle(b.style,"top",this.$lines.computeLineTop(x,h,this.session)+"px"),this.$renderLine(b,x,x==T?S:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",w.push(v),x++}return w},f.prototype.update=function(h){this.$lines.moveContainer(h),this.config=h;for(var p=h.firstRow,g=h.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(h,p,g))},f.prototype.$renderToken=function(h,p,g,w){for(var x=this,S=/(\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,T=this.dom.createFragment(this.element),v,b=0;v=S.exec(w);){var y=v[1],m=v[2],E=v[3],M=v[4],C=v[5];if(!(!x.showSpaces&&m)){var k=b!=v.index?w.slice(b,v.index):"";if(b=v.index+v[0].length,k&&T.appendChild(this.dom.createTextNode(k,this.element)),y){var O=x.session.getScreenTabSize(p+v.index);T.appendChild(x.$tabStrings[O].cloneNode(!0)),p+=O-1}else if(m)if(x.showSpaces){var R=this.dom.createElement("span");R.className="ace_invisible ace_invisible_space",R.textContent=d.stringRepeat(x.SPACE_CHAR,m.length),T.appendChild(R)}else T.appendChild(this.com.createTextNode(m,this.element));else if(E){var R=this.dom.createElement("span");R.className="ace_invisible ace_invisible_space ace_invalid",R.textContent=d.stringRepeat(x.SPACE_CHAR,E.length),T.appendChild(R)}else if(M){p+=1;var R=this.dom.createElement("span");R.style.width=x.config.characterWidth*2+"px",R.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",R.textContent=x.showSpaces?x.SPACE_CHAR:M,T.appendChild(R)}else if(C){p+=1;var R=this.dom.createElement("span");R.style.width=x.config.characterWidth*2+"px",R.className="ace_cjk",R.textContent=C,T.appendChild(R)}}}if(T.appendChild(this.dom.createTextNode(b?w.slice(b):w,this.element)),this.$textToken[g.type])h.appendChild(T);else{var A="ace_"+g.type.replace(/\./g," ace_"),R=this.dom.createElement("span");g.type=="fold"&&(R.style.width=g.value.length*this.config.characterWidth+"px",R.setAttribute("title",s("Unfold code"))),R.className=A,R.appendChild(T),h.appendChild(R)}return p+w.length},f.prototype.renderIndentGuide=function(h,p,g){var w=p.search(this.$indentGuideRe);if(w<=0||w>=g)return p;if(p[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,S=0;S<x;S++)h.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(w)}else if(p[0]==" "){for(var S=0;S<w;S++)h.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(w)}return this.$highlightIndentGuide(),p},f.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var h=this.session.doc.$lines;if(h){var p=this.session.selection.getCursor(),g=/^\s*/.exec(this.session.doc.getLine(p.row))[0].length,w=Math.floor(g/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:p.row};var x=this.session.$bracketHighlight;if(x){for(var S=this.session.$bracketHighlight.ranges,T=0;T<S.length;T++)if(p.row!==S[T].start.row){this.$highlightIndentGuideMarker.end=S[T].start.row,p.row>S[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&h[p.row]!==""&&p.column===h[p.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=p.row+1;T<h.length;T++){var v=h[T],b=/^\s*/.exec(v)[0].length;if(v!==""&&(this.$highlightIndentGuideMarker.end=T,b<=g))break}}this.$renderHighlightIndentGuide()}}},f.prototype.$clearActiveIndentGuide=function(){for(var h=this.$lines.cells,p=0;p<h.length;p++){var g=h[p],w=g.element.childNodes;if(w.length>0){for(var x=0;x<w.length;x++)if(w[x].classList&&w[x].classList.contains("ace_indent-guide-active")){w[x].classList.remove("ace_indent-guide-active");break}}}},f.prototype.$setIndentGuideActive=function(h,p){var g=this.session.doc.getLine(h.row);if(g!==""){var w=h.element.childNodes;if(w){var x=w[p-1];x&&x.classList&&x.classList.contains("ace_indent-guide")&&x.classList.add("ace_indent-guide-active")}}},f.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var h=this.$lines.cells;this.$clearActiveIndentGuide();var p=this.$highlightIndentGuideMarker.indentLevel;if(p!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g<h.length;g++){var w=h[g];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,p)}}else for(var g=h.length-1;g>=0;g--){var w=h[g];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,p)}}}},f.prototype.$createLineElement=function(h){var p=this.dom.createElement("div");return p.className="ace_line",p.style.height=this.config.lineHeight+"px",p},f.prototype.$renderWrappedLine=function(h,p,g){var w=0,x=0,S=g[0],T=0,v=this.$createLineElement();h.appendChild(v);for(var b=0;b<p.length;b++){var y=p[b],m=y.value;if(b==0&&this.displayIndentGuides){if(w=m.length,m=this.renderIndentGuide(v,m,S),!m)continue;w-=m.length}if(w+m.length<S)T=this.$renderToken(v,T,y,m),w+=m.length;else{for(;w+m.length>=S;)T=this.$renderToken(v,T,y,m.substring(0,S-w)),m=m.substring(S-w),w=S,v=this.$createLineElement(),h.appendChild(v),v.appendChild(this.dom.createTextNode(d.stringRepeat(" ",g.indent),this.element)),x++,T=0,S=g[x]||Number.MAX_VALUE;m.length!=0&&(w+=m.length,T=this.$renderToken(v,T,y,m))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(v,T,null,"",!0)},f.prototype.$renderSimpleLine=function(h,p){for(var g=0,w=0;w<p.length;w++){var x=p[w],S=x.value;if(!(w==0&&this.displayIndentGuides&&(S=this.renderIndentGuide(h,S),!S))){if(g+S.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(h,g,x,S);g=this.$renderToken(h,g,x,S)}}},f.prototype.$renderOverflowMessage=function(h,p,g,w,x){g&&this.$renderToken(h,p,g,w.slice(0,this.MAX_LINE_LENGTH-p));var S=this.dom.createElement("span");S.className="ace_inline_button ace_keyword ace_toggle_wrap",S.textContent=x?"<hide>":"<click to see more...>",h.appendChild(S)},f.prototype.$renderLine=function(h,p,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(p)),g)var w=this.$getFoldLineTokens(p,g);else var w=this.session.getTokens(p);var x=h;if(w.length){var S=this.session.getRowSplitData(p);if(S&&S.length){this.$renderWrappedLine(h,w,S);var x=h.lastChild}else{var x=h;this.$useLineGroups()&&(x=this.$createLineElement(),h.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),h.appendChild(x));if(this.showEOL&&x){g&&(p=g.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=p==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(T)}},f.prototype.$getFoldLineTokens=function(h,p){var g=this.session,w=[];function x(T,v,b){for(var y=0,m=0;m+T[y].value.length<v;)if(m+=T[y].value.length,y++,y==T.length)return;if(m!=v){var E=T[y].value.substring(v-m);E.length>b-v&&(E=E.substring(0,b-v)),w.push({type:T[y].type,value:E}),m=v+E.length,y+=1}for(;m<b&&y<T.length;){var E=T[y].value;E.length+m>b?w.push({type:T[y].type,value:E.substring(0,b-m)}):w.push(T[y]),m+=E.length,y+=1}}var S=g.getTokens(h);return p.walk(function(T,v,b,y,m){T!=null?w.push({type:"fold",value:T}):(m&&(S=g.getTokens(v)),S.length&&x(S,y,b))},p.end.row,this.session.getLine(p.end.row).length),w},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();u.prototype.$textToken={text:!0,rparen:!0,lparen:!0},u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,o.implement(u.prototype,c),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),l=function(){function d(a){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(a){for(var c=this.cursors,s=c.length;s--;)o.setStyle(c[s].style,"opacity",a?"":"0")},d.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},d.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},d.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,o.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var a=o.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},d.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},d.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},d.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(a),u=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,a.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),f=(s.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:u,top:f}},d.prototype.isCursorInView=function(a,c){return a.top>=0&&a.top<c.maxHeight},d.prototype.update=function(a){this.config=a;var c=this.session.$selectionMarkers,s=0,u=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var s=0,f=c.length;s<f;s++){var h=this.getPixelPosition(c[s].cursor,!0);if(!((h.top>a.height+a.offset||h.top<0)&&s>1)){var p=this.cursors[u++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,h,a,c[s],this.session):this.isCursorInView(h,a)?(o.setStyle(g,"display","block"),o.translate(p,h.left,h.top),o.setStyle(g,"width",Math.round(a.characterWidth)+"px"),o.setStyle(g,"height",a.lineHeight+"px")):o.setStyle(g,"display","none")}}for(;this.cursors.length>u;)this.removeCursor();var w=this.session.getOverwrite();this.$setOverwrite(w),this.$pixelPos=h,this.restartTimer()},d.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();l.prototype.$padding=0,l.prototype.drawCursor=null,r.Cursor=l}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var p=function(g,w){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(x[T]=S[T])},p(g,w)};return function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");p(g,w);function x(){this.constructor=g}g.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),l=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/event"),c=n("./lib/event_emitter").EventEmitter,s=32768,u=function(){function p(g,w){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+w,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();l.implement(u.prototype,c);var f=function(p){o(g,p);function g(w,x){var S=p.call(this,w,"-v")||this;return S.scrollTop=0,S.scrollHeight=0,x.$scrollbarWidth=S.width=d.scrollbarWidth(w.ownerDocument),S.inner.style.width=S.element.style.width=(S.width||15)+5+"px",S.$minWidth=0,S}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var w=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-w)/(this.coeff-w)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(w){this.element.style.height=w+"px"},g.prototype.setScrollHeight=function(w){this.scrollHeight=w,w>s?(this.coeff=s/w,w=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=w+"px"},g.prototype.setScrollTop=function(w){this.scrollTop!=w&&(this.skipEvent=!0,this.scrollTop=w,this.element.scrollTop=w*this.coeff)},g}(u);f.prototype.setInnerHeight=f.prototype.setScrollHeight;var h=function(p){o(g,p);function g(w,x){var S=p.call(this,w,"-h")||this;return S.scrollLeft=0,S.height=x.$scrollbarWidth,S.inner.style.height=S.element.style.height=(S.height||15)+5+"px",S}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(w){this.element.style.width=w+"px"},g.prototype.setInnerWidth=function(w){this.inner.style.width=w+"px"},g.prototype.setScrollWidth=function(w){this.inner.style.width=w+"px"},g.prototype.setScrollLeft=function(w){this.scrollLeft!=w&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=w)},g}(u);r.ScrollBar=f,r.ScrollBarV=f,r.ScrollBarH=h,r.VScrollBar=f,r.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function w(){this.constructor=p}p.prototype=g===null?Object.create(g):(w.prototype=g.prototype,new w)}}(),l=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/event"),c=n("./lib/event_emitter").EventEmitter;d.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 s=function(){function h(p,g){this.element=d.createElement("div"),this.element.className="ace_sb"+g,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return h.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},h}();l.implement(s.prototype,c);var u=function(h){o(p,h);function p(g,w){var x=h.call(this,g,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,x.parent=g,x.width=x.VScrollWidth,x.renderer=w,x.inner.style.width=x.element.style.width=(x.width||15)+"px",x.$minWidth=0,x}return p.prototype.onMouseDown=function(g,w){if(g==="mousedown"&&!(a.getButton(w)!==0||w.detail===2)){if(w.target===this.inner){var x=this,S=w.clientY,T=function(C){S=C.clientY},v=function(){clearInterval(E)},b=w.clientY,y=this.thumbTop,m=function(){if(S!==void 0){var C=x.scrollTopFromThumbTop(y+S-b);C!==x.scrollTop&&x._emit("scroll",{data:C})}};a.capture(this.inner,T,v);var E=setInterval(m,20);return a.preventDefault(w)}var M=w.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(M)}),a.preventDefault(w)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var w=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return w=w>>0,w<0?w=0:w>this.pageHeight-this.viewHeight&&(w=this.pageHeight-this.viewHeight),w},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,w){this.pageHeight===g&&!w||(this.pageHeight=g,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})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(s);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var f=function(h){o(p,h);function p(g,w){var x=h.call(this,g,"-h")||this;return x.scrollLeft=0,x.scrollWidth=0,x.height=x.HScrollHeight,x.inner.style.height=x.element.style.height=(x.height||12)+"px",x.renderer=w,x}return p.prototype.onMouseDown=function(g,w){if(g==="mousedown"&&!(a.getButton(w)!==0||w.detail===2)){if(w.target===this.inner){var x=this,S=w.clientX,T=function(C){S=C.clientX},v=function(){clearInterval(E)},b=w.clientX,y=this.thumbLeft,m=function(){if(S!==void 0){var C=x.scrollLeftFromThumbLeft(y+S-b);C!==x.scrollLeft&&x._emit("scroll",{data:C})}};a.capture(this.inner,T,v);var E=setInterval(m,20);return a.preventDefault(w)}var M=w.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(M)}),a.preventDefault(w)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var w=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return w=w>>0,w<0?w=0:w>this.pageWidth-this.viewWidth&&(w=this.pageWidth-this.viewWidth),w},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,w){this.pageWidth===g&&!w||(this.pageWidth=g,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})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(s);f.prototype.setInnerWidth=f.prototype.setScrollWidth,r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=f,r.VScrollBar=u,r.HScrollBar=f}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,i){var o=n("./lib/event"),l=function(){function d(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var s=this;this._flush=function(u){s.pending=!1;var f=s.changes;if(f&&(o.blockIdle(100),s.changes=0,s.onRender(f)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return d.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},d}();r.RenderLoop=l}),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,i){var o=n("../lib/oop"),l=n("../lib/dom"),d=n("../lib/lang"),a=n("../lib/event"),c=n("../lib/useragent"),s=n("../lib/event_emitter").EventEmitter,u=512,f=typeof ResizeObserver=="function",h=200,p=function(){function g(w){this.el=l.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=l.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=l.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),w.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",u),this.$characterSize={width:0,height:0},f?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(w,x){w.width=w.height="auto",w.left=w.top="0px",w.visibility="hidden",w.position="absolute",w.whiteSpace="pre",c.isIE<8?w["font-family"]="inherit":w.font="inherit",w.overflow=x?"hidden":"visible"},g.prototype.checkForSizeChanges=function(w){if(w===void 0&&(w=this.$measureSizes()),w&&(this.$characterSize.width!==w.width||this.$characterSize.height!==w.height)){this.$measureNode.style.fontWeight="bold";var x=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=w,this.charSizes=Object.create(null),this.allowBoldFonts=x&&x.width===w.width&&x.height===w.height,this._emit("changeCharacterSize",{data:w})}},g.prototype.$addObserver=function(){var w=this;this.$observer=new window.ResizeObserver(function(x){w.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var w=this;return this.$pollSizeChangesTimer=a.onIdle(function x(){w.checkForSizeChanges(),a.onIdle(x,500)},500)},g.prototype.setPolling=function(w){w?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(w){var x={height:(w||this.$measureNode).clientHeight,width:(w||this.$measureNode).clientWidth/u};return x.width===0||x.height===0?null:x},g.prototype.$measureCharWidth=function(w){this.$main.textContent=d.stringRepeat(w,u);var x=this.$main.getBoundingClientRect();return x.width/u},g.prototype.getCharacterWidth=function(w){var x=this.charSizes[w];return x===void 0&&(x=this.charSizes[w]=this.$measureCharWidth(w)/this.$characterSize.width),x},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(w){return!w||!w.parentElement?1:(window.getComputedStyle(w).zoom||1)*this.$getZoom(w.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var w=function(x,S){return["div",{style:"position: absolute;top:"+x+"px;left:"+S+"px;"}]};this.els=l.buildDom([w(0,0),w(h,0),w(0,h),w(h,h)],this.el)},g.prototype.transformCoordinates=function(w,x){if(w){var S=this.$getZoom(this.el);w=y(1/S,w)}function T(K,q,re){var Y=K[1]*q[0]-K[0]*q[1];return[(-q[1]*re[0]+q[0]*re[1])/Y,(+K[1]*re[0]-K[0]*re[1])/Y]}function v(K,q){return[K[0]-q[0],K[1]-q[1]]}function b(K,q){return[K[0]+q[0],K[1]+q[1]]}function y(K,q){return[K*q[0],K*q[1]]}this.els||this.$initTransformMeasureNodes();function m(K){var q=K.getBoundingClientRect();return[q.left,q.top]}var E=m(this.els[0]),M=m(this.els[1]),C=m(this.els[2]),k=m(this.els[3]),O=T(v(k,M),v(k,C),v(b(M,C),b(k,E))),R=y(1+O[0],v(M,E)),A=y(1+O[1],v(C,E));if(x){var I=x,P=O[0]*I[0]/h+O[1]*I[1]/h+1,z=b(y(I[0],R),y(I[1],A));return b(y(1/P/h,z),E)}var B=v(w,E),V=T(v(R,y(O[0],B)),v(A,y(O[1],B)),B);return y(h,V)},g}();p.prototype.$characterSize={width:0,height:0},o.implement(p.prototype,s),r.FontMetrics=p}),ace.define("ace/css/editor.css",["require","exports","module"],function(n,r,i){i.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 &nbsp; 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,i){var o=n("../lib/dom"),l=n("../lib/oop"),d=n("../lib/event_emitter").EventEmitter,a=function(){function c(s,u){this.canvas=o.createElement("canvas"),this.renderer=u,this.pixelRatio=1,this.maxHeight=u.layerConfig.maxHeight,this.lineHeight=u.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.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)"},s.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(s){var u=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var f=(s.lastRow+1)*this.lineHeight;f<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var h=this.canvas.getContext("2d");function p(k,O){return k.priority<O.priority?-1:k.priority>O.priority?1:0}var g=this.renderer.session.$annotations;if(h.clearRect(0,0,this.canvas.width,this.canvas.height),g){var w={info:1,warning:2,error:3};g.forEach(function(k){k.priority=w[k.type]||null}),g=g.sort(p);for(var x=this.renderer.session.$foldData,S=0;S<g.length;S++){var T=g[S].row,v=this.compensateFoldRows(T,x),b=Math.round((T-v)*this.lineHeight*this.heightRatio),y=Math.round((T-v)*this.lineHeight*this.heightRatio),m=Math.round(((T-v)*this.lineHeight+this.lineHeight)*this.heightRatio),E=m-y;if(E<this.minDecorationHeight){var M=(y+m)/2|0;M<this.halfMinDecorationHeight?M=this.halfMinDecorationHeight:M+this.halfMinDecorationHeight>this.canvasHeight&&(M=this.canvasHeight-this.halfMinDecorationHeight),y=Math.round(M-this.halfMinDecorationHeight),m=Math.round(M+this.halfMinDecorationHeight)}h.fillStyle=u[g[S].type]||null,h.fillRect(0,b,this.canvasWidth,m-y)}}var C=this.renderer.session.selection.getCursor();if(C){var v=this.compensateFoldRows(C.row,x),b=Math.round((C.row-v)*this.lineHeight*this.heightRatio);h.fillStyle="rgba(0, 0, 0, 0.5)",h.fillRect(0,b,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(s,u){var f=0;if(u&&u.length>0)for(var h=0;h<u.length;h++)s>u[h].start.row&&s<u[h].end.row?f+=s-u[h].start.row:s>=u[h].end.row&&(f+=u[h].end.row-u[h].start.row);return f},c}();l.implement(a.prototype,d),r.Decorator=a}),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,i){var o=n("./lib/oop"),l=n("./lib/dom"),d=n("./lib/lang"),a=n("./config"),c=n("./layer/gutter").Gutter,s=n("./layer/marker").Marker,u=n("./layer/text").Text,f=n("./layer/cursor").Cursor,h=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,w=n("./scrollbar_custom").VScrollBar,x=n("./renderloop").RenderLoop,S=n("./layer/font_metrics").FontMetrics,T=n("./lib/event_emitter").EventEmitter,v=n("./css/editor.css"),b=n("./layer/decorators").Decorator,y=n("./lib/useragent");l.importCssString(v,"ace_editor.css",!1);var m=function(){function E(M,C){var k=this;this.container=M||l.createElement("div"),l.addCssClass(this.container,"ace_editor"),l.HI_DPI&&l.addCssClass(this.container,"ace_hidpi"),this.setTheme(C),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=l.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=l.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=l.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 s(this.content);var O=this.$textLayer=new u(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new f(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",function(R){k.$scrollAnimation||k.session.setScrollTop(R.data-k.scrollMargin.top)}),this.scrollBarH.on("scroll",function(R){k.$scrollAnimation||k.session.setScrollLeft(R.data-k.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new S(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(R){k.updateCharacterSize(),k.onResize(!0,k.gutterWidth,k.$size.width,k.$size.height),k._signal("changeCharacterSize",R)}),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=!y.isIOS,this.$loop=new x(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return E.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(),l.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function(M){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=M,M&&this.scrollMargin.top&&M.getScrollTop()<=0&&M.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(M),this.$markerBack.setSession(M),this.$markerFront.setSession(M),this.$gutterLayer.setSession(M),this.$textLayer.setSession(M),M&&(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))},E.prototype.updateLines=function(M,C,k){if(C===void 0&&(C=1/0),this.$changedLines?(this.$changedLines.firstRow>M&&(this.$changedLines.firstRow=M),this.$changedLines.lastRow<C&&(this.$changedLines.lastRow=C)):this.$changedLines={firstRow:M,lastRow:C},this.$changedLines.lastRow<this.layerConfig.firstRow)if(k)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function(M,C,k,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var R=this.container;O||(O=R.clientHeight||R.scrollHeight),k||(k=R.clientWidth||R.scrollWidth);var A=this.$updateCachedSize(M,C,k,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!k&&!O)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function(M,C,k,O){O-=this.$extraHeight||0;var R=0,A=this.$size,I={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(M||A.height!=O)&&(A.height=O,R|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",R=R|this.CHANGE_SCROLL),k&&(M||A.width!=k)){R|=this.CHANGE_SIZE,A.width=k,C==null&&(C=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=C,l.setStyle(this.scrollBarH.element.style,"left",C+"px"),l.setStyle(this.scroller.style,"left",C+this.margin.left+"px"),A.scrollerWidth=Math.max(0,k-C-this.scrollBarV.getWidth()-this.margin.h),l.setStyle(this.$gutter.style,"left",this.margin.left+"px");var P=this.scrollBarV.getWidth()+"px";l.setStyle(this.scrollBarH.element.style,"right",P),l.setStyle(this.scroller.style,"right",P),l.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(R|=this.CHANGE_FULL)}return A.$dirty=!k||!O,R&&this._signal("resize",I),R},E.prototype.onGutterResize=function(M){var C=this.$showGutter?M:0;C!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,C,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()},E.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,C=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(C,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},E.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},E.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=l.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=l.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var C=this.$printMarginEl.style;C.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",C.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,C=this.$composition;if(!this.$keepTextAreaAtCursor&&!C){l.translate(this.textarea,-100,0);return}var k=this.$cursorLayer.$pixelPos;if(k){C&&C.markerRange&&(k=this.$cursorLayer.getPixelPosition(C.markerRange.start,!0));var O=this.layerConfig,R=k.top,A=k.left;R-=O.offset;var I=C&&C.useTextareaForIME||y.isMobile?this.lineHeight:1;if(R<0||R>O.height-I){l.translate(this.textarea,0,0);return}var P=1,z=this.$size.height-I;if(!C)R+=this.lineHeight;else if(C.useTextareaForIME){var B=this.textarea.value;P=this.characterWidth*this.session.$getStringScreenWidth(B)[0]}else R+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-P&&(A=this.$size.scrollerWidth-P),A+=this.gutterWidth+this.margin.left,l.setStyle(M,"height",I+"px"),l.setStyle(M,"width",P+"px"),l.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-P),Math.min(R,z))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,C=M.lastRow,k=this.session.documentToScreenRow(C,0)*M.lineHeight;return k-this.session.getScrollTop()>M.height-M.lineHeight?C-1:C},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function(M,C,k,O){var R=this.scrollMargin;R.top=M|0,R.bottom=C|0,R.right=O|0,R.left=k|0,R.v=R.top+R.bottom,R.h=R.left+R.right,R.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-R.top),this.updateFull()},E.prototype.setMargin=function(M,C,k,O){var R=this.margin;R.top=M|0,R.bottom=C|0,R.right=O|0,R.left=k|0,R.v=R.top+R.bottom,R.h=R.left+R.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},E.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,C=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(C-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-C&&(M=this.scrollTop+C,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function(M,C){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!C){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var k=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),k.firstRow!=this.layerConfig.firstRow&&k.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(k.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}k=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),l.translate(this.content,-this.scrollLeft,-k.offset);var R=k.width+2*this.$padding+"px",A=k.minHeight+"px";l.setStyle(this.content.style,"width",R),l.setStyle(this.content.style,"height",A)}if(M&this.CHANGE_H_SCROLL&&(l.translate(this.content,-this.scrollLeft,-k.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(k):this.$textLayer.scrollLines(k),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(k):this.$gutterLayer.scrollLines(k)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(k),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(k),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(k),this._signal("afterRender",M)},E.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,C=this.$maxLines*this.lineHeight,k=Math.min(C,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(k+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&k>this.$maxPixelHeight&&(k=this.$maxPixelHeight);var O=k<=2*this.lineHeight,R=!O&&M>C;if(k!=this.desiredHeight||this.$size.height!=this.desiredHeight||R!=this.$vScroll){R!=this.$vScroll&&(this.$vScroll=R,this.scrollBarV.setVisible(R));var A=this.container.clientWidth;this.container.style.height=k+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,k),this.desiredHeight=k,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var M=this.session,C=this.$size,k=C.height<=2*this.lineHeight,O=this.session.getScreenLength(),R=O*this.lineHeight,A=this.$getLongestLine(),I=!k&&(this.$hScrollBarAlwaysVisible||C.scrollerWidth-A-2*this.$padding<0),P=this.$horizScroll!==I;P&&(this.$horizScroll=I,this.scrollBarH.setVisible(I));var z=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var B=C.scrollerHeight+this.lineHeight,V=!this.$maxLines&&this.$scrollPastEnd?(C.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;R+=V;var K=this.scrollMargin;this.session.setScrollTop(Math.max(-K.top,Math.min(this.scrollTop,R-C.scrollerHeight+K.bottom))),this.session.setScrollLeft(Math.max(-K.left,Math.min(this.scrollLeft,A+2*this.$padding-C.scrollerWidth+K.right)));var q=!k&&(this.$vScrollBarAlwaysVisible||C.scrollerHeight-R+V<0||this.scrollTop>K.top),re=z!==q;re&&(this.$vScroll=q,this.scrollBarV.setVisible(q));var Y=this.scrollTop%this.lineHeight,Z=Math.ceil(B/this.lineHeight)-1,te=Math.max(0,Math.round((this.scrollTop-Y)/this.lineHeight)),ie=te+Z,ce,he,ve=this.lineHeight;te=M.screenToDocumentRow(te,0);var Ce=M.getFoldLine(te);Ce&&(te=Ce.start.row),ce=M.documentToScreenRow(te,0),he=M.getRowLength(te)*ve,ie=Math.min(M.screenToDocumentRow(ie,0),M.getLength()-1),B=C.scrollerHeight+M.getRowLength(ie)*ve+he,Y=this.scrollTop-ce*ve;var _e=0;return(this.layerConfig.width!=A||P)&&(_e=this.CHANGE_H_SCROLL),(P||re)&&(_e|=this.$updateCachedSize(!0,this.gutterWidth,C.width,C.height),this._signal("scrollbarVisibilityChanged"),re&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:te,firstRowScreen:ce,lastRow:ie,lineHeight:ve,characterWidth:this.characterWidth,minHeight:B,maxHeight:R,offset:Y,gutterOffset:ve?Math.max(0,Math.ceil((Y+C.height-C.scrollerHeight)/ve)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),_e},E.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,C=this.$changedLines.lastRow;this.$changedLines=null;var k=this.layerConfig;if(!(M>k.lastRow+1)&&!(C<k.firstRow)){if(C===1/0){this.$showGutter&&this.$gutterLayer.update(k),this.$textLayer.update(k);return}return this.$textLayer.updateLines(k,M,C),!0}}},E.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function(M,C){this.$gutterLayer.addGutterDecoration(M,C)},E.prototype.removeGutterDecoration=function(M,C){this.$gutterLayer.removeGutterDecoration(M,C)},E.prototype.updateBreakpoints=function(M){this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function(M,C,k){this.scrollCursorIntoView(M,k),this.scrollCursorIntoView(C,k)},E.prototype.scrollCursorIntoView=function(M,C,k){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(M),R=O.left,A=O.top,I=k&&k.top||0,P=k&&k.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var z=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;z+I>A?(C&&z+I>A+this.lineHeight&&(A-=C*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):z+this.$size.scrollerHeight-P<A+this.lineHeight&&(C&&z+this.$size.scrollerHeight-P<A-this.lineHeight&&(A+=C*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+P-this.$size.scrollerHeight));var B=this.scrollLeft,V=2*this.layerConfig.characterWidth;R-V<B?(R-=V,R<this.$padding+V&&(R=-this.scrollMargin.left),this.session.setScrollLeft(R)):(R+=V,B+this.$size.scrollerWidth<R+this.characterWidth?this.session.setScrollLeft(Math.round(R+this.characterWidth-this.$size.scrollerWidth)):B<=this.$padding&&R-B<this.characterWidth&&this.session.setScrollLeft(0))}},E.prototype.getScrollTop=function(){return this.session.getScrollTop()},E.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},E.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},E.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},E.prototype.scrollToRow=function(M){this.session.setScrollTop(M*this.lineHeight)},E.prototype.alignCursor=function(M,C){typeof M=="number"&&(M={row:M,column:0});var k=this.$cursorLayer.getPixelPosition(M),O=this.$size.scrollerHeight-this.lineHeight,R=k.top-O*(C||0);return this.session.setScrollTop(R),R},E.prototype.$calcSteps=function(M,C){var k=0,O=this.STEPS,R=[],A=function(I,P,z){return z*(Math.pow(I-1,3)+1)+P};for(k=0;k<O;++k)R.push(A(k/this.STEPS,M,C-M));return R},E.prototype.scrollToLine=function(M,C,k,O){var R=this.$cursorLayer.getPixelPosition({row:M,column:0}),A=R.top;C&&(A-=this.$size.scrollerHeight/2);var I=this.scrollTop;this.session.setScrollTop(A),k!==!1&&this.animateScrolling(I,O)},E.prototype.animateScrolling=function(M,C){var k=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(M==k)return;if(this.$scrollAnimation){var R=this.$scrollAnimation.steps;if(R.length&&(M=R[0],M==k))return}var A=O.$calcSteps(M,k);this.$scrollAnimation={from:M,to:k,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=k;function I(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,C&&C()}this.$timer=setInterval(function(){if(O.$stopAnimation){I();return}if(!O.session)return clearInterval(O.$timer);A.length?(O.session.setScrollTop(A.shift()),O.session.$scrollTop=k):k!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(k),k=null):I()},10)},E.prototype.scrollToY=function(M){this.scrollTop!==M&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=M)},E.prototype.scrollToX=function(M){this.scrollLeft!==M&&(this.scrollLeft=M),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(M,C){this.session.setScrollTop(C),this.session.setScrollLeft(M)},E.prototype.scrollBy=function(M,C){C&&this.session.setScrollTop(this.session.getScrollTop()+C),M&&this.session.setScrollLeft(this.session.getScrollLeft()+M)},E.prototype.isScrollableBy=function(M,C){if(C<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||C>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function(M,C){var k;if(this.$hasCssTransforms){k={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([M,C]);M=O[1]-this.gutterWidth-this.margin.left,C=O[0]}else k=this.scroller.getBoundingClientRect();var R=M+this.scrollLeft-k.left-this.$padding,A=R/this.characterWidth,I=Math.floor((C+this.scrollTop-k.top)/this.lineHeight),P=this.$blockCursor?Math.floor(A):Math.round(A);return{row:I,column:P,side:A-P>0?1:-1,offsetX:R}},E.prototype.screenToTextCoordinates=function(M,C){var k;if(this.$hasCssTransforms){k={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([M,C]);M=O[1]-this.gutterWidth-this.margin.left,C=O[0]}else k=this.scroller.getBoundingClientRect();var R=M+this.scrollLeft-k.left-this.$padding,A=R/this.characterWidth,I=this.$blockCursor?Math.floor(A):Math.round(A),P=Math.floor((C+this.scrollTop-k.top)/this.lineHeight);return this.session.screenToDocumentPosition(P,Math.max(I,0),R)},E.prototype.textToScreenCoordinates=function(M,C){var k=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(M,C),R=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,M)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:k.left+R-this.scrollLeft,pageY:k.top+A-this.scrollTop}},E.prototype.visualizeFocus=function(){l.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){l.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(l.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function(M){var C=this.session.selection.cursor;this.addToken(M,"composition_placeholder",C.row,C.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),l.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(M,C){var k=this.session.selection.cursor,O=C||{row:k.row,column:k.column};this.removeGhostText();var R=M.split(`
`);this.addToken(R[0],"ghost_text",O.row,O.column),this.$ghostText={text:M,position:{row:O.row,column:O.column}},R.length>1&&(this.$ghostTextWidget={text:R.slice(1).join(`
`),row:O.row,column:O.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},E.prototype.removeGhostText=function(){if(this.$ghostText){var M=this.$ghostText.position;this.removeExtraToken(M.row,M.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function(M,C,k,O){var R=this.session;R.bgTokenizer.lines[k]=null;var A={type:C,value:M},I=R.getTokens(k);if(O==null||!I.length)I.push(A);else for(var P=0,z=0;z<I.length;z++){var B=I[z];if(P+=B.value.length,O<=P){var V=B.value.length-(P-O),K=B.value.slice(0,V),q=B.value.slice(V);I.splice(z,1,{type:B.type,value:K},A,{type:B.type,value:q});break}}this.updateLines(k,k)},E.prototype.removeExtraToken=function(M,C){this.session.bgTokenizer.lines[M]=null,this.updateLines(M,M)},E.prototype.setTheme=function(M,C){var k=this;if(this.$themeId=M,k._dispatchEvent("themeChange",{theme:M}),!M||typeof M=="string"){var O=M||this.$options.theme.initialValue;a.loadModule(["theme",O],R)}else R(M);function R(A){if(k.$themeId!=M)return C&&C();if(!A||!A.cssClass)throw new Error("couldn't load module "+M+" or it didn't call define");A.$id&&(k.$themeId=A.$id),l.importCssString(A.cssText,A.cssClass,k.container),k.theme&&l.removeCssClass(k.container,k.theme.cssClass);var I="padding"in A?A.padding:"padding"in(k.theme||{})?4:k.$padding;k.$padding&&I!=k.$padding&&k.setPadding(I),k.$theme=A.cssClass,k.theme=A,l.addCssClass(k.container,A.cssClass),l.setCssClass(k.container,"ace_dark",A.isDark),k.$size&&(k.$size.width=0,k.$updateSizeAsync()),k._dispatchEvent("themeLoaded",{theme:A}),C&&C()}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(M,C){l.setCssClass(this.container,M,C!==!1)},E.prototype.unsetStyle=function(M){l.removeCssClass(this.container,M)},E.prototype.setCursorStyle=function(M){l.setStyle(this.scroller.style,"cursor",M)},E.prototype.setMouseCursor=function(M){l.setStyle(this.scroller.style,"cursor",M)},E.prototype.attachToShadowRoot=function(){l.importCssString(v,"ace_editor.css",this.container)},E.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},E.prototype.$updateCustomScrollbar=function(M){var C=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,M===!0?(this.scrollBarV=new w(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollTop(k.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollLeft(k.data-C.scrollMargin.left)}),this.$scrollDecorator=new b(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollTop(k.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollLeft(k.data-C.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var M=this;this.$resizeTimer=d.delayedCall(function(){M.destroyed||M.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(C){var k=C[0].contentRect.width,O=C[0].contentRect.height;Math.abs(M.$size.width-k)>1||Math.abs(M.$size.height-O)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E}();m.prototype.CHANGE_CURSOR=1,m.prototype.CHANGE_MARKER=2,m.prototype.CHANGE_GUTTER=4,m.prototype.CHANGE_SCROLL=8,m.prototype.CHANGE_LINES=16,m.prototype.CHANGE_TEXT=32,m.prototype.CHANGE_SIZE=64,m.prototype.CHANGE_MARKER_BACK=128,m.prototype.CHANGE_MARKER_FRONT=256,m.prototype.CHANGE_FULL=512,m.prototype.CHANGE_H_SCROLL=1024,m.prototype.$changes=0,m.prototype.$padding=null,m.prototype.$frozen=!1,m.prototype.STEPS=8,o.implement(m.prototype,T),a.defineOptions(m.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&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(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){l.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),r.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,i){var o=n("../lib/oop"),l=n("../lib/net"),d=n("../lib/event_emitter").EventEmitter,a=n("../config");function c(h){var p="importScripts('"+l.qualifyURL(h)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,w=new g;return w.append(p),w.getBlob("application/javascript")}}function s(h){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=c(h),g=window.URL||window.webkitURL,w=g.createObjectURL(p);return new Worker(w)}return new Worker(h)}var u=function(h){h.postMessage||(h=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=h,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(){o.implement(this,d),this.$createWorkerFromOldConfig=function(h,p,g,w,x){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)w=w||a.moduleUrl(p,"worker");else{var S=this.$normalizePath;w=w||S(n.toUrl("ace/worker/worker.js",null,"_"));var T={};h.forEach(function(v){T[v]=S(n.toUrl(v,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(w),x&&this.send("importScripts",x),this.$worker.postMessage({init:!0,tlns:T,module:p,classname:g}),this.$worker},this.onMessage=function(h){var p=h.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(h){window.console&&console.error&&console.error(h)},this.$normalizePath=function(h){return l.qualifyURL(h)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(h,p){this.$worker.postMessage({command:h,args:p})},this.call=function(h,p,g){if(g){var w=this.callbackId++;this.callbacks[w]=g,p.push(w)}this.send(h,p)},this.emit=function(h,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:h,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(h){this.$doc&&this.terminate(),this.$doc=h,this.call("setValue",[h.getValue()]),h.on("change",this.changeListener,!0)},this.changeListener=function(h){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),h.action=="insert"?this.deltaQueue.push(h.start,h.lines):this.deltaQueue.push(h.start,h.end)},this.$sendDeltaQueue=function(){var h=this.deltaQueue;h&&(this.deltaQueue=null,h.length>50&&h.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:h}))}}).call(u.prototype);var f=function(h,p,g){var w=null,x=!1,S=Object.create(d),T=[],v=new u({messageBuffer:T,terminate:function(){},postMessage:function(y){T.push(y),w&&(x?setTimeout(b):b())}});v.setEmitSync=function(y){x=y};var b=function(){var y=T.shift();y.command?w[y.command].apply(w,y.args):y.event&&S._signal(y.event,y.data)};return S.postMessage=function(y){v.onMessage({data:y})},S.callback=function(y,m){this.postMessage({type:"call",id:m,data:y})},S.emit=function(y,m){this.postMessage({type:"event",name:y,data:m})},a.loadModule(["worker",p],function(y){for(w=new y[g](S);T.length;)b()}),v};r.UIWorkerClient=f,r.WorkerClient=u,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,i){var o=n("./range").Range,l=n("./lib/event_emitter").EventEmitter,d=n("./lib/oop"),a=function(){function c(s,u,f,h,p,g){var w=this;this.length=u,this.session=s,this.doc=s.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=h,this.$onCursorChange=function(){setTimeout(function(){w.onCursorChange()})},this.$pos=f;var x=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=x.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var s=this,u=this.doc,f=this.session;this.selectionBefore=f.selection.toJSON(),f.selection.inMultiSelectMode&&f.selection.toSingleRange(),this.pos=u.createAnchor(this.$pos.row,this.$pos.column);var h=this.pos;h.$insertRight=!0,h.detach(),h.markerId=f.addMarker(new o(h.row,h.column,h.row,h.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=u.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),s.others.push(g)}),f.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,u=this;this.othersActive=!0,this.others.forEach(function(f){f.markerId=s.addMarker(new o(f.row,f.column,f.row,f.column+u.length),u.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},c.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var u=s;if(u.start.row===u.end.row&&u.start.row===this.pos.row){this.$updating=!0;var f=s.action==="insert"?u.end.column-u.start.column:u.start.column-u.end.column,h=u.start.column>=this.pos.column&&u.start.column<=this.pos.column+this.length+1,p=u.start.column-this.pos.column;if(this.updateAnchors(s),h&&(this.length+=f),h&&!this.session.$fromUndo){if(s.action==="insert")for(var g=this.others.length-1;g>=0;g--){var w=this.others[g],x={row:w.row,column:w.column+p};this.doc.insertMergedLines(x,s.lines)}else if(s.action==="remove")for(var g=this.others.length-1;g>=0;g--){var w=this.others[g],x={row:w.row,column:w.column+p};this.doc.remove(new o(x.row,x.column,x.row,x.column-f))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var u=this.others.length;u--;)this.others[u].onChange(s);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var s=this,u=this.session,f=function(p,g){u.removeMarker(p.markerId),p.markerId=u.addMarker(new o(p.row,p.column,p.row,p.column+s.length),g,null,!1)};f(this.pos,this.mainClass);for(var h=this.others.length;h--;)f(this.others[h],this.othersClass)}},c.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var u=this.session.selection.getCursor();u.row===this.pos.row&&u.column>=this.pos.column&&u.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},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 s=this.session.getUndoManager(),u=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,f=0;f<u;f++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c}();d.implement(a.prototype,l),r.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/event"),l=n("../lib/useragent");function d(c,s){return c.row==s.row&&c.column==s.column}function a(c){var s=c.domEvent,u=s.altKey,f=s.shiftKey,h=s.ctrlKey,p=c.getAccelKey(),g=c.getButton();if(h&&l.isMac&&(g=s.button),c.editor.inMultiSelectMode&&g==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!h&&!u&&!p){g===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(g===0){var w=c.editor,x=w.selection,S=w.inMultiSelectMode,T=c.getDocumentPosition(),v=x.getCursor(),b=c.inSelection()||x.isEmpty()&&d(T,v),y=c.x,m=c.y,E=function(q){y=q.clientX,m=q.clientY},M=w.session,C=w.renderer.pixelToScreenCoordinates(y,m),k=C,O;if(w.$mouseHandler.$enableJumpToDef)h&&u||p&&u?O=f?"block":"add":u&&w.$blockSelectEnabled&&(O="block");else if(p&&!u){if(O="add",!S&&f)return}else u&&w.$blockSelectEnabled&&(O="block");if(O&&l.isMac&&s.ctrlKey&&w.$mouseHandler.cancelContextMenu(),O=="add"){if(!S&&b)return;if(!S){var R=x.toOrientedRange();w.addSelectionMarker(R)}var A=x.rangeList.rangeAtPoint(T);w.inVirtualSelectionMode=!0,f&&(A=null,R=x.ranges[0]||R,w.removeSelectionMarker(R)),w.once("mouseup",function(){var q=x.toOrientedRange();A&&q.isEmpty()&&d(A.cursor,q.cursor)?x.substractPoint(q.cursor):(f?x.substractPoint(R.cursor):R&&(w.removeSelectionMarker(R),x.addRange(R)),x.addRange(q)),w.inVirtualSelectionMode=!1})}else if(O=="block"){c.stop(),w.inVirtualSelectionMode=!0;var I,P=[],z=function(){var q=w.renderer.pixelToScreenCoordinates(y,m),re=M.screenToDocumentPosition(q.row,q.column,q.offsetX);d(k,q)&&d(re,x.lead)||(k=q,w.selection.moveToPosition(re),w.renderer.scrollCursorIntoView(),w.removeSelectionMarkers(P),P=x.rectangularRangeBlock(k,C),w.$mouseHandler.$clickSelection&&P.length==1&&P[0].isEmpty()&&(P[0]=w.$mouseHandler.$clickSelection.clone()),P.forEach(w.addSelectionMarker,w),w.updateSelectionMarkers())};S&&!p?x.toSingleRange():!S&&p&&(I=x.toOrientedRange(),w.addSelectionMarker(I)),f?C=M.documentToScreenPosition(x.lead):x.moveToPosition(T),k={row:-1,column:-1};var B=function(q){z(),clearInterval(K),w.removeSelectionMarkers(P),P.length||(P=[x.toOrientedRange()]),I&&(w.removeSelectionMarker(I),x.toSingleRange(I));for(var re=0;re<P.length;re++)x.addRange(P[re]);w.inVirtualSelectionMode=!1,w.$mouseHandler.$clickSelection=null},V=z;o.capture(w.container,E,B);var K=setInterval(function(){V()},20);return c.preventDefault()}}}r.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,i){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(l){l.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(l){l.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(l){l.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(l){l.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(l){l.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(l){l.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(l){l.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(l){l.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(l){l.multiSelect.rangeCount>1?l.multiSelect.joinSelections():l.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(l){l.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(l){l.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(l){l.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(l){l.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(l){return l&&l.inMultiSelectMode}}];var o=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new o(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,i){var o=n("./range_list").RangeList,l=n("./range").Range,d=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,c=n("./lib/event"),s=n("./lib/lang"),u=n("./commands/multi_select_commands");r.commands=u.defaultCommands.concat(u.multiSelectCommands);var f=n("./search").Search,h=new f;function p(v,b,y){return h.$options.wrap=!0,h.$options.needle=b,h.$options.backwards=y==-1,h.find(v)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(v,b){if(v){if(!this.inMultiSelectMode&&this.rangeCount===0){var y=this.toOrientedRange();if(this.rangeList.add(y),this.rangeList.add(v),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),b||this.fromOrientedRange(v);this.rangeList.removeAll(),this.rangeList.add(y),this.$onAddRange(y)}v.cursor||(v.cursor=v.end);var m=this.rangeList.add(v);return this.$onAddRange(v),m.length&&this.$onRemoveRange(m),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(v)}},this.toSingleRange=function(v){v=v||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),v&&this.fromOrientedRange(v)},this.substractPoint=function(v){var b=this.rangeList.substractPoint(v);if(b)return this.$onRemoveRange(b),b[0]},this.mergeOverlappingRanges=function(){var v=this.rangeList.merge();v.length&&this.$onRemoveRange(v)},this.$onAddRange=function(v){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(v),this._signal("addRange",{range:v})},this.$onRemoveRange=function(v){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();v.push(b),this.rangeCount=0}for(var y=v.length;y--;){var m=this.ranges.indexOf(v[y]);this.ranges.splice(m,1)}this._signal("removeRange",{ranges:v}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var v=this.ranges.length?this.ranges:[this.getRange()],b=[],y=0;y<v.length;y++){var m=v[y],E=m.start.row,M=m.end.row;if(E===M)b.push(m.clone());else{for(b.push(new l(E,m.start.column,E,this.session.getLine(E).length));++E<M;)b.push(this.getLineRange(E,!0));b.push(new l(M,0,M,m.end.column))}y==0&&!this.isBackwards()&&(b=b.reverse())}this.toSingleRange();for(var y=b.length;y--;)this.addRange(b[y])},this.joinSelections=function(){var v=this.rangeList.ranges,b=v[v.length-1],y=l.fromPoints(v[0].start,b.end);this.toSingleRange(),this.setSelectionRange(y,b.cursor==b.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var v=this.rangeList.ranges,b=v[v.length-1],y=l.fromPoints(v[0].start,b.end);this.toSingleRange(),this.setSelectionRange(y,b.cursor==b.start)}else{var m=this.session.documentToScreenPosition(this.cursor),E=this.session.documentToScreenPosition(this.anchor),M=this.rectangularRangeBlock(m,E);M.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(v,b,y){var m=[],E=v.column<b.column;if(E)var M=v.column,C=b.column,k=v.offsetX,O=b.offsetX;else var M=b.column,C=v.column,k=b.offsetX,O=v.offsetX;var R=v.row<b.row;if(R)var A=v.row,I=b.row;else var A=b.row,I=v.row;M<0&&(M=0),A<0&&(A=0),A==I&&(y=!0);for(var P,z=A;z<=I;z++){var B=l.fromPoints(this.session.screenToDocumentPosition(z,M,k),this.session.screenToDocumentPosition(z,C,O));if(B.isEmpty()){if(P&&x(B.end,P))break;P=B.end}B.cursor=E?B.start:B.end,m.push(B)}if(R&&m.reverse(),!y){for(var V=m.length-1;m[V].isEmpty()&&V>0;)V--;if(V>0)for(var K=0;m[K].isEmpty();)K++;for(var q=V;q>=K;q--)m[q].isEmpty()&&m.splice(q,1)}return m}}.call(d.prototype);var w=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(v){v.cursor||(v.cursor=v.end);var b=this.getSelectionStyle();return v.marker=this.session.addMarker(v,"ace_selection",b),this.session.$selectionMarkers.push(v),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,v},this.removeSelectionMarker=function(v){if(v.marker){this.session.removeMarker(v.marker);var b=this.session.$selectionMarkers.indexOf(v);b!=-1&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(v){for(var b=this.session.$selectionMarkers,y=v.length;y--;){var m=v[y];if(m.marker){this.session.removeMarker(m.marker);var E=b.indexOf(m);E!=-1&&b.splice(E,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(v){this.addSelectionMarker(v.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(v){this.removeSelectionMarkers(v.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(v){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(u.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(v){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(u.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(v){var b=v.command,y=v.editor;if(y.multiSelect){if(b.multiSelectAction)b.multiSelectAction=="forEach"?m=y.forEachSelection(b,v.args):b.multiSelectAction=="forEachLine"?m=y.forEachSelection(b,v.args,!0):b.multiSelectAction=="single"?(y.exitMultiSelectMode(),m=b.exec(y,v.args||{})):m=b.multiSelectAction(y,v.args||{});else{var m=b.exec(y,v.args||{});y.multiSelect.addRange(y.multiSelect.toOrientedRange()),y.multiSelect.mergeOverlappingRanges()}return m}},this.forEachSelection=function(v,b,y){if(!this.inVirtualSelectionMode){var m=y&&y.keepOrder,E=y==!0||y&&y.$byLines,M=this.session,C=this.selection,k=C.rangeList,O=(m?C:k).ranges,R;if(!O.length)return v.exec?v.exec(this,b||{}):v(this,b||{});var A=C._eventRegistry;C._eventRegistry={};var I=new d(M);this.inVirtualSelectionMode=!0;for(var P=O.length;P--;){if(E)for(;P>0&&O[P].start.row==O[P-1].end.row;)P--;I.fromOrientedRange(O[P]),I.index=P,this.selection=M.selection=I;var z=v.exec?v.exec(this,b||{}):v(this,b||{});!R&&z!==void 0&&(R=z),I.toOrientedRange(O[P])}I.detach(),this.selection=M.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=A,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var B=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),B&&B.from==B.to&&this.renderer.animateScrolling(B.from),R}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var v="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,y=[],m=0;m<b.length;m++)y.push(this.session.getTextRange(b[m]));var E=this.session.getDocument().getNewLineCharacter();v=y.join(E),v.length==(y.length-1)*E.length&&(v="")}else this.selection.isEmpty()||(v=this.session.getTextRange(this.getSelectionRange()));return v},this.$checkMultiselectChange=function(v,b){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var y=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&b==this.multiSelect.anchor)return;var m=b==this.multiSelect.anchor?y.cursor==y.start?y.end:y.start:y.cursor;m.row!=b.row||this.session.$clipPositionToDocument(m.row,m.column).column!=b.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(v,b,y){if(b=b||{},b.needle=v||b.needle,b.needle==null){var m=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();b.needle=this.session.getTextRange(m)}this.$search.set(b);var E=this.$search.findAll(this.session);if(!E.length)return 0;var M=this.multiSelect;y||M.toSingleRange(E[0]);for(var C=E.length;C--;)M.addRange(E[C],!0);return m&&M.rangeList.rangeAtPoint(m.start)&&M.addRange(m,!0),E.length},this.selectMoreLines=function(v,b){var y=this.selection.toOrientedRange(),m=y.cursor==y.end,E=this.session.documentToScreenPosition(y.cursor);this.selection.$desiredColumn&&(E.column=this.selection.$desiredColumn);var M=this.session.screenToDocumentPosition(E.row+v,E.column);if(y.isEmpty())var k=M;else var C=this.session.documentToScreenPosition(m?y.end:y.start),k=this.session.screenToDocumentPosition(C.row+v,C.column);if(m){var O=l.fromPoints(M,k);O.cursor=O.start}else{var O=l.fromPoints(k,M);O.cursor=O.end}if(O.desiredColumn=E.column,!this.selection.inMultiSelectMode)this.selection.addRange(y);else if(b)var R=y.cursor;this.selection.addRange(O),R&&this.selection.substractPoint(R)},this.transposeSelections=function(v){for(var b=this.session,y=b.multiSelect,m=y.ranges,E=m.length;E--;){var M=m[E];if(M.isEmpty()){var C=b.getWordRange(M.start.row,M.start.column);M.start.row=C.start.row,M.start.column=C.start.column,M.end.row=C.end.row,M.end.column=C.end.column}}y.mergeOverlappingRanges();for(var k=[],E=m.length;E--;){var M=m[E];k.unshift(b.getTextRange(M))}v<0?k.unshift(k.pop()):k.push(k.shift());for(var E=m.length;E--;){var M=m[E],C=M.clone();b.replace(M,k[E]),M.start.row=C.start.row,M.start.column=C.start.column}y.fromOrientedRange(y.ranges[0])},this.selectMore=function(v,b,y){var m=this.session,E=m.multiSelect,M=E.toOrientedRange();if(!(M.isEmpty()&&(M=m.getWordRange(M.start.row,M.start.column),M.cursor=v==-1?M.start:M.end,this.multiSelect.addRange(M),y))){var C=m.getTextRange(M),k=p(m,C,v);k&&(k.cursor=v==-1?k.start:k.end,this.session.unfold(k),this.multiSelect.addRange(k),this.renderer.scrollCursorIntoView(null,.5)),b&&this.multiSelect.substractPoint(M.cursor)}},this.alignCursors=function(){var v=this.session,b=v.multiSelect,y=b.ranges,m=-1,E=y.filter(function(V){if(V.cursor.row==m)return!0;m=V.cursor.row});if(!y.length||E.length==y.length-1){var M=this.selection.getRange(),C=M.start.row,k=M.end.row,O=C==k;if(O){var R=this.session.getLength(),A;do A=this.session.getLine(k);while(/[=:]/.test(A)&&++k<R);do A=this.session.getLine(C);while(/[=:]/.test(A)&&--C>0);C<0&&(C=0),k>=R&&(k=R-1)}var I=this.session.removeFullLines(C,k);I=this.$reAlignText(I,O),this.session.insert({row:C,column:0},I.join(`
`)+`
`),O||(M.start.column=0,M.end.column=I[I.length-1].length),this.selection.setRange(M)}else{E.forEach(function(V){b.substractPoint(V.cursor)});var P=0,z=1/0,B=y.map(function(V){var K=V.cursor,q=v.getLine(K.row),re=q.substr(K.column).search(/\S/g);return re==-1&&(re=0),K.column>P&&(P=K.column),re<z&&(z=re),re});y.forEach(function(V,K){var q=V.cursor,re=P-q.column,Y=B[K]-z;re>Y?v.insert(q,s.stringRepeat(" ",re-Y)):v.remove(new l(q.row,q.column,q.row,q.column-re+Y)),V.start.column=V.end.column=P,V.start.row=V.end.row=q.row,V.cursor=V.end}),b.fromOrientedRange(y[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(v,b){var y=!0,m=!0,E,M,C;return v.map(function(I){var P=I.match(/(\s*)(.*?)(\s*)([=:].*)/);return P?E==null?(E=P[1].length,M=P[2].length,C=P[3].length,P):(E+M+C!=P[1].length+P[2].length+P[3].length&&(m=!1),E!=P[1].length&&(y=!1),E>P[1].length&&(E=P[1].length),M<P[2].length&&(M=P[2].length),C>P[3].length&&(C=P[3].length),P):[I]}).map(b?O:y?m?R:O:A);function k(I){return s.stringRepeat(" ",I)}function O(I){return I[2]?k(E)+I[2]+k(M-I[2].length+C)+I[4].replace(/^([=:])\s+/,"$1 "):I[0]}function R(I){return I[2]?k(E+M-I[2].length)+I[2]+k(C)+I[4].replace(/^([=:])\s+/,"$1 "):I[0]}function A(I){return I[2]?k(E)+I[2]+k(C)+I[4].replace(/^([=:])\s+/,"$1 "):I[0]}}}).call(w.prototype);function x(v,b){return v.row==b.row&&v.column==b.column}r.onSessionChange=function(v){var b=v.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var y=v.oldSession;y&&(y.multiSelect.off("addRange",this.$onAddRange),y.multiSelect.off("removeRange",this.$onRemoveRange),y.multiSelect.off("multiSelect",this.$onMultiSelect),y.multiSelect.off("singleSelect",this.$onSingleSelect),y.multiSelect.lead.off("change",this.$checkMultiselectChange),y.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function S(v){v.$multiselectOnSessionChange||(v.$onAddRange=v.$onAddRange.bind(v),v.$onRemoveRange=v.$onRemoveRange.bind(v),v.$onMultiSelect=v.$onMultiSelect.bind(v),v.$onSingleSelect=v.$onSingleSelect.bind(v),v.$multiselectOnSessionChange=r.onSessionChange.bind(v),v.$checkMultiselectChange=v.$checkMultiselectChange.bind(v),v.$multiselectOnSessionChange(v),v.on("changeSession",v.$multiselectOnSessionChange),v.on("mousedown",a),v.commands.addCommands(u.defaultCommands),T(v))}function T(v){if(!v.textInput)return;var b=v.textInput.getElement(),y=!1;c.addListener(b,"keydown",function(E){var M=E.keyCode==18&&!(E.ctrlKey||E.shiftKey||E.metaKey);v.$blockSelectEnabled&&M?y||(v.renderer.setMouseCursor("crosshair"),y=!0):y&&m()},v),c.addListener(b,"keyup",m,v),c.addListener(b,"blur",m,v);function m(E){y&&(v.renderer.setMouseCursor(""),y=!1)}}r.MultiSelect=S,n("./config").defineOptions(w.prototype,"editor",{enableMultiselect:{set:function(v){S(this),v?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(v){this.$blockSelectEnabled=v},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,i){var o=n("../../range").Range,l=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,a,c){var s=d.getLine(c);return this.foldingStartMarker.test(s)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(d,a,c){return null},this.indentationBlock=function(d,a,c){var s=/\S/,u=d.getLine(a),f=u.search(s);if(f!=-1){for(var h=c||u.length,p=d.getLength(),g=a,w=a;++a<p;){var x=d.getLine(a).search(s);if(x!=-1){if(x<=f){var S=d.getTokenAt(a,0);if(!S||S.type!=="string")break}w=a}}if(w>g){var T=d.getLine(w).length;return new o(g,h,w,T)}}},this.openingBracketBlock=function(d,a,c,s,u){var f={row:c,column:s+1},h=d.$findClosingBracket(a,f,u);if(h){var p=d.foldWidgets[h.row];return p==null&&(p=d.getFoldWidget(h.row)),p=="start"&&h.row>f.row&&(h.row--,h.column=d.getLine(h.row).length),o.fromPoints(f,h)}},this.closingBracketBlock=function(d,a,c,s,u){var f={row:c,column:s},h=d.$findOpeningBracket(a,f);if(h)return h.column++,f.column--,o.fromPoints(h,f)}}).call(l.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,i){var o=n("../line_widgets").LineWidgets,l=n("../lib/dom"),d=n("../range").Range,a=n("../config").nls;function c(u,f,h){for(var p=0,g=u.length-1;p<=g;){var w=p+g>>1,x=h(f,u[w]);if(x>0)p=w+1;else if(x<0)g=w-1;else return w}return-(p+1)}function s(u,f,h){var p=u.getAnnotations().sort(d.comparePoints);if(p.length){var g=c(p,{row:f,column:-1},d.comparePoints);g<0&&(g=-g-1),g>=p.length?g=h>0?0:p.length-1:g===0&&h<0&&(g=p.length-1);var w=p[g];if(!(!w||!h)){if(w.row===f){do w=p[g+=h];while(w&&w.row===f);if(!w)return p.slice()}var x=[];f=w.row;do x[h<0?"unshift":"push"](w),w=p[g+=h];while(w&&w.row==f);return x.length&&x}}}r.showErrorMarker=function(u,f){var h=u.session;h.widgetManager||(h.widgetManager=new o(h),h.widgetManager.attach(u));var p=u.getCursorPosition(),g=p.row,w=h.widgetManager.getWidgetsAtRow(g).filter(function(M){return M.type=="errorMarker"})[0];w?w.destroy():g-=f;var x=s(h,g,f),S;if(x){var T=x[0];p.column=(T.pos&&typeof T.column!="number"?T.pos.sc:T.column)||0,p.row=T.row,S=u.renderer.$gutterLayer.$annotations[p.row]}else{if(w)return;S={text:[a("Looks good!")],className:"ace_ok"}}u.session.unfold(p.row),u.selection.moveToPosition(p);var v={row:p.row,fixedWidth:!0,coverGutter:!0,el:l.createElement("div"),type:"errorMarker"},b=v.el.appendChild(l.createElement("div")),y=v.el.appendChild(l.createElement("div"));y.className="error_widget_arrow "+S.className;var m=u.renderer.$cursorLayer.getPixelPosition(p).left;y.style.left=m+u.renderer.gutterWidth-5+"px",v.el.className="error_widget_wrapper",b.className="error_widget "+S.className,b.innerHTML=S.text.join("<br>"),b.appendChild(l.createElement("div"));var E=function(M,C,k){if(C===0&&(k==="esc"||k==="return"))return v.destroy(),{command:"null"}};v.destroy=function(){u.$mouseHandler.isMousePressed||(u.keyBinding.removeKeyboardHandler(E),h.widgetManager.removeLineWidget(v),u.off("changeSelection",v.destroy),u.off("changeSession",v.destroy),u.off("mouseup",v.destroy),u.off("change",v.destroy))},u.keyBinding.addKeyboardHandler(E),u.on("changeSelection",v.destroy),u.on("changeSession",v.destroy),u.on("mouseup",v.destroy),u.on("change",v.destroy),u.session.widgetManager.addLineWidget(v),v.el.onmousedown=u.focus.bind(u),u.renderer.scrollCursorIntoView(null,.5,{bottom:v.el.offsetHeight})},l.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,i){n("./loader_build")(r);var o=n("./lib/dom"),l=n("./range").Range,d=n("./editor").Editor,a=n("./edit_session").EditSession,c=n("./undomanager").UndoManager,s=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(u,f){if(typeof u=="string"){var h=u;if(u=document.getElementById(h),!u)throw new Error("ace.edit can't find div #"+h)}if(u&&u.env&&u.env.editor instanceof d)return u.env.editor;var p="";if(u&&/input|textarea/i.test(u.tagName)){var g=u;p=g.value,u=o.createElement("pre"),g.parentNode.replaceChild(u,g)}else u&&(p=u.textContent,u.innerHTML="");var w=r.createEditSession(p),x=new d(new s(u),w,f),S={document:w,editor:x,onResize:x.resize.bind(x,null)};return g&&(S.textarea=g),x.on("destroy",function(){S.editor.container.env=null}),x.container.env=x.env=S,x},r.createEditSession=function(u,f){var h=new a(u,f);return h.setUndoManager(new c),h},r.Range=l,r.Editor=d,r.EditSession=a,r.UndoManager=c,r.VirtualRenderer=s,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n);for(var r in n)n.hasOwnProperty(r)&&(window.ace[r]=n[r]);window.ace.default=window.ace,e&&(e.exports=window.ace)})}()})(RE);var Ph=RE.exports,nu={},J0={},PE={exports:{}},YP="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",XP=YP,QP=XP;function IE(){}function OE(){}OE.resetWarningCache=IE;var ZP=function(){function e(r,i,o,l,d,a){if(a!==QP){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:OE,resetWarningCache:IE};return n.PropTypes=n,n};PE.exports=ZP();var eb=PE.exports,Ih={exports:{}};Ih.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,l=9007199254740991,d="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",s="[object Boolean]",u="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",w="[object Number]",x="[object Null]",S="[object Object]",T="[object Promise]",v="[object Proxy]",b="[object RegExp]",y="[object Set]",m="[object String]",E="[object Symbol]",M="[object Undefined]",C="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",R="[object Float32Array]",A="[object Float64Array]",I="[object Int8Array]",P="[object Int16Array]",z="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",K="[object Uint16Array]",q="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,Y=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,te={};te[R]=te[A]=te[I]=te[P]=te[z]=te[B]=te[V]=te[K]=te[q]=!0,te[d]=te[a]=te[k]=te[s]=te[O]=te[u]=te[f]=te[h]=te[g]=te[w]=te[S]=te[b]=te[y]=te[m]=te[C]=!1;var ie=typeof Be=="object"&&Be&&Be.Object===Object&&Be,ce=typeof self=="object"&&self&&self.Object===Object&&self,he=ie||ce||Function("return this")(),ve=t&&!t.nodeType&&t,Ce=ve&&!0&&e&&!e.nodeType&&e,_e=Ce&&Ce.exports===ve,Re=_e&&ie.process,ot=function(){try{return Re&&Re.binding&&Re.binding("util")}catch{}}(),Te=ot&&ot.isTypedArray;function it(Q,se){for(var U=-1,J=Q==null?0:Q.length,ue=0,Se=[];++U<J;){var ze=Q[U];se(ze,U,Q)&&(Se[ue++]=ze)}return Se}function vt(Q,se){for(var U=-1,J=se.length,ue=Q.length;++U<J;)Q[ue+U]=se[U];return Q}function Qt(Q,se){for(var U=-1,J=Q==null?0:Q.length;++U<J;)if(se(Q[U],U,Q))return!0;return!1}function Ut(Q,se){for(var U=-1,J=Array(Q);++U<Q;)J[U]=se(U);return J}function Tr(Q){return function(se){return Q(se)}}function Ln(Q,se){return Q.has(se)}function Qn(Q,se){return Q==null?void 0:Q[se]}function Ht(Q){var se=-1,U=Array(Q.size);return Q.forEach(function(J,ue){U[++se]=[ue,J]}),U}function me(Q,se){return function(U){return Q(se(U))}}function Ae(Q){var se=-1,U=Array(Q.size);return Q.forEach(function(J){U[++se]=J}),U}var we=Array.prototype,He=Function.prototype,ct=Object.prototype,xe=he["__core-js_shared__"],Fe=He.toString,Ne=ct.hasOwnProperty,Ye=function(){var Q=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return Q?"Symbol(src)_1."+Q:""}(),et=ct.toString,kt=RegExp("^"+Fe.call(Ne).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),on=_e?he.Buffer:void 0,Rn=he.Symbol,Ar=he.Uint8Array,Mr=ct.propertyIsEnumerable,Rs=we.splice,hr=Rn?Rn.toStringTag:void 0,Ps=Object.getOwnPropertySymbols,Qr=on?on.isBuffer:void 0,pr=me(Object.keys,Object),Po=Jr(he,"DataView"),Pn=Jr(he,"Map"),mn=Jr(he,"Promise"),an=Jr(he,"Set"),qi=Jr(he,"WeakMap"),Yi=Jr(Object,"create"),Is=er(Po),Zn=er(Pn),yi=er(mn),bi=er(an),Aa=er(qi),Xi=Rn?Rn.prototype:void 0,Ma=Xi?Xi.valueOf:void 0;function In(Q){var se=-1,U=Q==null?0:Q.length;for(this.clear();++se<U;){var J=Q[se];this.set(J[0],J[1])}}function yu(){this.__data__=Yi?Yi(null):{},this.size=0}function Os(Q){var se=this.has(Q)&&delete this.__data__[Q];return this.size-=se?1:0,se}function bu(Q){var se=this.__data__;if(Yi){var U=se[Q];return U===r?void 0:U}return Ne.call(se,Q)?se[Q]:void 0}function wu(Q){var se=this.__data__;return Yi?se[Q]!==void 0:Ne.call(se,Q)}function Fs(Q,se){var U=this.__data__;return this.size+=this.has(Q)?0:1,U[Q]=Yi&&se===void 0?r:se,this}In.prototype.clear=yu,In.prototype.delete=Os,In.prototype.get=bu,In.prototype.has=wu,In.prototype.set=Fs;function vn(Q){var se=-1,U=Q==null?0:Q.length;for(this.clear();++se<U;){var J=Q[se];this.set(J[0],J[1])}}function wi(){this.__data__=[],this.size=0}function Ds(Q){var se=this.__data__,U=gr(se,Q);if(U<0)return!1;var J=se.length-1;return U==J?se.pop():Rs.call(se,U,1),--this.size,!0}function La(Q){var se=this.__data__,U=gr(se,Q);return U<0?void 0:se[U][1]}function Ra(Q){return gr(this.__data__,Q)>-1}function Io(Q,se){var U=this.__data__,J=gr(U,Q);return J<0?(++this.size,U.push([Q,se])):U[J][1]=se,this}vn.prototype.clear=wi,vn.prototype.delete=Ds,vn.prototype.get=La,vn.prototype.has=Ra,vn.prototype.set=Io;function Lr(Q){var se=-1,U=Q==null?0:Q.length;for(this.clear();++se<U;){var J=Q[se];this.set(J[0],J[1])}}function Pa(){this.size=0,this.__data__={hash:new In,map:new(Pn||vn),string:new In}}function Qi(Q){var se=zo(this,Q).delete(Q);return this.size-=se?1:0,se}function Zi(Q){return zo(this,Q).get(Q)}function Oo(Q){return zo(this,Q).has(Q)}function Ns(Q,se){var U=zo(this,Q),J=U.size;return U.set(Q,se),this.size+=U.size==J?0:1,this}Lr.prototype.clear=Pa,Lr.prototype.delete=Qi,Lr.prototype.get=Zi,Lr.prototype.has=Oo,Lr.prototype.set=Ns;function Rr(Q){var se=-1,U=Q==null?0:Q.length;for(this.__data__=new Lr;++se<U;)this.add(Q[se])}function zs(Q){return this.__data__.set(Q,r),this}function Ia(Q){return this.__data__.has(Q)}Rr.prototype.add=Rr.prototype.push=zs,Rr.prototype.has=Ia;function Pr(Q){var se=this.__data__=new vn(Q);this.size=se.size}function Su(){this.__data__=new vn,this.size=0}function Oa(Q){var se=this.__data__,U=se.delete(Q);return this.size=se.size,U}function Bs(Q){return this.__data__.get(Q)}function Fa(Q){return this.__data__.has(Q)}function js(Q,se){var U=this.__data__;if(U instanceof vn){var J=U.__data__;if(!Pn||J.length<n-1)return J.push([Q,se]),this.size=++U.size,this;U=this.__data__=new Lr(J)}return U.set(Q,se),this.size=U.size,this}Pr.prototype.clear=Su,Pr.prototype.delete=Oa,Pr.prototype.get=Bs,Pr.prototype.has=Fa,Pr.prototype.set=js;function yn(Q,se){var U=Ho(Q),J=!U&&jo(Q),ue=!U&&!J&&ni(Q),Se=!U&&!J&&!ue&&Xs(Q),ze=U||J||ue||Se,Xe=ze?Ut(Q.length,String):[],Qe=Xe.length;for(var Oe in Q)(se||Ne.call(Q,Oe))&&!(ze&&(Oe=="length"||ue&&(Oe=="offset"||Oe=="parent")||Se&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||Da(Oe,Qe)))&&Xe.push(Oe);return Xe}function gr(Q,se){for(var U=Q.length;U--;)if(Bo(Q[U][0],se))return U;return-1}function Fo(Q,se,U){var J=se(Q);return Ho(Q)?J:vt(J,U(Q))}function Ji(Q){return Q==null?Q===void 0?M:x:hr&&hr in Object(Q)?ei(Q):to(Q)}function Hs(Q){return _i(Q)&&Ji(Q)==d}function Do(Q,se,U,J,ue){return Q===se?!0:Q==null||se==null||!_i(Q)&&!_i(se)?Q!==Q&&se!==se:Vs(Q,se,U,J,Do,ue)}function Vs(Q,se,U,J,ue,Se){var ze=Ho(Q),Xe=Ho(se),Qe=ze?a:Jn(Q),Oe=Xe?a:Jn(se);Qe=Qe==d?S:Qe,Oe=Oe==d?S:Oe;var at=Qe==S,Ot=Oe==S,St=Qe==Oe;if(St&&ni(Q)){if(!ni(se))return!1;ze=!0,at=!1}if(St&&!at)return Se||(Se=new Pr),ze||Xs(Q)?Ws(Q,se,U,J,ue,Se):On(Q,se,Qe,U,J,ue,Se);if(!(U&i)){var sn=at&&Ne.call(Q,"__wrapped__"),_=Ot&&Ne.call(se,"__wrapped__");if(sn||_){var L=sn?Q.value():Q,F=_?se.value():se;return Se||(Se=new Pr),ue(L,F,U,J,Se)}}return St?(Se||(Se=new Pr),Us(Q,se,U,J,ue,Se)):!1}function Zr(Q){if(!Ys(Q)||Gs(Q))return!1;var se=Ir(Q)?kt:Y;return se.test(er(Q))}function No(Q){return _i(Q)&&xi(Q.length)&&!!te[Ji(Q)]}function xu(Q){if(!Na(Q))return pr(Q);var se=[];for(var U in Object(Q))Ne.call(Q,U)&&U!="constructor"&&se.push(U);return se}function Ws(Q,se,U,J,ue,Se){var ze=U&i,Xe=Q.length,Qe=se.length;if(Xe!=Qe&&!(ze&&Qe>Xe))return!1;var Oe=Se.get(Q);if(Oe&&Se.get(se))return Oe==se;var at=-1,Ot=!0,St=U&o?new Rr:void 0;for(Se.set(Q,se),Se.set(se,Q);++at<Xe;){var sn=Q[at],_=se[at];if(J)var L=ze?J(_,sn,at,se,Q,Se):J(sn,_,at,Q,se,Se);if(L!==void 0){if(L)continue;Ot=!1;break}if(St){if(!Qt(se,function(F,D){if(!Ln(St,D)&&(sn===F||ue(sn,F,U,J,Se)))return St.push(D)})){Ot=!1;break}}else if(!(sn===_||ue(sn,_,U,J,Se))){Ot=!1;break}}return Se.delete(Q),Se.delete(se),Ot}function On(Q,se,U,J,ue,Se,ze){switch(U){case O:if(Q.byteLength!=se.byteLength||Q.byteOffset!=se.byteOffset)return!1;Q=Q.buffer,se=se.buffer;case k:return!(Q.byteLength!=se.byteLength||!Se(new Ar(Q),new Ar(se)));case s:case u:case w:return Bo(+Q,+se);case f:return Q.name==se.name&&Q.message==se.message;case b:case m:return Q==se+"";case g:var Xe=Ht;case y:var Qe=J&i;if(Xe||(Xe=Ae),Q.size!=se.size&&!Qe)return!1;var Oe=ze.get(Q);if(Oe)return Oe==se;J|=o,ze.set(Q,se);var at=Ws(Xe(Q),Xe(se),J,ue,Se,ze);return ze.delete(Q),at;case E:if(Ma)return Ma.call(Q)==Ma.call(se)}return!1}function Us(Q,se,U,J,ue,Se){var ze=U&i,Xe=Si(Q),Qe=Xe.length,Oe=Si(se),at=Oe.length;if(Qe!=at&&!ze)return!1;for(var Ot=Qe;Ot--;){var St=Xe[Ot];if(!(ze?St in se:Ne.call(se,St)))return!1}var sn=Se.get(Q);if(sn&&Se.get(se))return sn==se;var _=!0;Se.set(Q,se),Se.set(se,Q);for(var L=ze;++Ot<Qe;){St=Xe[Ot];var F=Q[St],D=se[St];if(J)var j=ze?J(D,F,St,se,Q,Se):J(F,D,St,Q,se,Se);if(!(j===void 0?F===D||ue(F,D,U,J,Se):j)){_=!1;break}L||(L=St=="constructor")}if(_&&!L){var H=Q.constructor,G=se.constructor;H!=G&&"constructor"in Q&&"constructor"in se&&!(typeof H=="function"&&H instanceof H&&typeof G=="function"&&G instanceof G)&&(_=!1)}return Se.delete(Q),Se.delete(se),_}function Si(Q){return Fo(Q,Qs,ti)}function zo(Q,se){var U=Q.__data__;return eo(se)?U[typeof se=="string"?"string":"hash"]:U.map}function Jr(Q,se){var U=Qn(Q,se);return Zr(U)?U:void 0}function ei(Q){var se=Ne.call(Q,hr),U=Q[hr];try{Q[hr]=void 0;var J=!0}catch{}var ue=et.call(Q);return J&&(se?Q[hr]=U:delete Q[hr]),ue}var ti=Ps?function(Q){return Q==null?[]:(Q=Object(Q),it(Ps(Q),function(se){return Mr.call(Q,se)}))}:Zs,Jn=Ji;(Po&&Jn(new Po(new ArrayBuffer(1)))!=O||Pn&&Jn(new Pn)!=g||mn&&Jn(mn.resolve())!=T||an&&Jn(new an)!=y||qi&&Jn(new qi)!=C)&&(Jn=function(Q){var se=Ji(Q),U=se==S?Q.constructor:void 0,J=U?er(U):"";if(J)switch(J){case Is:return O;case Zn:return g;case yi:return T;case bi:return y;case Aa:return C}return se});function Da(Q,se){return se=se??l,!!se&&(typeof Q=="number"||Z.test(Q))&&Q>-1&&Q%1==0&&Q<se}function eo(Q){var se=typeof Q;return se=="string"||se=="number"||se=="symbol"||se=="boolean"?Q!=="__proto__":Q===null}function Gs(Q){return!!Ye&&Ye in Q}function Na(Q){var se=Q&&Q.constructor,U=typeof se=="function"&&se.prototype||ct;return Q===U}function to(Q){return et.call(Q)}function er(Q){if(Q!=null){try{return Fe.call(Q)}catch{}try{return Q+""}catch{}}return""}function Bo(Q,se){return Q===se||Q!==Q&&se!==se}var jo=Hs(function(){return arguments}())?Hs:function(Q){return _i(Q)&&Ne.call(Q,"callee")&&!Mr.call(Q,"callee")},Ho=Array.isArray;function Ks(Q){return Q!=null&&xi(Q.length)&&!Ir(Q)}var ni=Qr||za;function qs(Q,se){return Do(Q,se)}function Ir(Q){if(!Ys(Q))return!1;var se=Ji(Q);return se==h||se==p||se==c||se==v}function xi(Q){return typeof Q=="number"&&Q>-1&&Q%1==0&&Q<=l}function Ys(Q){var se=typeof Q;return Q!=null&&(se=="object"||se=="function")}function _i(Q){return Q!=null&&typeof Q=="object"}var Xs=Te?Tr(Te):No;function Qs(Q){return Ks(Q)?yn(Q):xu(Q)}function Zs(){return[]}function za(){return!1}e.exports=qs})(Ih,Ih.exports);var FE=Ih.exports,di={};Object.defineProperty(di,"__esModule",{value:!0});di.getAceInstance=di.debounce=di.editorEvents=di.editorOptions=void 0;var JP=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];di.editorOptions=JP;var eI=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];di.editorEvents=eI;var tI=function(){var e;return typeof window>"u"?(Be.window={},e=Ph,delete Be.window):window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=Ph,e};di.getAceInstance=tI;var nI=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}};di.debounce=nI;var rI=Be&&Be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ay=Be&&Be.__assign||function(){return ay=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ay.apply(this,arguments)};Object.defineProperty(J0,"__esModule",{value:!0});var iI=Ph,Ve=eb,z1=N,Xd=FE,ul=di,B1=(0,ul.getAceInstance)(),oI=function(e){rI(t,e);function t(n){var r=e.call(this,n)||this;return ul.editorEvents.forEach(function(i){r[i]=r[i].bind(r)}),r.debounce=ul.debounce,r}return t.prototype.isInShadow=function(n){for(var r=n&&n.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.className,o=r.onBeforeLoad,l=r.onValidate,d=r.mode,a=r.focus,c=r.theme,s=r.fontSize,u=r.value,f=r.defaultValue,h=r.showGutter,p=r.wrapEnabled,g=r.showPrintMargin,w=r.scrollMargin,x=w===void 0?[0,0,0,0]:w,S=r.keyboardHandler,T=r.onLoad,v=r.commands,b=r.annotations,y=r.markers,m=r.placeholder;this.editor=B1.edit(this.refEditor),o&&o(B1);for(var E=Object.keys(this.props.editorProps),M=0;M<E.length;M++)this.editor[E[M]]=this.props.editorProps[E[M]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof d=="string"?"ace/mode/".concat(d):d),c&&c!==""&&this.editor.setTheme("ace/theme/".concat(c)),this.editor.setFontSize(typeof s=="number"?"".concat(s,"px"):s),this.editor.getSession().setValue(f||u||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(h),this.editor.getSession().setUseWrapMode(p),this.editor.setShowPrintMargin(g),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),m&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),l&&this.editor.getSession().on("changeAnnotation",function(){var k=n.editor.getSession().getAnnotations();n.props.onValidate(k)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(b||[]),y&&y.length>0&&this.handleMarkers(y);var C=this.editor.$options;ul.editorOptions.forEach(function(k){C.hasOwnProperty(k)?n.editor.setOption(k,n.props[k]):n.props[k]&&console.warn("ReactAce: editor option ".concat(k," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(v)&&v.forEach(function(k){typeof k.exec=="string"?n.editor.commands.bindKey(k.bindKey,k.exec):n.editor.commands.addCommand(k)}),S&&this.editor.setKeyboardHandler("ace/keyboard/"+S),i&&(this.refEditor.className+=" "+i),T&&T(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(n){for(var r=n,i=this.props,o=0;o<ul.editorOptions.length;o++){var l=ul.editorOptions[o];i[l]!==r[l]&&this.editor.setOption(l,i[l])}if(i.className!==r.className){var d=this.refEditor.className,a=d.trim().split(" "),c=r.className.trim().split(" ");c.forEach(function(f){var h=a.indexOf(f);a.splice(h,1)}),this.refEditor.className=" "+i.className+" "+a.join(" ")}var s=this.editor&&i.value!=null&&this.editor.getValue()!==i.value;if(s){this.silent=!0;var u=this.editor.session.selection.toJSON();this.editor.setValue(i.value,i.cursorStart),this.editor.session.selection.fromJSON(u),this.silent=!1}i.placeholder!==r.placeholder&&this.updatePlaceholder(),i.mode!==r.mode&&this.editor.getSession().setMode(typeof i.mode=="string"?"ace/mode/".concat(i.mode):i.mode),i.theme!==r.theme&&this.editor.setTheme("ace/theme/"+i.theme),i.keyboardHandler!==r.keyboardHandler&&(i.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+i.keyboardHandler):this.editor.setKeyboardHandler(null)),i.fontSize!==r.fontSize&&this.editor.setFontSize(typeof i.fontSize=="number"?"".concat(i.fontSize,"px"):i.fontSize),i.wrapEnabled!==r.wrapEnabled&&this.editor.getSession().setUseWrapMode(i.wrapEnabled),i.showPrintMargin!==r.showPrintMargin&&this.editor.setShowPrintMargin(i.showPrintMargin),i.showGutter!==r.showGutter&&this.editor.renderer.setShowGutter(i.showGutter),Xd(i.setOptions,r.setOptions)||this.handleOptions(i),(s||!Xd(i.annotations,r.annotations))&&this.editor.getSession().setAnnotations(i.annotations||[]),!Xd(i.markers,r.markers)&&Array.isArray(i.markers)&&this.handleMarkers(i.markers),Xd(i.scrollMargin,r.scrollMargin)||this.handleScrollMargins(i.scrollMargin),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!n.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(n){n===void 0&&(n=[0,0,0,0]),this.editor.renderer.setScrollMargin(n[0],n[1],n[2],n[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=this.editor.getValue();this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=this.editor.getSelection();this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=this.editor.getSelection();this.props.onCursorChange(r,n)}},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n,this.editor)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n,this.editor)},t.prototype.onCopy=function(n){var r=n.text;this.props.onCopy&&this.props.onCopy(r)},t.prototype.onPaste=function(n){var r=n.text;this.props.onPaste&&this.props.onPaste(r)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n){for(var r=Object.keys(n.setOptions),i=0;i<r.length;i++)this.editor.setOption(r[i],n.setOptions[r[i]])},t.prototype.handleMarkers=function(n){var r=this,i=this.editor.getSession().getMarkers(!0);for(var o in i)i.hasOwnProperty(o)&&this.editor.getSession().removeMarker(i[o].id);i=this.editor.getSession().getMarkers(!1);for(var o in i)i.hasOwnProperty(o)&&i[o].clazz!=="ace_active-line"&&i[o].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(i[o].id);n.forEach(function(l){var d=l.startRow,a=l.startCol,c=l.endRow,s=l.endCol,u=l.className,f=l.type,h=l.inFront,p=h===void 0?!1:h,g=new iI.Range(d,a,c,s);r.editor.getSession().addMarker(g,u,f,p)})},t.prototype.updatePlaceholder=function(){var n=this.editor,r=this.props.placeholder,i=!n.session.getValue().length,o=n.renderer.placeholderNode;!i&&o?(n.renderer.scroller.removeChild(n.renderer.placeholderNode),n.renderer.placeholderNode=null):i&&!o?(o=n.renderer.placeholderNode=document.createElement("div"),o.textContent=r||"",o.className="ace_comment ace_placeholder",o.style.padding="0 9px",o.style.position="absolute",o.style.zIndex="3",n.renderer.scroller.appendChild(o)):i&&o&&(o.textContent=r)},t.prototype.updateRef=function(n){this.refEditor=n},t.prototype.render=function(){var n=this.props,r=n.name,i=n.width,o=n.height,l=n.style,d=ay({width:i,height:o},l);return z1.createElement("div",{ref:this.updateRef,id:r,style:d})},t.propTypes={mode:Ve.oneOfType([Ve.string,Ve.object]),focus:Ve.bool,theme:Ve.string,name:Ve.string,className:Ve.string,height:Ve.string,width:Ve.string,fontSize:Ve.oneOfType([Ve.number,Ve.string]),showGutter:Ve.bool,onChange:Ve.func,onCopy:Ve.func,onPaste:Ve.func,onFocus:Ve.func,onInput:Ve.func,onBlur:Ve.func,onScroll:Ve.func,value:Ve.string,defaultValue:Ve.string,onLoad:Ve.func,onSelectionChange:Ve.func,onCursorChange:Ve.func,onBeforeLoad:Ve.func,onValidate:Ve.func,minLines:Ve.number,maxLines:Ve.number,readOnly:Ve.bool,highlightActiveLine:Ve.bool,tabSize:Ve.number,showPrintMargin:Ve.bool,cursorStart:Ve.number,debounceChangePeriod:Ve.number,editorProps:Ve.object,setOptions:Ve.object,style:Ve.object,scrollMargin:Ve.array,annotations:Ve.array,markers:Ve.array,keyboardHandler:Ve.string,wrapEnabled:Ve.bool,enableSnippets:Ve.bool,enableBasicAutocompletion:Ve.oneOfType([Ve.bool,Ve.array]),enableLiveAutocompletion:Ve.oneOfType([Ve.bool,Ve.array]),navigateToFileEnd:Ve.bool,commands:Ve.array,placeholder:Ve.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(z1.Component);J0.default=oI;var tb={},Bp={},DE={exports:{}};(function(e,t){ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(n,r,i){var o=n("./lib/oop");n("./lib/lang");var l=n("./lib/event_emitter").EventEmitter,d=n("./editor").Editor,a=n("./virtual_renderer").VirtualRenderer,c=n("./edit_session").EditSession,s=function(u,f,h){this.BELOW=1,this.BESIDE=0,this.$container=u,this.$theme=f,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(h||1),this.$cEditor=this.$editors[0],this.on("focus",function(p){this.$cEditor=p}.bind(this))};(function(){o.implement(this,l),this.$createEditor=function(){var u=document.createElement("div");u.className=this.$editorCSS,u.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(u);var f=new d(new a(u,this.$theme));return f.on("focus",function(){this._emit("focus",f)}.bind(this)),this.$editors.push(f),f.setFontSize(this.$fontSize),f},this.setSplits=function(u){var f;if(u<1)throw"The number of splits have to be > 0!";if(u!=this.$splits){if(u>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<u;)f=this.$editors[this.$splits],this.$container.appendChild(f.container),f.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<u;)this.$createEditor(),this.$splits++}else for(;this.$splits>u;)f=this.$editors[this.$splits-1],this.$container.removeChild(f.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(u){return this.$editors[u]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(u){this.$editors.forEach(function(f){f.setTheme(u)})},this.setKeyboardHandler=function(u){this.$editors.forEach(function(f){f.setKeyboardHandler(u)})},this.forEach=function(u,f){this.$editors.forEach(u,f)},this.$fontSize="",this.setFontSize=function(u){this.$fontSize=u,this.forEach(function(f){f.setFontSize(u)})},this.$cloneSession=function(u){var f=new c(u.getDocument(),u.getMode()),h=u.getUndoManager();return f.setUndoManager(h),f.setTabSize(u.getTabSize()),f.setUseSoftTabs(u.getUseSoftTabs()),f.setOverwrite(u.getOverwrite()),f.setBreakpoints(u.getBreakpoints()),f.setUseWrapMode(u.getUseWrapMode()),f.setUseWorker(u.getUseWorker()),f.setWrapLimitRange(u.$wrapLimitRange.min,u.$wrapLimitRange.max),f.$foldData=u.$cloneFoldData(),f},this.setSession=function(u,f){var h;f==null?h=this.$cEditor:h=this.$editors[f];var p=this.$editors.some(function(g){return g.session===u});return p&&(u=this.$cloneSession(u)),h.setSession(u),u},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(u){this.$orientation!=u&&(this.$orientation=u,this.resize())},this.resize=function(){var u=this.$container.clientWidth,f=this.$container.clientHeight,h;if(this.$orientation==this.BESIDE)for(var p=u/this.$splits,g=0;g<this.$splits;g++)h=this.$editors[g],h.container.style.width=p+"px",h.container.style.top="0px",h.container.style.left=g*p+"px",h.container.style.height=f+"px",h.resize();else for(var w=f/this.$splits,g=0;g<this.$splits;g++)h=this.$editors[g],h.container.style.width=u+"px",h.container.style.top=g*w+"px",h.container.style.left="0px",h.container.style.height=w+"px",h.resize()}}).call(s.prototype),r.Split=s}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(n,r,i){i.exports=n("../split")}),function(){ace.require(["ace/ext/split"],function(n){e&&(e.exports=n)})}()})(DE);var aI=DE.exports,sI="Expected a function",NE="__lodash_hash_undefined__",zE=1/0,lI="[object Function]",uI="[object GeneratorFunction]",cI="[object Symbol]",dI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fI=/^\w*$/,hI=/^\./,pI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gI=/[\\^$.*+?()[\]{}|]/g,mI=/\\(\\)?/g,vI=/^\[object .+?Constructor\]$/,yI=typeof Be=="object"&&Be&&Be.Object===Object&&Be,bI=typeof self=="object"&&self&&self.Object===Object&&self,nb=yI||bI||Function("return this")();function wI(e,t){return e==null?void 0:e[t]}function SI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var xI=Array.prototype,_I=Function.prototype,BE=Object.prototype,cm=nb["__core-js_shared__"],j1=function(){var e=/[^.]+$/.exec(cm&&cm.keys&&cm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),jE=_I.toString,rb=BE.hasOwnProperty,HE=BE.toString,CI=RegExp("^"+jE.call(rb).replace(gI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H1=nb.Symbol,kI=xI.splice,EI=VE(nb,"Map"),Uc=VE(Object,"create"),V1=H1?H1.prototype:void 0,W1=V1?V1.toString:void 0;function xs(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $I(){this.__data__=Uc?Uc(null):{}}function TI(e){return this.has(e)&&delete this.__data__[e]}function AI(e){var t=this.__data__;if(Uc){var n=t[e];return n===NE?void 0:n}return rb.call(t,e)?t[e]:void 0}function MI(e){var t=this.__data__;return Uc?t[e]!==void 0:rb.call(t,e)}function LI(e,t){var n=this.__data__;return n[e]=Uc&&t===void 0?NE:t,this}xs.prototype.clear=$I;xs.prototype.delete=TI;xs.prototype.get=AI;xs.prototype.has=MI;xs.prototype.set=LI;function gu(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function RI(){this.__data__=[]}function PI(e){var t=this.__data__,n=jp(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():kI.call(t,n,1),!0}function II(e){var t=this.__data__,n=jp(t,e);return n<0?void 0:t[n][1]}function OI(e){return jp(this.__data__,e)>-1}function FI(e,t){var n=this.__data__,r=jp(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}gu.prototype.clear=RI;gu.prototype.delete=PI;gu.prototype.get=II;gu.prototype.has=OI;gu.prototype.set=FI;function Ts(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function DI(){this.__data__={hash:new xs,map:new(EI||gu),string:new xs}}function NI(e){return Hp(this,e).delete(e)}function zI(e){return Hp(this,e).get(e)}function BI(e){return Hp(this,e).has(e)}function jI(e,t){return Hp(this,e).set(e,t),this}Ts.prototype.clear=DI;Ts.prototype.delete=NI;Ts.prototype.get=zI;Ts.prototype.has=BI;Ts.prototype.set=jI;function jp(e,t){for(var n=e.length;n--;)if(ZI(e[n][0],t))return n;return-1}function HI(e,t){t=GI(t,e)?[t]:UI(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[XI(t[n++])];return n&&n==r?e:void 0}function VI(e){if(!UE(e)||qI(e))return!1;var t=JI(e)||SI(e)?CI:vI;return t.test(QI(e))}function WI(e){if(typeof e=="string")return e;if(ob(e))return W1?W1.call(e):"";var t=e+"";return t=="0"&&1/e==-zE?"-0":t}function UI(e){return WE(e)?e:YI(e)}function Hp(e,t){var n=e.__data__;return KI(t)?n[typeof t=="string"?"string":"hash"]:n.map}function VE(e,t){var n=wI(e,t);return VI(n)?n:void 0}function GI(e,t){if(WE(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ob(e)?!0:fI.test(e)||!dI.test(e)||t!=null&&e in Object(t)}function KI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qI(e){return!!j1&&j1 in e}var YI=ib(function(e){e=tO(e);var t=[];return hI.test(e)&&t.push(""),e.replace(pI,function(n,r,i,o){t.push(i?o.replace(mI,"$1"):r||n)}),t});function XI(e){if(typeof e=="string"||ob(e))return e;var t=e+"";return t=="0"&&1/e==-zE?"-0":t}function QI(e){if(e!=null){try{return jE.call(e)}catch{}try{return e+""}catch{}}return""}function ib(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(sI);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return n.cache=o.set(i,l),l};return n.cache=new(ib.Cache||Ts),n}ib.Cache=Ts;function ZI(e,t){return e===t||e!==e&&t!==t}var WE=Array.isArray;function JI(e){var t=UE(e)?HE.call(e):"";return t==lI||t==uI}function UE(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function eO(e){return!!e&&typeof e=="object"}function ob(e){return typeof e=="symbol"||eO(e)&&HE.call(e)==cI}function tO(e){return e==null?"":WI(e)}function nO(e,t,n){var r=e==null?void 0:HI(e,t);return r===void 0?n:r}var rO=nO,iO=Be&&Be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),sy=Be&&Be.__assign||function(){return sy=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},sy.apply(this,arguments)};Object.defineProperty(Bp,"__esModule",{value:!0});var Ga=di,dm=(0,Ga.getAceInstance)(),oO=Ph,aO=aI,Ge=eb,U1=N,fm=FE,oo=rO,sO=function(e){iO(t,e);function t(n){var r=e.call(this,n)||this;return Ga.editorEvents.forEach(function(i){r[i]=r[i].bind(r)}),r.debounce=Ga.debounce,r}return t.prototype.isInShadow=function(n){for(var r=n&&n.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.className,o=r.onBeforeLoad,l=r.mode,d=r.focus,a=r.theme,c=r.fontSize,s=r.value,u=r.defaultValue,f=r.cursorStart,h=r.showGutter,p=r.wrapEnabled,g=r.showPrintMargin,w=r.scrollMargin,x=w===void 0?[0,0,0,0]:w,S=r.keyboardHandler,T=r.onLoad,v=r.commands,b=r.annotations,y=r.markers,m=r.splits;this.editor=dm.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(a)),o&&o(dm);var E=Object.keys(this.props.editorProps),M=new aO.Split(this.editor.container,"ace/theme/".concat(a),m);this.editor.env.split=M,this.splitEditor=M.getEditor(0),this.split=M,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var C=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),M.forEach(function(O,R){for(var A=0;A<E.length;A++)O[E[A]]=n.props.editorProps[E[A]];var I=oo(u,R),P=oo(s,R,"");O.session.setUndoManager(new dm.UndoManager),O.setTheme("ace/theme/".concat(a)),O.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),O.getSession().setMode("ace/mode/".concat(l)),O.setFontSize(c),O.renderer.setShowGutter(h),O.getSession().setUseWrapMode(p),O.setShowPrintMargin(g),O.on("focus",n.onFocus),O.on("blur",n.onBlur),O.on("input",n.onInput),O.on("copy",n.onCopy),O.on("paste",n.onPaste),O.on("change",n.onChange),O.getSession().selection.on("changeSelection",n.onSelectionChange),O.getSession().selection.on("changeCursor",n.onCursorChange),O.session.on("changeScrollTop",n.onScroll),O.setValue(I===void 0?P:I,f);var z=oo(b,R,[]),B=oo(y,R,[]);O.getSession().setAnnotations(z),B&&B.length>0&&n.handleMarkers(B,O);for(var A=0;A<Ga.editorOptions.length;A++){var V=Ga.editorOptions[A];C.hasOwnProperty(V)?O.setOption(V,n.props[V]):n.props[V]&&console.warn("ReaceAce: editor option ".concat(V," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}n.handleOptions(n.props,O),Array.isArray(v)&&v.forEach(function(K){typeof K.exec=="string"?O.commands.bindKey(K.bindKey,K.exec):O.commands.addCommand(K)}),S&&O.setKeyboardHandler("ace/keyboard/"+S)}),i&&(this.refEditor.className+=" "+i),d&&this.splitEditor.focus();var k=this.editor.env.split;k.setOrientation(this.props.orientation==="below"?k.BELOW:k.BESIDE),k.resize(!0),T&&T(k)},t.prototype.componentDidUpdate=function(n){var r=this,i=n,o=this.props,l=this.editor.env.split;if(o.splits!==i.splits&&l.setSplits(o.splits),o.orientation!==i.orientation&&l.setOrientation(o.orientation==="below"?l.BELOW:l.BESIDE),l.forEach(function(s,u){o.mode!==i.mode&&s.getSession().setMode("ace/mode/"+o.mode),o.keyboardHandler!==i.keyboardHandler&&(o.keyboardHandler?s.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):s.setKeyboardHandler(null)),o.fontSize!==i.fontSize&&s.setFontSize(o.fontSize),o.wrapEnabled!==i.wrapEnabled&&s.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==i.showPrintMargin&&s.setShowPrintMargin(o.showPrintMargin),o.showGutter!==i.showGutter&&s.renderer.setShowGutter(o.showGutter);for(var f=0;f<Ga.editorOptions.length;f++){var h=Ga.editorOptions[f];o[h]!==i[h]&&s.setOption(h,o[h])}fm(o.setOptions,i.setOptions)||r.handleOptions(o,s);var p=oo(o.value,u,"");if(s.getValue()!==p){r.silent=!0;var g=s.session.selection.toJSON();s.setValue(p,o.cursorStart),s.session.selection.fromJSON(g),r.silent=!1}var w=oo(o.annotations,u,[]),x=oo(i.annotations,u,[]);fm(w,x)||s.getSession().setAnnotations(w);var S=oo(o.markers,u,[]),T=oo(i.markers,u,[]);!fm(S,T)&&Array.isArray(S)&&r.handleMarkers(S,s)}),o.className!==i.className){var d=this.refEditor.className,a=d.trim().split(" "),c=i.className.trim().split(" ");c.forEach(function(s){var u=a.indexOf(s);a.splice(u,1)}),this.refEditor.className=" "+o.className+" "+a.join(" ")}o.theme!==i.theme&&l.setTheme("ace/theme/"+o.theme),o.focus&&!i.focus&&this.splitEditor.focus(),(o.height!==this.props.height||o.width!==this.props.width)&&this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getValue())}),this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getSelection())}),this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getSelection())}),this.props.onCursorChange(r,n)}},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n)},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n)},t.prototype.onCopy=function(n){this.props.onCopy&&this.props.onCopy(n)},t.prototype.onPaste=function(n){this.props.onPaste&&this.props.onPaste(n)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n,r){for(var i=Object.keys(n.setOptions),o=0;o<i.length;o++)r.setOption(i[o],n.setOptions[i[o]])},t.prototype.handleMarkers=function(n,r){var i=r.getSession().getMarkers(!0);for(var o in i)i.hasOwnProperty(o)&&r.getSession().removeMarker(i[o].id);i=r.getSession().getMarkers(!1);for(var o in i)i.hasOwnProperty(o)&&r.getSession().removeMarker(i[o].id);n.forEach(function(l){var d=l.startRow,a=l.startCol,c=l.endRow,s=l.endCol,u=l.className,f=l.type,h=l.inFront,p=h===void 0?!1:h,g=new oO.Range(d,a,c,s);r.getSession().addMarker(g,u,f,p)})},t.prototype.updateRef=function(n){this.refEditor=n},t.prototype.render=function(){var n=this.props,r=n.name,i=n.width,o=n.height,l=n.style,d=sy({width:i,height:o},l);return U1.createElement("div",{ref:this.updateRef,id:r,style:d})},t.propTypes={className:Ge.string,debounceChangePeriod:Ge.number,defaultValue:Ge.arrayOf(Ge.string),focus:Ge.bool,fontSize:Ge.oneOfType([Ge.number,Ge.string]),height:Ge.string,mode:Ge.string,name:Ge.string,onBlur:Ge.func,onChange:Ge.func,onCopy:Ge.func,onFocus:Ge.func,onInput:Ge.func,onLoad:Ge.func,onPaste:Ge.func,onScroll:Ge.func,orientation:Ge.string,showGutter:Ge.bool,splits:Ge.number,theme:Ge.string,value:Ge.arrayOf(Ge.string),width:Ge.string,onSelectionChange:Ge.func,onCursorChange:Ge.func,onBeforeLoad:Ge.func,minLines:Ge.number,maxLines:Ge.number,readOnly:Ge.bool,highlightActiveLine:Ge.bool,tabSize:Ge.number,showPrintMargin:Ge.bool,cursorStart:Ge.number,editorProps:Ge.object,setOptions:Ge.object,style:Ge.object,scrollMargin:Ge.array,annotations:Ge.array,markers:Ge.array,keyboardHandler:Ge.string,wrapEnabled:Ge.bool,enableBasicAutocompletion:Ge.oneOfType([Ge.bool,Ge.array]),enableLiveAutocompletion:Ge.oneOfType([Ge.bool,Ge.array]),commands:Ge.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(U1.Component);Bp.default=sO;var GE={exports:{}};(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,i=0;t.Diff=function(o,l){return[o,l]},t.prototype.diff_main=function(o,l,d,a){typeof a>"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var c=a;if(o==null||l==null)throw new Error("Null input. (diff_main)");if(o==l)return o?[new t.Diff(i,o)]:[];typeof d>"u"&&(d=!0);var s=d,u=this.diff_commonPrefix(o,l),f=o.substring(0,u);o=o.substring(u),l=l.substring(u),u=this.diff_commonSuffix(o,l);var h=o.substring(o.length-u);o=o.substring(0,o.length-u),l=l.substring(0,l.length-u);var p=this.diff_compute_(o,l,s,c);return f&&p.unshift(new t.Diff(i,f)),h&&p.push(new t.Diff(i,h)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(o,l,d,a){var c;if(!o)return[new t.Diff(r,l)];if(!l)return[new t.Diff(n,o)];var s=o.length>l.length?o:l,u=o.length>l.length?l:o,f=s.indexOf(u);if(f!=-1)return c=[new t.Diff(r,s.substring(0,f)),new t.Diff(i,u),new t.Diff(r,s.substring(f+u.length))],o.length>l.length&&(c[0][0]=c[2][0]=n),c;if(u.length==1)return[new t.Diff(n,o),new t.Diff(r,l)];var h=this.diff_halfMatch_(o,l);if(h){var p=h[0],g=h[1],w=h[2],x=h[3],S=h[4],T=this.diff_main(p,w,d,a),v=this.diff_main(g,x,d,a);return T.concat([new t.Diff(i,S)],v)}return d&&o.length>100&&l.length>100?this.diff_lineMode_(o,l,a):this.diff_bisect_(o,l,a)},t.prototype.diff_lineMode_=function(o,l,d){var a=this.diff_linesToChars_(o,l);o=a.chars1,l=a.chars2;var c=a.lineArray,s=this.diff_main(o,l,!1,d);this.diff_charsToLines_(s,c),this.diff_cleanupSemantic(s),s.push(new t.Diff(i,""));for(var u=0,f=0,h=0,p="",g="";u<s.length;){switch(s[u][0]){case r:h++,g+=s[u][1];break;case n:f++,p+=s[u][1];break;case i:if(f>=1&&h>=1){s.splice(u-f-h,f+h),u=u-f-h;for(var w=this.diff_main(p,g,!1,d),x=w.length-1;x>=0;x--)s.splice(u,0,w[x]);u=u+w.length}h=0,f=0,p="",g="";break}u++}return s.pop(),s},t.prototype.diff_bisect_=function(o,l,d){for(var a=o.length,c=l.length,s=Math.ceil((a+c)/2),u=s,f=2*s,h=new Array(f),p=new Array(f),g=0;g<f;g++)h[g]=-1,p[g]=-1;h[u+1]=0,p[u+1]=0;for(var w=a-c,x=w%2!=0,S=0,T=0,v=0,b=0,y=0;y<s&&!(new Date().getTime()>d);y++){for(var m=-y+S;m<=y-T;m+=2){var E=u+m,M;m==-y||m!=y&&h[E-1]<h[E+1]?M=h[E+1]:M=h[E-1]+1;for(var C=M-m;M<a&&C<c&&o.charAt(M)==l.charAt(C);)M++,C++;if(h[E]=M,M>a)T+=2;else if(C>c)S+=2;else if(x){var k=u+w-m;if(k>=0&&k<f&&p[k]!=-1){var O=a-p[k];if(M>=O)return this.diff_bisectSplit_(o,l,M,C,d)}}}for(var R=-y+v;R<=y-b;R+=2){var k=u+R,O;R==-y||R!=y&&p[k-1]<p[k+1]?O=p[k+1]:O=p[k-1]+1;for(var A=O-R;O<a&&A<c&&o.charAt(a-O-1)==l.charAt(c-A-1);)O++,A++;if(p[k]=O,O>a)b+=2;else if(A>c)v+=2;else if(!x){var E=u+w-R;if(E>=0&&E<f&&h[E]!=-1){var M=h[E],C=u+M-E;if(O=a-O,M>=O)return this.diff_bisectSplit_(o,l,M,C,d)}}}}return[new t.Diff(n,o),new t.Diff(r,l)]},t.prototype.diff_bisectSplit_=function(o,l,d,a,c){var s=o.substring(0,d),u=l.substring(0,a),f=o.substring(d),h=l.substring(a),p=this.diff_main(s,u,!1,c),g=this.diff_main(f,h,!1,c);return p.concat(g)},t.prototype.diff_linesToChars_=function(o,l){var d=[],a={};d[0]="";function c(h){for(var p="",g=0,w=-1,x=d.length;w<h.length-1;){w=h.indexOf(`
`,g),w==-1&&(w=h.length-1);var S=h.substring(g,w+1);(a.hasOwnProperty?a.hasOwnProperty(S):a[S]!==void 0)?p+=String.fromCharCode(a[S]):(x==s&&(S=h.substring(g),w=h.length),p+=String.fromCharCode(x),a[S]=x,d[x++]=S),g=w+1}return p}var s=4e4,u=c(o);s=65535;var f=c(l);return{chars1:u,chars2:f,lineArray:d}},t.prototype.diff_charsToLines_=function(o,l){for(var d=0;d<o.length;d++){for(var a=o[d][1],c=[],s=0;s<a.length;s++)c[s]=l[a.charCodeAt(s)];o[d][1]=c.join("")}},t.prototype.diff_commonPrefix=function(o,l){if(!o||!l||o.charAt(0)!=l.charAt(0))return 0;for(var d=0,a=Math.min(o.length,l.length),c=a,s=0;d<c;)o.substring(s,c)==l.substring(s,c)?(d=c,s=d):a=c,c=Math.floor((a-d)/2+d);return c},t.prototype.diff_commonSuffix=function(o,l){if(!o||!l||o.charAt(o.length-1)!=l.charAt(l.length-1))return 0;for(var d=0,a=Math.min(o.length,l.length),c=a,s=0;d<c;)o.substring(o.length-c,o.length-s)==l.substring(l.length-c,l.length-s)?(d=c,s=d):a=c,c=Math.floor((a-d)/2+d);return c},t.prototype.diff_commonOverlap_=function(o,l){var d=o.length,a=l.length;if(d==0||a==0)return 0;d>a?o=o.substring(d-a):d<a&&(l=l.substring(0,d));var c=Math.min(d,a);if(o==l)return c;for(var s=0,u=1;;){var f=o.substring(c-u),h=l.indexOf(f);if(h==-1)return s;u+=h,(h==0||o.substring(c-u)==l.substring(0,u))&&(s=u,u++)}},t.prototype.diff_halfMatch_=function(o,l){if(this.Diff_Timeout<=0)return null;var d=o.length>l.length?o:l,a=o.length>l.length?l:o;if(d.length<4||a.length*2<d.length)return null;var c=this;function s(T,v,b){for(var y=T.substring(b,b+Math.floor(T.length/4)),m=-1,E="",M,C,k,O;(m=v.indexOf(y,m+1))!=-1;){var R=c.diff_commonPrefix(T.substring(b),v.substring(m)),A=c.diff_commonSuffix(T.substring(0,b),v.substring(0,m));E.length<A+R&&(E=v.substring(m-A,m)+v.substring(m,m+R),M=T.substring(0,b-A),C=T.substring(b+R),k=v.substring(0,m-A),O=v.substring(m+R))}return E.length*2>=T.length?[M,C,k,O,E]:null}var u=s(d,a,Math.ceil(d.length/4)),f=s(d,a,Math.ceil(d.length/2)),h;if(!u&&!f)return null;f?u?h=u[4].length>f[4].length?u:f:h=f:h=u;var p,g,w,x;o.length>l.length?(p=h[0],g=h[1],w=h[2],x=h[3]):(w=h[0],x=h[1],p=h[2],g=h[3]);var S=h[4];return[p,g,w,x,S]},t.prototype.diff_cleanupSemantic=function(o){for(var l=!1,d=[],a=0,c=null,s=0,u=0,f=0,h=0,p=0;s<o.length;)o[s][0]==i?(d[a++]=s,u=h,f=p,h=0,p=0,c=o[s][1]):(o[s][0]==r?h+=o[s][1].length:p+=o[s][1].length,c&&c.length<=Math.max(u,f)&&c.length<=Math.max(h,p)&&(o.splice(d[a-1],0,new t.Diff(n,c)),o[d[a-1]+1][0]=r,a--,a--,s=a>0?d[a-1]:-1,u=0,f=0,h=0,p=0,c=null,l=!0)),s++;for(l&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),s=1;s<o.length;){if(o[s-1][0]==n&&o[s][0]==r){var g=o[s-1][1],w=o[s][1],x=this.diff_commonOverlap_(g,w),S=this.diff_commonOverlap_(w,g);x>=S?(x>=g.length/2||x>=w.length/2)&&(o.splice(s,0,new t.Diff(i,w.substring(0,x))),o[s-1][1]=g.substring(0,g.length-x),o[s+1][1]=w.substring(x),s++):(S>=g.length/2||S>=w.length/2)&&(o.splice(s,0,new t.Diff(i,g.substring(0,S))),o[s-1][0]=r,o[s-1][1]=w.substring(0,w.length-S),o[s+1][0]=n,o[s+1][1]=g.substring(S),s++),s++}s++}},t.prototype.diff_cleanupSemanticLossless=function(o){function l(S,T){if(!S||!T)return 6;var v=S.charAt(S.length-1),b=T.charAt(0),y=v.match(t.nonAlphaNumericRegex_),m=b.match(t.nonAlphaNumericRegex_),E=y&&v.match(t.whitespaceRegex_),M=m&&b.match(t.whitespaceRegex_),C=E&&v.match(t.linebreakRegex_),k=M&&b.match(t.linebreakRegex_),O=C&&S.match(t.blanklineEndRegex_),R=k&&T.match(t.blanklineStartRegex_);return O||R?5:C||k?4:y&&!E&&M?3:E||M?2:y||m?1:0}for(var d=1;d<o.length-1;){if(o[d-1][0]==i&&o[d+1][0]==i){var a=o[d-1][1],c=o[d][1],s=o[d+1][1],u=this.diff_commonSuffix(a,c);if(u){var f=c.substring(c.length-u);a=a.substring(0,a.length-u),c=f+c.substring(0,c.length-u),s=f+s}for(var h=a,p=c,g=s,w=l(a,c)+l(c,s);c.charAt(0)===s.charAt(0);){a+=c.charAt(0),c=c.substring(1)+s.charAt(0),s=s.substring(1);var x=l(a,c)+l(c,s);x>=w&&(w=x,h=a,p=c,g=s)}o[d-1][1]!=h&&(h?o[d-1][1]=h:(o.splice(d-1,1),d--),o[d][1]=p,g?o[d+1][1]=g:(o.splice(d+1,1),d--))}d++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(o){for(var l=!1,d=[],a=0,c=null,s=0,u=!1,f=!1,h=!1,p=!1;s<o.length;)o[s][0]==i?(o[s][1].length<this.Diff_EditCost&&(h||p)?(d[a++]=s,u=h,f=p,c=o[s][1]):(a=0,c=null),h=p=!1):(o[s][0]==n?p=!0:h=!0,c&&(u&&f&&h&&p||c.length<this.Diff_EditCost/2&&u+f+h+p==3)&&(o.splice(d[a-1],0,new t.Diff(n,c)),o[d[a-1]+1][0]=r,a--,c=null,u&&f?(h=p=!0,a=0):(a--,s=a>0?d[a-1]:-1,h=p=!1),l=!0)),s++;l&&this.diff_cleanupMerge(o)},t.prototype.diff_cleanupMerge=function(o){o.push(new t.Diff(i,""));for(var l=0,d=0,a=0,c="",s="",u;l<o.length;)switch(o[l][0]){case r:a++,s+=o[l][1],l++;break;case n:d++,c+=o[l][1],l++;break;case i:d+a>1?(d!==0&&a!==0&&(u=this.diff_commonPrefix(s,c),u!==0&&(l-d-a>0&&o[l-d-a-1][0]==i?o[l-d-a-1][1]+=s.substring(0,u):(o.splice(0,0,new t.Diff(i,s.substring(0,u))),l++),s=s.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(s,c),u!==0&&(o[l][1]=s.substring(s.length-u)+o[l][1],s=s.substring(0,s.length-u),c=c.substring(0,c.length-u))),l-=d+a,o.splice(l,d+a),c.length&&(o.splice(l,0,new t.Diff(n,c)),l++),s.length&&(o.splice(l,0,new t.Diff(r,s)),l++),l++):l!==0&&o[l-1][0]==i?(o[l-1][1]+=o[l][1],o.splice(l,1)):l++,a=0,d=0,c="",s="";break}o[o.length-1][1]===""&&o.pop();var f=!1;for(l=1;l<o.length-1;)o[l-1][0]==i&&o[l+1][0]==i&&(o[l][1].substring(o[l][1].length-o[l-1][1].length)==o[l-1][1]?(o[l][1]=o[l-1][1]+o[l][1].substring(0,o[l][1].length-o[l-1][1].length),o[l+1][1]=o[l-1][1]+o[l+1][1],o.splice(l-1,1),f=!0):o[l][1].substring(0,o[l+1][1].length)==o[l+1][1]&&(o[l-1][1]+=o[l+1][1],o[l][1]=o[l][1].substring(o[l+1][1].length)+o[l+1][1],o.splice(l+1,1),f=!0)),l++;f&&this.diff_cleanupMerge(o)},t.prototype.diff_xIndex=function(o,l){var d=0,a=0,c=0,s=0,u;for(u=0;u<o.length&&(o[u][0]!==r&&(d+=o[u][1].length),o[u][0]!==n&&(a+=o[u][1].length),!(d>l));u++)c=d,s=a;return o.length!=u&&o[u][0]===n?s:s+(l-c)},t.prototype.diff_prettyHtml=function(o){for(var l=[],d=/&/g,a=/</g,c=/>/g,s=/\n/g,u=0;u<o.length;u++){var f=o[u][0],h=o[u][1],p=h.replace(d,"&amp;").replace(a,"&lt;").replace(c,"&gt;").replace(s,"&para;<br>");switch(f){case r:l[u]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:l[u]='<del style="background:#ffe6e6;">'+p+"</del>";break;case i:l[u]="<span>"+p+"</span>";break}}return l.join("")},t.prototype.diff_text1=function(o){for(var l=[],d=0;d<o.length;d++)o[d][0]!==r&&(l[d]=o[d][1]);return l.join("")},t.prototype.diff_text2=function(o){for(var l=[],d=0;d<o.length;d++)o[d][0]!==n&&(l[d]=o[d][1]);return l.join("")},t.prototype.diff_levenshtein=function(o){for(var l=0,d=0,a=0,c=0;c<o.length;c++){var s=o[c][0],u=o[c][1];switch(s){case r:d+=u.length;break;case n:a+=u.length;break;case i:l+=Math.max(d,a),d=0,a=0;break}}return l+=Math.max(d,a),l},t.prototype.diff_toDelta=function(o){for(var l=[],d=0;d<o.length;d++)switch(o[d][0]){case r:l[d]="+"+encodeURI(o[d][1]);break;case n:l[d]="-"+o[d][1].length;break;case i:l[d]="="+o[d][1].length;break}return l.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(o,l){for(var d=[],a=0,c=0,s=l.split(/\t/g),u=0;u<s.length;u++){var f=s[u].substring(1);switch(s[u].charAt(0)){case"+":try{d[a++]=new t.Diff(r,decodeURI(f))}catch{throw new Error("Illegal escape in diff_fromDelta: "+f)}break;case"-":case"=":var h=parseInt(f,10);if(isNaN(h)||h<0)throw new Error("Invalid number in diff_fromDelta: "+f);var p=o.substring(c,c+=h);s[u].charAt(0)=="="?d[a++]=new t.Diff(i,p):d[a++]=new t.Diff(n,p);break;default:if(s[u])throw new Error("Invalid diff operation in diff_fromDelta: "+s[u])}}if(c!=o.length)throw new Error("Delta length ("+c+") does not equal source text length ("+o.length+").");return d},t.prototype.match_main=function(o,l,d){if(o==null||l==null||d==null)throw new Error("Null input. (match_main)");return d=Math.max(0,Math.min(d,o.length)),o==l?0:o.length?o.substring(d,d+l.length)==l?d:this.match_bitap_(o,l,d):-1},t.prototype.match_bitap_=function(o,l,d){if(l.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(l),c=this;function s(M,C){var k=M/l.length,O=Math.abs(d-C);return c.Match_Distance?k+O/c.Match_Distance:O?1:k}var u=this.Match_Threshold,f=o.indexOf(l,d);f!=-1&&(u=Math.min(s(0,f),u),f=o.lastIndexOf(l,d+l.length),f!=-1&&(u=Math.min(s(0,f),u)));var h=1<<l.length-1;f=-1;for(var p,g,w=l.length+o.length,x,S=0;S<l.length;S++){for(p=0,g=w;p<g;)s(S,d+g)<=u?p=g:w=g,g=Math.floor((w-p)/2+p);w=g;var T=Math.max(1,d-g+1),v=Math.min(d+g,o.length)+l.length,b=Array(v+2);b[v+1]=(1<<S)-1;for(var y=v;y>=T;y--){var m=a[o.charAt(y-1)];if(S===0?b[y]=(b[y+1]<<1|1)&m:b[y]=(b[y+1]<<1|1)&m|((x[y+1]|x[y])<<1|1)|x[y+1],b[y]&h){var E=s(S,y-1);if(E<=u)if(u=E,f=y-1,f>d)T=Math.max(1,2*d-f);else break}}if(s(S+1,d)>u)break;x=b}return f},t.prototype.match_alphabet_=function(o){for(var l={},d=0;d<o.length;d++)l[o.charAt(d)]=0;for(var d=0;d<o.length;d++)l[o.charAt(d)]|=1<<o.length-d-1;return l},t.prototype.patch_addContext_=function(o,l){if(l.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var d=l.substring(o.start2,o.start2+o.length1),a=0;l.indexOf(d)!=l.lastIndexOf(d)&&d.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,d=l.substring(o.start2-a,o.start2+o.length1+a);a+=this.Patch_Margin;var c=l.substring(o.start2-a,o.start2);c&&o.diffs.unshift(new t.Diff(i,c));var s=l.substring(o.start2+o.length1,o.start2+o.length1+a);s&&o.diffs.push(new t.Diff(i,s)),o.start1-=c.length,o.start2-=c.length,o.length1+=c.length+s.length,o.length2+=c.length+s.length}},t.prototype.patch_make=function(o,l,d){var a,c;if(typeof o=="string"&&typeof l=="string"&&typeof d>"u")a=o,c=this.diff_main(a,l,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(o&&typeof o=="object"&&typeof l>"u"&&typeof d>"u")c=o,a=this.diff_text1(c);else if(typeof o=="string"&&l&&typeof l=="object"&&typeof d>"u")a=o,c=l;else if(typeof o=="string"&&typeof l=="string"&&d&&typeof d=="object")a=o,c=d;else throw new Error("Unknown call format to patch_make.");if(c.length===0)return[];for(var s=[],u=new t.patch_obj,f=0,h=0,p=0,g=a,w=a,x=0;x<c.length;x++){var S=c[x][0],T=c[x][1];switch(!f&&S!==i&&(u.start1=h,u.start2=p),S){case r:u.diffs[f++]=c[x],u.length2+=T.length,w=w.substring(0,p)+T+w.substring(p);break;case n:u.length1+=T.length,u.diffs[f++]=c[x],w=w.substring(0,p)+w.substring(p+T.length);break;case i:T.length<=2*this.Patch_Margin&&f&&c.length!=x+1?(u.diffs[f++]=c[x],u.length1+=T.length,u.length2+=T.length):T.length>=2*this.Patch_Margin&&f&&(this.patch_addContext_(u,g),s.push(u),u=new t.patch_obj,f=0,g=w,h=p);break}S!==r&&(h+=T.length),S!==n&&(p+=T.length)}return f&&(this.patch_addContext_(u,g),s.push(u)),s},t.prototype.patch_deepCopy=function(o){for(var l=[],d=0;d<o.length;d++){var a=o[d],c=new t.patch_obj;c.diffs=[];for(var s=0;s<a.diffs.length;s++)c.diffs[s]=new t.Diff(a.diffs[s][0],a.diffs[s][1]);c.start1=a.start1,c.start2=a.start2,c.length1=a.length1,c.length2=a.length2,l[d]=c}return l},t.prototype.patch_apply=function(o,l){if(o.length==0)return[l,[]];o=this.patch_deepCopy(o);var d=this.patch_addPadding(o);l=d+l+d,this.patch_splitMax(o);for(var a=0,c=[],s=0;s<o.length;s++){var u=o[s].start2+a,f=this.diff_text1(o[s].diffs),h,p=-1;if(f.length>this.Match_MaxBits?(h=this.match_main(l,f.substring(0,this.Match_MaxBits),u),h!=-1&&(p=this.match_main(l,f.substring(f.length-this.Match_MaxBits),u+f.length-this.Match_MaxBits),(p==-1||h>=p)&&(h=-1))):h=this.match_main(l,f,u),h==-1)c[s]=!1,a-=o[s].length2-o[s].length1;else{c[s]=!0,a=h-u;var g;if(p==-1?g=l.substring(h,h+f.length):g=l.substring(h,p+this.Match_MaxBits),f==g)l=l.substring(0,h)+this.diff_text2(o[s].diffs)+l.substring(h+f.length);else{var w=this.diff_main(f,g,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(w)/f.length>this.Patch_DeleteThreshold)c[s]=!1;else{this.diff_cleanupSemanticLossless(w);for(var x=0,S,T=0;T<o[s].diffs.length;T++){var v=o[s].diffs[T];v[0]!==i&&(S=this.diff_xIndex(w,x)),v[0]===r?l=l.substring(0,h+S)+v[1]+l.substring(h+S):v[0]===n&&(l=l.substring(0,h+S)+l.substring(h+this.diff_xIndex(w,x+v[1].length))),v[0]!==n&&(x+=v[1].length)}}}}}return l=l.substring(d.length,l.length-d.length),[l,c]},t.prototype.patch_addPadding=function(o){for(var l=this.Patch_Margin,d="",a=1;a<=l;a++)d+=String.fromCharCode(a);for(var a=0;a<o.length;a++)o[a].start1+=l,o[a].start2+=l;var c=o[0],s=c.diffs;if(s.length==0||s[0][0]!=i)s.unshift(new t.Diff(i,d)),c.start1-=l,c.start2-=l,c.length1+=l,c.length2+=l;else if(l>s[0][1].length){var u=l-s[0][1].length;s[0][1]=d.substring(s[0][1].length)+s[0][1],c.start1-=u,c.start2-=u,c.length1+=u,c.length2+=u}if(c=o[o.length-1],s=c.diffs,s.length==0||s[s.length-1][0]!=i)s.push(new t.Diff(i,d)),c.length1+=l,c.length2+=l;else if(l>s[s.length-1][1].length){var u=l-s[s.length-1][1].length;s[s.length-1][1]+=d.substring(0,u),c.length1+=u,c.length2+=u}return d},t.prototype.patch_splitMax=function(o){for(var l=this.Match_MaxBits,d=0;d<o.length;d++)if(!(o[d].length1<=l)){var a=o[d];o.splice(d--,1);for(var c=a.start1,s=a.start2,u="";a.diffs.length!==0;){var f=new t.patch_obj,h=!0;for(f.start1=c-u.length,f.start2=s-u.length,u!==""&&(f.length1=f.length2=u.length,f.diffs.push(new t.Diff(i,u)));a.diffs.length!==0&&f.length1<l-this.Patch_Margin;){var p=a.diffs[0][0],g=a.diffs[0][1];p===r?(f.length2+=g.length,s+=g.length,f.diffs.push(a.diffs.shift()),h=!1):p===n&&f.diffs.length==1&&f.diffs[0][0]==i&&g.length>2*l?(f.length1+=g.length,c+=g.length,h=!1,f.diffs.push(new t.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,l-f.length1-this.Patch_Margin),f.length1+=g.length,c+=g.length,p===i?(f.length2+=g.length,s+=g.length):h=!1,f.diffs.push(new t.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}u=this.diff_text2(f.diffs),u=u.substring(u.length-this.Patch_Margin);var w=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);w!==""&&(f.length1+=w.length,f.length2+=w.length,f.diffs.length!==0&&f.diffs[f.diffs.length-1][0]===i?f.diffs[f.diffs.length-1][1]+=w:f.diffs.push(new t.Diff(i,w))),h||o.splice(++d,0,f)}}},t.prototype.patch_toText=function(o){for(var l=[],d=0;d<o.length;d++)l[d]=o[d];return l.join("")},t.prototype.patch_fromText=function(o){var l=[];if(!o)return l;for(var d=o.split(`
`),a=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<d.length;){var s=d[a].match(c);if(!s)throw new Error("Invalid patch string: "+d[a]);var u=new t.patch_obj;for(l.push(u),u.start1=parseInt(s[1],10),s[2]===""?(u.start1--,u.length1=1):s[2]=="0"?u.length1=0:(u.start1--,u.length1=parseInt(s[2],10)),u.start2=parseInt(s[3],10),s[4]===""?(u.start2--,u.length2=1):s[4]=="0"?u.length2=0:(u.start2--,u.length2=parseInt(s[4],10)),a++;a<d.length;){var f=d[a].charAt(0);try{var h=decodeURI(d[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(f=="-")u.diffs.push(new t.Diff(n,h));else if(f=="+")u.diffs.push(new t.Diff(r,h));else if(f==" ")u.diffs.push(new t.Diff(i,h));else{if(f=="@")break;if(f!=="")throw new Error('Invalid patch mode "'+f+'" in: '+h)}a++}}return l},t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},t.patch_obj.prototype.toString=function(){var o,l;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?l=this.start2+",0":this.length2==1?l=this.start2+1:l=this.start2+1+","+this.length2;for(var d=["@@ -"+o+" +"+l+` @@
`],a,c=0;c<this.diffs.length;c++){switch(this.diffs[c][0]){case r:a="+";break;case n:a="-";break;case i:a=" ";break}d[c+1]=a+encodeURI(this.diffs[c][1])+`
`}return d.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=i})(GE);var lO=GE.exports,uO=Be&&Be.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(tb,"__esModule",{value:!0});var Mt=eb,G1=N,cO=Bp,dO=lO,fO=function(e){uO(t,e);function t(n){var r=e.call(this,n)||this;return r.state={value:r.props.value},r.onChange=r.onChange.bind(r),r.diff=r.diff.bind(r),r}return t.prototype.componentDidUpdate=function(){var n=this.props.value;n!==this.state.value&&this.setState({value:n})},t.prototype.onChange=function(n){this.setState({value:n}),this.props.onChange&&this.props.onChange(n)},t.prototype.diff=function(){var n=new dO,r=this.state.value[0],i=this.state.value[1];if(r.length===0&&i.length===0)return[];var o=n.diff_main(r,i);n.diff_cleanupSemantic(o);var l=this.generateDiffedLines(o),d=this.setCodeMarkers(l);return d},t.prototype.generateDiffedLines=function(n){var r={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},i={left:[],right:[]},o={left:1,right:1};return n.forEach(function(l){var d=l[0],a=l[1],c=a.split(`
`).length-1;if(a.length!==0){var s=a[0],u=a[a.length-1],f=0;switch(d){case r.DIFF_EQUAL:o.left+=c,o.right+=c;break;case r.DIFF_DELETE:s===`
`&&(o.left++,c--),f=c,f===0&&i.right.push({startLine:o.right,endLine:o.right}),u===`
`&&(f-=1),i.left.push({startLine:o.left,endLine:o.left+f}),o.left+=c;break;case r.DIFF_INSERT:s===`
`&&(o.right++,c--),f=c,f===0&&i.left.push({startLine:o.left,endLine:o.left}),u===`
`&&(f-=1),i.right.push({startLine:o.right,endLine:o.right+f}),o.right+=c;break;default:throw new Error("Diff type was not defined.")}}}),i},t.prototype.setCodeMarkers=function(n){n===void 0&&(n={left:[],right:[]});for(var r=[],i={left:[],right:[]},o=0;o<n.left.length;o++){var l={startRow:n.left[o].startLine-1,endRow:n.left[o].endLine,type:"text",className:"codeMarker"};i.left.push(l)}for(var o=0;o<n.right.length;o++){var l={startRow:n.right[o].startLine-1,endRow:n.right[o].endLine,type:"text",className:"codeMarker"};i.right.push(l)}return r[0]=i.left,r[1]=i.right,r},t.prototype.render=function(){var n=this.diff();return G1.createElement(cO.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:n})},t.propTypes={cursorStart:Mt.number,editorProps:Mt.object,enableBasicAutocompletion:Mt.bool,enableLiveAutocompletion:Mt.bool,focus:Mt.bool,fontSize:Mt.number,height:Mt.string,highlightActiveLine:Mt.bool,maxLines:Mt.number,minLines:Mt.number,mode:Mt.string,name:Mt.string,className:Mt.string,onLoad:Mt.func,onPaste:Mt.func,onScroll:Mt.func,onChange:Mt.func,orientation:Mt.string,readOnly:Mt.bool,scrollMargin:Mt.array,setOptions:Mt.object,showGutter:Mt.bool,showPrintMargin:Mt.bool,splits:Mt.number,style:Mt.object,tabSize:Mt.number,theme:Mt.string,value:Mt.array,width:Mt.string,wrapEnabled:Mt.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(G1.Component);tb.default=fO;Object.defineProperty(nu,"__esModule",{value:!0});nu.diff=nu.split=void 0;var hO=J0,pO=tb;nu.diff=pO.default;var gO=Bp;nu.split=gO.default;var KE=nu.default=hO.default,mO={exports:{}};(function(e,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,i){var o=n("../lib/oop"),l=n("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};o.inherits(d,l),r.JsonHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,l=function(){};(function(){this.checkOutdent=function(d,a){return/^\s+$/.test(d)?/^\s*\}/.test(a):!1},this.autoOutdent=function(d,a){var c=d.getLine(a),s=c.match(/^(\s*\})/);if(!s)return 0;var u=s[1].length,f=d.findMatchingBracket({row:a,column:u});if(!f||f.row==a)return 0;var h=this.$getIndent(d.getLine(f.row));d.replace(new o(a,0,a,u-1),h)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(l.prototype),r.MatchingBraceOutdent=l}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,i){var o=n("../../lib/oop"),l=n("../../range").Range,d=n("./fold_mode").FoldMode,a=r.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end)))};o.inherits(a,d),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,s,u){var f=c.getLine(u);if(this.singleLineBlockCommentRe.test(f)&&!this.startRegionRe.test(f)&&!this.tripleStarBlockCommentRe.test(f))return"";var h=this._getFoldWidgetBase(c,s,u);return!h&&this.startRegionRe.test(f)?"start":h},this.getFoldWidgetRange=function(c,s,u,f){var h=c.getLine(u);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(c,h,u);var w=h.match(this.foldingStartMarker);if(w){var p=w.index;if(w[1])return this.openingBracketBlock(c,w[1],u,p);var g=c.getCommentFoldRange(u,p+w[0].length,1);return g&&!g.isMultiLine()&&(f?g=this.getSectionRange(c,u):s!="all"&&(g=null)),g}if(s!=="markbegin"){var w=h.match(this.foldingStopMarker);if(w){var p=w.index+w[0].length;return w[1]?this.closingBracketBlock(c,w[1],u,p):c.getCommentFoldRange(u,p,-1)}}},this.getSectionRange=function(c,s){var u=c.getLine(s),f=u.search(/\S/),h=s,p=u.length;s=s+1;for(var g=s,w=c.getLength();++s<w;){u=c.getLine(s);var x=u.search(/\S/);if(x!==-1){if(f>x)break;var S=this.getFoldWidgetRange(c,"all",s);if(S){if(S.start.row<=h)break;if(S.isMultiLine())s=S.end.row;else if(f==x)break}g=s}}return new l(h,p,g,c.getLine(g).length)},this.getCommentRegionBlock=function(c,s,u){for(var f=s.search(/\s*$/),h=c.getLength(),p=u,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,w=1;++u<h;){s=c.getLine(u);var x=g.exec(s);if(x&&(x[1]?w--:w++,!w))break}var S=u;if(S>p)return new l(p,f,S,s.length)}}.call(a.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(n,r,i){var o=n("../lib/oop"),l=n("./text").Mode,d=n("./json_highlight_rules").JsonHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,c=n("./folding/cstyle").FoldMode,s=n("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=d,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new c};o.inherits(u,l),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,h,p){var g=this.$getIndent(h);if(f=="start"){var w=h.match(/^.*[\{\(\[]\s*$/);w&&(g+=p)}return g},this.checkOutdent=function(f,h,p){return this.$outdent.checkOutdent(h,p)},this.autoOutdent=function(f,h,p){this.$outdent.autoOutdent(h,p)},this.createWorker=function(f){var h=new s(["ace"],"ace/mode/json_worker","JsonWorker");return h.attachToDocument(f.getDocument()),h.on("annotate",function(p){f.setAnnotations(p.data)}),h.on("terminate",function(){f.clearAnnotations()}),h},this.$id="ace/mode/json"}.call(u.prototype),r.Mode=u}),function(){ace.require(["ace/mode/json"],function(n){e&&(e.exports=n)})}()})(mO);var vO={exports:{}};(function(e,t){ace.define("ace/theme/github_dark.css",["require","exports","module"],function(n,r,i){i.exports=`.ace-github-dark .ace_gutter {
background: #24292e;
color: #7388b5
}
.ace-github-dark .ace_print-margin {
width: 1px;
background: #00204b
}
.ace-github-dark {
background-color: #24292e;
color: #FFFFFF
}
.ace-github-dark .ace_constant.ace_other,
.ace-github-dark .ace_cursor {
color: #FFFFFF
}
.ace-github-dark .ace_marker-layer .ace_selection {
background: #003F8E
}
.ace-github-dark.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px #24292e;
}
.ace-github-dark .ace_marker-layer .ace_step {
background: rgb(127, 111, 19)
}
.ace-github-dark .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid #404F7D
}
.ace-github-dark .ace_marker-layer .ace_active-line {
background: #00346E
}
.ace-github-dark .ace_gutter-active-line {
background-color: #24292e
}
.ace-github-dark .ace_marker-layer .ace_selected-word {
border: 1px solid #003F8E
}
.ace-github-dark .ace_invisible {
color: #404F7D
}
.ace-github-dark .ace_keyword,
.ace-github-dark .ace_meta,
.ace-github-dark .ace_storage,
.ace-github-dark .ace_storage.ace_type,
.ace-github-dark .ace_support.ace_type {
color: #ff7b72
}
.ace-github-dark .ace_keyword.ace_operator {
color: #79c0ff
}
.ace-github-dark .ace_constant.ace_character,
.ace-github-dark .ace_constant.ace_language,
.ace-github-dark .ace_constant.ace_numeric,
.ace-github-dark .ace_keyword.ace_other.ace_unit,
.ace-github-dark .ace_support.ace_constant,
.ace-github-dark .ace_variable.ace_parameter {
color: #FFC58F
}
.ace-github-dark .ace_invalid {
color: #FFFFFF;
background-color: #F99DA5
}
.ace-github-dark .ace_invalid.ace_deprecated {
color: #FFFFFF;
background-color: #ff7b72
}
.ace-github-dark .ace_fold {
background-color: #BBDAFF;
border-color: #FFFFFF
}
.ace-github-dark .ace_entity.ace_name.ace_function,
.ace-github-dark .ace_support.ace_function,
.ace-github-dark .ace_variable {
color: #BBDAFF
}
.ace-github-dark .ace_support.ace_class,
.ace-github-dark .ace_support.ace_type {
color: #FFEEAD
}
.ace-github-dark .ace_heading,
.ace-github-dark .ace_markup.ace_heading,
.ace-github-dark .ace_string {
color: #9fcef6
}
.ace-github-dark .ace_entity.ace_name.ace_tag,
.ace-github-dark .ace_entity.ace_other.ace_attribute-name,
.ace-github-dark .ace_meta.ace_tag,
.ace-github-dark .ace_string.ace_regexp,
.ace-github-dark .ace_variable {
color: #FF9DA4
}
.ace-github-dark .ace_comment {
color: #7285B7
}
.ace-github-dark .ace_indent-guide {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y
}
.ace-github-dark .ace_indent-guide-active {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
}
.ace-github-dark .ace_constant.ace_buildin {
color: #0086B3;
}
.ace-github-dark .ace_variable.ace_language {
color: #ffffff;
}
`}),ace.define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark.css","ace/lib/dom"],function(n,r,i){r.isDark=!0,r.cssClass="ace-github-dark",r.cssText=n("./github_dark.css");var o=n("../lib/dom");o.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github_dark"],function(n){e&&(e.exports=n)})}()})(vO);var yO={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(n,r,i){var o=n("./lib/dom"),l=n("./lib/oop"),d=n("./lib/event_emitter").EventEmitter,a=n("./lib/lang"),c=n("./range").Range,s=n("./range_list").RangeList,u=n("./keyboard/hash_handler").HashHandler,f=n("./tokenizer").Tokenizer,h=n("./clipboard"),p={CURRENT_WORD:function(b){return b.session.getTextRange(b.session.getWordRange())},SELECTION:function(b,y,m){var E=b.session.getTextRange();return m?E.replace(/\n\r?([ \t]*\S)/g,`
`+m+"$1"):E},CURRENT_LINE:function(b){return b.session.getLine(b.getCursorPosition().row)},PREV_LINE:function(b){return b.session.getLine(b.getCursorPosition().row-1)},LINE_INDEX:function(b){return b.getCursorPosition().row},LINE_NUMBER:function(b){return b.getCursorPosition().row+1},SOFT_TABS:function(b){return b.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(b){return b.session.getTabSize()},CLIPBOARD:function(b){return h.getText&&h.getText()},FILENAME:function(b){return/[^/\\]*$/.exec(this.FILEPATH(b))[0]},FILENAME_BASE:function(b){return/[^/\\]*$/.exec(this.FILEPATH(b))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(b){return this.FILEPATH(b).replace(/[^/\\]*$/,"")},FILEPATH:function(b){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(b){var y=b.session.$mode||{};return y.blockComment&&y.blockComment.start||""},BLOCK_COMMENT_END:function(b){var y=b.session.$mode||{};return y.blockComment&&y.blockComment.end||""},LINE_COMMENT:function(b){var y=b.session.$mode||{};return y.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;function g(b){var y=new Date().toLocaleString("en-us",b);return y.length==1?"0"+y:y}var w=function(){this.snippetMap={},this.snippetNameMap={}};(function(){l.implement(this,d),this.getTokenizer=function(){return w.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function y(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function m(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var E={regex:"/("+m("/")+"+)/",onMatch:function(M,C,k){var O=k[0];return O.fmtString=!0,O.guard=M.slice(1,-1),O.flag="",""},next:"formatString"};return w.$tokenizer=new f({start:[{regex:/\\./,onMatch:function(M,C,k){var O=M[1];return(O=="}"&&k.length||"`$\\".indexOf(O)!=-1)&&(M=O),[M]}},{regex:/}/,onMatch:function(M,C,k){return[k.length?k.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:y},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,C,k){var O=y(M.substr(1));return k.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+m("\\|")+"*\\|",onMatch:function(M,C,k){var O=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(R){return R.length==2?R[1]:"\0"}).split("\0").map(function(R){return{value:R}});return k[0].choices=O,[O[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,C,k){return k.length&&k[0].expectElse?(k[0].expectElse=!1,k[0].ifEnd={elseEnd:k[0]},[k[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,C,k){var O=M[1];return O=="}"&&k.length||"`$\\".indexOf(O)!=-1?M=O:O=="n"?M=`
`:O=="t"?M=" ":"ulULE".indexOf(O)!=-1&&(M={changeCase:O,local:O>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,C,k){var O=k.shift();return O&&(O.flag=M.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,C,k){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,C,k){var O={text:M.slice(2)};return k.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,C,k){var O=k.shift();return this.next=O&&O.tabstopId?"start":"",[O||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,C,k){var O=k[0];return O.formatFunction=M.slice(2,-1),[k.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(M,C,k){M[1]=="+"&&(k[0].ifEnd=k[0]),M[1]=="?"&&(k[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},this.tokenizeTmSnippet=function(y,m){return this.getTokenizer().getLineTokens(y,m).tokens.map(function(E){return E.value||E})},this.getVariableValue=function(y,m,E){if(/^\d+$/.test(m))return(this.variables.__||{})[m]||"";if(/^[A-Z]\d+$/.test(m))return(this.variables[m[0]+"__"]||{})[m.substr(1)]||"";if(m=m.replace(/^TM_/,""),!this.variables.hasOwnProperty(m))return"";var M=this.variables[m];return typeof M=="function"&&(M=this.variables[m](y,m,E)),M??""},this.variables=p,this.tmStrFormat=function(y,m,E){if(!m.fmt)return y;var M=m.flag||"",C=m.guard;C=new RegExp(C,M.replace(/[^gim]/g,""));var k=typeof m.fmt=="string"?this.tokenizeTmSnippet(m.fmt,"formatString"):m.fmt,O=this,R=y.replace(C,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var I=O.resolveVariables(k,E),P="E",z=0;z<I.length;z++){var B=I[z];if(typeof B=="object")if(I[z]="",B.changeCase&&B.local){var V=I[z+1];V&&typeof V=="string"&&(B.changeCase=="u"?I[z]=V[0].toUpperCase():I[z]=V[0].toLowerCase(),I[z+1]=V.substr(1))}else B.changeCase&&(P=B.changeCase);else P=="U"?I[z]=B.toUpperCase():P=="L"&&(I[z]=B.toLowerCase())}return O.variables.__=A,I.join("")});return R},this.tmFormatFunction=function(y,m,E){return m.formatFunction=="upcase"?y.toUpperCase():m.formatFunction=="downcase"?y.toLowerCase():y},this.resolveVariables=function(y,m){for(var E=[],M="",C=!0,k=0;k<y.length;k++){var O=y[k];if(typeof O=="string"){E.push(O),O==`
`?(C=!0,M=""):C&&(M=/^\t*/.exec(O)[0],C=/\S/.test(O));continue}if(O){if(C=!1,O.fmtString){var R=y.indexOf(O,k+1);R==-1&&(R=y.length),O.fmt=y.slice(k+1,R),k=R}if(O.text){var A=this.getVariableValue(m,O.text,M)+"";O.fmtString&&(A=this.tmStrFormat(A,O,m)),O.formatFunction&&(A=this.tmFormatFunction(A,O,m)),A&&!O.ifEnd?(E.push(A),I(O)):!A&&O.ifEnd&&I(O.ifEnd)}else O.elseEnd?I(O.elseEnd):(O.tabstopId!=null||O.changeCase!=null)&&E.push(O)}}function I(P){var z=y.indexOf(P,k+1);z!=-1&&(k=z)}return E};var b=function(y,m,E){E===void 0&&(E={});var M=y.getCursorPosition(),C=y.session.getLine(M.row),k=y.session.getTabString(),O=C.match(/^\s*/)[0];M.column<O.length&&(O=O.slice(0,M.column)),m=m.replace(/\r/g,"");var R=this.tokenizeTmSnippet(m);R=this.resolveVariables(R,y),R=R.map(function(ie){return ie==`
`&&!E.excludeExtraIndent?ie+O:typeof ie=="string"?ie.replace(/\t/g,k):ie});var A=[];R.forEach(function(ie,ce){if(typeof ie=="object"){var he=ie.tabstopId,ve=A[he];if(ve||(ve=A[he]=[],ve.index=he,ve.value="",ve.parents={}),ve.indexOf(ie)===-1){ie.choices&&!ve.choices&&(ve.choices=ie.choices),ve.push(ie);var Ce=R.indexOf(ie,ce+1);if(Ce!==-1){var _e=R.slice(ce+1,Ce),Re=_e.some(function(ot){return typeof ot=="object"});Re&&!ve.value?ve.value=_e:_e.length&&(!ve.value||typeof ve.value!="string")&&(ve.value=_e.join(""))}}}}),A.forEach(function(ie){ie.length=0});var I={};function P(ie){for(var ce=[],he=0;he<ie.length;he++){var ve=ie[he];if(typeof ve=="object"){if(I[ve.tabstopId])continue;var Ce=ie.lastIndexOf(ve,he-1);ve=ce[Ce]||{tabstopId:ve.tabstopId}}ce[he]=ve}return ce}for(var z=0;z<R.length;z++){var B=R[z];if(typeof B=="object"){var V=B.tabstopId,K=A[V],q=R.indexOf(B,z+1);if(I[V]){I[V]===B&&(delete I[V],Object.keys(I).forEach(function(ie){K.parents[ie]=!0}));continue}I[V]=B;var re=K.value;typeof re!="string"?re=P(re):B.fmt&&(re=this.tmStrFormat(re,B,y)),R.splice.apply(R,[z+1,Math.max(0,q-z)].concat(re,B)),K.indexOf(B)===-1&&K.push(B)}}var Y=0,Z=0,te="";return R.forEach(function(ie){if(typeof ie=="string"){var ce=ie.split(`
`);ce.length>1?(Z=ce[ce.length-1].length,Y+=ce.length-1):Z+=ie.length,te+=ie}else ie&&(ie.start?ie.end={row:Y,column:Z}:ie.start={row:Y,column:Z})}),{text:te,tabstops:A,tokens:R}};this.getDisplayTextForSnippet=function(y,m){var E=b.call(this,y,m);return E.text},this.insertSnippetForSelection=function(y,m,E){E===void 0&&(E={});var M=b.call(this,y,m,E),C=y.getSelectionRange();E.range&&E.range.compareRange(C)===0&&(C=E.range);var k=y.session.replace(C,M.text),O=new x(y),R=y.inVirtualSelectionMode&&y.selection.index;O.addTabstops(M.tabstops,C.start,k,R)},this.insertSnippet=function(y,m,E){E===void 0&&(E={});var M=this;if(E.range&&!(E.range instanceof c)&&(E.range=c.fromPoints(E.range.start,E.range.end)),y.inVirtualSelectionMode)return M.insertSnippetForSelection(y,m,E);y.forEachSelection(function(){M.insertSnippetForSelection(y,m,E)},null,{keepOrder:!0}),y.tabstopManager&&y.tabstopManager.tabNext()},this.$getScope=function(y){var m=y.session.$mode.$id||"";if(m=m.split("/").pop(),m==="html"||m==="php"){m==="php"&&!y.session.$mode.inlinePhp&&(m="html");var E=y.getCursorPosition(),M=y.session.getState(E.row);typeof M=="object"&&(M=M[0]),M.substring&&(M.substring(0,3)=="js-"?m="javascript":M.substring(0,4)=="css-"?m="css":M.substring(0,4)=="php-"&&(m="php"))}return m},this.getActiveScopes=function(y){var m=this.$getScope(y),E=[m],M=this.snippetMap;return M[m]&&M[m].includeScopes&&E.push.apply(E,M[m].includeScopes),E.push("_"),E},this.expandWithTab=function(y,m){var E=this,M=y.forEachSelection(function(){return E.expandSnippetForSelection(y,m)},null,{keepOrder:!0});return M&&y.tabstopManager&&y.tabstopManager.tabNext(),M},this.expandSnippetForSelection=function(y,m){var E=y.getCursorPosition(),M=y.session.getLine(E.row),C=M.substring(0,E.column),k=M.substr(E.column),O=this.snippetMap,R;return this.getActiveScopes(y).some(function(A){var I=O[A];return I&&(R=this.findMatchingSnippet(I,C,k)),!!R},this),R?(m&&m.dryRun||(y.session.doc.removeInLine(E.row,E.column-R.replaceBefore.length,E.column+R.replaceAfter.length),this.variables.M__=R.matchBefore,this.variables.T__=R.matchAfter,this.insertSnippetForSelection(y,R.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(y,m,E){for(var M=y.length;M--;){var C=y[M];if(!(C.startRe&&!C.startRe.test(m))&&!(C.endRe&&!C.endRe.test(E))&&!(!C.startRe&&!C.endRe))return C.matchBefore=C.startRe?C.startRe.exec(m):[""],C.matchAfter=C.endRe?C.endRe.exec(E):[""],C.replaceBefore=C.triggerRe?C.triggerRe.exec(m)[0]:"",C.replaceAfter=C.endTriggerRe?C.endTriggerRe.exec(E)[0]:"",C}},this.snippetMap={},this.snippetNameMap={},this.register=function(y,m){var E=this.snippetMap,M=this.snippetNameMap,C=this;y||(y=[]);function k(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function O(A,I,P){return A=k(A),I=k(I),P?(A=I+A,A&&A[A.length-1]!="$"&&(A=A+"$")):(A=A+I,A&&A[0]!="^"&&(A="^"+A)),new RegExp(A)}function R(A){A.scope||(A.scope=m||"_"),m=A.scope,E[m]||(E[m]=[],M[m]={});var I=M[m];if(A.name){var P=I[A.name];P&&C.unregister(P),I[A.name]=A}E[m].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=a.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=O(A.trigger,A.guard,!0),A.triggerRe=new RegExp(A.trigger),A.endRe=O(A.endTrigger,A.endGuard,!0),A.endTriggerRe=new RegExp(A.endTrigger))}Array.isArray(y)?y.forEach(R):Object.keys(y).forEach(function(A){R(y[A])}),this._signal("registerSnippets",{scope:m})},this.unregister=function(y,m){var E=this.snippetMap,M=this.snippetNameMap;function C(k){var O=M[k.scope||m];if(O&&O[k.name]){delete O[k.name];var R=E[k.scope||m],A=R&&R.indexOf(k);A>=0&&R.splice(A,1)}}y.content?C(y):Array.isArray(y)&&y.forEach(C)},this.parseSnippetFile=function(y){y=y.replace(/\r/g,"");for(var m=[],E={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,C;C=M.exec(y);){if(C[1])try{E=JSON.parse(C[1]),m.push(E)}catch{}if(C[4])E.content=C[4].replace(/^\t/gm,""),m.push(E),E={};else{var k=C[2],O=C[3];if(k=="regex"){var R=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=R.exec(O)[1],E.trigger=R.exec(O)[1],E.endTrigger=R.exec(O)[1],E.endGuard=R.exec(O)[1]}else k=="snippet"?(E.tabTrigger=O.match(/^\S*/)[0],E.name||(E.name=O)):k&&(E[k]=O)}}return m},this.getSnippetByName=function(y,m){var E=this.snippetNameMap,M;return this.getActiveScopes(m).some(function(C){var k=E[C];return k&&(M=k[y]),!!M},this),M}}).call(w.prototype);var x=function(b){if(b.tabstopManager)return b.tabstopManager;b.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(b)};(function(){this.attach=function(b){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=b,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(b){for(var y=b.action[0]=="r",m=this.selectedTabstop||{},E=m.parents||{},M=(this.tabstops||[]).slice(),C=0;C<M.length;C++){var k=M[C],O=k==m||E[k.index];if(k.rangeList.$bias=O?0:1,b.action=="remove"&&k!==m){var R=k.parents&&k.parents[m.index],A=k.rangeList.pointIndex(b.start,R);A=A<0?-A-1:A+1;var I=k.rangeList.pointIndex(b.end,R);I=I<0?-I-1:I-1;for(var P=k.rangeList.ranges.slice(A,I),z=0;z<P.length;z++)this.removeRange(P[z])}k.rangeList.$onChange(b)}var B=this.editor.session;!this.$inChange&&y&&B.getLength()==1&&!B.getValue()&&this.detach()},this.updateLinkedFields=function(){var b=this.selectedTabstop;if(!(!b||!b.hasLinkedRanges||!b.firstNonLinked)){this.$inChange=!0;for(var y=this.editor.session,m=y.getTextRange(b.firstNonLinked),E=0;E<b.length;E++){var M=b[E];if(M.linked){var C=M.original,k=r.snippetManager.tmStrFormat(m,C,this.editor);y.replace(M,k)}}this.$inChange=!1}},this.onAfterExec=function(b){b.command&&!b.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var b=this.editor.selection.lead,y=this.editor.selection.anchor,m=this.editor.selection.isEmpty(),E=0;E<this.ranges.length;E++)if(!this.ranges[E].linked){var M=this.ranges[E].contains(b.row,b.column),C=m||this.ranges[E].contains(y.row,y.column);if(M&&C)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(b){var y=this.tabstops.length,m=this.index+(b||1);m=Math.min(Math.max(m,1),y),m==y&&(m=0),this.selectTabstop(m),m===0&&this.detach()},this.selectTabstop=function(b){this.$openTabstops=null;var y=this.tabstops[this.index];if(y&&this.addTabstopMarkers(y),this.index=b,y=this.tabstops[this.index],!(!y||!y.length)){this.selectedTabstop=y;var m=y.firstNonLinked||y;if(y.choices&&(m.cursor=m.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(m);else{var E=this.editor.multiSelect;E.toSingleRange(m);for(var M=0;M<y.length;M++)y.hasLinkedRanges&&y[M].linked||E.addRange(y[M].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(b,y,m){var E=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!b[0]){var M=c.fromPoints(m,m);T(M.start,y),T(M.end,y),b[0]=[M],b[0].index=0}var C=this.index,k=[C+1,0],O=this.ranges;b.forEach(function(R,A){for(var I=this.$openTabstops[A]||R,P=0;P<R.length;P++){var z=R[P],B=c.fromPoints(z.start,z.end||z.start);S(B.start,y),S(B.end,y),B.original=z,B.tabstop=I,O.push(B),I!=R?I.unshift(B):I[P]=B,z.fmtString||I.firstNonLinked&&E?(B.linked=!0,I.hasLinkedRanges=!0):I.firstNonLinked||(I.firstNonLinked=B)}I.firstNonLinked||(I.hasLinkedRanges=!1),I===R&&(k.push(I),this.$openTabstops[A]=I),this.addTabstopMarkers(I),I.rangeList=I.rangeList||new s,I.rangeList.$bias=0,I.rangeList.addList(I)},this),k.length>2&&(this.tabstops.length&&k.push(k.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,k))},this.addTabstopMarkers=function(b){var y=this.editor.session;b.forEach(function(m){m.markerId||(m.markerId=y.addMarker(m,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(b){var y=this.editor.session;b.forEach(function(m){y.removeMarker(m.markerId),m.markerId=null})},this.removeRange=function(b){var y=b.tabstop.indexOf(b);y!=-1&&b.tabstop.splice(y,1),y=this.ranges.indexOf(b),y!=-1&&this.ranges.splice(y,1),y=b.tabstop.rangeList.ranges.indexOf(b),y!=-1&&b.tabstop.splice(y,1),this.editor.session.removeMarker(b.markerId),b.tabstop.length||(y=this.tabstops.indexOf(b.tabstop),y!=-1&&this.tabstops.splice(y,1),this.tabstops.length||this.detach())},this.keyboardHandler=new u,this.keyboardHandler.bindKeys({Tab:function(b){r.snippetManager&&r.snippetManager.expandWithTab(b)||(b.tabstopManager.tabNext(1),b.renderer.scrollCursorIntoView())},"Shift-Tab":function(b){b.tabstopManager.tabNext(-1),b.renderer.scrollCursorIntoView()},Esc:function(b){b.tabstopManager.detach()}})}).call(x.prototype);var S=function(b,y){b.row==0&&(b.column+=y.column),b.row+=y.row},T=function(b,y){b.row==y.row&&(b.column-=y.column),b.row-=y.row};o.importCssString(`
.ace_snippet-marker {
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(194, 193, 208, 0.09);
border: 1px dotted rgba(211, 208, 235, 0.62);
position: absolute;
}`,"snippets.css",!1),r.snippetManager=new w;var v=n("./editor").Editor;(function(){this.insertSnippet=function(b,y){return r.snippetManager.insertSnippet(this,b,y)},this.expandSnippet=function(b){return r.snippetManager.expandWithTab(this,b)}}).call(v.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(n,r,i){var o=n("../virtual_renderer").VirtualRenderer,l=n("../editor").Editor,d=n("../range").Range,a=n("../lib/event"),c=n("../lib/lang"),s=n("../lib/dom"),u=n("../config").nls,f=function(g){return"suggest-aria-id:".concat(g)},h=function(g){var w=new o(g);w.$maxLines=4;var x=new l(w);return x.setHighlightActiveLine(!1),x.setShowPrintMargin(!1),x.renderer.setShowGutter(!1),x.renderer.setHighlightGutterLine(!1),x.$mouseHandler.$focusTimeout=0,x.$highlightTagPending=!0,x},p=function(){function g(w){var x=s.createElement("div"),S=new h(x);w&&w.appendChild(x),x.style.display="none",S.renderer.content.style.cursor="default",S.renderer.setStyle("ace_autocomplete"),S.renderer.container.setAttribute("role","listbox"),S.renderer.container.setAttribute("aria-label",u("Autocomplete suggestions")),S.setOption("displayIndentGuides",!1),S.setOption("dragDelay",150);var T=function(){};S.focus=T,S.$isFocused=!0,S.renderer.$cursorLayer.restartTimer=T,S.renderer.$cursorLayer.element.style.opacity=0,S.renderer.$maxLines=8,S.renderer.$keepTextAreaAtCursor=!1,S.setHighlightActiveLine(!1),S.session.highlight(""),S.session.$searchHighlight.clazz="ace_highlight-marker",S.on("mousedown",function(C){var k=C.getDocumentPosition();S.selection.moveToPosition(k),y.start.row=y.end.row=k.row,C.stop()});var v,b=new d(-1,0,-1,1/0),y=new d(-1,0,-1,1/0);y.id=S.session.addMarker(y,"ace_active-line","fullLine"),S.setSelectOnHover=function(C){C?b.id&&(S.session.removeMarker(b.id),b.id=null):b.id=S.session.addMarker(b,"ace_line-hover","fullLine")},S.setSelectOnHover(!1),S.on("mousemove",function(C){if(!v){v=C;return}if(!(v.x==C.x&&v.y==C.y)){v=C,v.scrollTop=S.renderer.scrollTop;var k=v.getDocumentPosition().row;b.start.row!=k&&(b.id||S.setRow(k),E(k))}}),S.renderer.on("beforeRender",function(){if(v&&b.start.row!=-1){v.$pos=null;var C=v.getDocumentPosition().row;b.id||S.setRow(C),E(C,!0)}}),S.renderer.on("afterRender",function(){var C=S.getRow(),k=S.renderer.$textLayer,O=k.element.childNodes[C-k.config.firstRow],R=document.activeElement;if(O!==k.selectedNode&&k.selectedNode&&(s.removeCssClass(k.selectedNode,"ace_selected"),R.removeAttribute("aria-activedescendant"),k.selectedNode.removeAttribute("id")),k.selectedNode=O,O){s.addCssClass(O,"ace_selected");var A=f(C);O.id=A,S.renderer.container.setAttribute("aria-activedescendant",A),R.setAttribute("aria-activedescendant",A),O.setAttribute("role","option"),O.setAttribute("aria-label",S.getData(C).value),O.setAttribute("aria-setsize",S.data.length),O.setAttribute("aria-posinset",C)}});var m=function(){E(-1)},E=function(C,k){C!==b.start.row&&(b.start.row=b.end.row=C,k||S.session._emit("changeBackMarker"),S._emit("changeHoverMarker"))};S.getHoveredRow=function(){return b.start.row},a.addListener(S.container,"mouseout",m),S.on("hide",m),S.on("changeSelection",m),S.session.doc.getLength=function(){return S.data.length},S.session.doc.getLine=function(C){var k=S.data[C];return typeof k=="string"?k:k&&k.value||""};var M=S.session.bgTokenizer;return M.$tokenizeRow=function(C){var k=S.data[C],O=[];if(!k)return O;typeof k=="string"&&(k={value:k});var R=k.caption||k.value||k.name;function A(re,Y){re&&O.push({type:(k.className||"")+(Y||""),value:re})}for(var I=R.toLowerCase(),P=(S.filterText||"").toLowerCase(),z=0,B=0,V=0;V<=P.length;V++)if(V!=B&&(k.matchMask&1<<V||V==P.length)){var K=P.slice(B,V);B=V;var q=I.indexOf(K,z);if(q==-1)continue;A(R.slice(z,q),""),z=q+K.length,A(R.slice(q,z),"completion-highlight")}return A(R.slice(z,R.length),""),O.push({type:"completion-spacer",value:" "}),k.meta&&O.push({type:"completion-meta",value:k.meta}),k.message&&O.push({type:"completion-message",value:k.message}),O},M.$updateOnChange=T,M.start=T,S.session.$computeWidth=function(){return this.screenWidth=0},S.isOpen=!1,S.isTopdown=!1,S.autoSelect=!0,S.filterText="",S.data=[],S.setData=function(C,k){S.filterText=k||"",S.setValue(c.stringRepeat(`
`,C.length),-1),S.data=C||[],S.setRow(0)},S.getData=function(C){return S.data[C]},S.getRow=function(){return y.start.row},S.setRow=function(C){C=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,C)),y.start.row!=C&&(S.selection.clearSelection(),y.start.row=y.end.row=C||0,S.session._emit("changeBackMarker"),S.moveCursorTo(C||0,0),S.isOpen&&S._signal("select"))},S.on("changeSelection",function(){S.isOpen&&S.setRow(S.selection.lead.row),S.renderer.scrollCursorIntoView()}),S.hide=function(){this.container.style.display="none",S.anchorPos=null,S.anchor=null,S.isOpen&&(S.isOpen=!1,this._signal("hide"))},S.tryShow=function(C,k,O,R){if(!R&&S.isOpen&&S.anchorPos&&S.anchor&&S.anchorPos.top===C.top&&S.anchorPos.left===C.left&&S.anchor===O)return!0;var A=this.container,I=window.innerHeight,P=window.innerWidth,z=this.renderer,B=z.$maxLines*k*1.4,V={top:0,bottom:0,left:0},K=I-C.top-3*this.$borderSize-k,q=C.top-3*this.$borderSize;O||(q<=K||K>=B?O="bottom":O="top"),O==="top"?(V.bottom=C.top-this.$borderSize,V.top=V.bottom-B):O==="bottom"&&(V.top=C.top+k+this.$borderSize,V.bottom=V.top+B);var re=V.top>=0&&V.bottom<=I;if(!R&&!re)return!1;re?z.$maxPixelHeight=null:O==="top"?z.$maxPixelHeight=q:z.$maxPixelHeight=K,O==="top"?(A.style.top="",A.style.bottom=I-V.bottom+"px",S.isTopdown=!1):(A.style.top=V.top+"px",A.style.bottom="",S.isTopdown=!0),A.style.display="";var Y=C.left;return Y+A.offsetWidth>P&&(Y=P-A.offsetWidth),A.style.left=Y+"px",A.style.right="",S.isOpen||(S.isOpen=!0,this._signal("show"),v=null),S.anchorPos=C,S.anchor=O,!0},S.show=function(C,k,O){this.tryShow(C,k,O?"bottom":void 0,!0)},S.goTo=function(C){var k=this.getRow(),O=this.session.getLength()-1;switch(C){case"up":k=k<=0?O:k-1;break;case"down":k=k>=O?-1:k+1;break;case"start":k=0;break;case"end":k=O;break}this.setRow(k)},S.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},S.$imageSize=0,S.$borderSize=1,S}return g}();s.importCssString(`
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #CAD6FA;
z-index: 1;
}
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #3a674e;
}
.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid #abbffe;
margin-top: -1px;
background: rgba(233,233,253,0.4);
position: absolute;
z-index: 2;
}
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid rgba(109, 150, 13, 0.8);
background: rgba(58, 103, 78, 0.62);
}
.ace_completion-meta {
opacity: 0.5;
margin: 0 0.9em;
}
.ace_completion-message {
color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #2d69c7;
}
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #93ca12;
}
.ace_editor.ace_autocomplete {
width: 300px;
z-index: 200000;
border: 1px lightgray solid;
position: fixed;
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
line-height: 1.4;
background: #fefefe;
color: #111;
}
.ace_dark.ace_editor.ace_autocomplete {
border: 1px #484747 solid;
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
line-height: 1.4;
background: #25282c;
color: #c1c1c1;
}
.ace_autocomplete_right .ace_text-layer {
width: calc(100% - 8px);
}
.ace_autocomplete_right .ace_line {
display: flex;
}
.ace_autocomplete_right .ace_completion-spacer {
flex: 1;
}
`,"autocompletion.css",!1),r.AcePopup=p,r.$singleLineEditor=h,r.getAriaId=f}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(n,r,i){var o=n("../snippets").snippetManager,l=function(){function d(){this.editor=null}return d.prototype.show=function(a,c,s){if(s=s||"",a&&this.editor&&this.editor!==a&&(this.hide(),this.editor=null),!a||!c)return!1;var u=c.snippet?o.getDisplayTextForSnippet(a,c.snippet):c.value;return!u||!u.startsWith(s)?!1:(this.editor=a,u=u.slice(s.length),u===""?a.removeGhostText():a.setGhostText(u),!0)},d.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},d.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},d.prototype.destroy=function(){this.hide(),this.editor=null},d}();r.AceInline=l}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,i){r.parForEach=function(l,d,a){var c=0,s=l.length;s===0&&a();for(var u=0;u<s;u++)d(l[u],function(f,h){c++,c===s&&a(f,h)})};var o=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(l,d,a){a=a||o;for(var c=[],s=d-1;s>=0&&a.test(l[s]);s--)c.push(l[s]);return c.reverse().join("")},r.retrieveFollowingIdentifier=function(l,d,a){a=a||o;for(var c=[],s=d;s<l.length&&a.test(l[s]);s++)c.push(l[s]);return c},r.getCompletionPrefix=function(l){var d=l.getCursorPosition(),a=l.session.getLine(d.row),c;return l.completers.forEach(function(s){s.identifierRegexps&&s.identifierRegexps.forEach(function(u){!c&&u&&(c=this.retrievePrecedingIdentifier(a,d.column,u))}.bind(this))}.bind(this)),c||this.retrievePrecedingIdentifier(a,d.column)},r.triggerAutocomplete=function(l){var d=l.getCursorPosition(),a=l.session.getLine(d.row),c=d.column===0?0:d.column-1,s=a[c];return l.completers.some(function(u){if(u.triggerCharacters&&Array.isArray(u.triggerCharacters))return u.triggerCharacters.includes(s)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(n,r,i){var o=n("./keyboard/hash_handler").HashHandler,l=n("./autocomplete/popup").AcePopup,d=n("./autocomplete/inline").AceInline,a=n("./autocomplete/popup").getAriaId,c=n("./autocomplete/util"),s=n("./lib/lang"),u=n("./lib/dom"),f=n("./snippets").snippetManager,h=n("./config"),p=function(S,T){T.completer&&T.completer.destroy()},g=function(){function S(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new o,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=s.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50)}return S.prototype.$init=function(){return this.popup=new l(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(T){this.insertMatch(),T.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},S.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new d,this.inlineRenderer},S.prototype.getPopup=function(){return this.popup||this.$init()},S.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},S.prototype.$onPopupChange=function(T){if(this.inlineRenderer&&this.inlineEnabled){var v=T?null:this.popup.getData(this.popup.getRow()),b=c.getCompletionPrefix(this.editor);this.inlineRenderer.show(this.editor,v,b)||this.inlineRenderer.hide(),this.$updatePopupPosition()}this.tooltipTimer.call(null,null)},S.prototype.$updatePopupPosition=function(){var T=this.editor,v=T.renderer,b=v.layerConfig.lineHeight,y=v.$cursorLayer.getPixelPosition(this.base,!0);y.left-=this.popup.getTextLeftOffset();var m=T.container.getBoundingClientRect();y.top+=m.top-v.layerConfig.offset,y.left+=m.left-T.renderer.scrollLeft,y.left+=v.gutterWidth;var E={top:y.top,left:y.left};v.$ghostText&&v.$ghostTextWidget&&this.base.row===v.$ghostText.position.row&&(E.top+=v.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow(E,b,"bottom")&&(this.popup.tryShow(y,b,"top")||this.popup.show(y,b))},S.prototype.openPopup=function(T,v,b){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),T.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),b?b&&!v&&this.detach():(this.popup.setTheme(T.getTheme()),this.popup.setFontSize(T.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel()},S.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},S.prototype.changeListener=function(T){var v=this.editor.selection.lead;(v.row!=this.base.row||v.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},S.prototype.blurListener=function(T){var v=document.activeElement,b=this.editor.textInput.getElement(),y=T.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(T.relatedTarget),m=this.popup&&this.popup.container;v!=b&&v.parentNode!=m&&!y&&v!=this.tooltipNode&&T.relatedTarget!=b&&this.detach()},S.prototype.mousedownListener=function(T){this.detach()},S.prototype.mousewheelListener=function(T){this.detach()},S.prototype.goTo=function(T){this.popup.goTo(T)},S.prototype.insertMatch=function(T,v){if(T||(T=this.popup.getData(this.popup.getRow())),!T)return!1;if(T.value==="")return this.detach();var b=this.completions,y=this.getCompletionProvider().insertMatch(this.editor,T,b.filterText,v);return this.completions==b&&this.detach(),y},S.prototype.showPopup=function(T,v){this.editor&&this.detach(),this.activated=!0,this.editor=T,T.completer!=this&&(T.completer&&T.completer.detach(),T.completer=this),T.on("changeSelection",this.changeListener),T.on("blur",this.blurListener),T.on("mousedown",this.mousedownListener),T.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,v)},S.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new w),this.completionProvider},S.prototype.gatherCompletions=function(T,v){return this.getCompletionProvider().gatherCompletions(T,v)},S.prototype.updateCompletions=function(T,v){if(T&&this.base&&this.completions){var y=this.editor.getCursorPosition(),m=this.editor.session.getTextRange({start:this.base,end:y});if(m==this.completions.filterText)return;if(this.completions.setFilter(m),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==m&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,m,T);return}if(v&&v.matches){var y=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(y.row,y.column),this.base.$insertRight=!0,this.completions=new x(v.matches),this.openPopup(this.editor,"",T)}var b=this.editor.getSession(),y=this.editor.getCursorPosition(),m=c.getCompletionPrefix(this.editor);this.base=b.doc.createAnchor(y.row,y.column-m.length),this.base.$insertRight=!0;var E={exactMatch:this.exactMatch};this.getCompletionProvider().provideCompletions(this.editor,E,function(M,C,k){var O=C.filtered,R=c.getCompletionPrefix(this.editor);if(k){if(!O.length){var A=!this.autoShown&&this.emptyMessage;if(typeof A=="function"&&(A=this.emptyMessage(R)),A){var I=[{caption:this.emptyMessage(R),value:""}];this.completions=new x(I),this.openPopup(this.editor,R,T);return}return this.detach()}if(O.length==1&&O[0].value==R&&!O[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&O.length==1)return this.insertMatch(O[0])}this.completions=C,this.openPopup(this.editor,R,T)}.bind(this))},S.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},S.prototype.updateDocTooltip=function(){var T=this.popup,v=T.data,b=v&&(v[T.getHoveredRow()]||v[T.getRow()]),y=null;if(!b||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var m=this.editor.completers.length,E=0;E<m;E++){var M=this.editor.completers[E];if(M.getDocTooltip&&b.completerId===M.id){y=M.getDocTooltip(b);break}}if(!y&&typeof b!="string"&&(y=b),typeof y=="string"&&(y={docText:y}),!y||!(y.docHTML||y.docText))return this.hideDocTooltip();this.showDocTooltip(y)},S.prototype.showDocTooltip=function(T){this.tooltipNode||(this.tooltipNode=u.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var v=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(v.isDark?"ace_dark ":"")+(v.cssClass||"");var b=this.tooltipNode;T.docHTML?b.innerHTML=T.docHTML:T.docText&&(b.textContent=T.docText),b.parentNode||this.popup.container.appendChild(this.tooltipNode);var y=this.popup,m=y.container.getBoundingClientRect();b.style.top=y.container.style.top,b.style.bottom=y.container.style.bottom,b.style.display="block",window.innerWidth-m.right<320?m.left<320?y.isTopdown?(b.style.top=m.bottom+"px",b.style.left=m.left+"px",b.style.right="",b.style.bottom=""):(b.style.top=y.container.offsetTop-b.offsetHeight+"px",b.style.left=m.left+"px",b.style.right="",b.style.bottom=""):(b.style.right=window.innerWidth-m.left+"px",b.style.left=""):(b.style.left=m.right+1+"px",b.style.right="")},S.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var T=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==T&&this.editor.focus(),this.tooltipNode=null,T.parentNode&&T.parentNode.removeChild(T)}},S.prototype.onTooltipClick=function(T){for(var v=T.target;v&&v!=this.tooltipNode;){if(v.nodeName=="A"&&v.href){v.rel="noreferrer",v.target="_blank";break}v=v.parentNode}},S.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var T=this.popup.container;T&&T.parentNode&&T.parentNode.removeChild(T)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},S}();g.prototype.commands={Up:function(S){S.completer.goTo("up")},Down:function(S){S.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(S){S.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(S){S.completer.goTo("end")},Esc:function(S){S.completer.detach()},Return:function(S){return S.completer.insertMatch()},"Shift-Return":function(S){S.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(S){var T=S.completer.insertMatch();if(!T&&!S.tabstopManager)S.completer.goTo("down");else return T},PageUp:function(S){S.completer.popup.gotoPageUp()},PageDown:function(S){S.completer.popup.gotoPageDown()}},g.for=function(S){return S.completer instanceof g||(S.completer&&(S.completer.destroy(),S.completer=null),h.get("sharedPopups")?(g.$sharedInstance||(g.$sharedInstance=new g),S.completer=g.$sharedInstance):(S.completer=new g,S.once("destroy",p))),S.completer},g.startCommand={name:"startAutocomplete",exec:function(S,T){var v=g.for(S);v.autoInsert=!1,v.autoSelect=!0,v.autoShown=!1,v.showPopup(S,T),v.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var w=function(){function S(){this.active=!0}return S.prototype.insertByIndex=function(T,v,b){return!this.completions||!this.completions.filtered?!1:this.insertMatch(T,this.completions.filtered[v],b)},S.prototype.insertMatch=function(T,v,b){if(!v)return!1;if(T.startOperation({command:{name:"insertMatch"}}),v.completer&&v.completer.insertMatch)v.completer.insertMatch(T,v);else{if(!this.completions)return!1;if(this.completions.filterText){var y;T.selection.getAllRanges?y=T.selection.getAllRanges():y=[T.getSelectionRange()];for(var m=0,E;E=y[m];m++)E.start.column-=this.completions.filterText.length,T.session.remove(E)}v.snippet?f.insertSnippet(T,v.snippet,{range:v.range}):this.$insertString(T,v),v.command&&v.command==="startAutocomplete"&&T.execCommand(v.command)}return T.endOperation(),!0},S.prototype.$insertString=function(T,v){var b=v.value||v;if(v.range){if(T.inVirtualSelectionMode)return T.session.replace(v.range,b);T.forEachSelection(function(){var y=T.getSelectionRange();v.range.compareRange(y)===0?T.session.replace(v.range,b):T.insert(b)},null,{keepOrder:!0})}else T.execCommand("insertstring",b)},S.prototype.gatherCompletions=function(T,v){var b=T.getSession(),y=T.getCursorPosition(),m=c.getCompletionPrefix(T),E=[],M=T.completers.length;return T.completers.forEach(function(C,k){C.getCompletions(T,b,y,m,function(O,R){!O&&R&&(E=E.concat(R)),v(null,{prefix:c.getCompletionPrefix(T),matches:E,finished:--M===0})})}),!0},S.prototype.provideCompletions=function(T,v,b){var y=function(C){var k=C.prefix,O=C.matches;this.completions=new x(O),v.exactMatch&&(this.completions.exactMatch=!0),v.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(k),(C.finished||this.completions.filtered.length)&&b(null,this.completions,C.finished)}.bind(this),m=!0,E=null;if(this.gatherCompletions(T,function(C,k){if(this.active){C&&(b(C,[],!0),this.detach());var O=k.prefix;if(O.indexOf(k.prefix)===0){if(m){E=k;return}y(k)}}}.bind(this)),m=!1,E){var M=E;E=null,y(M)}},S.prototype.detach=function(){this.active=!1},S}(),x=function(){function S(T,v){this.all=T,this.filtered=T,this.filterText=v||"",this.exactMatch=!1,this.ignoreCaption=!1}return S.prototype.setFilter=function(T){if(T.length>this.filterText&&T.lastIndexOf(this.filterText,0)===0)var v=this.filtered;else var v=this.all;this.filterText=T,v=this.filterCompletions(v,this.filterText),v=v.sort(function(y,m){return m.exactMatch-y.exactMatch||m.$score-y.$score||(y.caption||y.value).localeCompare(m.caption||m.value)});var b=null;v=v.filter(function(y){var m=y.snippet||y.caption||y.value;return m===b?!1:(b=m,!0)}),this.filtered=v},S.prototype.filterCompletions=function(T,v){var b=[],y=v.toUpperCase(),m=v.toLowerCase();e:for(var E=0,M;M=T[E];E++){var C=!this.ignoreCaption&&M.caption||M.value||M.snippet;if(C){var k=-1,O=0,R=0,A,I;if(this.exactMatch){if(v!==C.substr(0,v.length))continue e}else{var P=C.toLowerCase().indexOf(m);if(P>-1)R=P;else for(var z=0;z<v.length;z++){var B=C.indexOf(m[z],k+1),V=C.indexOf(y[z],k+1);if(A=B>=0&&(V<0||B<V)?B:V,A<0)continue e;I=A-k-1,I>0&&(k===-1&&(R+=10),R+=I,O=O|1<<z),k=A}}M.matchMask=O,M.exactMatch=R?0:1,M.$score=(M.score||0)-R,b.push(M)}}return b},S}();r.Autocomplete=g,r.CompletionProvider=w,r.FilteredList=x}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,l=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function d(c,s){var u=c.getTextRange(o.fromPoints({row:0,column:0},s));return u.split(l).length-1}function a(c,s){var u=d(c,s),f=c.getValue().split(l),h=Object.create(null),p=f[u];return f.forEach(function(g,w){if(!(!g||g===p)){var x=Math.abs(u-w),S=f.length-x;h[g]?h[g]=Math.max(S,h[g]):h[g]=S}}),h}r.getCompletions=function(c,s,u,f,h){var p=a(s,u),g=Object.keys(p);h(null,g.map(function(w){return{caption:w,value:w,score:p[w],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,i){var o=n("../snippets").snippetManager,l=n("../autocomplete").Autocomplete,d=n("../config"),a=n("../lib/lang"),c=n("../autocomplete/util"),s=n("../autocomplete/text_completer"),u={getCompletions:function(b,y,m,E,M){if(y.$mode.completer)return y.$mode.completer.getCompletions(b,y,m,E,M);var C=b.session.getState(m.row),k=y.$mode.getCompletions(C,y,m,E);k=k.map(function(O){return O.completerId=u.id,O}),M(null,k)},id:"keywordCompleter"},f=function(b){var y={};return b.replace(/\${(\d+)(:(.*?))?}/g,function(m,E,M,C){return y[E]=C||""}).replace(/\$(\d+?)/g,function(m,E){return y[E]})},h={getCompletions:function(b,y,m,E,M){var C=[],k=y.getTokenAt(m.row,m.column);k&&k.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?C.push("html-tag"):C=o.getActiveScopes(b);var O=o.snippetMap,R=[];C.forEach(function(A){for(var I=O[A]||[],P=I.length;P--;){var z=I[P],B=z.name||z.tabTrigger;B&&R.push({caption:B,snippet:z.content,meta:z.tabTrigger&&!z.name?z.tabTrigger+"⇥ ":"snippet",completerId:h.id})}},this),M(null,R)},getDocTooltip:function(b){b.snippet&&!b.docHTML&&(b.docHTML=["<b>",a.escapeHTML(b.caption),"</b>","<hr></hr>",a.escapeHTML(f(b.snippet))].join(""))},id:"snippetCompleter"},p=[h,s,u];r.setCompleters=function(b){p.length=0,b&&p.push.apply(p,b)},r.addCompleter=function(b){p.push(b)},r.textCompleter=s,r.keyWordCompleter=u,r.snippetCompleter=h;var g={name:"expandSnippet",exec:function(b){return o.expandWithTab(b)},bindKey:"Tab"},w=function(b,y){x(y.session.$mode)},x=function(b){typeof b=="string"&&(b=d.$modes[b]),b&&(o.files||(o.files={}),S(b.$id,b.snippetFileId),b.modes&&b.modes.forEach(x))},S=function(b,y){!y||!b||o.files[b]||(o.files[b]={},d.loadModule(y,function(m){m&&(o.files[b]=m,!m.snippets&&m.snippetText&&(m.snippets=o.parseSnippetFile(m.snippetText)),o.register(m.snippets||[],m.scope),m.includeScopes&&(o.snippetMap[m.scope].includeScopes=m.includeScopes,m.includeScopes.forEach(function(E){x("ace/mode/"+E)})))}))},T=function(b){var y=b.editor,m=y.completer&&y.completer.activated;if(b.command.name==="backspace")m&&!c.getCompletionPrefix(y)&&y.completer.detach();else if(b.command.name==="insertstring"){var E=c.getCompletionPrefix(y),M=c.triggerAutocomplete(y);if((E||M)&&!m){var C=l.for(y);C.autoShown=!0,C.showPopup(y)}}},v=n("../editor").Editor;n("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(b){b?(this.completers||(this.completers=Array.isArray(b)?b:p),this.commands.addCommand(l.startCommand)):this.commands.removeCommand(l.startCommand)},value:!1},enableLiveAutocompletion:{set:function(b){b?(this.completers||(this.completers=Array.isArray(b)?b:p),this.commands.on("afterExec",T)):this.commands.removeListener("afterExec",T)},value:!1},enableSnippets:{set:function(b){b?(this.commands.addCommand(g),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(g),this.off("changeMode",w))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){e&&(e.exports=n)})}()})(yO);const Gi=N.createContext({images:[],setImages:()=>{},filteredImages:[],setFilteredImages:()=>{}});function bO({children:e}){const[t,n]=N.useState([]),[r,i]=N.useState([]),[o,l]=N.useState([]);N.useEffect(()=>{const u=[...new Set(o)];u.length!==o.length&&l(u)},[o]);const s={images:t,setImages:n,filteredImages:r,setFilteredImages:i,deleteImg:async(u,f)=>{const{path:h}=f;function p(){const g=t.filter(w=>w.path!==decodeURIComponent(h));n([...g])}if(u==="delete"){const g=await fetch(`/cozy-nest/image?path=${h}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),w=await g.json();jt.debug("json",w),g.ok&&p()}else if(u==="archive"){const g=await fetch(`/cozy-nest/image?path=${h}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({archive:!0})}),w=await g.json();jt.debug("json",w),g.ok&&p()}},updateExifInState:u=>{const{metadata:{exif:f,hash:h}}=u,p=t.map(g=>(g.hash===h&&(g.metadata.exif=f),g));n([...p])},getImage:u=>t.find(f=>f.hash===u),tags:o,setTags:l};return W.jsx(Gi.Provider,{value:s,children:e})}ace.config.setModuleUrl("ace/mode/json_worker","cozy-nest-client/node_modules/ace-builds/src-noconflict/worker-json.js");function wO({onClose:e,visible:t,imageHash:n}){const[r,i]=N.useState({}),[o,l]=N.useState(""),[d,a]=N.useState(!1),{images:c,getImage:s}=N.useContext(Gi),[u,f]=N.useState(s(n));N.useEffect(()=>{f(s(n))},[c,n]),N.useEffect(()=>{i(u.metadata.exif),l(JSON.stringify(u.metadata.exif,null,2)),a(!0)},[t,u]);const h=w=>{l(w);try{const x=JSON.parse(w);i(x),a(!0)}catch{a(!1)}},p=async()=>{if(!d)return;const w=u.path;await ab(w,r)},g=()=>{e()};return W.jsxs(W.Fragment,{children:[t&&W.jsx("div",{className:"ExifEditor backdrop",children:W.jsxs("div",{className:"container",children:[W.jsx("h1",{children:"Exif Editor"}),W.jsx(KE,{mode:"json",theme:"github_dark",showPrintMargin:!1,onChange:h,value:o,name:"ace-json-editor",editorProps:{$blockScrolling:!0},style:{width:"100%",height:"100%",zIndex:200},setOptions:{enableSnippets:!0,cursorStyle:"smooth",behavioursEnabled:!0,wrapBehavioursEnabled:!0,autoScrollEditorIntoView:!0,wrap:!0}}),W.jsx(hi,{disabled:!d,onClick:p,children:d?"Save":"Invalid JSON"}),W.jsx(hi,{onClick:()=>g(),children:"Close"})]})}),!t&&W.jsx("div",{})]})}async function ab(e,t){e.indexOf("%")!==-1&&(e=decodeURIComponent(e)),t["cozy-nest-tags"]&&t["cozy-nest-tags"].match(/^,+$/g)&&(t["cozy-nest-tags"]="");const r=await(await fetch("/cozy-nest/image-exif",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,data:t})})).json();jt.debug("json",r)}const hm={save:ab,ExifEditor:wO};function SO(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function xO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var _O=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(xO(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=SO(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),zn="-ms-",Oh="-moz-",$t="-webkit-",qE="comm",sb="rule",lb="decl",CO="@import",YE="@keyframes",kO="@layer",EO=Math.abs,Vp=String.fromCharCode,$O=Object.assign;function TO(e,t){return $n(e,0)^45?(((t<<2^$n(e,0))<<2^$n(e,1))<<2^$n(e,2))<<2^$n(e,3):0}function XE(e){return e.trim()}function AO(e,t){return(e=t.exec(e))?e[0]:e}function Tt(e,t,n){return e.replace(t,n)}function ly(e,t){return e.indexOf(t)}function $n(e,t){return e.charCodeAt(t)|0}function Gc(e,t,n){return e.slice(t,n)}function Ii(e){return e.length}function ub(e){return e.length}function Qd(e,t){return t.push(e),e}function MO(e,t){return e.map(t).join("")}var Wp=1,ru=1,QE=0,dr=0,un=0,mu="";function Up(e,t,n,r,i,o,l){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Wp,column:ru,length:l,return:""}}function Pu(e,t){return $O(Up("",null,null,"",null,null,0),e,{length:-e.length},t)}function LO(){return un}function RO(){return un=dr>0?$n(mu,--dr):0,ru--,un===10&&(ru=1,Wp--),un}function br(){return un=dr<QE?$n(mu,dr++):0,ru++,un===10&&(ru=1,Wp++),un}function Hi(){return $n(mu,dr)}function Mf(){return dr}function fd(e,t){return Gc(mu,e,t)}function Kc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ZE(e){return Wp=ru=1,QE=Ii(mu=e),dr=0,[]}function JE(e){return mu="",e}function Lf(e){return XE(fd(dr-1,uy(e===91?e+2:e===40?e+1:e)))}function PO(e){for(;(un=Hi())&&un<33;)br();return Kc(e)>2||Kc(un)>3?"":" "}function IO(e,t){for(;--t&&br()&&!(un<48||un>102||un>57&&un<65||un>70&&un<97););return fd(e,Mf()+(t<6&&Hi()==32&&br()==32))}function uy(e){for(;br();)switch(un){case e:return dr;case 34:case 39:e!==34&&e!==39&&uy(un);break;case 40:e===41&&uy(e);break;case 92:br();break}return dr}function OO(e,t){for(;br()&&e+un!==47+10;)if(e+un===42+42&&Hi()===47)break;return"/*"+fd(t,dr-1)+"*"+Vp(e===47?e:br())}function FO(e){for(;!Kc(Hi());)br();return fd(e,dr)}function DO(e){return JE(Rf("",null,null,null,[""],e=ZE(e),0,[0],e))}function Rf(e,t,n,r,i,o,l,d,a){for(var c=0,s=0,u=l,f=0,h=0,p=0,g=1,w=1,x=1,S=0,T="",v=i,b=o,y=r,m=T;w;)switch(p=S,S=br()){case 40:if(p!=108&&$n(m,u-1)==58){ly(m+=Tt(Lf(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:m+=Lf(S);break;case 9:case 10:case 13:case 32:m+=PO(p);break;case 92:m+=IO(Mf()-1,7);continue;case 47:switch(Hi()){case 42:case 47:Qd(NO(OO(br(),Mf()),t,n),a);break;default:m+="/"}break;case 123*g:d[c++]=Ii(m)*x;case 125*g:case 59:case 0:switch(S){case 0:case 125:w=0;case 59+s:x==-1&&(m=Tt(m,/\f/g,"")),h>0&&Ii(m)-u&&Qd(h>32?q1(m+";",r,n,u-1):q1(Tt(m," ","")+";",r,n,u-2),a);break;case 59:m+=";";default:if(Qd(y=K1(m,t,n,c,s,i,d,T,v=[],b=[],u),o),S===123)if(s===0)Rf(m,t,y,y,v,o,u,d,b);else switch(f===99&&$n(m,3)===110?100:f){case 100:case 108:case 109:case 115:Rf(e,y,y,r&&Qd(K1(e,y,y,0,0,i,d,T,i,v=[],u),b),i,b,u,d,r?v:b);break;default:Rf(m,y,y,y,[""],b,0,d,b)}}c=s=h=0,g=x=1,T=m="",u=l;break;case 58:u=1+Ii(m),h=p;default:if(g<1){if(S==123)--g;else if(S==125&&g++==0&&RO()==125)continue}switch(m+=Vp(S),S*g){case 38:x=s>0?1:(m+="\f",-1);break;case 44:d[c++]=(Ii(m)-1)*x,x=1;break;case 64:Hi()===45&&(m+=Lf(br())),f=Hi(),s=u=Ii(T=m+=FO(Mf())),S++;break;case 45:p===45&&Ii(m)==2&&(g=0)}}return o}function K1(e,t,n,r,i,o,l,d,a,c,s){for(var u=i-1,f=i===0?o:[""],h=ub(f),p=0,g=0,w=0;p<r;++p)for(var x=0,S=Gc(e,u+1,u=EO(g=l[p])),T=e;x<h;++x)(T=XE(g>0?f[x]+" "+S:Tt(S,/&\f/g,f[x])))&&(a[w++]=T);return Up(e,t,n,i===0?sb:d,a,c,s)}function NO(e,t,n){return Up(e,t,n,qE,Vp(LO()),Gc(e,2,-2),0)}function q1(e,t,n,r){return Up(e,t,n,lb,Gc(e,0,r),Gc(e,r+1,-1),r)}function zl(e,t){for(var n="",r=ub(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function zO(e,t,n,r){switch(e.type){case kO:if(e.children.length)break;case CO:case lb:return e.return=e.return||e.value;case qE:return"";case YE:return e.return=e.value+"{"+zl(e.children,r)+"}";case sb:e.value=e.props.join(",")}return Ii(n=zl(e.children,r))?e.return=e.value+"{"+n+"}":""}function BO(e){var t=ub(e);return function(n,r,i,o){for(var l="",d=0;d<t;d++)l+=e[d](n,r,i,o)||"";return l}}function jO(e){return function(t){t.root||(t=t.return)&&e(t)}}var Y1=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function e2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var HO=function(t,n,r){for(var i=0,o=0;i=o,o=Hi(),i===38&&o===12&&(n[r]=1),!Kc(o);)br();return fd(t,dr)},VO=function(t,n){var r=-1,i=44;do switch(Kc(i)){case 0:i===38&&Hi()===12&&(n[r]=1),t[r]+=HO(dr-1,n,r);break;case 2:t[r]+=Lf(i);break;case 4:if(i===44){t[++r]=Hi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Vp(i)}while(i=br());return t},WO=function(t,n){return JE(VO(ZE(t),n))},X1=new WeakMap,UO=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!X1.get(r))&&!i){X1.set(t,!0);for(var o=[],l=WO(n,o),d=r.props,a=0,c=0;a<l.length;a++)for(var s=0;s<d.length;s++,c++)t.props[c]=o[a]?l[a].replace(/&\f/g,d[s]):d[s]+" "+l[a]}}},GO=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function t2(e,t){switch(TO(e,t)){case 5103:return $t+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $t+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $t+e+Oh+e+zn+e+e;case 6828:case 4268:return $t+e+zn+e+e;case 6165:return $t+e+zn+"flex-"+e+e;case 5187:return $t+e+Tt(e,/(\w+).+(:[^]+)/,$t+"box-$1$2"+zn+"flex-$1$2")+e;case 5443:return $t+e+zn+"flex-item-"+Tt(e,/flex-|-self/,"")+e;case 4675:return $t+e+zn+"flex-line-pack"+Tt(e,/align-content|flex-|-self/,"")+e;case 5548:return $t+e+zn+Tt(e,"shrink","negative")+e;case 5292:return $t+e+zn+Tt(e,"basis","preferred-size")+e;case 6060:return $t+"box-"+Tt(e,"-grow","")+$t+e+zn+Tt(e,"grow","positive")+e;case 4554:return $t+Tt(e,/([^-])(transform)/g,"$1"+$t+"$2")+e;case 6187:return Tt(Tt(Tt(e,/(zoom-|grab)/,$t+"$1"),/(image-set)/,$t+"$1"),e,"")+e;case 5495:case 3959:return Tt(e,/(image-set\([^]*)/,$t+"$1$`$1");case 4968:return Tt(Tt(e,/(.+:)(flex-)?(.*)/,$t+"box-pack:$3"+zn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$t+e+e;case 4095:case 3583:case 4068:case 2532:return Tt(e,/(.+)-inline(.+)/,$t+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ii(e)-1-t>6)switch($n(e,t+1)){case 109:if($n(e,t+4)!==45)break;case 102:return Tt(e,/(.+:)(.+)-([^]+)/,"$1"+$t+"$2-$3$1"+Oh+($n(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ly(e,"stretch")?t2(Tt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($n(e,t+1)!==115)break;case 6444:switch($n(e,Ii(e)-3-(~ly(e,"!important")&&10))){case 107:return Tt(e,":",":"+$t)+e;case 101:return Tt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$t+($n(e,14)===45?"inline-":"")+"box$3$1"+$t+"$2$3$1"+zn+"$2box$3")+e}break;case 5936:switch($n(e,t+11)){case 114:return $t+e+zn+Tt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $t+e+zn+Tt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $t+e+zn+Tt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $t+e+zn+e+e}return e}var KO=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case lb:t.return=t2(t.value,t.length);break;case YE:return zl([Pu(t,{value:Tt(t.value,"@","@"+$t)})],i);case sb:if(t.length)return MO(t.props,function(o){switch(AO(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zl([Pu(t,{props:[Tt(o,/:(read-\w+)/,":"+Oh+"$1")]})],i);case"::placeholder":return zl([Pu(t,{props:[Tt(o,/:(plac\w+)/,":"+$t+"input-$1")]}),Pu(t,{props:[Tt(o,/:(plac\w+)/,":"+Oh+"$1")]}),Pu(t,{props:[Tt(o,/:(plac\w+)/,zn+"input-$1")]})],i)}return""})}},qO=[KO],YO=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var w=g.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||qO,o={},l,d=[];l=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var w=g.getAttribute("data-emotion").split(" "),x=1;x<w.length;x++)o[w[x]]=!0;d.push(g)});var a,c=[UO,GO];{var s,u=[zO,jO(function(g){s.insert(g)})],f=BO(c.concat(i,u)),h=function(w){return zl(DO(w),f)};a=function(w,x,S,T){s=S,h(w?w+"{"+x.styles+"}":x.styles),T&&(p.inserted[x.name]=!0)}}var p={key:n,sheet:new _O({key:n,container:l,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:a};return p.sheet.hydrate(d),p};function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ie.apply(this,arguments)}var n2={exports:{}},Pt={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Sn=typeof Symbol=="function"&&Symbol.for,cb=Sn?Symbol.for("react.element"):60103,db=Sn?Symbol.for("react.portal"):60106,Gp=Sn?Symbol.for("react.fragment"):60107,Kp=Sn?Symbol.for("react.strict_mode"):60108,qp=Sn?Symbol.for("react.profiler"):60114,Yp=Sn?Symbol.for("react.provider"):60109,Xp=Sn?Symbol.for("react.context"):60110,fb=Sn?Symbol.for("react.async_mode"):60111,Qp=Sn?Symbol.for("react.concurrent_mode"):60111,Zp=Sn?Symbol.for("react.forward_ref"):60112,Jp=Sn?Symbol.for("react.suspense"):60113,XO=Sn?Symbol.for("react.suspense_list"):60120,eg=Sn?Symbol.for("react.memo"):60115,tg=Sn?Symbol.for("react.lazy"):60116,QO=Sn?Symbol.for("react.block"):60121,ZO=Sn?Symbol.for("react.fundamental"):60117,JO=Sn?Symbol.for("react.responder"):60118,e8=Sn?Symbol.for("react.scope"):60119;function Er(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case cb:switch(e=e.type,e){case fb:case Qp:case Gp:case qp:case Kp:case Jp:return e;default:switch(e=e&&e.$$typeof,e){case Xp:case Zp:case tg:case eg:case Yp:return e;default:return t}}case db:return t}}}function r2(e){return Er(e)===Qp}Pt.AsyncMode=fb;Pt.ConcurrentMode=Qp;Pt.ContextConsumer=Xp;Pt.ContextProvider=Yp;Pt.Element=cb;Pt.ForwardRef=Zp;Pt.Fragment=Gp;Pt.Lazy=tg;Pt.Memo=eg;Pt.Portal=db;Pt.Profiler=qp;Pt.StrictMode=Kp;Pt.Suspense=Jp;Pt.isAsyncMode=function(e){return r2(e)||Er(e)===fb};Pt.isConcurrentMode=r2;Pt.isContextConsumer=function(e){return Er(e)===Xp};Pt.isContextProvider=function(e){return Er(e)===Yp};Pt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===cb};Pt.isForwardRef=function(e){return Er(e)===Zp};Pt.isFragment=function(e){return Er(e)===Gp};Pt.isLazy=function(e){return Er(e)===tg};Pt.isMemo=function(e){return Er(e)===eg};Pt.isPortal=function(e){return Er(e)===db};Pt.isProfiler=function(e){return Er(e)===qp};Pt.isStrictMode=function(e){return Er(e)===Kp};Pt.isSuspense=function(e){return Er(e)===Jp};Pt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Gp||e===Qp||e===qp||e===Kp||e===Jp||e===XO||typeof e=="object"&&e!==null&&(e.$$typeof===tg||e.$$typeof===eg||e.$$typeof===Yp||e.$$typeof===Xp||e.$$typeof===Zp||e.$$typeof===ZO||e.$$typeof===JO||e.$$typeof===e8||e.$$typeof===QO)};Pt.typeOf=Er;n2.exports=Pt;var t8=n2.exports,i2=t8,n8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o2={};o2[i2.ForwardRef]=n8;o2[i2.Memo]=r8;var i8=!0;function a2(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var hb=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||i8===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},pb=function(t,n,r){hb(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function o8(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var a8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},s8=/[A-Z]|^ms/g,l8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s2=function(t){return t.charCodeAt(1)===45},Q1=function(t){return t!=null&&typeof t!="boolean"},pm=e2(function(e){return s2(e)?e:e.replace(s8,"-$&").toLowerCase()}),Z1=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(l8,function(r,i,o){return Oi={name:i,styles:o,next:Oi},i})}return a8[t]!==1&&!s2(t)&&typeof n=="number"&&n!==0?n+"px":n};function qc(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Oi={name:n.name,styles:n.styles,next:Oi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Oi={name:r.name,styles:r.styles,next:Oi},r=r.next;var i=n.styles+";";return i}return u8(e,t,n)}case"function":{if(e!==void 0){var o=Oi,l=n(e);return Oi=o,qc(e,t,l)}break}}if(t==null)return n;var d=t[n];return d!==void 0?d:n}function u8(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=qc(e,t,n[i])+";";else for(var o in n){var l=n[o];if(typeof l!="object")t!=null&&t[l]!==void 0?r+=o+"{"+t[l]+"}":Q1(l)&&(r+=pm(o)+":"+Z1(o,l)+";");else if(Array.isArray(l)&&typeof l[0]=="string"&&(t==null||t[l[0]]===void 0))for(var d=0;d<l.length;d++)Q1(l[d])&&(r+=pm(o)+":"+Z1(o,l[d])+";");else{var a=qc(e,t,l);switch(o){case"animation":case"animationName":{r+=pm(o)+":"+a+";";break}default:r+=o+"{"+a+"}"}}}return r}var J1=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Oi,ng=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Oi=void 0;var l=t[0];l==null||l.raw===void 0?(i=!1,o+=qc(r,n,l)):o+=l[0];for(var d=1;d<t.length;d++)o+=qc(r,n,t[d]),i&&(o+=l[d]);J1.lastIndex=0;for(var a="",c;(c=J1.exec(o))!==null;)a+="-"+c[1];var s=o8(o)+a;return{name:s,styles:o,next:Oi}},c8=function(t){return t()},l2=$w["useInsertionEffect"]?$w["useInsertionEffect"]:!1,u2=l2||c8,eS=l2||N.useLayoutEffect,gb={}.hasOwnProperty,c2=N.createContext(typeof HTMLElement<"u"?YO({key:"css"}):null);c2.Provider;var mb=function(t){return N.forwardRef(function(n,r){var i=N.useContext(c2);return t(n,i,r)})},iu=N.createContext({}),d8=function(t,n){if(typeof n=="function"){var r=n(t);return r}return Ie({},t,n)},f8=Y1(function(e){return Y1(function(t){return d8(e,t)})}),h8=function(t){var n=N.useContext(iu);return t.theme!==n&&(n=f8(n)(t.theme)),N.createElement(iu.Provider,{value:n},t.children)},cy="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p8=function(t,n){var r={};for(var i in n)gb.call(n,i)&&(r[i]=n[i]);return r[cy]=t,r},g8=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return hb(n,r,i),u2(function(){return pb(n,r,i)}),null},m8=mb(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[cy],o=[r],l="";typeof e.className=="string"?l=a2(t.registered,o,e.className):e.className!=null&&(l=e.className+" ");var d=ng(o,void 0,N.useContext(iu));l+=t.key+"-"+d.name;var a={};for(var c in e)gb.call(e,c)&&c!=="css"&&c!==cy&&(a[c]=e[c]);return a.ref=n,a.className=l,N.createElement(N.Fragment,null,N.createElement(g8,{cache:t,serialized:d,isStringTag:typeof i=="string"}),N.createElement(i,a))}),v8=m8,Ke=function(t,n){var r=arguments;if(n==null||!gb.call(n,"css"))return N.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=v8,o[1]=p8(t,n);for(var l=2;l<i;l++)o[l]=r[l];return N.createElement.apply(null,o)},rg=mb(function(e,t){var n=e.styles,r=ng([n],void 0,N.useContext(iu)),i=N.useRef();return eS(function(){var o=t.key+"-global",l=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),d=!1,a=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(l.before=t.sheet.tags[0]),a!==null&&(d=!0,a.setAttribute("data-emotion",o),l.hydrate([a])),i.current=[l,d],function(){l.flush()}},[t]),eS(function(){var o=i.current,l=o[0],d=o[1];if(d){o[1]=!1;return}if(r.next!==void 0&&pb(t,r.next,!0),l.tags.length){var a=l.tags[l.tags.length-1].nextElementSibling;l.before=a,l.flush()}t.insert("",r,l,!1)},[t,r.name]),null});function vb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ng(t)}var hd=function(){var t=vb.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},d2=String.raw,f2=d2`
:root,
:host {
--chakra-vh: 100vh;
}
@supports (height: -webkit-fill-available) {
:root,
:host {
--chakra-vh: -webkit-fill-available;
}
}
@supports (height: -moz-fill-available) {
:root,
:host {
--chakra-vh: -moz-fill-available;
}
}
@supports (height: 100dvh) {
:root,
:host {
--chakra-vh: 100dvh;
}
}
`,y8=()=>W.jsx(rg,{styles:f2}),b8=({scope:e=""})=>W.jsx(rg,{styles:d2`
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
font-family: system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
touch-action: manipulation;
}
body {
position: relative;
min-height: 100%;
margin: 0;
font-feature-settings: "kern";
}
${e} :where(*, *::before, *::after) {
border-width: 0;
border-style: solid;
box-sizing: border-box;
word-wrap: break-word;
}
main {
display: block;
}
${e} hr {
border-top-width: 1px;
box-sizing: content-box;
height: 0;
overflow: visible;
}
${e} :where(pre, code, kbd,samp) {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 1em;
}
${e} a {
background-color: transparent;
color: inherit;
text-decoration: inherit;
}
${e} abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
${e} :where(b, strong) {
font-weight: bold;
}
${e} small {
font-size: 80%;
}
${e} :where(sub,sup) {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
${e} sub {
bottom: -0.25em;
}
${e} sup {
top: -0.5em;
}
${e} img {
border-style: none;
}
${e} :where(button, input, optgroup, select, textarea) {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
${e} :where(button, input) {
overflow: visible;
}
${e} :where(button, select) {
text-transform: none;
}
${e} :where(
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner
) {
border-style: none;
padding: 0;
}
${e} fieldset {
padding: 0.35em 0.75em 0.625em;
}
${e} legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
${e} progress {
vertical-align: baseline;
}
${e} textarea {
overflow: auto;
}
${e} :where([type="checkbox"], [type="radio"]) {
box-sizing: border-box;
padding: 0;
}
${e} input[type="number"]::-webkit-inner-spin-button,
${e} input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
${e} input[type="number"] {
-moz-appearance: textfield;
}
${e} input[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
${e} input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none !important;
}
${e} ::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
${e} details {
display: block;
}
${e} summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
${e} :where(
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre
) {
margin: 0;
}
${e} button {
background: transparent;
padding: 0;
}
${e} fieldset {
margin: 0;
padding: 0;
}
${e} :where(ol, ul) {
margin: 0;
padding: 0;
}
${e} textarea {
resize: vertical;
}
${e} :where(button, [role="button"]) {
cursor: pointer;
}
${e} button::-moz-focus-inner {
border: 0 !important;
}
${e} table {
border-collapse: collapse;
}
${e} :where(h1, h2, h3, h4, h5, h6) {
font-size: inherit;
font-weight: inherit;
}
${e} :where(button, input, optgroup, select, textarea) {
padding: 0;
line-height: inherit;
color: inherit;
}
${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
display: block;
}
${e} :where(img, video) {
max-width: 100%;
height: auto;
}
[data-js-focus-visible]
:focus:not([data-focus-visible-added]):not(
[data-focus-visible-disabled]
) {
outline: none;
box-shadow: none;
}
${e} select::-ms-expand {
display: none;
}
${f2}
`});function w8(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o,defaultValue:l}=e,d=N.createContext(l);d.displayName=t;function a(){var c;const s=N.useContext(d);if(!s&&n){const u=new Error(o??w8(r,i));throw u.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,u,a),u}return s}return[d.Provider,a,d]}var[S8,x8]=xn({strict:!1,name:"PortalManagerContext"});function h2(e){const{children:t,zIndex:n}=e;return W.jsx(S8,{value:{zIndex:n},children:t})}h2.displayName="PortalManager";var va=globalThis!=null&&globalThis.document?N.useLayoutEffect:N.useEffect,[p2,_8]=xn({strict:!1,name:"PortalContext"}),yb="chakra-portal",C8=".chakra-portal",k8=e=>W.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),E8=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=N.useState(null),o=N.useRef(null),[,l]=N.useState({});N.useEffect(()=>l({}),[]);const d=_8(),a=x8();va(()=>{if(!r)return;const s=r.ownerDocument,u=t?d??s.body:s.body;if(!u)return;o.current=s.createElement("div"),o.current.className=yb,u.appendChild(o.current),l({});const f=o.current;return()=>{u.contains(f)&&u.removeChild(f)}},[r]);const c=a!=null&&a.zIndex?W.jsx(k8,{zIndex:a==null?void 0:a.zIndex,children:n}):n;return o.current?dd.createPortal(W.jsx(p2,{value:o.current,children:c}),o.current):W.jsx("span",{ref:s=>{s&&i(s)}})},$8=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),l=N.useMemo(()=>{const a=i==null?void 0:i.ownerDocument.createElement("div");return a&&(a.className=yb),a},[i]),[,d]=N.useState({});return va(()=>d({}),[]),va(()=>{if(!(!l||!o))return o.appendChild(l),()=>{o.removeChild(l)}},[l,o]),o&&l?dd.createPortal(W.jsx(p2,{value:r?l:null,children:t}),l):null};function pd(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?W.jsx($8,{containerRef:n,...r}):W.jsx(E8,{...r})}pd.className=yb;pd.selector=C8;pd.displayName="Portal";function T8(){const e=N.useContext(iu);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var bb=N.createContext({});bb.displayName="ColorModeContext";function wb(){const e=N.useContext(bb);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Zd={light:"chakra-ui-light",dark:"chakra-ui-dark"};function A8(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?Zd.dark:Zd.light),document.body.classList.remove(r?Zd.light:Zd.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=l=>{r(l.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var M8="chakra-ui-color-mode";function L8(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var R8=L8(M8),tS=()=>{};function nS(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function g2(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:l=R8}=e,d=i==="dark"?"dark":"light",[a,c]=N.useState(()=>nS(l,d)),[s,u]=N.useState(()=>nS(l)),{getSystemTheme:f,setClassName:h,setDataset:p,addListener:g}=N.useMemo(()=>A8({preventTransition:o}),[o]),w=i==="system"&&!a?s:a,x=N.useCallback(v=>{const b=v==="system"?f():v;c(b),h(b==="dark"),p(b),l.set(b)},[l,f,h,p]);va(()=>{i==="system"&&u(f())},[]),N.useEffect(()=>{const v=l.get();if(v){x(v);return}if(i==="system"){x("system");return}x(d)},[l,d,i,x]);const S=N.useCallback(()=>{x(w==="dark"?"light":"dark")},[w,x]);N.useEffect(()=>{if(r)return g(x)},[r,g,x]);const T=N.useMemo(()=>({colorMode:t??w,toggleColorMode:t?tS:S,setColorMode:t?tS:x,forced:t!==void 0}),[w,S,x,t]);return W.jsx(bb.Provider,{value:T,children:n})}g2.displayName="ColorModeProvider";function P8(){const e=wb(),t=T8();return{...e,theme:t}}var _t=(...e)=>e.filter(Boolean).join(" ");function cr(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function la(e,...t){return I8(e)?e(...t):e}var I8=e=>typeof e=="function",gt=e=>e?"":void 0,bo=e=>e?!0:void 0;function lt(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function m2(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var Fh={exports:{}};Fh.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,l=9007199254740991,d="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",s="[object Boolean]",u="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",w="[object Number]",x="[object Null]",S="[object Object]",T="[object Proxy]",v="[object RegExp]",b="[object Set]",y="[object String]",m="[object Undefined]",E="[object WeakMap]",M="[object ArrayBuffer]",C="[object DataView]",k="[object Float32Array]",O="[object Float64Array]",R="[object Int8Array]",A="[object Int16Array]",I="[object Int32Array]",P="[object Uint8Array]",z="[object Uint8ClampedArray]",B="[object Uint16Array]",V="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,Y={};Y[k]=Y[O]=Y[R]=Y[A]=Y[I]=Y[P]=Y[z]=Y[B]=Y[V]=!0,Y[d]=Y[a]=Y[M]=Y[s]=Y[C]=Y[u]=Y[f]=Y[h]=Y[g]=Y[w]=Y[S]=Y[v]=Y[b]=Y[y]=Y[E]=!1;var Z=typeof Be=="object"&&Be&&Be.Object===Object&&Be,te=typeof self=="object"&&self&&self.Object===Object&&self,ie=Z||te||Function("return this")(),ce=t&&!t.nodeType&&t,he=ce&&!0&&e&&!e.nodeType&&e,ve=he&&he.exports===ce,Ce=ve&&Z.process,_e=function(){try{var U=he&&he.require&&he.require("util").types;return U||Ce&&Ce.binding&&Ce.binding("util")}catch{}}(),Re=_e&&_e.isTypedArray;function ot(U,J,ue){switch(ue.length){case 0:return U.call(J);case 1:return U.call(J,ue[0]);case 2:return U.call(J,ue[0],ue[1]);case 3:return U.call(J,ue[0],ue[1],ue[2])}return U.apply(J,ue)}function Te(U,J){for(var ue=-1,Se=Array(U);++ue<U;)Se[ue]=J(ue);return Se}function it(U){return function(J){return U(J)}}function vt(U,J){return U==null?void 0:U[J]}function Qt(U,J){return function(ue){return U(J(ue))}}var Ut=Array.prototype,Tr=Function.prototype,Ln=Object.prototype,Qn=ie["__core-js_shared__"],Ht=Tr.toString,me=Ln.hasOwnProperty,Ae=function(){var U=/[^.]+$/.exec(Qn&&Qn.keys&&Qn.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),we=Ln.toString,He=Ht.call(Object),ct=RegExp("^"+Ht.call(me).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=ve?ie.Buffer:void 0,Fe=ie.Symbol,Ne=ie.Uint8Array,Ye=xe?xe.allocUnsafe:void 0,et=Qt(Object.getPrototypeOf,Object),kt=Object.create,on=Ln.propertyIsEnumerable,Rn=Ut.splice,Ar=Fe?Fe.toStringTag:void 0,Mr=function(){try{var U=No(Object,"defineProperty");return U({},"",{}),U}catch{}}(),Rs=xe?xe.isBuffer:void 0,hr=Math.max,Ps=Date.now,Qr=No(ie,"Map"),pr=No(Object,"create"),Po=function(){function U(){}return function(J){if(!Ir(J))return{};if(kt)return kt(J);U.prototype=J;var ue=new U;return U.prototype=void 0,ue}}();function Pn(U){var J=-1,ue=U==null?0:U.length;for(this.clear();++J<ue;){var Se=U[J];this.set(Se[0],Se[1])}}function mn(){this.__data__=pr?pr(null):{},this.size=0}function an(U){var J=this.has(U)&&delete this.__data__[U];return this.size-=J?1:0,J}function qi(U){var J=this.__data__;if(pr){var ue=J[U];return ue===r?void 0:ue}return me.call(J,U)?J[U]:void 0}function Yi(U){var J=this.__data__;return pr?J[U]!==void 0:me.call(J,U)}function Is(U,J){var ue=this.__data__;return this.size+=this.has(U)?0:1,ue[U]=pr&&J===void 0?r:J,this}Pn.prototype.clear=mn,Pn.prototype.delete=an,Pn.prototype.get=qi,Pn.prototype.has=Yi,Pn.prototype.set=Is;function Zn(U){var J=-1,ue=U==null?0:U.length;for(this.clear();++J<ue;){var Se=U[J];this.set(Se[0],Se[1])}}function yi(){this.__data__=[],this.size=0}function bi(U){var J=this.__data__,ue=Zi(J,U);if(ue<0)return!1;var Se=J.length-1;return ue==Se?J.pop():Rn.call(J,ue,1),--this.size,!0}function Aa(U){var J=this.__data__,ue=Zi(J,U);return ue<0?void 0:J[ue][1]}function Xi(U){return Zi(this.__data__,U)>-1}function Ma(U,J){var ue=this.__data__,Se=Zi(ue,U);return Se<0?(++this.size,ue.push([U,J])):ue[Se][1]=J,this}Zn.prototype.clear=yi,Zn.prototype.delete=bi,Zn.prototype.get=Aa,Zn.prototype.has=Xi,Zn.prototype.set=Ma;function In(U){var J=-1,ue=U==null?0:U.length;for(this.clear();++J<ue;){var Se=U[J];this.set(Se[0],Se[1])}}function yu(){this.size=0,this.__data__={hash:new Pn,map:new(Qr||Zn),string:new Pn}}function Os(U){var J=Zr(this,U).delete(U);return this.size-=J?1:0,J}function bu(U){return Zr(this,U).get(U)}function wu(U){return Zr(this,U).has(U)}function Fs(U,J){var ue=Zr(this,U),Se=ue.size;return ue.set(U,J),this.size+=ue.size==Se?0:1,this}In.prototype.clear=yu,In.prototype.delete=Os,In.prototype.get=bu,In.prototype.has=wu,In.prototype.set=Fs;function vn(U){var J=this.__data__=new Zn(U);this.size=J.size}function wi(){this.__data__=new Zn,this.size=0}function Ds(U){var J=this.__data__,ue=J.delete(U);return this.size=J.size,ue}function La(U){return this.__data__.get(U)}function Ra(U){return this.__data__.has(U)}function Io(U,J){var ue=this.__data__;if(ue instanceof Zn){var Se=ue.__data__;if(!Qr||Se.length<n-1)return Se.push([U,J]),this.size=++ue.size,this;ue=this.__data__=new In(Se)}return ue.set(U,J),this.size=ue.size,this}vn.prototype.clear=wi,vn.prototype.delete=Ds,vn.prototype.get=La,vn.prototype.has=Ra,vn.prototype.set=Io;function Lr(U,J){var ue=Bo(U),Se=!ue&&er(U),ze=!ue&&!Se&&Ks(U),Xe=!ue&&!Se&&!ze&&_i(U),Qe=ue||Se||ze||Xe,Oe=Qe?Te(U.length,String):[],at=Oe.length;for(var Ot in U)(J||me.call(U,Ot))&&!(Qe&&(Ot=="length"||ze&&(Ot=="offset"||Ot=="parent")||Xe&&(Ot=="buffer"||Ot=="byteLength"||Ot=="byteOffset")||On(Ot,at)))&&Oe.push(Ot);return Oe}function Pa(U,J,ue){(ue!==void 0&&!to(U[J],ue)||ue===void 0&&!(J in U))&&Oo(U,J,ue)}function Qi(U,J,ue){var Se=U[J];(!(me.call(U,J)&&to(Se,ue))||ue===void 0&&!(J in U))&&Oo(U,J,ue)}function Zi(U,J){for(var ue=U.length;ue--;)if(to(U[ue][0],J))return ue;return-1}function Oo(U,J,ue){J=="__proto__"&&Mr?Mr(U,J,{configurable:!0,enumerable:!0,value:ue,writable:!0}):U[J]=ue}var Ns=Vs();function Rr(U){return U==null?U===void 0?m:x:Ar&&Ar in Object(U)?xu(U):ti(U)}function zs(U){return xi(U)&&Rr(U)==d}function Ia(U){if(!Ir(U)||zo(U))return!1;var J=ni(U)?ct:q;return J.test(Na(U))}function Pr(U){return xi(U)&&qs(U.length)&&!!Y[Rr(U)]}function Su(U){if(!Ir(U))return ei(U);var J=Jr(U),ue=[];for(var Se in U)Se=="constructor"&&(J||!me.call(U,Se))||ue.push(Se);return ue}function Oa(U,J,ue,Se,ze){U!==J&&Ns(J,function(Xe,Qe){if(ze||(ze=new vn),Ir(Xe))Bs(U,J,Qe,ue,Oa,Se,ze);else{var Oe=Se?Se(Da(U,Qe),Xe,Qe+"",U,J,ze):void 0;Oe===void 0&&(Oe=Xe),Pa(U,Qe,Oe)}},Qs)}function Bs(U,J,ue,Se,ze,Xe,Qe){var Oe=Da(U,ue),at=Da(J,ue),Ot=Qe.get(at);if(Ot){Pa(U,ue,Ot);return}var St=Xe?Xe(Oe,at,ue+"",U,J,Qe):void 0,sn=St===void 0;if(sn){var _=Bo(at),L=!_&&Ks(at),F=!_&&!L&&_i(at);St=at,_||L||F?Bo(Oe)?St=Oe:Ho(Oe)?St=Ji(Oe):L?(sn=!1,St=yn(at,!0)):F?(sn=!1,St=Fo(at,!0)):St=[]:Ys(at)||er(at)?(St=Oe,er(Oe)?St=Xs(Oe):(!Ir(Oe)||ni(Oe))&&(St=Ws(at))):sn=!1}sn&&(Qe.set(at,St),ze(St,at,Se,Xe,Qe),Qe.delete(at)),Pa(U,ue,St)}function Fa(U,J){return eo(Jn(U,J,Q),U+"")}var js=Mr?function(U,J){return Mr(U,"toString",{configurable:!0,enumerable:!1,value:za(J),writable:!0})}:Q;function yn(U,J){if(J)return U.slice();var ue=U.length,Se=Ye?Ye(ue):new U.constructor(ue);return U.copy(Se),Se}function gr(U){var J=new U.constructor(U.byteLength);return new Ne(J).set(new Ne(U)),J}function Fo(U,J){var ue=J?gr(U.buffer):U.buffer;return new U.constructor(ue,U.byteOffset,U.length)}function Ji(U,J){var ue=-1,Se=U.length;for(J||(J=Array(Se));++ue<Se;)J[ue]=U[ue];return J}function Hs(U,J,ue,Se){var ze=!ue;ue||(ue={});for(var Xe=-1,Qe=J.length;++Xe<Qe;){var Oe=J[Xe],at=Se?Se(ue[Oe],U[Oe],Oe,ue,U):void 0;at===void 0&&(at=U[Oe]),ze?Oo(ue,Oe,at):Qi(ue,Oe,at)}return ue}function Do(U){return Fa(function(J,ue){var Se=-1,ze=ue.length,Xe=ze>1?ue[ze-1]:void 0,Qe=ze>2?ue[2]:void 0;for(Xe=U.length>3&&typeof Xe=="function"?(ze--,Xe):void 0,Qe&&Us(ue[0],ue[1],Qe)&&(Xe=ze<3?void 0:Xe,ze=1),J=Object(J);++Se<ze;){var Oe=ue[Se];Oe&&U(J,Oe,Se,Xe)}return J})}function Vs(U){return function(J,ue,Se){for(var ze=-1,Xe=Object(J),Qe=Se(J),Oe=Qe.length;Oe--;){var at=Qe[U?Oe:++ze];if(ue(Xe[at],at,Xe)===!1)break}return J}}function Zr(U,J){var ue=U.__data__;return Si(J)?ue[typeof J=="string"?"string":"hash"]:ue.map}function No(U,J){var ue=vt(U,J);return Ia(ue)?ue:void 0}function xu(U){var J=me.call(U,Ar),ue=U[Ar];try{U[Ar]=void 0;var Se=!0}catch{}var ze=we.call(U);return Se&&(J?U[Ar]=ue:delete U[Ar]),ze}function Ws(U){return typeof U.constructor=="function"&&!Jr(U)?Po(et(U)):{}}function On(U,J){var ue=typeof U;return J=J??l,!!J&&(ue=="number"||ue!="symbol"&&re.test(U))&&U>-1&&U%1==0&&U<J}function Us(U,J,ue){if(!Ir(ue))return!1;var Se=typeof J;return(Se=="number"?jo(ue)&&On(J,ue.length):Se=="string"&&J in ue)?to(ue[J],U):!1}function Si(U){var J=typeof U;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?U!=="__proto__":U===null}function zo(U){return!!Ae&&Ae in U}function Jr(U){var J=U&&U.constructor,ue=typeof J=="function"&&J.prototype||Ln;return U===ue}function ei(U){var J=[];if(U!=null)for(var ue in Object(U))J.push(ue);return J}function ti(U){return we.call(U)}function Jn(U,J,ue){return J=hr(J===void 0?U.length-1:J,0),function(){for(var Se=arguments,ze=-1,Xe=hr(Se.length-J,0),Qe=Array(Xe);++ze<Xe;)Qe[ze]=Se[J+ze];ze=-1;for(var Oe=Array(J+1);++ze<J;)Oe[ze]=Se[ze];return Oe[J]=ue(Qe),ot(U,this,Oe)}}function Da(U,J){if(!(J==="constructor"&&typeof U[J]=="function")&&J!="__proto__")return U[J]}var eo=Gs(js);function Gs(U){var J=0,ue=0;return function(){var Se=Ps(),ze=o-(Se-ue);if(ue=Se,ze>0){if(++J>=i)return arguments[0]}else J=0;return U.apply(void 0,arguments)}}function Na(U){if(U!=null){try{return Ht.call(U)}catch{}try{return U+""}catch{}}return""}function to(U,J){return U===J||U!==U&&J!==J}var er=zs(function(){return arguments}())?zs:function(U){return xi(U)&&me.call(U,"callee")&&!on.call(U,"callee")},Bo=Array.isArray;function jo(U){return U!=null&&qs(U.length)&&!ni(U)}function Ho(U){return xi(U)&&jo(U)}var Ks=Rs||se;function ni(U){if(!Ir(U))return!1;var J=Rr(U);return J==h||J==p||J==c||J==T}function qs(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=l}function Ir(U){var J=typeof U;return U!=null&&(J=="object"||J=="function")}function xi(U){return U!=null&&typeof U=="object"}function Ys(U){if(!xi(U)||Rr(U)!=S)return!1;var J=et(U);if(J===null)return!0;var ue=me.call(J,"constructor")&&J.constructor;return typeof ue=="function"&&ue instanceof ue&&Ht.call(ue)==He}var _i=Re?it(Re):Pr;function Xs(U){return Hs(U,Qs(U))}function Qs(U){return jo(U)?Lr(U,!0):Su(U)}var Zs=Do(function(U,J,ue,Se){Oa(U,J,ue,Se)});function za(U){return function(){return U}}function Q(U){return U}function se(){return!1}e.exports=Zs})(Fh,Fh.exports);var O8=Fh.exports;const Gr=ks(O8);var F8=e=>/!(important)?$/.test(e),rS=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,D8=(e,t)=>n=>{const r=String(t),i=F8(r),o=rS(r),l=e?`${e}.${o}`:o;let d=cr(n.__cssMap)&&l in n.__cssMap?n.__cssMap[l].varRef:t;return d=rS(d),i?`${d} !important`:d};function Sb(e){const{scale:t,transform:n,compose:r}=e;return(o,l)=>{var d;const a=D8(t,o)(l);let c=(d=n==null?void 0:n(a,l))!=null?d:a;return r&&(c=r(c,l)),c}}var Jd=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Dr(e,t){return n=>{const r={property:n,scale:e};return r.transform=Sb({scale:e,transform:t}),r}}var N8=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function z8(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:N8(t),transform:n?Sb({scale:n,compose:r}):r}}var v2=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function B8(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...v2].join(" ")}function j8(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...v2].join(" ")}var H8={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},V8={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function W8(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var U8={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},dy={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},G8=new Set(Object.values(dy)),fy=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),K8=e=>e.trim();function q8(e,t){if(e==null||fy.has(e))return e;if(!(hy(e)||fy.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],l=i==null?void 0:i[2];if(!o||!l)return e;const d=o.includes("-gradient")?o:`${o}-gradient`,[a,...c]=l.split(",").map(K8).filter(Boolean);if((c==null?void 0:c.length)===0)return e;const s=a in dy?dy[a]:a;c.unshift(s);const u=c.map(f=>{if(G8.has(f))return f;const h=f.indexOf(" "),[p,g]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],w=hy(g)?g:g&&g.split(" "),x=`colors.${p}`,S=x in t.__cssMap?t.__cssMap[x].varRef:p;return w?[S,...Array.isArray(w)?w:[w]].join(" "):S});return`${d}(${u.join(", ")})`}var hy=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),Y8=(e,t)=>q8(e,t??{});function X8(e){return/^var\(--.+\)$/.test(e)}var Q8=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Mi=e=>t=>`${e}(${t})`,xt={filter(e){return e!=="auto"?e:H8},backdropFilter(e){return e!=="auto"?e:V8},ring(e){return W8(xt.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?B8():e==="auto-gpu"?j8():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=Q8(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(X8(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:Y8,blur:Mi("blur"),opacity:Mi("opacity"),brightness:Mi("brightness"),contrast:Mi("contrast"),dropShadow:Mi("drop-shadow"),grayscale:Mi("grayscale"),hueRotate:Mi("hue-rotate"),invert:Mi("invert"),saturate:Mi("saturate"),sepia:Mi("sepia"),bgImage(e){return e==null||hy(e)||fy.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=U8[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},ae={borderWidths:Dr("borderWidths"),borderStyles:Dr("borderStyles"),colors:Dr("colors"),borders:Dr("borders"),gradients:Dr("gradients",xt.gradient),radii:Dr("radii",xt.px),space:Dr("space",Jd(xt.vh,xt.px)),spaceT:Dr("space",Jd(xt.vh,xt.px)),degreeT(e){return{property:e,transform:xt.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Sb({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Dr("sizes",Jd(xt.vh,xt.px)),sizesT:Dr("sizes",Jd(xt.vh,xt.fraction)),shadows:Dr("shadows"),logical:z8,blur:Dr("blur",xt.blur)},Pf={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:xt.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.gradients("backgroundImage"),bgClip:{transform:xt.bgClip}};Object.assign(Pf,{bgImage:Pf.backgroundImage,bgImg:Pf.backgroundImage});var Et={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Et,{rounded:Et.borderRadius,roundedTop:Et.borderTopRadius,roundedTopLeft:Et.borderTopLeftRadius,roundedTopRight:Et.borderTopRightRadius,roundedTopStart:Et.borderStartStartRadius,roundedTopEnd:Et.borderStartEndRadius,roundedBottom:Et.borderBottomRadius,roundedBottomLeft:Et.borderBottomLeftRadius,roundedBottomRight:Et.borderBottomRightRadius,roundedBottomStart:Et.borderEndStartRadius,roundedBottomEnd:Et.borderEndEndRadius,roundedLeft:Et.borderLeftRadius,roundedRight:Et.borderRightRadius,roundedStart:Et.borderInlineStartRadius,roundedEnd:Et.borderInlineEndRadius,borderStart:Et.borderInlineStart,borderEnd:Et.borderInlineEnd,borderTopStartRadius:Et.borderStartStartRadius,borderTopEndRadius:Et.borderStartEndRadius,borderBottomStartRadius:Et.borderEndStartRadius,borderBottomEndRadius:Et.borderEndEndRadius,borderStartRadius:Et.borderInlineStartRadius,borderEndRadius:Et.borderInlineEndRadius,borderStartWidth:Et.borderInlineStartWidth,borderEndWidth:Et.borderInlineEndWidth,borderStartColor:Et.borderInlineStartColor,borderEndColor:Et.borderInlineEndColor,borderStartStyle:Et.borderInlineStartStyle,borderEndStyle:Et.borderInlineEndStyle});var Z8={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},py={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(py,{shadow:py.boxShadow});var J8={filter:{transform:xt.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",xt.brightness),contrast:ae.propT("--chakra-contrast",xt.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",xt.invert),saturate:ae.propT("--chakra-saturate",xt.saturate),dropShadow:ae.propT("--chakra-drop-shadow",xt.dropShadow),backdropFilter:{transform:xt.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",xt.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",xt.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",xt.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",xt.saturate)},Dh={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:xt.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(Dh,{flexDir:Dh.flexDirection});var y2={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},eF={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:xt.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Br={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",xt.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Br,{w:Br.width,h:Br.height,minW:Br.minWidth,maxW:Br.maxWidth,minH:Br.minHeight,maxH:Br.maxHeight,overscroll:Br.overscrollBehavior,overscrollX:Br.overscrollBehaviorX,overscrollY:Br.overscrollBehaviorY});var tF={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function nF(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var rF=e=>{const t=new WeakMap;return(r,i,o,l)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const d=t.get(r);if(d.has(i))return d.get(i);const a=e(r,i,o,l);return d.set(i,a),a}},iF=rF(nF),oF={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},aF={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gm=(e,t,n)=>{const r={},i=iF(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},sF={srOnly:{transform(e){return e===!0?oF:e==="focusable"?aF:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gm(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gm(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gm(t,e,n)}},hc={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(hc,{insetStart:hc.insetInlineStart,insetEnd:hc.insetInlineEnd});var lF={ring:{transform:xt.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},zt={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(zt,{m:zt.margin,mt:zt.marginTop,mr:zt.marginRight,me:zt.marginInlineEnd,marginEnd:zt.marginInlineEnd,mb:zt.marginBottom,ml:zt.marginLeft,ms:zt.marginInlineStart,marginStart:zt.marginInlineStart,mx:zt.marginX,my:zt.marginY,p:zt.padding,pt:zt.paddingTop,py:zt.paddingY,px:zt.paddingX,pb:zt.paddingBottom,pl:zt.paddingLeft,ps:zt.paddingInlineStart,paddingStart:zt.paddingInlineStart,pr:zt.paddingRight,pe:zt.paddingInlineEnd,paddingEnd:zt.paddingInlineEnd});var uF={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},cF={clipPath:!0,transform:ae.propT("transform",xt.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},dF={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},fF={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",xt.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},hF={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function b2(e){return cr(e)&&e.reference?e.reference:String(e)}var ig=(e,...t)=>t.map(b2).join(` ${e} `).replace(/calc/g,""),iS=(...e)=>`calc(${ig("+",...e)})`,oS=(...e)=>`calc(${ig("-",...e)})`,gy=(...e)=>`calc(${ig("*",...e)})`,aS=(...e)=>`calc(${ig("/",...e)})`,sS=e=>{const t=b2(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:gy(t,-1)},Ja=Object.assign(e=>({add:(...t)=>Ja(iS(e,...t)),subtract:(...t)=>Ja(oS(e,...t)),multiply:(...t)=>Ja(gy(e,...t)),divide:(...t)=>Ja(aS(e,...t)),negate:()=>Ja(sS(e)),toString:()=>e.toString()}),{add:iS,subtract:oS,multiply:gy,divide:aS,negate:sS});function pF(e,t="-"){return e.replace(/\s+/g,t)}function gF(e){const t=pF(e.toString());return vF(mF(t))}function mF(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function vF(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function yF(e,t=""){return[t,e].filter(Boolean).join("-")}function bF(e,t){return`var(${e}${t?`, ${t}`:""})`}function wF(e,t=""){return gF(`--${yF(e,t)}`)}function Je(e,t,n){const r=wF(e,n);return{variable:r,reference:bF(r,t)}}function SF(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=Je(`${e}-${i}`,o);continue}n[r]=Je(`${e}-${r}`)}return n}function xF(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function _F(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function my(e){if(e==null)return e;const{unitless:t}=_F(e);return t||typeof e=="number"?`${e}px`:e}var w2=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,xb=e=>Object.fromEntries(Object.entries(e).sort(w2));function lS(e){const t=xb(e);return Object.assign(Object.values(t),t)}function CF(e){const t=Object.keys(xb(e));return new Set(t)}function uS(e){var t;if(!e)return e;e=(t=my(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function qu(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${my(e)})`),t&&n.push("and",`(max-width: ${my(t)})`),n.join(" ")}function kF(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=lS(e),r=Object.entries(e).sort(w2).map(([l,d],a,c)=>{var s;let[,u]=(s=c[a+1])!=null?s:[];return u=parseFloat(u)>0?uS(u):void 0,{_minW:uS(d),breakpoint:l,minW:d,maxW:u,maxWQuery:qu(null,u),minWQuery:qu(d),minMaxQuery:qu(d,u)}}),i=CF(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(l){const d=Object.keys(l);return d.length>0&&d.every(a=>i.has(a))},asObject:xb(e),asArray:lS(e),details:r,get(l){return r.find(d=>d.breakpoint===l)},media:[null,...n.map(l=>qu(l)).slice(1)],toArrayValue(l){if(!cr(l))throw new Error("toArrayValue: value must be an object");const d=o.map(a=>{var c;return(c=l[a])!=null?c:null});for(;xF(d)===null;)d.pop();return d},toObjectValue(l){if(!Array.isArray(l))throw new Error("toObjectValue: value must be an array");return l.reduce((d,a,c)=>{const s=o[c];return s!=null&&a!=null&&(d[s]=a),d},{})}}}var Cn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Ko=e=>S2(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ao=e=>S2(t=>e(t,"~ &"),"[data-peer]",".peer"),S2=(e,...t)=>t.map(e).join(", "),og={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ko(Cn.hover),_peerHover:ao(Cn.hover),_groupFocus:Ko(Cn.focus),_peerFocus:ao(Cn.focus),_groupFocusVisible:Ko(Cn.focusVisible),_peerFocusVisible:ao(Cn.focusVisible),_groupActive:Ko(Cn.active),_peerActive:ao(Cn.active),_groupDisabled:Ko(Cn.disabled),_peerDisabled:ao(Cn.disabled),_groupInvalid:Ko(Cn.invalid),_peerInvalid:ao(Cn.invalid),_groupChecked:Ko(Cn.checked),_peerChecked:ao(Cn.checked),_groupFocusWithin:Ko(Cn.focusWithin),_peerFocusWithin:ao(Cn.focusWithin),_peerPlaceholderShown:ao(Cn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},x2=Object.keys(og);function cS(e,t){return Je(String(e).replace(/\./g,"-"),void 0,t)}function EF(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:l,value:d}=o,{variable:a,reference:c}=cS(i,t==null?void 0:t.cssVarPrefix);if(!l){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,g=`${h}.-${p.join(".")}`,w=Ja.negate(d),x=Ja.negate(c);r[g]={value:w,var:a,varRef:x}}n[a]=d,r[i]={value:d,var:a,varRef:c};continue}const s=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:w}=cS(p,t==null?void 0:t.cssVarPrefix);return w},u=cr(d)?d:{default:d};n=Gr(n,Object.entries(u).reduce((f,[h,p])=>{var g,w;if(!p)return f;const x=s(`${p}`);if(h==="default")return f[a]=x,f;const S=(w=(g=og)==null?void 0:g[h])!=null?w:h;return f[S]={[a]:x},f},{})),r[i]={value:c,var:a,varRef:c}}return{cssVars:n,cssMap:r}}function $F(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function TF(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function AF(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function dS(e,t,n={}){const{stop:r,getKey:i}=n;function o(l,d=[]){var a;if(AF(l)||Array.isArray(l)){const c={};for(const[s,u]of Object.entries(l)){const f=(a=i==null?void 0:i(s))!=null?a:s,h=[...d,f];if(r!=null&&r(l,h))return t(l,d);c[f]=o(u,h)}return c}return t(l,d)}return o(e)}var MF=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function LF(e){return TF(e,MF)}function RF(e){return e.semanticTokens}function PF(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var IF=e=>x2.includes(e)||e==="default";function OF({tokens:e,semanticTokens:t}){const n={};return dS(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),dS(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(IF)}),n}function FF(e){var t;const n=PF(e),r=LF(n),i=RF(n),o=OF({tokens:r,semanticTokens:i}),l=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:d,cssVars:a}=EF(o,{cssVarPrefix:l});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...a},__cssMap:d,__breakpoints:kF(n.breakpoints)}),n}var _b=Gr({},Pf,Et,Z8,Dh,Br,J8,lF,eF,y2,sF,hc,py,zt,hF,fF,uF,cF,tF,dF),DF=Object.assign({},zt,Br,Dh,y2,hc),NF=Object.keys(DF),zF=[...Object.keys(_b),...x2],BF={..._b,...og},jF=e=>e in BF,HF=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const l in e){let d=la(e[l],t);if(d==null)continue;if(d=cr(d)&&n(d)?r(d):d,!Array.isArray(d)){o[l]=d;continue}const a=d.slice(0,i.length).length;for(let c=0;c<a;c+=1){const s=i==null?void 0:i[c];if(!s){o[l]=d[c];continue}o[s]=o[s]||{},d[c]!=null&&(o[s][l]=d[c])}}return o};function VF(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function WF(e){return/^var\(--.+\)$/.test(e)}var UF=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!WF(t),GF=(e,t)=>{var n,r;if(t==null)return t;const i=a=>{var c,s;return(s=(c=e.__cssMap)==null?void 0:c[a])==null?void 0:s.varRef},o=a=>{var c;return(c=i(a))!=null?c:a},[l,d]=VF(t);return t=(r=(n=i(l))!=null?n:o(d))!=null?r:o(t),t};function KF(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,l=!1)=>{var d,a,c;const s=la(o,r),u=HF(s)(r);let f={};for(let h in u){const p=u[h];let g=la(p,r);h in n&&(h=n[h]),UF(h,g)&&(g=GF(r,g));let w=t[h];if(w===!0&&(w={property:h}),cr(g)){f[h]=(d=f[h])!=null?d:{},f[h]=Gr({},f[h],i(g,!0));continue}let x=(c=(a=w==null?void 0:w.transform)==null?void 0:a.call(w,g,r,s))!=null?c:g;x=w!=null&&w.processResult?i(x,!0):x;const S=la(w==null?void 0:w.property,r);if(!l&&(w!=null&&w.static)){const T=la(w.static,r);f=Gr({},f,T)}if(S&&Array.isArray(S)){for(const T of S)f[T]=x;continue}if(S){S==="&"&&cr(x)?f=Gr({},f,x):f[S]=x;continue}if(cr(x)){f=Gr({},f,x);continue}f[h]=x}return f};return i}var _2=e=>t=>KF({theme:t,pseudos:og,configs:_b})(e);function Ct(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function qF(e,t){if(Array.isArray(e))return e;if(cr(e))return t(e);if(e!=null)return[e]}function YF(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function XF(e){const t=e.__breakpoints;return function(r,i,o,l){var d,a;if(!t)return;const c={},s=qF(o,t.toArrayValue);if(!s)return c;const u=s.length,f=u===1,h=!!r.parts;for(let p=0;p<u;p++){const g=t.details[p],w=t.details[YF(s,p)],x=qu(g.minW,w==null?void 0:w._minW),S=la((d=r[i])==null?void 0:d[s[p]],l);if(S){if(h){(a=r.parts)==null||a.forEach(T=>{Gr(c,{[T]:f?S[T]:{[x]:S[T]}})});continue}if(!h){f?Gr(c,S):c[x]=S;continue}c[x]=S}}return c}}function QF(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,l=XF(o);return Gr({},la((n=e.baseStyle)!=null?n:{},t),l(e,"sizes",i,t),l(e,"variants",r,t))}}function ZF(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function vi(e){return $F(e,["styleConfig","size","variant","colorScheme"])}var JF=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function eD(e){return cr(e)?JF.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var tD={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},nD={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},rD={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},iD={property:tD,easing:nD,duration:rD},oD=iD,aD={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},sD=aD,lD={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},uD=lD,cD={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},dD=cD,fD={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},hD=fD,pD={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},gD=pD,mD={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},vD=mD,yD={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},bD=yD,wD={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},C2=wD,k2={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},SD={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},xD={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},_D={...k2,...SD,container:xD},E2=_D,CD={breakpoints:dD,zIndices:sD,radii:gD,blur:bD,colors:hD,...C2,sizes:E2,shadows:vD,space:k2,borders:uD,transition:oD},{defineMultiStyleConfig:kD,definePartsStyle:Yu}=Ct(["stepper","step","title","description","indicator","separator","icon","number"]),co=Je("stepper-indicator-size"),kl=Je("stepper-icon-size"),El=Je("stepper-title-font-size"),Xu=Je("stepper-description-font-size"),Iu=Je("stepper-accent-color"),ED=Yu(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[Iu.variable]:`colors.${e}.500`,_dark:{[Iu.variable]:`colors.${e}.200`}},title:{fontSize:El.reference,fontWeight:"medium"},description:{fontSize:Xu.reference,color:"chakra-subtle-text"},number:{fontSize:El.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:kl.reference,height:kl.reference},indicator:{flexShrink:0,borderRadius:"full",width:co.reference,height:co.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Iu.reference},"&[data-status=complete]":{bg:Iu.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Iu.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${co.reference} - 8px)`,top:`calc(${co.reference} + 4px)`,insetStart:`calc(${co.reference} / 2 - 1px)`}}})),$D=kD({baseStyle:ED,sizes:{xs:Yu({stepper:{[co.variable]:"sizes.4",[kl.variable]:"sizes.3",[El.variable]:"fontSizes.xs",[Xu.variable]:"fontSizes.xs"}}),sm:Yu({stepper:{[co.variable]:"sizes.6",[kl.variable]:"sizes.4",[El.variable]:"fontSizes.sm",[Xu.variable]:"fontSizes.xs"}}),md:Yu({stepper:{[co.variable]:"sizes.8",[kl.variable]:"sizes.5",[El.variable]:"fontSizes.md",[Xu.variable]:"fontSizes.sm"}}),lg:Yu({stepper:{[co.variable]:"sizes.10",[kl.variable]:"sizes.6",[El.variable]:"fontSizes.lg",[Xu.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function Lt(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...s){r();for(const u of s)t[u]=a(u);return Lt(e,t)}function o(...s){for(const u of s)u in t||(t[u]=a(u));return Lt(e,t)}function l(){return Object.fromEntries(Object.entries(t).map(([u,f])=>[u,f.selector]))}function d(){return Object.fromEntries(Object.entries(t).map(([u,f])=>[u,f.className]))}function a(s){const h=`chakra-${(["container","root"].includes(s??"")?[e]:[e,s]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>s}}return{parts:i,toPart:a,extend:o,selectors:l,classnames:d,get keys(){return Object.keys(t)},__type:{}}}var TD=Lt("accordion").parts("root","container","button","panel").extend("icon"),AD=Lt("alert").parts("title","description","container").extend("icon","spinner"),MD=Lt("avatar").parts("label","badge","container").extend("excessLabel","group"),LD=Lt("breadcrumb").parts("link","item","container").extend("separator");Lt("button").parts();var $2=Lt("checkbox").parts("control","icon","container").extend("label");Lt("progress").parts("track","filledTrack").extend("label");var RD=Lt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),PD=Lt("editable").parts("preview","input","textarea"),ID=Lt("form").parts("container","requiredIndicator","helperText"),OD=Lt("formError").parts("text","icon"),T2=Lt("input").parts("addon","field","element"),FD=Lt("list").parts("container","item","icon"),DD=Lt("menu").parts("button","list","item").extend("groupTitle","command","divider"),A2=Lt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),M2=Lt("numberinput").parts("root","field","stepperGroup","stepper");Lt("pininput").parts("field");var ND=Lt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),zD=Lt("progress").parts("label","filledTrack","track"),L2=Lt("radio").parts("container","control","label"),BD=Lt("select").parts("field","icon"),jD=Lt("slider").parts("container","track","thumb","filledTrack","mark"),HD=Lt("stat").parts("container","label","helpText","number","icon"),VD=Lt("switch").parts("container","track","thumb"),WD=Lt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),R2=Lt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),UD=Lt("tag").parts("container","label","closeButton"),GD=Lt("card").parts("container","header","body","footer");function os(e,t,n){return Math.min(Math.max(e,n),t)}class KD extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Qu=KD;function Cb(e){if(typeof e!="string")throw new Qu(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=t4.test(e)?XD(e):e;const n=QD.exec(t);if(n){const l=Array.from(n).slice(1);return[...l.slice(0,3).map(d=>parseInt(Yc(d,2),16)),parseInt(Yc(l[3]||"f",2),16)/255]}const r=ZD.exec(t);if(r){const l=Array.from(r).slice(1);return[...l.slice(0,3).map(d=>parseInt(d,16)),parseInt(l[3]||"ff",16)/255]}const i=JD.exec(t);if(i){const l=Array.from(i).slice(1);return[...l.slice(0,3).map(d=>parseInt(d,10)),parseFloat(l[3]||"1")]}const o=e4.exec(t);if(o){const[l,d,a,c]=Array.from(o).slice(1).map(parseFloat);if(os(0,100,d)!==d)throw new Qu(e);if(os(0,100,a)!==a)throw new Qu(e);return[...n4(l,d,a),Number.isNaN(c)?1:c]}throw new Qu(e)}function qD(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const fS=e=>parseInt(e.replace(/_/g,""),36),YD="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=fS(t.substring(0,3)),r=fS(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function XD(e){const t=e.toLowerCase().trim(),n=YD[qD(t)];if(!n)throw new Qu(e);return`#${n}`}const Yc=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),QD=new RegExp(`^#${Yc("([a-f0-9])",3)}([a-f0-9])?$`,"i"),ZD=new RegExp(`^#${Yc("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),JD=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Yc(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),e4=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,t4=/^[a-z]+$/i,hS=e=>Math.round(e*255),n4=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(hS);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),l=o*(1-Math.abs(i%2-1));let d=0,a=0,c=0;i>=0&&i<1?(d=o,a=l):i>=1&&i<2?(d=l,a=o):i>=2&&i<3?(a=o,c=l):i>=3&&i<4?(a=l,c=o):i>=4&&i<5?(d=l,c=o):i>=5&&i<6&&(d=o,c=l);const s=r-o/2,u=d+s,f=a+s,h=c+s;return[u,f,h].map(hS)};function r4(e,t,n,r){return`rgba(${os(0,255,e).toFixed()}, ${os(0,255,t).toFixed()}, ${os(0,255,n).toFixed()}, ${parseFloat(os(0,1,r).toFixed(3))})`}function i4(e,t){const[n,r,i,o]=Cb(e);return r4(n,r,i,o-t)}function o4(e){const[t,n,r,i]=Cb(e);let o=l=>{const d=os(0,255,l).toString(16);return d.length===1?`0${d}`:d};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function a4(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var s4=e=>Object.keys(e).length===0,Nh=(e,t,n)=>{const r=a4(e,`colors.${t}`,t);try{return o4(r),r}catch{return n??"#000000"}},fi=(e,t,n)=>{var r;return(r=ZF(e,"colors",t))!=null?r:n},l4=e=>{const[t,n,r]=Cb(e);return(t*299+n*587+r*114)/1e3},u4=e=>t=>{const n=Nh(t,e);return l4(n)<128?"dark":"light"},c4=e=>t=>u4(e)(t)==="dark",ou=(e,t)=>n=>{const r=Nh(n,e);return i4(r,1-t)};function pS(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
45deg,
${t} 25%,
transparent 25%,
transparent 50%,
${t} 50%,
${t} 75%,
transparent 75%,
transparent
)`,backgroundSize:`${e} ${e}`}}var d4=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function f4(e){const t=d4();return!e||s4(e)?t:e.string&&e.colors?p4(e.string,e.colors):e.string&&!e.colors?h4(e.string):e.colors&&!e.string?g4(e.colors):t}function h4(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function p4(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function g4(e){return e[Math.floor(Math.random()*e.length)]}function Ue(e,t){return n=>n.colorMode==="dark"?t:e}function kb(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function P2(e){return cr(e)&&e.reference?e.reference:String(e)}var ag=(e,...t)=>t.map(P2).join(` ${e} `).replace(/calc/g,""),gS=(...e)=>`calc(${ag("+",...e)})`,mS=(...e)=>`calc(${ag("-",...e)})`,vy=(...e)=>`calc(${ag("*",...e)})`,vS=(...e)=>`calc(${ag("/",...e)})`,yS=e=>{const t=P2(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:vy(t,-1)},fo=Object.assign(e=>({add:(...t)=>fo(gS(e,...t)),subtract:(...t)=>fo(mS(e,...t)),multiply:(...t)=>fo(vy(e,...t)),divide:(...t)=>fo(vS(e,...t)),negate:()=>fo(yS(e)),toString:()=>e.toString()}),{add:gS,subtract:mS,multiply:vy,divide:vS,negate:yS});function m4(e){return!Number.isInteger(parseFloat(e.toString()))}function v4(e,t="-"){return e.replace(/\s+/g,t)}function I2(e){const t=v4(e.toString());return t.includes("\\.")?e:m4(e)?t.replace(".","\\."):e}function y4(e,t=""){return[t,I2(e)].filter(Boolean).join("-")}function b4(e,t){return`var(${I2(e)}${t?`, ${t}`:""})`}function w4(e,t=""){return`--${y4(e,t)}`}function gn(e,t){const n=w4(e,t==null?void 0:t.prefix);return{variable:n,reference:b4(n,S4(t==null?void 0:t.fallback))}}function S4(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:x4,definePartsStyle:If}=Ct(VD.keys),pc=gn("switch-track-width"),fs=gn("switch-track-height"),mm=gn("switch-track-diff"),_4=fo.subtract(pc,fs),yy=gn("switch-thumb-x"),Ou=gn("switch-bg"),C4=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[pc.reference],height:[fs.reference],transitionProperty:"common",transitionDuration:"fast",[Ou.variable]:"colors.gray.300",_dark:{[Ou.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ou.variable]:`colors.${t}.500`,_dark:{[Ou.variable]:`colors.${t}.200`}},bg:Ou.reference}},k4={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[fs.reference],height:[fs.reference],_checked:{transform:`translateX(${yy.reference})`}},E4=If(e=>({container:{[mm.variable]:_4,[yy.variable]:mm.reference,_rtl:{[yy.variable]:fo(mm).negate().toString()}},track:C4(e),thumb:k4})),$4={sm:If({container:{[pc.variable]:"1.375rem",[fs.variable]:"sizes.3"}}),md:If({container:{[pc.variable]:"1.875rem",[fs.variable]:"sizes.4"}}),lg:If({container:{[pc.variable]:"2.875rem",[fs.variable]:"sizes.6"}})},T4=x4({baseStyle:E4,sizes:$4,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:A4,definePartsStyle:Bl}=Ct(WD.keys),M4=Bl({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),zh={"&[data-is-numeric=true]":{textAlign:"end"}},L4=Bl(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...zh},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...zh},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),R4=Bl(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...zh},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...zh},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),P4={simple:L4,striped:R4,unstyled:{}},I4={sm:Bl({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Bl({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Bl({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},O4=A4({baseStyle:M4,variants:P4,sizes:I4,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),rr=Je("tabs-color"),ci=Je("tabs-bg"),ef=Je("tabs-border-color"),{defineMultiStyleConfig:F4,definePartsStyle:Vi}=Ct(R2.keys),D4=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},N4=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},z4=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},B4={p:4},j4=Vi(e=>({root:D4(e),tab:N4(e),tablist:z4(e),tabpanel:B4})),H4={sm:Vi({tab:{py:1,px:4,fontSize:"sm"}}),md:Vi({tab:{fontSize:"md",py:2,px:4}}),lg:Vi({tab:{fontSize:"lg",py:3,px:4}})},V4=Vi(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[rr.variable]:`colors.${t}.600`,_dark:{[rr.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[ci.variable]:"colors.gray.200",_dark:{[ci.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:rr.reference,bg:ci.reference}}}),W4=Vi(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[ef.variable]:"transparent",_selected:{[rr.variable]:`colors.${t}.600`,[ef.variable]:"colors.white",_dark:{[rr.variable]:`colors.${t}.300`,[ef.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:ef.reference},color:rr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),U4=Vi(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[ci.variable]:"colors.gray.50",_dark:{[ci.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[ci.variable]:"colors.white",[rr.variable]:`colors.${t}.600`,_dark:{[ci.variable]:"colors.gray.800",[rr.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:rr.reference,bg:ci.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),G4=Vi(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Nh(n,`${t}.700`),bg:Nh(n,`${t}.100`)}}}}),K4=Vi(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[rr.variable]:"colors.gray.600",_dark:{[rr.variable]:"inherit"},_selected:{[rr.variable]:"colors.white",[ci.variable]:`colors.${t}.600`,_dark:{[rr.variable]:"colors.gray.800",[ci.variable]:`colors.${t}.300`}},color:rr.reference,bg:ci.reference}}}),q4=Vi({}),Y4={line:V4,enclosed:W4,"enclosed-colored":U4,"soft-rounded":G4,"solid-rounded":K4,unstyled:q4},X4=F4({baseStyle:j4,sizes:H4,variants:Y4,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),rn=SF("badge",["bg","color","shadow"]),Q4={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:rn.bg.reference,color:rn.color.reference,boxShadow:rn.shadow.reference},Z4=e=>{const{colorScheme:t,theme:n}=e,r=ou(`${t}.500`,.6)(n);return{[rn.bg.variable]:`colors.${t}.500`,[rn.color.variable]:"colors.white",_dark:{[rn.bg.variable]:r,[rn.color.variable]:"colors.whiteAlpha.800"}}},J4=e=>{const{colorScheme:t,theme:n}=e,r=ou(`${t}.200`,.16)(n);return{[rn.bg.variable]:`colors.${t}.100`,[rn.color.variable]:`colors.${t}.800`,_dark:{[rn.bg.variable]:r,[rn.color.variable]:`colors.${t}.200`}}},eN=e=>{const{colorScheme:t,theme:n}=e,r=ou(`${t}.200`,.8)(n);return{[rn.color.variable]:`colors.${t}.500`,_dark:{[rn.color.variable]:r},[rn.shadow.variable]:`inset 0 0 0px 1px ${rn.color.reference}`}},tN={solid:Z4,subtle:J4,outline:eN},gc={baseStyle:Q4,variants:tN,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:nN,definePartsStyle:hs}=Ct(UD.keys),bS=Je("tag-bg"),wS=Je("tag-color"),vm=Je("tag-shadow"),Of=Je("tag-min-height"),Ff=Je("tag-min-width"),Df=Je("tag-font-size"),Nf=Je("tag-padding-inline"),rN={fontWeight:"medium",lineHeight:1.2,outline:0,[wS.variable]:rn.color.reference,[bS.variable]:rn.bg.reference,[vm.variable]:rn.shadow.reference,color:wS.reference,bg:bS.reference,boxShadow:vm.reference,borderRadius:"md",minH:Of.reference,minW:Ff.reference,fontSize:Df.reference,px:Nf.reference,_focusVisible:{[vm.variable]:"shadows.outline"}},iN={lineHeight:1.2,overflow:"visible"},oN={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},aN=hs({container:rN,label:iN,closeButton:oN}),sN={sm:hs({container:{[Of.variable]:"sizes.5",[Ff.variable]:"sizes.5",[Df.variable]:"fontSizes.xs",[Nf.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:hs({container:{[Of.variable]:"sizes.6",[Ff.variable]:"sizes.6",[Df.variable]:"fontSizes.sm",[Nf.variable]:"space.2"}}),lg:hs({container:{[Of.variable]:"sizes.8",[Ff.variable]:"sizes.8",[Df.variable]:"fontSizes.md",[Nf.variable]:"space.3"}})},lN={subtle:hs(e=>{var t;return{container:(t=gc.variants)==null?void 0:t.subtle(e)}}),solid:hs(e=>{var t;return{container:(t=gc.variants)==null?void 0:t.solid(e)}}),outline:hs(e=>{var t;return{container:(t=gc.variants)==null?void 0:t.outline(e)}})},uN=nN({variants:lN,baseStyle:aN,sizes:sN,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:go,defineMultiStyleConfig:cN}=Ct(T2.keys),dN=go({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),qo={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},fN={lg:go({field:qo.lg,addon:qo.lg}),md:go({field:qo.md,addon:qo.md}),sm:go({field:qo.sm,addon:qo.sm}),xs:go({field:qo.xs,addon:qo.xs})};function Eb(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var hN=go(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Eb(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:fi(t,r),boxShadow:`0 0 0 1px ${fi(t,r)}`},_focusVisible:{zIndex:1,borderColor:fi(t,n),boxShadow:`0 0 0 1px ${fi(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),pN=go(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Eb(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:fi(t,r)},_focusVisible:{bg:"transparent",borderColor:fi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),gN=go(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Eb(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:fi(t,r),boxShadow:`0px 1px 0px 0px ${fi(t,r)}`},_focusVisible:{borderColor:fi(t,n),boxShadow:`0px 1px 0px 0px ${fi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),mN=go({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),vN={outline:hN,filled:pN,flushed:gN,unstyled:mN},At=cN({baseStyle:dN,sizes:fN,variants:vN,defaultProps:{size:"md",variant:"outline"}}),SS,yN={...(SS=At.baseStyle)==null?void 0:SS.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},xS,_S,bN={outline:e=>{var t,n;return(n=(t=At.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=At.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=At.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(_S=(xS=At.variants)==null?void 0:xS.unstyled.field)!=null?_S:{}},CS,kS,ES,$S,TS,AS,MS,LS,wN={xs:(kS=(CS=At.sizes)==null?void 0:CS.xs.field)!=null?kS:{},sm:($S=(ES=At.sizes)==null?void 0:ES.sm.field)!=null?$S:{},md:(AS=(TS=At.sizes)==null?void 0:TS.md.field)!=null?AS:{},lg:(LS=(MS=At.sizes)==null?void 0:MS.lg.field)!=null?LS:{}},SN={baseStyle:yN,sizes:wN,variants:bN,defaultProps:{size:"md",variant:"outline"}},tf=gn("tooltip-bg"),ym=gn("tooltip-fg"),xN=gn("popper-arrow-bg"),_N={bg:tf.reference,color:ym.reference,[tf.variable]:"colors.gray.700",[ym.variable]:"colors.whiteAlpha.900",_dark:{[tf.variable]:"colors.gray.300",[ym.variable]:"colors.gray.900"},[xN.variable]:tf.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},CN={baseStyle:_N},{defineMultiStyleConfig:kN,definePartsStyle:Zu}=Ct(zD.keys),EN=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(pS(),pS("1rem","rgba(0,0,0,0.1)"))(e),l=Ue(`${t}.500`,`${t}.200`)(e),d=`linear-gradient(
to right,
transparent 0%,
${fi(n,l)} 50%,
transparent 100%
)`;return{...!r&&i&&o,...r?{bgImage:d}:{bgColor:l}}},$N={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},TN=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),AN=e=>({transitionProperty:"common",transitionDuration:"slow",...EN(e)}),MN=Zu(e=>({label:$N,filledTrack:AN(e),track:TN(e)})),LN={xs:Zu({track:{h:"1"}}),sm:Zu({track:{h:"2"}}),md:Zu({track:{h:"3"}}),lg:Zu({track:{h:"4"}})},RN=kN({sizes:LN,baseStyle:MN,defaultProps:{size:"md",colorScheme:"blue"}}),PN=e=>typeof e=="function";function qn(e,...t){return PN(e)?e(...t):e}var{definePartsStyle:zf,defineMultiStyleConfig:IN}=Ct($2.keys),mc=Je("checkbox-size"),ON=e=>{const{colorScheme:t}=e;return{w:mc.reference,h:mc.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},FN={_disabled:{cursor:"not-allowed"}},DN={userSelect:"none",_disabled:{opacity:.4}},NN={transitionProperty:"transform",transitionDuration:"normal"},zN=zf(e=>({icon:NN,container:FN,control:qn(ON,e),label:DN})),BN={sm:zf({control:{[mc.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:zf({control:{[mc.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:zf({control:{[mc.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Bh=IN({baseStyle:zN,sizes:BN,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jN,definePartsStyle:Bf}=Ct(L2.keys),HN=e=>{var t;const n=(t=qn(Bh.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},VN=Bf(e=>{var t,n,r,i;return{label:(n=(t=Bh).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=Bh).baseStyle)==null?void 0:i.call(r,e).container,control:HN(e)}}),WN={md:Bf({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Bf({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Bf({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},UN=jN({baseStyle:VN,sizes:WN,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:GN,definePartsStyle:KN}=Ct(BD.keys),nf=Je("select-bg"),RS,qN={...(RS=At.baseStyle)==null?void 0:RS.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:nf.reference,[nf.variable]:"colors.white",_dark:{[nf.variable]:"colors.gray.700"},"> option, > optgroup":{bg:nf.reference}},YN={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},XN=KN({field:qN,icon:YN}),rf={paddingInlineEnd:"8"},PS,IS,OS,FS,DS,NS,zS,BS,QN={lg:{...(PS=At.sizes)==null?void 0:PS.lg,field:{...(IS=At.sizes)==null?void 0:IS.lg.field,...rf}},md:{...(OS=At.sizes)==null?void 0:OS.md,field:{...(FS=At.sizes)==null?void 0:FS.md.field,...rf}},sm:{...(DS=At.sizes)==null?void 0:DS.sm,field:{...(NS=At.sizes)==null?void 0:NS.sm.field,...rf}},xs:{...(zS=At.sizes)==null?void 0:zS.xs,field:{...(BS=At.sizes)==null?void 0:BS.xs.field,...rf},icon:{insetEnd:"1"}}},ZN=GN({baseStyle:XN,sizes:QN,variants:At.variants,defaultProps:At.defaultProps}),bm=Je("skeleton-start-color"),wm=Je("skeleton-end-color"),JN={[bm.variable]:"colors.gray.100",[wm.variable]:"colors.gray.400",_dark:{[bm.variable]:"colors.gray.800",[wm.variable]:"colors.gray.600"},background:bm.reference,borderColor:wm.reference,opacity:.7,borderRadius:"sm"},e5={baseStyle:JN},Sm=Je("skip-link-bg"),t5={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Sm.variable]:"colors.white",_dark:{[Sm.variable]:"colors.gray.700"},bg:Sm.reference}},n5={baseStyle:t5},{defineMultiStyleConfig:r5,definePartsStyle:sg}=Ct(jD.keys),Xc=Je("slider-thumb-size"),Qc=Je("slider-track-size"),oa=Je("slider-bg"),i5=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...kb({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},o5=e=>({...kb({orientation:e.orientation,horizontal:{h:Qc.reference},vertical:{w:Qc.reference}}),overflow:"hidden",borderRadius:"sm",[oa.variable]:"colors.gray.200",_dark:{[oa.variable]:"colors.whiteAlpha.200"},_disabled:{[oa.variable]:"colors.gray.300",_dark:{[oa.variable]:"colors.whiteAlpha.300"}},bg:oa.reference}),a5=e=>{const{orientation:t}=e;return{...kb({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Xc.reference,h:Xc.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},s5=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[oa.variable]:`colors.${t}.500`,_dark:{[oa.variable]:`colors.${t}.200`},bg:oa.reference}},l5=sg(e=>({container:i5(e),track:o5(e),thumb:a5(e),filledTrack:s5(e)})),u5=sg({container:{[Xc.variable]:"sizes.4",[Qc.variable]:"sizes.1"}}),c5=sg({container:{[Xc.variable]:"sizes.3.5",[Qc.variable]:"sizes.1"}}),d5=sg({container:{[Xc.variable]:"sizes.2.5",[Qc.variable]:"sizes.0.5"}}),f5={lg:u5,md:c5,sm:d5},h5=r5({baseStyle:l5,sizes:f5,defaultProps:{size:"md",colorScheme:"blue"}}),es=gn("spinner-size"),p5={width:[es.reference],height:[es.reference]},g5={xs:{[es.variable]:"sizes.3"},sm:{[es.variable]:"sizes.4"},md:{[es.variable]:"sizes.6"},lg:{[es.variable]:"sizes.8"},xl:{[es.variable]:"sizes.12"}},m5={baseStyle:p5,sizes:g5,defaultProps:{size:"md"}},{defineMultiStyleConfig:v5,definePartsStyle:O2}=Ct(HD.keys),y5={fontWeight:"medium"},b5={opacity:.8,marginBottom:"2"},w5={verticalAlign:"baseline",fontWeight:"semibold"},S5={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},x5=O2({container:{},label:y5,helpText:b5,number:w5,icon:S5}),_5={md:O2({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},C5=v5({baseStyle:x5,sizes:_5,defaultProps:{size:"md"}}),xm=Je("kbd-bg"),k5={[xm.variable]:"colors.gray.100",_dark:{[xm.variable]:"colors.whiteAlpha.100"},bg:xm.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},E5={baseStyle:k5},$5={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},T5={baseStyle:$5},{defineMultiStyleConfig:A5,definePartsStyle:M5}=Ct(FD.keys),L5={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},R5=M5({icon:L5}),P5=A5({baseStyle:R5}),{defineMultiStyleConfig:I5,definePartsStyle:O5}=Ct(DD.keys),Pi=Je("menu-bg"),_m=Je("menu-shadow"),F5={[Pi.variable]:"#fff",[_m.variable]:"shadows.sm",_dark:{[Pi.variable]:"colors.gray.700",[_m.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Pi.reference,boxShadow:_m.reference},D5={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Pi.variable]:"colors.gray.100",_dark:{[Pi.variable]:"colors.whiteAlpha.100"}},_active:{[Pi.variable]:"colors.gray.200",_dark:{[Pi.variable]:"colors.whiteAlpha.200"}},_expanded:{[Pi.variable]:"colors.gray.100",_dark:{[Pi.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Pi.reference},N5={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},z5={opacity:.6},B5={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},j5={transitionProperty:"common",transitionDuration:"normal"},H5=O5({button:j5,list:F5,item:D5,groupTitle:N5,command:z5,divider:B5}),V5=I5({baseStyle:H5}),{defineMultiStyleConfig:W5,definePartsStyle:by}=Ct(A2.keys),Cm=Je("modal-bg"),km=Je("modal-shadow"),U5={bg:"blackAlpha.600",zIndex:"modal"},G5=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},K5=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[Cm.variable]:"colors.white",[km.variable]:"shadows.lg",_dark:{[Cm.variable]:"colors.gray.700",[km.variable]:"shadows.dark-lg"},bg:Cm.reference,boxShadow:km.reference}},q5={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Y5={position:"absolute",top:"2",insetEnd:"3"},X5=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Q5={px:"6",py:"4"},Z5=by(e=>({overlay:U5,dialogContainer:qn(G5,e),dialog:qn(K5,e),header:q5,closeButton:Y5,body:qn(X5,e),footer:Q5}));function oi(e){return by(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var J5={xs:oi("xs"),sm:oi("sm"),md:oi("md"),lg:oi("lg"),xl:oi("xl"),"2xl":oi("2xl"),"3xl":oi("3xl"),"4xl":oi("4xl"),"5xl":oi("5xl"),"6xl":oi("6xl"),full:oi("full")},ez=W5({baseStyle:Z5,sizes:J5,defaultProps:{size:"md"}}),{defineMultiStyleConfig:tz,definePartsStyle:F2}=Ct(M2.keys),$b=gn("number-input-stepper-width"),D2=gn("number-input-input-padding"),nz=fo($b).add("0.5rem").toString(),Em=gn("number-input-bg"),$m=gn("number-input-color"),Tm=gn("number-input-border-color"),rz={[$b.variable]:"sizes.6",[D2.variable]:nz},iz=e=>{var t,n;return(n=(t=qn(At.baseStyle,e))==null?void 0:t.field)!=null?n:{}},oz={width:$b.reference},az={borderStart:"1px solid",borderStartColor:Tm.reference,color:$m.reference,bg:Em.reference,[$m.variable]:"colors.chakra-body-text",[Tm.variable]:"colors.chakra-border-color",_dark:{[$m.variable]:"colors.whiteAlpha.800",[Tm.variable]:"colors.whiteAlpha.300"},_active:{[Em.variable]:"colors.gray.200",_dark:{[Em.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},sz=F2(e=>{var t;return{root:rz,field:(t=qn(iz,e))!=null?t:{},stepperGroup:oz,stepper:az}});function of(e){var t,n,r;const i=(t=At.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},l=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",d=C2.fontSizes[l];return F2({field:{...i.field,paddingInlineEnd:D2.reference,verticalAlign:"top"},stepper:{fontSize:fo(d).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var lz={xs:of("xs"),sm:of("sm"),md:of("md"),lg:of("lg")},uz=tz({baseStyle:sz,sizes:lz,variants:At.variants,defaultProps:At.defaultProps}),jS,cz={...(jS=At.baseStyle)==null?void 0:jS.field,textAlign:"center"},dz={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},HS,VS,fz={outline:e=>{var t,n,r;return(r=(n=qn((t=At.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=qn((t=At.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=qn((t=At.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(VS=(HS=At.variants)==null?void 0:HS.unstyled.field)!=null?VS:{}},hz={baseStyle:cz,sizes:dz,variants:fz,defaultProps:At.defaultProps},{defineMultiStyleConfig:pz,definePartsStyle:gz}=Ct(ND.keys),af=gn("popper-bg"),mz=gn("popper-arrow-bg"),WS=gn("popper-arrow-shadow-color"),vz={zIndex:10},yz={[af.variable]:"colors.white",bg:af.reference,[mz.variable]:af.reference,[WS.variable]:"colors.gray.200",_dark:{[af.variable]:"colors.gray.700",[WS.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},bz={px:3,py:2,borderBottomWidth:"1px"},wz={px:3,py:2},Sz={px:3,py:2,borderTopWidth:"1px"},xz={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},_z=gz({popper:vz,content:yz,header:bz,body:wz,footer:Sz,closeButton:xz}),Cz=pz({baseStyle:_z}),{definePartsStyle:wy,defineMultiStyleConfig:kz}=Ct(RD.keys),Am=Je("drawer-bg"),Mm=Je("drawer-box-shadow");function nl(e){return wy(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Ez={bg:"blackAlpha.600",zIndex:"overlay"},$z={display:"flex",zIndex:"modal",justifyContent:"center"},Tz=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Am.variable]:"colors.white",[Mm.variable]:"shadows.lg",_dark:{[Am.variable]:"colors.gray.700",[Mm.variable]:"shadows.dark-lg"},bg:Am.reference,boxShadow:Mm.reference}},Az={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Mz={position:"absolute",top:"2",insetEnd:"3"},Lz={px:"6",py:"2",flex:"1",overflow:"auto"},Rz={px:"6",py:"4"},Pz=wy(e=>({overlay:Ez,dialogContainer:$z,dialog:qn(Tz,e),header:Az,closeButton:Mz,body:Lz,footer:Rz})),Iz={xs:nl("xs"),sm:nl("md"),md:nl("lg"),lg:nl("2xl"),xl:nl("4xl"),full:nl("full")},Oz=kz({baseStyle:Pz,sizes:Iz,defaultProps:{size:"xs"}}),{definePartsStyle:Fz,defineMultiStyleConfig:Dz}=Ct(PD.keys),Nz={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},zz={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Bz={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},jz=Fz({preview:Nz,input:zz,textarea:Bz}),Hz=Dz({baseStyle:jz}),{definePartsStyle:Vz,defineMultiStyleConfig:Wz}=Ct(ID.keys),jl=Je("form-control-color"),Uz={marginStart:"1",[jl.variable]:"colors.red.500",_dark:{[jl.variable]:"colors.red.300"},color:jl.reference},Gz={mt:"2",[jl.variable]:"colors.gray.600",_dark:{[jl.variable]:"colors.whiteAlpha.600"},color:jl.reference,lineHeight:"normal",fontSize:"sm"},Kz=Vz({container:{width:"100%",position:"relative"},requiredIndicator:Uz,helperText:Gz}),qz=Wz({baseStyle:Kz}),{definePartsStyle:Yz,defineMultiStyleConfig:Xz}=Ct(OD.keys),Hl=Je("form-error-color"),Qz={[Hl.variable]:"colors.red.500",_dark:{[Hl.variable]:"colors.red.300"},color:Hl.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Zz={marginEnd:"0.5em",[Hl.variable]:"colors.red.500",_dark:{[Hl.variable]:"colors.red.300"},color:Hl.reference},Jz=Yz({text:Qz,icon:Zz}),e6=Xz({baseStyle:Jz}),t6={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},n6={baseStyle:t6},r6={fontFamily:"heading",fontWeight:"bold"},i6={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},o6={baseStyle:r6,sizes:i6,defaultProps:{size:"xl"}},{defineMultiStyleConfig:a6,definePartsStyle:s6}=Ct(LD.keys),Lm=Je("breadcrumb-link-decor"),l6={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Lm.reference,[Lm.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Lm.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},u6=s6({link:l6}),c6=a6({baseStyle:u6}),d6={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},N2=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("gray.800","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=ou(`${t}.200`,.12)(n),i=ou(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},f6=e=>{const{colorScheme:t}=e,n=Ue("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...qn(N2,e)}},h6={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},p6=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const a=Ue("gray.100","whiteAlpha.200")(e);return{bg:a,color:Ue("gray.800","whiteAlpha.900")(e),_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:a}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:l=`${n}.700`}=(t=h6[n])!=null?t:{},d=Ue(r,`${n}.200`)(e);return{bg:d,color:Ue(i,"gray.800")(e),_hover:{bg:Ue(o,`${n}.300`)(e),_disabled:{bg:d}},_active:{bg:Ue(l,`${n}.400`)(e)}}},g6=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},m6={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},v6={ghost:N2,outline:f6,solid:p6,link:g6,unstyled:m6},y6={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},b6={baseStyle:d6,variants:v6,sizes:y6,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:ps,defineMultiStyleConfig:w6}=Ct(GD.keys),jh=Je("card-bg"),wo=Je("card-padding"),z2=Je("card-shadow"),jf=Je("card-radius"),B2=Je("card-border-width","0"),j2=Je("card-border-color"),S6=ps({container:{[jh.variable]:"colors.chakra-body-bg",backgroundColor:jh.reference,boxShadow:z2.reference,borderRadius:jf.reference,color:"chakra-body-text",borderWidth:B2.reference,borderColor:j2.reference},body:{padding:wo.reference,flex:"1 1 0%"},header:{padding:wo.reference},footer:{padding:wo.reference}}),x6={sm:ps({container:{[jf.variable]:"radii.base",[wo.variable]:"space.3"}}),md:ps({container:{[jf.variable]:"radii.md",[wo.variable]:"space.5"}}),lg:ps({container:{[jf.variable]:"radii.xl",[wo.variable]:"space.7"}})},_6={elevated:ps({container:{[z2.variable]:"shadows.base",_dark:{[jh.variable]:"colors.gray.700"}}}),outline:ps({container:{[B2.variable]:"1px",[j2.variable]:"colors.chakra-border-color"}}),filled:ps({container:{[jh.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[wo.variable]:0},header:{[wo.variable]:0},footer:{[wo.variable]:0}}},C6=w6({baseStyle:S6,variants:_6,sizes:x6,defaultProps:{variant:"elevated",size:"md"}}),vc=gn("close-button-size"),Fu=gn("close-button-bg"),k6={w:[vc.reference],h:[vc.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Fu.variable]:"colors.blackAlpha.100",_dark:{[Fu.variable]:"colors.whiteAlpha.100"}},_active:{[Fu.variable]:"colors.blackAlpha.200",_dark:{[Fu.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Fu.reference},E6={lg:{[vc.variable]:"sizes.10",fontSize:"md"},md:{[vc.variable]:"sizes.8",fontSize:"xs"},sm:{[vc.variable]:"sizes.6",fontSize:"2xs"}},$6={baseStyle:k6,sizes:E6,defaultProps:{size:"md"}},{variants:T6,defaultProps:A6}=gc,M6={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:rn.bg.reference,color:rn.color.reference,boxShadow:rn.shadow.reference},L6={baseStyle:M6,variants:T6,defaultProps:A6},R6={w:"100%",mx:"auto",maxW:"prose",px:"4"},P6={baseStyle:R6},I6={opacity:.6,borderColor:"inherit"},O6={borderStyle:"solid"},F6={borderStyle:"dashed"},D6={solid:O6,dashed:F6},N6={baseStyle:I6,variants:D6,defaultProps:{variant:"solid"}},{definePartsStyle:z6,defineMultiStyleConfig:B6}=Ct(TD.keys),j6={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},H6={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},V6={pt:"2",px:"4",pb:"5"},W6={fontSize:"1.25em"},U6=z6({container:j6,button:H6,panel:V6,icon:W6}),G6=B6({baseStyle:U6}),{definePartsStyle:gd,defineMultiStyleConfig:K6}=Ct(AD.keys),wr=Je("alert-fg"),$o=Je("alert-bg"),q6=gd({container:{bg:$o.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:wr.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:wr.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function Tb(e){const{theme:t,colorScheme:n}=e,r=ou(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Y6=gd(e=>{const{colorScheme:t}=e,n=Tb(e);return{container:{[wr.variable]:`colors.${t}.500`,[$o.variable]:n.light,_dark:{[wr.variable]:`colors.${t}.200`,[$o.variable]:n.dark}}}}),X6=gd(e=>{const{colorScheme:t}=e,n=Tb(e);return{container:{[wr.variable]:`colors.${t}.500`,[$o.variable]:n.light,_dark:{[wr.variable]:`colors.${t}.200`,[$o.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:wr.reference}}}),Q6=gd(e=>{const{colorScheme:t}=e,n=Tb(e);return{container:{[wr.variable]:`colors.${t}.500`,[$o.variable]:n.light,_dark:{[wr.variable]:`colors.${t}.200`,[$o.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:wr.reference}}}),Z6=gd(e=>{const{colorScheme:t}=e;return{container:{[wr.variable]:"colors.white",[$o.variable]:`colors.${t}.500`,_dark:{[wr.variable]:"colors.gray.900",[$o.variable]:`colors.${t}.200`},color:wr.reference}}}),J6={subtle:Y6,"left-accent":X6,"top-accent":Q6,solid:Z6},eB=K6({baseStyle:q6,variants:J6,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:H2,defineMultiStyleConfig:tB}=Ct(MD.keys),Vl=Je("avatar-border-color"),yc=Je("avatar-bg"),Zc=Je("avatar-font-size"),au=Je("avatar-size"),nB={borderRadius:"full",border:"0.2em solid",borderColor:Vl.reference,[Vl.variable]:"white",_dark:{[Vl.variable]:"colors.gray.800"}},rB={bg:yc.reference,fontSize:Zc.reference,width:au.reference,height:au.reference,lineHeight:"1",[yc.variable]:"colors.gray.200",_dark:{[yc.variable]:"colors.whiteAlpha.400"}},iB=e=>{const{name:t,theme:n}=e,r=t?f4({string:t}):"colors.gray.400",i=c4(r)(n);let o="white";return i||(o="gray.800"),{bg:yc.reference,fontSize:Zc.reference,color:o,borderColor:Vl.reference,verticalAlign:"top",width:au.reference,height:au.reference,"&:not([data-loaded])":{[yc.variable]:r},[Vl.variable]:"colors.white",_dark:{[Vl.variable]:"colors.gray.800"}}},oB={fontSize:Zc.reference,lineHeight:"1"},aB=H2(e=>({badge:qn(nB,e),excessLabel:qn(rB,e),container:qn(iB,e),label:oB}));function Yo(e){const t=e!=="100%"?E2[e]:void 0;return H2({container:{[au.variable]:t??e,[Zc.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[au.variable]:t??e,[Zc.variable]:`calc(${t??e} / 2.5)`}})}var sB={"2xs":Yo(4),xs:Yo(6),sm:Yo(8),md:Yo(12),lg:Yo(16),xl:Yo(24),"2xl":Yo(32),full:Yo("100%")},lB=tB({baseStyle:aB,sizes:sB,defaultProps:{size:"md"}}),uB={Accordion:G6,Alert:eB,Avatar:lB,Badge:gc,Breadcrumb:c6,Button:b6,Checkbox:Bh,CloseButton:$6,Code:L6,Container:P6,Divider:N6,Drawer:Oz,Editable:Hz,Form:qz,FormError:e6,FormLabel:n6,Heading:o6,Input:At,Kbd:E5,Link:T5,List:P5,Menu:V5,Modal:ez,NumberInput:uz,PinInput:hz,Popover:Cz,Progress:RN,Radio:UN,Select:ZN,Skeleton:e5,SkipLink:n5,Slider:h5,Spinner:m5,Stat:C5,Switch:T4,Table:O4,Tabs:X4,Tag:uN,Textarea:SN,Tooltip:CN,Card:C6,Stepper:$D},cB={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},dB={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},fB="ltr",hB={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},V2={semanticTokens:cB,direction:fB,...CD,components:uB,styles:dB,config:hB};function Ju(e){return typeof e=="function"}function pB(...e){return t=>e.reduce((n,r)=>r(n),t)}var gB=e=>function(...n){let r=[...n],i=n[n.length-1];return eD(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,pB(...r.map(o=>l=>Ju(o)?o(l):vB(l,o)))(i)},mB=gB(V2);function vB(...e){return Gr({},...e,W2)}function W2(e,t,n,r){if((Ju(e)||Ju(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=Ju(e)?e(...i):e,l=Ju(t)?t(...i):t;return Gr({},o,l,W2)}}function yB(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var bB=yB();function wB(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function SB(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var xB=e=>{const t=new WeakMap;return(r,i,o,l)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const d=t.get(r);if(d.has(i))return d.get(i);const a=e(r,i,o,l);return d.set(i,a),a}},U2=xB(SB);function G2(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var K2=e=>G2(e,t=>t!=null);function _B(e){return typeof e=="function"}function q2(e,...t){return _B(e)?e(...t):e}function CB(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var kB=typeof Element<"u",EB=typeof Map=="function",$B=typeof Set=="function",TB=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Hf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Hf(e[r],t[r]))return!1;return!0}var o;if(EB&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!Hf(r.value[1],t.get(r.value[0])))return!1;return!0}if($B&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(TB&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(kB&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!Hf(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var AB=function(t,n){try{return Hf(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const MB=ks(AB);function Y2(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:l}=P8(),d=e?U2(o,`components.${e}`):void 0,a=r||d,c=Gr({theme:o,colorMode:l},(n=a==null?void 0:a.defaultProps)!=null?n:{},K2(wB(i,["children"]))),s=N.useRef({});if(a){const f=QF(a)(c);MB(s.current,f)||(s.current=f)}return s.current}function lg(e,t={}){return Y2(e,t)}function Lo(e,t={}){return Y2(e,t)}var LB=new Set([...zF,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),RB=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function PB(e){return RB.has(e)||!LB.has(e)}function IB(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function OB(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var FB=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,DB=e2(function(e){return FB.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),NB=DB,zB=function(t){return t!=="theme"},US=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?NB:zB},GS=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(l){return t.__emotion_forwardProp(l)&&o(l)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},BB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return hb(n,r,i),u2(function(){return pb(n,r,i)}),null},jB=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,l;n!==void 0&&(o=n.label,l=n.target);var d=GS(t,n,r),a=d||US(i),c=!a("as");return function(){var s=arguments,u=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&u.push("label:"+o+";"),s[0]==null||s[0].raw===void 0)u.push.apply(u,s);else{u.push(s[0][0]);for(var f=s.length,h=1;h<f;h++)u.push(s[h],s[0][h])}var p=mb(function(g,w,x){var S=c&&g.as||i,T="",v=[],b=g;if(g.theme==null){b={};for(var y in g)b[y]=g[y];b.theme=N.useContext(iu)}typeof g.className=="string"?T=a2(w.registered,v,g.className):g.className!=null&&(T=g.className+" ");var m=ng(u.concat(v),w.registered,b);T+=w.key+"-"+m.name,l!==void 0&&(T+=" "+l);var E=c&&d===void 0?US(S):a,M={};for(var C in g)c&&C==="as"||E(C)&&(M[C]=g[C]);return M.className=T,M.ref=x,N.createElement(N.Fragment,null,N.createElement(BB,{cache:w,serialized:m,isStringTag:typeof S=="string"}),N.createElement(S,M))});return p.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=u,p.__emotion_forwardProp=d,Object.defineProperty(p,"toString",{value:function(){return"."+l}}),p.withComponent=function(g,w){return e(g,Ie({},n,w,{shouldForwardProp:GS(p,w,!0)})).apply(void 0,u)},p}},HB=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Hh=jB.bind();HB.forEach(function(e){Hh[e]=Hh(e)});var KS,VB=(KS=Hh.default)!=null?KS:Hh,WB=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...l}=t,d=G2(l,(u,f)=>jF(f)),a=q2(e,t),c=IB({},i,a,K2(d),o),s=_2(c)(t.theme);return r?[s,r]:s};function Rm(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=PB);const i=WB({baseStyle:n}),o=VB(e,r)(i);return ut.forwardRef(function(a,c){const{colorMode:s,forced:u}=wb();return ut.createElement(o,{ref:c,"data-theme":u?s:void 0,...a})})}function UB(){const e=new Map;return new Proxy(Rm,{apply(t,n,r){return Rm(...r)},get(t,n){return e.has(n)||e.set(n,Rm(n)),e.get(n)}})}var rt=UB();function mt(e){return N.forwardRef(e)}function GB(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=N.createContext(void 0);i.displayName=r;function o(){var l;const d=N.useContext(i);if(!d&&t){const a=new Error(n);throw a.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,a,o),a}return d}return[i.Provider,o,i]}function KB(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=N.useMemo(()=>FF(n),[n]);return W.jsxs(h8,{theme:i,children:[W.jsx(qB,{root:t}),r]})}function qB({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return W.jsx(rg,{styles:n=>({[t]:n.__cssVars})})}GB({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function YB(){const{colorMode:e}=wb();return W.jsx(rg,{styles:t=>{const n=U2(t,"styles.global"),r=q2(n,{theme:t,colorMode:e});return r?_2(r)(t):void 0}})}var X2=N.createContext({getDocument(){return document},getWindow(){return window}});X2.displayName="EnvironmentContext";function Q2(e){const{children:t,environment:n,disabled:r}=e,i=N.useRef(null),o=N.useMemo(()=>n||{getDocument:()=>{var d,a;return(a=(d=i.current)==null?void 0:d.ownerDocument)!=null?a:document},getWindow:()=>{var d,a;return(a=(d=i.current)==null?void 0:d.ownerDocument.defaultView)!=null?a:window}},[n]),l=!r||!n;return W.jsxs(X2.Provider,{value:o,children:[t,l&&W.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}Q2.displayName="EnvironmentProvider";var XB=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:i,resetCSS:o=!0,theme:l={},environment:d,cssVarsRoot:a,disableEnvironment:c,disableGlobalStyle:s}=e,u=W.jsx(Q2,{environment:d,disabled:c,children:t});return W.jsx(KB,{theme:l,cssVarsRoot:a,children:W.jsxs(g2,{colorModeManager:n,options:l.config,children:[o?W.jsx(b8,{scope:i}):W.jsx(y8,{}),!s&&W.jsx(YB,{}),r?W.jsx(h2,{zIndex:r,children:u}):u]})})},QB=(e,t)=>e.find(n=>n.id===t);function qS(e,t){const n=Z2(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function Z2(e,t){for(const[n,r]of Object.entries(e))if(QB(r,t))return n}function ZB(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function JB(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",l=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:l}}function Gn(e,t=[]){const n=N.useRef(e);return N.useEffect(()=>{n.current=e}),N.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ej(e,t){const n=Gn(e);N.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function Vh(e,t){const n=N.useRef(!1),r=N.useRef(!1);N.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),N.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const J2=N.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ug=N.createContext({}),md=N.createContext(null),cg=typeof document<"u",Wh=cg?N.useLayoutEffect:N.useEffect,e$=N.createContext({strict:!1});function tj(e,t,n,r){const{visualElement:i}=N.useContext(ug),o=N.useContext(e$),l=N.useContext(md),d=N.useContext(J2).reducedMotion,a=N.useRef();r=r||o.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d}));const c=a.current;return N.useInsertionEffect(()=>{c&&c.update(n,l)}),Wh(()=>{c&&c.render()}),N.useEffect(()=>{c&&c.updateFeatures()}),(window.HandoffAppearAnimations?Wh:N.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function $l(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nj(e,t,n){return N.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):$l(n)&&(n.current=r))},[t])}function Jc(e){return typeof e=="string"||Array.isArray(e)}function dg(e){return typeof e=="object"&&typeof e.start=="function"}const Ab=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mb=["initial",...Ab];function fg(e){return dg(e.animate)||Mb.some(t=>Jc(e[t]))}function t$(e){return!!(fg(e)||e.variants)}function rj(e,t){if(fg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Jc(n)?n:void 0,animate:Jc(r)?r:void 0}}return e.inherit!==!1?t:{}}function ij(e){const{initial:t,animate:n}=rj(e,N.useContext(ug));return N.useMemo(()=>({initial:t,animate:n}),[YS(t),YS(n)])}function YS(e){return Array.isArray(e)?e.join(" "):e}const XS={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ed={};for(const e in XS)ed[e]={isEnabled:t=>XS[e].some(n=>!!t[n])};function oj(e){for(const t in e)ed[t]={...ed[t],...e[t]}}const Lb=N.createContext({}),n$=N.createContext({}),aj=Symbol.for("motionComponentSymbol");function sj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&oj(e);function o(d,a){let c;const s={...N.useContext(J2),...d,layoutId:lj(d)},{isStatic:u}=s,f=ij(d),h=r(d,u);if(!u&&cg){f.visualElement=tj(i,h,s,t);const p=N.useContext(n$),g=N.useContext(e$).strict;f.visualElement&&(c=f.visualElement.loadFeatures(s,g,e,p))}return N.createElement(ug.Provider,{value:f},c&&f.visualElement?N.createElement(c,{visualElement:f.visualElement,...s}):null,n(i,d,nj(h,f.visualElement,a),h,u,f.visualElement))}const l=N.forwardRef(o);return l[aj]=i,l}function lj({layoutId:e}){const t=N.useContext(Lb).id;return t&&e!==void 0?t+"-"+e:e}function uj(e){function t(r,i={}){return sj(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const cj=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Rb(e){return typeof e!="string"||e.includes("-")?!1:!!(cj.indexOf(e)>-1||/[A-Z]/.test(e))}const Uh={};function dj(e){Object.assign(Uh,e)}const vd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],As=new Set(vd);function r$(e,{layout:t,layoutId:n}){return As.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Uh[e]||e==="opacity")}const fr=e=>!!(e&&e.getVelocity),fj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hj=vd.length;function pj(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let l=0;l<hj;l++){const d=vd[l];if(e[d]!==void 0){const a=fj[d]||d;o+=`${a}(${e[d]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const i$=e=>t=>typeof t=="string"&&t.startsWith(e),o$=i$("--"),Sy=i$("var(--"),gj=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,mj=(e,t)=>t&&typeof e=="number"?t.transform(e):e,_a=(e,t,n)=>Math.min(Math.max(n,e),t),Ms={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},bc={...Ms,transform:e=>_a(0,1,e)},sf={...Ms,default:1},wc=e=>Math.round(e*1e5)/1e5,hg=/(-)?([\d]*\.?[\d])+/g,a$=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,vj=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function yd(e){return typeof e=="string"}const bd=e=>({test:t=>yd(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qo=bd("deg"),Wi=bd("%"),qe=bd("px"),yj=bd("vh"),bj=bd("vw"),QS={...Wi,parse:e=>Wi.parse(e)/100,transform:e=>Wi.transform(e*100)},ZS={...Ms,transform:Math.round},s$={borderWidth:qe,borderTopWidth:qe,borderRightWidth:qe,borderBottomWidth:qe,borderLeftWidth:qe,borderRadius:qe,radius:qe,borderTopLeftRadius:qe,borderTopRightRadius:qe,borderBottomRightRadius:qe,borderBottomLeftRadius:qe,width:qe,maxWidth:qe,height:qe,maxHeight:qe,size:qe,top:qe,right:qe,bottom:qe,left:qe,padding:qe,paddingTop:qe,paddingRight:qe,paddingBottom:qe,paddingLeft:qe,margin:qe,marginTop:qe,marginRight:qe,marginBottom:qe,marginLeft:qe,rotate:Qo,rotateX:Qo,rotateY:Qo,rotateZ:Qo,scale:sf,scaleX:sf,scaleY:sf,scaleZ:sf,skew:Qo,skewX:Qo,skewY:Qo,distance:qe,translateX:qe,translateY:qe,translateZ:qe,x:qe,y:qe,z:qe,perspective:qe,transformPerspective:qe,opacity:bc,originX:QS,originY:QS,originZ:qe,zIndex:ZS,fillOpacity:bc,strokeOpacity:bc,numOctaves:ZS};function Pb(e,t,n,r){const{style:i,vars:o,transform:l,transformOrigin:d}=e;let a=!1,c=!1,s=!0;for(const u in t){const f=t[u];if(o$(u)){o[u]=f;continue}const h=s$[u],p=mj(f,h);if(As.has(u)){if(a=!0,l[u]=p,!s)continue;f!==(h.default||0)&&(s=!1)}else u.startsWith("origin")?(c=!0,d[u]=p):i[u]=p}if(t.transform||(a||r?i.transform=pj(e.transform,n,s,r):i.transform&&(i.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:h=0}=d;i.transformOrigin=`${u} ${f} ${h}`}}const Ib=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function l$(e,t,n){for(const r in t)!fr(t[r])&&!r$(r,n)&&(e[r]=t[r])}function wj({transformTemplate:e},t,n){return N.useMemo(()=>{const r=Ib();return Pb(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Sj(e,t,n){const r=e.style||{},i={};return l$(i,r,e),Object.assign(i,wj(e,t,n)),e.transformValues?e.transformValues(i):i}function xj(e,t,n){const r={},i=Sj(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const _j=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Gh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||_j.has(e)}let u$=e=>!Gh(e);function Cj(e){e&&(u$=t=>t.startsWith("on")?!Gh(t):e(t))}try{Cj(require("@emotion/is-prop-valid").default)}catch{}function kj(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(u$(i)||n===!0&&Gh(i)||!t&&!Gh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function JS(e,t,n){return typeof e=="string"?e:qe.transform(t+n*e)}function Ej(e,t,n){const r=JS(t,e.x,e.width),i=JS(n,e.y,e.height);return`${r} ${i}`}const $j={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tj={offset:"strokeDashoffset",array:"strokeDasharray"};function Aj(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?$j:Tj;e[o.offset]=qe.transform(-r);const l=qe.transform(t),d=qe.transform(n);e[o.array]=`${l} ${d}`}function Ob(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:l,pathSpacing:d=1,pathOffset:a=0,...c},s,u,f){if(Pb(e,c,s,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Ej(g,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),l!==void 0&&Aj(h,l,d,a,!1)}const c$=()=>({...Ib(),attrs:{}}),Fb=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Mj(e,t,n,r){const i=N.useMemo(()=>{const o=c$();return Ob(o,t,{enableHardwareAcceleration:!1},Fb(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};l$(o,e.style,e),i.style={...o,...i.style}}return i}function Lj(e=!1){return(n,r,i,{latestValues:o},l)=>{const a=(Rb(n)?Mj:xj)(r,o,l,n),s={...kj(r,typeof n=="string",e),...a,ref:i},{children:u}=r,f=N.useMemo(()=>fr(u)?u.get():u,[u]);return N.createElement(n,{...s,children:f})}}const Db=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function d$(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const f$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function h$(e,t,n,r){d$(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(f$.has(i)?i:Db(i),t.attrs[i])}function Nb(e,t){const{style:n}=e,r={};for(const i in n)(fr(n[i])||t.style&&fr(t.style[i])||r$(i,e))&&(r[i]=n[i]);return r}function p$(e,t){const n=Nb(e,t);for(const r in e)if(fr(e[r])||fr(t[r])){const i=vd.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function zb(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function g$(e){const t=N.useRef(null);return t.current===null&&(t.current=e()),t.current}const Kh=e=>Array.isArray(e),Rj=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Pj=e=>Kh(e)?e[e.length-1]||0:e;function Vf(e){const t=fr(e)?e.get():e;return Rj(t)?t.toValue():t}function Ij({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const l={latestValues:Oj(r,i,o,e),renderState:t()};return n&&(l.mount=d=>n(r,d,l)),l}const m$=e=>(t,n)=>{const r=N.useContext(ug),i=N.useContext(md),o=()=>Ij(e,t,r,i);return n?o():g$(o)};function Oj(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Vf(o[f]);let{initial:l,animate:d}=e;const a=fg(e),c=t$(e);t&&c&&!a&&e.inherit!==!1&&(l===void 0&&(l=t.initial),d===void 0&&(d=t.animate));let s=n?n.initial===!1:!1;s=s||l===!1;const u=s?d:l;return u&&typeof u!="boolean"&&!dg(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const p=zb(e,h);if(!p)return;const{transitionEnd:g,transition:w,...x}=p;for(const S in x){let T=x[S];if(Array.isArray(T)){const v=s?T.length-1:0;T=T[v]}T!==null&&(i[S]=T)}for(const S in g)i[S]=g[S]}),i}const Fj={useVisualState:m$({scrapeMotionValuesFromProps:p$,createRenderState:c$,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Ob(n,r,{enableHardwareAcceleration:!1},Fb(t.tagName),e.transformTemplate),h$(t,n)}})},Dj={useVisualState:m$({scrapeMotionValuesFromProps:Nb,createRenderState:Ib})};function Nj(e,{forwardMotionProps:t=!1},n,r){return{...Rb(e)?Fj:Dj,preloadedFeatures:n,useRender:Lj(t),createVisualElement:r,Component:e}}function mo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const v$=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function pg(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const zj=e=>t=>v$(t)&&e(t,pg(t));function So(e,t,n,r){return mo(e,t,zj(n),r)}const Bj=(e,t)=>n=>t(e(n)),ya=(...e)=>e.reduce(Bj);function y$(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const ex=y$("dragHorizontal"),tx=y$("dragVertical");function b$(e){let t=!1;if(e==="y")t=tx();else if(e==="x")t=ex();else{const n=ex(),r=tx();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function w$(){const e=b$(!0);return e?(e(),!1):!0}class Ta{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jj(e){let t=[],n=[],r=0,i=!1,o=!1;const l=new WeakSet,d={schedule:(a,c=!1,s=!1)=>{const u=s&&i,f=u?t:n;return c&&l.add(a),f.indexOf(a)===-1&&(f.push(a),u&&i&&(r=t.length)),a},cancel:a=>{const c=n.indexOf(a);c!==-1&&n.splice(c,1),l.delete(a)},process:a=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const s=t[c];s(a),l.has(s)&&(d.schedule(s),e())}i=!1,o&&(o=!1,d.process(a))}};return d}const Gt={delta:0,timestamp:0,isProcessing:!1},Hj=40;let xy=!0,td=!1;const gg=["read","update","preRender","render","postRender"],Wl=gg.reduce((e,t)=>(e[t]=jj(()=>td=!0),e),{}),Vj=e=>Wl[e].process(Gt),S$=e=>{td=!1,Gt.delta=xy?1e3/60:Math.max(Math.min(e-Gt.timestamp,Hj),1),Gt.timestamp=e,Gt.isProcessing=!0,gg.forEach(Vj),Gt.isProcessing=!1,td&&(xy=!1,requestAnimationFrame(S$))},Wj=()=>{td=!0,xy=!0,Gt.isProcessing||requestAnimationFrame(S$)},Wt=gg.reduce((e,t)=>{const n=Wl[t];return e[t]=(r,i=!1,o=!1)=>(td||Wj(),n.schedule(r,i,o)),e},{});function To(e){gg.forEach(t=>Wl[t].cancel(e))}function nx(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,l)=>{if(o.type==="touch"||w$())return;const d=e.getProps();e.animationState&&d.whileHover&&e.animationState.setActive("whileHover",t),d[r]&&Wt.update(()=>d[r](o,l))};return So(e.current,n,i,{passive:!e.getProps()[r]})}class Uj extends Ta{mount(){this.unmount=ya(nx(this.node,!0),nx(this.node,!1))}unmount(){}}class Gj extends Ta{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ya(mo(this.node.current,"focus",()=>this.onFocus()),mo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const x$=(e,t)=>t?e===t?!0:x$(e,t.parentElement):!1,hn=e=>e;function Pm(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,pg(n))}class Kj extends Ta{constructor(){super(...arguments),this.removeStartListeners=hn,this.removeEndListeners=hn,this.removeAccessibleListeners=hn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=So(window,"pointerup",(d,a)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:s}=this.node.getProps();Wt.update(()=>{x$(this.node.current,d.target)?c&&c(d,a):s&&s(d,a)})},{passive:!(r.onTap||r.onPointerUp)}),l=So(window,"pointercancel",(d,a)=>this.cancelPress(d,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=ya(o,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const l=d=>{d.key!=="Enter"||!this.checkPressEnd()||Pm("up",(a,c)=>{const{onTap:s}=this.node.getProps();s&&Wt.update(()=>s(a,c))})};this.removeEndListeners(),this.removeEndListeners=mo(this.node.current,"keyup",l),Pm("down",(d,a)=>{this.startPress(d,a)})},n=mo(this.node.current,"keydown",t),r=()=>{this.isPressing&&Pm("cancel",(o,l)=>this.cancelPress(o,l))},i=mo(this.node.current,"blur",r);this.removeAccessibleListeners=ya(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Wt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!w$()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Wt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=So(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=mo(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ya(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _y=new WeakMap,Im=new WeakMap,qj=e=>{const t=_y.get(e.target);t&&t(e)},Yj=e=>{e.forEach(qj)};function Xj({root:e,...t}){const n=e||document;Im.has(n)||Im.set(n,{});const r=Im.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Yj,{root:e,...t})),r[i]}function Qj(e,t,n){const r=Xj(t);return _y.set(e,n),r.observe(e),()=>{_y.delete(e),r.unobserve(e)}}const Zj={some:0,all:1};class Jj extends Ta{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Zj[i]},d=a=>{const{isIntersecting:c}=a;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:s,onViewportLeave:u}=this.node.getProps(),f=c?s:u;f&&f(a)};return Qj(this.node.current,l,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(eH(t,n))&&this.startObserver()}unmount(){}}function eH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tH={inView:{Feature:Jj},tap:{Feature:Kj},focus:{Feature:Gj},hover:{Feature:Uj}};function _$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function nH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function rH(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function mg(e,t,n){const r=e.getProps();return zb(r,t,n!==void 0?n:r.custom,nH(e),rH(e))}const iH="framerAppearId",oH="data-"+Db(iH);let aH=hn,Bb=hn;const ba=e=>e*1e3,xo=e=>e/1e3,sH={current:!1},C$=e=>Array.isArray(e)&&typeof e[0]=="number";function k$(e){return!!(!e||typeof e=="string"&&E$[e]||C$(e)||Array.isArray(e)&&e.every(k$))}const ec=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,E$={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ec([0,.65,.55,1]),circOut:ec([.55,0,1,.45]),backIn:ec([.31,.01,.66,-.59]),backOut:ec([.33,1.53,.69,.99])};function $$(e){if(e)return C$(e)?ec(e):Array.isArray(e)?e.map($$):E$[e]}function lH(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:l="loop",ease:d,times:a}={}){const c={[t]:n};a&&(c.offset=a);const s=$$(d);return Array.isArray(s)&&(c.easing=s),e.animate(c,{delay:r,duration:i,easing:Array.isArray(s)?"linear":s,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"})}const rx={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Om={},T$={};for(const e in rx)T$[e]=()=>(Om[e]===void 0&&(Om[e]=rx[e]()),Om[e]);function uH(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const A$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cH=1e-7,dH=12;function fH(e,t,n,r,i){let o,l,d=0;do l=t+(n-t)/2,o=A$(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>cH&&++d<dH);return l}function wd(e,t,n,r){if(e===t&&n===r)return hn;const i=o=>fH(o,0,1,e,n);return o=>o===0||o===1?o:A$(i(o),t,r)}const hH=wd(.42,0,1,1),pH=wd(0,0,.58,1),M$=wd(.42,0,.58,1),gH=e=>Array.isArray(e)&&typeof e[0]!="number",L$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,R$=e=>t=>1-e(1-t),P$=e=>1-Math.sin(Math.acos(e)),jb=R$(P$),mH=L$(jb),I$=wd(.33,1.53,.69,.99),Hb=R$(I$),vH=L$(Hb),yH=e=>(e*=2)<1?.5*Hb(e):.5*(2-Math.pow(2,-10*(e-1))),bH={linear:hn,easeIn:hH,easeInOut:M$,easeOut:pH,circIn:P$,circInOut:mH,circOut:jb,backIn:Hb,backInOut:vH,backOut:I$,anticipate:yH},ix=e=>{if(Array.isArray(e)){Bb(e.length===4);const[t,n,r,i]=e;return wd(t,n,r,i)}else if(typeof e=="string")return bH[e];return e},Vb=(e,t)=>n=>!!(yd(n)&&vj.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),O$=(e,t,n)=>r=>{if(!yd(r))return r;const[i,o,l,d]=r.match(hg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:d!==void 0?parseFloat(d):1}},wH=e=>_a(0,255,e),Fm={...Ms,transform:e=>Math.round(wH(e))},as={test:Vb("rgb","red"),parse:O$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fm.transform(e)+", "+Fm.transform(t)+", "+Fm.transform(n)+", "+wc(bc.transform(r))+")"};function SH(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Cy={test:Vb("#"),parse:SH,transform:as.transform},Tl={test:Vb("hsl","hue"),parse:O$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wi.transform(wc(t))+", "+Wi.transform(wc(n))+", "+wc(bc.transform(r))+")"},Wn={test:e=>as.test(e)||Cy.test(e)||Tl.test(e),parse:e=>as.test(e)?as.parse(e):Tl.test(e)?Tl.parse(e):Cy.parse(e),transform:e=>yd(e)?e:e.hasOwnProperty("red")?as.transform(e):Tl.transform(e)},qt=(e,t,n)=>-n*e+n*t+e;function Dm(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xH({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const d=n<.5?n*(1+t):n+t-n*t,a=2*n-d;i=Dm(a,d,e+1/3),o=Dm(a,d,e),l=Dm(a,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}const Nm=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},_H=[Cy,as,Tl],CH=e=>_H.find(t=>t.test(e));function ox(e){const t=CH(e);let n=t.parse(e);return t===Tl&&(n=xH(n)),n}const F$=(e,t)=>{const n=ox(e),r=ox(t),i={...n};return o=>(i.red=Nm(n.red,r.red,o),i.green=Nm(n.green,r.green,o),i.blue=Nm(n.blue,r.blue,o),i.alpha=qt(n.alpha,r.alpha,o),as.transform(i))};function kH(e){var t,n;return isNaN(e)&&yd(e)&&(((t=e.match(hg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(a$))===null||n===void 0?void 0:n.length)||0)>0}const D$={regex:gj,countKey:"Vars",token:"${v}",parse:hn},N$={regex:a$,countKey:"Colors",token:"${c}",parse:Wn.parse},z$={regex:hg,countKey:"Numbers",token:"${n}",parse:Ms.parse};function zm(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function qh(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&zm(n,D$),zm(n,N$),zm(n,z$),n}function B$(e){return qh(e).values}function j$(e){const{values:t,numColors:n,numVars:r,tokenised:i}=qh(e),o=t.length;return l=>{let d=i;for(let a=0;a<o;a++)a<r?d=d.replace(D$.token,l[a]):a<r+n?d=d.replace(N$.token,Wn.transform(l[a])):d=d.replace(z$.token,wc(l[a]));return d}}const EH=e=>typeof e=="number"?0:e;function $H(e){const t=B$(e);return j$(e)(t.map(EH))}const Ca={test:kH,parse:B$,createTransformer:j$,getAnimatableNone:$H},H$=(e,t)=>n=>`${n>0?t:e}`;function V$(e,t){return typeof e=="number"?n=>qt(e,t,n):Wn.test(e)?F$(e,t):e.startsWith("var(")?H$(e,t):U$(e,t)}const W$=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,l)=>V$(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}},TH=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=V$(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},U$=(e,t)=>{const n=Ca.createTransformer(t),r=qh(e),i=qh(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?ya(W$(r.values,i.values),n):H$(e,t)},nd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ax=(e,t)=>n=>qt(e,t,n);function AH(e){return typeof e=="number"?ax:typeof e=="string"?Wn.test(e)?F$:U$:Array.isArray(e)?W$:typeof e=="object"?TH:ax}function MH(e,t,n){const r=[],i=n||AH(e[0]),o=e.length-1;for(let l=0;l<o;l++){let d=i(e[l],e[l+1]);if(t){const a=Array.isArray(t)?t[l]||hn:t;d=ya(a,d)}r.push(d)}return r}function G$(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Bb(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=MH(t,r,i),d=l.length,a=c=>{let s=0;if(d>1)for(;s<e.length-2&&!(c<e[s+1]);s++);const u=nd(e[s],e[s+1],c);return l[s](u)};return n?c=>a(_a(e[0],e[o-1],c)):a}function LH(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=nd(0,t,r);e.push(qt(n,1,i))}}function RH(e){const t=[0];return LH(t,e.length-1),t}function PH(e,t){return e.map(n=>n*t)}function IH(e,t){return e.map(()=>t||M$).splice(0,e.length-1)}function Yh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=gH(r)?r.map(ix):ix(r),o={done:!1,value:t[0]},l=PH(n&&n.length===t.length?n:RH(t),e),d=G$(l,t,{ease:Array.isArray(i)?i:IH(t,i)});return{calculatedDuration:e,next:a=>(o.value=d(a),o.done=a>=e,o)}}function K$(e,t){return t?e*(1e3/t):0}const OH=5;function q$(e,t,n){const r=Math.max(t-OH,0);return K$(n-e(r),t-r)}const Bm=.001,FH=.01,sx=10,DH=.05,NH=1;function zH({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;aH(e<=ba(sx));let l=1-t;l=_a(DH,NH,l),e=_a(FH,sx,xo(e)),l<1?(i=c=>{const s=c*l,u=s*e,f=s-n,h=ky(c,l),p=Math.exp(-u);return Bm-f/h*p},o=c=>{const u=c*l*e,f=u*n+n,h=Math.pow(l,2)*Math.pow(c,2)*e,p=Math.exp(-u),g=ky(Math.pow(c,2),l);return(-i(c)+Bm>0?-1:1)*((f-h)*p)/g}):(i=c=>{const s=Math.exp(-c*e),u=(c-n)*e+1;return-Bm+s*u},o=c=>{const s=Math.exp(-c*e),u=(n-c)*(e*e);return s*u});const d=5/e,a=jH(i,o,d);if(e=ba(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(a,2)*r;return{stiffness:c,damping:l*2*Math.sqrt(r*c),duration:e}}}const BH=12;function jH(e,t,n){let r=n;for(let i=1;i<BH;i++)r=r-e(r)/t(r);return r}function ky(e,t){return e*Math.sqrt(1-t*t)}const HH=["duration","bounce"],VH=["stiffness","damping","mass"];function lx(e,t){return t.some(n=>e[n]!==void 0)}function WH(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!lx(e,VH)&&lx(e,HH)){const n=zH(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Y$({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],l={done:!1,value:i},{stiffness:d,damping:a,mass:c,velocity:s,duration:u,isResolvedFromDuration:f}=WH(r),h=s?-xo(s):0,p=a/(2*Math.sqrt(d*c)),g=o-i,w=xo(Math.sqrt(d/c)),x=Math.abs(g)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let S;if(p<1){const T=ky(w,p);S=v=>{const b=Math.exp(-p*w*v);return o-b*((h+p*w*g)/T*Math.sin(T*v)+g*Math.cos(T*v))}}else if(p===1)S=T=>o-Math.exp(-w*T)*(g+(h+w*g)*T);else{const T=w*Math.sqrt(p*p-1);S=v=>{const b=Math.exp(-p*w*v),y=Math.min(T*v,300);return o-b*((h+p*w*g)*Math.sinh(y)+T*g*Math.cosh(y))/T}}return{calculatedDuration:f&&u||null,next:T=>{const v=S(T);if(f)l.done=T>=u;else{let b=h;T!==0&&(p<1?b=q$(S,T,v):b=0);const y=Math.abs(b)<=n,m=Math.abs(o-v)<=t;l.done=y&&m}return l.value=l.done?o:v,l}}}function ux({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:d,max:a,restDelta:c=.5,restSpeed:s}){const u=e[0],f={done:!1,value:u},h=E=>d!==void 0&&E<d||a!==void 0&&E>a,p=E=>d===void 0?a:a===void 0||Math.abs(d-E)<Math.abs(a-E)?d:a;let g=n*t;const w=u+g,x=l===void 0?w:l(w);x!==w&&(g=x-u);const S=E=>-g*Math.exp(-E/r),T=E=>x+S(E),v=E=>{const M=S(E),C=T(E);f.done=Math.abs(M)<=c,f.value=f.done?x:C};let b,y;const m=E=>{h(f.value)&&(b=E,y=Y$({keyframes:[f.value,p(f.value)],velocity:q$(T,E,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:s}))};return m(0),{calculatedDuration:null,next:E=>{let M=!1;return!y&&b===void 0&&(M=!0,v(E),m(E)),b!==void 0&&E>b?y.next(E-b):(!M&&v(E),f)}}}const UH=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Wt.update(t,!0),stop:()=>To(t),now:()=>Gt.isProcessing?Gt.timestamp:performance.now()}},cx=2e4;function dx(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<cx;)t+=n,r=e.next(t);return t>=cx?1/0:t}const GH={decay:ux,inertia:ux,tween:Yh,keyframes:Yh,spring:Y$};function Xh({autoplay:e=!0,delay:t=0,driver:n=UH,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:d="loop",onPlay:a,onStop:c,onComplete:s,onUpdate:u,...f}){let h=1,p=!1,g,w;const x=()=>{g&&g(),w=new Promise(q=>{g=q})};x();let S;const T=GH[i]||Yh;let v;T!==Yh&&typeof r[0]!="number"&&(v=G$([0,100],r,{clamp:!1}),r=[0,100]);const b=T({...f,keyframes:r});let y;d==="mirror"&&(y=T({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let m="idle",E=null,M=null,C=null;b.calculatedDuration===null&&o&&(b.calculatedDuration=dx(b));const{calculatedDuration:k}=b;let O=1/0,R=1/0;k!==null&&(O=k+l,R=O*(o+1)-l);let A=0;const I=q=>{if(M===null)return;h>0&&(M=Math.min(M,q)),E!==null?A=E:A=(q-M)*h;const re=A-t,Y=re<0;A=Math.max(re,0),m==="finished"&&E===null&&(A=R);let Z=A,te=b;if(o){const ve=A/O;let Ce=Math.floor(ve),_e=ve%1;!_e&&ve>=1&&(_e=1),_e===1&&Ce--,Ce=Math.min(Ce,o+1);const Re=!!(Ce%2);Re&&(d==="reverse"?(_e=1-_e,l&&(_e-=l/O)):d==="mirror"&&(te=y));let ot=_a(0,1,_e);A>R&&(ot=d==="reverse"&&Re?1:0),Z=ot*O}const ie=Y?{done:!1,value:r[0]}:te.next(Z);v&&(ie.value=v(ie.value));let{done:ce}=ie;!Y&&k!==null&&(ce=A>=R);const he=E===null&&(m==="finished"||m==="running"&&ce||h<0&&A<=0);return u&&u(ie.value),he&&B(),ie},P=()=>{S&&S.stop(),S=void 0},z=()=>{m="idle",P(),x(),M=C=null},B=()=>{m="finished",s&&s(),P(),x()},V=()=>{if(p)return;S||(S=n(I));const q=S.now();a&&a(),E!==null?M=q-E:(!M||m==="finished")&&(M=q),C=M,E=null,m="running",S.start()};e&&V();const K={then(q,re){return w.then(q,re)},get time(){return xo(A)},set time(q){q=ba(q),A=q,E!==null||!S||h===0?E=q:M=S.now()-q/h},get duration(){const q=b.calculatedDuration===null?dx(b):b.calculatedDuration;return xo(q)},get speed(){return h},set speed(q){q===h||!S||(h=q,K.time=xo(A))},get state(){return m},play:V,pause:()=>{m="paused",E=A},stop:()=>{p=!0,m!=="idle"&&(m="idle",c&&c(),z())},cancel:()=>{C!==null&&I(C),z()},complete:()=>{m="finished"},sample:q=>(M=0,I(q))};return K}const KH=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),lf=10,qH=2e4,YH=(e,t)=>t.type==="spring"||e==="backgroundColor"||!k$(t.ease);function XH(e,t,{onUpdate:n,onComplete:r,...i}){if(!(T$.waapi()&&KH.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let l=!1,d,a;const c=()=>{a=new Promise(x=>{d=x})};c();let{keyframes:s,duration:u=300,ease:f,times:h}=i;if(YH(t,i)){const x=Xh({...i,repeat:0,delay:0});let S={done:!1,value:s[0]};const T=[];let v=0;for(;!S.done&&v<qH;)S=x.sample(v),T.push(S.value),v+=lf;h=void 0,s=T,u=v-lf,f="linear"}const p=lH(e.owner.current,t,s,{...i,duration:u,ease:f,times:h}),g=()=>p.cancel(),w=()=>{Wt.update(g),d(),c()};return p.onfinish=()=>{e.set(uH(s,i)),r&&r(),w()},{then(x,S){return a.then(x,S)},get time(){return xo(p.currentTime||0)},set time(x){p.currentTime=ba(x)},get speed(){return p.playbackRate},set speed(x){p.playbackRate=x},get duration(){return xo(u)},play:()=>{l||(p.play(),To(g))},pause:()=>p.pause(),stop:()=>{if(l=!0,p.playState==="idle")return;const{currentTime:x}=p;if(x){const S=Xh({...i,autoplay:!1});e.setWithVelocity(S.sample(x-lf).value,S.sample(x).value,lf)}w()},complete:()=>p.finish(),cancel:w}}function QH({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:hn,pause:hn,stop:hn,then:o=>(o(),Promise.resolve()),cancel:hn,complete:hn});return t?Xh({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const ZH={type:"spring",stiffness:500,damping:25,restSpeed:10},JH=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eV={type:"keyframes",duration:.8},tV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nV=(e,{keyframes:t})=>t.length>2?eV:As.has(e)?e.startsWith("scale")?JH(t[1]):ZH:tV,Ey=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ca.test(t)||t==="0")&&!t.startsWith("url(")),rV=new Set(["brightness","contrast","saturate","opacity"]);function iV(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(hg)||[];if(!r)return e;const i=n.replace(r,"");let o=rV.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const oV=/([a-z-]*)\(.*?\)/g,$y={...Ca,getAnimatableNone:e=>{const t=e.match(oV);return t?t.map(iV).join(" "):e}},aV={...s$,color:Wn,backgroundColor:Wn,outlineColor:Wn,fill:Wn,stroke:Wn,borderColor:Wn,borderTopColor:Wn,borderRightColor:Wn,borderBottomColor:Wn,borderLeftColor:Wn,filter:$y,WebkitFilter:$y},Wb=e=>aV[e];function X$(e,t){let n=Wb(e);return n!==$y&&(n=Ca),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Q$=e=>/^0[^.\s]+$/.test(e);function sV(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Q$(e)}function lV(e,t,n,r){const i=Ey(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const l=r.from!==void 0?r.from:e.get();let d;const a=[];for(let c=0;c<o.length;c++)o[c]===null&&(o[c]=c===0?l:o[c-1]),sV(o[c])&&a.push(c),typeof o[c]=="string"&&o[c]!=="none"&&o[c]!=="0"&&(d=o[c]);if(i&&a.length&&d)for(let c=0;c<a.length;c++){const s=a[c];o[s]=X$(t,d)}return o}function uV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:l,repeatDelay:d,from:a,elapsed:c,...s}){return!!Object.keys(s).length}function Z$(e,t){return e[t]||e.default||e}const Ub=(e,t,n,r={})=>i=>{const o=Z$(r,e)||{},l=o.delay||r.delay||0;let{elapsed:d=0}=r;d=d-ba(l);const a=lV(t,e,n,o),c=a[0],s=a[a.length-1],u=Ey(e,c),f=Ey(e,s);let h={keyframes:a,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-d,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(uV(o)||(h={...h,...nV(e,h)}),h.duration&&(h.duration=ba(h.duration)),h.repeatDelay&&(h.repeatDelay=ba(h.repeatDelay)),!u||!f||sH.current||o.type===!1)return QH(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=XH(t,e,h);if(p)return p}return Xh(h)};function Qh(e){return!!(fr(e)&&e.add)}const cV=e=>/^\-?\d*\.?\d+$/.test(e);function Gb(e,t){e.indexOf(t)===-1&&e.push(t)}function Kb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class qb{constructor(){this.subscriptions=[]}add(t){return Gb(this.subscriptions,t),()=>Kb(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const dV=e=>!isNaN(parseFloat(e));class fV{constructor(t,n={}){this.version="10.12.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:l}=Gt;this.lastUpdated!==l&&(this.timeDelta=o,this.lastUpdated=l,Wt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Wt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=dV(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new qb);const r=this.events[t].add(n);return t==="change"?()=>{r(),Wt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?K$(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function su(e,t){return new fV(e,t)}const J$=e=>t=>t.test(e),hV={test:e=>e==="auto",parse:e=>e},eT=[Ms,qe,Wi,Qo,bj,yj,hV],Du=e=>eT.find(J$(e)),pV=[...eT,Wn,Ca],gV=e=>pV.find(J$(e));function mV(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,su(n))}function vV(e,t){const n=mg(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const l in o){const d=Pj(o[l]);mV(e,l,d)}}function yV(e,t,n){var r,i;const o=Object.keys(t).filter(d=>!e.hasValue(d)),l=o.length;if(l)for(let d=0;d<l;d++){const a=o[d],c=t[a];let s=null;Array.isArray(c)&&(s=c[0]),s===null&&(s=(i=(r=n[a])!==null&&r!==void 0?r:e.readValue(a))!==null&&i!==void 0?i:t[a]),s!=null&&(typeof s=="string"&&(cV(s)||Q$(s))?s=parseFloat(s):!gV(s)&&Ca.test(c)&&(s=X$(a,c)),e.addValue(a,su(s,{owner:e})),n[a]===void 0&&(n[a]=s),s!==null&&e.setBaseTarget(a,s))}}function bV(e,t){return t?(t[e]||t.default||t).from:void 0}function wV(e,t,n){const r={};for(const i in e){const o=bV(i,t);if(o!==void 0)r[i]=o;else{const l=n.getValue(i);l&&(r[i]=l.get())}}return r}function SV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...d}=e.makeTargetAnimatable(t);const a=e.getValue("willChange");r&&(o=r);const c=[],s=i&&e.animationState&&e.animationState.getState()[i];for(const u in d){const f=e.getValue(u),h=d[u];if(!f||h===void 0||s&&SV(s,u))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const w=e.getProps()[oH];w&&(p.elapsed=window.HandoffAppearAnimations(w,u,f,Wt))}f.start(Ub(u,f,h,e.shouldReduceMotion&&As.has(u)?{type:!1}:p));const g=f.animation;Qh(a)&&(a.add(u),g.then(()=>a.remove(u))),c.push(g)}return l&&Promise.all(c).then(()=>{l&&vV(e,l)}),c}function Ty(e,t,n={}){const r=mg(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(tT(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(a=0)=>{const{delayChildren:c=0,staggerChildren:s,staggerDirection:u}=i;return xV(e,t,c+a,s,u,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[a,c]=d==="beforeChildren"?[o,l]:[l,o];return a().then(()=>c())}else return Promise.all([o(),l(n.delay)])}function xV(e,t,n=0,r=0,i=1,o){const l=[],d=(e.variantChildren.size-1)*r,a=i===1?(c=0)=>c*r:(c=0)=>d-c*r;return Array.from(e.variantChildren).sort(_V).forEach((c,s)=>{c.notify("AnimationStart",t),l.push(Ty(c,t,{...o,delay:n+a(s)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(l)}function _V(e,t){return e.sortNodePosition(t)}function CV(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Ty(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Ty(e,t,n);else{const i=typeof t=="function"?mg(e,t,n.custom):t;r=Promise.all(tT(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const kV=[...Ab].reverse(),EV=Ab.length;function $V(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CV(e,n,r)))}function TV(e){let t=$V(e);const n=MV();let r=!0;const i=(a,c)=>{const s=mg(e,c);if(s){const{transition:u,transitionEnd:f,...h}=s;a={...a,...h,...f}}return a};function o(a){t=a(e)}function l(a,c){const s=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},g=1/0;for(let x=0;x<EV;x++){const S=kV[x],T=n[S],v=s[S]!==void 0?s[S]:u[S],b=Jc(v),y=S===c?T.isActive:null;y===!1&&(g=x);let m=v===u[S]&&v!==s[S]&&b;if(m&&r&&e.manuallyAnimateOnMount&&(m=!1),T.protectedKeys={...p},!T.isActive&&y===null||!v&&!T.prevProp||dg(v)||typeof v=="boolean")continue;const E=AV(T.prevProp,v);let M=E||S===c&&T.isActive&&!m&&b||x>g&&b;const C=Array.isArray(v)?v:[v];let k=C.reduce(i,{});y===!1&&(k={});const{prevResolvedValues:O={}}=T,R={...O,...k},A=I=>{M=!0,h.delete(I),T.needsAnimating[I]=!0};for(const I in R){const P=k[I],z=O[I];p.hasOwnProperty(I)||(P!==z?Kh(P)&&Kh(z)?!_$(P,z)||E?A(I):T.protectedKeys[I]=!0:P!==void 0?A(I):h.add(I):P!==void 0&&h.has(I)?A(I):T.protectedKeys[I]=!0)}T.prevProp=v,T.prevResolvedValues=k,T.isActive&&(p={...p,...k}),r&&e.blockInitialAnimation&&(M=!1),M&&!m&&f.push(...C.map(I=>({animation:I,options:{type:S,...a}})))}if(h.size){const x={};h.forEach(S=>{const T=e.getBaseTarget(S);T!==void 0&&(x[S]=T)}),f.push({animation:x})}let w=!!f.length;return r&&s.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function d(a,c,s){var u;if(n[a].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(a,c)}),n[a].isActive=c;const f=l(s,a);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:l,setActive:d,setAnimateFunction:o,getState:()=>n}}function AV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!_$(t,e):!1}function Va(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function MV(){return{animate:Va(!0),whileInView:Va(),whileHover:Va(),whileTap:Va(),whileDrag:Va(),whileFocus:Va(),exit:Va()}}class LV extends Ta{constructor(t){super(t),t.animationState||(t.animationState=TV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),dg(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let RV=0;class PV extends Ta{constructor(){super(...arguments),this.id=RV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const IV={animation:{Feature:LV},exit:{Feature:PV}},fx=(e,t)=>Math.abs(e-t);function OV(e,t){const n=fx(e.x,t.x),r=fx(e.y,t.y);return Math.sqrt(n**2+r**2)}class nT{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Hm(this.lastMoveEventInfo,this.history),s=this.startEvent!==null,u=OV(c.offset,{x:0,y:0})>=3;if(!s&&!u)return;const{point:f}=c,{timestamp:h}=Gt;this.history.push({...f,timestamp:h});const{onStart:p,onMove:g}=this.handlers;s||(p&&p(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,s)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=jm(s,this.transformPagePoint),Wt.update(this.updatePoint,!0)},this.handlePointerUp=(c,s)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:f}=this.handlers,h=Hm(c.type==="pointercancel"?this.lastMoveEventInfo:jm(s,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),f&&f(c,h)},!v$(t))return;this.handlers=n,this.transformPagePoint=r;const i=pg(t),o=jm(i,this.transformPagePoint),{point:l}=o,{timestamp:d}=Gt;this.history=[{...l,timestamp:d}];const{onSessionStart:a}=n;a&&a(t,Hm(o,this.history)),this.removeListeners=ya(So(window,"pointermove",this.handlePointerMove),So(window,"pointerup",this.handlePointerUp),So(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),To(this.updatePoint)}}function jm(e,t){return t?{point:t(e.point)}:e}function hx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Hm({point:e},t){return{point:e,delta:hx(e,rT(t)),offset:hx(e,FV(t)),velocity:DV(t,.1)}}function FV(e){return e[0]}function rT(e){return e[e.length-1]}function DV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=rT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ba(t)));)n--;if(!r)return{x:0,y:0};const o=xo(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function _r(e){return e.max-e.min}function Ay(e,t=0,n=.01){return Math.abs(e-t)<=n}function px(e,t,n,r=.5){e.origin=r,e.originPoint=qt(t.min,t.max,e.origin),e.scale=_r(n)/_r(t),(Ay(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=qt(n.min,n.max,e.origin)-e.originPoint,(Ay(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Sc(e,t,n,r){px(e.x,t.x,n.x,r?r.originX:void 0),px(e.y,t.y,n.y,r?r.originY:void 0)}function gx(e,t,n){e.min=n.min+t.min,e.max=e.min+_r(t)}function NV(e,t,n){gx(e.x,t.x,n.x),gx(e.y,t.y,n.y)}function mx(e,t,n){e.min=t.min-n.min,e.max=e.min+_r(t)}function xc(e,t,n){mx(e.x,t.x,n.x),mx(e.y,t.y,n.y)}function zV(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qt(n,e,r.max):Math.min(e,n)),e}function vx(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function BV(e,{top:t,left:n,bottom:r,right:i}){return{x:vx(e.x,n,i),y:vx(e.y,t,r)}}function yx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function jV(e,t){return{x:yx(e.x,t.x),y:yx(e.y,t.y)}}function HV(e,t){let n=.5;const r=_r(e),i=_r(t);return i>r?n=nd(t.min,t.max-r,e.min):r>i&&(n=nd(e.min,e.max-i,t.min)),_a(0,1,n)}function VV(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const My=.35;function WV(e=My){return e===!1?e=0:e===!0&&(e=My),{x:bx(e,"left","right"),y:bx(e,"top","bottom")}}function bx(e,t,n){return{min:wx(e,t),max:wx(e,n)}}function wx(e,t){return typeof e=="number"?e:e[t]||0}const Sx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Al=()=>({x:Sx(),y:Sx()}),xx=()=>({min:0,max:0}),ln=()=>({x:xx(),y:xx()});function Ri(e){return[e("x"),e("y")]}function iT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function UV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function GV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Vm(e){return e===void 0||e===1}function Ly({scale:e,scaleX:t,scaleY:n}){return!Vm(e)||!Vm(t)||!Vm(n)}function Ka(e){return Ly(e)||oT(e)||e.z||e.rotate||e.rotateX||e.rotateY}function oT(e){return _x(e.x)||_x(e.y)}function _x(e){return e&&e!=="0%"}function Zh(e,t,n){const r=e-n,i=t*r;return n+i}function Cx(e,t,n,r,i){return i!==void 0&&(e=Zh(e,i,r)),Zh(e,n,r)+t}function Ry(e,t=0,n=1,r,i){e.min=Cx(e.min,t,n,r,i),e.max=Cx(e.max,t,n,r,i)}function aT(e,{x:t,y:n}){Ry(e.x,t.translate,t.scale,t.originPoint),Ry(e.y,n.translate,n.scale,n.originPoint)}function KV(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let d=0;d<i;d++){o=n[d],l=o.projectionDelta;const a=o.instance;a&&a.style&&a.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ml(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,aT(e,l)),r&&Ka(o.latestValues)&&Ml(e,o.latestValues))}t.x=kx(t.x),t.y=kx(t.y)}function kx(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function na(e,t){e.min=e.min+t,e.max=e.max+t}function Ex(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,l=qt(e.min,e.max,o);Ry(e,t[n],t[r],l,t.scale)}const qV=["x","scaleX","originX"],YV=["y","scaleY","originY"];function Ml(e,t){Ex(e.x,t,qV),Ex(e.y,t,YV)}function sT(e,t){return iT(GV(e.getBoundingClientRect(),t))}function XV(e,t,n){const r=sT(e,n),{scroll:i}=t;return i&&(na(r.x,i.offset.x),na(r.y,i.offset.y)),r}const QV=new WeakMap;class ZV{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ln(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=a=>{this.stopAnimation(),n&&this.snapToCursor(pg(a,"page").point)},o=(a,c)=>{const{drag:s,dragPropagation:u,onDragStart:f}=this.getProps();if(s&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=b$(s),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ri(p=>{let g=this.getAxisMotionValue(p).get()||0;if(Wi.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[p];x&&(g=_r(x)*(parseFloat(g)/100))}}this.originPoint[p]=g}),f&&Wt.update(()=>f(a,c),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},l=(a,c)=>{const{dragPropagation:s,dragDirectionLock:u,onDirectionLock:f,onDrag:h}=this.getProps();if(!s&&!this.openGlobalLock)return;const{offset:p}=c;if(u&&this.currentDirection===null){this.currentDirection=JV(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),h&&h(a,c)},d=(a,c)=>this.stop(a,c);this.panSession=new nT(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:d},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Wt.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!uf(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=zV(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&$l(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=BV(r.layoutBox,t):this.constraints=!1,this.elastic=WV(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ri(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=VV(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$l(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=XV(r,i.root,this.visualElement.getTransformPagePoint());let l=jV(i.layout.layoutBox,o);if(n){const d=n(UV(l));this.hasMutatedConstraints=!!d,d&&(l=iT(d))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:d}=this.getProps(),a=this.constraints||{},c=Ri(s=>{if(!uf(s,n,this.currentDirection))return;let u=a&&a[s]||{};l&&(u={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[s]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(s,p)});return Promise.all(c).then(d)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Ub(t,r,0,n))}stopAnimation(){Ri(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ri(n=>{const{drag:r}=this.getProps();if(!uf(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:d}=i.layout.layoutBox[n];o.set(t[n]-qt(l,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!$l(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ri(l=>{const d=this.getAxisMotionValue(l);if(d){const a=d.get();i[l]=HV({min:a,max:a},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ri(l=>{if(!uf(l,t,null))return;const d=this.getAxisMotionValue(l),{min:a,max:c}=this.constraints[l];d.set(qt(a,c,i[l]))})}addListeners(){if(!this.visualElement.current)return;QV.set(this.visualElement,this);const t=this.visualElement.current,n=So(t,"pointerdown",a=>{const{drag:c,dragListener:s=!0}=this.getProps();c&&s&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();$l(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const l=mo(window,"resize",()=>this.scalePositionWithinConstraints()),d=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ri(s=>{const u=this.getAxisMotionValue(s);u&&(this.originPoint[s]+=a[s].translate,u.set(u.get()+a[s].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=My,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:d}}}function uf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JV(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class eW extends Ta{constructor(t){super(t),this.removeGroupControls=hn,this.removeListeners=hn,this.controls=new ZV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||hn}unmount(){this.removeGroupControls(),this.removeListeners()}}const $x=e=>(t,n)=>{e&&Wt.update(()=>e(t,n))};class tW extends Ta{constructor(){super(...arguments),this.removePointerDownListener=hn}onPointerDown(t){this.session=new nT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:$x(t),onStart:$x(n),onMove:r,onEnd:(o,l)=>{delete this.session,i&&Wt.update(()=>i(o,l))}}}mount(){this.removePointerDownListener=So(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function lT(){const e=N.useContext(md);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=N.useId();return N.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function nW(){return rW(N.useContext(md))}function rW(e){return e===null?!0:e.isPresent}const Wf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(qe.test(e))e=parseFloat(e);else return e;const n=Tx(e,t.target.x),r=Tx(e,t.target.y);return`${n}% ${r}%`}},iW={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ca.parse(e);if(i.length>5)return r;const o=Ca.createTransformer(e),l=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,a=n.y.scale*t.y;i[0+l]/=d,i[1+l]/=a;const c=qt(d,a,.5);return typeof i[2+l]=="number"&&(i[2+l]/=c),typeof i[3+l]=="number"&&(i[3+l]/=c),o(i)}};class oW extends ut.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;dj(aW),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Wf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,l=r.projection;return l&&(l.isPresent=o,i||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Wt.postRender(()=>{const d=l.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function uT(e){const[t,n]=lT(),r=N.useContext(Lb);return ut.createElement(oW,{...e,layoutGroup:r,switchLayoutGroup:N.useContext(n$),isPresent:t,safeToRemove:n})}const aW={borderRadius:{...Nu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nu,borderTopRightRadius:Nu,borderBottomLeftRadius:Nu,borderBottomRightRadius:Nu,boxShadow:iW},cT=["TopLeft","TopRight","BottomLeft","BottomRight"],sW=cT.length,Ax=e=>typeof e=="string"?parseFloat(e):e,Mx=e=>typeof e=="number"||qe.test(e);function lW(e,t,n,r,i,o){i?(e.opacity=qt(0,n.opacity!==void 0?n.opacity:1,uW(r)),e.opacityExit=qt(t.opacity!==void 0?t.opacity:1,0,cW(r))):o&&(e.opacity=qt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<sW;l++){const d=`border${cT[l]}Radius`;let a=Lx(t,d),c=Lx(n,d);if(a===void 0&&c===void 0)continue;a||(a=0),c||(c=0),a===0||c===0||Mx(a)===Mx(c)?(e[d]=Math.max(qt(Ax(a),Ax(c),r),0),(Wi.test(c)||Wi.test(a))&&(e[d]+="%")):e[d]=c}(t.rotate||n.rotate)&&(e.rotate=qt(t.rotate||0,n.rotate||0,r))}function Lx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uW=dT(0,.5,jb),cW=dT(.5,.95,hn);function dT(e,t,n){return r=>r<e?0:r>t?1:n(nd(e,t,r))}function Rx(e,t){e.min=t.min,e.max=t.max}function Nr(e,t){Rx(e.x,t.x),Rx(e.y,t.y)}function Px(e,t,n,r,i){return e-=t,e=Zh(e,1/n,r),i!==void 0&&(e=Zh(e,1/i,r)),e}function dW(e,t=0,n=1,r=.5,i,o=e,l=e){if(Wi.test(t)&&(t=parseFloat(t),t=qt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let d=qt(o.min,o.max,r);e===o&&(d-=t),e.min=Px(e.min,t,n,d,i),e.max=Px(e.max,t,n,d,i)}function Ix(e,t,[n,r,i],o,l){dW(e,t[n],t[r],t[i],t.scale,o,l)}const fW=["x","scaleX","originX"],hW=["y","scaleY","originY"];function Ox(e,t,n,r){Ix(e.x,t,fW,n?n.x:void 0,r?r.x:void 0),Ix(e.y,t,hW,n?n.y:void 0,r?r.y:void 0)}function Fx(e){return e.translate===0&&e.scale===1}function fT(e){return Fx(e.x)&&Fx(e.y)}function Py(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Dx(e){return _r(e.x)/_r(e.y)}class pW{constructor(){this.members=[]}add(t){Gb(this.members,t),t.scheduleRender()}remove(t){if(Kb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Nx(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:a,rotateX:c,rotateY:s}=n;a&&(r+=`rotate(${a}deg) `),c&&(r+=`rotateX(${c}deg) `),s&&(r+=`rotateY(${s}deg) `)}const l=e.x.scale*t.x,d=e.y.scale*t.y;return(l!==1||d!==1)&&(r+=`scale(${l}, ${d})`),r||"none"}const gW=(e,t)=>e.depth-t.depth;class mW{constructor(){this.children=[],this.isDirty=!1}add(t){Gb(this.children,t),this.isDirty=!0}remove(t){Kb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gW),this.isDirty=!1,this.children.forEach(t)}}function vW(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(To(r),e(o-t))};return Wt.read(r,!0),()=>To(r)}function yW(e){window.MotionDebug&&window.MotionDebug.record(e)}function bW(e){return e instanceof SVGElement&&e.tagName!=="svg"}function wW(e,t,n){const r=fr(e)?e:su(e);return r.start(Ub("",r,t,n)),r.animation}const zx=["","X","Y","Z"],Bx=1e3;let SW=0;const qa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function hT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},d=t==null?void 0:t()){this.id=SW++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{qa.totalNodes=qa.resolvedTargetDeltas=qa.recalculatedProjection=0,this.nodes.forEach(CW),this.nodes.forEach(AW),this.nodes.forEach(MW),this.nodes.forEach(kW),yW(qa)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new mW)}addEventListener(l,d){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new qb),this.eventHandlers.get(l).add(d)}notifyListeners(l,...d){const a=this.eventHandlers.get(l);a&&a.notify(...d)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,d=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=bW(l),this.instance=l;const{layoutId:a,layout:c,visualElement:s}=this.options;if(s&&!s.current&&s.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),d&&(c||a)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=vW(f,250),Wf.hasAnimatedSinceResize&&(Wf.hasAnimatedSinceResize=!1,this.nodes.forEach(Hx))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&s&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||s.getDefaultTransition()||OW,{onLayoutAnimationStart:w,onLayoutAnimationComplete:x}=s.getProps(),S=!this.targetLayout||!Py(this.targetLayout,p)||h,T=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,T);const v={...Z$(g,"layout"),onPlay:w,onComplete:x};(s.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v)}else f||Hx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,To(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LW),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let s=0;s<this.path.length;s++){const u=this.path[s];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:d,layout:a}=this.options;if(d===void 0&&!a)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jx);return}this.isUpdating||this.nodes.forEach($W),this.isUpdating=!1,this.nodes.forEach(TW),this.nodes.forEach(xW),this.nodes.forEach(_W),this.clearAllSnapshots();const d=performance.now();Gt.delta=_a(0,1e3/60,d-Gt.timestamp),Gt.timestamp=d,Gt.isProcessing=!0,Wl.update.process(Gt),Wl.preRender.process(Gt),Wl.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(EW),this.sharedNodes.forEach(RW)}scheduleUpdateProjection(){Wt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a<this.path.length;a++)this.path[a].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ln(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let d=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(d=!1),d&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform,d=this.projectionDelta&&!fT(this.projectionDelta),a=this.getTransformTemplate(),c=a?a(this.latestValues,""):void 0,s=c!==this.prevTransformTemplateValue;l&&(d||Ka(this.latestValues)||s)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const d=this.measurePageBox();let a=this.removeElementScroll(d);return l&&(a=this.removeTransform(a)),FW(a),{animationId:this.root.animationId,measuredBox:d,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return ln();const d=l.measureViewportBox(),{scroll:a}=this.root;return a&&(na(d.x,a.offset.x),na(d.y,a.offset.y)),d}removeElementScroll(l){const d=ln();Nr(d,l);for(let a=0;a<this.path.length;a++){const c=this.path[a],{scroll:s,options:u}=c;if(c!==this.root&&s&&u.layoutScroll){if(s.isRoot){Nr(d,l);const{scroll:f}=this.root;f&&(na(d.x,-f.offset.x),na(d.y,-f.offset.y))}na(d.x,s.offset.x),na(d.y,s.offset.y)}}return d}applyTransform(l,d=!1){const a=ln();Nr(a,l);for(let c=0;c<this.path.length;c++){const s=this.path[c];!d&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ml(a,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),Ka(s.latestValues)&&Ml(a,s.latestValues)}return Ka(this.latestValues)&&Ml(a,this.latestValues),a}removeTransform(l){const d=ln();Nr(d,l);for(let a=0;a<this.path.length;a++){const c=this.path[a];if(!c.instance||!Ka(c.latestValues))continue;Ly(c.latestValues)&&c.updateSnapshot();const s=ln(),u=c.measurePageBox();Nr(s,u),Ox(d,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,s)}return Ka(this.latestValues)&&Ox(d,this.latestValues),d}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(l||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ln(),this.relativeTargetOrigin=ln(),xc(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Nr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ln(),this.targetWithTransforms=ln()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nr(this.target,this.layout.layoutBox),aT(this.target,this.targetDelta)):Nr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ln(),this.relativeTargetOrigin=ln(),xc(this.relativeTargetOrigin,this.target,h.target),Nr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}qa.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ly(this.parent.latestValues)||oT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const d=this.getLead(),a=!!this.resumingFrom||this!==d;let c=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(c=!1),c)return;const{layout:s,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||u))return;Nr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;KV(this.layoutCorrected,this.treeScale,this.path,a),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox);const{target:p}=d;if(!p){this.projectionTransform&&(this.projectionDelta=Al(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Al(),this.projectionDeltaWithTransform=Al());const g=this.projectionTransform;Sc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Nx(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==f||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),qa.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,d=!1){const a=this.snapshot,c=a?a.latestValues:{},s={...this.latestValues},u=Al();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const f=ln(),h=a?a.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,w=this.getStack(),x=!w||w.members.length<=1,S=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(IW));this.animationProgress=0;let T;this.mixTargetDelta=v=>{const b=v/1e3;Vx(u.x,l.x,b),Vx(u.y,l.y,b),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),PW(this.relativeTarget,this.relativeTargetOrigin,f,b),T&&Py(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=ln()),Nr(T,this.relativeTarget)),g&&(this.animationValues=s,lW(s,c,this.latestValues,b,S,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(To(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wt.update(()=>{Wf.hasAnimatedSinceResize=!0,this.currentAnimation=wW(0,Bx,{...l,onUpdate:d=>{this.mixTargetDelta(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Bx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:d,target:a,layout:c,latestValues:s}=l;if(!(!d||!a||!c)){if(this!==l&&this.layout&&c&&pT(this.options.animationType,this.layout.layoutBox,c.layoutBox)){a=this.target||ln();const u=_r(this.layout.layoutBox.x);a.x.min=l.target.x.min,a.x.max=a.x.min+u;const f=_r(this.layout.layoutBox.y);a.y.min=l.target.y.min,a.y.max=a.y.min+f}Nr(d,a),Ml(d,s),Sc(this.projectionDeltaWithTransform,this.layoutCorrected,d,s)}}registerSharedNode(l,d){this.sharedNodes.has(l)||this.sharedNodes.set(l,new pW),this.sharedNodes.get(l).add(d);const c=d.options.initialPromotionConfig;d.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(d):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:d}=this.options;return d?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:d}=this.options;return d?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:d,preserveFollowOpacity:a}={}){const c=this.getStack();c&&c.promote(this,a),l&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let d=!1;const{latestValues:a}=l;if((a.rotate||a.rotateX||a.rotateY||a.rotateZ)&&(d=!0),!d)return;const c={};for(let s=0;s<zx.length;s++){const u="rotate"+zx[s];a[u]&&(c[u]=a[u],l.setStaticValue(u,0))}l.render();for(const s in c)l.setStaticValue(s,c[s]);l.scheduleRender()}getProjectionStyles(l={}){var d,a;const c={};if(!this.instance||this.isSVG)return c;if(this.isVisible)c.visibility="";else return{visibility:"hidden"};const s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Vf(l.pointerEvents)||"",c.transform=s?s(this.latestValues,""):"none",c;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Vf(l.pointerEvents)||""),this.hasProjected&&!Ka(this.latestValues)&&(g.transform=s?s({},""):"none",this.hasProjected=!1),g}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),c.transform=Nx(this.projectionDeltaWithTransform,this.treeScale,f),s&&(c.transform=s(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?c.opacity=u===this?(a=(d=f.opacity)!==null&&d!==void 0?d:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Uh){if(f[g]===void 0)continue;const{correct:w,applyTo:x}=Uh[g],S=c.transform==="none"?f[g]:w(f[g],u);if(x){const T=x.length;for(let v=0;v<T;v++)c[x[v]]=S}else c[g]=S}return this.options.layoutId&&(c.pointerEvents=u===this?Vf(l.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var d;return(d=l.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(jx),this.root.sharedNodes.clear()}}}function xW(e){e.updateLayout()}function _W(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=n.source!==e.layout.source;o==="size"?Ri(u=>{const f=l?n.measuredBox[u]:n.layoutBox[u],h=_r(f);f.min=r[u].min,f.max=f.min+h}):pT(o,n.layoutBox,r)&&Ri(u=>{const f=l?n.measuredBox[u]:n.layoutBox[u],h=_r(r[u]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const d=Al();Sc(d,r,n.layoutBox);const a=Al();l?Sc(a,e.applyTransform(i,!0),n.measuredBox):Sc(a,r,n.layoutBox);const c=!fT(d);let s=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:h}=u;if(f&&h){const p=ln();xc(p,n.layoutBox,f.layoutBox);const g=ln();xc(g,r,h.layoutBox),Py(p,g)||(s=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:d,hasLayoutChanged:c,hasRelativeTargetChanged:s})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function CW(e){qa.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kW(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function EW(e){e.clearSnapshot()}function jx(e){e.clearMeasurements()}function $W(e){e.isLayoutDirty=!1}function TW(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AW(e){e.resolveTargetDelta()}function MW(e){e.calcProjection()}function LW(e){e.resetRotation()}function RW(e){e.removeLeadSnapshot()}function Vx(e,t,n){e.translate=qt(t.translate,0,n),e.scale=qt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Wx(e,t,n,r){e.min=qt(t.min,n.min,r),e.max=qt(t.max,n.max,r)}function PW(e,t,n,r){Wx(e.x,t.x,n.x,r),Wx(e.y,t.y,n.y,r)}function IW(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const OW={duration:.45,ease:[.4,0,.1,1]};function Ux(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function FW(e){Ux(e.x),Ux(e.y)}function pT(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ay(Dx(t),Dx(n),.2)}const DW=hT({attachResizeListener:(e,t)=>mo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wm={current:void 0},gT=hT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wm.current){const e=new DW({});e.mount(window),e.setOptions({layoutScroll:!0}),Wm.current=e}return Wm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),NW={pan:{Feature:tW},drag:{Feature:eW,ProjectionNode:gT,MeasureLayout:uT}},zW=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function BW(e){const t=zW.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Iy(e,t,n=1){const[r,i]=BW(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():Sy(i)?Iy(i,t,n+1):i}function jW(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Sy(o))return;const l=Iy(o,r);l&&i.set(l)});for(const i in t){const o=t[i];if(!Sy(o))continue;const l=Iy(o,r);l&&(t[i]=l,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const HW=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),mT=e=>HW.has(e),VW=e=>Object.keys(e).some(mT),Gx=e=>e===Ms||e===qe,Kx=(e,t)=>parseFloat(e.split(", ")[t]),qx=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Kx(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?Kx(o[1],e):0}},WW=new Set(["x","y","z"]),UW=vd.filter(e=>!WW.has(e));function GW(e){const t=[];return UW.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Yx={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:qx(4,13),y:qx(5,14)},KW=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:l}=o,d={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{d[c]=Yx[c](r,o)}),t.render();const a=t.measureViewportBox();return n.forEach(c=>{const s=t.getValue(c);s&&s.jump(d[c]),e[c]=Yx[c](a,o)}),e},qW=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(mT);let o=[],l=!1;const d=[];if(i.forEach(a=>{const c=e.getValue(a);if(!e.hasValue(a))return;let s=n[a],u=Du(s);const f=t[a];let h;if(Kh(f)){const p=f.length,g=f[0]===null?1:0;s=f[g],u=Du(s);for(let w=g;w<p&&f[w]!==null;w++)h?Bb(Du(f[w])===h):h=Du(f[w])}else h=Du(f);if(u!==h)if(Gx(u)&&Gx(h)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof f=="string"?t[a]=parseFloat(f):Array.isArray(f)&&h===qe&&(t[a]=f.map(parseFloat))}else u!=null&&u.transform&&(h!=null&&h.transform)&&(s===0||f===0)?s===0?c.set(h.transform(s)):t[a]=u.transform(f):(l||(o=GW(e),l=!0),d.push(a),r[a]=r[a]!==void 0?r[a]:t[a],c.jump(f))}),d.length){const a=d.indexOf("height")>=0?window.pageYOffset:null,c=KW(t,e,d);return o.length&&o.forEach(([s,u])=>{e.getValue(s).set(u)}),e.render(),cg&&a!==null&&window.scrollTo({top:a}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function YW(e,t,n,r){return VW(t)?qW(e,t,n,r):{target:t,transitionEnd:r}}const XW=(e,t,n,r)=>{const i=jW(e,t,r);return t=i.target,r=i.transitionEnd,YW(e,t,n,r)},Oy={current:null},vT={current:!1};function QW(){if(vT.current=!0,!!cg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Oy.current=e.matches;e.addListener(t),t()}else Oy.current=!1}function ZW(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],l=n[i];if(fr(o))e.addValue(i,o),Qh(r)&&r.add(i);else if(fr(l))e.addValue(i,su(o,{owner:e})),Qh(r)&&r.remove(i);else if(l!==o)if(e.hasValue(i)){const d=e.getValue(i);!d.hasAnimated&&d.set(o)}else{const d=e.getStaticValue(i);e.addValue(i,su(d!==void 0?d:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Xx=new WeakMap,yT=Object.keys(ed),JW=yT.length,Qx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],e9=Mb.length;class t9{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Wt.render(this.render,!1,!0);const{latestValues:d,renderState:a}=o;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=a,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.isControllingVariants=fg(n),this.isVariantNode=t$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...s}=this.scrapeMotionValuesFromProps(n,{});for(const u in s){const f=s[u];d[u]!==void 0&&fr(f)&&(f.set(d[u],!1),Qh(c)&&c.add(u))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Xx.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),vT.current||QW(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Oy.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xx.delete(this.current),this.projection&&this.projection.unmount(),To(this.notifyUpdate),To(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=As.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Wt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let l,d;for(let a=0;a<JW;a++){const c=yT[a],{isEnabled:s,Feature:u,ProjectionNode:f,MeasureLayout:h}=ed[c];f&&(l=f),s(n)&&(!this.features[c]&&u&&(this.features[c]=new u(this)),h&&(d=h))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:a,layout:c,drag:s,dragConstraints:u,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:a,layout:c,alwaysMeasureLayout:!!s||u&&$l(u),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return d}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ln()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qx.length;r++){const i=Qx[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=ZW(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<e9;r++){const i=Mb[r],o=this.props[i];(Jc(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=su(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=zb(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!fr(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new qb),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class bT extends t9{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let l=wV(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),l&&(l=i(l))),o){yV(this,r,l);const d=XW(this,r,l,n);n=d.transitionEnd,r=d.target}return{transition:t,transitionEnd:n,...r}}}function n9(e){return window.getComputedStyle(e)}class r9 extends bT{readValueFromInstance(t,n){if(As.has(n)){const r=Wb(n);return r&&r.default||0}else{const r=n9(t),i=(o$(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return sT(t,n)}build(t,n,r,i){Pb(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Nb(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){d$(t,n,r,i)}}class i9 extends bT{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(As.has(n)){const r=Wb(n);return r&&r.default||0}return n=f$.has(n)?n:Db(n),t.getAttribute(n)}measureInstanceViewportBox(){return ln()}scrapeMotionValuesFromProps(t,n){return p$(t,n)}build(t,n,r,i){Ob(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){h$(t,n,r,i)}mount(t){this.isSVGTag=Fb(t.tagName),super.mount(t)}}const o9=(e,t)=>Rb(e)?new i9(t,{enableHardwareAcceleration:!1}):new r9(t,{enableHardwareAcceleration:!0}),a9={layout:{ProjectionNode:gT,MeasureLayout:uT}},s9={...IV,...tH,...NW,...a9},vu=uj((e,t)=>Nj(e,t,s9,o9));function wT(){const e=N.useRef(!1);return Wh(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function l9(){const e=wT(),[t,n]=N.useState(0),r=N.useCallback(()=>{e.current&&n(t+1)},[t]);return[N.useCallback(()=>Wt.postRender(r),[r]),t]}class u9 extends N.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function c9({children:e,isPresent:t}){const n=N.useId(),r=N.useRef(null),i=N.useRef({width:0,height:0,top:0,left:0});return N.useInsertionEffect(()=>{const{width:o,height:l,top:d,left:a}=i.current;if(t||!r.current||!o||!l)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${l}px !important;
top: ${d}px !important;
left: ${a}px !important;
}
`),()=>{document.head.removeChild(c)}},[t]),N.createElement(u9,{isPresent:t,childRef:r,sizeRef:i},N.cloneElement(e,{ref:r}))}const Um=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:l})=>{const d=g$(d9),a=N.useId(),c=N.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:s=>{d.set(s,!0);for(const u of d.values())if(!u)return;r&&r()},register:s=>(d.set(s,!1),()=>d.delete(s))}),o?void 0:[n]);return N.useMemo(()=>{d.forEach((s,u)=>d.set(u,!1))},[n]),N.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),l==="popLayout"&&(e=N.createElement(c9,{isPresent:n},e)),N.createElement(md.Provider,{value:c},e)};function d9(){return new Map}function f9(e){return N.useEffect(()=>()=>e(),[])}const cl=e=>e.key||"";function h9(e,t){e.forEach(n=>{const r=cl(n);t.set(r,n)})}function p9(e){const t=[];return N.Children.forEach(e,n=>{N.isValidElement(n)&&t.push(n)}),t}const Sd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:l="sync"})=>{const d=N.useContext(Lb).forceRender||l9()[0],a=wT(),c=p9(e);let s=c;const u=N.useRef(new Map).current,f=N.useRef(s),h=N.useRef(new Map).current,p=N.useRef(!0);if(Wh(()=>{p.current=!1,h9(c,h),f.current=s}),f9(()=>{p.current=!0,h.clear(),u.clear()}),p.current)return N.createElement(N.Fragment,null,s.map(S=>N.createElement(Um,{key:cl(S),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:l},S)));s=[...s];const g=f.current.map(cl),w=c.map(cl),x=g.length;for(let S=0;S<x;S++){const T=g[S];w.indexOf(T)===-1&&!u.has(T)&&u.set(T,void 0)}return l==="wait"&&u.size&&(s=[]),u.forEach((S,T)=>{if(w.indexOf(T)!==-1)return;const v=h.get(T);if(!v)return;const b=g.indexOf(T);let y=S;if(!y){const m=()=>{h.delete(T),u.delete(T);const E=f.current.findIndex(M=>M.key===T);if(f.current.splice(E,1),!u.size){if(f.current=c,a.current===!1)return;d(),r&&r()}};y=N.createElement(Um,{key:cl(v),isPresent:!1,onExitComplete:m,custom:t,presenceAffectsLayout:o,mode:l},v),u.set(T,y)}s.splice(b,0,y)}),s=s.map(S=>{const T=S.key;return u.has(T)?S:N.createElement(Um,{key:cl(S),isPresent:!0,presenceAffectsLayout:o,mode:l},S)}),N.createElement(N.Fragment,null,u.size?s:s.map(S=>N.cloneElement(S)))};var g9={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},ST=N.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:l="bottom",duration:d=5e3,containerStyle:a,motionVariants:c=g9,toastSpacing:s="0.5rem"}=e,[u,f]=N.useState(d),h=nW();Vh(()=>{h||r==null||r()},[h]),Vh(()=>{f(d)},[d]);const p=()=>f(null),g=()=>f(d),w=()=>{h&&i()};N.useEffect(()=>{h&&o&&i()},[h,o,i]),ej(w,u);const x=N.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:s,...a}),[a,s]),S=N.useMemo(()=>ZB(l),[l]);return W.jsx(vu.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:l},style:S,children:W.jsx(rt.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:x,children:la(n,{id:t,onClose:w})})})});ST.displayName="ToastComponent";var Zx={path:W.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[W.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),W.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),W.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ls=mt((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:l,className:d,__css:a,...c}=e,s=_t("chakra-icon",d),u=lg("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...a,...u},h={ref:t,focusable:o,className:s,__css:f},p=r??Zx.viewBox;if(n&&typeof n!="string")return W.jsx(rt.svg,{as:n,...h,...c});const g=l??Zx.path;return W.jsx(rt.svg,{verticalAlign:"middle",viewBox:p,...h,...c,children:g})});Ls.displayName="Icon";function m9(e){return W.jsx(Ls,{viewBox:"0 0 24 24",...e,children:W.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function v9(e){return W.jsx(Ls,{viewBox:"0 0 24 24",...e,children:W.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function Jx(e){return W.jsx(Ls,{viewBox:"0 0 24 24",...e,children:W.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var y9=hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),xT=mt((e,t)=>{const n=lg("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:l="transparent",className:d,...a}=vi(e),c=_t("chakra-spinner",d),s={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:l,borderLeftColor:l,animation:`${y9} ${o} linear infinite`,...n};return W.jsx(rt.div,{ref:t,__css:s,className:c,...a,children:r&&W.jsx(rt.span,{srOnly:!0,children:r})})});xT.displayName="Spinner";var[b9,Yb]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[w9,Xb]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),_T={info:{icon:v9,colorScheme:"blue"},warning:{icon:Jx,colorScheme:"orange"},success:{icon:m9,colorScheme:"green"},error:{icon:Jx,colorScheme:"red"},loading:{icon:xT,colorScheme:"blue"}};function S9(e){return _T[e].colorScheme}function x9(e){return _T[e].icon}var CT=mt(function(t,n){const r=Xb(),{status:i}=Yb(),o={display:"inline",...r.description};return W.jsx(rt.div,{ref:n,"data-status":i,...t,className:_t("chakra-alert__desc",t.className),__css:o})});CT.displayName="AlertDescription";function kT(e){const{status:t}=Yb(),n=x9(t),r=Xb(),i=t==="loading"?r.spinner:r.icon;return W.jsx(rt.span,{display:"inherit","data-status":t,...e,className:_t("chakra-alert__icon",e.className),__css:i,children:e.children||W.jsx(n,{h:"100%",w:"100%"})})}kT.displayName="AlertIcon";var ET=mt(function(t,n){const r=Xb(),{status:i}=Yb();return W.jsx(rt.div,{ref:n,"data-status":i,...t,className:_t("chakra-alert__title",t.className),__css:r.title})});ET.displayName="AlertTitle";var $T=mt(function(t,n){var r;const{status:i="info",addRole:o=!0,...l}=vi(t),d=(r=t.colorScheme)!=null?r:S9(i),a=Lo("Alert",{...t,colorScheme:d}),c={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...a.container};return W.jsx(b9,{value:{status:i},children:W.jsx(w9,{value:a,children:W.jsx(rt.div,{"data-status":i,role:o?"alert":void 0,ref:n,...l,className:_t("chakra-alert",t.className),__css:c})})})});$T.displayName="Alert";function _9(e){return W.jsx(Ls,{focusable:"false","aria-hidden":!0,...e,children:W.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var TT=mt(function(t,n){const r=lg("CloseButton",t),{children:i,isDisabled:o,__css:l,...d}=vi(t),a={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return W.jsx(rt.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...a,...r,...l},...d,children:i||W.jsx(_9,{width:"1em",height:"1em"})})});TT.displayName="CloseButton";var C9={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},_c=k9(C9);function k9(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(l=>({...l,[o]:l[o].filter(d=>d.id!=i)}))},notify:(i,o)=>{const l=E9(i,o),{position:d,id:a}=l;return r(c=>{var s,u;const h=d.includes("top")?[l,...(s=c[d])!=null?s:[]]:[...(u=c[d])!=null?u:[],l];return{...c,[d]:h}}),a},update:(i,o)=>{i&&r(l=>{const d={...l},{position:a,index:c}=qS(d,i);return a&&c!==-1&&(d[a][c]={...d[a][c],...o,message:T9(o)}),d})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((a,c)=>(a[c]=o[c].map(s=>({...s,requestClose:!0})),a),{...o}))},close:i=>{r(o=>{const l=Z2(o,i);return l?{...o,[l]:o[l].map(d=>d.id==i?{...d,requestClose:!0}:d)}:o})},isActive:i=>!!qS(_c.getState(),i).position}}var e_=0;function E9(e,t={}){var n,r;e_+=1;const i=(n=t.id)!=null?n:e_,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>_c.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $9=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:l,description:d,colorScheme:a,icon:c}=e,s=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return W.jsxs($T,{addRole:!1,status:t,variant:n,id:s==null?void 0:s.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:a,children:[W.jsx(kT,{children:c}),W.jsxs(rt.div,{flex:"1",maxWidth:"100%",children:[i&&W.jsx(ET,{id:s==null?void 0:s.title,children:i}),d&&W.jsx(CT,{id:s==null?void 0:s.description,display:"block",children:d})]}),o&&W.jsx(TT,{size:"sm",onClick:l,position:"absolute",insetEnd:1,top:1})]})};function T9(e={}){const{render:t,toastComponent:n=$9}=e;return i=>typeof t=="function"?t({...i,...e}):W.jsx(n,{...i,...e})}var[A9,RQ]=xn({name:"ToastOptionsContext",strict:!1}),M9=e=>{const t=N.useSyncExternalStore(_c.subscribe,_c.getState,_c.getState),{motionVariants:n,component:r=ST,portalProps:i}=e,l=Object.keys(t).map(d=>{const a=t[d];return W.jsx("div",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${d}`,style:JB(d),children:W.jsx(Sd,{initial:!1,children:a.map(c=>W.jsx(r,{motionVariants:n,...c},c.id))})},d)});return W.jsx(pd,{...i,children:l})},L9=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return W.jsxs(XB,{theme:r,...o,children:[W.jsx(A9,{value:i==null?void 0:i.defaultOptions,children:n}),W.jsx(M9,{...i})]})},AT=L9(V2),R9=Object.defineProperty,P9=(e,t,n)=>t in e?R9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jt=(e,t,n)=>(P9(e,typeof t!="symbol"?t+"":t,n),n);function t_(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var I9=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function n_(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function r_(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Fy=typeof window<"u"?N.useLayoutEffect:N.useEffect,Jh=e=>e,O9=class{constructor(){Jt(this,"descendants",new Map),Jt(this,"register",e=>{if(e!=null)return I9(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Jt(this,"unregister",e=>{this.descendants.delete(e);const t=t_(Array.from(this.descendants.keys()));this.assignIndex(t)}),Jt(this,"destroy",()=>{this.descendants.clear()}),Jt(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Jt(this,"count",()=>this.descendants.size),Jt(this,"enabledCount",()=>this.enabledValues().length),Jt(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Jt(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Jt(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Jt(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Jt(this,"first",()=>this.item(0)),Jt(this,"firstEnabled",()=>this.enabledItem(0)),Jt(this,"last",()=>this.item(this.descendants.size-1)),Jt(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Jt(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Jt(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Jt(this,"next",(e,t=!0)=>{const n=n_(e,this.count(),t);return this.item(n)}),Jt(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=n_(r,this.enabledCount(),t);return this.enabledItem(i)}),Jt(this,"prev",(e,t=!0)=>{const n=r_(e,this.count()-1,t);return this.item(n)}),Jt(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=r_(r,this.enabledCount()-1,t);return this.enabledItem(i)}),Jt(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=t_(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function F9(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Sr(...e){return t=>{e.forEach(n=>{F9(n,t)})}}function D9(){const e=N.useRef(new O9);return Fy(()=>()=>e.current.destroy()),e.current}var[N9,MT]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function z9(e){const t=MT(),[n,r]=N.useState(-1),i=N.useRef(null);Fy(()=>()=>{i.current&&t.unregister(i.current)},[]),Fy(()=>{if(!i.current)return;const l=Number(i.current.dataset.index);n!=l&&!Number.isNaN(l)&&r(l)});const o=Jh(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Sr(o,i)}}function B9(){return[Jh(N9),()=>Jh(MT()),()=>D9(),i=>z9(i)]}function j9(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(f,h)=>f!==h}=e,o=Gn(r),l=Gn(i),[d,a]=N.useState(n),c=t!==void 0,s=c?t:d,u=Gn(f=>{const p=typeof f=="function"?f(s):f;l(s,p)&&(c||a(p),o(p))},[c,o,s,l]);return[s,u]}var i_={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},gs={enter:{duration:.2,ease:i_.easeOut},exit:{duration:.1,ease:i_.easeIn}},ms={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},H9={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:ms.enter(gs.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:ms.exit(gs.exit,n),transitionEnd:t==null?void 0:t.exit}}},LT={initial:"exit",animate:"enter",exit:"exit",variants:H9},V9=N.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:l,transitionEnd:d,delay:a,...c}=t,s=i||r?"enter":"exit",u=r?i&&r:!0,f={transition:l,transitionEnd:d,delay:a};return W.jsx(Sd,{custom:f,children:u&&W.jsx(vu.div,{ref:n,className:_t("chakra-fade",o),custom:f,...LT,animate:s,...c})})});V9.displayName="Fade";var W9={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:ms.exit(gs.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:ms.enter(gs.enter,n),transitionEnd:e==null?void 0:e.enter}}},RT={initial:"exit",animate:"enter",exit:"exit",variants:W9},U9=N.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:l=.95,className:d,transition:a,transitionEnd:c,delay:s,...u}=t,f=r?i&&r:!0,h=i||r?"enter":"exit",p={initialScale:l,reverse:o,transition:a,transitionEnd:c,delay:s};return W.jsx(Sd,{custom:p,children:f&&W.jsx(vu.div,{ref:n,className:_t("chakra-offset-slide",d),...RT,animate:h,custom:p,...u})})});U9.displayName="ScaleFade";var G9={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:ms.exit(gs.exit,i),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:ms.enter(gs.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var l;const d={x:t,y:e};return{opacity:0,transition:(l=n==null?void 0:n.exit)!=null?l:ms.exit(gs.exit,o),...i?{...d,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...d,...r==null?void 0:r.exit}}}}},Dy={initial:"initial",animate:"enter",exit:"exit",variants:G9},K9=N.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:l,offsetX:d=0,offsetY:a=8,transition:c,transitionEnd:s,delay:u,...f}=t,h=r?i&&r:!0,p=i||r?"enter":"exit",g={offsetX:d,offsetY:a,reverse:o,transition:c,transitionEnd:s,delay:u};return W.jsx(Sd,{custom:g,children:h&&W.jsx(vu.div,{ref:n,className:_t("chakra-offset-slide",l),custom:g,...Dy,animate:p,...f})})});K9.displayName="SlideFade";function Qb(e){return N.Children.toArray(e).filter(t=>N.isValidElement(t))}var[PQ,q9]=xn({name:"CheckboxGroupContext",strict:!1});function Y9(e){const[t,n]=N.useState(e),[r,i]=N.useState(!1);return e!==t&&(i(!0),n(e)),r}function X9(e){return W.jsx(rt.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:W.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function Q9(e){return W.jsx(rt.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:W.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Z9(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?Q9:X9;return n||t?W.jsx(rt.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:W.jsx(i,{...r})}):null}var[J9,PT]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[e7,xd]=xn({strict:!1,name:"FormControlContext"});function t7(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...l}=e,d=N.useId(),a=t||`field-${d}`,c=`${a}-label`,s=`${a}-feedback`,u=`${a}-helptext`,[f,h]=N.useState(!1),[p,g]=N.useState(!1),[w,x]=N.useState(!1),S=N.useCallback((m={},E=null)=>({id:u,...m,ref:Sr(E,M=>{M&&g(!0)})}),[u]),T=N.useCallback((m={},E=null)=>({...m,ref:E,"data-focus":gt(w),"data-disabled":gt(i),"data-invalid":gt(r),"data-readonly":gt(o),id:m.id!==void 0?m.id:c,htmlFor:m.htmlFor!==void 0?m.htmlFor:a}),[a,i,w,r,o,c]),v=N.useCallback((m={},E=null)=>({id:s,...m,ref:Sr(E,M=>{M&&h(!0)}),"aria-live":"polite"}),[s]),b=N.useCallback((m={},E=null)=>({...m,...l,ref:E,role:"group"}),[l]),y=N.useCallback((m={},E=null)=>({...m,ref:E,role:"presentation","aria-hidden":!0,children:m.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!w,onFocus:()=>x(!0),onBlur:()=>x(!1),hasFeedbackText:f,setHasFeedbackText:h,hasHelpText:p,setHasHelpText:g,id:a,labelId:c,feedbackId:s,helpTextId:u,htmlProps:l,getHelpTextProps:S,getErrorMessageProps:v,getRootProps:b,getLabelProps:T,getRequiredIndicatorProps:y}}var tc=mt(function(t,n){const r=Lo("Form",t),i=vi(t),{getRootProps:o,htmlProps:l,...d}=t7(i),a=_t("chakra-form-control",t.className);return W.jsx(e7,{value:d,children:W.jsx(J9,{value:r,children:W.jsx(rt.div,{...o({},n),className:a,__css:r.container})})})});tc.displayName="FormControl";var n7=mt(function(t,n){const r=xd(),i=PT(),o=_t("chakra-form__helper-text",t.className);return W.jsx(rt.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});n7.displayName="FormHelperText";var Ya=mt(function(t,n){var r;const i=lg("FormLabel",t),o=vi(t),{className:l,children:d,requiredIndicator:a=W.jsx(IT,{}),optionalIndicator:c=null,...s}=o,u=xd(),f=(r=u==null?void 0:u.getLabelProps(s,n))!=null?r:{ref:n,...s};return W.jsxs(rt.label,{...f,className:_t("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...i},children:[d,u!=null&&u.isRequired?a:c]})});Ya.displayName="FormLabel";var IT=mt(function(t,n){const r=xd(),i=PT();if(!(r!=null&&r.isRequired))return null;const o=_t("chakra-form__required-indicator",t.className);return W.jsx(rt.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});IT.displayName="RequiredIndicator";function r7(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=Zb(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":bo(n),"aria-required":bo(i),"aria-readonly":bo(r)}}function Zb(e){var t,n,r;const i=xd(),{id:o,disabled:l,readOnly:d,required:a,isRequired:c,isInvalid:s,isReadOnly:u,isDisabled:f,onFocus:h,onBlur:p,...g}=e,w=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&w.push(i.feedbackId),i!=null&&i.hasHelpText&&w.push(i.helpTextId),{...g,"aria-describedby":w.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=l??f)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=d??u)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=a??c)!=null?r:i==null?void 0:i.isRequired,isInvalid:s??(i==null?void 0:i.isInvalid),onFocus:lt(i==null?void 0:i.onFocus,h),onBlur:lt(i==null?void 0:i.onBlur,p)}}var i7={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},o_=!1,_d=null,_s=!1,Ny=!1,zy=new Set;function Jb(e,t){zy.forEach(n=>n(e,t))}var o7=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function a7(e){return!(e.metaKey||!o7&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function a_(e){_s=!0,a7(e)&&(_d="keyboard",Jb("keyboard",e))}function rl(e){if(_d="pointer",e.type==="mousedown"||e.type==="pointerdown"){_s=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;Jb("pointer",e)}}function s7(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function l7(e){s7(e)&&(_s=!0,_d="virtual")}function u7(e){e.target===window||e.target===document||(!_s&&!Ny&&(_d="virtual",Jb("virtual",e)),_s=!1,Ny=!1)}function c7(){_s=!1,Ny=!0}function s_(){return _d!=="pointer"}function d7(){if(typeof window>"u"||o_)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){_s=!0,e.apply(this,n)},document.addEventListener("keydown",a_,!0),document.addEventListener("keyup",a_,!0),document.addEventListener("click",l7,!0),window.addEventListener("focus",u7,!0),window.addEventListener("blur",c7,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",rl,!0),document.addEventListener("pointermove",rl,!0),document.addEventListener("pointerup",rl,!0)):(document.addEventListener("mousedown",rl,!0),document.addEventListener("mousemove",rl,!0),document.addEventListener("mouseup",rl,!0)),o_=!0}function OT(e){d7(),e(s_());const t=()=>e(s_());return zy.add(t),()=>{zy.delete(t)}}function f7(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function h7(e={}){const t=Zb(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:l,onBlur:d,onFocus:a,"aria-describedby":c}=t,{defaultChecked:s,isChecked:u,isFocusable:f,onChange:h,isIndeterminate:p,name:g,value:w,tabIndex:x=void 0,"aria-label":S,"aria-labelledby":T,"aria-invalid":v,...b}=e,y=f7(b,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),m=Gn(h),E=Gn(d),M=Gn(a),[C,k]=N.useState(!1),[O,R]=N.useState(!1),[A,I]=N.useState(!1),[P,z]=N.useState(!1);N.useEffect(()=>OT(k),[]);const B=N.useRef(null),[V,K]=N.useState(!0),[q,re]=N.useState(!!s),Y=u!==void 0,Z=Y?u:q,te=N.useCallback(Te=>{if(r||n){Te.preventDefault();return}Y||re(Z?Te.target.checked:p?!0:Te.target.checked),m==null||m(Te)},[r,n,Z,Y,p,m]);va(()=>{B.current&&(B.current.indeterminate=!!p)},[p]),Vh(()=>{n&&R(!1)},[n,R]),va(()=>{const Te=B.current;Te!=null&&Te.form&&(Te.form.onreset=()=>{re(!!s)})},[]);const ie=n&&!f,ce=N.useCallback(Te=>{Te.key===" "&&z(!0)},[z]),he=N.useCallback(Te=>{Te.key===" "&&z(!1)},[z]);va(()=>{if(!B.current)return;B.current.checked!==Z&&re(B.current.checked)},[B.current]);const ve=N.useCallback((Te={},it=null)=>{const vt=Qt=>{O&&Qt.preventDefault(),z(!0)};return{...Te,ref:it,"data-active":gt(P),"data-hover":gt(A),"data-checked":gt(Z),"data-focus":gt(O),"data-focus-visible":gt(O&&C),"data-indeterminate":gt(p),"data-disabled":gt(n),"data-invalid":gt(o),"data-readonly":gt(r),"aria-hidden":!0,onMouseDown:lt(Te.onMouseDown,vt),onMouseUp:lt(Te.onMouseUp,()=>z(!1)),onMouseEnter:lt(Te.onMouseEnter,()=>I(!0)),onMouseLeave:lt(Te.onMouseLeave,()=>I(!1))}},[P,Z,n,O,C,A,p,o,r]),Ce=N.useCallback((Te={},it=null)=>({...y,...Te,ref:Sr(it,vt=>{vt&&K(vt.tagName==="LABEL")}),onClick:lt(Te.onClick,()=>{var vt;V||((vt=B.current)==null||vt.click(),requestAnimationFrame(()=>{var Qt;(Qt=B.current)==null||Qt.focus({preventScroll:!0})}))}),"data-disabled":gt(n),"data-checked":gt(Z),"data-invalid":gt(o)}),[y,n,Z,o,V]),_e=N.useCallback((Te={},it=null)=>({...Te,ref:Sr(B,it),type:"checkbox",name:g,value:w,id:l,tabIndex:x,onChange:lt(Te.onChange,te),onBlur:lt(Te.onBlur,E,()=>R(!1)),onFocus:lt(Te.onFocus,M,()=>R(!0)),onKeyDown:lt(Te.onKeyDown,ce),onKeyUp:lt(Te.onKeyUp,he),required:i,checked:Z,disabled:ie,readOnly:r,"aria-label":S,"aria-labelledby":T,"aria-invalid":v?!!v:o,"aria-describedby":c,"aria-disabled":n,style:i7}),[g,w,l,te,E,M,ce,he,i,Z,ie,r,S,T,v,o,c,n,x]),Re=N.useCallback((Te={},it=null)=>({...Te,ref:it,onMouseDown:lt(Te.onMouseDown,p7),"data-disabled":gt(n),"data-checked":gt(Z),"data-invalid":gt(o)}),[Z,n,o]);return{state:{isInvalid:o,isFocused:O,isChecked:Z,isActive:P,isHovered:A,isIndeterminate:p,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ce,getCheckboxProps:ve,getInputProps:_e,getLabelProps:Re,htmlProps:y}}function p7(e){e.preventDefault(),e.stopPropagation()}var g7={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},m7={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},v7=hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),y7=hd({from:{opacity:0},to:{opacity:1}}),b7=hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),ai=mt(function(t,n){const r=q9(),i={...r,...t},o=Lo("Checkbox",i),l=vi(t),{spacing:d="0.5rem",className:a,children:c,iconColor:s,iconSize:u,icon:f=W.jsx(Z9,{}),isChecked:h,isDisabled:p=r==null?void 0:r.isDisabled,onChange:g,inputProps:w,...x}=l;let S=h;r!=null&&r.value&&l.value&&(S=r.value.includes(l.value));let T=g;r!=null&&r.onChange&&l.value&&(T=m2(r.onChange,g));const{state:v,getInputProps:b,getCheckboxProps:y,getLabelProps:m,getRootProps:E}=h7({...x,isDisabled:p,isChecked:S,onChange:T}),M=Y9(v.isChecked),C=N.useMemo(()=>({animation:M?v.isIndeterminate?`${y7} 20ms linear, ${b7} 200ms linear`:`${v7} 200ms linear`:void 0,fontSize:u,color:s,...o.icon}),[s,u,M,v.isIndeterminate,o.icon]),k=N.cloneElement(f,{__css:C,isIndeterminate:v.isIndeterminate,isChecked:v.isChecked});return W.jsxs(rt.label,{__css:{...m7,...o.container},className:_t("chakra-checkbox",a),...E(),children:[W.jsx("input",{className:"chakra-checkbox__input",...b(w,n)}),W.jsx(rt.span,{__css:{...g7,...o.control},className:"chakra-checkbox__control",...y(),children:k}),c&&W.jsx(rt.span,{className:"chakra-checkbox__label",...m(),__css:{marginStart:d,...o.label},children:c})]})});ai.displayName="Checkbox";function w7(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function FT(e,t){let n=w7(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function l_(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function S7(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function x7(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:l=Number.MIN_SAFE_INTEGER,max:d=Number.MAX_SAFE_INTEGER,keepWithinRange:a=!0}=e,c=Gn(t),[s,u]=N.useState(()=>{var C;return r==null?"":(C=Gm(r,o,n))!=null?C:""}),f=typeof i<"u",h=f?i:s,p=DT(Zo(h),o),g=n??p,w=N.useCallback(C=>{C!==h&&(f||u(C.toString()),c==null||c(C.toString(),Zo(C)))},[c,f,h]),x=N.useCallback(C=>{let k=C;return a&&(k=S7(k,l,d)),FT(k,g)},[g,a,d,l]),S=N.useCallback((C=o)=>{let k;h===""?k=Zo(C):k=Zo(h)+C,k=x(k),w(k)},[x,o,w,h]),T=N.useCallback((C=o)=>{let k;h===""?k=Zo(-C):k=Zo(h)-C,k=x(k),w(k)},[x,o,w,h]),v=N.useCallback(()=>{var C;let k;r==null?k="":k=(C=Gm(r,o,n))!=null?C:l,w(k)},[r,n,o,w,l]),b=N.useCallback(C=>{var k;const O=(k=Gm(C,o,g))!=null?k:l;w(O)},[g,o,w,l]),y=Zo(h);return{isOutOfRange:y>d||y<l,isAtMax:y===d,isAtMin:y===l,precision:g,value:h,valueAsNumber:y,update:w,reset:v,increment:S,decrement:T,clamp:x,cast:b,setValue:u}}function Zo(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function DT(e,t){return Math.max(l_(t),l_(e))}function Gm(e,t,n){const r=Zo(e);if(Number.isNaN(r))return;const i=DT(r,t);return FT(r,n??i)}function _7(e,t,n,r){const i=Gn(n);return N.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o==null||o.removeEventListener(t,i,r)}}function vg(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var By="data-focus-lock",NT="data-focus-lock-disabled",C7="data-no-focus-lock",k7="data-autofocus-inside",E7="data-no-autofocus";function $7(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function T7(e,t){var n=N.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function zT(e,t){return T7(t||null,function(n){return e.forEach(function(r){return $7(r,n)})})}var Km={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Di=function(){return Di=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Di.apply(this,arguments)};function BT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function A7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function jT(e){return e}function HT(e,t){t===void 0&&(t=jT);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(d){return d!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(d){return o(d)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var d=n;n=[],d.forEach(o),l=n}var a=function(){var s=l;l=[],s.forEach(o)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(s){l.push(s),c()},filter:function(s){return l=l.filter(s),n}}}};return i}function ew(e,t){return t===void 0&&(t=jT),HT(e,t)}function VT(e){e===void 0&&(e={});var t=HT(null);return t.options=Di({async:!0,ssr:!1},e),t}var WT=function(e){var t=e.sideCar,n=BT(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return N.createElement(r,Di({},n))};WT.isSideCarExport=!0;function M7(e,t){return e.useMedium(t),WT}var UT=ew({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),GT=ew(),L7=ew(),R7=VT({async:!0}),P7=[],tw=N.forwardRef(function(t,n){var r,i=N.useState(),o=i[0],l=i[1],d=N.useRef(),a=N.useRef(!1),c=N.useRef(null),s=t.children,u=t.disabled,f=t.noFocusGuards,h=t.persistentFocus,p=t.crossFrame,g=t.autoFocus;t.allowTextSelection;var w=t.group,x=t.className,S=t.whiteList,T=t.hasPositiveIndices,v=t.shards,b=v===void 0?P7:v,y=t.as,m=y===void 0?"div":y,E=t.lockProps,M=E===void 0?{}:E,C=t.sideCar,k=t.returnFocus,O=t.focusOptions,R=t.onActivation,A=t.onDeactivation,I=N.useState({}),P=I[0],z=N.useCallback(function(){c.current=c.current||document&&document.activeElement,d.current&&R&&R(d.current),a.current=!0},[R]),B=N.useCallback(function(){a.current=!1,A&&A(d.current)},[A]);N.useEffect(function(){u||(c.current=null)},[]);var V=N.useCallback(function(ce){var he=c.current;if(he&&he.focus){var ve=typeof k=="function"?k(he):k;if(ve){var Ce=typeof ve=="object"?ve:void 0;c.current=null,ce?Promise.resolve().then(function(){return he.focus(Ce)}):he.focus(Ce)}}},[k]),K=N.useCallback(function(ce){a.current&&UT.useMedium(ce)},[]),q=GT.useMedium,re=N.useCallback(function(ce){d.current!==ce&&(d.current=ce,l(ce))},[]),Y=Ie((r={},r[NT]=u&&"disabled",r[By]=w,r),M),Z=f!==!0,te=Z&&f!=="tail",ie=zT([n,re]);return N.createElement(N.Fragment,null,Z&&[N.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:u?-1:0,style:Km}),T?N.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:u?-1:1,style:Km}):null],!u&&N.createElement(C,{id:P,sideCar:R7,observed:o,disabled:u,persistentFocus:h,crossFrame:p,autoFocus:g,whiteList:S,shards:b,onActivation:z,onDeactivation:B,returnFocus:V,focusOptions:O}),N.createElement(m,Ie({ref:ie},Y,{className:x,onBlur:q,onFocus:K}),s),te&&N.createElement("div",{"data-focus-guard":!0,tabIndex:u?-1:0,style:Km}))});tw.propTypes={};tw.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const KT=tw;function ep(e,t){return ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ep(e,t)}function nw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ep(e,t)}function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function I7(e,t){if(Cs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Cs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qT(e){var t=I7(e,"string");return Cs(t)==="symbol"?t:String(t)}function Ll(e,t,n){return t=qT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O7(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],l;function d(){l=e(o.map(function(c){return c.props})),t(l)}var a=function(c){nw(s,c);function s(){return c.apply(this,arguments)||this}s.peek=function(){return l};var u=s.prototype;return u.componentDidMount=function(){o.push(this),d()},u.componentDidUpdate=function(){d()},u.componentWillUnmount=function(){var h=o.indexOf(this);o.splice(h,1),d()},u.render=function(){return ut.createElement(i,this.props)},s}(N.PureComponent);return Ll(a,"displayName","SideEffect("+n(i)+")"),a}}var Ki=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},tp=function(e){return Array.isArray(e)?e:[e]},YT=function(e){return Array.isArray(e)?e[0]:e},F7=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},XT=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},QT=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},D7=function(e,t){return!e||QT(e)||!F7(e)&&t(XT(e))},ZT=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=D7(t,ZT.bind(void 0,e));return e.set(t,r),r},N7=function(e,t){return e&&!QT(e)?j7(e)?t(XT(e)):!1:!0},JT=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=N7(t,JT.bind(void 0,e));return e.set(t,r),r},eA=function(e){return e.dataset},z7=function(e){return e.tagName==="BUTTON"},tA=function(e){return e.tagName==="INPUT"},nA=function(e){return tA(e)&&e.type==="radio"},B7=function(e){return!((tA(e)||z7(e))&&(e.type==="hidden"||e.disabled))},j7=function(e){var t=e.getAttribute(E7);return![!0,"true",""].includes(t)},rw=function(e){var t;return!!(e&&(!((t=eA(e))===null||t===void 0)&&t.focusGuard))},np=function(e){return!rw(e)},H7=function(e){return!!e},V7=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},rA=function(e,t,n){return Ki(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(V7)},W7=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],iw=W7.join(","),U7="".concat(iw,", [data-focus-guard]"),iA=function(e,t){return Ki((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?U7:iw)?[r]:[],iA(r))},[])},G7=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?yg([e.contentDocument.body],t):[e]},yg=function(e,t){return e.reduce(function(n,r){var i,o=iA(r,t),l=(i=[]).concat.apply(i,o.map(function(d){return G7(d,t)}));return n.concat(l,r.parentNode?Ki(r.parentNode.querySelectorAll(iw)).filter(function(d){return d===r}):[])},[])},K7=function(e){var t=e.querySelectorAll("[".concat(k7,"]"));return Ki(t).map(function(n){return yg([n])}).reduce(function(n,r){return n.concat(r)},[])},ow=function(e,t){return Ki(e).filter(function(n){return ZT(t,n)}).filter(function(n){return B7(n)})},u_=function(e,t){return t===void 0&&(t=new Map),Ki(e).filter(function(n){return JT(t,n)})},jy=function(e,t,n){return rA(ow(yg(e,n),t),!0,n)},c_=function(e,t){return rA(ow(yg(e),t),!1)},q7=function(e,t){return ow(K7(e),t)},Ul=function(e,t){return e.shadowRoot?Ul(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Ki(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var i=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return i?Ul(i,t):!1}return Ul(n,t)})},Y7=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(l,d){return!t.has(d)})},oA=function(e){return e.parentNode?oA(e.parentNode):e},aw=function(e){var t=tp(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(By);return n.push.apply(n,i?Y7(Ki(oA(r).querySelectorAll("[".concat(By,'="').concat(i,'"]:not([').concat(NT,'="disabled"])')))):[r]),n},[])},X7=function(e){try{return e()}catch{return}},rd=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?rd(t.shadowRoot):t instanceof HTMLIFrameElement&&X7(function(){return t.contentWindow.document})?rd(t.contentWindow.document):t}},Q7=function(e,t){return e===t},Z7=function(e,t){return!!Ki(e.querySelectorAll("iframe")).some(function(n){return Q7(n,t)})},aA=function(e,t){return t===void 0&&(t=rd(YT(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:aw(e).some(function(n){return Ul(n,t)||Z7(n,t)})},J7=function(e){e===void 0&&(e=document);var t=rd(e);return t?Ki(e.querySelectorAll("[".concat(C7,"]"))).some(function(n){return Ul(n,t)}):!1},eU=function(e,t){return t.filter(nA).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},sw=function(e,t){return nA(e)&&e.name?eU(e,t):e},tU=function(e){var t=new Set;return e.forEach(function(n){return t.add(sw(n,e))}),e.filter(function(n){return t.has(n)})},d_=function(e){return e[0]&&e.length>1?sw(e[0],e):e[0]},f_=function(e,t){return e.length>1?e.indexOf(sw(e[t],e)):t},sA="NEW_FOCUS",nU=function(e,t,n,r){var i=e.length,o=e[0],l=e[i-1],d=rw(n);if(!(n&&e.indexOf(n)>=0)){var a=n!==void 0?t.indexOf(n):-1,c=r?t.indexOf(r):a,s=r?e.indexOf(r):-1,u=a-c,f=t.indexOf(o),h=t.indexOf(l),p=tU(t),g=n!==void 0?p.indexOf(n):-1,w=g-(r?p.indexOf(r):a),x=f_(e,0),S=f_(e,i-1);if(a===-1||s===-1)return sA;if(!u&&s>=0)return s;if(a<=f&&d&&Math.abs(u)>1)return S;if(a>=h&&d&&Math.abs(u)>1)return x;if(u&&Math.abs(w)>1)return s;if(a<=f)return S;if(a>h)return x;if(u)return Math.abs(u)>1?s:(i+s+u)%i}},rU=function(e){return function(t){var n,r=(n=eA(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},iU=function(e,t,n){var r=e.map(function(o){var l=o.node;return l}),i=u_(r.filter(rU(n)));return i&&i.length?d_(i):d_(u_(t))},Hy=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Hy(e.parentNode.host||e.parentNode,t),t},qm=function(e,t){for(var n=Hy(e),r=Hy(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},lA=function(e,t,n){var r=tp(e),i=tp(t),o=r[0],l=!1;return i.filter(Boolean).forEach(function(d){l=qm(l||d,d)||l,n.filter(Boolean).forEach(function(a){var c=qm(o,a);c&&(!l||Ul(c,l)?l=c:l=qm(c,l))})}),l},oU=function(e,t){return e.reduce(function(n,r){return n.concat(q7(r,t))},[])},aU=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(H7)},sU=function(e,t){var n=rd(tp(e).length>0?document:YT(e).ownerDocument),r=aw(e).filter(np),i=lA(n||e,e,r),o=new Map,l=c_(r,o),d=jy(r,o).filter(function(h){var p=h.node;return np(p)});if(!(!d[0]&&(d=l,!d[0]))){var a=c_([i],o).map(function(h){var p=h.node;return p}),c=aU(a,d),s=c.map(function(h){var p=h.node;return p}),u=nU(s,a,n,t);if(u===sA){var f=iU(l,s,oU(r,o));if(f)return{node:f};console.warn("focus-lock: cannot find any node to move focus into");return}return u===void 0?u:c[u]}},lU=function(e){var t=aw(e).filter(np),n=lA(e,e,t),r=new Map,i=jy([n],r,!0),o=jy(t,r).filter(function(l){var d=l.node;return np(d)}).map(function(l){var d=l.node;return d});return i.map(function(l){var d=l.node,a=l.index;return{node:d,index:a,lockItem:o.indexOf(d)>=0,guard:rw(d)}})},uU=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Ym=0,Xm=!1,uA=function(e,t,n){n===void 0&&(n={});var r=sU(e,t);if(!Xm&&r){if(Ym>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Xm=!0,setTimeout(function(){Xm=!1},1);return}Ym++,uU(r.node,n.focusOptions),Ym--}};function cA(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var cU=function(){return document&&document.activeElement===document.body},dU=function(){return cU()||J7()},Gl=null,Rl=null,Kl=null,id=!1,fU=function(){return!0},hU=function(t){return(Gl.whiteList||fU)(t)},pU=function(t,n){Kl={observerNode:t,portaledElement:n}},gU=function(t){return Kl&&Kl.portaledElement===t};function h_(e,t,n,r){var i=null,o=e;do{var l=r[o];if(l.guard)l.node.dataset.focusAutoGuard&&(i=l);else if(l.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var mU=function(t){return t&&"current"in t?t.current:t},vU=function(t){return t?!!id:id==="meanwhile"},yU=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},bU=function(t,n){return n.some(function(r){return yU(t,r,r)})},rp=function(){var t=!1;if(Gl){var n=Gl,r=n.observed,i=n.persistentFocus,o=n.autoFocus,l=n.shards,d=n.crossFrame,a=n.focusOptions,c=r||Kl&&Kl.portaledElement,s=document&&document.activeElement;if(c){var u=[c].concat(l.map(mU).filter(Boolean));if((!s||hU(s))&&(i||vU(d)||!dU()||!Rl&&o)&&(c&&!(aA(u)||s&&bU(s,u)||gU(s))&&(document&&!Rl&&s&&!o?(s.blur&&s.blur(),document.body.focus()):(t=uA(u,Rl,{focusOptions:a}),Kl={})),id=!1,Rl=document&&document.activeElement),document){var f=document&&document.activeElement,h=lU(u),p=h.map(function(g){var w=g.node;return w}).indexOf(f);p>-1&&(h.filter(function(g){var w=g.guard,x=g.node;return w&&x.dataset.focusAutoGuard}).forEach(function(g){var w=g.node;return w.removeAttribute("tabIndex")}),h_(p,h.length,1,h),h_(p,-1,-1,h))}}}return t},dA=function(t){rp()&&t&&(t.stopPropagation(),t.preventDefault())},lw=function(){return cA(rp)},wU=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||pU(r,n)},SU=function(){return null},fA=function(){id="just",setTimeout(function(){id="meanwhile"},0)},xU=function(){document.addEventListener("focusin",dA),document.addEventListener("focusout",lw),window.addEventListener("blur",fA)},_U=function(){document.removeEventListener("focusin",dA),document.removeEventListener("focusout",lw),window.removeEventListener("blur",fA)};function CU(e){return e.filter(function(t){var n=t.disabled;return!n})}function kU(e){var t=e.slice(-1)[0];t&&!Gl&&xU();var n=Gl,r=n&&t&&t.id===n.id;Gl=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Rl=null,(!r||n.observed!==t.observed)&&t.onActivation(),rp(),cA(rp)):(_U(),Rl=null)}UT.assignSyncMedium(wU);GT.assignMedium(lw);L7.assignMedium(function(e){return e({moveFocusInside:uA,focusInside:aA})});const EU=O7(CU,kU)(SU);var hA=N.forwardRef(function(t,n){return N.createElement(KT,Ie({sideCar:EU,ref:n},t))}),pA=KT.propTypes||{};pA.sideCar;vg(pA,["sideCar"]);hA.propTypes={};const p_=hA;function $U(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function TU(e){var t;if(!$U(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}var AU=e=>e.hasAttribute("tabindex");function MU(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function gA(e){return e.parentElement&&gA(e.parentElement)?!0:e.hidden}function LU(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function RU(e){if(!TU(e)||gA(e)||MU(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():LU(e)?!0:AU(e)}var PU=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],IU=PU.join(),OU=e=>e.offsetWidth>0&&e.offsetHeight>0;function FU(e){const t=Array.from(e.querySelectorAll(IU));return t.unshift(e),t.filter(n=>RU(n)&&OU(n))}var g_,DU=(g_=p_.default)!=null?g_:p_,mA=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:l,autoFocus:d,persistentFocus:a,lockFocusAcrossFrames:c}=e,s=N.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&FU(r.current).length===0&&requestAnimationFrame(()=>{var p;(p=r.current)==null||p.focus()})},[t,r]),u=N.useCallback(()=>{var h;(h=n==null?void 0:n.current)==null||h.focus()},[n]),f=i&&!n;return W.jsx(DU,{crossFrame:c,persistentFocus:a,autoFocus:d,disabled:l,onActivation:s,onDeactivation:u,returnFocus:f,children:o})};mA.displayName="FocusLock";var NU=bB?N.useLayoutEffect:N.useEffect;function m_(e,t=[]){const n=N.useRef(e);return NU(()=>{n.current=e}),N.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function zU(e,t){const n=N.useId();return N.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function BU(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function vA(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=m_(n),l=m_(t),[d,a]=N.useState(e.defaultIsOpen||!1),[c,s]=BU(r,d),u=zU(i,"disclosure"),f=N.useCallback(()=>{c||a(!1),l==null||l()},[c,l]),h=N.useCallback(()=>{c||a(!0),o==null||o()},[c,o]),p=N.useCallback(()=>{(s?f:h)()},[s,h,f]);return{isOpen:!!s,onOpen:h,onClose:f,onToggle:p,isControlled:c,getButtonProps:(g={})=>({...g,"aria-expanded":s,"aria-controls":u,onClick:CB(g.onClick,p)}),getDisclosureProps:(g={})=>({...g,hidden:!s,id:u})}}var[jU,HU]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),Vy=mt(function(t,n){const r=Lo("Input",t),{children:i,className:o,...l}=vi(t),d=_t("chakra-input__group",o),a={},c=Qb(i),s=r.field;c.forEach(f=>{var h,p;r&&(s&&f.type.id==="InputLeftElement"&&(a.paddingStart=(h=s.height)!=null?h:s.h),s&&f.type.id==="InputRightElement"&&(a.paddingEnd=(p=s.height)!=null?p:s.h),f.type.id==="InputRightAddon"&&(a.borderEndRadius=0),f.type.id==="InputLeftAddon"&&(a.borderStartRadius=0))});const u=c.map(f=>{var h,p;const g=OB({size:((h=f.props)==null?void 0:h.size)||t.size,variant:((p=f.props)==null?void 0:p.variant)||t.variant});return f.type.id!=="Input"?N.cloneElement(f,g):N.cloneElement(f,Object.assign(g,a,f.props))});return W.jsx(rt.div,{className:d,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"},"data-group":!0,...l,children:W.jsx(jU,{value:r,children:u})})});Vy.displayName="InputGroup";var VU=rt("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),bg=mt(function(t,n){var r,i;const{placement:o="left",...l}=t,d=HU(),a=d.field,s={[o==="left"?"insetStart":"insetEnd"]:"0",width:(r=a==null?void 0:a.height)!=null?r:a==null?void 0:a.h,height:(i=a==null?void 0:a.height)!=null?i:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...d.element};return W.jsx(VU,{ref:n,__css:s,...l})});bg.id="InputElement";bg.displayName="InputElement";var yA=mt(function(t,n){const{className:r,...i}=t,o=_t("chakra-input__left-element",r);return W.jsx(bg,{ref:n,placement:"left",className:o,...i})});yA.id="InputLeftElement";yA.displayName="InputLeftElement";var ip=mt(function(t,n){const{className:r,...i}=t,o=_t("chakra-input__right-element",r);return W.jsx(bg,{ref:n,placement:"right",className:o,...i})});ip.id="InputRightElement";ip.displayName="InputRightElement";var lu=mt(function(t,n){const{htmlSize:r,...i}=t,o=Lo("Input",i),l=vi(i),d=r7(l),a=_t("chakra-input",t.className);return W.jsx(rt.input,{size:r,...d,__css:o.field,ref:n,className:a})});lu.displayName="Input";lu.id="Input";function WU(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):cr(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var bA=e=>W.jsx(rt.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});bA.displayName="StackItem";function UU(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":WU(n,i=>r[i])}}var Wy=mt((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:l="0.5rem",wrap:d,children:a,divider:c,className:s,shouldWrapChildren:u,...f}=e,h=n?"row":r??"column",p=N.useMemo(()=>UU({spacing:l,direction:h}),[l,h]),g=!!c,w=!u&&!g,x=N.useMemo(()=>{const T=Qb(a);return w?T:T.map((v,b)=>{const y=typeof v.key<"u"?v.key:b,m=b+1===T.length,M=u?W.jsx(bA,{children:v},y):v;if(!g)return M;const C=N.cloneElement(c,{__css:p}),k=m?null:C;return W.jsxs(N.Fragment,{children:[M,k]},y)})},[c,p,g,w,u,a]),S=_t("chakra-stack",s);return W.jsx(rt.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:h,flexWrap:d,gap:g?void 0:l,className:S,...f,children:x})});Wy.displayName="Stack";function GU(){const e=N.useRef(new Map),t=e.current,n=N.useCallback((i,o,l,d)=>{e.current.set(l,{type:o,el:i,options:d}),i.addEventListener(o,l,d)},[]),r=N.useCallback((i,o,l,d)=>{i.removeEventListener(o,l,d),e.current.delete(l)},[]);return N.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Qm(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function KU(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:l,onMouseUp:d,onClick:a,onKeyDown:c,onKeyUp:s,tabIndex:u,onMouseOver:f,onMouseLeave:h,...p}=e,[g,w]=N.useState(!0),[x,S]=N.useState(!1),T=GU(),v=z=>{z&&z.tagName!=="BUTTON"&&w(!1)},b=g?u:u||0,y=n&&!r,m=N.useCallback(z=>{if(n){z.stopPropagation(),z.preventDefault();return}z.currentTarget.focus(),a==null||a(z)},[n,a]),E=N.useCallback(z=>{x&&Qm(z)&&(z.preventDefault(),z.stopPropagation(),S(!1),T.remove(document,"keyup",E,!1))},[x,T]),M=N.useCallback(z=>{if(c==null||c(z),n||z.defaultPrevented||z.metaKey||!Qm(z.nativeEvent)||g)return;const B=i&&z.key==="Enter";o&&z.key===" "&&(z.preventDefault(),S(!0)),B&&(z.preventDefault(),z.currentTarget.click()),T.add(document,"keyup",E,!1)},[n,g,c,i,o,T,E]),C=N.useCallback(z=>{if(s==null||s(z),n||z.defaultPrevented||z.metaKey||!Qm(z.nativeEvent)||g)return;o&&z.key===" "&&(z.preventDefault(),S(!1),z.currentTarget.click())},[o,g,n,s]),k=N.useCallback(z=>{z.button===0&&(S(!1),T.remove(document,"mouseup",k,!1))},[T]),O=N.useCallback(z=>{if(z.button!==0)return;if(n){z.stopPropagation(),z.preventDefault();return}g||S(!0),z.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",k,!1),l==null||l(z)},[n,g,l,T,k]),R=N.useCallback(z=>{z.button===0&&(g||S(!1),d==null||d(z))},[d,g]),A=N.useCallback(z=>{if(n){z.preventDefault();return}f==null||f(z)},[n,f]),I=N.useCallback(z=>{x&&(z.preventDefault(),S(!1)),h==null||h(z)},[x,h]),P=Sr(t,v);return g?{...p,ref:P,type:"button","aria-disabled":y?void 0:n,disabled:y,onClick:m,onMouseDown:l,onMouseUp:d,onKeyUp:s,onKeyDown:c,onMouseOver:f,onMouseLeave:h}:{...p,ref:P,role:"button","data-active":gt(x),"aria-disabled":n?"true":void 0,tabIndex:y?void 0:b,onClick:m,onMouseDown:O,onMouseUp:R,onKeyUp:C,onKeyDown:M,onMouseOver:A,onMouseLeave:I}}function qU(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var YU={slideInBottom:{...Dy,custom:{offsetY:16,reverse:!0}},slideInRight:{...Dy,custom:{offsetX:16,reverse:!0}},scale:{...RT,custom:{initialScale:.95,reverse:!0}},none:{}},XU=rt(vu.section),QU=e=>YU[e||"none"],wA=N.forwardRef((e,t)=>{const{preset:n,motionProps:r=QU(n),...i}=e;return W.jsx(XU,{ref:t,...r,...i})});wA.displayName="ModalTransition";var ZU=Object.defineProperty,JU=(e,t,n)=>t in e?ZU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eG=(e,t,n)=>(JU(e,typeof t!="symbol"?t+"":t,n),n),tG=class{constructor(){eG(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},Uy=new tG;function SA(e,t){const[n,r]=N.useState(0);return N.useEffect(()=>{const i=e.current;if(i){if(t){const o=Uy.add(i);r(o)}return()=>{Uy.remove(i),r(0)}}},[t,e]),n}var nG=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},il=new WeakMap,cf=new WeakMap,df={},Zm=0,xA=function(e){return e&&(e.host||xA(e.parentNode))},rG=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=xA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},iG=function(e,t,n,r){var i=rG(t,Array.isArray(e)?e:[e]);df[n]||(df[n]=new WeakMap);var o=df[n],l=[],d=new Set,a=new Set(i),c=function(u){!u||d.has(u)||(d.add(u),c(u.parentNode))};i.forEach(c);var s=function(u){!u||a.has(u)||Array.prototype.forEach.call(u.children,function(f){if(d.has(f))s(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",g=(il.get(f)||0)+1,w=(o.get(f)||0)+1;il.set(f,g),o.set(f,w),l.push(f),g===1&&p&&cf.set(f,!0),w===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return s(t),d.clear(),Zm++,function(){l.forEach(function(u){var f=il.get(u)-1,h=o.get(u)-1;il.set(u,f),o.set(u,h),f||(cf.has(u)||u.removeAttribute(r),cf.delete(u)),h||u.removeAttribute(n)}),Zm--,Zm||(il=new WeakMap,il=new WeakMap,cf=new WeakMap,df={})}},oG=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||nG(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),iG(r,i,n,"aria-hidden")):function(){return null}};function aG(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:l=!0,onOverlayClick:d,onEsc:a}=e,c=N.useRef(null),s=N.useRef(null),[u,f,h]=lG(r,"chakra-modal","chakra-modal--header","chakra-modal--body");sG(c,t&&l);const p=SA(c,t),g=N.useRef(null),w=N.useCallback(M=>{g.current=M.target},[]),x=N.useCallback(M=>{M.key==="Escape"&&(M.stopPropagation(),o&&(n==null||n()),a==null||a())},[o,n,a]),[S,T]=N.useState(!1),[v,b]=N.useState(!1),y=N.useCallback((M={},C=null)=>({role:"dialog",...M,ref:Sr(C,c),id:u,tabIndex:-1,"aria-modal":!0,"aria-labelledby":S?f:void 0,"aria-describedby":v?h:void 0,onClick:lt(M.onClick,k=>k.stopPropagation())}),[h,v,u,f,S]),m=N.useCallback(M=>{M.stopPropagation(),g.current===M.target&&Uy.isTopModal(c.current)&&(i&&(n==null||n()),d==null||d())},[n,i,d]),E=N.useCallback((M={},C=null)=>({...M,ref:Sr(C,s),onClick:lt(M.onClick,m),onKeyDown:lt(M.onKeyDown,x),onMouseDown:lt(M.onMouseDown,w)}),[x,w,m]);return{isOpen:t,onClose:n,headerId:f,bodyId:h,setBodyMounted:b,setHeaderMounted:T,dialogRef:c,overlayRef:s,getDialogProps:y,getDialogContainerProps:E,index:p}}function sG(e,t){const n=e.current;N.useEffect(()=>{if(!(!e.current||!t))return oG(e.current)},[t,e,n])}function lG(e,...t){const n=N.useId(),r=e||n;return N.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[uG,Cd]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[cG,uu]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),_A=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:i,trapFocus:o,initialFocusRef:l,finalFocusRef:d,returnFocusOnClose:a,blockScrollOnMount:c,allowPinchZoom:s,preserveScrollBarGap:u,motionPreset:f,lockFocusAcrossFrames:h,onCloseComplete:p}=t,g=Lo("Modal",t),x={...aG(t),autoFocus:i,trapFocus:o,initialFocusRef:l,finalFocusRef:d,returnFocusOnClose:a,blockScrollOnMount:c,allowPinchZoom:s,preserveScrollBarGap:u,motionPreset:f,lockFocusAcrossFrames:h};return W.jsx(cG,{value:x,children:W.jsx(uG,{value:g,children:W.jsx(Sd,{onExitComplete:p,children:x.isOpen&&W.jsx(pd,{...n,children:r})})})})};_A.displayName="Modal";var Uf="right-scroll-bar-position",Gf="width-before-scroll-bar",dG="with-scroll-bars-hidden",fG="--removed-body-scroll-bar-size",CA=VT(),Jm=function(){},wg=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:Jm,onWheelCapture:Jm,onTouchMoveCapture:Jm}),i=r[0],o=r[1],l=e.forwardProps,d=e.children,a=e.className,c=e.removeScrollBar,s=e.enabled,u=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,g=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,S=e.gapMode,T=BT(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=f,b=zT([n,t]),y=Di(Di({},T),i);return N.createElement(N.Fragment,null,s&&N.createElement(v,{sideCar:CA,removeScrollBar:c,shards:u,noIsolation:h,inert:p,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:S}),l?N.cloneElement(N.Children.only(d),Di(Di({},y),{ref:b})):N.createElement(x,Di({},y,{className:a,ref:b}),d))});wg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wg.classNames={fullWidth:Gf,zeroRight:Uf};var v_,hG=function(){if(v_)return v_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hG();return t&&e.setAttribute("nonce",t),e}function gG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pG())&&(gG(t,n),mG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yG=function(){var e=vG();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kA=function(){var e=yG(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},bG={left:0,top:0,right:0,gap:0},ev=function(e){return parseInt(e||"",10)||0},wG=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[ev(n),ev(r),ev(i)]},SG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bG;var t=wG(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xG=kA(),_G=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,d=e.gap;return n===void 0&&(n="margin"),`
.`.concat(dG,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(d,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(l,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(d,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Uf,` {
right: `).concat(d,"px ").concat(r,`;
}
.`).concat(Gf,` {
margin-right: `).concat(d,"px ").concat(r,`;
}
.`).concat(Uf," .").concat(Uf,` {
right: 0 `).concat(r,`;
}
.`).concat(Gf," .").concat(Gf,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(fG,": ").concat(d,`px;
}
`)},CG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=N.useMemo(function(){return SG(i)},[i]);return N.createElement(xG,{styles:_G(o,!t,i,n?"":"!important")})},Gy=!1;if(typeof window<"u")try{var ff=Object.defineProperty({},"passive",{get:function(){return Gy=!0,!0}});window.addEventListener("test",ff,ff),window.removeEventListener("test",ff,ff)}catch{Gy=!1}var ol=Gy?{passive:!1}:!1,kG=function(e){return e.tagName==="TEXTAREA"},EA=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!kG(e)&&n[t]==="visible")},EG=function(e){return EA(e,"overflowY")},$G=function(e){return EA(e,"overflowX")},y_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=$A(e,r);if(i){var o=TA(e,r),l=o[1],d=o[2];if(l>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},AG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$A=function(e,t){return e==="v"?EG(t):$G(t)},TA=function(e,t){return e==="v"?TG(t):AG(t)},MG=function(e,t){return e==="h"&&t==="rtl"?-1:1},LG=function(e,t,n,r,i){var o=MG(e,window.getComputedStyle(t).direction),l=o*r,d=n.target,a=t.contains(d),c=!1,s=l>0,u=0,f=0;do{var h=TA(e,d),p=h[0],g=h[1],w=h[2],x=g-w-o*p;(p||x)&&$A(e,d)&&(u+=x,f+=p),d=d.parentNode}while(!a&&d!==document.body||a&&(t.contains(d)||t===d));return(s&&(i&&u===0||!i&&l>u)||!s&&(i&&f===0||!i&&-l>f))&&(c=!0),c},hf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},b_=function(e){return[e.deltaX,e.deltaY]},w_=function(e){return e&&"current"in e?e.current:e},RG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},PG=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},IG=0,al=[];function OG(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(IG++)[0],o=N.useState(kA)[0],l=N.useRef(e);N.useEffect(function(){l.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=A7([e.lockRef.current],(e.shards||[]).map(w_),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=N.useCallback(function(g,w){if("touches"in g&&g.touches.length===2)return!l.current.allowPinchZoom;var x=hf(g),S=n.current,T="deltaX"in g?g.deltaX:S[0]-x[0],v="deltaY"in g?g.deltaY:S[1]-x[1],b,y=g.target,m=Math.abs(T)>Math.abs(v)?"h":"v";if("touches"in g&&m==="h"&&y.type==="range")return!1;var E=y_(m,y);if(!E)return!0;if(E?b=m:(b=m==="v"?"h":"v",E=y_(m,y)),!E)return!1;if(!r.current&&"changedTouches"in g&&(T||v)&&(r.current=b),!b)return!0;var M=r.current||b;return LG(M,w,g,M==="h"?T:v,!0)},[]),a=N.useCallback(function(g){var w=g;if(!(!al.length||al[al.length-1]!==o)){var x="deltaY"in w?b_(w):hf(w),S=t.current.filter(function(b){return b.name===w.type&&b.target===w.target&&RG(b.delta,x)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var T=(l.current.shards||[]).map(w_).filter(Boolean).filter(function(b){return b.contains(w.target)}),v=T.length>0?d(w,T[0]):!l.current.noIsolation;v&&w.cancelable&&w.preventDefault()}}},[]),c=N.useCallback(function(g,w,x,S){var T={name:g,delta:w,target:x,should:S};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(v){return v!==T})},1)},[]),s=N.useCallback(function(g){n.current=hf(g),r.current=void 0},[]),u=N.useCallback(function(g){c(g.type,b_(g),g.target,d(g,e.lockRef.current))},[]),f=N.useCallback(function(g){c(g.type,hf(g),g.target,d(g,e.lockRef.current))},[]);N.useEffect(function(){return al.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",a,ol),document.addEventListener("touchmove",a,ol),document.addEventListener("touchstart",s,ol),function(){al=al.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,ol),document.removeEventListener("touchmove",a,ol),document.removeEventListener("touchstart",s,ol)}},[]);var h=e.removeScrollBar,p=e.inert;return N.createElement(N.Fragment,null,p?N.createElement(o,{styles:PG(i)}):null,h?N.createElement(CG,{gapMode:e.gapMode}):null)}const FG=M7(CA,OG);var AA=N.forwardRef(function(e,t){return N.createElement(wg,Di({},e,{ref:t,sideCar:FG}))});AA.classNames=wg.classNames;const DG=AA;function NG(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:l,finalFocusRef:d,returnFocusOnClose:a,preserveScrollBarGap:c,lockFocusAcrossFrames:s,isOpen:u}=uu(),[f,h]=lT();N.useEffect(()=>{!f&&h&&setTimeout(h)},[f,h]);const p=SA(r,u);return W.jsx(mA,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:d,restoreFocus:a,contentRef:r,lockFocusAcrossFrames:s,children:W.jsx(DG,{removeScrollBar:!c,allowPinchZoom:l,enabled:p===1&&o,forwardProps:!0,children:e.children})})}var MA=mt((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...l}=e,{getDialogProps:d,getDialogContainerProps:a}=uu(),c=d(l,t),s=a(i),u=_t("chakra-modal__content",n),f=Cd(),h={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},p={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{motionPreset:g}=uu();return W.jsx(NG,{children:W.jsx(rt.div,{...s,className:"chakra-modal__content-container",tabIndex:-1,__css:p,children:W.jsx(wA,{preset:g,motionProps:o,className:u,...c,__css:h,children:r})})})});MA.displayName="ModalContent";function LA(e){const{leastDestructiveRef:t,...n}=e;return W.jsx(_A,{...n,initialFocusRef:t})}var RA=mt((e,t)=>W.jsx(MA,{ref:t,role:"alertdialog",...e})),PA=mt((e,t)=>{const{className:n,...r}=e,i=_t("chakra-modal__footer",n),l={display:"flex",alignItems:"center",justifyContent:"flex-end",...Cd().footer};return W.jsx(rt.footer,{ref:t,...r,__css:l,className:i})});PA.displayName="ModalFooter";var IA=mt((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=uu();N.useEffect(()=>(o(!0),()=>o(!1)),[o]);const l=_t("chakra-modal__header",n),a={flex:0,...Cd().header};return W.jsx(rt.header,{ref:t,className:l,id:i,...r,__css:a})});IA.displayName="ModalHeader";var zG=rt(vu.div),uw=mt((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,l=_t("chakra-modal__overlay",n),a={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Cd().overlay},{motionPreset:c}=uu(),u=i||(c==="none"?{}:LT);return W.jsx(zG,{...u,__css:a,ref:t,className:l,...o})});uw.displayName="ModalOverlay";var cw=mt((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=uu();N.useEffect(()=>(o(!0),()=>o(!1)),[o]);const l=_t("chakra-modal__body",n),d=Cd();return W.jsx(rt.div,{ref:t,className:l,id:i,...r,__css:d.body})});cw.displayName="ModalBody";var BG=e=>W.jsx(Ls,{viewBox:"0 0 24 24",...e,children:W.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),jG=e=>W.jsx(Ls,{viewBox:"0 0 24 24",...e,children:W.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function S_(e,t,n,r){N.useEffect(()=>{var i;if(!e.current||!r)return;const o=(i=e.current.ownerDocument.defaultView)!=null?i:window,l=Array.isArray(t)?t:[t],d=new o.MutationObserver(a=>{for(const c of a)c.type==="attributes"&&c.attributeName&&l.includes(c.attributeName)&&n(c)});return d.observe(e.current,{attributes:!0,attributeFilter:l}),()=>d.disconnect()})}function HG(e,t){const n=Gn(e);N.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var VG=50,x_=300;function WG(e,t){const[n,r]=N.useState(!1),[i,o]=N.useState(null),[l,d]=N.useState(!0),a=N.useRef(null),c=()=>clearTimeout(a.current);HG(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?VG:null);const s=N.useCallback(()=>{l&&e(),a.current=setTimeout(()=>{d(!1),r(!0),o("increment")},x_)},[e,l]),u=N.useCallback(()=>{l&&t(),a.current=setTimeout(()=>{d(!1),r(!0),o("decrement")},x_)},[t,l]),f=N.useCallback(()=>{d(!0),r(!1),c()},[]);return N.useEffect(()=>()=>c(),[]),{up:s,down:u,stop:f,isSpinning:n}}var UG=/^[Ee0-9+\-.]$/;function GG(e){return UG.test(e)}function KG(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function qG(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:l=1,isReadOnly:d,isDisabled:a,isRequired:c,isInvalid:s,pattern:u="[0-9]*(.[0-9]+)?",inputMode:f="decimal",allowMouseWheel:h,id:p,onChange:g,precision:w,name:x,"aria-describedby":S,"aria-label":T,"aria-labelledby":v,onFocus:b,onBlur:y,onInvalid:m,getAriaValueText:E,isValidCharacter:M,format:C,parse:k,...O}=e,R=Gn(b),A=Gn(y),I=Gn(m),P=Gn(M??GG),z=Gn(E),B=x7(e),{update:V,increment:K,decrement:q}=B,[re,Y]=N.useState(!1),Z=!(d||a),te=N.useRef(null),ie=N.useRef(null),ce=N.useRef(null),he=N.useRef(null),ve=N.useCallback(xe=>xe.split("").filter(P).join(""),[P]),Ce=N.useCallback(xe=>{var Fe;return(Fe=k==null?void 0:k(xe))!=null?Fe:xe},[k]),_e=N.useCallback(xe=>{var Fe;return((Fe=C==null?void 0:C(xe))!=null?Fe:xe).toString()},[C]);Vh(()=>{(B.valueAsNumber>o||B.valueAsNumber<i)&&(I==null||I("rangeOverflow",_e(B.value),B.valueAsNumber))},[B.valueAsNumber,B.value,_e,I]),va(()=>{if(!te.current)return;if(te.current.value!=B.value){const Fe=Ce(te.current.value);B.setValue(ve(Fe))}},[Ce,ve]);const Re=N.useCallback((xe=l)=>{Z&&K(xe)},[K,Z,l]),ot=N.useCallback((xe=l)=>{Z&&q(xe)},[q,Z,l]),Te=WG(Re,ot);S_(ce,"disabled",Te.stop,Te.isSpinning),S_(he,"disabled",Te.stop,Te.isSpinning);const it=N.useCallback(xe=>{if(xe.nativeEvent.isComposing)return;const Ne=Ce(xe.currentTarget.value);V(ve(Ne)),ie.current={start:xe.currentTarget.selectionStart,end:xe.currentTarget.selectionEnd}},[V,ve,Ce]),vt=N.useCallback(xe=>{var Fe,Ne,Ye;R==null||R(xe),ie.current&&(xe.target.selectionStart=(Ne=ie.current.start)!=null?Ne:(Fe=xe.currentTarget.value)==null?void 0:Fe.length,xe.currentTarget.selectionEnd=(Ye=ie.current.end)!=null?Ye:xe.currentTarget.selectionStart)},[R]),Qt=N.useCallback(xe=>{if(xe.nativeEvent.isComposing)return;KG(xe,P)||xe.preventDefault();const Fe=Ut(xe)*l,Ne=xe.key,et={ArrowUp:()=>Re(Fe),ArrowDown:()=>ot(Fe),Home:()=>V(i),End:()=>V(o)}[Ne];et&&(xe.preventDefault(),et(xe))},[P,l,Re,ot,V,i,o]),Ut=xe=>{let Fe=1;return(xe.metaKey||xe.ctrlKey)&&(Fe=.1),xe.shiftKey&&(Fe=10),Fe},Tr=N.useMemo(()=>{const xe=z==null?void 0:z(B.value);if(xe!=null)return xe;const Fe=B.value.toString();return Fe||void 0},[B.value,z]),Ln=N.useCallback(()=>{let xe=B.value;if(B.value==="")return;/^[eE]/.test(B.value.toString())?B.setValue(""):(B.valueAsNumber<i&&(xe=i),B.valueAsNumber>o&&(xe=o),B.cast(xe))},[B,o,i]),Qn=N.useCallback(()=>{Y(!1),n&&Ln()},[n,Y,Ln]),Ht=N.useCallback(()=>{t&&requestAnimationFrame(()=>{var xe;(xe=te.current)==null||xe.focus()})},[t]),me=N.useCallback(xe=>{xe.preventDefault(),Te.up(),Ht()},[Ht,Te]),Ae=N.useCallback(xe=>{xe.preventDefault(),Te.down(),Ht()},[Ht,Te]);_7(()=>te.current,"wheel",xe=>{var Fe,Ne;const et=((Ne=(Fe=te.current)==null?void 0:Fe.ownerDocument)!=null?Ne:document).activeElement===te.current;if(!h||!et)return;xe.preventDefault();const kt=Ut(xe)*l,on=Math.sign(xe.deltaY);on===-1?Re(kt):on===1&&ot(kt)},{passive:!1});const we=N.useCallback((xe={},Fe=null)=>{const Ne=a||r&&B.isAtMax;return{...xe,ref:Sr(Fe,ce),role:"button",tabIndex:-1,onPointerDown:lt(xe.onPointerDown,Ye=>{Ye.button!==0||Ne||me(Ye)}),onPointerLeave:lt(xe.onPointerLeave,Te.stop),onPointerUp:lt(xe.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":bo(Ne)}},[B.isAtMax,r,me,Te.stop,a]),He=N.useCallback((xe={},Fe=null)=>{const Ne=a||r&&B.isAtMin;return{...xe,ref:Sr(Fe,he),role:"button",tabIndex:-1,onPointerDown:lt(xe.onPointerDown,Ye=>{Ye.button!==0||Ne||Ae(Ye)}),onPointerLeave:lt(xe.onPointerLeave,Te.stop),onPointerUp:lt(xe.onPointerUp,Te.stop),disabled:Ne,"aria-disabled":bo(Ne)}},[B.isAtMin,r,Ae,Te.stop,a]),ct=N.useCallback((xe={},Fe=null)=>{var Ne,Ye,et,kt;return{name:x,inputMode:f,type:"text",pattern:u,"aria-labelledby":v,"aria-label":T,"aria-describedby":S,id:p,disabled:a,...xe,readOnly:(Ne=xe.readOnly)!=null?Ne:d,"aria-readonly":(Ye=xe.readOnly)!=null?Ye:d,"aria-required":(et=xe.required)!=null?et:c,required:(kt=xe.required)!=null?kt:c,ref:Sr(te,Fe),value:_e(B.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(B.valueAsNumber)?void 0:B.valueAsNumber,"aria-invalid":bo(s??B.isOutOfRange),"aria-valuetext":Tr,autoComplete:"off",autoCorrect:"off",onChange:lt(xe.onChange,it),onKeyDown:lt(xe.onKeyDown,Qt),onFocus:lt(xe.onFocus,vt,()=>Y(!0)),onBlur:lt(xe.onBlur,A,Qn)}},[x,f,u,v,T,_e,S,p,a,c,d,s,B.value,B.valueAsNumber,B.isOutOfRange,i,o,Tr,it,Qt,vt,A,Qn]);return{value:_e(B.value),valueAsNumber:B.valueAsNumber,isFocused:re,isDisabled:a,isReadOnly:d,getIncrementButtonProps:we,getDecrementButtonProps:He,getInputProps:ct,htmlProps:O}}var[YG,Sg]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[XG,dw]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),Kf=mt(function(t,n){const r=Lo("NumberInput",t),i=vi(t),o=Zb(i),{htmlProps:l,...d}=qG(o),a=N.useMemo(()=>d,[d]);return W.jsx(XG,{value:a,children:W.jsx(YG,{value:r,children:W.jsx(rt.div,{...l,ref:n,className:_t("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});Kf.displayName="NumberInput";var qf=mt(function(t,n){const r=Sg();return W.jsx(rt.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});qf.displayName="NumberInputStepper";var Yf=mt(function(t,n){const{getInputProps:r}=dw(),i=r(t,n),o=Sg();return W.jsx(rt.input,{...i,className:_t("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Yf.displayName="NumberInputField";var OA=rt("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Xf=mt(function(t,n){var r;const i=Sg(),{getDecrementButtonProps:o}=dw(),l=o(t,n);return W.jsx(OA,{...l,__css:i.stepper,children:(r=t.children)!=null?r:W.jsx(BG,{})})});Xf.displayName="NumberDecrementStepper";var Qf=mt(function(t,n){var r;const{getIncrementButtonProps:i}=dw(),o=i(t,n),l=Sg();return W.jsx(OA,{...o,__css:l.stepper,children:(r=t.children)!=null?r:W.jsx(jG,{})})});Qf.displayName="NumberIncrementStepper";function QG(e){return e&&cr(e)&&cr(e.target)}function ZG(e={}){const{onChange:t,value:n,defaultValue:r,name:i,isDisabled:o,isFocusable:l,isNative:d,...a}=e,[c,s]=N.useState(r||""),u=typeof n<"u",f=u?n:c,h=N.useRef(null),p=N.useCallback(()=>{const b=h.current;if(!b)return;let y="input:not(:disabled):checked";const m=b.querySelector(y);if(m){m.focus();return}y="input:not(:disabled)";const E=b.querySelector(y);E==null||E.focus()},[]),w=`radio-${N.useId()}`,x=i||w,S=N.useCallback(b=>{const y=QG(b)?b.target.value:b;u||s(y),t==null||t(String(y))},[t,u]),T=N.useCallback((b={},y=null)=>({...b,ref:Sr(y,h),role:"radiogroup"}),[]),v=N.useCallback((b={},y=null)=>({...b,ref:y,name:x,[d?"checked":"isChecked"]:f!=null?b.value===f:void 0,onChange(E){S(E)},"data-radiogroup":!0}),[d,x,S,f]);return{getRootProps:T,getRadioProps:v,name:x,ref:h,focus:p,setValue:s,value:f,onChange:S,isDisabled:o,isFocusable:l,htmlProps:a}}var[JG,FA]=xn({name:"RadioGroupContext",strict:!1}),Ky=mt((e,t)=>{const{colorScheme:n,size:r,variant:i,children:o,className:l,isDisabled:d,isFocusable:a,...c}=e,{value:s,onChange:u,getRootProps:f,name:h,htmlProps:p}=ZG(c),g=N.useMemo(()=>({name:h,size:r,onChange:u,colorScheme:n,value:s,variant:i,isDisabled:d,isFocusable:a}),[h,r,u,n,s,i,d,a]);return W.jsx(JG,{value:g,children:W.jsx(rt.div,{...f(p,t),className:_t("chakra-radio-group",l),children:o})})});Ky.displayName="RadioGroup";var eK={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function tK(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:i,isReadOnly:o,isRequired:l,onChange:d,isInvalid:a,name:c,value:s,id:u,"data-radiogroup":f,"aria-describedby":h,...p}=e,g=`radio-${N.useId()}`,w=xd(),S=!!FA()||!!f;let v=!!w&&!S?w.id:g;v=u??v;const b=i??(w==null?void 0:w.isDisabled),y=o??(w==null?void 0:w.isReadOnly),m=l??(w==null?void 0:w.isRequired),E=a??(w==null?void 0:w.isInvalid),[M,C]=N.useState(!1),[k,O]=N.useState(!1),[R,A]=N.useState(!1),[I,P]=N.useState(!1),[z,B]=N.useState(!!t),V=typeof n<"u",K=V?n:z;N.useEffect(()=>OT(C),[]);const q=N.useCallback(_e=>{if(y||b){_e.preventDefault();return}V||B(_e.target.checked),d==null||d(_e)},[V,b,y,d]),re=N.useCallback(_e=>{_e.key===" "&&P(!0)},[P]),Y=N.useCallback(_e=>{_e.key===" "&&P(!1)},[P]),Z=N.useCallback((_e={},Re=null)=>({..._e,ref:Re,"data-active":gt(I),"data-hover":gt(R),"data-disabled":gt(b),"data-invalid":gt(E),"data-checked":gt(K),"data-focus":gt(k),"data-focus-visible":gt(k&&M),"data-readonly":gt(y),"aria-hidden":!0,onMouseDown:lt(_e.onMouseDown,()=>P(!0)),onMouseUp:lt(_e.onMouseUp,()=>P(!1)),onMouseEnter:lt(_e.onMouseEnter,()=>A(!0)),onMouseLeave:lt(_e.onMouseLeave,()=>A(!1))}),[I,R,b,E,K,k,y,M]),{onFocus:te,onBlur:ie}=w??{},ce=N.useCallback((_e={},Re=null)=>{const ot=b&&!r;return{..._e,id:v,ref:Re,type:"radio",name:c,value:s,onChange:lt(_e.onChange,q),onBlur:lt(ie,_e.onBlur,()=>O(!1)),onFocus:lt(te,_e.onFocus,()=>O(!0)),onKeyDown:lt(_e.onKeyDown,re),onKeyUp:lt(_e.onKeyUp,Y),checked:K,disabled:ot,readOnly:y,required:m,"aria-invalid":bo(E),"aria-disabled":bo(ot),"aria-required":bo(m),"data-readonly":gt(y),"aria-describedby":h,style:eK}},[b,r,v,c,s,q,ie,te,re,Y,K,y,m,E,h]);return{state:{isInvalid:E,isFocused:k,isChecked:K,isActive:I,isHovered:R,isDisabled:b,isReadOnly:y,isRequired:m},getCheckboxProps:Z,getRadioProps:Z,getInputProps:ce,getLabelProps:(_e={},Re=null)=>({..._e,ref:Re,onMouseDown:lt(_e.onMouseDown,nK),"data-disabled":gt(b),"data-checked":gt(K),"data-invalid":gt(E)}),getRootProps:(_e,Re=null)=>({..._e,ref:Re,"data-disabled":gt(b),"data-checked":gt(K),"data-invalid":gt(E)}),htmlProps:p}}function nK(e){e.preventDefault(),e.stopPropagation()}function rK(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var Xa=mt((e,t)=>{var n;const r=FA(),{onChange:i,value:o}=e,l=Lo("Radio",{...r,...e}),d=vi(e),{spacing:a="0.5rem",children:c,isDisabled:s=r==null?void 0:r.isDisabled,isFocusable:u=r==null?void 0:r.isFocusable,inputProps:f,...h}=d;let p=e.isChecked;(r==null?void 0:r.value)!=null&&o!=null&&(p=r.value===o);let g=i;r!=null&&r.onChange&&o!=null&&(g=m2(r.onChange,i));const w=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:x,getCheckboxProps:S,getLabelProps:T,getRootProps:v,htmlProps:b}=tK({...h,isChecked:p,isFocusable:u,isDisabled:s,onChange:g,name:w}),[y,m]=rK(b,NF),E=S(m),M=x(f,t),C=T(),k=Object.assign({},y,v()),O={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...l.container},R={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...l.control},A={userSelect:"none",marginStart:a,...l.label};return W.jsxs(rt.label,{className:"chakra-radio",...k,__css:O,children:[W.jsx("input",{className:"chakra-radio__input",...M}),W.jsx(rt.span,{className:"chakra-radio__control",...E,__css:R}),c&&W.jsx(rt.span,{className:"chakra-radio__label",...C,__css:A,children:c})]})});Xa.displayName="Radio";var[iK,oK,aK,sK]=B9();function lK(e){var t;const{defaultIndex:n,onChange:r,index:i,isManual:o,isLazy:l,lazyBehavior:d="unmount",orientation:a="horizontal",direction:c="ltr",...s}=e,[u,f]=N.useState(n??0),[h,p]=j9({defaultValue:n??0,value:i,onChange:r});N.useEffect(()=>{i!=null&&f(i)},[i]);const g=aK(),w=N.useId();return{id:`tabs-${(t=e.id)!=null?t:w}`,selectedIndex:h,focusedIndex:u,setSelectedIndex:p,setFocusedIndex:f,isManual:o,isLazy:l,lazyBehavior:d,orientation:a,descendants:g,direction:c,htmlProps:s}}var[uK,xg]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function cK(e){const{focusedIndex:t,orientation:n,direction:r}=xg(),i=oK(),o=N.useCallback(l=>{const d=()=>{var S;const T=i.nextEnabled(t);T&&((S=T.node)==null||S.focus())},a=()=>{var S;const T=i.prevEnabled(t);T&&((S=T.node)==null||S.focus())},c=()=>{var S;const T=i.firstEnabled();T&&((S=T.node)==null||S.focus())},s=()=>{var S;const T=i.lastEnabled();T&&((S=T.node)==null||S.focus())},u=n==="horizontal",f=n==="vertical",h=l.key,p=r==="ltr"?"ArrowLeft":"ArrowRight",g=r==="ltr"?"ArrowRight":"ArrowLeft",x={[p]:()=>u&&a(),[g]:()=>u&&d(),ArrowDown:()=>f&&d(),ArrowUp:()=>f&&a(),Home:c,End:s}[h];x&&(l.preventDefault(),x(l))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:lt(e.onKeyDown,o)}}function dK(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:l,setFocusedIndex:d,selectedIndex:a}=xg(),{index:c,register:s}=sK({disabled:t&&!n}),u=c===a,f=()=>{i(c)},h=()=>{d(c),!o&&!(t&&n)&&i(c)},p=KU({...r,ref:Sr(s,e.ref),isDisabled:t,isFocusable:n,onClick:lt(e.onClick,f)}),g="button";return{...p,id:DA(l,c),role:"tab",tabIndex:u?0:-1,type:g,"aria-selected":u,"aria-controls":NA(l,c),onFocus:t?void 0:lt(e.onFocus,h)}}var[fK,hK]=xn({});function pK(e){const t=xg(),{id:n,selectedIndex:r}=t,o=Qb(e.children).map((l,d)=>N.createElement(fK,{key:d,value:{isSelected:d===r,id:NA(n,d),tabId:DA(n,d),selectedIndex:r}},l));return{...e,children:o}}function gK(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=xg(),{isSelected:o,id:l,tabId:d}=hK(),a=N.useRef(!1);o&&(a.current=!0);const c=qU({wasSelected:a.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:c?t:null,role:"tabpanel","aria-labelledby":d,hidden:!o,id:l}}function DA(e,t){return`${e}--tab-${t}`}function NA(e,t){return`${e}--tabpanel-${t}`}var[mK,_g]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),zA=mt(function(t,n){const r=Lo("Tabs",t),{children:i,className:o,...l}=vi(t),{htmlProps:d,descendants:a,...c}=lK(l),s=N.useMemo(()=>c,[c]),{isFitted:u,...f}=d;return W.jsx(iK,{value:a,children:W.jsx(uK,{value:s,children:W.jsx(mK,{value:r,children:W.jsx(rt.div,{className:_t("chakra-tabs",o),ref:n,...f,__css:r.root,children:i})})})})});zA.displayName="Tabs";var BA=mt(function(t,n){const r=cK({...t,ref:n}),o={display:"flex",..._g().tablist};return W.jsx(rt.div,{...r,className:_t("chakra-tabs__tablist",t.className),__css:o})});BA.displayName="TabList";var Zf=mt(function(t,n){const r=gK({...t,ref:n}),i=_g();return W.jsx(rt.div,{outline:"0",...r,className:_t("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});Zf.displayName="TabPanel";var jA=mt(function(t,n){const r=pK(t),i=_g();return W.jsx(rt.div,{...r,width:"100%",ref:n,className:_t("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});jA.displayName="TabPanels";var Jf=mt(function(t,n){const r=_g(),i=dK({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return W.jsx(rt.button,{...i,className:_t("chakra-tabs__tab",t.className),__css:o})});Jf.displayName="Tab";function HA({message:e,confirmLabel:t,cancelLabel:n,onConfirm:r,style:i}){const{isOpen:o,onOpen:l,onClose:d}=vA(),a=N.useRef();return i?i={...i,width:"100%"}:i={width:"100%"},W.jsxs(W.Fragment,{children:[W.jsx("button",{className:"btn-settings",style:i,onClick:l,children:t}),W.jsx(LA,{isOpen:o,leastDestructiveRef:a,onClose:d,variant:"nevysha-confirm",children:W.jsx(uw,{children:W.jsxs(RA,{children:[W.jsx(IA,{fontSize:"lg",fontWeight:"bold",children:"Confirm Action"}),W.jsx(cw,{children:e}),W.jsxs(PA,{children:[W.jsx("button",{className:"btn-settings",ref:a,onClick:d,children:n}),W.jsx("button",{className:"btn-settings",onClick:()=>{d(),r()},children:t})]})]})})})]})}function vK({imageHash:e}){const{images:t,getImage:n}=N.useContext(Gi),[r,i]=N.useState(n(e));N.useEffect(()=>{i(n(e))},[t,e]);const o=(l,d)=>{if(l.preventDefault(),l.stopPropagation(),window.sendToPipe){let a={src:`/cozy-nest/image?path=${r.path}`};window.sendToPipe(d,a)}};return W.jsxs(En,{children:[W.jsx(hi,{onClick:l=>o(l,"txt2img"),children:"txt2img"}),W.jsx(hi,{onClick:l=>o(l,"img2img"),children:"img2img"}),W.jsx(hi,{onClick:l=>o(l,"inpainting"),children:"inpainting"})]})}function yK({imageHash:e}){const{images:t,deleteImg:n,updateExifInState:r,getImage:i}=N.useContext(Gi),[o,l]=N.useState(!1),[d,a]=N.useState({}),[c,s]=N.useState(!1),[u,f]=N.useState(i(e));N.useEffect(()=>{f(i(e))},[t,e]),N.useEffect(()=>{!u||!u.path||a(u.metadata.exif)},[u,e]),N.useEffect(()=>{d&&s(d["cozy-nest-hidden"]==="True")},[d,u,t]);const h=async()=>{l(!0)},p=async()=>{const x=u.path;d["cozy-nest-hidden"]="True",a(d),await hm.save(x,d),r(u)},g=async()=>{const x=u.path;d["cozy-nest-hidden"]="False",a(d),await hm.save(x,d),r(u)},w=hm.ExifEditor;return W.jsxs(uo,{style:{height:"100%",justifyContent:"space-between"},children:[W.jsx(vK,{imageHash:e}),W.jsxs(uo,{children:[W.jsxs(En,{children:[o&&W.jsx(w,{imageHash:e,exif:d,visible:o,onClose:()=>l(!1)}),W.jsx(hi,{onClick:h,children:"Edit Exif"})]}),W.jsxs(En,{children:[!c&&W.jsx(hi,{onClick:p,children:"Hide"}),c&&W.jsx(hi,{onClick:g,children:"Show"}),W.jsx(hi,{onClick:()=>n("archive",u),children:"Move to archive"}),W.jsx(HA,{style:{height:"100%"},message:"This action cannot be undone. Are you sure?",confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>n("delete",u)})]})]})]})}function __(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?__(Object(n),!0).forEach(function(r){Ll(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):__(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $r(e,t){if(e==null)return{};var n=vg(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var C_=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function bK(e,t){return!!(e===t||C_(e)&&C_(t))}function wK(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!bK(e[n],t[n]))return!1;return!0}function VA(e,t){t===void 0&&(t=wK);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var l=e.apply(this,i);return n={lastResult:l,lastArgs:i,lastThis:this},l}return r.clear=function(){n=null},r}function SK(e){if(Array.isArray(e))return e}function xK(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,d=[],a=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);a=!0);}catch(s){c=!0,i=s}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return d}}function qy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WA(e,t){if(e){if(typeof e=="string")return qy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qy(e,t)}}function _K(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(e,t){return SK(e)||xK(e,t)||WA(e,t)||_K()}function CK(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function kK(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}const EK=["top","right","bottom","left"];EK.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function Ui(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function UA(e){return Ui(e).getComputedStyle(e)}function GA(e){return e instanceof Ui(e).Node}function KA(e){return GA(e)?(e.nodeName||"").toLowerCase():""}function fw(e){return e instanceof Ui(e).HTMLElement}function ss(e){return e instanceof Ui(e).Element}function k_(e){return typeof ShadowRoot>"u"?!1:e instanceof Ui(e).ShadowRoot||e instanceof ShadowRoot}function qA(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=UA(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function $K(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function TK(e){return["html","body","#document"].includes(KA(e))}const op=Math.round;function AK(e){const t=UA(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=fw(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,d=op(n)!==o||op(r)!==l;return d&&(n=o,r=l),{width:n,height:r,fallback:d}}function YA(e){return ss(e)?e:e.contextElement}const XA={x:1,y:1};function tv(e){const t=YA(e);if(!fw(t))return XA;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=AK(t);let l=(o?op(n.width):n.width)/r,d=(o?op(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),d&&Number.isFinite(d)||(d=1),{x:l,y:d}}const E_={x:0,y:0};function MK(e,t,n){var r,i;if(t===void 0&&(t=!0),!$K())return E_;const o=e?Ui(e):window;return!n||t&&n!==o?E_:{x:((r=o.visualViewport)==null?void 0:r.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function $_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=YA(e);let l=XA;t&&(r?ss(r)&&(l=tv(r)):l=tv(e));const d=MK(o,n,r);let a=(i.left+d.x)/l.x,c=(i.top+d.y)/l.y,s=i.width/l.x,u=i.height/l.y;if(o){const f=Ui(o),h=r&&ss(r)?Ui(r):r;let p=f.frameElement;for(;p&&r&&h!==f;){const g=tv(p),w=p.getBoundingClientRect(),x=getComputedStyle(p);w.x+=(p.clientLeft+parseFloat(x.paddingLeft))*g.x,w.y+=(p.clientTop+parseFloat(x.paddingTop))*g.y,a*=g.x,c*=g.y,s*=g.x,u*=g.y,a+=w.x,c+=w.y,p=Ui(p).frameElement}}return kK({width:s,height:u,x:a,y:c})}function LK(e){return((GA(e)?e.ownerDocument:e.document)||window.document).documentElement}function RK(e){if(KA(e)==="html")return e;const t=e.assignedSlot||e.parentNode||k_(e)&&e.host||LK(e);return k_(t)?t.host:t}function QA(e){const t=RK(e);return TK(t)?t.ownerDocument.body:fw(t)&&qA(t)?t:QA(t)}function eh(e,t){var n;t===void 0&&(t=[]);const r=QA(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ui(r);return i?t.concat(o,o.visualViewport||[],qA(r)?r:[]):t.concat(r,eh(r))}function PK(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=!0,animationFrame:d=!1}=r,a=i||o?[...ss(e)?eh(e):e.contextElement?eh(e.contextElement):[],...eh(t)]:[];a.forEach(f=>{const h=!ss(f)&&f.toString().includes("V");!i||d&&!h||f.addEventListener("scroll",n,{passive:!0}),o&&f.addEventListener("resize",n)});let c,s=null;l&&(s=new ResizeObserver(()=>{n()}),ss(e)&&!d&&s.observe(e),ss(e)||!e.contextElement||d||s.observe(e.contextElement),s.observe(t));let u=d?$_(e):null;return d&&function f(){const h=$_(e);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||n(),u=h,c=requestAnimationFrame(f)}(),n(),()=>{var f;a.forEach(h=>{i&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),(f=s)==null||f.disconnect(),s=null,d&&cancelAnimationFrame(c)}}var Yy=N.useLayoutEffect,IK=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ap=function(){};function OK(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function FK(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var l in t)t.hasOwnProperty(l)&&t[l]&&o.push("".concat(OK(e,l)));return o.filter(function(d){return d}).map(function(d){return String(d).trim()}).join(" ")}var sp=function(t){return UK(t)?t.filter(Boolean):Cs(t)==="object"&&t!==null?[t]:[]},ZA=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=$r(t,IK);return je({},n)},tn=function(t,n,r){var i=t.cx,o=t.getStyles,l=t.getClassNames,d=t.className;return{css:o(n,t),className:i(r??{},l(n,t),d)}};function Cg(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function DK(e){return Cg(e)?window.innerHeight:e.clientHeight}function JA(e){return Cg(e)?window.pageYOffset:e.scrollTop}function lp(e,t){if(Cg(e)){window.scrollTo(0,t);return}e.scrollTop=t}function NK(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function zK(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function pf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ap,i=JA(e),o=t-i,l=10,d=0;function a(){d+=l;var c=zK(d,i,o,n);lp(e,c),d<n?window.requestAnimationFrame(a):r(e)}a()}function T_(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?lp(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&lp(e,Math.max(t.offsetTop-i,0))}function BK(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function A_(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function jK(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var eM=!1,HK={get passive(){return eM=!0}},gf=typeof window<"u"?window:{};gf.addEventListener&&gf.removeEventListener&&(gf.addEventListener("p",ap,HK),gf.removeEventListener("p",ap,!1));var VK=eM;function WK(e){return e!=null}function UK(e){return Array.isArray(e)}function nc(e,t,n){return e?t:n}var GK=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(l){var d=qr(l,1),a=d[0];return!r.includes(a)});return o.reduce(function(l,d){var a=qr(d,2),c=a[0],s=a[1];return l[c]=s,l},{})};function KK(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,l=e.isFixedPosition,d=e.controlHeight,a=NK(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var s=a.getBoundingClientRect(),u=s.height,f=n.getBoundingClientRect(),h=f.bottom,p=f.height,g=f.top,w=n.offsetParent.getBoundingClientRect(),x=w.top,S=l?window.innerHeight:DK(a),T=JA(a),v=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),y=x-b,m=S-g,E=y+T,M=u-T-g,C=h-S+T+v,k=T+g-b,O=160;switch(i){case"auto":case"bottom":if(m>=p)return{placement:"bottom",maxHeight:t};if(M>=p&&!l)return o&&pf(a,C,O),{placement:"bottom",maxHeight:t};if(!l&&M>=r||l&&m>=r){o&&pf(a,C,O);var R=l?m-v:M-v;return{placement:"bottom",maxHeight:R}}if(i==="auto"||l){var A=t,I=l?y:E;return I>=r&&(A=Math.min(I-v-d,t)),{placement:"top",maxHeight:A}}if(i==="bottom")return o&&lp(a,C),{placement:"bottom",maxHeight:t};break;case"top":if(y>=p)return{placement:"top",maxHeight:t};if(E>=p&&!l)return o&&pf(a,k,O),{placement:"top",maxHeight:t};if(!l&&E>=r||l&&y>=r){var P=t;return(!l&&E>=r||l&&y>=r)&&(P=l?y-b:E-b),o&&pf(a,k,O),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function qK(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var tM=function(t){return t==="auto"?"bottom":t},YK=function(t,n){var r,i=t.placement,o=t.theme,l=o.borderRadius,d=o.spacing,a=o.colors;return je((r={label:"menu"},Ll(r,qK(i),"100%"),Ll(r,"position","absolute"),Ll(r,"width","100%"),Ll(r,"zIndex",1),r),n?{}:{backgroundColor:a.neutral0,borderRadius:l,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:d.menuGutter,marginTop:d.menuGutter})},nM=N.createContext(null),XK=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,l=t.menuPosition,d=t.menuShouldScrollIntoView,a=t.theme,c=N.useContext(nM)||{},s=c.setPortalPlacement,u=N.useRef(null),f=N.useState(i),h=qr(f,2),p=h[0],g=h[1],w=N.useState(null),x=qr(w,2),S=x[0],T=x[1],v=a.spacing.controlHeight;return Yy(function(){var b=u.current;if(b){var y=l==="fixed",m=d&&!y,E=KK({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:m,isFixedPosition:y,controlHeight:v});g(E.maxHeight),T(E.placement),s==null||s(E.placement)}},[i,o,l,d,r,s,v]),n({ref:u,placerProps:je(je({},t),{},{placement:S||tM(o),maxHeight:p})})},QK=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Ke("div",Ie({},tn(t,"menu",{menu:!0}),{ref:r},i),n)},ZK=QK,JK=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return je({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},eq=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Ke("div",Ie({},tn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},rM=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return je({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},tq=rM,nq=rM,iM=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)};iM.defaultProps={children:"No options"};var oM=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)};oM.defaultProps={children:"Loading..."};var rq=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},iq=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,l=t.menuPlacement,d=t.menuPosition,a=N.useRef(null),c=N.useRef(null),s=N.useState(tM(l)),u=qr(s,2),f=u[0],h=u[1],p=N.useMemo(function(){return{setPortalPlacement:h}},[]),g=N.useState(null),w=qr(g,2),x=w[0],S=w[1],T=N.useCallback(function(){if(i){var m=BK(i),E=d==="fixed"?0:window.pageYOffset,M=m[f]+E;(M!==(x==null?void 0:x.offset)||m.left!==(x==null?void 0:x.rect.left)||m.width!==(x==null?void 0:x.rect.width))&&S({offset:M,rect:m})}},[i,d,f,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);Yy(function(){T()},[T]);var v=N.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&a.current&&(c.current=PK(i,a.current,T,{elementResize:"ResizeObserver"in window}))},[i,T]);Yy(function(){v()},[v]);var b=N.useCallback(function(m){a.current=m,v()},[v]);if(!n&&d!=="fixed"||!x)return null;var y=Ke("div",Ie({ref:b},tn(je(je({},t),{},{offset:x.offset,position:d,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Ke(nM.Provider,{value:p},n?dd.createPortal(y,n):y)},oq=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},aq=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Ke("div",Ie({},tn(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},sq=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,l=t.selectProps.controlShouldRenderValue;return je({alignItems:"center",display:i&&o&&l?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},lq=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Ke("div",Ie({},tn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},uq=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},cq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"indicatorsContainer",{indicators:!0}),r),n)},M_,dq=["size"],fq={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},aM=function(t){var n=t.size,r=$r(t,dq);return Ke("svg",Ie({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:fq},r))},hw=function(t){return Ke(aM,Ie({size:20},t),Ke("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},sM=function(t){return Ke(aM,Ie({size:20},t),Ke("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},lM=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,l=i.colors;return je({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?l.neutral60:l.neutral20,padding:o*2,":hover":{color:r?l.neutral80:l.neutral40}})},hq=lM,pq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Ke(sM,null))},gq=lM,mq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Ke(hw,null))},vq=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,l=i.colors;return je({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?l.neutral10:l.neutral20,marginBottom:o*2,marginTop:o*2})},yq=function(t){var n=t.innerProps;return Ke("span",Ie({},n,tn(t,"indicatorSeparator",{"indicator-separator":!0})))},bq=hd(M_||(M_=CK([`
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),wq=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,l=o.colors,d=o.spacing.baseUnit;return je({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?l.neutral60:l.neutral20,padding:d*2})},nv=function(t){var n=t.delay,r=t.offset;return Ke("span",{css:vb({animation:"".concat(bq," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},uM=function(t){var n=t.innerProps,r=t.isRtl;return Ke("div",Ie({},tn(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ke(nv,{delay:0,offset:r}),Ke(nv,{delay:160,offset:!0}),Ke(nv,{delay:320,offset:!r}))};uM.defaultProps={size:4};var Sq=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,l=o.colors,d=o.borderRadius,a=o.spacing;return je({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?l.neutral5:l.neutral0,borderColor:r?l.neutral10:i?l.primary:l.neutral20,borderRadius:d,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(l.primary):void 0,"&:hover":{borderColor:i?l.primary:l.neutral30}})},xq=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,l=t.innerProps,d=t.menuIsOpen;return Ke("div",Ie({ref:o},tn(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":d}),l),n)},_q=xq,Cq=["data"],kq=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},Eq=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,l=t.Heading,d=t.headingProps,a=t.innerProps,c=t.label,s=t.theme,u=t.selectProps;return Ke("div",Ie({},tn(t,"group",{group:!0}),a),Ke(l,Ie({},d,{selectProps:u,theme:s,getStyles:i,getClassNames:o,cx:r}),c),Ke("div",null,n))},$q=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return je({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Tq=function(t){var n=ZA(t);n.data;var r=$r(n,Cq);return Ke("div",Ie({},tn(t,"groupHeading",{"group-heading":!0}),r))},Aq=Eq,Mq=["innerRef","isDisabled","isHidden","inputClassName"],Lq=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,l=o.spacing,d=o.colors;return je(je({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},Rq),n?{}:{margin:l.baseUnit/2,paddingBottom:l.baseUnit/2,paddingTop:l.baseUnit/2,color:d.neutral80})},cM={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Rq={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":je({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},cM)},Pq=function(t){return je({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},cM)},Iq=function(t){var n=t.cx,r=t.value,i=ZA(t),o=i.innerRef,l=i.isDisabled,d=i.isHidden,a=i.inputClassName,c=$r(i,Mq);return Ke("div",Ie({},tn(t,"input",{"input-container":!0}),{"data-value":r||""}),Ke("input",Ie({className:n({input:!0},a),ref:o,style:Pq(d),disabled:l},c)))},Oq=Iq,Fq=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,l=r.colors;return je({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:l.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},Dq=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,l=t.cropWithEllipsis;return je({overflow:"hidden",textOverflow:l||l===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Nq=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,l=r.colors,d=t.isFocused;return je({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:d?l.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:l.dangerLight,color:l.danger}})},dM=function(t){var n=t.children,r=t.innerProps;return Ke("div",r,n)},zq=dM,Bq=dM;function jq(e){var t=e.children,n=e.innerProps;return Ke("div",Ie({role:"button"},n),t||Ke(hw,{size:14}))}var Hq=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,l=t.isDisabled,d=t.removeProps,a=t.selectProps,c=r.Container,s=r.Label,u=r.Remove;return Ke(c,{data:i,innerProps:je(je({},tn(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":l})),o),selectProps:a},Ke(s,{data:i,innerProps:je({},tn(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),Ke(u,{data:i,innerProps:je(je({},tn(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},d),selectProps:a}))},Vq=Hq,Wq=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,l=t.theme,d=l.spacing,a=l.colors;return je({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?a.primary:i?a.primary25:"transparent",color:r?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(d.baseUnit*2,"px ").concat(d.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?a.primary:a.primary50}})},Uq=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,l=t.innerRef,d=t.innerProps;return Ke("div",Ie({},tn(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:l,"aria-disabled":r},d),n)},Gq=Uq,Kq=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return je({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},qq=function(t){var n=t.children,r=t.innerProps;return Ke("div",Ie({},tn(t,"placeholder",{placeholder:!0}),r),n)},Yq=qq,Xq=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,l=i.colors;return je({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?l.neutral40:l.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Qq=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Ke("div",Ie({},tn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},Zq=Qq,Jq={ClearIndicator:mq,Control:_q,DropdownIndicator:pq,DownChevron:sM,CrossIcon:hw,Group:Aq,GroupHeading:Tq,IndicatorsContainer:cq,IndicatorSeparator:yq,Input:Oq,LoadingIndicator:uM,Menu:ZK,MenuList:eq,MenuPortal:iq,LoadingMessage:oM,NoOptionsMessage:iM,MultiValue:Vq,MultiValueContainer:zq,MultiValueLabel:Bq,MultiValueRemove:jq,Option:Gq,Placeholder:Yq,SelectContainer:aq,SingleValue:Zq,ValueContainer:lq},fM=function(t){return je(je({},Jq),t.components)};const L_={disabled:!1},up=ut.createContext(null);var eY=function(t){return t.scrollTop},rc="unmounted",Qa="exited",Za="entering",dl="entered",Xy="exiting",Ro=function(e){nw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var l=i,d=l&&!l.isMounting?r.enter:r.appear,a;return o.appearStatus=null,r.in?d?(a=Qa,o.appearStatus=Za):a=dl:r.unmountOnExit||r.mountOnEnter?a=rc:a=Qa,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var l=i.in;return l&&o.status===rc?{status:Qa}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var l=this.state.status;this.props.in?l!==Za&&l!==dl&&(o=Za):(l===Za||l===dl)&&(o=Xy)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,l,d;return o=l=d=i,i!=null&&typeof i!="number"&&(o=i.exit,l=i.enter,d=i.appear!==void 0?i.appear:l),{exit:o,enter:l,appear:d}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Za){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:Yd.findDOMNode(this);l&&eY(l)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qa&&this.setState({status:rc})},n.performEnter=function(i){var o=this,l=this.props.enter,d=this.context?this.context.isMounting:i,a=this.props.nodeRef?[d]:[Yd.findDOMNode(this),d],c=a[0],s=a[1],u=this.getTimeouts(),f=d?u.appear:u.enter;if(!i&&!l||L_.disabled){this.safeSetState({status:dl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,s),this.safeSetState({status:Za},function(){o.props.onEntering(c,s),o.onTransitionEnd(f,function(){o.safeSetState({status:dl},function(){o.props.onEntered(c,s)})})})},n.performExit=function(){var i=this,o=this.props.exit,l=this.getTimeouts(),d=this.props.nodeRef?void 0:Yd.findDOMNode(this);if(!o||L_.disabled){this.safeSetState({status:Qa},function(){i.props.onExited(d)});return}this.props.onExit(d),this.safeSetState({status:Xy},function(){i.props.onExiting(d),i.onTransitionEnd(l.exit,function(){i.safeSetState({status:Qa},function(){i.props.onExited(d)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,l=!0;return this.nextCallback=function(d){l&&(l=!1,o.nextCallback=null,i(d))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var l=this.props.nodeRef?this.props.nodeRef.current:Yd.findDOMNode(this),d=i==null&&!this.props.addEndListener;if(!l||d){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],c=a[0],s=a[1];this.props.addEndListener(c,s)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===rc)return null;var o=this.props,l=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var d=vg(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ut.createElement(up.Provider,{value:null},typeof l=="function"?l(i,d):ut.cloneElement(ut.Children.only(l),d))},t}(ut.Component);Ro.contextType=up;Ro.propTypes={};function sl(){}Ro.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:sl,onEntering:sl,onEntered:sl,onExit:sl,onExiting:sl,onExited:sl};Ro.UNMOUNTED=rc;Ro.EXITED=Qa;Ro.ENTERING=Za;Ro.ENTERED=dl;Ro.EXITING=Xy;const hM=Ro;function pM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pw(e,t){var n=function(o){return t&&N.isValidElement(o)?t(o):o},r=Object.create(null);return e&&N.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function tY(e,t){e=e||{},t=t||{};function n(s){return s in t?t[s]:e[s]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var l,d={};for(var a in t){if(r[a])for(l=0;l<r[a].length;l++){var c=r[a][l];d[r[a][l]]=n(c)}d[a]=n(a)}for(l=0;l<i.length;l++)d[i[l]]=n(i[l]);return d}function ls(e,t,n){return n[t]!=null?n[t]:e.props[t]}function nY(e,t){return pw(e.children,function(n){return N.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ls(n,"appear",e),enter:ls(n,"enter",e),exit:ls(n,"exit",e)})})}function rY(e,t,n){var r=pw(e.children),i=tY(t,r);return Object.keys(i).forEach(function(o){var l=i[o];if(N.isValidElement(l)){var d=o in t,a=o in r,c=t[o],s=N.isValidElement(c)&&!c.props.in;a&&(!d||s)?i[o]=N.cloneElement(l,{onExited:n.bind(null,l),in:!0,exit:ls(l,"exit",e),enter:ls(l,"enter",e)}):!a&&d&&!s?i[o]=N.cloneElement(l,{in:!1}):a&&d&&N.isValidElement(c)&&(i[o]=N.cloneElement(l,{onExited:n.bind(null,l),in:c.props.in,exit:ls(l,"exit",e),enter:ls(l,"enter",e)}))}}),i}var iY=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},oY={component:"div",childFactory:function(t){return t}},gw=function(e){nw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var l=o.handleExited.bind(pM(o));return o.state={contextValue:{isMounting:!0},handleExited:l,firstRender:!0},o}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,o){var l=o.children,d=o.handleExited,a=o.firstRender;return{children:a?nY(i,d):rY(i,l,d),firstRender:!1}},n.handleExited=function(i,o){var l=pw(this.props.children);i.key in l||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(d){var a=Ie({},d.children);return delete a[i.key],{children:a}}))},n.render=function(){var i=this.props,o=i.component,l=i.childFactory,d=vg(i,["component","childFactory"]),a=this.state.contextValue,c=iY(this.state.children).map(l);return delete d.appear,delete d.enter,delete d.exit,o===null?ut.createElement(up.Provider,{value:a},c):ut.createElement(up.Provider,{value:a},ut.createElement(o,d,c))},t}(ut.Component);gw.propTypes={};gw.defaultProps=oY;const gM=gw;var aY=["in","onExited","appear","enter","exit"],sY=function(t){return function(n){n.in,n.onExited,n.appear,n.enter,n.exit;var r=$r(n,aY);return N.createElement(t,r)}},lY=sY,uY=["component","duration","in","onExited"],mM=function(t){var n=t.component,r=t.duration,i=r===void 0?1:r,o=t.in;t.onExited;var l=$r(t,uY),d=N.useRef(null),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(i,"ms")},exiting:{opacity:0},exited:{opacity:0}};return N.createElement(hM,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:i,nodeRef:d},function(c){var s={style:je({},a[c]),ref:d};return N.createElement(n,Ie({innerProps:s},l))})},Qy=260,cY=function(t){var n=t.children,r=t.in,i=t.onExited,o=N.useRef(null),l=N.useState("auto"),d=qr(l,2),a=d[0],c=d[1];N.useEffect(function(){var u=o.current;if(u){var f=window.requestAnimationFrame(function(){return c(u.getBoundingClientRect().width)});return function(){return window.cancelAnimationFrame(f)}}},[]);var s=function(f){switch(f){default:return{width:a};case"exiting":return{width:0,transition:"width ".concat(Qy,"ms ease-out")};case"exited":return{width:0}}};return N.createElement(hM,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,onExited:function(){var f=o.current;f&&(i==null||i(f))},timeout:Qy,nodeRef:o},function(u){return N.createElement("div",{ref:o,style:je({overflow:"hidden",whiteSpace:"nowrap"},s(u))},n)})},dY=["in","onExited"],fY=function(t){return function(n){var r=n.in,i=n.onExited,o=$r(n,dY);return N.createElement(cY,{in:r,onExited:i},N.createElement(t,Ie({cropWithEllipsis:r},o)))}},hY=fY,pY=function(t){return function(n){return N.createElement(mM,Ie({component:t,duration:n.isMulti?Qy:1},n))}},gY=pY,mY=function(t){return function(n){return N.createElement(mM,Ie({component:t},n))}},vY=mY,yY=["component"],bY=["children"],wY=function(t){return function(n){return n.isMulti?N.createElement(SY,Ie({component:t},n)):N.createElement(gM,Ie({component:t},n))}},SY=function(t){var n=t.component,r=$r(t,yY),i=xY(r);return N.createElement(gM,Ie({component:n},i))},xY=function(t){var n=t.children,r=$r(t,bY),i=r.isMulti,o=r.hasValue,l=r.innerProps,d=r.selectProps,a=d.components,c=d.controlShouldRenderValue,s=N.useState(i&&c&&o),u=qr(s,2),f=u[0],h=u[1],p=N.useState(!1),g=qr(p,2),w=g[0],x=g[1];N.useEffect(function(){o&&!f&&h(!0)},[o,f]),N.useEffect(function(){w&&!o&&f&&h(!1),x(!1)},[w,o,f]);var S=function(){return x(!0)},T=function(m){if(i&&N.isValidElement(m)){if(m.type===a.MultiValue)return N.cloneElement(m,{onExited:S});if(m.type===a.Placeholder&&f)return null}return m},v=je(je({},l),{},{style:je(je({},l==null?void 0:l.style),{},{display:i&&o||f?"flex":"grid"})}),b=je(je({},r),{},{innerProps:v,children:N.Children.toArray(n).map(T)});return b},_Y=wY,CY=["Input","MultiValue","Placeholder","SingleValue","ValueContainer"],vM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=fM({components:t}),r=n.Input,i=n.MultiValue,o=n.Placeholder,l=n.SingleValue,d=n.ValueContainer,a=$r(n,CY);return je({Input:lY(r),MultiValue:hY(i),Placeholder:gY(o),SingleValue:vY(l),ValueContainer:_Y(d)},a)},kd=vM();kd.Input;kd.MultiValue;kd.Placeholder;kd.SingleValue;kd.ValueContainer;var kY=VA(vM);function EY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qT(r.key),r)}}function $Y(e,t,n){return t&&R_(e.prototype,t),n&&R_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ep(e,t)}function cp(e){return cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cp(e)}function AY(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function MY(e,t){if(t&&(Cs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pM(e)}function LY(e){var t=AY();return function(){var r=cp(e),i;if(t){var o=cp(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return MY(this,i)}}function RY(e){if(Array.isArray(e))return qy(e)}function PY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cc(e){return RY(e)||PY(e)||WA(e)||IY()}var OY={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},FY=function(t){return Ke("span",Ie({css:OY},t))},P_=FY,DY={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.isDisabled,o=t.tabSelectsValue,l=t.context;switch(l){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,l=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return l?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,l=o===void 0?"":o,d=t.selectValue,a=t.isDisabled,c=t.isSelected,s=function(p,g){return p&&p.length?"".concat(p.indexOf(g)+1," of ").concat(p.length):""};if(n==="value"&&d)return"value ".concat(l," focused, ").concat(s(d,r),".");if(n==="menu"){var u=a?" disabled":"",f="".concat(c?"selected":"focused").concat(u);return"option ".concat(l," ").concat(f,", ").concat(s(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},NY=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,l=t.isFocused,d=t.selectValue,a=t.selectProps,c=t.id,s=a.ariaLiveMessages,u=a.getOptionLabel,f=a.inputValue,h=a.isMulti,p=a.isOptionDisabled,g=a.isSearchable,w=a.menuIsOpen,x=a.options,S=a.screenReaderStatus,T=a.tabSelectsValue,v=a["aria-label"],b=a["aria-live"],y=N.useMemo(function(){return je(je({},DY),s||{})},[s]),m=N.useMemo(function(){var A="";if(n&&y.onChange){var I=n.option,P=n.options,z=n.removedValue,B=n.removedValues,V=n.value,K=function(ce){return Array.isArray(ce)?null:ce},q=z||I||K(V),re=q?u(q):"",Y=P||B||void 0,Z=Y?Y.map(u):[],te=je({isDisabled:q&&p(q,d),label:re,labels:Z},n);A=y.onChange(te)}return A},[n,y,p,d,u]),E=N.useMemo(function(){var A="",I=r||i,P=!!(r&&d&&d.includes(r));if(I&&y.onFocus){var z={focused:I,label:u(I),isDisabled:p(I,d),isSelected:P,options:o,context:I===r?"menu":"value",selectValue:d};A=y.onFocus(z)}return A},[r,i,u,p,y,o,d]),M=N.useMemo(function(){var A="";if(w&&x.length&&y.onFilter){var I=S({count:o.length});A=y.onFilter({inputValue:f,resultsMessage:I})}return A},[o,f,w,y,x,S]),C=N.useMemo(function(){var A="";if(y.guidance){var I=i?"value":w?"menu":"input";A=y.guidance({"aria-label":v,context:I,isDisabled:r&&p(r,d),isMulti:h,isSearchable:g,tabSelectsValue:T})}return A},[v,r,i,h,p,g,w,y,d,T]),k="".concat(E," ").concat(M," ").concat(C),O=Ke(N.Fragment,null,Ke("span",{id:"aria-selection"},m),Ke("span",{id:"aria-context"},k)),R=(n==null?void 0:n.action)==="initial-input-focus";return Ke(N.Fragment,null,Ke(P_,{id:c},R&&O),Ke(P_,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text"},l&&!R&&O))},zY=NY,Zy=[{base:"A",letters:"AⒶÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷḂḄḆɃƂƁ"},{base:"C",letters:"CⒸĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻḞƑꝻ"},{base:"G",letters:"GⒼǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿĴɈ"},{base:"K",letters:"KⓀḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂḾṀṂⱮƜ"},{base:"N",letters:"NⓃǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆꝖꝘɊ"},{base:"R",letters:"RⓇŔṘŘȐȒṚṜŖṞɌⱤꞦꞂ"},{base:"S",letters:"SⓈẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍẊẌ"},{base:"Y",letters:"YⓎỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑḃḅḇƀƃɓ"},{base:"c",letters:"cⓒćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕḟƒꝼ"},{base:"g",letters:"gⓖǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙĵǰɉ"},{base:"k",letters:"kⓚḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜḿṁṃɱɯ"},{base:"n",letters:"nⓝǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠɋꝗꝙ"},{base:"r",letters:"rⓡŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧẋẍ"},{base:"y",letters:"yⓨỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩźẑżžẓẕƶȥɀⱬꝣ"}],BY=new RegExp("["+Zy.map(function(e){return e.letters}).join("")+"]","g"),yM={};for(var rv=0;rv<Zy.length;rv++)for(var iv=Zy[rv],ov=0;ov<iv.letters.length;ov++)yM[iv.letters[ov]]=iv.base;var bM=function(t){return t.replace(BY,function(n){return yM[n]})},jY=VA(bM),I_=function(t){return t.replace(/^\s+|\s+$/g,"")},HY=function(t){return"".concat(t.label," ").concat(t.value)},VY=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=je({ignoreCase:!0,ignoreAccents:!0,stringify:HY,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,l=i.ignoreAccents,d=i.stringify,a=i.trim,c=i.matchFrom,s=a?I_(r):r,u=a?I_(d(n)):d(n);return o&&(s=s.toLowerCase(),u=u.toLowerCase()),l&&(s=jY(s),u=bM(u)),c==="start"?u.substr(0,s.length)===s:u.indexOf(s)>-1}},WY=["innerRef"];function UY(e){var t=e.innerRef,n=$r(e,WY),r=GK(n,"onExited","in","enter","exit","appear");return Ke("input",Ie({ref:t},r,{css:vb({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var GY=function(t){t.preventDefault(),t.stopPropagation()};function KY(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,l=N.useRef(!1),d=N.useRef(!1),a=N.useRef(0),c=N.useRef(null),s=N.useCallback(function(w,x){if(c.current!==null){var S=c.current,T=S.scrollTop,v=S.scrollHeight,b=S.clientHeight,y=c.current,m=x>0,E=v-b-T,M=!1;E>x&&l.current&&(r&&r(w),l.current=!1),m&&d.current&&(o&&o(w),d.current=!1),m&&x>E?(n&&!l.current&&n(w),y.scrollTop=v,M=!0,l.current=!0):!m&&-x>T&&(i&&!d.current&&i(w),y.scrollTop=0,M=!0,d.current=!0),M&&GY(w)}},[n,r,i,o]),u=N.useCallback(function(w){s(w,w.deltaY)},[s]),f=N.useCallback(function(w){a.current=w.changedTouches[0].clientY},[]),h=N.useCallback(function(w){var x=a.current-w.changedTouches[0].clientY;s(w,x)},[s]),p=N.useCallback(function(w){if(w){var x=VK?{passive:!1}:!1;w.addEventListener("wheel",u,x),w.addEventListener("touchstart",f,x),w.addEventListener("touchmove",h,x)}},[h,f,u]),g=N.useCallback(function(w){w&&(w.removeEventListener("wheel",u,!1),w.removeEventListener("touchstart",f,!1),w.removeEventListener("touchmove",h,!1))},[h,f,u]);return N.useEffect(function(){if(t){var w=c.current;return p(w),function(){g(w)}}},[t,p,g]),function(w){c.current=w}}var O_=["boxSizing","height","overflow","paddingRight","position"],F_={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function D_(e){e.preventDefault()}function N_(e){e.stopPropagation()}function z_(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function B_(){return"ontouchstart"in window||navigator.maxTouchPoints}var j_=!!(typeof window<"u"&&window.document&&window.document.createElement),zu=0,ll={capture:!1,passive:!1};function qY(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=N.useRef({}),o=N.useRef(null),l=N.useCallback(function(a){if(j_){var c=document.body,s=c&&c.style;if(r&&O_.forEach(function(p){var g=s&&s[p];i.current[p]=g}),r&&zu<1){var u=parseInt(i.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+u||0;Object.keys(F_).forEach(function(p){var g=F_[p];s&&(s[p]=g)}),s&&(s.paddingRight="".concat(h,"px"))}c&&B_()&&(c.addEventListener("touchmove",D_,ll),a&&(a.addEventListener("touchstart",z_,ll),a.addEventListener("touchmove",N_,ll))),zu+=1}},[r]),d=N.useCallback(function(a){if(j_){var c=document.body,s=c&&c.style;zu=Math.max(zu-1,0),r&&zu<1&&O_.forEach(function(u){var f=i.current[u];s&&(s[u]=f)}),c&&B_()&&(c.removeEventListener("touchmove",D_,ll),a&&(a.removeEventListener("touchstart",z_,ll),a.removeEventListener("touchmove",N_,ll)))}},[r]);return N.useEffect(function(){if(t){var a=o.current;return l(a),function(){d(a)}}},[t,l,d]),function(a){o.current=a}}var YY=function(){return document.activeElement&&document.activeElement.blur()},XY={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function QY(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,l=e.onBottomLeave,d=e.onTopArrive,a=e.onTopLeave,c=KY({isEnabled:i,onBottomArrive:o,onBottomLeave:l,onTopArrive:d,onTopLeave:a}),s=qY({isEnabled:n}),u=function(h){c(h),s(h)};return Ke(N.Fragment,null,n&&Ke("div",{onClick:YY,css:XY}),t(u))}var ZY={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},JY=function(t){var n=t.name,r=t.onFocus;return Ke("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:ZY,value:"",onChange:function(){}})},eX=JY,tX=function(t){return t.label},wM=function(t){return t.label},SM=function(t){return t.value},nX=function(t){return!!t.isDisabled},rX={clearIndicator:gq,container:oq,control:Sq,dropdownIndicator:hq,group:kq,groupHeading:$q,indicatorsContainer:uq,indicatorSeparator:vq,input:Lq,loadingIndicator:wq,loadingMessage:nq,menu:YK,menuList:JK,menuPortal:rq,multiValue:Fq,multiValueLabel:Dq,multiValueRemove:Nq,noOptionsMessage:tq,option:Wq,placeholder:Kq,singleValue:Xq,valueContainer:sq},iX={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},oX=4,xM=4,aX=38,sX=xM*2,lX={baseUnit:xM,controlHeight:aX,menuGutter:sX},av={borderRadius:oX,colors:iX,spacing:lX},uX={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:A_(),captureMenuScroll:!A_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:VY(),formatGroupLabel:tX,getOptionLabel:wM,getOptionValue:SM,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:nX,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!jK(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function H_(e,t,n,r){var i=EM(e,t,n),o=$M(e,t,n),l=kM(e,t),d=dp(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:l,value:d,index:r}}function _M(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(l,d){return H_(e,l,t,d)}).filter(function(l){return V_(e,l)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=H_(e,n,t,r);return V_(e,o)?o:void 0}).filter(WK)}function CM(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Cc(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function cX(e,t){return CM(_M(e,t))}function V_(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,l=t.label,d=t.value;return(!AM(e)||!o)&&TM(e,{label:l,value:d,data:i},r)}function dX(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function fX(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var kM=function(t,n){return t.getOptionLabel(n)},dp=function(t,n){return t.getOptionValue(n)};function EM(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function $M(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=dp(e,t);return n.some(function(i){return dp(e,i)===r})}function TM(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var AM=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},hX=1,mw=function(e){TY(n,e);var t=LY(n);function n(r){var i;if(EY(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(d){i.controlRef=d},i.focusedOptionRef=null,i.getFocusedOptionRef=function(d){i.focusedOptionRef=d},i.menuListRef=null,i.getMenuListRef=function(d){i.menuListRef=d},i.inputRef=null,i.getInputRef=function(d){i.inputRef=d},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(d,a){var c=i.props,s=c.onChange,u=c.name;a.name=u,i.ariaOnChange(d,a),s(d,a)},i.setValue=function(d,a,c){var s=i.props,u=s.closeMenuOnSelect,f=s.isMulti,h=s.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:h}),u&&(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(d,{action:a,option:c})},i.selectOption=function(d){var a=i.props,c=a.blurInputOnSelect,s=a.isMulti,u=a.name,f=i.state.selectValue,h=s&&i.isOptionSelected(d,f),p=i.isOptionDisabled(d,f);if(h){var g=i.getOptionValue(d);i.setValue(f.filter(function(w){return i.getOptionValue(w)!==g}),"deselect-option",d)}else if(!p)s?i.setValue([].concat(Cc(f),[d]),"select-option",d):i.setValue(d,"select-option");else{i.ariaOnChange(d,{action:"select-option",option:d,name:u});return}c&&i.blurInput()},i.removeValue=function(d){var a=i.props.isMulti,c=i.state.selectValue,s=i.getOptionValue(d),u=c.filter(function(h){return i.getOptionValue(h)!==s}),f=nc(a,u,u[0]||null);i.onChange(f,{action:"remove-value",removedValue:d}),i.focusInput()},i.clearValue=function(){var d=i.state.selectValue;i.onChange(nc(i.props.isMulti,[],null),{action:"clear",removedValues:d})},i.popValue=function(){var d=i.props.isMulti,a=i.state.selectValue,c=a[a.length-1],s=a.slice(0,a.length-1),u=nc(d,s,s[0]||null);i.onChange(u,{action:"pop-value",removedValue:c})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var d=arguments.length,a=new Array(d),c=0;c<d;c++)a[c]=arguments[c];return FK.apply(void 0,[i.props.classNamePrefix].concat(a))},i.getOptionLabel=function(d){return kM(i.props,d)},i.getOptionValue=function(d){return dp(i.props,d)},i.getStyles=function(d,a){var c=i.props.unstyled,s=rX[d](a,c);s.boxSizing="border-box";var u=i.props.styles[d];return u?u(s,a):s},i.getClassNames=function(d,a){var c,s;return(c=(s=i.props.classNames)[d])===null||c===void 0?void 0:c.call(s,a)},i.getElementId=function(d){return"".concat(i.instancePrefix,"-").concat(d)},i.getComponents=function(){return fM(i.props)},i.buildCategorizedOptions=function(){return _M(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return CM(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(d,a){i.setState({ariaSelection:je({value:d},a)})},i.onMenuMouseDown=function(d){d.button===0&&(d.stopPropagation(),d.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(d){i.blockOptionHover=!1},i.onControlMouseDown=function(d){if(!d.defaultPrevented){var a=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?d.target.tagName!=="INPUT"&&d.target.tagName!=="TEXTAREA"&&i.onMenuClose():a&&i.openMenu("first"):(a&&(i.openAfterFocus=!0),i.focusInput()),d.target.tagName!=="INPUT"&&d.target.tagName!=="TEXTAREA"&&d.preventDefault()}},i.onDropdownIndicatorMouseDown=function(d){if(!(d&&d.type==="mousedown"&&d.button!==0)&&!i.props.isDisabled){var a=i.props,c=a.isMulti,s=a.menuIsOpen;i.focusInput(),s?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),d.preventDefault()}},i.onClearIndicatorMouseDown=function(d){d&&d.type==="mousedown"&&d.button!==0||(i.clearValue(),d.preventDefault(),i.openAfterFocus=!1,d.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(d){typeof i.props.closeMenuOnScroll=="boolean"?d.target instanceof HTMLElement&&Cg(d.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(d)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(d){var a=d.touches,c=a&&a.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(d){var a=d.touches,c=a&&a.item(0);if(c){var s=Math.abs(c.clientX-i.initialTouchX),u=Math.abs(c.clientY-i.initialTouchY),f=5;i.userIsDragging=s>f||u>f}},i.onTouchEnd=function(d){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(d.target)&&i.menuListRef&&!i.menuListRef.contains(d.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(d){i.userIsDragging||i.onControlMouseDown(d)},i.onClearIndicatorTouchEnd=function(d){i.userIsDragging||i.onClearIndicatorMouseDown(d)},i.onDropdownIndicatorTouchEnd=function(d){i.userIsDragging||i.onDropdownIndicatorMouseDown(d)},i.handleInputChange=function(d){var a=i.props.inputValue,c=d.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:a}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(d){i.props.onFocus&&i.props.onFocus(d),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(d){var a=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(d),i.onInputChange("",{action:"input-blur",prevInputValue:a}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(d){i.blockOptionHover||i.state.focusedOption===d||i.setState({focusedOption:d})},i.shouldHideSelectedOptions=function(){return AM(i.props)},i.onValueInputFocus=function(d){d.preventDefault(),d.stopPropagation(),i.focus()},i.onKeyDown=function(d){var a=i.props,c=a.isMulti,s=a.backspaceRemovesValue,u=a.escapeClearsValue,f=a.inputValue,h=a.isClearable,p=a.isDisabled,g=a.menuIsOpen,w=a.onKeyDown,x=a.tabSelectsValue,S=a.openMenuOnFocus,T=i.state,v=T.focusedOption,b=T.focusedValue,y=T.selectValue;if(!p&&!(typeof w=="function"&&(w(d),d.defaultPrevented))){switch(i.blockOptionHover=!0,d.key){case"ArrowLeft":if(!c||f)return;i.focusValue("previous");break;case"ArrowRight":if(!c||f)return;i.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(b)i.removeValue(b);else{if(!s)return;c?i.popValue():h&&i.clearValue()}break;case"Tab":if(i.isComposing||d.shiftKey||!g||!x||!v||S&&i.isOptionSelected(v,y))return;i.selectOption(v);break;case"Enter":if(d.keyCode===229)break;if(g){if(!v||i.isComposing)return;i.selectOption(v);break}return;case"Escape":g?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:f}),i.onMenuClose()):h&&u&&i.clearValue();break;case" ":if(f)return;if(!g){i.openMenu("first");break}if(!v)return;i.selectOption(v);break;case"ArrowUp":g?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":g?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!g)return;i.focusOption("pageup");break;case"PageDown":if(!g)return;i.focusOption("pagedown");break;case"Home":if(!g)return;i.focusOption("first");break;case"End":if(!g)return;i.focusOption("last");break;default:return}d.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++hX),i.state.selectValue=sp(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),l=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[l]}return i}return $Y(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&T_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isDisabled,d=o.menuIsOpen,a=this.state.isFocused;(a&&!l&&i.isDisabled||a&&d&&!i.menuIsOpen)&&this.focusInput(),a&&l&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!l&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(T_(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,l=this.state,d=l.selectValue,a=l.isFocused,c=this.buildFocusableOptions(),s=i==="first"?0:c.length-1;if(!this.props.isMulti){var u=c.indexOf(d[0]);u>-1&&(s=u)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[s]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,l=o.selectValue,d=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=l.indexOf(d);d||(a=-1);var c=l.length-1,s=-1;if(l.length){switch(i){case"previous":a===0?s=0:a===-1?s=c:s=a-1;break;case"next":a>-1&&a<c&&(s=a+1);break}this.setState({inputIsHidden:s!==-1,focusedValue:l[s]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,l=this.state.focusedOption,d=this.getFocusableOptions();if(d.length){var a=0,c=d.indexOf(l);l||(c=-1),i==="up"?a=c>0?c-1:d.length-1:i==="down"?a=(c+1)%d.length:i==="pageup"?(a=c-o,a<0&&(a=0)):i==="pagedown"?(a=c+o,a>d.length-1&&(a=d.length-1)):i==="last"&&(a=d.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:d[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(av):je(je({},av),this.props.theme):av}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,l=this.getStyles,d=this.getClassNames,a=this.getValue,c=this.selectOption,s=this.setValue,u=this.props,f=u.isMulti,h=u.isRtl,p=u.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:l,getClassNames:d,getValue:a,hasValue:g,isMulti:f,isRtl:h,options:p,selectOption:c,selectProps:u,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,l=i.isMulti;return o===void 0?l:o}},{key:"isOptionDisabled",value:function(i,o){return EM(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return $M(this.props,i,o)}},{key:"filterOption",value:function(i,o){return TM(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var l=this.props.inputValue,d=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:l,selectValue:d})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,l=i.isSearchable,d=i.inputId,a=i.inputValue,c=i.tabIndex,s=i.form,u=i.menuIsOpen,f=i.required,h=this.getComponents(),p=h.Input,g=this.state,w=g.inputIsHidden,x=g.ariaSelection,S=this.commonProps,T=d||this.getElementId("input"),v=je(je(je({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox"},u&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!l&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return l?N.createElement(p,Ie({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:T,innerRef:this.getInputRef,isDisabled:o,isHidden:w,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:s,type:"text",value:a},v)):N.createElement(UY,Ie({id:T,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ap,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),l=o.MultiValue,d=o.MultiValueContainer,a=o.MultiValueLabel,c=o.MultiValueRemove,s=o.SingleValue,u=o.Placeholder,f=this.commonProps,h=this.props,p=h.controlShouldRenderValue,g=h.isDisabled,w=h.isMulti,x=h.inputValue,S=h.placeholder,T=this.state,v=T.selectValue,b=T.focusedValue,y=T.isFocused;if(!this.hasValue()||!p)return x?null:N.createElement(u,Ie({},f,{key:"placeholder",isDisabled:g,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),S);if(w)return v.map(function(E,M){var C=E===b,k="".concat(i.getOptionLabel(E),"-").concat(i.getOptionValue(E));return N.createElement(l,Ie({},f,{components:{Container:d,Label:a,Remove:c},isFocused:C,isDisabled:g,key:k,index:M,removeProps:{onClick:function(){return i.removeValue(E)},onTouchEnd:function(){return i.removeValue(E)},onMouseDown:function(R){R.preventDefault()}},data:E}),i.formatOptionLabel(E,"value"))});if(x)return null;var m=v[0];return N.createElement(s,Ie({},f,{data:m,isDisabled:g}),this.formatOptionLabel(m,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,l=this.commonProps,d=this.props,a=d.isDisabled,c=d.isLoading,s=this.state.isFocused;if(!this.isClearable()||!o||a||!this.hasValue()||c)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return N.createElement(o,Ie({},l,{innerProps:u,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,l=this.commonProps,d=this.props,a=d.isDisabled,c=d.isLoading,s=this.state.isFocused;if(!o||!c)return null;var u={"aria-hidden":"true"};return N.createElement(o,Ie({},l,{innerProps:u,isDisabled:a,isFocused:s}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,l=i.IndicatorSeparator;if(!o||!l)return null;var d=this.commonProps,a=this.props.isDisabled,c=this.state.isFocused;return N.createElement(l,Ie({},d,{isDisabled:a,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var l=this.commonProps,d=this.props.isDisabled,a=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return N.createElement(o,Ie({},l,{innerProps:c,isDisabled:d,isFocused:a}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),l=o.Group,d=o.GroupHeading,a=o.Menu,c=o.MenuList,s=o.MenuPortal,u=o.LoadingMessage,f=o.NoOptionsMessage,h=o.Option,p=this.commonProps,g=this.state.focusedOption,w=this.props,x=w.captureMenuScroll,S=w.inputValue,T=w.isLoading,v=w.loadingMessage,b=w.minMenuHeight,y=w.maxMenuHeight,m=w.menuIsOpen,E=w.menuPlacement,M=w.menuPosition,C=w.menuPortalTarget,k=w.menuShouldBlockScroll,O=w.menuShouldScrollIntoView,R=w.noOptionsMessage,A=w.onMenuScrollToTop,I=w.onMenuScrollToBottom;if(!m)return null;var P=function(Y,Z){var te=Y.type,ie=Y.data,ce=Y.isDisabled,he=Y.isSelected,ve=Y.label,Ce=Y.value,_e=g===ie,Re=ce?void 0:function(){return i.onOptionHover(ie)},ot=ce?void 0:function(){return i.selectOption(ie)},Te="".concat(i.getElementId("option"),"-").concat(Z),it={id:Te,onClick:ot,onMouseMove:Re,onMouseOver:Re,tabIndex:-1};return N.createElement(h,Ie({},p,{innerProps:it,data:ie,isDisabled:ce,isSelected:he,key:Te,label:ve,type:te,value:Ce,isFocused:_e,innerRef:_e?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(Y.data,"menu"))},z;if(this.hasOptions())z=this.getCategorizedOptions().map(function(re){if(re.type==="group"){var Y=re.data,Z=re.options,te=re.index,ie="".concat(i.getElementId("group"),"-").concat(te),ce="".concat(ie,"-heading");return N.createElement(l,Ie({},p,{key:ie,data:Y,options:Z,Heading:d,headingProps:{id:ce,data:re.data},label:i.formatGroupLabel(re.data)}),re.options.map(function(he){return P(he,"".concat(te,"-").concat(he.index))}))}else if(re.type==="option")return P(re,"".concat(re.index))});else if(T){var B=v({inputValue:S});if(B===null)return null;z=N.createElement(u,p,B)}else{var V=R({inputValue:S});if(V===null)return null;z=N.createElement(f,p,V)}var K={minMenuHeight:b,maxMenuHeight:y,menuPlacement:E,menuPosition:M,menuShouldScrollIntoView:O},q=N.createElement(XK,Ie({},p,K),function(re){var Y=re.ref,Z=re.placerProps,te=Z.placement,ie=Z.maxHeight;return N.createElement(a,Ie({},p,K,{innerRef:Y,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:T,placement:te}),N.createElement(QY,{captureEnabled:x,onTopArrive:A,onBottomArrive:I,lockEnabled:k},function(ce){return N.createElement(c,Ie({},p,{innerRef:function(ve){i.getMenuListRef(ve),ce(ve)},isLoading:T,maxHeight:ie,focusedOption:g}),z)}))});return C||M==="fixed"?N.createElement(s,Ie({},p,{appendTo:C,controlElement:this.controlRef,menuPlacement:E,menuPosition:M}),q):q}},{key:"renderFormField",value:function(){var i=this,o=this.props,l=o.delimiter,d=o.isDisabled,a=o.isMulti,c=o.name,s=o.required,u=this.state.selectValue;if(s&&!this.hasValue()&&!d)return N.createElement(eX,{name:c,onFocus:this.onValueInputFocus});if(!(!c||d))if(a)if(l){var f=u.map(function(g){return i.getOptionValue(g)}).join(l);return N.createElement("input",{name:c,type:"hidden",value:f})}else{var h=u.length>0?u.map(function(g,w){return N.createElement("input",{key:"i-".concat(w),name:c,type:"hidden",value:i.getOptionValue(g)})}):N.createElement("input",{name:c,type:"hidden",value:""});return N.createElement("div",null,h)}else{var p=u[0]?this.getOptionValue(u[0]):"";return N.createElement("input",{name:c,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,l=o.ariaSelection,d=o.focusedOption,a=o.focusedValue,c=o.isFocused,s=o.selectValue,u=this.getFocusableOptions();return N.createElement(zY,Ie({},i,{id:this.getElementId("live-region"),ariaSelection:l,focusedOption:d,focusedValue:a,isFocused:c,selectValue:s,focusableOptions:u}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,l=i.IndicatorsContainer,d=i.SelectContainer,a=i.ValueContainer,c=this.props,s=c.className,u=c.id,f=c.isDisabled,h=c.menuIsOpen,p=this.state.isFocused,g=this.commonProps=this.getCommonProps();return N.createElement(d,Ie({},g,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:p}),this.renderLiveRegion(),N.createElement(o,Ie({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:p,menuIsOpen:h}),N.createElement(a,Ie({},g,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),N.createElement(l,Ie({},g,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var l=o.prevProps,d=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,s=o.isFocused,u=o.prevWasFocused,f=i.options,h=i.value,p=i.menuIsOpen,g=i.inputValue,w=i.isMulti,x=sp(h),S={};if(l&&(h!==l.value||f!==l.options||p!==l.menuIsOpen||g!==l.inputValue)){var T=p?cX(i,x):[],v=d?dX(o,x):null,b=fX(o,T);S={selectValue:x,focusedOption:b,focusedValue:v,clearFocusValueOnUpdate:!1}}var y=a!=null&&i!==l?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},m=c,E=s&&u;return s&&!E&&(m={value:nc(w,x,x[0]||null),options:x,action:"initial-input-focus"},E=!u),(c==null?void 0:c.action)==="initial-input-focus"&&(m=null),je(je(je({},S),y),{},{prevProps:i,ariaSelection:m,prevWasFocused:E})}}]),n}(N.Component);mw.defaultProps=uX;var pX=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function MM(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,l=o===void 0?null:o,d=e.inputValue,a=e.menuIsOpen,c=e.onChange,s=e.onInputChange,u=e.onMenuClose,f=e.onMenuOpen,h=e.value,p=$r(e,pX),g=N.useState(d!==void 0?d:n),w=qr(g,2),x=w[0],S=w[1],T=N.useState(a!==void 0?a:i),v=qr(T,2),b=v[0],y=v[1],m=N.useState(h!==void 0?h:l),E=qr(m,2),M=E[0],C=E[1],k=N.useCallback(function(B,V){typeof c=="function"&&c(B,V),C(B)},[c]),O=N.useCallback(function(B,V){var K;typeof s=="function"&&(K=s(B,V)),S(K!==void 0?K:B)},[s]),R=N.useCallback(function(){typeof f=="function"&&f(),y(!0)},[f]),A=N.useCallback(function(){typeof u=="function"&&u(),y(!1)},[u]),I=d!==void 0?d:x,P=a!==void 0?a:b,z=h!==void 0?h:M;return je(je({},p),{},{inputValue:I,menuIsOpen:P,onChange:k,onInputChange:O,onMenuClose:A,onMenuOpen:R,value:z})}var gX=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],W_=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),l=String(r.getOptionLabel(n)).toLowerCase();return o===i||l===i},sv={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return W_(t,o,i)})||r.some(function(o){return W_(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function mX(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,l=o===void 0?sv.formatCreateLabel:o,d=e.isValidNewOption,a=d===void 0?sv.isValidNewOption:d,c=e.getNewOptionData,s=c===void 0?sv.getNewOptionData:c,u=e.onCreateOption,f=e.options,h=f===void 0?[]:f,p=e.onChange,g=$r(e,gX),w=g.getOptionValue,x=w===void 0?SM:w,S=g.getOptionLabel,T=S===void 0?wM:S,v=g.inputValue,b=g.isLoading,y=g.isMulti,m=g.value,E=g.name,M=N.useMemo(function(){return a(v,sp(m),h,{getOptionValue:x,getOptionLabel:T})?s(v,l(v)):void 0},[l,s,T,x,v,a,h,m]),C=N.useMemo(function(){return(n||!b)&&M?i==="first"?[M].concat(Cc(h)):[].concat(Cc(h),[M]):h},[n,i,b,M,h]),k=N.useCallback(function(O,R){if(R.action!=="select-option")return p(O,R);var A=Array.isArray(O)?O:[O];if(A[A.length-1]===M){if(u)u(v);else{var I=s(v,v),P={action:"create-option",name:E,option:I};p(nc(y,[].concat(Cc(sp(m)),[I]),I),P)}return}p(O,R)},[s,v,y,E,M,u,p,m]);return je(je({},g),{},{options:C,onChange:k})}var vX=N.forwardRef(function(e,t){var n=MM(e),r=mX(n);return N.createElement(mw,Ie({ref:t},r))}),yX=vX,bX=N.forwardRef(function(e,t){var n=MM(e);return N.createElement(mw,Ie({ref:t},n))}),wX=bX;const SX=kY(),LM={container:e=>({...e,width:"100%"}),control:e=>({...e,borderRadius:0,border:"1px solid var(--border-color-primary)",background:"var(--input-background-fill)",width:"100%"}),option:e=>({...e,borderRadius:0,color:"var(--body-text-color)",background:"var(--background-fill-primary)","&:hover":{background:"var(--ae-primary-color)"}}),menu:e=>({...e,borderRadius:0,background:"var(--background-fill-primary)",border:"1px solid var(--ae-input-border-color) !important"}),multiValue:e=>({...e,borderRadius:0,background:"var(--background-fill-primary)",color:"var(--nevysha-font-color)"}),multiValueLabel:e=>({...e,color:"var(--nevysha-font-color)"}),multiValueRemove:e=>({...e,":hover":{color:"white"}}),indicatorContainer:e=>({...e,color:"var(--nevysha-font-color)",padding:0})};function xX({imageHash:e,isFull:t}){const{getImage:n,tags:r,setTags:i}=N.useContext(Gi),[o,l]=N.useState(n(e)),[d,a]=N.useState([]),[c,s]=N.useState(!1),u=o&&o.metadata&&o.metadata.exif&&o.metadata.exif["cozy-nest-tags"];N.useEffect(()=>{if(o)if(o.metadata.exif["cozy-nest-tags"]){const g=o.metadata.exif["cozy-nest-tags"].split(",");a([...g])}else a([])},[e,u]),N.useEffect(()=>{l(n(e))},[e]);const f=g=>{s(!0),i([...r,g]);const w=[...new Set([...d,g])];a([...w]),setTimeout(()=>{s(!1),p([...w]).then(x=>x)},1e3)},h=g=>{const w=[...new Set(g.map(x=>x.value))];a(w),p(w).then(x=>x)},p=async g=>{const w=o.metadata.exif;w["cozy-nest-tags"]=g.join(","),jt.debug("Saving tags",w["cozy-nest-tags"]),await ab(o.path,w)};return W.jsx(W.Fragment,{children:W.jsx(yX,{placeholder:"Tags...",styles:LM,isMulti:!0,options:r.map(g=>({value:g,label:g})),onCreateOption:f,isDisabled:c,isLoading:c,value:d.map(g=>({value:g,label:g})),onChange:g=>h(g)})})}function _X({setActiveTags:e}){const{tags:t}=N.useContext(Gi);return W.jsx(wX,{options:t.map(n=>({value:n,label:n})),components:SX,isMulti:!0,placeholder:"Tags...",styles:LM,onChange:n=>e(n.map(r=>r.value))})}const Xo=e=>{try{return e()}catch{return"Error parsing metadata"}};function U_({verbose:e,imageHash:t,closeModal:n}){const{images:r,updateExifInState:i,getImage:o}=N.useContext(Gi),[l,d]=N.useState(o(t)),[a,c]=N.useState({date:0,model:"",size:"",seed:"",steps:"",sampler:"",modelHash:"",formattedAll:""}),s=e;N.useEffect(()=>{d(o(t))},[r,t]),N.useEffect(()=>{l&&l.metadata&&l.metadata.exif&&l.metadata.exif.parameters&&c({date:Xo(()=>new Date(l.metadata.date*1e3).toISOString().replace(/T/," ").replace(/\..+/,"")),model:Xo(()=>l.metadata.exif.parameters.split("Model: ")[1].split(",")[0]),size:Xo(()=>l.metadata.exif.parameters.split("Size: ")[1].split(",")[0]),seed:Xo(()=>l.metadata.exif.parameters.split("Seed: ")[1].split(",")[0]),steps:Xo(()=>l.metadata.exif.parameters.split("Steps: ")[1].split(",")[0]),sampler:Xo(()=>l.metadata.exif.parameters.split("Sampler: ")[1].split(",")[0]),modelHash:Xo(()=>l.metadata.exif.parameters.split("Model hash: ")[1].split(",")[0]),formattedAll:Xo(()=>l.metadata.exif.parameters.replace(/\n/g,"<br>"))})},[l]);const u=async()=>{n()};return l?W.jsxs("div",{className:"image-info",children:[s&&W.jsx(W.Fragment,{children:W.jsx("button",{className:"nevysha lg primary gradio-button btn",onClick:u,children:"Close"})}),W.jsx(xX,{imageHash:t,isFull:s}),W.jsx("table",{children:W.jsxs("tbody",{children:[W.jsxs("tr",{children:[W.jsx("td",{children:"Date: "}),W.jsx("td",{children:a==null?void 0:a.date})]}),W.jsxs("tr",{children:[W.jsx("td",{children:"Model: "}),W.jsx("td",{children:a==null?void 0:a.model})]}),s&&W.jsxs("tr",{children:[W.jsx("td",{children:"Model Hash:"}),W.jsx("td",{children:a==null?void 0:a.modelHash})]}),W.jsxs("tr",{children:[W.jsx("td",{children:"Size: "}),W.jsx("td",{children:a==null?void 0:a.size})]}),W.jsxs("tr",{children:[W.jsx("td",{children:"Seed: "}),W.jsx("td",{children:a==null?void 0:a.seed})]}),W.jsxs("tr",{children:[W.jsx("td",{children:"Steps: "}),W.jsx("td",{children:a==null?void 0:a.steps})]}),W.jsxs("tr",{children:[W.jsx("td",{children:"Sampler: "}),W.jsx("td",{children:a==null?void 0:a.sampler})]})]})}),s&&W.jsx("div",{className:"blocInfo",dangerouslySetInnerHTML:{__html:a==null?void 0:a.formattedAll}}),W.jsx(yK,{imageHash:t})]}):W.jsx("div",{className:"image-info",children:"No image selected"})}const CX=window.location.href.split(":")[0]+":"+window.location.href.split(":")[1],kX=7860;function EX({viewPort:e,imageHash:t,index:n}){const[r,i]=N.useState(!1),o=N.useRef(null),l=N.useRef(null),{getImage:d}=N.useContext(Gi),[a,c]=N.useState(!1),[s,u]=N.useState(d(t));N.useEffect(()=>{u(d(t))},[t]),N.useEffect(()=>{const g=l.current.offsetTop,w=g>=e.top&&g<=e.bottom+l.current.offsetHeight||g+l.current.offsetHeight>=e.top&&g+l.current.offsetHeight<=e.bottom;c(!!w)},[e]);function f(){i(!r)}function h(){r||i(!0)}function p(){const g=encodeURIComponent(s.path);return`${CX}:${kX}/cozy-nest/image?path=${g}`}return W.jsx("div",{id:`img_${n}`,className:"image",ref:l,children:a?W.jsxs(W.Fragment,{children:[W.jsx("div",{className:"image-wrapper",onClick:h,children:W.jsx("img",{className:"cozy-nest-thumbnail",src:p(),alt:"image",ref:o})}),W.jsx(U_,{verbose:!1,imageHash:t}),r&&W.jsxs("div",{className:"infoModal",children:[W.jsx("div",{className:"image-wrapper",children:W.jsx("img",{className:"cozy-nest-thumbnail",src:p(),alt:"image"})}),W.jsx(U_,{verbose:!0,imageHash:t,closeModal:f})]})]}):W.jsx("div",{className:"image image-placeholder"})})}const mf=300;function RM(e){const{images:t,filteredImages:n}=N.useContext(Gi),r=N.useRef(null),[i,o]=N.useState(0),[l,d]=N.useState([]),[a,c]=N.useState({top:0,bottom:window.innerHeight+mf});N.useEffect(()=>{d([...n.slice(0,Math.min(i*20+20,n.length))])},[n,t]),n.length>0&&l.length===0&&d(n.slice(0,Math.min(20,n.length)));const s=()=>{u();let f=Math.floor(l.length/20);f!==i&&o(f);const h={top:r.current.scrollTop-mf>0?r.current.scrollTop-mf:0,bottom:r.current.scrollTop+r.current.clientHeight+mf};c(h)},u=()=>{document.getElementById("loadMoreThreshold").getBoundingClientRect().top<window.innerHeight&&d(n.slice(0,i*20+20))};return W.jsxs("div",{className:"browser nevysha nevysha-scrollable",onScroll:()=>s(),ref:r,children:[l.map((f,h)=>W.jsx(EX,{imageHash:f.hash,index:h,viewPort:a},f.hash)),W.jsx("div",{id:"loadMoreThreshold",className:"hackyOffPageElement"})]})}function $X(){return W.jsxs(W.Fragment,{children:[W.jsxs(uo,{children:[W.jsxs("h1",{className:"cnib-title",children:["Cozy Nest Image Browser ",W.jsx("span",{className:"beta-emphasis",children:"beta"})]}),W.jsxs(En,{children:[W.jsxs("span",{children:["The WebSocket is currently ",W.jsx("span",{className:"connexionStatus",style:{color:"red"},children:"Closed"})]}),W.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{marginLeft:"20px",width:"410px"},disabled:!0,children:"Image browser is disabled. To enable it, go to the CozyNest settings."})]}),W.jsx("textarea",{"data-testid":"textbox",placeholder:"Search anything : Prompt, Size, Model, ...",rows:"1",spellCheck:"false","data-gramm":"false",disabled:!0})]}),W.jsx(RM,{imagesRef:[]},0)]})}var PM={},kg={};Object.defineProperty(kg,"__esModule",{value:!0});kg.calculateRgba=void 0;var fp;(function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"})(fp||(fp={}));var TX=function(e,t){if(Object.keys(fp).includes(e)&&(e=fp[e]),e[0]==="#"&&(e=e.slice(1)),e.length===3){var n="";e.split("").forEach(function(i){n+=i,n+=i}),e=n}var r=(e.match(/.{2}/g)||[]).map(function(i){return parseInt(i,16)}).join(", ");return"rgba(".concat(r,", ").concat(t,")")};kg.calculateRgba=TX;var cu={};Object.defineProperty(cu,"__esModule",{value:!0});cu.cssValue=cu.parseLengthAndUnit=void 0;var AX={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function IM(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return AX[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}cu.parseLengthAndUnit=IM;function MX(e){var t=IM(e);return"".concat(t.value).concat(t.unit)}cu.cssValue=MX;var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0});Eg.createAnimation=void 0;var LX=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,l=`
@keyframes `.concat(r,` {
`).concat(t,`
}
`);return o&&o.insertRule(l,0),r};Eg.createAnimation=LX;var hp=Be&&Be.__assign||function(){return hp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},hp.apply(this,arguments)},RX=Be&&Be.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),PX=Be&&Be.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),IX=Be&&Be.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&RX(t,e,n);return PX(t,e),t},OX=Be&&Be.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(PM,"__esModule",{value:!0});var lv=IX(N),FX=kg,Bu=cu,G_=Eg;function DX(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,l=o===void 0?1:o,d=e.cssOverride,a=d===void 0?{}:d,c=e.size,s=c===void 0?50:c,u=OX(e,["loading","color","speedMultiplier","cssOverride","size"]),f=(0,Bu.parseLengthAndUnit)(s),h=f.value,p=f.unit,g=hp({display:"inherit",position:"relative",width:(0,Bu.cssValue)(s),height:(0,Bu.cssValue)(s),transform:"rotate(165deg)"},a),w=h/5,x=(h-w)/2,S=x-w,T=(0,FX.calculateRgba)(i,.75),v=(0,G_.createAnimation)("HashLoader","0% {width: ".concat(w,"px; box-shadow: ").concat(x,"px ").concat(-S,"px ").concat(T,", ").concat(-x,"px ").concat(S,"px ").concat(T,`}
35% {width: `).concat((0,Bu.cssValue)(s),"; box-shadow: 0 ").concat(-S,"px ").concat(T,", 0 ").concat(S,"px ").concat(T,`}
70% {width: `).concat(w,"px; box-shadow: ").concat(-x,"px ").concat(-S,"px ").concat(T,", ").concat(x,"px ").concat(S,"px ").concat(T,`}
100% {box-shadow: `).concat(x,"px ").concat(-S,"px ").concat(T,", ").concat(-x,"px ").concat(S,"px ").concat(T,"}"),"before"),b=(0,G_.createAnimation)("HashLoader","0% {height: ".concat(w,"px; box-shadow: ").concat(S,"px ").concat(x,"px ").concat(i,", ").concat(-S,"px ").concat(-x,"px ").concat(i,`}
35% {height: `).concat((0,Bu.cssValue)(s),"; box-shadow: ").concat(S,"px 0 ").concat(i,", ").concat(-S,"px 0 ").concat(i,`}
70% {height: `).concat(w,"px; box-shadow: ").concat(S,"px ").concat(-x,"px ").concat(i,", ").concat(-S,"px ").concat(x,"px ").concat(i,`}
100% {box-shadow: `).concat(S,"px ").concat(x,"px ").concat(i,", ").concat(-S,"px ").concat(-x,"px ").concat(i,"}"),"after"),y=function(m){return{position:"absolute",top:"50%",left:"50%",display:"block",width:"".concat(h/5).concat(p),height:"".concat(h/5).concat(p),borderRadius:"".concat(h/10).concat(p),transform:"translate(-50%, -50%)",animationFillMode:"none",animation:"".concat(m===1?v:b," ").concat(2/l,"s infinite")}};return n?lv.createElement("span",hp({style:g},u),lv.createElement("span",{style:y(1)}),lv.createElement("span",{style:y(2)})):null}var NX=PM.default=DX;function hi(e){return W.jsx("button",{...e,className:"nevysha lg primary gradio-button btn cnib-button",children:e.children})}function zX(e){const n=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG")).accent_color||"#36d7b7",r=e.label||"";return W.jsxs("div",{className:"cozy-nest-loading",children:[W.jsx("div",{children:r}),W.jsx(NX,{color:n})]})}function BX(){const e=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG")),t=e.disable_image_browser,n=(()=>{try{return e.server_default_port}catch{return jt.debug("cnib_socket_server_port not found in main gradio app"),3333}})();if(t)return W.jsx(W.Fragment,{children:W.jsx($X,{})});const{images:r,setImages:i,setFilteredImages:o,setTags:l}=N.useContext(Gi),[d,a]=N.useState(`ws://localhost:${n}`),[,c]=N.useState([]),[s,u]=N.useState([]),[f,h]=N.useState(""),[p,g]=N.useState(!1),[w,x]=N.useState("radio-hide-hidden"),[S,T]=N.useState(!0),{sendMessage:v,lastMessage:b,readyState:y,getWebSocket:m}=qP(d,{shouldReconnect:()=>t,reconnectAttempts:10,reconnectInterval:3e3});window.ws=m();const E=N.useCallback(()=>v(JSON.stringify({what:"images"})),[v]),M=()=>{y!==zr.ReadyState.OPEN&&a(d+"?t="+Date.now())};function C(){return r.filter(A=>w==="radio-hide-hidden"?A.metadata.exif["cozy-nest-hidden"]!=="True":w==="radio-only-hidden"?!(!A.metadata.exif["cozy-nest-hidden"]||A.metadata.exif["cozy-nest-hidden"]!=="True"):!0).filter(A=>s.length===0?!0:A.metadata.exif["cozy-nest-tags"]?A.metadata.exif["cozy-nest-tags"].split(",").filter(z=>s.includes(z)).length>0:!1)}N.useEffect(()=>{if(b!==null){const A=JSON.parse(b.data);A.error&&window.errorPipe&&window.errorPipe(A),A.what==="images"&&(A.images.length===0&&(jt.debug("Received empty images array from socket"),g(!0)),i(A.images),T(!1)),A.what==="dispatch_on_image_saved"&&i(I=>[A.data,...I]),A.what==="dispatch_on_index_built"&&(i([...A.data]),T(!1)),c(I=>I.concat(b))}},[b,c]),N.useEffect(()=>{r.length===0&&y===zr.ReadyState.OPEN&&!p?E():o(C())},[r,y]),N.useEffect(()=>{if(f!==""){const A=C().filter(I=>JSON.stringify(I.metadata.exif).includes(f));o(A)}else o(C())},[f,w,s,r]),N.useEffect(()=>{const A=[];r.forEach(I=>{if(I.metadata.exif["cozy-nest-tags"]){const P=I.metadata.exif["cozy-nest-tags"].split(",");A.push(...P)}}),l([...A])},[r,w]);const k={[zr.ReadyState.CONNECTING]:"Connecting",[zr.ReadyState.OPEN]:"Connected",[zr.ReadyState.CLOSING]:"Closing",[zr.ReadyState.CLOSED]:"Closed",[zr.ReadyState.UNINSTANTIATED]:"Uninstantiated"}[y],O={color:y===zr.ReadyState.OPEN?"green":y===zr.ReadyState.CONNECTING?"orange":"red"},R=async()=>{(await fetch("/cozy-nest/index",{method:"DELETE"})).ok&&(i([]),T(!0))};return W.jsxs(W.Fragment,{children:[W.jsxs(uo,{children:[W.jsxs(En,{children:[W.jsxs(En,{children:[W.jsx("h1",{className:"cnib-title",children:W.jsx("span",{className:"beta-emphasis",children:"beta"})}),W.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{width:"100px"},onClick:R,children:"Rebuild Index"})]}),W.jsxs(En,{style:{width:"auto"},className:"cozy-websocket-status",children:[W.jsxs("span",{children:["WebSocket status ",W.jsx("span",{className:"connexionStatus",style:O,children:k})]}),y!==zr.ReadyState.OPEN&&W.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{marginLeft:"20px",width:"100px"},onClick:M,children:"Connect"})]})]}),W.jsx(En,{children:W.jsxs(En,{style:{gap:"10px",marginRight:"2px",width:"fit-content"},onChange:A=>x(A.target.id),children:[W.jsxs(En,{style:{width:"auto",alignItems:"center"},children:[W.jsx("input",{type:"radio",id:"radio-hide-hidden",name:"radio-filter",value:"all",defaultChecked:!0}),W.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-hide-hidden",children:"Hide hidden"})]}),W.jsxs(En,{style:{width:"auto",alignItems:"center"},children:[W.jsx("input",{type:"radio",id:"radio-all",name:"radio-filter",value:"all"}),W.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-all",children:"All"})]}),W.jsxs(En,{style:{width:"auto",alignItems:"center"},children:[W.jsx("input",{type:"radio",id:"radio-only-hidden",name:"radio-filter",value:"hidden"}),W.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-only-hidden",children:"Only hidden"})]})]})}),W.jsxs(En,{children:[W.jsx("textarea",{"data-testid":"textbox",placeholder:"Search anything : Tags, Prompt, Size, Model, ...",rows:"1",spellCheck:"false","data-gramm":"false",onChange:A=>h(A.target.value)}),W.jsx(_X,{setActiveTags:u})]})]}),!S&&W.jsx(RM,{}),S&&W.jsx(zX,{label:"building Index..."})]})}let{definePartsStyle:jX,defineMultiStyleConfig:HX}=Ct(T2.keys);const VX=HX({defaultProps:{variant:"nevysha"},variants:{nevysha:jX({field:{outline:"none!important",boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"0 !important",backgroundColor:"var(--input-background-fill) !important",padding:"var(--input-padding) !important",width:"100%",color:"var(--body-text-color)",fontSize:"var(--input-text-size)",lineHeight:"var(--line-sm)",fontFamily:"monospace !important"}})}}),{definePartsStyle:WX,defineMultiStyleConfig:UX}=Ct(M2.keys),GX=UX({defaultProps:{variant:"nevysha"},variants:{nevysha:WX({field:{outline:"none!important",boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"0 !important",backgroundColor:"var(--input-background-fill) !important",padding:"var(--input-padding) !important",width:"100%",color:"var(--body-text-color)",fontSize:"var(--input-text-size) !important",lineHeight:"var(--line-sm)",fontFamily:"monospace !important"},stepperGroup:{border:"1px solid var(--ae-input-border-color) !important",borderTop:"none !important",borderRight:"none !important"},stepper:{color:"var(--body-text-color)",borderTop:"none !important",borderLeft:"none !important"}})}}),{definePartsStyle:K_,defineMultiStyleConfig:KX}=Ct(R2.keys),qX=KX({defaultProps:{variant:"nevysha"},variants:{nevysha:K_({tab:{marginBottom:"-1px",border:"1px solid transparent",borderColor:"transparent",borderBottom:"none",borderRadius:"0 !important",padding:"var(--size-1) var(--size-4) !important",color:"var(--body-text-color-subdued) !important",fontWeight:"var(--section-header-text-weight) !important",fontSize:"var(--section-header-text-size) !important",borderTop:"2px solid transparent !important",_selected:{borderTop:"2px solid var(--ae-primary-color) !important",backgroundColor:"var(--tab-nav-background-color-selected) !important",color:"var(--body-text-color) !important"},_focus:{outline:"none"},_hover:{outline:"none",borderRight:"1px solid transparent",borderLeft:"1px solid transparent"}},tabpanel:{border:"1px solid var(--border-color-primary)",borderTop:"none",borderBottomRightRadius:"var(--container-radius)",borderBottomLeftRadius:"var(--container-radius)",padding:"var(--block-padding)",backgroundColor:"var(--tab-nav-background-color-selected) !important",gap:"20px",display:"flex",flexDirection:"column",height:"500px",overflowY:"auto"}}),nevyshaExtraNetwork:K_({root:{height:"100% !important",display:"flex",flexDirection:"column"},tabpanels:{height:"100% !important"},tab:{marginBottom:"-1px",border:"1px solid transparent",borderColor:"transparent",borderBottom:"none",borderRadius:"0 !important",padding:"var(--size-1) var(--size-4) !important",color:"var(--body-text-color-subdued) !important",fontWeight:"var(--section-header-text-weight) !important",fontSize:"var(--section-header-text-size) !important",borderTop:"2px solid transparent !important",_selected:{borderTop:"2px solid var(--ae-primary-color) !important",backgroundColor:"var(--tab-nav-background-color-selected) !important",color:"var(--body-text-color) !important"},_focus:{outline:"none"},_hover:{outline:"none",borderRight:"1px solid transparent",borderLeft:"1px solid transparent"}},tabpanel:{border:"1px solid var(--border-color-primary)",borderTop:"none",borderBottomRightRadius:"var(--container-radius)",borderBottomLeftRadius:"var(--container-radius)",padding:"var(--block-padding)",backgroundColor:"var(--tab-nav-background-color-selected) !important",gap:"20px",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"}})}}),{definePartsStyle:YX,defineMultiStyleConfig:XX}=Ct($2.keys),QX=XX({defaultProps:{variant:"nevysha"},variants:{nevysha:YX({control:{boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"var(--checkbox-border-radius)",backgroundColor:"var(--checkbox-background-color)",lineHeight:"var(--line-sm)"}})}}),{definePartsStyle:ZX,defineMultiStyleConfig:JX}=Ct(L2.keys),eQ=JX({defaultProps:{variant:"nevysha"},variants:{nevysha:ZX({control:{boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",backgroundColor:"var(--checkbox-background-color)",lineHeight:"var(--line-sm)"}})}});let{definePartsStyle:q_,defineMultiStyleConfig:tQ}=Ct(A2.keys);const nQ=tQ({defaultProps:{variant:"nevysha"},variants:{nevysha:q_({dialog:{opacity:1,width:"800px",marginRight:"auto",marginLeft:"auto",transform:"none",maxWidth:"fit-content",background:"none"}}),"nevysha-confirm":q_({dialog:{opacity:1,width:"800px",marginRight:"auto",marginLeft:"auto",transform:"none",maxWidth:"fit-content",border:"1px solid var(--ae-input-border-color)",backgroundColor:"var(--block-background-fill)",color:"var(--body-text-color)",borderRadius:"0 !important",fontSize:"var(--body-text-size)"},footer:{display:"flex !important",gap:"5px"}})}}),OM=mB({fontSizes:{md:"var(--body-text-size)"},components:{Input:VX,Tabs:qX,Checkbox:QX,NumberInput:GX,Radio:eQ,Modal:nQ}});function FM(){if(!document.getElementById("cozy-img-browser-react")){setTimeout(()=>FM(),200);return}ql.createRoot(document.getElementById("cozy-img-browser-react")).render(W.jsx(ut.StrictMode,{children:W.jsx(AT,{theme:OM,children:W.jsx(bO,{children:W.jsx(BX,{})})})}))}function rQ(e){const t=()=>{window.gatherInfoAndShowDialog(),e.onClickClose()};return W.jsxs("div",{className:"nevysha header",children:[W.jsxs("div",{className:"nevysha title",children:[W.jsx("h2",{children:"Nevysha's Cozy Nest"}),W.jsx("span",{className:"subtitle",children:"Find your cozy spot on Auto1111's webui"})]}),W.jsx(En,{children:W.jsx("div",{className:"btn-settings",onClick:e.onClickClose,children:"Close"})}),W.jsx("div",{className:"container",children:W.jsxs("div",{className:"nevysha settings-nevyui-top",children:[W.jsxs("p",{className:"nevysha-reporting",children:["Found a bug or want to ask for a feature ? Please ",W.jsx("a",{onClick:t,target:"_blank",children:"click here to gather relevant info"})," then use ",W.jsx("a",{href:"https://www.reddit.com/r/NevyshaCozyNest/",target:"_blank",children:"this subreddit"})," or ",W.jsx("a",{href:"https://github.com/Nevysha/Cozy-Nest",target:"_blank",children:"github"}),". You can also join this ",W.jsx("a",{href:"https://discord.gg/yppzDXjT7S",target:"_blank",children:"discord server"})," to discuss about Cozy Nest"]}),W.jsx("p",{className:"nevysha-emphasis",children:'WARNING : Some visual settings are immediately applied but will not be saved until you click "Save"'})]})})]})}function $g(){return($g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function DM(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function Jy(e){var t=N.useRef(e),n=N.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var od=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},kc=function(e){return"touches"in e},e0=function(e){return e&&e.ownerDocument.defaultView||self},Y_=function(e,t,n){var r=e.getBoundingClientRect(),i=kc(t)?function(o,l){for(var d=0;d<o.length;d++)if(o[d].identifier===l)return o[d];return o[0]}(t.touches,n):t;return{left:od((i.pageX-(r.left+e0(e).pageXOffset))/r.width),top:od((i.pageY-(r.top+e0(e).pageYOffset))/r.height)}},X_=function(e){!kc(e)&&e.preventDefault()},NM=ut.memo(function(e){var t=e.onMove,n=e.onKey,r=DM(e,["onMove","onKey"]),i=N.useRef(null),o=Jy(t),l=Jy(n),d=N.useRef(null),a=N.useRef(!1),c=N.useMemo(function(){var h=function(w){X_(w),(kc(w)?w.touches.length>0:w.buttons>0)&&i.current?o(Y_(i.current,w,d.current)):g(!1)},p=function(){return g(!1)};function g(w){var x=a.current,S=e0(i.current),T=w?S.addEventListener:S.removeEventListener;T(x?"touchmove":"mousemove",h),T(x?"touchend":"mouseup",p)}return[function(w){var x=w.nativeEvent,S=i.current;if(S&&(X_(x),!function(v,b){return b&&!kc(v)}(x,a.current)&&S)){if(kc(x)){a.current=!0;var T=x.changedTouches||[];T.length&&(d.current=T[0].identifier)}S.focus(),o(Y_(S,x,d.current)),g(!0)}},function(w){var x=w.which||w.keyCode;x<37||x>40||(w.preventDefault(),l({left:x===39?.05:x===37?-.05:0,top:x===40?.05:x===38?-.05:0}))},g]},[l,o]),s=c[0],u=c[1],f=c[2];return N.useEffect(function(){return f},[f]),ut.createElement("div",$g({},r,{onTouchStart:s,onMouseDown:s,className:"react-colorful__interactive",ref:i,onKeyDown:u,tabIndex:0,role:"slider"}))}),vw=function(e){return e.filter(Boolean).join(" ")},zM=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=vw(["react-colorful__pointer",e.className]);return ut.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},ut.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Tn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},iQ=function(e){return uQ(t0(e))},t0=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Tn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Tn(parseInt(e.substring(6,8),16)/255,2):1}},oQ=function(e){return lQ(sQ(e))},aQ=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Tn(e.h),s:Tn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Tn(i/2),a:Tn(r,2)}},n0=function(e){var t=aQ(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},sQ=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),l=r*(1-n),d=r*(1-(t-o)*n),a=r*(1-(1-t+o)*n),c=o%6;return{r:Tn(255*[r,d,l,l,a,r][c]),g:Tn(255*[a,r,r,d,l,l][c]),b:Tn(255*[l,l,a,r,r,d][c]),a:Tn(i,2)}},vf=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},lQ=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?vf(Tn(255*i)):"";return"#"+vf(t)+vf(n)+vf(r)+o},uQ=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),l=o-Math.min(t,n,r),d=l?o===t?(n-r)/l:o===n?2+(r-t)/l:4+(t-n)/l:0;return{h:Tn(60*(d<0?d+6:d)),s:Tn(o?l/o*100:0),v:Tn(o/255*100),a:i}},cQ=ut.memo(function(e){var t=e.hue,n=e.onChange,r=vw(["react-colorful__hue",e.className]);return ut.createElement("div",{className:r},ut.createElement(NM,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:od(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Tn(t),"aria-valuemax":"360","aria-valuemin":"0"},ut.createElement(zM,{className:"react-colorful__hue-pointer",left:t/360,color:n0({h:t,s:100,v:100,a:1})})))}),dQ=ut.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:n0({h:t.h,s:100,v:100,a:1})};return ut.createElement("div",{className:"react-colorful__saturation",style:r},ut.createElement(NM,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:od(t.s+100*i.left,0,100),v:od(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Tn(t.s)+"%, Brightness "+Tn(t.v)+"%"},ut.createElement(zM,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:n0(t)})))}),BM=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},fQ=function(e,t){return e.toLowerCase()===t.toLowerCase()||BM(t0(e),t0(t))};function hQ(e,t,n){var r=Jy(n),i=N.useState(function(){return e.toHsva(t)}),o=i[0],l=i[1],d=N.useRef({color:t,hsva:o});N.useEffect(function(){if(!e.equal(t,d.current.color)){var c=e.toHsva(t);d.current={hsva:c,color:t},l(c)}},[t,e]),N.useEffect(function(){var c;BM(o,d.current.hsva)||e.equal(c=e.fromHsva(o),d.current.color)||(d.current={hsva:o,color:c},r(c))},[o,e,r]);var a=N.useCallback(function(c){l(function(s){return Object.assign({},s,c)})},[]);return[o,a]}var pQ=typeof window<"u"?N.useLayoutEffect:N.useEffect,gQ=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Q_=new Map,mQ=function(e){pQ(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Q_.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Q_.set(t,n);var r=gQ();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},vQ=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,l=DM(e,["className","colorModel","color","onChange"]),d=N.useRef(null);mQ(d);var a=hQ(n,i,o),c=a[0],s=a[1],u=vw(["react-colorful",t]);return ut.createElement("div",$g({},l,{ref:d,className:u}),ut.createElement(dQ,{hsva:c,onChange:s}),ut.createElement(cQ,{hue:c.h,onChange:s,className:"react-colorful__last-control"}))},yQ={defaultColor:"000",toHsva:iQ,fromHsva:function(e){return oQ({h:e.h,s:e.s,v:e.v,a:1})},equal:fQ},bQ=function(e){return ut.createElement(vQ,$g({},e,{colorModel:yQ}))};const ju=({color:e,onChange:t,label:n})=>{const r=N.useRef(),[i,o]=N.useState(!1);return W.jsxs("div",{children:[W.jsx("label",{children:n}),W.jsxs("div",{className:"picker",children:[W.jsx("div",{className:"swatch",style:{backgroundColor:e},onClick:()=>o(!0)}),i&&W.jsxs(W.Fragment,{children:[W.jsx("div",{className:"popoverWrap",onClick:()=>o(!1)}),W.jsx("div",{className:"popover",ref:r,children:W.jsx(bQ,{color:e,onChange:t})})]})]})]})};function wQ({config:e,setConfig:t}){const[n,r]=N.useState(e.cnib_output_folder),[i,o]=N.useState("");N.useEffect(()=>{r(e.cnib_output_folder)},[e]);const l=()=>{if(i==="")return;const d=[...n];d.push(i),r(d),t({...e,cnib_output_folder:d}),o("")};return W.jsx(W.Fragment,{children:W.jsxs("div",{className:"OutputFolderSelector",children:[n.map((d,a)=>W.jsxs(Vy,{children:[W.jsx(lu,{placeholder:"C:/stable-difusion/...",value:d,onChange:c=>{const s=[...n];s[a]=c.target.value,r(s),t({...e,cnib_output_folder:s})}}),W.jsx(ip,{width:"4.5rem",children:W.jsx("button",{className:"btn-settings",onClick:()=>{const c=[...n];c.splice(a,1),r(c),t({...e,cnib_output_folder:c})},children:"Delete"})})]},a)),W.jsxs(Vy,{children:[W.jsx(lu,{placeholder:"Add a new folder...",value:i,onChange:d=>{o(d.target.value)}}),W.jsx(ip,{width:"4.5rem",children:W.jsx("button",{className:"btn-settings",onClick:l,children:"Add"})})]})]})})}function SQ({children:e,isVisible:t}){const{isOpen:n,onOpen:r,onClose:i}=vA({isOpen:t}),o=N.useRef();return N.useEffect(()=>{t?r():i()},[t]),W.jsx(LA,{motionPreset:"scale",isOpen:n,leastDestructiveRef:o,onClose:i,isCentered:!0,children:W.jsx(uw,{children:W.jsx(RA,{children:W.jsx(cw,{children:e})})})})}const uv={"&::-webkit-scrollbar":{width:"5px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"var(--ae-primary-color)",borderRadius:"20px"}};function xQ(){const[e,t]=N.useState(!1),[n,r]=N.useState(COZY_NEST_CONFIG);function i(){aC(n.waves_color),sC(th()==="dark"?n.font_color:n.font_color_light),lC(n.bg_gradiant_color),p3(n.disable_waves_and_gradiant),uC(n.accent_color,n.accent_color),g3(n.accent_generate_button,n.accent_color),m3(n.font_size),v3(n.card_height),y3(n.card_width),b3(n.main_menu_position),w3(n.quicksettings_position),S3(n.sfw_mode),gp()}N.useEffect(()=>{i()},[n]),N.useEffect(()=>{r(COZY_NEST_CONFIG)},[COZY_NEST_CONFIG]),N.useEffect(()=>{i()},[]);const o=()=>{CozyLogger.debug("toggle"),t(!e)},l=(s,u)=>{const f={...n};s.target?f[u]=s.target.value:f[u]=s,r(f)},d=()=>{(async()=>await gC(n))()},a=()=>{(async()=>await fetch("/cozy-nest/config",{method:"DELETE"}))()},c=()=>{if(n.webui===iC){document.querySelector("#settings_restart_gradio").click();return}else if(n.webui===Ec){document.querySelector("#restart_submit").click();return}(async()=>(await fetch("/cozy-nest/reloadui"),window.location.reload()))()};return W.jsxs("div",{style:{display:"flex"},children:[W.jsx("button",{className:"nevysha-btn-menu",id:"nevyui_sh_options",title:"Nevysha Cozy Nest Settings",dangerouslySetInnerHTML:{__html:c3},onClick:o}),e&&W.jsx(SQ,{isVisible:e,children:W.jsxs("div",{className:"App nevysha",children:[W.jsx(rQ,{onClickClose:()=>t(!1)}),W.jsxs("div",{className:"container",children:[W.jsxs(zA,{variant:"nevysha",children:[W.jsxs(BA,{style:{backgroundColor:"var(--tab-nav-background-color)"},children:[W.jsx(Jf,{children:"Main Settings"}),W.jsx(Jf,{children:"Image Browser Settings"}),W.jsx(Jf,{children:"Others"})]}),W.jsxs(jA,{children:[W.jsxs(Zf,{css:uv,children:[W.jsxs(Ha,{children:[W.jsx(ai,{isChecked:n.error_popup,onChange:s=>r({...n,error_popup:s.target.checked}),children:"Display information dialog on Cozy Nest error"}),W.jsx(ai,{isChecked:n.disable_waves_and_gradiant,onChange:s=>r({...n,disable_waves_and_gradiant:s.target.checked}),children:"Disable waves and gradiant background animations"})]}),W.jsxs(uo,{children:[W.jsx("label",{children:"Main menu position"}),W.jsx(Ky,{value:n.main_menu_position,onChange:s=>r({...n,main_menu_position:s}),children:W.jsxs(Wy,{direction:"row",children:[W.jsx(Xa,{value:"left",children:"left"}),W.jsx(Xa,{value:"top",children:"top"}),W.jsx(Xa,{value:"top_centered",children:"top centered"})]})})]}),W.jsxs(uo,{children:[W.jsx("label",{children:"Quicksettings position"}),W.jsx(Ky,{value:n.quicksettings_position,onChange:s=>r({...n,quicksettings_position:s}),children:W.jsxs(Wy,{direction:"row",children:[W.jsx(Xa,{value:"left",children:"left"}),W.jsx(Xa,{value:"split",children:"split"}),W.jsx(Xa,{value:"centered",children:"centered"})]})})]}),W.jsx(En,{children:W.jsx(ai,{isChecked:n.accent_generate_button,onChange:s=>r({...n,accent_generate_button:s.target.checked}),children:"Accent Generate Button"})}),W.jsxs(Ha,{children:[W.jsxs(tc,{children:[W.jsx(Ya,{children:"Font size"}),W.jsxs(Kf,{defaultValue:12,min:10,max:18,children:[W.jsx(Yf,{}),W.jsxs(qf,{children:[W.jsx(Qf,{}),W.jsx(Xf,{})]})]})]}),W.jsxs(tc,{children:[W.jsx(Ya,{children:"Extra network card height"}),W.jsxs(Kf,{value:n.card_height,onChange:s=>l(s,"card_height"),min:5,max:20,children:[W.jsx(Yf,{}),W.jsxs(qf,{children:[W.jsx(Qf,{}),W.jsx(Xf,{})]})]})]}),W.jsxs(tc,{children:[W.jsx(Ya,{children:"Extra network card width"}),W.jsxs(Kf,{value:n.card_width,onChange:s=>l(s,"card_width"),min:5,max:20,children:[W.jsx(Yf,{}),W.jsxs(qf,{children:[W.jsx(Qf,{}),W.jsx(Xf,{})]})]})]})]}),W.jsxs(Ha,{children:[W.jsx(ju,{label:"Font Color",color:n.font_color,onChange:s=>l(s,"font_color")}),W.jsx(ju,{label:"Font Color",color:n.font_color_light,onChange:s=>l(s,"font_color_light")}),W.jsx(ju,{label:"Waves Color",color:n.waves_color,onChange:s=>l(s,"waves_color")}),W.jsx(ju,{label:"Background gradiant Color",color:n.bg_gradiant_color,onChange:s=>l(s,"bg_gradiant_color")}),W.jsx(ju,{label:"Accent Color",color:n.accent_color,onChange:s=>l(s,"accent_color")})]}),W.jsx(Ha,{children:W.jsx(ai,{isChecked:n.sfw_mode,onChange:s=>r({...n,sfw_mode:s.target.checked}),children:"SFW mode 👀 (blur all images)"})})]}),W.jsxs(Zf,{css:uv,children:[W.jsx(Ha,{children:W.jsx(ai,{isChecked:n.disable_image_browser,onChange:s=>r({...n,disable_image_browser:s.target.checked}),children:"Disable image browser (Reload UI required)"})}),W.jsxs(Ha,{children:[W.jsxs(tc,{style:{width:"30%"},children:[W.jsx(Ya,{children:"Socket port for image browser"}),W.jsx(lu,{placeholder:"3333",value:n.server_default_port,onChange:s=>l(s,"server_default_port")})]}),W.jsx(ai,{children:"Auto search port"}),W.jsx(ai,{visibility:n.webui===Ec?"hidden":"visible",isChecked:n.fetch_output_folder_from_a1111_settings,onChange:s=>r({...n,fetch_output_folder_from_a1111_settings:s.target.checked}),children:"Fetch output folder from a1111 settings (Reload needed to enable)"})]}),W.jsxs(uo,{children:[W.jsx(Ya,{children:"Archive path"}),W.jsx(lu,{placeholder:"C:/stable-difusion/...",value:n.archive_path,onChange:s=>l(s,"archive_path")})]}),W.jsxs(uo,{children:[W.jsx(Ya,{children:"Output path"}),W.jsx(wQ,{config:n,setConfig:r})]})]}),W.jsxs(Zf,{css:uv,children:[W.jsx("p",{children:"Those settings are heavy on DOM modification and might conflict with some others extensions"}),W.jsx("p",{children:"Reload UI needed to apply"}),W.jsxs(uo,{children:[W.jsx(ai,{isChecked:n.enable_clear_button,onChange:s=>r({...n,enable_clear_button:s.target.checked}),children:"Enable clear gallery button in txt2img and img2img tabs"}),W.jsx(ai,{isChecked:n.enable_extra_network_tweaks,onChange:s=>r({...n,enable_extra_network_tweaks:s.target.checked}),children:"Enable extra network tweaks"}),W.jsx(ai,{isChecked:n.enable_cozy_prompt,onChange:s=>r({...n,enable_cozy_prompt:s.target.checked}),children:"Enable Cozy Prompt"})]})]})]})]}),W.jsxs(Ha,{className:"btn-toolbar",style:{gap:"25px",padding:"15px"},children:[W.jsx("button",{className:"btn-settings",style:{width:"100%"},onClick:d,children:"Save"}),W.jsx(HA,{message:"Are you sure you want to reset all settings ? This will trigger a UI Reload",confirmLabel:"Reset",cancelLabel:"Cancel",onConfirm:a}),W.jsx("button",{className:"btn-settings",style:{width:"100%"},onClick:c,children:"Reload UI"})]}),W.jsx("div",{children:"Made by Nevysha with luv"})]})]})})]})}const Z_="cozy_nest_options";function jM(){if(!document.getElementById("nevysha-btn-menu-wrapper")){setTimeout(()=>jM(),200);return}const e=document.createElement("div");e.id=Z_,e.style="display: flex;",document.getElementById("nevysha-btn-menu-wrapper").insertBefore(e,document.getElementById("nevysha-btn-menu-wrapper").firstChild),ql.createRoot(document.getElementById(Z_)).render(W.jsx(ut.StrictMode,{children:W.jsx(AT,{theme:OM,children:W.jsx(xQ,{})})}))}ace.define("ace/mode/prompt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){const r=e("ace/lib/oop"),i=e("ace/mode/text_highlight_rules").TextHighlightRules;function o(){i.call(this);const l=/[\(\[\{]/,d=/[\)\]\}]/;let a=0;this.$rules={start:[{token:()=>(a++,`open-bracket.open-bracket-${a%4}`),next:"inner",regex:l},{token:()=>(a--,`close-bracket.close-bracket-${(a+1)%4}`),regex:d,next:"start"},{regex:/<lora:/,token:"lora-begin",next:"lora"},{regex:/[,|:]/,token:"token"},{regex:/\w+/,token:"text"}],lora:[{regex:">",token:"lora-end",next:"start"},{regex:/\w+/,token:"lora-inner"}],inner:[{token:()=>(a++,`open-bracket.open-bracket-${a%4}`),regex:l,next:"inner"},{regex:/[,|:]/,token:"token"},{regex:/\w+/,token:"inner-bracket"},{token:()=>(a--,`close-bracket.close-bracket-${(a+1)%4}`),regex:d,next:"start"}]}}r.inherits(o,i),t.CustomHighlightRules=o});ace.define("ace/mode/prompt",["require","exports","module","ace/lib/oop","ace/mode/text"],function(e,t,n){const r=e("ace/lib/oop"),i=e("ace/mode/text").Mode,o=e("ace/mode/prompt_highlight_rules").CustomHighlightRules;function l(){this.HighlightRules=o}r.inherits(l,i),l.prototype.$id="ace/mode/prompt",function(){jt.debug("what is this:",this,arguments)}.call(l.prototype),t.Mode=l});const _Q=e=>{const[t,n]=N.useState("");return N.useEffect(()=>{const r=d=>{for(const a of d)if(a.type==="attributes"){const c=document.querySelector(e);n(c.value)}},i={attributes:!0,characterData:!0,childList:!0,subtree:!0},o=new MutationObserver(r),l=document.querySelector(e);return l&&(o.observe(l,i),n(l.value)),()=>{o.disconnect()}},[e]),t};ace.config.setModuleUrl("ace/mode/prompt_highlight_rules","cozy-nest-client/cozy-prompt/prompt_highlight_rules.js");ace.config.setModuleUrl("ace/mode/prompt","cozy-nest-client/cozy-prompt/mode-prompt.js");function CQ({parentId:e,containerId:t}){let n=localStorage.getItem(`cozy-prompt-height-${t}`);n=n?parseInt(n):200;const r=document.querySelector(`#${e} label textarea`),[i,o]=N.useState(!1),l=_Q(`#${e} label textarea`),[d,a]=N.useState(""),c=N.useRef(),[s,u]=N.useState(n),[f,h]=N.useState(!1),[p,g]=N.useState(0),w=()=>{r.value=d;const b=new Event("input");r.dispatchEvent(b)};N.useEffect(()=>{const b=y=>{a(y.target.value)};return r.addEventListener("change",b),()=>{r.removeEventListener("change",b)}},[]),N.useEffect(()=>{a(l)},[l]),N.useEffect(()=>{i?(r.style.display="block",r.style.marginTop="40px"):r.style.display="none"},[i]),N.useEffect(()=>{const b=()=>{f&&h(!1)},y=m=>{if(f){const E=s+m.clientY-p;u(E),localStorage.setItem(`cozy-prompt-height-${t}`,String(E)),g(m.clientY)}};return window.addEventListener("mouseup",b),window.addEventListener("mousemove",y),()=>{window.removeEventListener("mouseup",b),window.removeEventListener("mousemove",y)}},[f]);const x=b=>{b.preventDefault(),h(!0),g(b.clientY)},S=()=>{o(!i)};function T(){a(d.replaceAll("),",`),
`))}function v(b){b.renderer.setPadding(10),b.renderer.setScrollMargin(10)}return W.jsxs("div",{className:"CozyPrompt",style:{height:`${s}px`},children:[W.jsx(KE,{ref:c,onLoad:v,mode:"prompt",theme:"github_dark",showPrintMargin:!1,onChange:a,onBlur:w,value:d,name:"ace-prompt-editor",editorProps:{$blockScrolling:!0},style:{width:"100%",height:"100%"},setOptions:{animatedScroll:!0,enableSnippets:!0,cursorStyle:"smooth",behavioursEnabled:!0,wrapBehavioursEnabled:!0,autoScrollEditorIntoView:!0,wrap:!0,fontSize:"15px",fontFamily:"monospace"}}),W.jsx("div",{onMouseDown:x,className:"CozyPrompt__resize-handle"}),W.jsxs(En,{children:[W.jsx(hi,{onClick:T,children:"Prettify"}),W.jsxs(hi,{onClick:S,children:[i?"Hide":"Show"," native textarea"]})]})]})}function r0(e,t){if(!document.getElementById(e)){setTimeout(()=>r0(),200);return}const n=document.createElement("div");n.id=t,n.style="display: flex; height: fit-content; width: 100%;",document.getElementById(e).insertBefore(n,document.getElementById(e).firstChild),ql.createRoot(document.getElementById(t)).render(W.jsx(ut.StrictMode,{children:W.jsx(CQ,{containerId:t,parentId:e})}))}const HM=ut.createContext({ready:!1});function kQ(e){return new Promise(t=>{let n;new MutationObserver((i,o)=>{clearTimeout(n),n=setTimeout(()=>{o.disconnect(),t()},200)}).observe(e,{attributes:!0,childList:!0,subtree:!0}),!e.hasChildNodes()&&!e.attributes.length&&t()})}async function EQ(e){const t=document.querySelector(`button#${e}_extra_networks`);jt.debug("triggering extra network",e),t.style.display="none",t.click();const n=document.querySelector(`#${e}_extra_tabs`);await kQ(n),t.click(),jt.debug("tabs loaded",e)}const Hu={};function $Q({children:e,prefix:t,resolve:n}){const[r,i]=ut.useState(!1);Hu[t]||(Hu[t]={loaded:!1,loading:!1}),ut.useEffect(()=>{const{ready:l,loading:d}=Hu[t];l||d||(Hu[t]={loaded:!1,loading:!0},(async()=>(await EQ(t),Hu[t]={loaded:!0,loading:!1},i(!0),n()))())},[]);const o={ready:r};return W.jsx(HM.Provider,{value:o,children:e})}let cv=null;function TQ({prefix:e}){const t=ut.useRef(null),{ready:n}=ut.useContext(HM);N.useEffect(()=>(n&&r(),()=>{i()}),[n]);function r(){if(!t.current)return;jt.debug("loading native elements",e);const o=document.querySelector(`#${e}_extra_tabs`);cv=o.parentNode,t.current.appendChild(o)}function i(){if(!t.current||!cv)return;jt.debug("unloading native elements",e);const o=document.querySelector(`#${e}_extra_tabs`);cv.appendChild(o)}return W.jsx("div",{ref:t,style:{height:"100%"}})}function J_(e){return new Promise((t,n)=>{VM(e,t)})}function VM(e,t){if(jt.debug("startExtraNetwork",e),!document.getElementById(`cozy-${e}-extra-network-react`)){jt.debug("waiting for extra network react",e),setTimeout(()=>VM(),200);return}ql.createRoot(document.getElementById(`cozy-${e}-extra-network-react`)).render(W.jsx(ut.StrictMode,{children:W.jsx($Q,{prefix:e,resolve:t,children:W.jsx(TQ,{prefix:e})})}))}window.CozyTools={dummyLoraCard:a3,dummyControlNetBloc:s3,dummySubdirs:l3};async function AQ(){await vC(),await W3(async()=>{jM(),COZY_NEST_CONFIG.enable_cozy_prompt===!0&&(r0("txt2img_prompt","cozy_nest_prompt_txt2img"),r0("img2img_prompt","cozy_nest_prompt_img2img")),COZY_NEST_CONFIG.enable_extra_network_tweaks===!0&&(await J_("txt2img"),await J_("img2img")),FM()})}window.cozyNestLoader=AQ;(async()=>{if(new URLSearchParams(window.location.search).get("CozyNest")==="No"){jt.log("Cozy Nest disabled by url param"),document.querySelectorAll("link").forEach(r=>{r.href.includes("Cozy-Nest")&&r.remove()});return}const n=new CSSStyleSheet;n.replaceSync(e3),document.adoptedStyleSheets=[n],vo.time(nh),jt.init(!1)})();