From f87ec2235968acd688a378e7c1ed7e07d9bce43e Mon Sep 17 00:00:00 2001 From: mitmproxy release bot Date: Wed, 2 Oct 2024 17:14:17 +0000 Subject: [PATCH] mitmproxy 11.0.0 --- CHANGELOG.md | 3 + mitmproxy/tools/web/static/app.css | 2 +- mitmproxy/tools/web/static/app.js | 108 ++++++++++++++--------------- mitmproxy/version.py | 2 +- 4 files changed, 59 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e78d35c4..02b1a7f91f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ ## Unreleased: mitmproxy next + +## 02 October 2024: mitmproxy 11.0.0 + - mitmproxy now supports transparent HTTP/3 proxying. ([#7202](https://github.com/mitmproxy/mitmproxy/pull/7202), @errorxyz, @meitinger, @mhils) - Add HTTP3 support in HTTPS reverse-proxy mode. diff --git a/mitmproxy/tools/web/static/app.css b/mitmproxy/tools/web/static/app.css index 019efa2901..9691ceda6f 100644 --- a/mitmproxy/tools/web/static/app.css +++ b/mitmproxy/tools/web/static/app.css @@ -1,2 +1,2 @@ -html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.resource-icon{width:32px;height:32px}.resource-icon-css{background-image:url(images/chrome-devtools/resourceCSSIcon.png)}.resource-icon-document{background-image:url(images/chrome-devtools/resourceDocumentIcon.png)}.resource-icon-js{background-image:url(images/chrome-devtools/resourceJSIcon.png)}.resource-icon-plain{background-image:url(images/chrome-devtools/resourcePlainIcon.png)}.resource-icon-executable{background-image:url(images/resourceExecutableIcon.png)}.resource-icon-flash{background-image:url(images/resourceFlashIcon.png)}.resource-icon-image{background-image:url(images/resourceImageIcon.png)}.resource-icon-java{background-image:url(images/resourceJavaIcon.png)}.resource-icon-not-modified{background-image:url(images/resourceNotModifiedIcon.png)}.resource-icon-redirect{background-image:url(images/resourceRedirectIcon.png)}.resource-icon-websocket{background-image:url(images/resourceWebSocketIcon.png)}.resource-icon-tcp{background-image:url(images/resourceTcpIcon.png)}.resource-icon-udp{background-image:url(images/resourceUdpIcon.png)}.resource-icon-dns{background-image:url(images/resourceDnsIcon.png)}.resource-icon-quic{background-image:url(images/resourceQuicIcon.png)}#container,#mitmproxy,body,html{height:100%;margin:0;overflow:hidden}#container{display:flex;flex-direction:column;outline:0}#container>.eventlog,#container>footer,#container>header{flex:0 0 auto}.main-view{flex:1 1 auto;height:0;display:flex;flex-direction:row}.main-view.vertical{flex-direction:column}.main-view .flow-detail,.main-view .flow-table{flex:1 1 auto}.splitter{flex:0 0 1px;background-color:#aaa;position:relative}.splitter>div{position:absolute}.splitter.splitter-x{cursor:col-resize}.splitter.splitter-x>div{margin-left:-1px;width:4px;height:100%}.splitter.splitter-y{cursor:row-resize}.splitter.splitter-y>div{margin-top:-1px;height:4px;width:100%}.nav-tabs{border-bottom:solid #a6a6a6 1px}.nav-tabs>a{display:inline-block;border:solid transparent 1px;text-decoration:none}.nav-tabs>a.active{background-color:#fff;border-color:#a6a6a6;border-bottom-color:#fff}.nav-tabs>a.special{color:#fff;background-color:#396cad;border-bottom-color:#396cad}.nav-tabs>a.special:hover{background-color:#5386c6}.nav-tabs-lg>a{padding:3px 14px;margin:0 2px -1px}.nav-tabs-sm>a{padding:0 7px;margin:2px 2px -1px}header{padding-top:6px;background-color:#fff}header>div:not(:empty){display:block;margin:0;padding:0;border-bottom:solid #a6a6a6 1px;height:95px;overflow:visible}.menu-group{margin:0 5px 0 6px;display:inline-block;height:95px}.menu-content{height:79px;display:flow-root}.menu-content>a{display:inline-block}.menu-content>.btn,.menu-content>a>.btn{height:79px;text-align:center;margin:0 1px;padding:12px 5px;border:none;border-radius:0}.menu-content>.btn i,.menu-content>a>.btn i{font-size:20px;display:block;margin:0 auto 5px}.menu-content>.btn.btn-sm{height:26.33333333px;padding:0 5px}.menu-content>.btn.btn-sm i{display:inline-block;font-size:14px;margin:0}.menu-entry{text-align:left;height:26.33333333px;line-height:1;padding:.5rem 1rem}.menu-entry label{font-size:1.2rem;font-weight:400;margin:0}.menu-entry input[type=checkbox]{margin:0 2px;vertical-align:middle}.menu-legend{color:#777;height:16px;text-align:center;font-size:12px;padding:0 5px}.menu-group+.menu-group:before{margin-left:-6px;content:" ";border-left:solid 1px #e6e6e6;margin-top:10px;height:75px;position:absolute}.main-menu{display:flex}.main-menu .menu-group{width:50%}.main-menu .btn-sm{margin-top:6px}.filter-input{margin:4px 0}.filter-input .popover{top:27px;left:43px;display:block;max-width:none;opacity:.9}@media (max-width:767px){.filter-input .popover{top:16px;left:29px;right:2px}}.filter-input .popover .popover-content{max-height:500px;overflow-y:auto}.filter-input .popover .popover-content tr{cursor:pointer}.filter-input .popover .popover-content tr:hover{background-color:hsla(209,52%,84%,.5)!important}.connection-indicator{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;float:right;margin:5px;opacity:1;transition:all 1s linear}a.connection-indicator:focus,a.connection-indicator:hover{color:#fff;text-decoration:none;cursor:pointer}.connection-indicator:empty{display:none}.btn .connection-indicator{position:relative;top:-1px}.connection-indicator.fetching,.connection-indicator.init{background-color:#5bc0de}.connection-indicator.established{background-color:#5cb85c;opacity:0}.connection-indicator.error{background-color:#d9534f;transition:all .2s linear}.connection-indicator.offline{background-color:#f0ad4e;opacity:1}.flow-table{width:100%;overflow-y:scroll;overflow-x:hidden}.flow-table table{width:100%;table-layout:fixed}.flow-table thead tr{background-color:#f2f2f2;border-bottom:solid #bebebe 1px;line-height:23px}.flow-table th{font-weight:400;position:relative!important;padding-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flow-table th.sort-asc,.flow-table th.sort-desc{background-color:#fafafa}.flow-table th.sort-asc:after,.flow-table th.sort-desc:after{font:normal normal normal 14px/1 FontAwesome;position:absolute;right:3px;top:3px;padding:2px;background-color:rgba(250,250,250,.8)}.flow-table th.sort-asc:after{content:"\f0de"}.flow-table th.sort-desc:after{content:"\f0dd"}.flow-table tr{cursor:pointer;background-color:#fff}.flow-table tr:nth-child(even){background-color:#f2f2f2}.flow-table tr.selected{background-color:#e0ebf5!important}.flow-table tr.selected.highlighted{background-color:#7bbefc!important}.flow-table tr.highlighted{background-color:#ffeb99}.flow-table tr.highlighted:nth-child(even){background-color:#ffe57f}.flow-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.flow-table tr.intercepted:not(.has-response) .col-method,.flow-table tr.intercepted:not(.has-response) .col-path{color:#ff7f00}.flow-table tr.intercepted.has-response .col-size,.flow-table tr.intercepted.has-response .col-status,.flow-table tr.intercepted.has-response .col-time{color:#ff7f00}.flow-table .fa{line-height:inherit}.flow-table .col-tls{width:10px}.flow-table .col-tls-https{background-color:rgba(0,185,0,.5)}.flow-table .col-index{text-align:right;width:4ch}.flow-table .col-icon{width:32px}.flow-table .col-path .fa{margin-left:0;font-size:16px}.flow-table .col-path .fa-repeat{color:green}.flow-table .col-path .fa-pause{color:#ff7f00}.flow-table .col-path .fa-exclamation,.flow-table .col-path .fa-times{color:#8b0000}.flow-table .col-method{width:60px}.flow-table .col-version{width:80px}.flow-table .col-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:170px}.flow-table .col-comment{width:150px;padding-left:5px}.flow-table td.col-comment,.flow-table td.col-size,.flow-table td.col-time,.flow-table td.col-timestamp{text-align:right}.flow-table .col-quickactions{width:0;direction:rtl;overflow:hidden;background-color:inherit;font-size:20px}.flow-table .col-quickactions *{direction:ltr}.flow-table tr:hover .col-quickactions{overflow:visible}.flow-table .col-quickactions>div{height:32px;background-color:inherit;display:inline-flex;align-items:center}.flow-table .col-quickactions>div>a{margin-right:2px;height:32px;width:32px;border-radius:16px;text-align:center}.flow-table .col-quickactions>div>a:hover{background-color:rgba(0,0,0,.05)}.flow-table .col-quickactions .fa-play{transform:translate(1px,2px)}.flow-table .col-quickactions .fa-repeat{transform:translate(0,2px)}.flow-detail{width:100%;overflow:hidden;display:flex;flex-direction:column}.flow-detail nav{background-color:#f2f2f2}.flow-detail section{overflow-y:scroll;flex:1;padding:5px 12px 10px}.flow-detail section>footer{box-shadow:0 0 3px gray;padding:2px;margin:0;height:23px}.flow-detail .close-button{margin-top:2px;padding-left:10px;padding-right:7px;color:grey;font-size:15px;border:none}.flow-detail .close-button:hover{color:#000}.flow-detail .first-line{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;background-color:#428bca;color:#fff;margin:0 -8px 2px;padding:4px 8px;border-radius:5px;word-break:break-all;max-height:100px;overflow-y:auto}.flow-detail .contentview{margin:0 -12px;padding:0 12px}.flow-detail .contentview .controls{display:flex;align-items:center}.flow-detail .contentview .controls h5{flex:1;font-size:12px;font-weight:700;margin:10px 0}.flow-detail .contentview pre button:not(:only-child){margin-top:6px}.flow-detail hr{margin:0}.inline-input{display:inline;margin:0 -3px;padding:0 3px;border:solid transparent 1px}.inline-input:hover{box-shadow:0 0 0 1px rgba(0,0,0,.0125),0 2px 4px rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.025);background-color:rgba(255,255,255,.1)}.inline-input[placeholder]:empty:not(:focus-visible):before{content:attr(placeholder);color:#d3d3d3;font-style:italic}.inline-input[contenteditable]{outline-width:0;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.1);background-color:rgba(255,255,255,.2)}.inline-input[contenteditable].has-warning{color:#ffb8b8}.certificate-table,.connection-table,.timing-table{width:100%;table-layout:fixed;word-break:break-all}.certificate-table td:nth-child(2),.connection-table td:nth-child(2),.timing-table td:nth-child(2){font-family:Menlo,Monaco,Consolas,"Courier New",monospace;width:70%}.certificate-table tr:not(:first-child),.connection-table tr:not(:first-child),.timing-table tr:not(:first-child){border-top:1px solid #f7f7f7}.certificate-table td,.connection-table td,.timing-table td{vertical-align:top}.connection-table td:first-child{padding-right:1em}.headers,.trailers{position:relative;min-height:2ex;overflow-wrap:break-word}.headers .kv-row,.trailers .kv-row{margin-bottom:.3em;max-height:12.4ex;overflow-y:auto}.headers .kv-key,.trailers .kv-key{font-weight:700}.headers .kv-value,.trailers .kv-value{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.headers .inline-input,.trailers .inline-input{background-color:#fff}.headers .kv-add-row,.trailers .kv-add-row{opacity:0;color:#666;position:absolute;bottom:4px;right:4px;transition:all .1s ease-in-out}.headers:hover .kv-add-row,.trailers:hover .kv-add-row{opacity:1}.connection-table td,.timing-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}dl.cert-attributes{display:flex;flex-flow:row;flex-wrap:wrap;margin-bottom:0}dl.cert-attributes dd,dl.cert-attributes dt{text-overflow:ellipsis;overflow:hidden}dl.cert-attributes dt{flex:0 0 2em}dl.cert-attributes dd{flex:0 0 calc(100% - 2em)}.dns-request table td,.dns-request table th,.dns-response table td,.dns-response table th{padding-right:1rem}.flowview-image{text-align:center;padding:10px 0}.flowview-image img{max-width:100%;max-height:100%}.edit-flow-container{position:fixed;right:20px}.edit-flow{cursor:pointer;position:absolute;right:0;top:5px;height:40px;width:40px;border-radius:20px;z-index:10000;background-color:rgba(255,255,255,.7);border:solid 2px rgba(248,145,59,.7);text-align:center;font-size:22px;line-height:37px;transition:all .1s ease-in-out}.edit-flow:hover{background-color:rgba(239,108,0,.7);color:rgba(0,0,0,.8);border:solid 2px transparent}.eventlog{height:200px;flex:0 0 auto;display:flex;flex-direction:column}.eventlog>div{background-color:#f2f2f2;padding:0 5px;flex:0 0 auto;border-top:1px solid #aaa;cursor:row-resize}.eventlog>pre{flex:1 1 auto;margin:0;border-radius:0;overflow-x:auto;overflow-y:scroll;background-color:#fcfcfc}.eventlog .fa-close{cursor:pointer;float:right;color:grey;padding:3px 0;padding-left:10px}.eventlog .fa-close:hover{color:#000}.eventlog .btn-toggle{margin-top:-2px;margin-left:3px;padding:2px 2px;font-size:10px;line-height:10px;border-radius:2px}.eventlog .label{cursor:pointer;vertical-align:middle;display:inline-block;margin-top:-2px;margin-left:3px}footer{box-shadow:0 -1px 3px #d3d3d3;padding:0 0 4px 3px}footer .label{margin-right:3px}.CodeMirror{border:1px solid #ccc;height:auto!important}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.contentview .header{font-weight:700}.contentview .highlight{font-weight:700}.contentview .offset{color:#00f}.contentview .codeeditor{margin-bottom:12px}.contentview .Token_Name_Tag{color:#006400}.contentview .Token_Literal_String{color:#b22222}.contentview .Token_Literal_Number{color:purple}.contentview .Token_Keyword_Constant{color:#00f}.modal-visible{display:block}.modal-dialog{overflow-y:initial!important}.modal-body{max-height:calc(100vh - 200px);overflow-y:auto}.dropdown-menu{margin:0!important;max-height:250px;overflow-y:scroll}.dropdown-menu>li>a{padding:3px 10px}.command-title{background-color:#f2f2f2;border:1px solid #aaa}.command-result{display:block;margin:0;background-color:#fcfcfc;height:100px;max-height:100px;overflow:auto}.command-suggestion{background-color:#9c9c9c}.argument-suggestion{background-color:hsla(209,52%,84%,.5)!important}.command>.popover{display:block;position:relative;max-width:none}.available-commands{overflow:auto}.wireguard-config{margin:1rem 0;display:flex;flex-wrap:wrap;column-gap:2rem;align-items:center}.wireguard-config>*{margin:0}.modes{padding:1em 2em}.modes h3{margin-top:30px;margin-bottom:10px}.modes .modes-container{display:flex;flex-direction:column;gap:25px}.modes .mode-title{font-size:16px;font-weight:600}.modes .mode-description{color:#b2b2b2;margin-top:-10px}.modes .mode-entry{text-align:left;display:flex;align-items:center;font-size:1.5rem;font-weight:400;margin:0}.modes .mode-entry input[type=checkbox]{margin:0 10px;vertical-align:middle;width:1.8rem;height:1.8rem}.modes .mode-entry p{margin:0}.modes .mode-error{margin-left:10px;margin-top:5px}.modes .mode-local-input{border:1px solid #ccc;margin-left:10px;border-radius:4px;min-width:150px;height:25px}.modes .mode-regular-input{border:1px solid #ccc;margin-left:10px;border-radius:4px;min-width:70px;height:25px}.modes .mode-reverse-input{border:1px solid #ccc;margin-left:10px;margin-right:10px;border-radius:4px;min-width:70px;height:25px}.modes .mode-reverse-dropdown{margin:0 5px} +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.resource-icon{width:32px;height:32px}.resource-icon-css{background-image:url(images/chrome-devtools/resourceCSSIcon.png)}.resource-icon-document{background-image:url(images/chrome-devtools/resourceDocumentIcon.png)}.resource-icon-js{background-image:url(images/chrome-devtools/resourceJSIcon.png)}.resource-icon-plain{background-image:url(images/chrome-devtools/resourcePlainIcon.png)}.resource-icon-executable{background-image:url(images/resourceExecutableIcon.png)}.resource-icon-flash{background-image:url(images/resourceFlashIcon.png)}.resource-icon-image{background-image:url(images/resourceImageIcon.png)}.resource-icon-java{background-image:url(images/resourceJavaIcon.png)}.resource-icon-not-modified{background-image:url(images/resourceNotModifiedIcon.png)}.resource-icon-redirect{background-image:url(images/resourceRedirectIcon.png)}.resource-icon-websocket{background-image:url(images/resourceWebSocketIcon.png)}.resource-icon-tcp{background-image:url(images/resourceTcpIcon.png)}.resource-icon-udp{background-image:url(images/resourceUdpIcon.png)}.resource-icon-dns{background-image:url(images/resourceDnsIcon.png)}.resource-icon-quic{background-image:url(images/resourceQuicIcon.png)}#container,#mitmproxy,body,html{height:100%;margin:0;overflow:hidden}#container{display:flex;flex-direction:column;outline:0}#container>.eventlog,#container>footer,#container>header{flex:0 0 auto}.main-view{flex:1 1 auto;height:0;display:flex;flex-direction:row}.main-view.vertical{flex-direction:column}.main-view .flow-detail,.main-view .flow-table{flex:1 1 auto}.splitter{flex:0 0 1px;background-color:#aaa;position:relative}.splitter>div{position:absolute}.splitter.splitter-x{cursor:col-resize}.splitter.splitter-x>div{margin-left:-1px;width:4px;height:100%}.splitter.splitter-y{cursor:row-resize}.splitter.splitter-y>div{margin-top:-1px;height:4px;width:100%}.nav-tabs{border-bottom:solid #a6a6a6 1px}.nav-tabs>a{display:inline-block;border:solid transparent 1px;text-decoration:none}.nav-tabs>a.active{background-color:#fff;border-color:#a6a6a6;border-bottom-color:#fff}.nav-tabs>a.special{color:#fff;background-color:#396cad;border-bottom-color:#396cad}.nav-tabs>a.special:hover{background-color:#5386c6}.nav-tabs-lg>a{padding:3px 14px;margin:0 2px -1px}.nav-tabs-sm>a{padding:0 7px;margin:2px 2px -1px}header{padding-top:6px;background-color:#fff}header>div:not(:empty){display:block;margin:0;padding:0;border-bottom:solid #a6a6a6 1px;height:95px;overflow:visible}.menu-group{margin:0 5px 0 6px;display:inline-block;height:95px}.menu-content{height:79px;display:flow-root}.menu-content>a{display:inline-block}.menu-content>.btn,.menu-content>a>.btn{height:79px;text-align:center;margin:0 1px;padding:12px 5px;border:none;border-radius:0}.menu-content>.btn i,.menu-content>a>.btn i{font-size:20px;display:block;margin:0 auto 5px}.menu-content>.btn.btn-sm{height:26.33333333px;padding:0 5px}.menu-content>.btn.btn-sm i{display:inline-block;font-size:14px;margin:0}.menu-entry{text-align:left;height:26.33333333px;line-height:1;padding:.5rem 1rem}.menu-entry label{font-size:1.2rem;font-weight:400;margin:0}.menu-entry input[type=checkbox]{margin:0 2px;vertical-align:middle}.menu-legend{color:#777;height:16px;text-align:center;font-size:12px;padding:0 5px}.menu-group+.menu-group:before{margin-left:-6px;content:" ";border-left:solid 1px #e6e6e6;margin-top:10px;height:75px;position:absolute}.main-menu{display:flex}.main-menu .menu-group{width:50%}.main-menu .btn-sm{margin-top:6px}.filter-input{margin:4px 0}.filter-input .popover{top:27px;left:43px;display:block;max-width:none;opacity:.9}@media (max-width:767px){.filter-input .popover{top:16px;left:29px;right:2px}}.filter-input .popover .popover-content{max-height:500px;overflow-y:auto}.filter-input .popover .popover-content tr{cursor:pointer}.filter-input .popover .popover-content tr:hover{background-color:hsla(209,52%,84%,.5)!important}.connection-indicator{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;float:right;margin:5px;opacity:1;transition:all 1s linear}a.connection-indicator:focus,a.connection-indicator:hover{color:#fff;text-decoration:none;cursor:pointer}.connection-indicator:empty{display:none}.btn .connection-indicator{position:relative;top:-1px}.connection-indicator.fetching,.connection-indicator.init{background-color:#5bc0de}.connection-indicator.established{background-color:#5cb85c;opacity:0}.connection-indicator.error{background-color:#d9534f;transition:all .2s linear}.connection-indicator.offline{background-color:#f0ad4e;opacity:1}.flow-table{width:100%;overflow-y:scroll;overflow-x:hidden}.flow-table table{width:100%;table-layout:fixed}.flow-table thead tr{background-color:#f2f2f2;border-bottom:solid #bebebe 1px;line-height:23px}.flow-table th{font-weight:400;position:relative!important;padding-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flow-table th.sort-asc,.flow-table th.sort-desc{background-color:#fafafa}.flow-table th.sort-asc:after,.flow-table th.sort-desc:after{font:normal normal normal 14px/1 FontAwesome;position:absolute;right:3px;top:3px;padding:2px;background-color:rgba(250,250,250,.8)}.flow-table th.sort-asc:after{content:"\f0de"}.flow-table th.sort-desc:after{content:"\f0dd"}.flow-table tr{cursor:pointer;background-color:#fff}.flow-table tr:nth-child(even){background-color:#f2f2f2}.flow-table tr.selected{background-color:#e0ebf5!important}.flow-table tr.selected.highlighted{background-color:#7bbefc!important}.flow-table tr.highlighted{background-color:#ffeb99}.flow-table tr.highlighted:nth-child(even){background-color:#ffe57f}.flow-table td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.flow-table tr.intercepted:not(.has-response) .col-method,.flow-table tr.intercepted:not(.has-response) .col-path{color:#ff7f00}.flow-table tr.intercepted.has-response .col-size,.flow-table tr.intercepted.has-response .col-status,.flow-table tr.intercepted.has-response .col-time{color:#ff7f00}.flow-table .fa{line-height:inherit}.flow-table .col-tls{width:10px}.flow-table .col-tls-https{background-color:rgba(0,185,0,.5)}.flow-table .col-index{text-align:right;width:4ch}.flow-table .col-icon{width:32px}.flow-table .col-path .fa{margin-left:0;font-size:16px}.flow-table .col-path .fa-repeat{color:green}.flow-table .col-path .fa-pause{color:#ff7f00}.flow-table .col-path .fa-exclamation,.flow-table .col-path .fa-times{color:#8b0000}.flow-table .col-method{width:60px}.flow-table .col-version{width:80px}.flow-table .col-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:170px}.flow-table .col-comment{width:150px;padding-left:5px}.flow-table td.col-comment,.flow-table td.col-size,.flow-table td.col-time,.flow-table td.col-timestamp{text-align:right}.flow-table .col-quickactions{width:0;direction:rtl;overflow:hidden;background-color:inherit;font-size:20px}.flow-table .col-quickactions *{direction:ltr}.flow-table tr:hover .col-quickactions{overflow:visible}.flow-table .col-quickactions>div{height:32px;background-color:inherit;display:inline-flex;align-items:center}.flow-table .col-quickactions>div>a{margin-right:2px;height:32px;width:32px;border-radius:16px;text-align:center}.flow-table .col-quickactions>div>a:hover{background-color:rgba(0,0,0,.05)}.flow-table .col-quickactions .fa-play{transform:translate(1px,2px)}.flow-table .col-quickactions .fa-repeat{transform:translate(0,2px)}.flow-detail{width:100%;overflow:hidden;display:flex;flex-direction:column}.flow-detail nav{background-color:#f2f2f2}.flow-detail section{overflow-y:scroll;flex:1;padding:5px 12px 10px}.flow-detail section>footer{box-shadow:0 0 3px gray;padding:2px;margin:0;height:23px}.flow-detail .close-button{margin-top:2px;padding-left:10px;padding-right:7px;color:grey;font-size:15px;border:none}.flow-detail .close-button:hover{color:#000}.flow-detail .first-line{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;background-color:#428bca;color:#fff;margin:0 -8px 2px;padding:4px 8px;border-radius:5px;word-break:break-all;max-height:100px;overflow-y:auto}.flow-detail .contentview{margin:0 -12px;padding:0 12px}.flow-detail .contentview .controls{display:flex;align-items:center}.flow-detail .contentview .controls h5{flex:1;font-size:12px;font-weight:700;margin:10px 0}.flow-detail .contentview pre button:not(:only-child){margin-top:6px}.flow-detail hr{margin:0}.inline-input{display:inline;margin:0 -3px;padding:0 3px;border:solid transparent 1px}.inline-input:hover{box-shadow:0 0 0 1px rgba(0,0,0,.0125),0 2px 4px rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.025);background-color:rgba(255,255,255,.1)}.inline-input[placeholder]:empty:not(:focus-visible):before{content:attr(placeholder);color:#d3d3d3;font-style:italic}.inline-input[contenteditable]{outline-width:0;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.1);background-color:rgba(255,255,255,.2)}.inline-input[contenteditable].has-warning{color:#ffb8b8}.certificate-table,.connection-table,.timing-table{width:100%;table-layout:fixed;word-break:break-all}.certificate-table td:nth-child(2),.connection-table td:nth-child(2),.timing-table td:nth-child(2){font-family:Menlo,Monaco,Consolas,"Courier New",monospace;width:70%}.certificate-table tr:not(:first-child),.connection-table tr:not(:first-child),.timing-table tr:not(:first-child){border-top:1px solid #f7f7f7}.certificate-table td,.connection-table td,.timing-table td{vertical-align:top}.connection-table td:first-child{padding-right:1em}.headers,.trailers{position:relative;min-height:2ex;overflow-wrap:break-word}.headers .kv-row,.trailers .kv-row{margin-bottom:.3em;max-height:12.4ex;overflow-y:auto}.headers .kv-key,.trailers .kv-key{font-weight:700}.headers .kv-value,.trailers .kv-value{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.headers .inline-input,.trailers .inline-input{background-color:#fff}.headers .kv-add-row,.trailers .kv-add-row{opacity:0;color:#666;position:absolute;bottom:4px;right:4px;transition:all .1s ease-in-out}.headers:hover .kv-add-row,.trailers:hover .kv-add-row{opacity:1}.connection-table td,.timing-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}dl.cert-attributes{display:flex;flex-flow:row;flex-wrap:wrap;margin-bottom:0}dl.cert-attributes dd,dl.cert-attributes dt{text-overflow:ellipsis;overflow:hidden}dl.cert-attributes dt{flex:0 0 2em}dl.cert-attributes dd{flex:0 0 calc(100% - 2em)}.dns-request table td,.dns-request table th,.dns-response table td,.dns-response table th{padding-right:1rem}.flowview-image{text-align:center;padding:10px 0}.flowview-image img{max-width:100%;max-height:100%}.edit-flow-container{position:fixed;right:20px}.edit-flow{cursor:pointer;position:absolute;right:0;top:5px;height:40px;width:40px;border-radius:20px;z-index:10000;background-color:rgba(255,255,255,.7);border:solid 2px rgba(248,145,59,.7);text-align:center;font-size:22px;line-height:37px;transition:all .1s ease-in-out}.edit-flow:hover{background-color:rgba(239,108,0,.7);color:rgba(0,0,0,.8);border:solid 2px transparent}.eventlog{height:200px;flex:0 0 auto;display:flex;flex-direction:column}.eventlog>div{background-color:#f2f2f2;padding:0 5px;flex:0 0 auto;border-top:1px solid #aaa;cursor:row-resize}.eventlog>pre{flex:1 1 auto;margin:0;border-radius:0;overflow-x:auto;overflow-y:scroll;background-color:#fcfcfc}.eventlog .fa-close{cursor:pointer;float:right;color:grey;padding:3px 0;padding-left:10px}.eventlog .fa-close:hover{color:#000}.eventlog .btn-toggle{margin-top:-2px;margin-left:3px;padding:2px 2px;font-size:10px;line-height:10px;border-radius:2px}.eventlog .label{cursor:pointer;vertical-align:middle;display:inline-block;margin-top:-2px;margin-left:3px}footer{box-shadow:0 -1px 3px #d3d3d3;padding:0 0 4px 3px}footer .label{margin-right:3px}.CodeMirror{border:1px solid #ccc;height:auto!important}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.contentview .header{font-weight:700}.contentview .highlight{font-weight:700}.contentview .offset{color:#00f}.contentview .codeeditor{margin-bottom:12px}.contentview .Token_Name_Tag{color:#006400}.contentview .Token_Literal_String{color:#b22222}.contentview .Token_Literal_Number{color:purple}.contentview .Token_Keyword_Constant{color:#00f}.modal-visible{display:block}.modal-dialog{overflow-y:initial!important}.modal-body{max-height:calc(100vh - 200px);overflow-y:auto}.dropdown-menu{margin:0!important;max-height:250px;overflow-y:scroll}.dropdown-menu>li>a{padding:3px 10px}.command-title{background-color:#f2f2f2;border:1px solid #aaa}.command-result{display:block;margin:0;background-color:#fcfcfc;height:100px;max-height:100px;overflow:auto}.command-suggestion{background-color:#9c9c9c}.argument-suggestion{background-color:hsla(209,52%,84%,.5)!important}.command>.popover{display:block;position:relative;max-width:none}.available-commands{overflow:auto}.wireguard-config{margin:1rem 0;display:flex;flex-wrap:wrap;column-gap:2rem;align-items:center}.wireguard-config>*{margin:0}.modes{padding:1em 2em;overflow-y:auto;height:100%;width:100vw}.modes h3{margin-bottom:10px}.modes .modes-category{padding-left:10px}.modes .green-left-border{border-left:10px solid #77c77a}.modes .gray-left-border{border-left:10px solid #b2b2b2}.modes .modes-container{display:flex;flex-direction:column;gap:25px}.modes .mode-title{font-size:16px;font-weight:600}.modes .mode-description{color:#b2b2b2;margin-top:-10px}.modes .mode-entry{text-align:left;display:flex;align-items:center;font-size:1.5rem;font-weight:400;margin:0}.modes .mode-entry input[type=checkbox]{margin:0 10px;vertical-align:middle;width:1.8rem;height:1.8rem}.modes .mode-entry p{margin:0}.modes .mode-status{margin-left:10px;margin-top:5px;font-weight:600}.modes .mode-local i{font-size:1.8rem;cursor:pointer}.modes .mode-local .processes-container{display:flex;flex-direction:row;align-items:center;gap:5px;margin-left:5px}.modes .mode-local .selected-processes{display:flex;flex-wrap:wrap;gap:5px;overflow:hidden}.modes .mode-local .selected-process{display:flex;flex-direction:row;gap:5px;background-color:#e0e0e0;padding:5px;border-radius:4px;height:30px;font-size:12px;font-weight:500;align-content:center;align-items:center}.modes .mode-local .selected-process>i{font-size:15px}.modes .mode-local .dropdown-container{display:flex;flex-direction:row;align-items:center}.modes .mode-local .local-dropdown{position:relative;width:200px}.modes .mode-local .local-dropdown .dropdown-header{padding:5px;border:1px solid #ccc;border-radius:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;margin-right:10px;height:30px}.modes .mode-local .local-dropdown input{border:none;flex:1;outline:0;color:#000}.modes .mode-local .local-dropdown .dropdown-list{width:100%;max-height:300px;overflow-y:auto;z-index:1;list-style:none;padding:0;margin-bottom:0}.modes .mode-local .local-dropdown .dropdown-item{display:flex;flex-direction:row;align-items:center;padding:8px 10px;margin:4px 0;border-radius:4px;cursor:pointer;transition:background-color .2s ease}.modes .mode-local .local-dropdown .dropdown-item.selected{background-color:#e0e0e0}.modes .mode-local .local-dropdown .dropdown-item:hover{background-color:#f0f0f0}.modes .mode-local .local-dropdown .process-details{display:flex;flex-direction:row;align-items:center}.modes .mode-local .local-dropdown .process-icon{margin-right:5px;margin-left:5px;color:#5f6368;width:25px;height:25px}.modes .mode-local .local-dropdown .process-name{font-weight:500;color:#333}.modes .mode-local .local-popover button{font-size:1rem}.modes .mode-local .local-popover i{font-size:1.5rem}@supports (anchor-name:--test){.modes .mode-local .local-popover>div{margin:0;position:absolute;left:0;top:calc(anchor(bottom) + 10px);justify-self:anchor-center;align-self:auto}}.modes .mode-local .local-popover>div{gap:.5rem;align-items:center}.modes .mode-local .local-popover>div:popover-open{display:block}.modes .mode-input{border:1px solid #ccc;margin-left:10px;border-radius:4px;min-width:120px;height:25px}.modes .mode-reverse-input{border:1px solid #ccc;margin-left:10px;margin-right:10px;border-radius:4px;min-width:70px;height:25px}.modes .mode-upstream-input{border:1px solid #ccc;margin-left:10px;margin-right:5px;border-radius:4px;min-width:70px;height:25px}.modes .mode-reverse-dropdown{margin:0 5px;border:1px solid #ccc;border-radius:4px;height:25px}.modes .mode-reverse-servers{display:flex;flex-direction:column;gap:10px}.modes .mode-reverse-add-server{margin-left:10px;display:flex;flex-direction:row;cursor:pointer;font-weight:500;opacity:.5;transition:all 50ms ease-in-out}.modes .mode-reverse-add-server:hover{opacity:1}.modes .mode-reverse-add-server i{font-size:2rem;margin-right:5px}.modes .mode-popover>button{background-color:transparent;border:none;cursor:pointer;font-size:2rem}@supports (anchor-name:--test){.modes .mode-popover>div{margin:0;position:absolute;left:calc(anchor(right) + 5px);align-self:anchor-center}}.modes .mode-popover>div{border:1px solid #ccc;border-radius:4px;padding:10px 15px;background-color:#f9f9f9;box-shadow:0 4px 8px rgba(0,0,0,.1);grid-template-columns:9em 1fr;grid-auto-rows:min-content;gap:.5rem;align-items:center}.modes .mode-popover>div:popover-open{display:grid}.modes .mode-popover>div>h4{text-align:center;grid-column:1/-1}.modes .mode-popover>div>.mode-input{text-align:right;background-color:#fff;margin:0} /*# sourceMappingURL=app.css.map */ diff --git a/mitmproxy/tools/web/static/app.js b/mitmproxy/tools/web/static/app.js index 64d9a97860..a1d882229c 100644 --- a/mitmproxy/tools/web/static/app.js +++ b/mitmproxy/tools/web/static/app.js @@ -1,72 +1,72 @@ -(()=>{var HD=Object.create;var Km=Object.defineProperty;var zD=Object.getOwnPropertyDescriptor;var WD=Object.getOwnPropertyNames;var UD=Object.getPrototypeOf,$D=Object.prototype.hasOwnProperty;var i=(e,t)=>Km(e,"name",{value:t,configurable:!0});var rt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gE=(e,t)=>{for(var n in t)Km(e,n,{get:t[n],enumerable:!0})},VD=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of WD(t))!$D.call(e,c)&&c!==n&&Km(e,c,{get:()=>t[c],enumerable:!(s=zD(t,c))||s.enumerable});return e};var he=(e,t,n)=>(n=e!=null?HD(UD(e)):{},VD(t||!e||!e.__esModule?Km(n,"default",{value:e,enumerable:!0}):n,e));var kE=rt(gt=>{"use strict";var mh=Symbol.for("react.element"),qD=Symbol.for("react.portal"),jD=Symbol.for("react.fragment"),GD=Symbol.for("react.strict_mode"),KD=Symbol.for("react.profiler"),YD=Symbol.for("react.provider"),XD=Symbol.for("react.context"),QD=Symbol.for("react.forward_ref"),JD=Symbol.for("react.suspense"),ZD=Symbol.for("react.memo"),eI=Symbol.for("react.lazy"),mE=Symbol.iterator;function tI(e){return e===null||typeof e!="object"?null:(e=mE&&e[mE]||e["@@iterator"],typeof e=="function"?e:null)}i(tI,"A");var wE={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},SE=Object.assign,xE={};function vp(e,t,n){this.props=e,this.context=t,this.refs=xE,this.updater=n||wE}i(vp,"E");vp.prototype.isReactComponent={};vp.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")};vp.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _E(){}i(_E,"F");_E.prototype=vp.prototype;function Nw(e,t,n){this.props=e,this.context=t,this.refs=xE,this.updater=n||wE}i(Nw,"G");var Ow=Nw.prototype=new _E;Ow.constructor=Nw;SE(Ow,vp.prototype);Ow.isPureReactComponent=!0;var vE=Array.isArray,CE=Object.prototype.hasOwnProperty,Aw={current:null},EE={key:!0,ref:!0,__self:!0,__source:!0};function bE(e,t,n){var s,c={},h=null,p=null;if(t!=null)for(s in t.ref!==void 0&&(p=t.ref),t.key!==void 0&&(h=""+t.key),t)CE.call(t,s)&&!EE.hasOwnProperty(s)&&(c[s]=t[s]);var v=arguments.length-2;if(v===1)c.children=n;else if(1{"use strict";NE.exports=kE()});var BE=rt(Jt=>{"use strict";function Dw(e,t){var n=e.length;e.push(t);e:for(;0>>1,c=e[s];if(0>>1;sJm(v,n))SJm(b,v)?(e[s]=b,e[S]=n,s=S):(e[s]=v,e[p]=n,s=p);else if(SJm(b,n))e[s]=b,e[S]=n,s=S;else break e}}return t}i(ev,"k");function Jm(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}i(Jm,"g");typeof performance=="object"&&typeof performance.now=="function"?(OE=performance,Jt.unstable_now=function(){return OE.now()}):(Lw=Date,AE=Lw.now(),Jt.unstable_now=function(){return Lw.now()-AE});var OE,Lw,AE,Js=[],su=[],sI=1,Io=null,Gn=3,tv=!1,Hc=!1,yh=!1,PE=typeof setTimeout=="function"?setTimeout:null,RE=typeof clearTimeout=="function"?clearTimeout:null,ME=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Iw(e){for(var t=us(su);t!==null;){if(t.callback===null)ev(su);else if(t.startTime<=e)ev(su),t.sortIndex=t.expirationTime,Dw(Js,t);else break;t=us(su)}}i(Iw,"G");function Fw(e){if(yh=!1,Iw(e),!Hc)if(us(Js)!==null)Hc=!0,Hw(Bw);else{var t=us(su);t!==null&&zw(Fw,t.startTime-e)}}i(Fw,"H");function Bw(e,t){Hc=!1,yh&&(yh=!1,RE(wh),wh=-1),tv=!0;var n=Gn;try{for(Iw(t),Io=us(Js);Io!==null&&(!(Io.expirationTime>t)||e&&!FE());){var s=Io.callback;if(typeof s=="function"){Io.callback=null,Gn=Io.priorityLevel;var c=s(Io.expirationTime<=t);t=Jt.unstable_now(),typeof c=="function"?Io.callback=c:Io===us(Js)&&ev(Js),Iw(t)}else ev(Js);Io=us(Js)}if(Io!==null)var h=!0;else{var p=us(su);p!==null&&zw(Fw,p.startTime-t),h=!1}return h}finally{Io=null,Gn=n,tv=!1}}i(Bw,"J");var rv=!1,Zm=null,wh=-1,DE=5,IE=-1;function FE(){return!(Jt.unstable_now()-IEe||125s?(e.sortIndex=n,Dw(su,e),us(Js)===null&&e===us(su)&&(yh?(RE(wh),wh=-1):yh=!0,zw(Fw,n-s))):(e.sortIndex=c,Dw(Js,e),Hc||tv||(Hc=!0,Hw(Bw))),e};Jt.unstable_shouldYield=FE;Jt.unstable_wrapCallback=function(e){var t=Gn;return function(){var n=Gn;Gn=t;try{return e.apply(this,arguments)}finally{Gn=n}}}});var zE=rt((NW,HE)=>{"use strict";HE.exports=BE()});var Vk=rt(co=>{"use strict";var lI=Ne(),ao=zE();function ge(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u1=Object.prototype.hasOwnProperty,aI=/^[: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]*$/,WE={},UE={};function uI(e){return u1.call(UE,e)?!0:u1.call(WE,e)?!1:aI.test(e)?UE[e]=!0:(WE[e]=!0,!1)}i(uI,"oa");function cI(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}i(cI,"pa");function fI(e,t,n,s){if(t===null||typeof t>"u"||cI(e,t,n,s))return!0;if(s)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}i(fI,"qa");function di(e,t,n,s,c,h,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=c,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=p}i(di,"v");var zn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zn[e]=new di(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];zn[t]=new di(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zn[e]=new di(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zn[e]=new di(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){zn[e]=new di(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zn[e]=new di(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zn[e]=new di(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zn[e]=new di(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zn[e]=new di(e,5,!1,e.toLowerCase(),null,!1,!1)});var tS=/[\-:]([a-z])/g;function rS(e){return e[1].toUpperCase()}i(rS,"sa");"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(tS,rS);zn[t]=new di(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(tS,rS);zn[t]=new di(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(tS,rS);zn[t]=new di(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zn[e]=new di(e,1,!1,e.toLowerCase(),null,!1,!1)});zn.xlinkHref=new di("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zn[e]=new di(e,1,!1,e.toLowerCase(),null,!0,!0)});function nS(e,t,n,s){var c=zn.hasOwnProperty(t)?zn[t]:null;(c!==null?c.type!==0:s||!(2{var PI=Object.create;var cv=Object.defineProperty;var LI=Object.getOwnPropertyDescriptor;var MI=Object.getOwnPropertyNames;var OI=Object.getPrototypeOf,RI=Object.prototype.hasOwnProperty;var i=(e,t)=>cv(e,"name",{value:t,configurable:!0});var rt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xb=(e,t)=>{for(var n in t)cv(e,n,{get:t[n],enumerable:!0})},DI=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of MI(t))!RI.call(e,l)&&l!==n&&cv(e,l,{get:()=>t[l],enumerable:!(s=LI(t,l))||s.enumerable});return e};var pe=(e,t,n)=>(n=e!=null?PI(OI(e)):{},DI(t||!e||!e.__esModule?cv(n,"default",{value:e,enumerable:!0}):n,e));var Ob=rt(mt=>{"use strict";var Lh=Symbol.for("react.element"),II=Symbol.for("react.portal"),FI=Symbol.for("react.fragment"),BI=Symbol.for("react.strict_mode"),HI=Symbol.for("react.profiler"),zI=Symbol.for("react.provider"),UI=Symbol.for("react.context"),WI=Symbol.for("react.forward_ref"),$I=Symbol.for("react.suspense"),VI=Symbol.for("react.memo"),qI=Symbol.for("react.lazy"),Cb=Symbol.iterator;function jI(e){return e===null||typeof e!="object"?null:(e=Cb&&e[Cb]||e["@@iterator"],typeof e=="function"?e:null)}i(jI,"A");var bb={isMounted:i(function(){return!1},"isMounted"),enqueueForceUpdate:i(function(){},"enqueueForceUpdate"),enqueueReplaceState:i(function(){},"enqueueReplaceState"),enqueueSetState:i(function(){},"enqueueSetState")},Tb=Object.assign,kb={};function Pd(e,t,n){this.props=e,this.context=t,this.refs=kb,this.updater=n||bb}i(Pd,"E");Pd.prototype.isReactComponent={};Pd.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")};Pd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nb(){}i(Nb,"F");Nb.prototype=Pd.prototype;function t1(e,t,n){this.props=e,this.context=t,this.refs=kb,this.updater=n||bb}i(t1,"G");var r1=t1.prototype=new Nb;r1.constructor=t1;Tb(r1,Pd.prototype);r1.isPureReactComponent=!0;var _b=Array.isArray,Ab=Object.prototype.hasOwnProperty,n1={current:null},Pb={key:!0,ref:!0,__self:!0,__source:!0};function Lb(e,t,n){var s,l={},h=null,d=null;if(t!=null)for(s in t.ref!==void 0&&(d=t.ref),t.key!==void 0&&(h=""+t.key),t)Ab.call(t,s)&&!Pb.hasOwnProperty(s)&&(l[s]=t[s]);var v=arguments.length-2;if(v===1)l.children=n;else if(1{"use strict";Rb.exports=Ob()});var Vb=rt(tr=>{"use strict";function l1(e,t){var n=e.length;e.push(t);e:for(;0>>1,l=e[s];if(0>>1;shv(v,n))Shv(b,v)?(e[s]=b,e[S]=n,s=S):(e[s]=v,e[d]=n,s=d);else if(Shv(b,n))e[s]=b,e[S]=n,s=S;else break e}}return t}i(gv,"k");function hv(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}i(hv,"g");typeof performance=="object"&&typeof performance.now=="function"?(Db=performance,tr.unstable_now=function(){return Db.now()}):(o1=Date,Ib=o1.now(),tr.unstable_now=function(){return o1.now()-Ib});var Db,o1,Ib,va=[],xu=[],QI=1,rs=null,ti=3,vv=!1,Zc=!1,Oh=!1,Hb=typeof setTimeout=="function"?setTimeout:null,zb=typeof clearTimeout=="function"?clearTimeout:null,Fb=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u1(e){for(var t=Ps(xu);t!==null;){if(t.callback===null)gv(xu);else if(t.startTime<=e)gv(xu),t.sortIndex=t.expirationTime,l1(va,t);else break;t=Ps(xu)}}i(u1,"G");function c1(e){if(Oh=!1,u1(e),!Zc)if(Ps(va)!==null)Zc=!0,d1(f1);else{var t=Ps(xu);t!==null&&p1(c1,t.startTime-e)}}i(c1,"H");function f1(e,t){Zc=!1,Oh&&(Oh=!1,zb(Rh),Rh=-1),vv=!0;var n=ti;try{for(u1(t),rs=Ps(va);rs!==null&&(!(rs.expirationTime>t)||e&&!$b());){var s=rs.callback;if(typeof s=="function"){rs.callback=null,ti=rs.priorityLevel;var l=s(rs.expirationTime<=t);t=tr.unstable_now(),typeof l=="function"?rs.callback=l:rs===Ps(va)&&gv(va),u1(t)}else gv(va);rs=Ps(va)}if(rs!==null)var h=!0;else{var d=Ps(xu);d!==null&&p1(c1,d.startTime-t),h=!1}return h}finally{rs=null,ti=n,vv=!1}}i(f1,"J");var yv=!1,mv=null,Rh=-1,Ub=5,Wb=-1;function $b(){return!(tr.unstable_now()-Wbe||125s?(e.sortIndex=n,l1(xu,e),Ps(va)===null&&e===Ps(xu)&&(Oh?(zb(Rh),Rh=-1):Oh=!0,p1(c1,n-s))):(e.sortIndex=l,l1(va,e),Zc||vv||(Zc=!0,d1(f1))),e};tr.unstable_shouldYield=$b;tr.unstable_wrapCallback=function(e){var t=ti;return function(){var n=ti;ti=t;try{return e.apply(this,arguments)}finally{ti=n}}}});var jb=rt((RW,qb)=>{"use strict";qb.exports=Vb()});var XN=rt(Lo=>{"use strict";var JI=Te(),Ao=jb();function ge(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),I1=Object.prototype.hasOwnProperty,ZI=/^[: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]*$/,Kb={},Gb={};function eF(e){return I1.call(Gb,e)?!0:I1.call(Kb,e)?!1:ZI.test(e)?Gb[e]=!0:(Kb[e]=!0,!1)}i(eF,"oa");function tF(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}i(tF,"pa");function rF(e,t,n,s){if(t===null||typeof t>"u"||tF(e,t,n,s))return!0;if(s)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}i(rF,"qa");function Ti(e,t,n,s,l,h,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=d}i(Ti,"v");var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jn[e]=new Ti(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jn[t]=new Ti(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jn[e]=new Ti(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jn[e]=new Ti(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){jn[e]=new Ti(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jn[e]=new Ti(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jn[e]=new Ti(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jn[e]=new Ti(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jn[e]=new Ti(e,5,!1,e.toLowerCase(),null,!1,!1)});var NS=/[\-:]([a-z])/g;function AS(e){return e[1].toUpperCase()}i(AS,"sa");"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(NS,AS);jn[t]=new Ti(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(NS,AS);jn[t]=new Ti(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(NS,AS);jn[t]=new Ti(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jn[e]=new Ti(e,1,!1,e.toLowerCase(),null,!1,!1)});jn.xlinkHref=new Ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jn[e]=new Ti(e,1,!1,e.toLowerCase(),null,!0,!0)});function PS(e,t,n,s){var l=jn.hasOwnProperty(t)?jn[t]:null;(l!==null?l.type!==0:s||!(2v||c[p]!==h[v]){var S=` -`+c[p].replace(" at new "," at ");return e.displayName&&S.includes("")&&(S=S.replace("",e.displayName)),S}while(1<=p&&0<=v);break}}}finally{Uw=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nh(e):""}i($w,"Oa");function pI(e){switch(e.tag){case 5:return Nh(e.type);case 16:return Nh("Lazy");case 13:return Nh("Suspense");case 19:return Nh("SuspenseList");case 0:case 2:case 15:return e=$w(e.type,!1),e;case 11:return e=$w(e.type.render,!1),e;case 1:return e=$w(e.type,!0),e;default:return""}}i(pI,"Pa");function d1(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 xp:return"Fragment";case Sp:return"Portal";case c1:return"Profiler";case iS:return"StrictMode";case f1:return"Suspense";case p1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yb:return(e.displayName||"Context")+".Consumer";case Kb:return(e._context.displayName||"Context")+".Provider";case oS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sS:return t=e.displayName||null,t!==null?t:d1(e.type)||"Memo";case au:t=e._payload,e=e._init;try{return d1(e(t))}catch{}}return null}i(d1,"Qa");function dI(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 d1(t);case 8:return t===iS?"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}i(dI,"Ra");function _u(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}i(_u,"Sa");function Qb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}i(Qb,"Ta");function hI(e){var t=Qb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var c=n.get,h=n.set;return Object.defineProperty(e,t,{configurable:!0,get:i(function(){return c.call(this)},"get"),set:i(function(p){s=""+p,h.call(this,p)},"set")}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:i(function(){return s},"getValue"),setValue:i(function(p){s=""+p},"setValue"),stopTracking:i(function(){e._valueTracker=null,delete e[t]},"stopTracking")}}}i(hI,"Ua");function iv(e){e._valueTracker||(e._valueTracker=hI(e))}i(iv,"Va");function Jb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=Qb(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}i(Jb,"Wa");function Lv(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}}i(Lv,"Xa");function h1(e,t){var n=t.checked;return Cr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}i(h1,"Ya");function VE(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=_u(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}i(VE,"Za");function Zb(e,t){t=t.checked,t!=null&&nS(e,"checked",t,!1)}i(Zb,"ab");function g1(e,t){Zb(e,t);var n=_u(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?m1(e,t.type,n):t.hasOwnProperty("defaultValue")&&m1(e,t.type,_u(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}i(g1,"bb");function qE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="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)}i(qE,"db");function m1(e,t,n){(t!=="number"||Lv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}i(m1,"cb");var Oh=Array.isArray;function Lp(e,t,n,s){if(e=e.options,t){t={};for(var c=0;c"+t.valueOf().toString()+"",t=ov.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uh(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}i(Uh,"ob");var Lh={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},gI=["Webkit","ms","Moz","O"];Object.keys(Lh).forEach(function(e){gI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lh[t]=Lh[e]})});function nT(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lh.hasOwnProperty(e)&&Lh[e]?(""+t).trim():t+"px"}i(nT,"rb");function iT(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,c=nT(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,c):e[n]=c}}i(iT,"sb");var mI=Cr({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 w1(e,t){if(t){if(mI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ge(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ge(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ge(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ge(62))}}i(w1,"ub");function S1(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}}i(S1,"vb");var x1=null;function lS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}i(lS,"xb");var _1=null,Pp=null,Rp=null;function KE(e){if(e=sg(e)){if(typeof _1!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=sy(t),_1(e.stateNode,e.type,t))}}i(KE,"Bb");function oT(e){Pp?Rp?Rp.push(e):Rp=[e]:Pp=e}i(oT,"Eb");function sT(){if(Pp){var e=Pp,t=Rp;if(Rp=Pp=null,KE(e),t)for(e=0;e>>=0,e===0?32:31-(kI(e)/NI|0)|0}i(OI,"nc");var sv=64,lv=4194304;function Ah(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}}i(Ah,"tc");function Iv(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,c=e.suspendedLanes,h=e.pingedLanes,p=n&268435455;if(p!==0){var v=p&~c;v!==0?s=Ah(v):(h&=p,h!==0&&(s=Ah(h)))}else p=n&~c,p!==0?s=Ah(p):h!==0&&(s=Ah(h));if(s===0)return 0;if(t!==0&&t!==s&&!(t&c)&&(c=s&-s,h=t&-t,c>=h||c===16&&(h&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0n;n++)t.push(e);return t}i(qw,"zc");function ig(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hs(t),e[t]=n}i(ig,"Ac");function LI(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 s=e.eventTimes;for(e=e.expirationTimes;0=Rh),nb=" ",ib=!1;function TT(e,t){switch(e){case"keyup":return sF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}i(TT,"ge");function kT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}i(kT,"he");var _p=!1;function aF(e,t){switch(e){case"compositionend":return kT(t);case"keypress":return t.which!==32?null:(ib=!0,nb);case"textInput":return e=t.data,e===nb&&ib?null:e;default:return null}}i(aF,"je");function uF(e,t){if(_p)return e==="compositionend"||!gS&&TT(e,t)?(e=ET(),Cv=pS=pu=null,_p=!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)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lb(n)}}i(ab,"Ke");function MT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?MT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}i(MT,"Le");function LT(){for(var e=window,t=Lv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lv(e.document)}return t}i(LT,"Me");function mS(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")}i(mS,"Ne");function yF(e){var t=LT(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&MT(n.ownerDocument.documentElement,n)){if(s!==null&&mS(n)){if(t=s.start,e=s.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 c=n.textContent.length,h=Math.min(s.start,c);s=s.end===void 0?h:Math.min(s.end,c),!e.extend&&h>s&&(c=s,s=h,h=c),c=ab(n,h);var p=ab(n,s);c&&p&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),h>s?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.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=document.documentMode,Cp=null,N1=null,Ih=null,O1=!1;function ub(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;O1||Cp==null||Cp!==Lv(s)||(s=Cp,"selectionStart"in s&&mS(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ih&&Kh(Ih,s)||(Ih=s,s=Hv(N1,"onSelect"),0Tp||(e.current=D1[Tp],D1[Tp]=null,Tp--)}i(lr,"E");function Zt(e,t){Tp++,D1[Tp]=e.current,e.current=t}i(Zt,"G");var Cu={},Qn=bu(Cu),Mi=bu(!1),Gc=Cu;function Hp(e,t){var n=e.type.contextTypes;if(!n)return Cu;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in n)c[h]=t[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}i(Hp,"Yf");function Li(e){return e=e.childContextTypes,e!=null}i(Li,"Zf");function Wv(){lr(Mi),lr(Qn)}i(Wv,"$f");function yb(e,t,n){if(Qn.current!==Cu)throw Error(ge(168));Zt(Qn,t),Zt(Mi,n)}i(yb,"ag");function WT(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var c in s)if(!(c in t))throw Error(ge(108,dI(e)||"Unknown",c));return Cr({},n,s)}i(WT,"bg");function Uv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cu,Gc=Qn.current,Zt(Qn,e),Zt(Mi,Mi.current),!0}i(Uv,"cg");function wb(e,t,n){var s=e.stateNode;if(!s)throw Error(ge(169));n?(e=WT(e,t,Gc),s.__reactInternalMemoizedMergedChildContext=e,lr(Mi),lr(Qn),Zt(Qn,e)):lr(Mi),Zt(Mi,n)}i(wb,"dg");var $l=null,ly=!1,e1=!1;function UT(e){$l===null?$l=[e]:$l.push(e)}i(UT,"hg");function NF(e){ly=!0,UT(e)}i(NF,"ig");function Tu(){if(!e1&&$l!==null){e1=!0;var e=0,t=Wt;try{var n=$l;for(Wt=1;e>=p,c-=p,Vl=1<<32-hs(t)+c|n<de?(Re=oe,oe=null):Re=oe.sibling;var Ce=M(I,oe,B[de],G);if(Ce===null){oe===null&&(oe=Re);break}e&&oe&&Ce.alternate===null&&t(I,oe),L=h(Ce,L,de),Z===null?re=Ce:Z.sibling=Ce,Z=Ce,oe=Re}if(de===B.length)return n(I,oe),fr&&zc(I,de),re;if(oe===null){for(;dede?(Re=oe,oe=null):Re=oe.sibling;var Ye=M(I,oe,Ce.value,G);if(Ye===null){oe===null&&(oe=Re);break}e&&oe&&Ye.alternate===null&&t(I,oe),L=h(Ye,L,de),Z===null?re=Ye:Z.sibling=Ye,Z=Ye,oe=Re}if(Ce.done)return n(I,oe),fr&&zc(I,de),re;if(oe===null){for(;!Ce.done;de++,Ce=B.next())Ce=D(I,Ce.value,G),Ce!==null&&(L=h(Ce,L,de),Z===null?re=Ce:Z.sibling=Ce,Z=Ce);return fr&&zc(I,de),re}for(oe=s(I,oe);!Ce.done;de++,Ce=B.next())Ce=z(oe,I,de,Ce.value,G),Ce!==null&&(e&&Ce.alternate!==null&&oe.delete(Ce.key===null?de:Ce.key),L=h(Ce,L,de),Z===null?re=Ce:Z.sibling=Ce,Z=Ce);return e&&oe.forEach(function(tt){return t(I,tt)}),fr&&zc(I,de),re}i(Q,"t");function ie(I,L,B,G){if(typeof B=="object"&&B!==null&&B.type===xp&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case nv:e:{for(var re=B.key,Z=L;Z!==null;){if(Z.key===re){if(re=B.type,re===xp){if(Z.tag===7){n(I,Z.sibling),L=c(Z,B.props.children),L.return=I,I=L;break e}}else if(Z.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===au&&_b(re)===Z.type){n(I,Z.sibling),L=c(Z,B.props),L.ref=Eh(I,Z,B),L.return=I,I=L;break e}n(I,Z);break}else t(I,Z);Z=Z.sibling}B.type===xp?(L=jc(B.props.children,I.mode,G,B.key),L.return=I,I=L):(G=Mv(B.type,B.key,B.props,null,I.mode,G),G.ref=Eh(I,L,B),G.return=I,I=G)}return p(I);case Sp:e:{for(Z=B.key;L!==null;){if(L.key===Z)if(L.tag===4&&L.stateNode.containerInfo===B.containerInfo&&L.stateNode.implementation===B.implementation){n(I,L.sibling),L=c(L,B.children||[]),L.return=I,I=L;break e}else{n(I,L);break}else t(I,L);L=L.sibling}L=a1(B,I.mode,G),L.return=I,I=L}return p(I);case au:return Z=B._init,ie(I,L,Z(B._payload),G)}if(Oh(B))return q(I,L,B,G);if(Sh(B))return Q(I,L,B,G);yv(I,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,L!==null&&L.tag===6?(n(I,L.sibling),L=c(L,B),L.return=I,I=L):(n(I,L),L=l1(B,I.mode,G),L.return=I,I=L),p(I)):n(I,L)}return i(ie,"J"),ie}i(jT,"Og");var Wp=jT(!0),GT=jT(!1),qv=bu(null),jv=null,Op=null,SS=null;function xS(){SS=Op=jv=null}i(xS,"$g");function _S(e){var t=qv.current;lr(qv),e._currentValue=t}i(_S,"ah");function B1(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}i(B1,"bh");function Ip(e,t){jv=e,SS=Op=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ai=!0),e.firstContext=null)}i(Ip,"ch");function Wo(e){var t=e._currentValue;if(SS!==e)if(e={context:e,memoizedValue:t,next:null},Op===null){if(jv===null)throw Error(ge(308));Op=e,jv.dependencies={lanes:0,firstContext:e}}else Op=Op.next=e;return t}i(Wo,"eh");var $c=null;function CS(e){$c===null?$c=[e]:$c.push(e)}i(CS,"gh");function KT(e,t,n,s){var c=t.interleaved;return c===null?(n.next=n,CS(t)):(n.next=c.next,c.next=n),t.interleaved=n,Yl(e,s)}i(KT,"hh");function Yl(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}i(Yl,"ih");var uu=!1;function ES(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}i(ES,"kh");function YT(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})}i(YT,"lh");function jl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}i(jl,"mh");function yu(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Et&2){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,Yl(e,n)}return c=s.interleaved,c===null?(t.next=t,CS(s)):(t.next=c.next,c.next=t),s.interleaved=t,Yl(e,n)}i(yu,"nh");function bv(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,uS(e,n)}}i(bv,"oh");function Cb(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var c=null,h=null;if(n=n.firstBaseUpdate,n!==null){do{var p={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};h===null?c=h=p:h=h.next=p,n=n.next}while(n!==null);h===null?c=h=t:h=h.next=t}else c=h=t;n={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}i(Cb,"ph");function Gv(e,t,n,s){var c=e.updateQueue;uu=!1;var h=c.firstBaseUpdate,p=c.lastBaseUpdate,v=c.shared.pending;if(v!==null){c.shared.pending=null;var S=v,b=S.next;S.next=null,p===null?h=b:p.next=b,p=S;var k=e.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==p&&(v===null?k.firstBaseUpdate=b:v.next=b,k.lastBaseUpdate=S))}if(h!==null){var D=c.baseState;p=0,k=b=S=null,v=h;do{var M=v.lane,z=v.eventTime;if((s&M)===M){k!==null&&(k=k.next={eventTime:z,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var q=e,Q=v;switch(M=t,z=n,Q.tag){case 1:if(q=Q.payload,typeof q=="function"){D=q.call(z,D,M);break e}D=q;break e;case 3:q.flags=q.flags&-65537|128;case 0:if(q=Q.payload,M=typeof q=="function"?q.call(z,D,M):q,M==null)break e;D=Cr({},D,M);break e;case 2:uu=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,M=c.effects,M===null?c.effects=[v]:M.push(v))}else z={eventTime:z,lane:M,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(b=k=z,S=D):k=k.next=z,p|=M;if(v=v.next,v===null){if(v=c.shared.pending,v===null)break;M=v,v=M.next,M.next=null,c.lastBaseUpdate=M,c.shared.pending=null}}while(!0);if(k===null&&(S=D),c.baseState=S,c.firstBaseUpdate=b,c.lastBaseUpdate=k,t=c.shared.interleaved,t!==null){c=t;do p|=c.lane,c=c.next;while(c!==t)}else h===null&&(c.shared.lanes=0);Xc|=p,e.lanes=p,e.memoizedState=D}}i(Gv,"qh");function Eb(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var s=r1.transition;r1.transition={};try{e(!1),t()}finally{Wt=n,r1.transition=s}}i(MF,"vi");function pk(){return Uo().memoizedState}i(pk,"wi");function LF(e,t,n){var s=Su(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},dk(e))hk(t,n);else if(n=KT(e,t,n,s),n!==null){var c=pi();gs(n,e,s,c),gk(n,t,s)}}i(LF,"xi");function PF(e,t,n){var s=Su(e),c={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(dk(e))hk(t,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var p=t.lastRenderedState,v=h(p,n);if(c.hasEagerState=!0,c.eagerState=v,ms(v,p)){var S=t.interleaved;S===null?(c.next=c,CS(t)):(c.next=S.next,S.next=c),t.interleaved=c;return}}catch{}finally{}n=KT(e,t,c,s),n!==null&&(c=pi(),gs(n,e,s,c),gk(n,t,s))}}i(PF,"ii");function dk(e){var t=e.alternate;return e===_r||t!==null&&t===_r}i(dk,"zi");function hk(e,t){Fh=Yv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}i(hk,"Ai");function gk(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,uS(e,n)}}i(gk,"Bi");var Xv={readContext:Wo,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},RF={readContext:Wo,useCallback:i(function(e,t){return el().memoizedState=[e,t===void 0?null:t],e},"useCallback"),useContext:Wo,useEffect:Tb,useImperativeHandle:i(function(e,t,n){return n=n!=null?n.concat([e]):null,kv(4194308,4,lk.bind(null,t,e),n)},"useImperativeHandle"),useLayoutEffect:i(function(e,t){return kv(4194308,4,e,t)},"useLayoutEffect"),useInsertionEffect:i(function(e,t){return kv(4,2,e,t)},"useInsertionEffect"),useMemo:i(function(e,t){var n=el();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},"useMemo"),useReducer:i(function(e,t,n){var s=el();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=LF.bind(null,_r,e),[s.memoizedState,e]},"useReducer"),useRef:i(function(e){var t=el();return e={current:e},t.memoizedState=e},"useRef"),useState:bb,useDebugValue:LS,useDeferredValue:i(function(e){return el().memoizedState=e},"useDeferredValue"),useTransition:i(function(){var e=bb(!1),t=e[0];return e=MF.bind(null,e[1]),el().memoizedState=e,[t,e]},"useTransition"),useMutableSource:i(function(){},"useMutableSource"),useSyncExternalStore:i(function(e,t,n){var s=_r,c=el();if(fr){if(n===void 0)throw Error(ge(407));n=n()}else{if(n=t(),Tn===null)throw Error(ge(349));Yc&30||ZT(s,t,n)}c.memoizedState=n;var h={value:n,getSnapshot:t};return c.queue=h,Tb(tk.bind(null,s,h,e),[e]),s.flags|=2048,rg(9,ek.bind(null,s,h,n,t),void 0,null),n},"useSyncExternalStore"),useId:i(function(){var e=el(),t=Tn.identifierPrefix;if(fr){var n=ql,s=Vl;n=(s&~(1<<32-hs(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=eg++,0v||l[d]!==h[v]){var S=` +`+l[d].replace(" at new "," at ");return e.displayName&&S.includes("")&&(S=S.replace("",e.displayName)),S}while(1<=d&&0<=v);break}}}finally{m1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$h(e):""}i(g1,"Oa");function nF(e){switch(e.tag){case 5:return $h(e.type);case 16:return $h("Lazy");case 13:return $h("Suspense");case 19:return $h("SuspenseList");case 0:case 2:case 15:return e=g1(e.type,!1),e;case 11:return e=g1(e.type.render,!1),e;case 1:return e=g1(e.type,!0),e;default:return""}}i(nF,"Pa");function z1(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 Rd:return"Fragment";case Od:return"Portal";case F1:return"Profiler";case LS:return"StrictMode";case B1:return"Suspense";case H1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tk:return(e.displayName||"Context")+".Consumer";case ek:return(e._context.displayName||"Context")+".Provider";case MS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case OS:return t=e.displayName||null,t!==null?t:z1(e.type)||"Memo";case _u:t=e._payload,e=e._init;try{return z1(e(t))}catch{}}return null}i(z1,"Qa");function iF(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 z1(t);case 8:return t===LS?"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}i(iF,"Ra");function Fu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}i(Fu,"Sa");function nk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}i(nk,"Ta");function oF(e){var t=nk(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,h=n.set;return Object.defineProperty(e,t,{configurable:!0,get:i(function(){return l.call(this)},"get"),set:i(function(d){s=""+d,h.call(this,d)},"set")}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:i(function(){return s},"getValue"),setValue:i(function(d){s=""+d},"setValue"),stopTracking:i(function(){e._valueTracker=null,delete e[t]},"stopTracking")}}}i(oF,"Ua");function Sv(e){e._valueTracker||(e._valueTracker=oF(e))}i(Sv,"Va");function ik(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=nk(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}i(ik,"Wa");function Gv(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}}i(Gv,"Xa");function U1(e,t){var n=t.checked;return Tr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}i(U1,"Ya");function Xb(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=Fu(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}i(Xb,"Za");function ok(e,t){t=t.checked,t!=null&&PS(e,"checked",t,!1)}i(ok,"ab");function W1(e,t){ok(e,t);var n=Fu(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$1(e,t.type,n):t.hasOwnProperty("defaultValue")&&$1(e,t.type,Fu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}i(W1,"bb");function Qb(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="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)}i(Qb,"db");function $1(e,t,n){(t!=="number"||Gv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}i($1,"cb");var Vh=Array.isArray;function qd(e,t,n,s){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=xv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}i(nm,"ob");var Kh={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},sF=["Webkit","ms","Moz","O"];Object.keys(Kh).forEach(function(e){sF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kh[t]=Kh[e]})});function uk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kh.hasOwnProperty(e)&&Kh[e]?(""+t).trim():t+"px"}i(uk,"rb");function ck(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,l=uk(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,l):e[n]=l}}i(ck,"sb");var aF=Tr({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 j1(e,t){if(t){if(aF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ge(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ge(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ge(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ge(62))}}i(j1,"ub");function K1(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}}i(K1,"vb");var G1=null;function RS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}i(RS,"xb");var Y1=null,jd=null,Kd=null;function eT(e){if(e=xm(e)){if(typeof Y1!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=Cy(t),Y1(e.stateNode,e.type,t))}}i(eT,"Bb");function fk(e){jd?Kd?Kd.push(e):Kd=[e]:jd=e}i(fk,"Eb");function dk(){if(jd){var e=jd,t=Kd;if(Kd=jd=null,eT(e),t)for(e=0;e>>=0,e===0?32:31-(yF(e)/wF|0)|0}i(SF,"nc");var Cv=64,_v=4194304;function qh(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}}i(qh,"tc");function Jv(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,l=e.suspendedLanes,h=e.pingedLanes,d=n&268435455;if(d!==0){var v=d&~l;v!==0?s=qh(v):(h&=d,h!==0&&(s=qh(h)))}else d=n&~l,d!==0?s=qh(d):h!==0&&(s=qh(h));if(s===0)return 0;if(t!==0&&t!==s&&!(t&l)&&(l=s&-s,h=t&-t,l>=h||l===16&&(h&4194240)!==0))return t;if(s&4&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0n;n++)t.push(e);return t}i(y1,"zc");function wm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ds(t),e[t]=n}i(wm,"Ac");function _F(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 s=e.eventTimes;for(e=e.expirationTimes;0=Yh),uT=" ",cT=!1;function Mk(e,t){switch(e){case"keyup":return QF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}i(Mk,"ge");function Ok(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}i(Ok,"he");var Dd=!1;function ZF(e,t){switch(e){case"compositionend":return Ok(t);case"keypress":return t.which!==32?null:(cT=!0,uT);case"textInput":return e=t.data,e===uT&&cT?null:e;default:return null}}i(ZF,"je");function e3(e,t){if(Dd)return e==="compositionend"||!WS&&Mk(e,t)?(e=Pk(),Hv=HS=ku=null,Dd=!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)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pT(n)}}i(hT,"Ke");function Fk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}i(Fk,"Le");function Bk(){for(var e=window,t=Gv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gv(e.document)}return t}i(Bk,"Me");function $S(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")}i($S,"Ne");function u3(e){var t=Bk(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Fk(n.ownerDocument.documentElement,n)){if(s!==null&&$S(n)){if(t=s.start,e=s.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 l=n.textContent.length,h=Math.min(s.start,l);s=s.end===void 0?h:Math.min(s.end,l),!e.extend&&h>s&&(l=s,s=h,h=l),l=hT(n,h);var d=hT(n,s);l&&d&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),h>s?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.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=document.documentMode,Id=null,tS=null,Qh=null,rS=!1;function mT(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rS||Id==null||Id!==Gv(s)||(s=Id,"selectionStart"in s&&$S(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Qh&&um(Qh,s)||(Qh=s,s=ty(tS,"onSelect"),0Hd||(e.current=lS[Hd],lS[Hd]=null,Hd--)}i(cr,"E");function rr(e,t){Hd++,lS[Hd]=e.current,e.current=t}i(rr,"G");var Bu={},oi=zu(Bu),Ki=zu(!1),lf=Bu;function Jd(e,t){var n=e.type.contextTypes;if(!n)return Bu;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var l={},h;for(h in n)l[h]=t[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}i(Jd,"Yf");function Gi(e){return e=e.childContextTypes,e!=null}i(Gi,"Zf");function ny(){cr(Ki),cr(oi)}i(ny,"$f");function ET(e,t,n){if(oi.current!==Bu)throw Error(ge(168));rr(oi,t),rr(Ki,n)}i(ET,"ag");function Kk(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var l in s)if(!(l in t))throw Error(ge(108,iF(e)||"Unknown",l));return Tr({},n,s)}i(Kk,"bg");function iy(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bu,lf=oi.current,rr(oi,e),rr(Ki,Ki.current),!0}i(iy,"cg");function bT(e,t,n){var s=e.stateNode;if(!s)throw Error(ge(169));n?(e=Kk(e,t,lf),s.__reactInternalMemoizedMergedChildContext=e,cr(Ki),cr(oi),rr(oi,e)):cr(Ki),rr(Ki,n)}i(bT,"dg");var al=null,_y=!1,k1=!1;function Gk(e){al===null?al=[e]:al.push(e)}i(Gk,"hg");function w3(e){_y=!0,Gk(e)}i(w3,"ig");function Uu(){if(!k1&&al!==null){k1=!0;var e=0,t=Vt;try{var n=al;for(Vt=1;e>=d,l-=d,ll=1<<32-Ds(t)+l|n<he?(Re=oe,oe=null):Re=oe.sibling;var Ee=I(D,oe,B[he],j);if(Ee===null){oe===null&&(oe=Re);break}e&&oe&&Ee.alternate===null&&t(D,oe),L=h(Ee,L,he),Z===null?re=Ee:Z.sibling=Ee,Z=Ee,oe=Re}if(he===B.length)return n(D,oe),hr&&ef(D,he),re;if(oe===null){for(;hehe?(Re=oe,oe=null):Re=oe.sibling;var Ye=I(D,oe,Ee.value,j);if(Ye===null){oe===null&&(oe=Re);break}e&&oe&&Ye.alternate===null&&t(D,oe),L=h(Ye,L,he),Z===null?re=Ye:Z.sibling=Ye,Z=Ye,oe=Re}if(Ee.done)return n(D,oe),hr&&ef(D,he),re;if(oe===null){for(;!Ee.done;he++,Ee=B.next())Ee=R(D,Ee.value,j),Ee!==null&&(L=h(Ee,L,he),Z===null?re=Ee:Z.sibling=Ee,Z=Ee);return hr&&ef(D,he),re}for(oe=s(D,oe);!Ee.done;he++,Ee=B.next())Ee=z(oe,D,he,Ee.value,j),Ee!==null&&(e&&Ee.alternate!==null&&oe.delete(Ee.key===null?he:Ee.key),L=h(Ee,L,he),Z===null?re=Ee:Z.sibling=Ee,Z=Ee);return e&&oe.forEach(function(tt){return t(D,tt)}),hr&&ef(D,he),re}i(Q,"t");function ne(D,L,B,j){if(typeof B=="object"&&B!==null&&B.type===Rd&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case wv:e:{for(var re=B.key,Z=L;Z!==null;){if(Z.key===re){if(re=B.type,re===Rd){if(Z.tag===7){n(D,Z.sibling),L=l(Z,B.props.children),L.return=D,D=L;break e}}else if(Z.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===_u&&NT(re)===Z.type){n(D,Z.sibling),L=l(Z,B.props),L.ref=Hh(D,Z,B),L.return=D,D=L;break e}n(D,Z);break}else t(D,Z);Z=Z.sibling}B.type===Rd?(L=af(B.props.children,D.mode,j,B.key),L.return=D,D=L):(j=Kv(B.type,B.key,B.props,null,D.mode,j),j.ref=Hh(D,L,B),j.return=D,D=j)}return d(D);case Od:e:{for(Z=B.key;L!==null;){if(L.key===Z)if(L.tag===4&&L.stateNode.containerInfo===B.containerInfo&&L.stateNode.implementation===B.implementation){n(D,L.sibling),L=l(L,B.children||[]),L.return=D,D=L;break e}else{n(D,L);break}else t(D,L);L=L.sibling}L=D1(B,D.mode,j),L.return=D,D=L}return d(D);case _u:return Z=B._init,ne(D,L,Z(B._payload),j)}if(Vh(B))return q(D,L,B,j);if(Dh(B))return Q(D,L,B,j);Rv(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,L!==null&&L.tag===6?(n(D,L.sibling),L=l(L,B),L.return=D,D=L):(n(D,L),L=R1(B,D.mode,j),L.return=D,D=L),d(D)):n(D,L)}return i(ne,"J"),ne}i(Jk,"Og");var ep=Jk(!0),Zk=Jk(!1),ay=zu(null),ly=null,Wd=null,KS=null;function GS(){KS=Wd=ly=null}i(GS,"$g");function YS(e){var t=ay.current;cr(ay),e._currentValue=t}i(YS,"ah");function fS(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}i(fS,"bh");function Yd(e,t){ly=e,KS=Wd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ji=!0),e.firstContext=null)}i(Yd,"ch");function as(e){var t=e._currentValue;if(KS!==e)if(e={context:e,memoizedValue:t,next:null},Wd===null){if(ly===null)throw Error(ge(308));Wd=e,ly.dependencies={lanes:0,firstContext:e}}else Wd=Wd.next=e;return t}i(as,"eh");var nf=null;function XS(e){nf===null?nf=[e]:nf.push(e)}i(XS,"gh");function eN(e,t,n,s){var l=t.interleaved;return l===null?(n.next=n,XS(t)):(n.next=l.next,l.next=n),t.interleaved=n,pl(e,s)}i(eN,"hh");function pl(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}i(pl,"ih");var Eu=!1;function QS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}i(QS,"kh");function tN(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})}i(tN,"lh");function cl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}i(cl,"mh");function Ou(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Nt&2){var l=s.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),s.pending=t,pl(e,n)}return l=s.interleaved,l===null?(t.next=t,XS(s)):(t.next=l.next,l.next=t),s.interleaved=t,pl(e,n)}i(Ou,"nh");function Uv(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,IS(e,n)}}i(Uv,"oh");function AT(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var l=null,h=null;if(n=n.firstBaseUpdate,n!==null){do{var d={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};h===null?l=h=d:h=h.next=d,n=n.next}while(n!==null);h===null?l=h=t:h=h.next=t}else l=h=t;n={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}i(AT,"ph");function uy(e,t,n,s){var l=e.updateQueue;Eu=!1;var h=l.firstBaseUpdate,d=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var S=v,b=S.next;S.next=null,d===null?h=b:d.next=b,d=S;var k=e.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==d&&(v===null?k.firstBaseUpdate=b:v.next=b,k.lastBaseUpdate=S))}if(h!==null){var R=l.baseState;d=0,k=b=S=null,v=h;do{var I=v.lane,z=v.eventTime;if((s&I)===I){k!==null&&(k=k.next={eventTime:z,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var q=e,Q=v;switch(I=t,z=n,Q.tag){case 1:if(q=Q.payload,typeof q=="function"){R=q.call(z,R,I);break e}R=q;break e;case 3:q.flags=q.flags&-65537|128;case 0:if(q=Q.payload,I=typeof q=="function"?q.call(z,R,I):q,I==null)break e;R=Tr({},R,I);break e;case 2:Eu=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,I=l.effects,I===null?l.effects=[v]:I.push(v))}else z={eventTime:z,lane:I,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(b=k=z,S=R):k=k.next=z,d|=I;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;I=v,v=I.next,I.next=null,l.lastBaseUpdate=I,l.shared.pending=null}}while(!0);if(k===null&&(S=R),l.baseState=S,l.firstBaseUpdate=b,l.lastBaseUpdate=k,t=l.shared.interleaved,t!==null){l=t;do d|=l.lane,l=l.next;while(l!==t)}else h===null&&(l.shared.lanes=0);ff|=d,e.lanes=d,e.memoizedState=R}}i(uy,"qh");function PT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var s=A1.transition;A1.transition={};try{e(!1),t()}finally{Vt=n,A1.transition=s}}i(C3,"vi");function yN(){return ls().memoizedState}i(yN,"wi");function _3(e,t,n){var s=Du(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},wN(e))SN(t,n);else if(n=eN(e,t,n,s),n!==null){var l=bi();Is(n,e,s,l),xN(n,t,s)}}i(_3,"xi");function E3(e,t,n){var s=Du(e),l={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(wN(e))SN(t,l);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var d=t.lastRenderedState,v=h(d,n);if(l.hasEagerState=!0,l.eagerState=v,Fs(v,d)){var S=t.interleaved;S===null?(l.next=l,XS(t)):(l.next=S.next,S.next=l),t.interleaved=l;return}}catch{}finally{}n=eN(e,t,l,s),n!==null&&(l=bi(),Is(n,e,s,l),xN(n,t,s))}}i(E3,"ii");function wN(e){var t=e.alternate;return e===br||t!==null&&t===br}i(wN,"zi");function SN(e,t){Jh=fy=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}i(SN,"Ai");function xN(e,t,n){if(n&4194240){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,IS(e,n)}}i(xN,"Bi");var dy={readContext:as,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri,unstable_isNewReconciler:!1},b3={readContext:as,useCallback:i(function(e,t){return wa().memoizedState=[e,t===void 0?null:t],e},"useCallback"),useContext:as,useEffect:MT,useImperativeHandle:i(function(e,t,n){return n=n!=null?n.concat([e]):null,$v(4194308,4,pN.bind(null,t,e),n)},"useImperativeHandle"),useLayoutEffect:i(function(e,t){return $v(4194308,4,e,t)},"useLayoutEffect"),useInsertionEffect:i(function(e,t){return $v(4,2,e,t)},"useInsertionEffect"),useMemo:i(function(e,t){var n=wa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},"useMemo"),useReducer:i(function(e,t,n){var s=wa();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=_3.bind(null,br,e),[s.memoizedState,e]},"useReducer"),useRef:i(function(e){var t=wa();return e={current:e},t.memoizedState=e},"useRef"),useState:LT,useDebugValue:ox,useDeferredValue:i(function(e){return wa().memoizedState=e},"useDeferredValue"),useTransition:i(function(){var e=LT(!1),t=e[0];return e=C3.bind(null,e[1]),wa().memoizedState=e,[t,e]},"useTransition"),useMutableSource:i(function(){},"useMutableSource"),useSyncExternalStore:i(function(e,t,n){var s=br,l=wa();if(hr){if(n===void 0)throw Error(ge(407));n=n()}else{if(n=t(),Mn===null)throw Error(ge(349));cf&30||oN(s,t,n)}l.memoizedState=n;var h={value:n,getSnapshot:t};return l.queue=h,MT(aN.bind(null,s,h,e),[e]),s.flags|=2048,vm(9,sN.bind(null,s,h,n,t),void 0,null),n},"useSyncExternalStore"),useId:i(function(){var e=wa(),t=Mn.identifierPrefix;if(hr){var n=ul,s=ll;n=(s&~(1<<32-Ds(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=mm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=p.createElement(n,{is:s.is}):(e=p.createElement(n),n==="select"&&(p=e,s.multiple?p.multiple=!0:s.size&&(p.size=s.size))):e=p.createElementNS(e,n),e[tl]=t,e[Qh]=s,bk(e,t,!1,!1),t.stateNode=e;e:{switch(p=S1(n,s),n){case"dialog":sr("cancel",e),sr("close",e),c=s;break;case"iframe":case"object":case"embed":sr("load",e),c=s;break;case"video":case"audio":for(c=0;cVp&&(t.flags|=128,s=!0,bh(h,!1),t.lanes=4194304)}else{if(!s)if(e=Kv(p),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),bh(h,!0),h.tail===null&&h.tailMode==="hidden"&&!p.alternate&&!fr)return Yn(t),null}else 2*Wr()-h.renderingStartTime>Vp&&n!==1073741824&&(t.flags|=128,s=!0,bh(h,!1),t.lanes=4194304);h.isBackwards?(p.sibling=t.child,t.child=p):(n=h.last,n!==null?n.sibling=p:t.child=p,h.last=p)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=Wr(),t.sibling=null,n=xr.current,Zt(xr,s?n&1|2:n&1),t):(Yn(t),null);case 22:case 23:return BS(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?oo&1073741824&&(Yn(t),t.subtreeFlags&6&&(t.flags|=8192)):Yn(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}i(WF,"Ej");function UF(e,t){switch(yS(t),t.tag){case 1:return Li(t.type)&&Wv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Up(),lr(Mi),lr(Qn),kS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return TS(t),null;case 13:if(lr(xr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));zp()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return lr(xr),null;case 4:return Up(),null;case 10:return _S(t.type._context),null;case 22:case 23:return BS(),null;case 24:return null;default:return null}}i(UF,"Ij");var Sv=!1,Xn=!1,$F=typeof WeakSet=="function"?WeakSet:Set,Me=null;function Ap(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){Or(e,t,s)}else n.current=null}i(Ap,"Lj");function G1(e,t,n){try{n()}catch(s){Or(e,t,s)}}i(G1,"Mj");var Fb=!1;function VF(e,t){if(A1=Fv,e=LT(),mS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var c=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{n.nodeType,h.nodeType}catch{n=null;break e}var p=0,v=-1,S=-1,b=0,k=0,D=e,M=null;t:for(;;){for(var z;D!==n||c!==0&&D.nodeType!==3||(v=p+c),D!==h||s!==0&&D.nodeType!==3||(S=p+s),D.nodeType===3&&(p+=D.nodeValue.length),(z=D.firstChild)!==null;)M=D,D=z;for(;;){if(D===e)break t;if(M===n&&++b===c&&(v=p),M===h&&++k===s&&(S=p),(z=D.nextSibling)!==null)break;D=M,M=D.parentNode}D=z}n=v===-1||S===-1?null:{start:v,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(M1={focusedElem:e,selectionRange:n},Fv=!1,Me=t;Me!==null;)if(t=Me,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Me=e;else for(;Me!==null;){t=Me;try{var q=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(q!==null){var Q=q.memoizedProps,ie=q.memoizedState,I=t.stateNode,L=I.getSnapshotBeforeUpdate(t.elementType===t.type?Q:fs(t.type,Q),ie);I.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var B=t.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ge(163))}}catch(G){Or(t,t.return,G)}if(e=t.sibling,e!==null){e.return=t.return,Me=e;break}Me=t.return}return q=Fb,Fb=!1,q}i(VF,"Oj");function Bh(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&e)===e){var h=c.destroy;c.destroy=void 0,h!==void 0&&G1(t,n,h)}c=c.next}while(c!==s)}}i(Bh,"Pj");function cy(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 s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}i(cy,"Qj");function K1(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}}i(K1,"Rj");function Nk(e){var t=e.alternate;t!==null&&(e.alternate=null,Nk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tl],delete t[Qh],delete t[R1],delete t[TF],delete t[kF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}i(Nk,"Sj");function Ok(e){return e.tag===5||e.tag===3||e.tag===4}i(Ok,"Tj");function Bb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ok(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}}i(Bb,"Uj");function Y1(e,t,n){var s=e.tag;if(s===5||s===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=zv));else if(s!==4&&(e=e.child,e!==null))for(Y1(e,t,n),e=e.sibling;e!==null;)Y1(e,t,n),e=e.sibling}i(Y1,"Vj");function X1(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(X1(e,t,n),e=e.sibling;e!==null;)X1(e,t,n),e=e.sibling}i(X1,"Wj");var Bn=null,ps=!1;function lu(e,t,n){for(n=n.child;n!==null;)Ak(e,t,n),n=n.sibling}i(lu,"Yj");function Ak(e,t,n){if(rl&&typeof rl.onCommitFiberUnmount=="function")try{rl.onCommitFiberUnmount(ry,n)}catch{}switch(n.tag){case 5:Xn||Ap(n,t);case 6:var s=Bn,c=ps;Bn=null,lu(e,t,n),Bn=s,ps=c,Bn!==null&&(ps?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(ps?(e=Bn,n=n.stateNode,e.nodeType===8?Zw(e.parentNode,n):e.nodeType===1&&Zw(e,n),jh(e)):Zw(Bn,n.stateNode));break;case 4:s=Bn,c=ps,Bn=n.stateNode.containerInfo,ps=!0,lu(e,t,n),Bn=s,ps=c;break;case 0:case 11:case 14:case 15:if(!Xn&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){c=s=s.next;do{var h=c,p=h.destroy;h=h.tag,p!==void 0&&(h&2||h&4)&&G1(n,t,p),c=c.next}while(c!==s)}lu(e,t,n);break;case 1:if(!Xn&&(Ap(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(v){Or(n,t,v)}lu(e,t,n);break;case 21:lu(e,t,n);break;case 22:n.mode&1?(Xn=(s=Xn)||n.memoizedState!==null,lu(e,t,n),Xn=s):lu(e,t,n);break;default:lu(e,t,n)}}i(Ak,"Zj");function Hb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $F),t.forEach(function(s){var c=ZF.bind(null,e,s);n.has(s)||(n.add(s),s.then(c,c))})}}i(Hb,"ak");function cs(e,t){var n=t.deletions;if(n!==null)for(var s=0;sc&&(c=p),s&=~h}if(s=c,s=Wr()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*jF(s/1960))-s,10e?16:e,du===null)var s=!1;else{if(e=du,du=null,Zv=0,Et&6)throw Error(ge(331));var c=Et;for(Et|=4,Me=e.current;Me!==null;){var h=Me,p=h.child;if(Me.flags&16){var v=h.deletions;if(v!==null){for(var S=0;SWr()-IS?qc(e,0):DS|=n),Pi(e,t)}i(QF,"Ti");function Bk(e,t){t===0&&(e.mode&1?(t=lv,lv<<=1,!(lv&130023424)&&(lv=4194304)):t=1);var n=pi();e=Yl(e,t),e!==null&&(ig(e,t,n),Pi(e,n))}i(Bk,"Yk");function JF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bk(e,n)}i(JF,"uj");function ZF(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ge(314))}s!==null&&s.delete(t),Bk(e,n)}i(ZF,"bk");var Hk;Hk=i(function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mi.current)Ai=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ai=!1,zF(e,t,n);Ai=!!(e.flags&131072)}else Ai=!1,fr&&t.flags&1048576&&$T(t,Vv,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Nv(e,t),e=t.pendingProps;var c=Hp(t,Qn.current);Ip(t,n),c=OS(null,t,s,e,c,n);var h=AS();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Li(s)?(h=!0,Uv(t)):h=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ES(t),c.updater=uy,t.stateNode=c,c._reactInternals=t,z1(t,s,e,n),t=$1(null,t,s,!0,h,n)):(t.tag=0,fr&&h&&vS(t),fi(null,t,c,n),t=t.child),t;case 16:s=t.elementType;e:{switch(Nv(e,t),e=t.pendingProps,c=s._init,s=c(s._payload),t.type=s,c=t.tag=t3(s),e=fs(s,e),c){case 0:t=U1(null,t,s,e,n);break e;case 1:t=Rb(null,t,s,e,n);break e;case 11:t=Lb(null,t,s,e,n);break e;case 14:t=Pb(null,t,s,fs(s.type,e),n);break e}throw Error(ge(306,s,""))}return t;case 0:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:fs(s,c),U1(e,t,s,c,n);case 1:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:fs(s,c),Rb(e,t,s,c,n);case 3:e:{if(_k(t),e===null)throw Error(ge(387));s=t.pendingProps,h=t.memoizedState,c=h.element,YT(e,t),Gv(t,s,null,n);var p=t.memoizedState;if(s=p.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){c=$p(Error(ge(423)),t),t=Db(e,t,s,n,c);break e}else if(s!==c){c=$p(Error(ge(424)),t),t=Db(e,t,s,n,c);break e}else for(so=vu(t.stateNode.containerInfo.firstChild),lo=t,fr=!0,ds=null,n=GT(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zp(),s===c){t=Xl(e,t,n);break e}fi(e,t,s,n)}t=t.child}return t;case 5:return XT(t),e===null&&F1(t),s=t.type,c=t.pendingProps,h=e!==null?e.memoizedProps:null,p=c.children,L1(s,c)?p=null:h!==null&&L1(s,h)&&(t.flags|=32),xk(e,t),fi(e,t,p,n),t.child;case 6:return e===null&&F1(t),null;case 13:return Ck(e,t,n);case 4:return bS(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Wp(t,null,s,n):fi(e,t,s,n),t.child;case 11:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:fs(s,c),Lb(e,t,s,c,n);case 7:return fi(e,t,t.pendingProps,n),t.child;case 8:return fi(e,t,t.pendingProps.children,n),t.child;case 12:return fi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,c=t.pendingProps,h=t.memoizedProps,p=c.value,Zt(qv,s._currentValue),s._currentValue=p,h!==null)if(ms(h.value,p)){if(h.children===c.children&&!Mi.current){t=Xl(e,t,n);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var v=h.dependencies;if(v!==null){p=h.child;for(var S=v.firstContext;S!==null;){if(S.context===s){if(h.tag===1){S=jl(-1,n&-n),S.tag=2;var b=h.updateQueue;if(b!==null){b=b.shared;var k=b.pending;k===null?S.next=S:(S.next=k.next,k.next=S),b.pending=S}}h.lanes|=n,S=h.alternate,S!==null&&(S.lanes|=n),B1(h.return,n,t),v.lanes|=n;break}S=S.next}}else if(h.tag===10)p=h.type===t.type?null:h.child;else if(h.tag===18){if(p=h.return,p===null)throw Error(ge(341));p.lanes|=n,v=p.alternate,v!==null&&(v.lanes|=n),B1(p,n,t),p=h.sibling}else p=h.child;if(p!==null)p.return=h;else for(p=h;p!==null;){if(p===t){p=null;break}if(h=p.sibling,h!==null){h.return=p.return,p=h;break}p=p.return}h=p}fi(e,t,c.children,n),t=t.child}return t;case 9:return c=t.type,s=t.pendingProps.children,Ip(t,n),c=Wo(c),s=s(c),t.flags|=1,fi(e,t,s,n),t.child;case 14:return s=t.type,c=fs(s,t.pendingProps),c=fs(s.type,c),Pb(e,t,s,c,n);case 15:return wk(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:fs(s,c),Nv(e,t),t.tag=1,Li(s)?(e=!0,Uv(t)):e=!1,Ip(t,n),mk(t,s,c),z1(t,s,c,n),$1(null,t,s,!0,e,n);case 19:return Ek(e,t,n);case 22:return Sk(e,t,n)}throw Error(ge(156,t.tag))},"Vk");function zk(e,t){return dT(e,t)}i(zk,"Fk");function e3(e,t,n,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}i(e3,"$k");function Ho(e,t,n,s){return new e3(e,t,n,s)}i(Ho,"Bg");function zS(e){return e=e.prototype,!(!e||!e.isReactComponent)}i(zS,"aj");function t3(e){if(typeof e=="function")return zS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oS)return 11;if(e===sS)return 14}return 2}i(t3,"Zk");function xu(e,t){var n=e.alternate;return n===null?(n=Ho(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}i(xu,"Pg");function Mv(e,t,n,s,c,h){var p=2;if(s=e,typeof e=="function")zS(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case xp:return jc(n.children,c,h,t);case iS:p=8,c|=8;break;case c1:return e=Ho(12,n,t,c|2),e.elementType=c1,e.lanes=h,e;case f1:return e=Ho(13,n,t,c),e.elementType=f1,e.lanes=h,e;case p1:return e=Ho(19,n,t,c),e.elementType=p1,e.lanes=h,e;case Xb:return py(n,c,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kb:p=10;break e;case Yb:p=9;break e;case oS:p=11;break e;case sS:p=14;break e;case au:p=16,s=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=Ho(p,n,t,c),t.elementType=e,t.type=s,t.lanes=h,t}i(Mv,"Rg");function jc(e,t,n,s){return e=Ho(7,e,s,t),e.lanes=n,e}i(jc,"Tg");function py(e,t,n,s){return e=Ho(22,e,s,t),e.elementType=Xb,e.lanes=n,e.stateNode={isHidden:!1},e}i(py,"pj");function l1(e,t,n){return e=Ho(6,e,null,t),e.lanes=n,e}i(l1,"Qg");function a1(e,t,n){return t=Ho(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}i(a1,"Sg");function r3(e,t,n,s,c){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=qw(0),this.expirationTimes=qw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qw(0),this.identifierPrefix=s,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}i(r3,"al");function WS(e,t,n,s,c,h,p,v,S){return e=new r3(e,t,n,v,S),t===1?(t=1,h===!0&&(t|=8)):t=0,h=Ho(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ES(h),e}i(WS,"bl");function n3(e,t,n){var s=3{"use strict";function qk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qk)}catch(e){console.error(e)}}i(qk,"checkDCE");qk(),jk.exports=Vk()});var Kk=rt(jS=>{"use strict";var Gk=qS();jS.createRoot=Gk.createRoot,jS.hydrateRoot=Gk.hydrateRoot;var PW});var Xk=rt(Yk=>{"use strict";var ag=Ne();function a3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(a3,"n");var u3=typeof Object.is=="function"?Object.is:a3,c3=ag.useSyncExternalStore,f3=ag.useRef,p3=ag.useEffect,d3=ag.useMemo,h3=ag.useDebugValue;Yk.useSyncExternalStoreWithSelector=function(e,t,n,s,c){var h=f3(null);if(h.current===null){var p={hasValue:!1,value:null};h.current=p}else p=h.current;h=d3(function(){function S(z){if(!b){if(b=!0,k=z,z=s(z),c!==void 0&&p.hasValue){var q=p.value;if(c(q,z))return D=q}return D=z}if(q=D,u3(k,z))return q;var Q=s(z);return c!==void 0&&c(q,Q)?q:(k=z,D=Q)}i(S,"a");var b=!1,k,D,M=n===void 0?null:n;return[function(){return S(t())},M===null?void 0:function(){return S(M())}]},[t,n,s,c]);var v=c3(e,h[0],h[1]);return p3(function(){p.hasValue=!0,p.value=v},[v]),h3(v),v}});var Jk=rt((FW,Qk)=>{"use strict";Qk.exports=Xk()});var cg=rt((Gp,ug)=>{(function(){var e,t="4.17.21",n=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",h="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",v=500,S="__lodash_placeholder__",b=1,k=2,D=4,M=1,z=2,q=1,Q=2,ie=4,I=8,L=16,B=32,G=64,re=128,Z=256,oe=512,de=30,Re="...",Ce=800,Ye=16,tt=1,Se=2,Xe=3,qe=1/0,Qe=9007199254740991,ot=17976931348623157e292,Pt=NaN,Tt=4294967295,rn=Tt-1,nn=Tt>>>1,dr=[["ary",re],["bind",q],["bindKey",Q],["curry",I],["curryRight",L],["flip",oe],["partial",B],["partialRight",G],["rearg",Z]],Ht="[object Arguments]",hr="[object Array]",gr="[object AsyncFunction]",qt="[object Boolean]",Rt="[object Date]",se="[object DOMException]",ze="[object Error]",$r="[object Function]",Xt="[object GeneratorFunction]",st="[object Map]",Fe="[object Number]",Mn="[object Null]",yn="[object Object]",Fi="[object Promise]",wo="[object Proxy]",at="[object RegExp]",mr="[object Set]",ar="[object String]",dt="[object Symbol]",Bi="[object Undefined]",Ln="[object WeakMap]",mi="[object WeakSet]",Vr="[object ArrayBuffer]",qr="[object DataView]",Hi="[object Float32Array]",ti="[object Float64Array]",Pn="[object Int8Array]",zi="[object Int16Array]",ca="[object Int32Array]",Y="[object Uint8Array]",ee="[object Uint8ClampedArray]",xe="[object Uint16Array]",Le="[object Uint32Array]",fa=/\b__p \+= '';/g,He=/\b(__p \+=) '' \+/g,jr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jt=/&(?:amp|lt|gt|quot|#39);/g,Ot=/[&<>"']/g,kt=RegExp(jt.source),cl=RegExp(Ot.source),on=/<%-([\s\S]+?)%>/g,Rn=/<%([\s\S]+?)%>/g,Er=/<%=([\s\S]+?)%>/g,Yo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/,fl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pl=/[\\^$.*+?()[\]{}|]/g,$u=RegExp(pl.source),Vu=/^\s+/,qu=/\s/,Af=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ju=/\{\n\/\* \[wrapped with (.+)\] \*/,_d=/,? & /,pa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Cd=/[()=,{}\[\]\/\s]/,Ed=/\\(\\)?/g,da=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mf=/\w*$/,Gu=/^[-+]0x[0-9a-f]+$/i,Xo=/^0b[01]+$/i,bd=/^\[object .+?Constructor\]$/,Td=/^0o[0-7]+$/i,dl=/^(?:0|[1-9]\d*)$/,Ku=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wi=/($^)/,Lf=/['\n\r\u2028\u2029\\]/g,vi="\\ud800-\\udfff",Yu="\\u0300-\\u036f",Xu="\\ufe20-\\ufe2f",rr="\\u20d0-\\u20ff",Ae=Yu+Xu+rr,Ui="\\u2700-\\u27bf",ha="a-z\\xdf-\\xf6\\xf8-\\xff",yi="\\xac\\xb1\\xd7\\xf7",mt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Qo="\\u2000-\\u206f",hl=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gl="A-Z\\xc0-\\xd6\\xd8-\\xde",ce="\\ufe0e\\ufe0f",$e=yi+mt+Qo+hl,Ts="['\u2019]",Qu="["+vi+"]",ks="["+$e+"]",So="["+Ae+"]",Ju="\\d+",Ve="["+Ui+"]",Pf="["+ha+"]",ga="[^"+vi+$e+Ju+Ui+ha+gl+"]",Jo="\\ud83c[\\udffb-\\udfff]",ri="(?:"+So+"|"+Jo+")",ma="[^"+vi+"]",va="(?:\\ud83c[\\udde6-\\uddff]){2}",Zo="[\\ud800-\\udbff][\\udc00-\\udfff]",$i="["+gl+"]",ya="\\u200d",Ns="(?:"+Pf+"|"+ga+")",Zu="(?:"+$i+"|"+ga+")",wa="(?:"+Ts+"(?:d|ll|m|re|s|t|ve))?",ec="(?:"+Ts+"(?:D|LL|M|RE|S|T|VE))?",tc=ri+"?",Sa="["+ce+"]?",ml="(?:"+ya+"(?:"+[ma,va,Zo].join("|")+")"+Sa+tc+")*",rc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rf=Sa+tc+ml,kd="(?:"+[Ve,va,Zo].join("|")+")"+Rf,xa="(?:"+[ma+So+"?",So,va,Zo,Qu].join("|")+")",vl=RegExp(Ts,"g"),Nd=RegExp(So,"g"),nc=RegExp(Jo+"(?="+Jo+")|"+xa+Rf,"g"),Od=RegExp([$i+"?"+Pf+"+"+wa+"(?="+[ks,$i,"$"].join("|")+")",Zu+"+"+ec+"(?="+[ks,$i+Ns,"$"].join("|")+")",$i+"?"+Ns+"+"+wa,$i+"+"+ec,wi,rc,Ju,kd].join("|"),"g"),Ad=RegExp("["+ya+vi+Ae+ce+"]"),ic=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Df=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Md=-1,Dt={};Dt[Hi]=Dt[ti]=Dt[Pn]=Dt[zi]=Dt[ca]=Dt[Y]=Dt[ee]=Dt[xe]=Dt[Le]=!0,Dt[Ht]=Dt[hr]=Dt[Vr]=Dt[qt]=Dt[qr]=Dt[Rt]=Dt[ze]=Dt[$r]=Dt[st]=Dt[Fe]=Dt[yn]=Dt[at]=Dt[mr]=Dt[ar]=Dt[Ln]=!1;var At={};At[Ht]=At[hr]=At[Vr]=At[qr]=At[qt]=At[Rt]=At[Hi]=At[ti]=At[Pn]=At[zi]=At[ca]=At[st]=At[Fe]=At[yn]=At[at]=At[mr]=At[ar]=At[dt]=At[Y]=At[ee]=At[xe]=At[Le]=!0,At[ze]=At[$r]=At[Ln]=!1;var P={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},De={"&":"&","<":"<",">":">",'"':""","'":"'"},Os={"&":"&","<":"<",">":">",""":'"',"'":"'"},ni={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_a=parseFloat,me=parseInt,yl=typeof global=="object"&&global&&global.Object===Object&&global,Ld=typeof self=="object"&&self&&self.Object===Object&&self,Mt=yl||Ld||Function("return this")(),If=typeof Gp=="object"&&Gp&&!Gp.nodeType&&Gp,As=If&&typeof ug=="object"&&ug&&!ug.nodeType&&ug,wl=As&&As.exports===If,xo=wl&&yl.process,we=function(){try{var K=As&&As.require&&As.require("util").types;return K||xo&&xo.binding&&xo.binding("util")}catch{}}(),Ms=we&&we.isArrayBuffer,ii=we&&we.isDate,Ze=we&&we.isMap,Ca=we&&we.isRegExp,sn=we&&we.isSet,Ea=we&&we.isTypedArray;function Gr(K,ne,J){switch(J.length){case 0:return K.call(ne);case 1:return K.call(ne,J[0]);case 2:return K.call(ne,J[0],J[1]);case 3:return K.call(ne,J[0],J[1],J[2])}return K.apply(ne,J)}i(Gr,"apply");function ba(K,ne,J,Oe){for(var Je=-1,vt=K==null?0:K.length;++Je-1}i(Sl,"arrayIncludes");function Ta(K,ne,J){for(var Oe=-1,Je=K==null?0:K.length;++Oe-1;);return J}i(oi,"charsStartIndex");function Ds(K,ne){for(var J=K.length;J--&&Vt(ne,K[J],0)>-1;);return J}i(Ds,"charsEndIndex");function Aa(K,ne){for(var J=K.length,Oe=0;J--;)K[J]===ne&&++Oe;return Oe}i(Aa,"countHolders");var pc=xl(P),xi=xl(De);function Co(K){return"\\"+ni[K]}i(Co,"escapeStringChar");function Ma(K,ne){return K==null?e:K[ne]}i(Ma,"getValue");function es(K){return Ad.test(K)}i(es,"hasUnicode");function Uf(K){return ic.test(K)}i(Uf,"hasUnicodeWord");function Dd(K){for(var ne,J=[];!(ne=K.next()).done;)J.push(ne.value);return J}i(Dd,"iteratorToArray");function La(K){var ne=-1,J=Array(K.size);return K.forEach(function(Oe,Je){J[++ne]=[Je,Oe]}),J}i(La,"mapToArray");function Pa(K,ne){return function(J){return K(ne(J))}}i(Pa,"overArg");function Sn(K,ne){for(var J=-1,Oe=K.length,Je=0,vt=[];++J-1}i(im,"listCacheHas");function om(l,f){var g=this.__data__,x=za(g,l);return x<0?(++this.size,g.push([l,f])):g[x][1]=f,this}i(om,"listCacheSet"),Xi.prototype.clear=G0,Xi.prototype.delete=Vd,Xi.prototype.get=qd,Xi.prototype.has=im,Xi.prototype.set=om;function Qi(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f=f?l:f)),l}i(os,"baseClamp");function si(l,f,g,x,T,A){var H,$=f&b,X=f&k,ae=f&D;if(g&&(H=T?g(l,x,T,A):g(l)),H!==e)return H;if(!Sr(l))return l;var ue=lt(l);if(ue){if(H=fw(l),!$)return jn(l,H)}else{var fe=Fr(l),ke=fe==$r||fe==Xt;if(ou(l))return oh(l,$);if(fe==yn||fe==Ht||ke&&!T){if(H=X||ke?{}:Hm(l),!$)return X?sw(l,um(H,l)):Om(l,Kd(H,l))}else{if(!At[fe])return T?l:{};H=hp(l,fe,$)}}A||(A=new nr);var Be=A.get(l);if(Be)return Be;A.set(l,H),eE(l)?l.forEach(function(Ge){H.add(si(Ge,f,g,Ge,l,A))}):JC(l)&&l.forEach(function(Ge,ht){H.set(ht,si(Ge,f,g,ht,l,A))});var je=ae?X?dp:pp:X?ki:En,pt=ue?e:je(l);return qn(pt||l,function(Ge,ht){pt&&(ht=Ge,Ge=l[ht]),Ha(H,ht,si(Ge,f,g,ht,l,A))}),H}i(si,"baseClone");function Q0(l){var f=En(l);return function(g){return Yd(g,l,f)}}i(Q0,"baseConforms");function Yd(l,f,g){var x=g.length;if(l==null)return!x;for(l=It(l);x--;){var T=g[x],A=f[T],H=l[T];if(H===e&&!(T in l)||!A(H))return!1}return!0}i(Yd,"baseConformsTo");function cm(l,f,g){if(typeof l!="function")throw new _i(c);return Ie(function(){l.apply(e,g)},f)}i(cm,"baseDelay");function xc(l,f,g,x){var T=-1,A=Sl,H=!0,$=l.length,X=[],ae=f.length;if(!$)return X;g&&(f=zt(f,ln(g))),x?(A=Ta,H=!1):f.length>=n&&(A=Vi,H=!1,f=new Hs(f));e:for(;++T<$;){var ue=l[T],fe=g==null?ue:g(ue);if(ue=x||ue!==0?ue:0,H&&fe===fe){for(var ke=ae;ke--;)if(f[ke]===fe)continue e;X.push(ue)}else A(f,fe,x)||X.push(ue)}return X}i(xc,"baseDifference");var Zi=Za(Ei),Xd=Za(ep,!0);function J0(l,f){var g=!0;return Zi(l,function(x,T,A){return g=!!f(x,T,A),g}),g}i(J0,"baseEvery");function Zf(l,f,g){for(var x=-1,T=l.length;++xT?0:T+g),x=x===e||x>T?T:ct(x),x<0&&(x+=T),x=g>x?0:rE(x);g0&&g($)?f>1?Dr($,f-1,g,x,T):Si(T,$):x||(T[T.length]=$)}return T}i(Dr,"baseFlatten");var Ua=Am(),Qd=Am(!0);function Ei(l,f){return l&&Ua(l,f,En)}i(Ei,"baseForOwn");function ep(l,f){return l&&Qd(l,f,En)}i(ep,"baseForOwnRight");function tp(l,f){return $t(f,function(g){return Hl(l[g])})}i(tp,"baseFunctions");function $s(l,f){f=js(f,l);for(var g=0,x=f.length;l!=null&&gf}i(rp,"baseGt");function pm(l,f){return l!=null&&Ct.call(l,f)}i(pm,"baseHas");function dm(l,f){return l!=null&&f in It(l)}i(dm,"baseHasIn");function $a(l,f,g){return l>=Tr(f,g)&&l=120&&ue.length>=120)?new Hs(H&&ue):e}ue=l[0];var fe=-1,ke=$[0];e:for(;++fe-1;)$!==l&&El.call($,X,1),El.call(l,X,1);return l}i(rh,"basePullAll");function xn(l,f){for(var g=l?f.length:0,x=g-1;g--;){var T=f[g];if(g==x||T!==A){var A=T;u(T)?El.call(l,T,1):ip(l,T)}}return l}i(xn,"basePullAt");function np(l,f){return l+Tl(Ud()*(f-l+1))}i(np,"baseRandom");function ew(l,f,g,x){for(var T=-1,A=Qt(gc((f-l)/(g||1)),0),H=J(A);A--;)H[x?A:++T]=l,l+=g;return H}i(ew,"baseRange");function nh(l,f){var g="";if(!l||f<1||f>Qe)return g;do f%2&&(g+=l),f=Tl(f/2),f&&(l+=l);while(f);return g}i(nh,"baseRepeat");function ut(l,f){return Pe(pe(l,f,Ni),l+"")}i(ut,"baseRest");function Em(l){return jd(mp(l))}i(Em,"baseSample");function bm(l,f){var g=mp(l);return cr(g,os(f,0,g.length))}i(bm,"baseSampleSize");function Xa(l,f,g,x){if(!Sr(l))return l;f=js(f,l);for(var T=-1,A=f.length,H=A-1,$=l;$!=null&&++TT?0:T+f),g=g>T?T:g,g<0&&(g+=T),T=f>g?0:g-f>>>0,f>>>=0;for(var A=J(T);++x>>1,H=l[A];H!==null&&!ro(H)&&(g?H<=f:H=n){var ae=f?null:aw(l);if(ae)return w(ae);H=!1,T=Vi,X=new Hs}else X=f?[]:$;e:for(;++x=x?l:Ir(l,f,g)}i(ss,"castSlice");var Nm=Bd||function(l){return Mt.clearTimeout(l)};function oh(l,f){if(f)return l.slice();var g=l.length,x=Id?Id(g):new l.constructor(g);return l.copy(x),x}i(oh,"cloneBuffer");function Qa(l){var f=new l.constructor(l.byteLength);return new qf(f).set(new qf(l)),f}i(Qa,"cloneArrayBuffer");function nw(l,f){var g=f?Qa(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}i(nw,"cloneDataView");function iw(l){var f=new l.constructor(l.source,Mf.exec(l));return f.lastIndex=l.lastIndex,f}i(iw,"cloneRegExp");function Ac(l){return yc?It(yc.call(l)):{}}i(Ac,"cloneSymbol");function sh(l,f){var g=f?Qa(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}i(sh,"cloneTypedArray");function lh(l,f){if(l!==f){var g=l!==e,x=l===null,T=l===l,A=ro(l),H=f!==e,$=f===null,X=f===f,ae=ro(f);if(!$&&!ae&&!A&&l>f||A&&H&&X&&!$&&!ae||x&&H&&X||!g&&X||!T)return 1;if(!x&&!A&&!ae&&l=$)return X;var ae=g[x];return X*(ae=="desc"?-1:1)}}return l.index-f.index}i(ow,"compareMultiple");function sp(l,f,g,x){for(var T=-1,A=l.length,H=g.length,$=-1,X=f.length,ae=Qt(A-H,0),ue=J(X+ae),fe=!x;++$1?g[T-1]:e,H=T>2?g[2]:e;for(A=l.length>3&&typeof A=="function"?(T--,A):e,H&&a(g[0],g[1],H)&&(A=T<3?e:A,T=1),f=It(f);++x-1?T[A?f[H]:H]:e}}i(uh,"createFind");function Pm(l){return Mo(function(f){var g=f.length,x=g,T=Nt.prototype.thru;for(l&&f.reverse();x--;){var A=f[x];if(typeof A!="function")throw new _i(c);if(T&&!H&&Ic(A)=="wrapper")var H=new Nt([],!0)}for(x=H?x:g;++x1&&wt.reverse(),ue&&X$))return!1;var ae=A.get(l),ue=A.get(f);if(ae&&ue)return ae==f&&ue==l;var fe=-1,ke=!0,Be=g&z?new Hs:e;for(A.set(l,f),A.set(f,l);++fe<$;){var je=l[fe],pt=f[fe];if(x)var Ge=H?x(pt,je,fe,f,l,A):x(je,pt,fe,l,f,A);if(Ge!==e){if(Ge)continue;ke=!1;break}if(Be){if(!Ls(f,function(ht,wt){if(!Vi(Be,wt)&&(je===ht||T(je,ht,g,x,A)))return Be.push(wt)})){ke=!1;break}}else if(!(je===pt||T(je,pt,g,x,A))){ke=!1;break}}return A.delete(l),A.delete(f),ke}i(bi,"equalArrays");function fp(l,f,g,x,T,A,H){switch(g){case qr:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case Vr:return!(l.byteLength!=f.byteLength||!A(new qf(l),new qf(f)));case qt:case Rt:case Fe:return ls(+l,+f);case ze:return l.name==f.name&&l.message==f.message;case at:case ar:return l==f+"";case st:var $=La;case mr:var X=x&M;if($||($=w),l.size!=f.size&&!X)return!1;var ae=H.get(l);if(ae)return ae==f;x|=z,H.set(l,f);var ue=bi($(l),$(f),x,T,A,H);return H.delete(l),ue;case dt:if(yc)return yc.call(l)==yc.call(f)}return!1}i(fp,"equalByTag");function ph(l,f,g,x,T,A){var H=g&M,$=pp(l),X=$.length,ae=pp(f),ue=ae.length;if(X!=ue&&!H)return!1;for(var fe=X;fe--;){var ke=$[fe];if(!(H?ke in f:Ct.call(f,ke)))return!1}var Be=A.get(l),je=A.get(f);if(Be&&je)return Be==f&&je==l;var pt=!0;A.set(l,f),A.set(f,l);for(var Ge=H;++fe1?"& ":"")+f[x],f=f.join(g>2?", ":" "),l.replace(Af,`{ +`+h.stack}return{value:e,source:t,stack:l,digest:null}}i(rp,"Ji");function M1(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}i(M1,"Ki");function hS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}i(hS,"Li");var N3=typeof WeakMap=="function"?WeakMap:Map;function _N(e,t,n){n=cl(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){hy||(hy=!0,ES=s),hS(e,t)},n}i(_N,"Ni");function EN(e,t,n){n=cl(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var l=t.value;n.payload=function(){return s(l)},n.callback=function(){hS(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(n.callback=function(){hS(e,t),typeof s!="function"&&(Ru===null?Ru=new Set([this]):Ru.add(this));var d=t.stack;this.componentDidCatch(t.value,{componentStack:d!==null?d:""})}),n}i(EN,"Qi");function DT(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new N3;var l=new Set;s.set(t,l)}else l=s.get(t),l===void 0&&(l=new Set,s.set(t,l));l.has(n)||(l.add(n),e=W3.bind(null,e,t,n),t.then(e,e))}i(DT,"Si");function IT(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}i(IT,"Ui");function FT(e,t,n,s,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=cl(-1,1),t.tag=2,Ou(n,t,1))),n.lanes|=1),e)}i(FT,"Vi");var A3=ml.ReactCurrentOwner,ji=!1;function Ei(e,t,n,s){t.child=e===null?Zk(t,null,n,s):ep(t,e.child,n,s)}i(Ei,"Xi");function BT(e,t,n,s,l){n=n.render;var h=t.ref;return Yd(t,l),s=rx(e,t,n,s,h,l),n=nx(),e!==null&&!ji?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,hl(e,t,l)):(hr&&n&&VS(t),t.flags|=1,Ei(e,t,s,l),t.child)}i(BT,"Yi");function HT(e,t,n,s,l){if(e===null){var h=n.type;return typeof h=="function"&&!px(h)&&h.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=h,bN(e,t,h,s,l)):(e=Kv(n.type,null,s,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&l)){var d=h.memoizedProps;if(n=n.compare,n=n!==null?n:um,n(d,s)&&e.ref===t.ref)return hl(e,t,l)}return t.flags|=1,e=Iu(h,s),e.ref=t.ref,e.return=t,t.child=e}i(HT,"$i");function bN(e,t,n,s,l){if(e!==null){var h=e.memoizedProps;if(um(h,s)&&e.ref===t.ref)if(ji=!1,t.pendingProps=s=h,(e.lanes&l)!==0)e.flags&131072&&(ji=!0);else return t.lanes=e.lanes,hl(e,t,l)}return mS(e,t,n,s,l)}i(bN,"bj");function TN(e,t,n){var s=t.pendingProps,l=s.children,h=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},rr(Vd,To),To|=n;else{if(!(n&1073741824))return e=h!==null?h.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,rr(Vd,To),To|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=h!==null?h.baseLanes:n,rr(Vd,To),To|=s}else h!==null?(s=h.baseLanes|n,t.memoizedState=null):s=n,rr(Vd,To),To|=s;return Ei(e,t,l,n),t.child}i(TN,"dj");function kN(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}i(kN,"gj");function mS(e,t,n,s,l){var h=Gi(n)?lf:oi.current;return h=Jd(t,h),Yd(t,l),n=rx(e,t,n,s,h,l),s=nx(),e!==null&&!ji?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,hl(e,t,l)):(hr&&s&&VS(t),t.flags|=1,Ei(e,t,n,l),t.child)}i(mS,"cj");function zT(e,t,n,s,l){if(Gi(n)){var h=!0;iy(t)}else h=!1;if(Yd(t,l),t.stateNode===null)Vv(e,t),CN(t,n,s),pS(t,n,s,l),s=!0;else if(e===null){var d=t.stateNode,v=t.memoizedProps;d.props=v;var S=d.context,b=n.contextType;typeof b=="object"&&b!==null?b=as(b):(b=Gi(n)?lf:oi.current,b=Jd(t,b));var k=n.getDerivedStateFromProps,R=typeof k=="function"||typeof d.getSnapshotBeforeUpdate=="function";R||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==s||S!==b)&&RT(t,d,s,b),Eu=!1;var I=t.memoizedState;d.state=I,uy(t,s,d,l),S=t.memoizedState,v!==s||I!==S||Ki.current||Eu?(typeof k=="function"&&(dS(t,n,k,s),S=t.memoizedState),(v=Eu||OT(t,n,v,s,I,S,b))?(R||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=S),d.props=s,d.state=S,d.context=b,s=v):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{d=t.stateNode,tN(e,t),v=t.memoizedProps,b=t.type===t.elementType?v:Ms(t.type,v),d.props=b,R=t.pendingProps,I=d.context,S=n.contextType,typeof S=="object"&&S!==null?S=as(S):(S=Gi(n)?lf:oi.current,S=Jd(t,S));var z=n.getDerivedStateFromProps;(k=typeof z=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==R||I!==S)&&RT(t,d,s,S),Eu=!1,I=t.memoizedState,d.state=I,uy(t,s,d,l);var q=t.memoizedState;v!==R||I!==q||Ki.current||Eu?(typeof z=="function"&&(dS(t,n,z,s),q=t.memoizedState),(b=Eu||OT(t,n,b,s,I,q,S)||!1)?(k||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,q,S),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,q,S)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=q),d.props=s,d.state=q,d.context=S,s=b):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),s=!1)}return gS(e,t,n,s,h,l)}i(zT,"hj");function gS(e,t,n,s,l,h){kN(e,t);var d=(t.flags&128)!==0;if(!s&&!d)return l&&bT(t,n,!1),hl(e,t,h);s=t.stateNode,A3.current=t;var v=d&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&d?(t.child=ep(t,e.child,null,h),t.child=ep(t,null,v,h)):Ei(e,t,v,h),t.memoizedState=s.state,l&&bT(t,n,!0),t.child}i(gS,"jj");function NN(e){var t=e.stateNode;t.pendingContext?ET(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ET(e,t.context,!1),JS(e,t.containerInfo)}i(NN,"kj");function UT(e,t,n,s,l){return Zd(),jS(l),t.flags|=256,Ei(e,t,n,s),t.child}i(UT,"lj");var vS={dehydrated:null,treeContext:null,retryLane:0};function yS(e){return{baseLanes:e,cachePool:null,transitions:null}}i(yS,"nj");function AN(e,t,n){var s=t.pendingProps,l=Er.current,h=!1,d=(t.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(l&2)!==0),v?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),rr(Er,l&1),e===null)return cS(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):(d=s.children,e=s.fallback,h?(s=t.mode,h=t.child,d={mode:"hidden",children:d},!(s&1)&&h!==null?(h.childLanes=0,h.pendingProps=d):h=Ny(d,s,0,null),e=af(e,s,n,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=yS(n),t.memoizedState=vS,e):sx(t,d));if(l=e.memoizedState,l!==null&&(v=l.dehydrated,v!==null))return P3(e,t,d,s,v,l,n);if(h){h=s.fallback,d=t.mode,l=e.child,v=l.sibling;var S={mode:"hidden",children:s.children};return!(d&1)&&t.child!==l?(s=t.child,s.childLanes=0,s.pendingProps=S,t.deletions=null):(s=Iu(l,S),s.subtreeFlags=l.subtreeFlags&14680064),v!==null?h=Iu(v,h):(h=af(h,d,n,null),h.flags|=2),h.return=t,s.return=t,s.sibling=h,t.child=s,s=h,h=t.child,d=e.child.memoizedState,d=d===null?yS(n):{baseLanes:d.baseLanes|n,cachePool:null,transitions:d.transitions},h.memoizedState=d,h.childLanes=e.childLanes&~n,t.memoizedState=vS,s}return h=e.child,e=h.sibling,s=Iu(h,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}i(AN,"oj");function sx(e,t){return t=Ny({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}i(sx,"qj");function Dv(e,t,n,s){return s!==null&&jS(s),ep(t,e.child,null,n),e=sx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}i(Dv,"sj");function P3(e,t,n,s,l,h,d){if(n)return t.flags&256?(t.flags&=-257,s=M1(Error(ge(422))),Dv(e,t,d,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=s.fallback,l=t.mode,s=Ny({mode:"visible",children:s.children},l,0,null),h=af(h,l,d,null),h.flags|=2,s.return=t,h.return=t,s.sibling=h,t.child=s,t.mode&1&&ep(t,e.child,null,d),t.child.memoizedState=yS(d),t.memoizedState=vS,h);if(!(t.mode&1))return Dv(e,t,d,null);if(l.data==="$!"){if(s=l.nextSibling&&l.nextSibling.dataset,s)var v=s.dgst;return s=v,h=Error(ge(419)),s=M1(h,s,void 0),Dv(e,t,d,s)}if(v=(d&e.childLanes)!==0,ji||v){if(s=Mn,s!==null){switch(d&-d){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(s.suspendedLanes|d)?0:l,l!==0&&l!==h.retryLane&&(h.retryLane=l,pl(e,l),Is(s,e,l,-1))}return dx(),s=M1(Error(ge(421))),Dv(e,t,d,s)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=$3.bind(null,e),l._reactRetry=t,null):(e=h.treeContext,ko=Mu(l.nextSibling),No=t,hr=!0,Rs=null,e!==null&&(ns[is++]=ll,ns[is++]=ul,ns[is++]=uf,ll=e.id,ul=e.overflow,uf=t),t=sx(t,s.children),t.flags|=4096,t)}i(P3,"rj");function WT(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),fS(e.return,t,n)}i(WT,"vj");function O1(e,t,n,s,l){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:l}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=n,h.tailMode=l)}i(O1,"wj");function PN(e,t,n){var s=t.pendingProps,l=s.revealOrder,h=s.tail;if(Ei(e,t,s.children,n),s=Er.current,s&2)s=s&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&&WT(e,n,t);else if(e.tag===19)WT(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}s&=1}if(rr(Er,s),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&cy(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),O1(t,!1,l,n,h);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&cy(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}O1(t,!0,n,null,h);break;case"together":O1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}i(PN,"xj");function Vv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}i(Vv,"ij");function hl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ff|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ge(153));if(t.child!==null){for(e=t.child,n=Iu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Iu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}i(hl,"Zi");function L3(e,t,n){switch(t.tag){case 3:NN(t),Zd();break;case 5:rN(t);break;case 1:Gi(t.type)&&iy(t);break;case 4:JS(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,l=t.memoizedProps.value;rr(ay,s._currentValue),s._currentValue=l;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(rr(Er,Er.current&1),t.flags|=128,null):n&t.child.childLanes?AN(e,t,n):(rr(Er,Er.current&1),e=hl(e,t,n),e!==null?e.sibling:null);rr(Er,Er.current&1);break;case 19:if(s=(n&t.childLanes)!==0,e.flags&128){if(s)return PN(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),rr(Er,Er.current),s)break;return null;case 22:case 23:return t.lanes=0,TN(e,t,n)}return hl(e,t,n)}i(L3,"yj");var LN,wS,MN,ON;LN=i(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}},"zj");wS=i(function(){},"Aj");MN=i(function(e,t,n,s){var l=e.memoizedProps;if(l!==s){e=t.stateNode,of(Ca.current);var h=null;switch(n){case"input":l=U1(e,l),s=U1(e,s),h=[];break;case"select":l=Tr({},l,{value:void 0}),s=Tr({},s,{value:void 0}),h=[];break;case"textarea":l=V1(e,l),s=V1(e,s),h=[];break;default:typeof l.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=ry)}j1(n,s);var d;n=null;for(b in l)if(!s.hasOwnProperty(b)&&l.hasOwnProperty(b)&&l[b]!=null)if(b==="style"){var v=l[b];for(d in v)v.hasOwnProperty(d)&&(n||(n={}),n[d]="")}else b!=="dangerouslySetInnerHTML"&&b!=="children"&&b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(rm.hasOwnProperty(b)?h||(h=[]):(h=h||[]).push(b,null));for(b in s){var S=s[b];if(v=l?.[b],s.hasOwnProperty(b)&&S!==v&&(S!=null||v!=null))if(b==="style")if(v){for(d in v)!v.hasOwnProperty(d)||S&&S.hasOwnProperty(d)||(n||(n={}),n[d]="");for(d in S)S.hasOwnProperty(d)&&v[d]!==S[d]&&(n||(n={}),n[d]=S[d])}else n||(h||(h=[]),h.push(b,n)),n=S;else b==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,v=v?v.__html:void 0,S!=null&&v!==S&&(h=h||[]).push(b,S)):b==="children"?typeof S!="string"&&typeof S!="number"||(h=h||[]).push(b,""+S):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&(rm.hasOwnProperty(b)?(S!=null&&b==="onScroll"&&ur("scroll",e),h||v===S||(h=[])):(h=h||[]).push(b,S))}n&&(h=h||[]).push("style",n);var b=h;(t.updateQueue=b)&&(t.flags|=4)}},"Bj");ON=i(function(e,t,n,s){n!==s&&(t.flags|=4)},"Cj");function zh(e,t){if(!hr)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 s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}i(zh,"Dj");function ni(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,s|=l.subtreeFlags&14680064,s|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}i(ni,"S");function M3(e,t,n){var s=t.pendingProps;switch(qS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ni(t),null;case 1:return Gi(t.type)&&ny(),ni(t),null;case 3:return s=t.stateNode,tp(),cr(Ki),cr(oi),ex(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ov(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rs!==null&&(kS(Rs),Rs=null))),wS(e,t),ni(t),null;case 5:ZS(t);var l=of(hm.current);if(n=t.type,e!==null&&t.stateNode!=null)MN(e,t,n,s,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(ge(166));return ni(t),null}if(e=of(Ca.current),Ov(t)){s=t.stateNode,n=t.type;var h=t.memoizedProps;switch(s[Sa]=t,s[dm]=h,e=(t.mode&1)!==0,n){case"dialog":ur("cancel",s),ur("close",s);break;case"iframe":case"object":case"embed":ur("load",s);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=d.createElement(n,{is:s.is}):(e=d.createElement(n),n==="select"&&(d=e,s.multiple?d.multiple=!0:s.size&&(d.size=s.size))):e=d.createElementNS(e,n),e[Sa]=t,e[dm]=s,LN(e,t,!1,!1),t.stateNode=e;e:{switch(d=K1(n,s),n){case"dialog":ur("cancel",e),ur("close",e),l=s;break;case"iframe":case"object":case"embed":ur("load",e),l=s;break;case"video":case"audio":for(l=0;lnp&&(t.flags|=128,s=!0,zh(h,!1),t.lanes=4194304)}else{if(!s)if(e=cy(d),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zh(h,!0),h.tail===null&&h.tailMode==="hidden"&&!d.alternate&&!hr)return ni(t),null}else 2*$r()-h.renderingStartTime>np&&n!==1073741824&&(t.flags|=128,s=!0,zh(h,!1),t.lanes=4194304);h.isBackwards?(d.sibling=t.child,t.child=d):(n=h.last,n!==null?n.sibling=d:t.child=d,h.last=d)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=$r(),t.sibling=null,n=Er.current,rr(Er,s?n&1|2:n&1),t):(ni(t),null);case 22:case 23:return fx(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?To&1073741824&&(ni(t),t.subtreeFlags&6&&(t.flags|=8192)):ni(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}i(M3,"Ej");function O3(e,t){switch(qS(t),t.tag){case 1:return Gi(t.type)&&ny(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tp(),cr(Ki),cr(oi),ex(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ZS(t),null;case 13:if(cr(Er),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));Zd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return cr(Er),null;case 4:return tp(),null;case 10:return YS(t.type._context),null;case 22:case 23:return fx(),null;case 24:return null;default:return null}}i(O3,"Ij");var Iv=!1,ii=!1,R3=typeof WeakSet=="function"?WeakSet:Set,Le=null;function $d(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){Mr(e,t,s)}else n.current=null}i($d,"Lj");function SS(e,t,n){try{n()}catch(s){Mr(e,t,s)}}i(SS,"Mj");var $T=!1;function D3(e,t){if(nS=Zv,e=Bk(),$S(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var l=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{n.nodeType,h.nodeType}catch{n=null;break e}var d=0,v=-1,S=-1,b=0,k=0,R=e,I=null;t:for(;;){for(var z;R!==n||l!==0&&R.nodeType!==3||(v=d+l),R!==h||s!==0&&R.nodeType!==3||(S=d+s),R.nodeType===3&&(d+=R.nodeValue.length),(z=R.firstChild)!==null;)I=R,R=z;for(;;){if(R===e)break t;if(I===n&&++b===l&&(v=d),I===h&&++k===s&&(S=d),(z=R.nextSibling)!==null)break;R=I,I=R.parentNode}R=z}n=v===-1||S===-1?null:{start:v,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(iS={focusedElem:e,selectionRange:n},Zv=!1,Le=t;Le!==null;)if(t=Le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Le=e;else for(;Le!==null;){t=Le;try{var q=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(q!==null){var Q=q.memoizedProps,ne=q.memoizedState,D=t.stateNode,L=D.getSnapshotBeforeUpdate(t.elementType===t.type?Q:Ms(t.type,Q),ne);D.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var B=t.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ge(163))}}catch(j){Mr(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Le=e;break}Le=t.return}return q=$T,$T=!1,q}i(D3,"Oj");function Zh(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&e)===e){var h=l.destroy;l.destroy=void 0,h!==void 0&&SS(t,n,h)}l=l.next}while(l!==s)}}i(Zh,"Pj");function Ty(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 s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}i(Ty,"Qj");function xS(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}}i(xS,"Rj");function RN(e){var t=e.alternate;t!==null&&(e.alternate=null,RN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Sa],delete t[dm],delete t[aS],delete t[v3],delete t[y3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}i(RN,"Sj");function DN(e){return e.tag===5||e.tag===3||e.tag===4}i(DN,"Tj");function VT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||DN(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}}i(VT,"Uj");function CS(e,t,n){var s=e.tag;if(s===5||s===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=ry));else if(s!==4&&(e=e.child,e!==null))for(CS(e,t,n),e=e.sibling;e!==null;)CS(e,t,n),e=e.sibling}i(CS,"Vj");function _S(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(_S(e,t,n),e=e.sibling;e!==null;)_S(e,t,n),e=e.sibling}i(_S,"Wj");var Vn=null,Os=!1;function Cu(e,t,n){for(n=n.child;n!==null;)IN(e,t,n),n=n.sibling}i(Cu,"Yj");function IN(e,t,n){if(xa&&typeof xa.onCommitFiberUnmount=="function")try{xa.onCommitFiberUnmount(yy,n)}catch{}switch(n.tag){case 5:ii||$d(n,t);case 6:var s=Vn,l=Os;Vn=null,Cu(e,t,n),Vn=s,Os=l,Vn!==null&&(Os?(e=Vn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vn.removeChild(n.stateNode));break;case 18:Vn!==null&&(Os?(e=Vn,n=n.stateNode,e.nodeType===8?T1(e.parentNode,n):e.nodeType===1&&T1(e,n),am(e)):T1(Vn,n.stateNode));break;case 4:s=Vn,l=Os,Vn=n.stateNode.containerInfo,Os=!0,Cu(e,t,n),Vn=s,Os=l;break;case 0:case 11:case 14:case 15:if(!ii&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){l=s=s.next;do{var h=l,d=h.destroy;h=h.tag,d!==void 0&&(h&2||h&4)&&SS(n,t,d),l=l.next}while(l!==s)}Cu(e,t,n);break;case 1:if(!ii&&($d(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(v){Mr(n,t,v)}Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:n.mode&1?(ii=(s=ii)||n.memoizedState!==null,Cu(e,t,n),ii=s):Cu(e,t,n);break;default:Cu(e,t,n)}}i(IN,"Zj");function qT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R3),t.forEach(function(s){var l=V3.bind(null,e,s);n.has(s)||(n.add(s),s.then(l,l))})}}i(qT,"ak");function Ls(e,t){var n=t.deletions;if(n!==null)for(var s=0;sl&&(l=d),s&=~h}if(s=l,s=$r()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*F3(s/1960))-s,10e?16:e,Nu===null)var s=!1;else{if(e=Nu,Nu=null,my=0,Nt&6)throw Error(ge(331));var l=Nt;for(Nt|=4,Le=e.current;Le!==null;){var h=Le,d=h.child;if(Le.flags&16){var v=h.deletions;if(v!==null){for(var S=0;S$r()-ux?sf(e,0):lx|=n),Yi(e,t)}i(W3,"Ti");function VN(e,t){t===0&&(e.mode&1?(t=_v,_v<<=1,!(_v&130023424)&&(_v=4194304)):t=1);var n=bi();e=pl(e,t),e!==null&&(wm(e,t,n),Yi(e,n))}i(VN,"Yk");function $3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),VN(e,n)}i($3,"uj");function V3(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ge(314))}s!==null&&s.delete(t),VN(e,n)}i(V3,"bk");var qN;qN=i(function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ki.current)ji=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ji=!1,L3(e,t,n);ji=!!(e.flags&131072)}else ji=!1,hr&&t.flags&1048576&&Yk(t,sy,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Vv(e,t),e=t.pendingProps;var l=Jd(t,oi.current);Yd(t,n),l=rx(null,t,s,e,l,n);var h=nx();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gi(s)?(h=!0,iy(t)):h=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,QS(t),l.updater=by,t.stateNode=l,l._reactInternals=t,pS(t,s,e,n),t=gS(null,t,s,!0,h,n)):(t.tag=0,hr&&h&&VS(t),Ei(null,t,l,n),t=t.child),t;case 16:s=t.elementType;e:{switch(Vv(e,t),e=t.pendingProps,l=s._init,s=l(s._payload),t.type=s,l=t.tag=j3(s),e=Ms(s,e),l){case 0:t=mS(null,t,s,e,n);break e;case 1:t=zT(null,t,s,e,n);break e;case 11:t=BT(null,t,s,e,n);break e;case 14:t=HT(null,t,s,Ms(s.type,e),n);break e}throw Error(ge(306,s,""))}return t;case 0:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),mS(e,t,s,l,n);case 1:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),zT(e,t,s,l,n);case 3:e:{if(NN(t),e===null)throw Error(ge(387));s=t.pendingProps,h=t.memoizedState,l=h.element,tN(e,t),uy(t,s,null,n);var d=t.memoizedState;if(s=d.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){l=rp(Error(ge(423)),t),t=UT(e,t,s,n,l);break e}else if(s!==l){l=rp(Error(ge(424)),t),t=UT(e,t,s,n,l);break e}else for(ko=Mu(t.stateNode.containerInfo.firstChild),No=t,hr=!0,Rs=null,n=Zk(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zd(),s===l){t=hl(e,t,n);break e}Ei(e,t,s,n)}t=t.child}return t;case 5:return rN(t),e===null&&cS(t),s=t.type,l=t.pendingProps,h=e!==null?e.memoizedProps:null,d=l.children,oS(s,l)?d=null:h!==null&&oS(s,h)&&(t.flags|=32),kN(e,t),Ei(e,t,d,n),t.child;case 6:return e===null&&cS(t),null;case 13:return AN(e,t,n);case 4:return JS(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ep(t,null,s,n):Ei(e,t,s,n),t.child;case 11:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),BT(e,t,s,l,n);case 7:return Ei(e,t,t.pendingProps,n),t.child;case 8:return Ei(e,t,t.pendingProps.children,n),t.child;case 12:return Ei(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,l=t.pendingProps,h=t.memoizedProps,d=l.value,rr(ay,s._currentValue),s._currentValue=d,h!==null)if(Fs(h.value,d)){if(h.children===l.children&&!Ki.current){t=hl(e,t,n);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var v=h.dependencies;if(v!==null){d=h.child;for(var S=v.firstContext;S!==null;){if(S.context===s){if(h.tag===1){S=cl(-1,n&-n),S.tag=2;var b=h.updateQueue;if(b!==null){b=b.shared;var k=b.pending;k===null?S.next=S:(S.next=k.next,k.next=S),b.pending=S}}h.lanes|=n,S=h.alternate,S!==null&&(S.lanes|=n),fS(h.return,n,t),v.lanes|=n;break}S=S.next}}else if(h.tag===10)d=h.type===t.type?null:h.child;else if(h.tag===18){if(d=h.return,d===null)throw Error(ge(341));d.lanes|=n,v=d.alternate,v!==null&&(v.lanes|=n),fS(d,n,t),d=h.sibling}else d=h.child;if(d!==null)d.return=h;else for(d=h;d!==null;){if(d===t){d=null;break}if(h=d.sibling,h!==null){h.return=d.return,d=h;break}d=d.return}h=d}Ei(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,s=t.pendingProps.children,Yd(t,n),l=as(l),s=s(l),t.flags|=1,Ei(e,t,s,n),t.child;case 14:return s=t.type,l=Ms(s,t.pendingProps),l=Ms(s.type,l),HT(e,t,s,l,n);case 15:return bN(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:Ms(s,l),Vv(e,t),t.tag=1,Gi(s)?(e=!0,iy(t)):e=!1,Yd(t,n),CN(t,s,l),pS(t,s,l,n),gS(null,t,s,!0,e,n);case 19:return PN(e,t,n);case 22:return TN(e,t,n)}throw Error(ge(156,t.tag))},"Vk");function jN(e,t){return wk(e,t)}i(jN,"Fk");function q3(e,t,n,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}i(q3,"$k");function os(e,t,n,s){return new q3(e,t,n,s)}i(os,"Bg");function px(e){return e=e.prototype,!(!e||!e.isReactComponent)}i(px,"aj");function j3(e){if(typeof e=="function")return px(e)?1:0;if(e!=null){if(e=e.$$typeof,e===MS)return 11;if(e===OS)return 14}return 2}i(j3,"Zk");function Iu(e,t){var n=e.alternate;return n===null?(n=os(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}i(Iu,"Pg");function Kv(e,t,n,s,l,h){var d=2;if(s=e,typeof e=="function")px(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case Rd:return af(n.children,l,h,t);case LS:d=8,l|=8;break;case F1:return e=os(12,n,t,l|2),e.elementType=F1,e.lanes=h,e;case B1:return e=os(13,n,t,l),e.elementType=B1,e.lanes=h,e;case H1:return e=os(19,n,t,l),e.elementType=H1,e.lanes=h,e;case rk:return Ny(n,l,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ek:d=10;break e;case tk:d=9;break e;case MS:d=11;break e;case OS:d=14;break e;case _u:d=16,s=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=os(d,n,t,l),t.elementType=e,t.type=s,t.lanes=h,t}i(Kv,"Rg");function af(e,t,n,s){return e=os(7,e,s,t),e.lanes=n,e}i(af,"Tg");function Ny(e,t,n,s){return e=os(22,e,s,t),e.elementType=rk,e.lanes=n,e.stateNode={isHidden:!1},e}i(Ny,"pj");function R1(e,t,n){return e=os(6,e,null,t),e.lanes=n,e}i(R1,"Qg");function D1(e,t,n){return t=os(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}i(D1,"Sg");function K3(e,t,n,s,l){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=y1(0),this.expirationTimes=y1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=y1(0),this.identifierPrefix=s,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}i(K3,"al");function hx(e,t,n,s,l,h,d,v,S){return e=new K3(e,t,n,v,S),t===1?(t=1,h===!0&&(t|=8)):t=0,h=os(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},QS(h),e}i(hx,"bl");function G3(e,t,n){var s=3{"use strict";function QN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(QN)}catch(e){console.error(e)}}i(QN,"checkDCE");QN(),JN.exports=XN()});var eA=rt(wx=>{"use strict";var ZN=yx();wx.createRoot=ZN.createRoot,wx.hydrateRoot=ZN.hydrateRoot;var HW});var rA=rt(tA=>{"use strict";var _m=Te();function Z3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(Z3,"n");var e4=typeof Object.is=="function"?Object.is:Z3,t4=_m.useSyncExternalStore,r4=_m.useRef,n4=_m.useEffect,i4=_m.useMemo,o4=_m.useDebugValue;tA.useSyncExternalStoreWithSelector=function(e,t,n,s,l){var h=r4(null);if(h.current===null){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=i4(function(){function S(z){if(!b){if(b=!0,k=z,z=s(z),l!==void 0&&d.hasValue){var q=d.value;if(l(q,z))return R=q}return R=z}if(q=R,e4(k,z))return q;var Q=s(z);return l!==void 0&&l(q,Q)?q:(k=z,R=Q)}i(S,"a");var b=!1,k,R,I=n===void 0?null:n;return[function(){return S(t())},I===null?void 0:function(){return S(I())}]},[t,n,s,l]);var v=t4(e,h[0],h[1]);return n4(function(){d.hasValue=!0,d.value=v},[v]),o4(v),v}});var iA=rt(($W,nA)=>{"use strict";nA.exports=rA()});var bm=rt((sp,Em)=>{(function(){var e,t="4.17.21",n=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",h="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",v=500,S="__lodash_placeholder__",b=1,k=2,R=4,I=1,z=2,q=1,Q=2,ne=4,D=8,L=16,B=32,j=64,re=128,Z=256,oe=512,he=30,Re="...",Ee=800,Ye=16,tt=1,xe=2,Xe=3,je=1/0,Qe=9007199254740991,ot=17976931348623157e292,It=NaN,At=4294967295,cn=At-1,fn=At>>>1,gr=[["ary",re],["bind",q],["bindKey",Q],["curry",D],["curryRight",L],["flip",oe],["partial",B],["partialRight",j],["rearg",Z]],Wt="[object Arguments]",vr="[object Array]",yr="[object AsyncFunction]",Gt="[object Boolean]",Ft="[object Date]",se="[object DOMException]",Ue="[object Error]",Kr="[object Function]",Zt="[object GeneratorFunction]",st="[object Map]",Fe="[object Number]",Fn="[object Null]",En="[object Object]",no="[object Promise]",Ho="[object Proxy]",lt="[object RegExp]",wr="[object Set]",fr="[object String]",pt="[object Symbol]",io="[object Undefined]",Bn="[object WeakMap]",Mi="[object WeakSet]",Gr="[object ArrayBuffer]",Yr="[object DataView]",oo="[object Float32Array]",hi="[object Float64Array]",Hn="[object Int8Array]",so="[object Int16Array]",bl="[object Int32Array]",Y="[object Uint8Array]",ee="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Me="[object Uint32Array]",Tl=/\b__p \+= '';/g,ze=/\b(__p \+=) '' \+/g,Xr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Yt=/&(?:amp|lt|gt|quot|#39);/g,Mt=/[&<>"']/g,Pt=RegExp(Yt.source),Na=RegExp(Mt.source),dn=/<%-([\s\S]+?)%>/g,zn=/<%([\s\S]+?)%>/g,kr=/<%=([\s\S]+?)%>/g,gs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bn=/^\w*$/,Aa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pa=/[\\^$.*+?()[\]{}|]/g,nc=RegExp(Pa.source),ic=/^\s+/,oc=/\s/,$f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,Fp=/,? & /,kl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bp=/[()=,{}\[\]\/\s]/,Hp=/\\(\\)?/g,Nl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vf=/\w*$/,ac=/^[-+]0x[0-9a-f]+$/i,vs=/^0b[01]+$/i,zp=/^\[object .+?Constructor\]$/,Up=/^0o[0-7]+$/i,La=/^(?:0|[1-9]\d*)$/,lc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ao=/($^)/,qf=/['\n\r\u2028\u2029\\]/g,Oi="\\ud800-\\udfff",uc="\\u0300-\\u036f",cc="\\ufe20-\\ufe2f",or="\\u20d0-\\u20ff",Pe=uc+cc+or,lo="\\u2700-\\u27bf",Al="a-z\\xdf-\\xf6\\xf8-\\xff",Ri="\\xac\\xb1\\xd7\\xf7",vt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ys="\\u2000-\\u206f",Ma=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oa="A-Z\\xc0-\\xd6\\xd8-\\xde",ce="\\ufe0e\\ufe0f",Ve=Ri+vt+ys+Ma,qs="['\u2019]",fc="["+Oi+"]",js="["+Ve+"]",zo="["+Pe+"]",dc="\\d+",qe="["+lo+"]",jf="["+Al+"]",Pl="[^"+Oi+Ve+dc+lo+Al+Oa+"]",ws="\\ud83c[\\udffb-\\udfff]",mi="(?:"+zo+"|"+ws+")",Ll="[^"+Oi+"]",Ml="(?:\\ud83c[\\udde6-\\uddff]){2}",Ss="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Oa+"]",Ol="\\u200d",Ks="(?:"+jf+"|"+Pl+")",pc="(?:"+uo+"|"+Pl+")",Rl="(?:"+qs+"(?:d|ll|m|re|s|t|ve))?",hc="(?:"+qs+"(?:D|LL|M|RE|S|T|VE))?",mc=mi+"?",Dl="["+ce+"]?",Ra="(?:"+Ol+"(?:"+[Ll,Ml,Ss].join("|")+")"+Dl+mc+")*",gc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Di="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kf=Dl+mc+Ra,Wp="(?:"+[qe,Ml,Ss].join("|")+")"+Kf,Il="(?:"+[Ll+zo+"?",zo,Ml,Ss,fc].join("|")+")",Da=RegExp(qs,"g"),$p=RegExp(zo,"g"),vc=RegExp(ws+"(?="+ws+")|"+Il+Kf,"g"),Vp=RegExp([uo+"?"+jf+"+"+Rl+"(?="+[js,uo,"$"].join("|")+")",pc+"+"+hc+"(?="+[js,uo+Ks,"$"].join("|")+")",uo+"?"+Ks+"+"+Rl,uo+"+"+hc,Di,gc,dc,Wp].join("|"),"g"),qp=RegExp("["+Ol+Oi+Pe+ce+"]"),yc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jp=-1,Bt={};Bt[oo]=Bt[hi]=Bt[Hn]=Bt[so]=Bt[bl]=Bt[Y]=Bt[ee]=Bt[Ce]=Bt[Me]=!0,Bt[Wt]=Bt[vr]=Bt[Gr]=Bt[Gt]=Bt[Yr]=Bt[Ft]=Bt[Ue]=Bt[Kr]=Bt[st]=Bt[Fe]=Bt[En]=Bt[lt]=Bt[wr]=Bt[fr]=Bt[Bn]=!1;var Ot={};Ot[Wt]=Ot[vr]=Ot[Gr]=Ot[Yr]=Ot[Gt]=Ot[Ft]=Ot[oo]=Ot[hi]=Ot[Hn]=Ot[so]=Ot[bl]=Ot[st]=Ot[Fe]=Ot[En]=Ot[lt]=Ot[wr]=Ot[fr]=Ot[pt]=Ot[Y]=Ot[ee]=Ot[Ce]=Ot[Me]=!0,Ot[Ue]=Ot[Kr]=Ot[Bn]=!1;var M={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},De={"&":"&","<":"<",">":">",'"':""","'":"'"},Gs={"&":"&","<":"<",">":">",""":'"',"'":"'"},gi={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fl=parseFloat,ve=parseInt,Ia=typeof global=="object"&&global&&global.Object===Object&&global,Kp=typeof self=="object"&&self&&self.Object===Object&&self,Rt=Ia||Kp||Function("return this")(),Yf=typeof sp=="object"&&sp&&!sp.nodeType&&sp,Ys=Yf&&typeof Em=="object"&&Em&&!Em.nodeType&&Em,Fa=Ys&&Ys.exports===Yf,Uo=Fa&&Ia.process,Se=function(){try{var G=Ys&&Ys.require&&Ys.require("util").types;return G||Uo&&Uo.binding&&Uo.binding("util")}catch{}}(),Xs=Se&&Se.isArrayBuffer,vi=Se&&Se.isDate,Ze=Se&&Se.isMap,Bl=Se&&Se.isRegExp,pn=Se&&Se.isSet,Hl=Se&&Se.isTypedArray;function Qr(G,ie,J){switch(J.length){case 0:return G.call(ie);case 1:return G.call(ie,J[0]);case 2:return G.call(ie,J[0],J[1]);case 3:return G.call(ie,J[0],J[1],J[2])}return G.apply(ie,J)}i(Qr,"apply");function zl(G,ie,J,Ae){for(var Je=-1,yt=G==null?0:G.length;++Je-1}i(Ba,"arrayIncludes");function Ul(G,ie,J){for(var Ae=-1,Je=G==null?0:G.length;++Ae-1;);return J}i(yi,"charsStartIndex");function ea(G,ie){for(var J=G.length;J--&&Kt(ie,G[J],0)>-1;);return J}i(ea,"charsEndIndex");function ql(G,ie){for(var J=G.length,Ae=0;J--;)G[J]===ie&&++Ae;return Ae}i(ql,"countHolders");var Tc=Ha(M),Fi=Ha(De);function $o(G){return"\\"+gi[G]}i($o,"escapeStringChar");function jl(G,ie){return G==null?e:G[ie]}i(jl,"getValue");function xs(G){return qp.test(G)}i(xs,"hasUnicode");function td(G){return yc.test(G)}i(td,"hasUnicodeWord");function Xp(G){for(var ie,J=[];!(ie=G.next()).done;)J.push(ie.value);return J}i(Xp,"iteratorToArray");function Kl(G){var ie=-1,J=Array(G.size);return G.forEach(function(Ae,Je){J[++ie]=[Je,Ae]}),J}i(Kl,"mapToArray");function Gl(G,ie){return function(J){return G(ie(J))}}i(Gl,"overArg");function Tn(G,ie){for(var J=-1,Ae=G.length,Je=0,yt=[];++J-1}i(Sg,"listCacheHas");function xg(a,f){var m=this.__data__,x=tu(m,a);return x<0?(++this.size,m.push([a,f])):m[x][1]=f,this}i(xg,"listCacheSet"),vo.prototype.clear=Sw,vo.prototype.delete=oh,vo.prototype.get=sh,vo.prototype.has=Sg,vo.prototype.set=xg;function yo(a){var f=-1,m=a==null?0:a.length;for(this.clear();++f=f?a:f)),a}i(Ts,"baseClamp");function wi(a,f,m,x,T,P){var H,$=f&b,X=f&k,le=f&R;if(m&&(H=T?m(a,x,T,P):m(a)),H!==e)return H;if(!_r(a))return a;var ue=at(a);if(ue){if(H=Bw(a),!$)return ei(a,H)}else{var fe=Hr(a),Ne=fe==Kr||fe==Zt;if(Su(a))return Sh(a,$);if(fe==En||fe==Wt||Ne&&!T){if(H=X||Ne?{}:tv(a),!$)return X?Ow(a,bg(H,a)):qg(a,uh(H,a))}else{if(!Ot[fe])return T?a:{};H=kd(a,fe,$)}}P||(P=new sr);var He=P.get(a);if(He)return He;P.set(a,H),sb(a)?a.forEach(function(Ge){H.add(wi(Ge,f,m,Ge,a,P))}):ib(a)&&a.forEach(function(Ge,ht){H.set(ht,wi(Ge,f,m,ht,a,P))});var Ke=le?X?Td:bd:X?$i:Pn,dt=ue?e:Ke(a);return Zn(dt||a,function(Ge,ht){dt&&(ht=Ge,Ge=a[ht]),eu(H,ht,wi(Ge,f,m,ht,a,P))}),H}i(wi,"baseClone");function Ew(a){var f=Pn(a);return function(m){return ch(m,a,f)}}i(Ew,"baseConforms");function ch(a,f,m){var x=m.length;if(a==null)return!x;for(a=Ht(a);x--;){var T=m[x],P=f[T],H=a[T];if(H===e&&!(T in a)||!P(H))return!1}return!0}i(ch,"baseConformsTo");function Tg(a,f,m){if(typeof a!="function")throw new Bi(l);return Ie(function(){a.apply(e,m)},f)}i(Tg,"baseDelay");function Dc(a,f,m,x){var T=-1,P=Ba,H=!0,$=a.length,X=[],le=f.length;if(!$)return X;m&&(f=$t(f,hn(m))),x?(P=Ul,H=!1):f.length>=n&&(P=co,H=!1,f=new ia(f));e:for(;++T<$;){var ue=a[T],fe=m==null?ue:m(ue);if(ue=x||ue!==0?ue:0,H&&fe===fe){for(var Ne=le;Ne--;)if(f[Ne]===fe)continue e;X.push(ue)}else P(f,fe,x)||X.push(ue)}return X}i(Dc,"baseDifference");var So=hu(zi),fh=hu(pd,!0);function bw(a,f){var m=!0;return So(a,function(x,T,P){return m=!!f(x,T,P),m}),m}i(bw,"baseEvery");function dd(a,f,m){for(var x=-1,T=a.length;++xT?0:T+m),x=x===e||x>T?T:ct(x),x<0&&(x+=T),x=m>x?0:lb(x);m0&&m($)?f>1?Fr($,f-1,m,x,T):Ii(T,$):x||(T[T.length]=$)}return T}i(Fr,"baseFlatten");var nu=jg(),dh=jg(!0);function zi(a,f){return a&&nu(a,f,Pn)}i(zi,"baseForOwn");function pd(a,f){return a&&dh(a,f,Pn)}i(pd,"baseForOwnRight");function hd(a,f){return jt(f,function(m){return nl(a[m])})}i(hd,"baseFunctions");function la(a,f){f=fa(f,a);for(var m=0,x=f.length;a!=null&&mf}i(md,"baseGt");function Ng(a,f){return a!=null&&kt.call(a,f)}i(Ng,"baseHas");function Ag(a,f){return a!=null&&f in Ht(a)}i(Ag,"baseHasIn");function iu(a,f,m){return a>=Ar(f,m)&&a=120&&ue.length>=120)?new ia(H&&ue):e}ue=a[0];var fe=-1,Ne=$[0];e:for(;++fe-1;)$!==a&&Wa.call($,X,1),Wa.call(a,X,1);return a}i(vh,"basePullAll");function kn(a,f){for(var m=a?f.length:0,x=m-1;m--;){var T=f[m];if(m==x||T!==P){var P=T;c(T)?Wa.call(a,T,1):vd(a,T)}}return a}i(kn,"basePullAt");function gd(a,f){return a+Va(nh()*(f-a+1))}i(gd,"baseRandom");function kw(a,f,m,x){for(var T=-1,P=er(Ac((f-a)/(m||1)),0),H=J(P);P--;)H[x?P:++T]=a,a+=m;return H}i(kw,"baseRange");function yh(a,f){var m="";if(!a||f<1||f>Qe)return m;do f%2&&(m+=a),f=Va(f/2),f&&(a+=a);while(f);return m}i(yh,"baseRepeat");function ut(a,f){return Oe(de(a,f,Vi),a+"")}i(ut,"baseRest");function zg(a){return ah(Ad(a))}i(zg,"baseSample");function Ug(a,f){var m=Ad(a);return pr(m,Ts(f,0,m.length))}i(Ug,"baseSampleSize");function fu(a,f,m,x){if(!_r(a))return a;f=fa(f,a);for(var T=-1,P=f.length,H=P-1,$=a;$!=null&&++TT?0:T+f),m=m>T?T:m,m<0&&(m+=T),T=f>m?0:m-f>>>0,f>>>=0;for(var P=J(T);++x>>1,H=a[P];H!==null&&!_o(H)&&(m?H<=f:H=n){var le=f?null:Dw(a);if(le)return w(le);H=!1,T=co,X=new ia}else X=f?[]:$;e:for(;++x=x?a:Br(a,f,m)}i(ks,"castSlice");var Vg=Zp||function(a){return Rt.clearTimeout(a)};function Sh(a,f){if(f)return a.slice();var m=a.length,x=Qp?Qp(m):new a.constructor(m);return a.copy(x),x}i(Sh,"cloneBuffer");function du(a){var f=new a.constructor(a.byteLength);return new id(f).set(new id(a)),f}i(du,"cloneArrayBuffer");function Pw(a,f){var m=f?du(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.byteLength)}i(Pw,"cloneDataView");function Lw(a){var f=new a.constructor(a.source,Vf.exec(a));return f.lastIndex=a.lastIndex,f}i(Lw,"cloneRegExp");function Vc(a){return Mc?Ht(Mc.call(a)):{}}i(Vc,"cloneSymbol");function xh(a,f){var m=f?du(a.buffer):a.buffer;return new a.constructor(m,a.byteOffset,a.length)}i(xh,"cloneTypedArray");function Ch(a,f){if(a!==f){var m=a!==e,x=a===null,T=a===a,P=_o(a),H=f!==e,$=f===null,X=f===f,le=_o(f);if(!$&&!le&&!P&&a>f||P&&H&&X&&!$&&!le||x&&H&&X||!m&&X||!T)return 1;if(!x&&!P&&!le&&a=$)return X;var le=m[x];return X*(le=="desc"?-1:1)}}return a.index-f.index}i(Mw,"compareMultiple");function wd(a,f,m,x){for(var T=-1,P=a.length,H=m.length,$=-1,X=f.length,le=er(P-H,0),ue=J(X+le),fe=!x;++$1?m[T-1]:e,H=T>2?m[2]:e;for(P=a.length>3&&typeof P=="function"?(T--,P):e,H&&u(m[0],m[1],H)&&(P=T<3?e:P,T=1),f=Ht(f);++x-1?T[P?f[H]:H]:e}}i(Eh,"createFind");function Yg(a){return Qo(function(f){var m=f.length,x=m,T=Lt.prototype.thru;for(a&&f.reverse();x--;){var P=f[x];if(typeof P!="function")throw new Bi(l);if(T&&!H&&Xc(P)=="wrapper")var H=new Lt([],!0)}for(x=H?x:m;++x1&&St.reverse(),ue&&X$))return!1;var le=P.get(a),ue=P.get(f);if(le&&ue)return le==f&&ue==a;var fe=-1,Ne=!0,He=m&z?new ia:e;for(P.set(a,f),P.set(f,a);++fe<$;){var Ke=a[fe],dt=f[fe];if(x)var Ge=H?x(dt,Ke,fe,f,a,P):x(Ke,dt,fe,a,f,P);if(Ge!==e){if(Ge)continue;Ne=!1;break}if(He){if(!Qs(f,function(ht,St){if(!co(He,St)&&(Ke===ht||T(Ke,ht,m,x,P)))return He.push(St)})){Ne=!1;break}}else if(!(Ke===dt||T(Ke,dt,m,x,P))){Ne=!1;break}}return P.delete(a),P.delete(f),Ne}i(Ui,"equalArrays");function Ed(a,f,m,x,T,P,H){switch(m){case Yr:if(a.byteLength!=f.byteLength||a.byteOffset!=f.byteOffset)return!1;a=a.buffer,f=f.buffer;case Gr:return!(a.byteLength!=f.byteLength||!P(new id(a),new id(f)));case Gt:case Ft:case Fe:return Ns(+a,+f);case Ue:return a.name==f.name&&a.message==f.message;case lt:case fr:return a==f+"";case st:var $=Kl;case wr:var X=x&I;if($||($=w),a.size!=f.size&&!X)return!1;var le=H.get(a);if(le)return le==f;x|=z,H.set(a,f);var ue=Ui($(a),$(f),x,T,P,H);return H.delete(a),ue;case pt:if(Mc)return Mc.call(a)==Mc.call(f)}return!1}i(Ed,"equalByTag");function kh(a,f,m,x,T,P){var H=m&I,$=bd(a),X=$.length,le=bd(f),ue=le.length;if(X!=ue&&!H)return!1;for(var fe=X;fe--;){var Ne=$[fe];if(!(H?Ne in f:kt.call(f,Ne)))return!1}var He=P.get(a),Ke=P.get(f);if(He&&Ke)return He==f&&Ke==a;var dt=!0;P.set(a,f),P.set(f,a);for(var Ge=H;++fe1?"& ":"")+f[x],f=f.join(m>2?", ":" "),a.replace($f,`{ /* [wrapped with `+f+`] */ -`)}i(r,"insertWrapDetails");function o(l){return lt(l)||Bc(l)||!!(Zg&&l&&l[Zg])}i(o,"isFlattenable");function u(l,f){var g=typeof l;return f=f??Qe,!!f&&(g=="number"||g!="symbol"&&dl.test(l))&&l>-1&&l%1==0&&l0){if(++f>=Ce)return arguments[0]}else f=0;return l.apply(e,arguments)}}i(Lt,"shortOut");function cr(l,f){var g=-1,x=l.length,T=x-1;for(f=f===e?x:f;++g1?l[f-1]:e;return g=typeof g=="function"?(l.pop(),g):e,zC(l,g)});function WC(l){var f=O(l);return f.__chain__=!0,f}i(WC,"chain");function NP(l,f){return f(l),l}i(NP,"tap");function zm(l,f){return f(l)}i(zm,"thru");var OP=Mo(function(l){var f=l.length,g=f?l[0]:0,x=this.__wrapped__,T=i(function(A){return Wa(A,l)},"interceptor");return f>1||this.__actions__.length||!(x instanceof Ue)||!u(g)?this.thru(T):(x=x.slice(g,+g+(f?1:0)),x.__actions__.push({func:zm,args:[T],thisArg:e}),new Nt(x,this.__chain__).thru(function(A){return f&&!A.length&&A.push(e),A}))});function AP(){return WC(this)}i(AP,"wrapperChain");function MP(){return new Nt(this.value(),this.__chain__)}i(MP,"wrapperCommit");function LP(){this.__values__===e&&(this.__values__=tE(this.value()));var l=this.__index__>=this.__values__.length,f=l?e:this.__values__[this.__index__++];return{done:l,value:f}}i(LP,"wrapperNext");function PP(){return this}i(PP,"wrapperToIterator");function RP(l){for(var f,g=this;g instanceof cn;){var x=_n(g);x.__index__=0,x.__values__=e,f?T.__wrapped__=x:f=x;var T=x;g=g.__wrapped__}return T.__wrapped__=l,f}i(RP,"wrapperPlant");function DP(){var l=this.__wrapped__;if(l instanceof Ue){var f=l;return this.__actions__.length&&(f=new Ue(this)),f=f.reverse(),f.__actions__.push({func:zm,args:[pw],thisArg:e}),new Nt(f,this.__chain__)}return this.thru(pw)}i(DP,"wrapperReverse");function IP(){return Tc(this.__wrapped__,this.__actions__)}i(IP,"wrapperValue");var FP=Ja(function(l,f,g){Ct.call(l,g)?++l[g]:is(l,g,1)});function BP(l,f,g){var x=lt(l)?oc:J0;return g&&a(l,f,g)&&(f=e),x(l,We(f,3))}i(BP,"every");function HP(l,f){var g=lt(l)?$t:Ll;return g(l,We(f,3))}i(HP,"filter");var zP=uh(Po),WP=uh(Xs);function UP(l,f){return Dr(Wm(l,f),1)}i(UP,"flatMap");function $P(l,f){return Dr(Wm(l,f),qe)}i($P,"flatMapDeep");function VP(l,f,g){return g=g===e?1:ct(g),Dr(Wm(l,f),g)}i(VP,"flatMapDepth");function UC(l,f){var g=lt(l)?qn:Zi;return g(l,We(f,3))}i(UC,"forEach");function $C(l,f){var g=lt(l)?Ff:Xd;return g(l,We(f,3))}i($C,"forEachRight");var qP=Ja(function(l,f,g){Ct.call(l,g)?l[g].push(f):is(l,g,[f])});function jP(l,f,g,x){l=Ti(l)?l:mp(l),g=g&&!x?ct(g):0;var T=l.length;return g<0&&(g=Qt(T+g,0)),jm(l)?g<=T&&l.indexOf(f,g)>-1:!!T&&Vt(l,f,g)>-1}i(jP,"includes");var GP=ut(function(l,f,g){var x=-1,T=typeof f=="function",A=Ti(l)?J(l.length):[];return Zi(l,function(H){A[++x]=T?Gr(f,H,g):qa(H,f,g)}),A}),KP=Ja(function(l,f,g){is(l,g,f)});function Wm(l,f){var g=lt(l)?zt:eh;return g(l,We(f,3))}i(Wm,"map");function YP(l,f,g,x){return l==null?[]:(lt(f)||(f=f==null?[]:[f]),g=x?e:g,lt(g)||(g=g==null?[]:[g]),xm(l,f,g))}i(YP,"orderBy");var XP=Ja(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function QP(l,f,g){var x=lt(l)?sc:Wf,T=arguments.length<3;return x(l,We(f,4),g,T,Zi)}i(QP,"reduce");function JP(l,f,g){var x=lt(l)?Bf:Wf,T=arguments.length<3;return x(l,We(f,4),g,T,Xd)}i(JP,"reduceRight");function ZP(l,f){var g=lt(l)?$t:Ll;return g(l,Vm(We(f,3)))}i(ZP,"reject");function eR(l){var f=lt(l)?jd:Em;return f(l)}i(eR,"sample");function tR(l,f,g){(g?a(l,f,g):f===e)?f=1:f=ct(f);var x=lt(l)?X0:bm;return x(l,f)}i(tR,"sampleSize");function rR(l){var f=lt(l)?Gd:rw;return f(l)}i(rR,"shuffle");function nR(l){if(l==null)return 0;if(Ti(l))return jm(l)?an(l):l.length;var f=Fr(l);return f==st||f==mr?l.size:Rl(l).length}i(nR,"size");function iR(l,f,g){var x=lt(l)?Ls:Ec;return g&&a(l,f,g)&&(f=e),x(l,We(f,3))}i(iR,"some");var oR=ut(function(l,f){if(l==null)return[];var g=f.length;return g>1&&a(l,f[0],f[1])?f=[]:g>2&&a(f[0],f[1],f[2])&&(f=[f[0]]),xm(l,Dr(f,1),[])}),Um=Fa||function(){return Mt.Date.now()};function sR(l,f){if(typeof f!="function")throw new _i(c);return l=ct(l),function(){if(--l<1)return f.apply(this,arguments)}}i(sR,"after");function VC(l,f,g){return f=g?e:f,f=l&&f==null?l.length:f,yt(l,re,e,e,e,e,f)}i(VC,"ary");function qC(l,f){var g;if(typeof f!="function")throw new _i(c);return l=ct(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=e),g}}i(qC,"before");var hw=ut(function(l,f,g){var x=q;if(g.length){var T=Sn(g,ru(hw));x|=B}return yt(l,x,f,g,T)}),jC=ut(function(l,f,g){var x=q|Q;if(g.length){var T=Sn(g,ru(jC));x|=B}return yt(f,x,l,g,T)});function GC(l,f,g){f=g?e:f;var x=yt(l,I,e,e,e,e,e,f);return x.placeholder=GC.placeholder,x}i(GC,"curry");function KC(l,f,g){f=g?e:f;var x=yt(l,L,e,e,e,e,e,f);return x.placeholder=KC.placeholder,x}i(KC,"curryRight");function YC(l,f,g){var x,T,A,H,$,X,ae=0,ue=!1,fe=!1,ke=!0;if(typeof l!="function")throw new _i(c);f=Do(f)||0,Sr(g)&&(ue=!!g.leading,fe="maxWait"in g,A=fe?Qt(Do(g.maxWait)||0,f):A,ke="trailing"in g?!!g.trailing:ke);function Be(zr){var as=x,Wl=T;return x=T=e,ae=zr,H=l.apply(Wl,as),H}i(Be,"invokeFunc");function je(zr){return ae=zr,$=Ie(ht,f),ue?Be(zr):H}i(je,"leadingEdge");function pt(zr){var as=zr-X,Wl=zr-ae,hE=f-as;return fe?Tr(hE,A-Wl):hE}i(pt,"remainingWait");function Ge(zr){var as=zr-X,Wl=zr-ae;return X===e||as>=f||as<0||fe&&Wl>=A}i(Ge,"shouldInvoke");function ht(){var zr=Um();if(Ge(zr))return wt(zr);$=Ie(ht,pt(zr))}i(ht,"timerExpired");function wt(zr){return $=e,ke&&x?Be(zr):(x=T=e,H)}i(wt,"trailingEdge");function no(){$!==e&&Nm($),ae=0,x=X=T=$=e}i(no,"cancel");function ui(){return $===e?H:wt(Um())}i(ui,"flush");function io(){var zr=Um(),as=Ge(zr);if(x=arguments,T=this,X=zr,as){if($===e)return je(X);if(fe)return Nm($),$=Ie(ht,f),Be(X)}return $===e&&($=Ie(ht,f)),H}return i(io,"debounced"),io.cancel=no,io.flush=ui,io}i(YC,"debounce");var lR=ut(function(l,f){return cm(l,1,f)}),aR=ut(function(l,f,g){return cm(l,Do(f)||0,g)});function uR(l){return yt(l,oe)}i(uR,"flip");function $m(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new _i(c);var g=i(function(){var x=arguments,T=f?f.apply(this,x):x[0],A=g.cache;if(A.has(T))return A.get(T);var H=l.apply(this,x);return g.cache=A.set(T,H)||A,H},"memoized");return g.cache=new($m.Cache||Qi),g}i($m,"memoize"),$m.Cache=Qi;function Vm(l){if(typeof l!="function")throw new _i(c);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}i(Vm,"negate");function cR(l){return qC(2,l)}i(cR,"once");var fR=Oc(function(l,f){f=f.length==1&<(f[0])?zt(f[0],ln(We())):zt(Dr(f,1),ln(We()));var g=f.length;return ut(function(x){for(var T=-1,A=Tr(x.length,g);++T=f}),Bc=Jd(function(){return arguments}())?Jd:function(l){return Nr(l)&&Ct.call(l,"callee")&&!jf.call(l,"callee")},lt=J.isArray,TR=Ms?ln(Ms):ja;function Ti(l){return l!=null&&qm(l.length)&&!Hl(l)}i(Ti,"isArrayLike");function Hr(l){return Nr(l)&&Ti(l)}i(Hr,"isArrayLikeObject");function kR(l){return l===!0||l===!1||Nr(l)&&Yr(l)==qt}i(kR,"isBoolean");var ou=H0||Tw,NR=ii?ln(ii):gm;function OR(l){return Nr(l)&&l.nodeType===1&&!gh(l)}i(OR,"isElement");function AR(l){if(l==null)return!0;if(Ti(l)&&(lt(l)||typeof l=="string"||typeof l.splice=="function"||ou(l)||gp(l)||Bc(l)))return!l.length;var f=Fr(l);if(f==st||f==mr)return!l.size;if(E(l))return!Rl(l).length;for(var g in l)if(Ct.call(l,g))return!1;return!0}i(AR,"isEmpty");function MR(l,f){return Vs(l,f)}i(MR,"isEqual");function LR(l,f,g){g=typeof g=="function"?g:e;var x=g?g(l,f):e;return x===e?Vs(l,f,e,g):!!x}i(LR,"isEqualWith");function mw(l){if(!Nr(l))return!1;var f=Yr(l);return f==ze||f==se||typeof l.message=="string"&&typeof l.name=="string"&&!gh(l)}i(mw,"isError");function PR(l){return typeof l=="number"&&em(l)}i(PR,"isFinite");function Hl(l){if(!Sr(l))return!1;var f=Yr(l);return f==$r||f==Xt||f==gr||f==wo}i(Hl,"isFunction");function QC(l){return typeof l=="number"&&l==ct(l)}i(QC,"isInteger");function qm(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=Qe}i(qm,"isLength");function Sr(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}i(Sr,"isObject");function Nr(l){return l!=null&&typeof l=="object"}i(Nr,"isObjectLike");var JC=Ze?ln(Ze):_c;function RR(l,f){return l===f||Zd(l,f,xt(f))}i(RR,"isMatch");function DR(l,f,g){return g=typeof g=="function"?g:e,Zd(l,f,xt(f),g)}i(DR,"isMatchWith");function IR(l){return ZC(l)&&l!=+l}i(IR,"isNaN");function FR(l){if(C(l))throw new Je(s);return Pl(l)}i(FR,"isNative");function BR(l){return l===null}i(BR,"isNull");function HR(l){return l==null}i(HR,"isNil");function ZC(l){return typeof l=="number"||Nr(l)&&Yr(l)==Fe}i(ZC,"isNumber");function gh(l){if(!Nr(l)||Yr(l)!=yn)return!1;var f=Fs(l);if(f===null)return!0;var g=Ct.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Da.call(g)==Cl}i(gh,"isPlainObject");var vw=Ca?ln(Ca):vm;function zR(l){return QC(l)&&l>=-Qe&&l<=Qe}i(zR,"isSafeInteger");var eE=sn?ln(sn):ym;function jm(l){return typeof l=="string"||!lt(l)&&Nr(l)&&Yr(l)==ar}i(jm,"isString");function ro(l){return typeof l=="symbol"||Nr(l)&&Yr(l)==dt}i(ro,"isSymbol");var gp=Ea?ln(Ea):wm;function WR(l){return l===e}i(WR,"isUndefined");function UR(l){return Nr(l)&&Fr(l)==Ln}i(UR,"isWeakMap");function $R(l){return Nr(l)&&Yr(l)==mi}i($R,"isWeakSet");var VR=Lc(Dl),qR=Lc(function(l,f){return l<=f});function tE(l){if(!l)return[];if(Ti(l))return jm(l)?Gt(l):jn(l);if(bl&&l[bl])return Dd(l[bl]());var f=Fr(l),g=f==st?La:f==mr?w:mp;return g(l)}i(tE,"toArray");function zl(l){if(!l)return l===0?l:0;if(l=Do(l),l===qe||l===-qe){var f=l<0?-1:1;return f*ot}return l===l?l:0}i(zl,"toFinite");function ct(l){var f=zl(l),g=f%1;return f===f?g?f-g:f:0}i(ct,"toInteger");function rE(l){return l?os(ct(l),0,Tt):0}i(rE,"toLength");function Do(l){if(typeof l=="number")return l;if(ro(l))return Pt;if(Sr(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Sr(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=Oa(l);var g=Xo.test(l);return g||Td.test(l)?me(l.slice(2),g?2:8):Gu.test(l)?Pt:+l}i(Do,"toNumber");function nE(l){return to(l,ki(l))}i(nE,"toPlainObject");function jR(l){return l?os(ct(l),-Qe,Qe):l===0?l:0}i(jR,"toSafeInteger");function Ft(l){return l==null?"":li(l)}i(Ft,"toString");var GR=Ao(function(l,f){if(E(f)||Ti(f)){to(f,En(f),l);return}for(var g in f)Ct.call(f,g)&&Ha(l,g,f[g])}),iE=Ao(function(l,f){to(f,ki(f),l)}),Gm=Ao(function(l,f,g,x){to(f,ki(f),l,x)}),KR=Ao(function(l,f,g,x){to(f,En(f),l,x)}),YR=Mo(Wa);function XR(l,f){var g=Ba(l);return f==null?g:Kd(g,f)}i(XR,"create");var QR=ut(function(l,f){l=It(l);var g=-1,x=f.length,T=x>2?f[2]:e;for(T&&a(f[0],f[1],T)&&(x=1);++g1),A}),to(l,dp(l),g),x&&(g=si(g,b|k|D,Rc));for(var T=f.length;T--;)ip(g,f[T]);return g});function g2(l,f){return sE(l,Vm(We(f)))}i(g2,"omitBy");var m2=Mo(function(l,f){return l==null?{}:_m(l,f)});function sE(l,f){if(l==null)return{};var g=zt(dp(l),function(x){return[x]});return f=We(f),Cm(l,g,function(x,T){return f(x,T[0])})}i(sE,"pickBy");function v2(l,f,g){f=js(f,l);var x=-1,T=f.length;for(T||(T=1,l=e);++xf){var x=l;l=f,f=x}if(g||l%1||f%1){var T=Ud();return Tr(l+T*(f-l+_a("1e-"+((T+"").length-1))),f)}return np(l,f)}i(k2,"random");var N2=eu(function(l,f,g){return f=f.toLowerCase(),l+(g?uE(f):f)});function uE(l){return Sw(Ft(l).toLowerCase())}i(uE,"capitalize");function cE(l){return l=Ft(l),l&&l.replace(Ku,pc).replace(Nd,"")}i(cE,"deburr");function O2(l,f,g){l=Ft(l),f=li(f);var x=l.length;g=g===e?x:os(ct(g),0,x);var T=g;return g-=f.length,g>=0&&l.slice(g,T)==f}i(O2,"endsWith");function A2(l){return l=Ft(l),l&&cl.test(l)?l.replace(Ot,xi):l}i(A2,"escape");function M2(l){return l=Ft(l),l&&$u.test(l)?l.replace(pl,"\\$&"):l}i(M2,"escapeRegExp");var L2=eu(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),P2=eu(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),R2=Lm("toLowerCase");function D2(l,f,g){l=Ft(l),f=ct(f);var x=f?an(l):0;if(!f||x>=f)return l;var T=(f-x)/2;return up(Tl(T),g)+l+up(gc(T),g)}i(D2,"pad");function I2(l,f,g){l=Ft(l),f=ct(f);var x=f?an(l):0;return f&&x>>0,g?(l=Ft(l),l&&(typeof f=="string"||f!=null&&!vw(f))&&(f=li(f),!f&&es(l))?ss(Gt(l),0,g):l.split(f,g)):[]}i(U2,"split");var $2=eu(function(l,f,g){return l+(g?" ":"")+Sw(f)});function V2(l,f,g){return l=Ft(l),g=g==null?0:os(ct(g),0,l.length),f=li(f),l.slice(g,g+f.length)==f}i(V2,"startsWith");function q2(l,f,g){var x=O.templateSettings;g&&a(l,f,g)&&(f=e),l=Ft(l),f=Gm({},f,x,Im);var T=Gm({},f.imports,x.imports,Im),A=En(T),H=fc(T,A),$,X,ae=0,ue=f.interpolate||Wi,fe="__p += '",ke=hc((f.escape||Wi).source+"|"+ue.source+"|"+(ue===Er?da:Wi).source+"|"+(f.evaluate||Wi).source+"|$","g"),Be="//# sourceURL="+(Ct.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Md+"]")+` -`;l.replace(ke,function(Ge,ht,wt,no,ui,io){return wt||(wt=no),fe+=l.slice(ae,io).replace(Lf,Co),ht&&($=!0,fe+=`' + +`)}i(r,"insertWrapDetails");function o(a){return at(a)||Jc(a)||!!(mg&&a&&a[mg])}i(o,"isFlattenable");function c(a,f){var m=typeof a;return f=f??Qe,!!f&&(m=="number"||m!="symbol"&&La.test(a))&&a>-1&&a%1==0&&a0){if(++f>=Ee)return arguments[0]}else f=0;return a.apply(e,arguments)}}i(Dt,"shortOut");function pr(a,f){var m=-1,x=a.length,T=x-1;for(f=f===e?x:f;++m1?a[f-1]:e;return m=typeof m=="function"?(a.pop(),m):e,jE(a,m)});function KE(a){var f=A(a);return f.__chain__=!0,f}i(KE,"chain");function wR(a,f){return f(a),a}i(wR,"tap");function rv(a,f){return f(a)}i(rv,"thru");var SR=Qo(function(a){var f=a.length,m=f?a[0]:0,x=this.__wrapped__,T=i(function(P){return ru(P,a)},"interceptor");return f>1||this.__actions__.length||!(x instanceof $e)||!c(m)?this.thru(T):(x=x.slice(m,+m+(f?1:0)),x.__actions__.push({func:rv,args:[T],thisArg:e}),new Lt(x,this.__chain__).thru(function(P){return f&&!P.length&&P.push(e),P}))});function xR(){return KE(this)}i(xR,"wrapperChain");function CR(){return new Lt(this.value(),this.__chain__)}i(CR,"wrapperCommit");function _R(){this.__values__===e&&(this.__values__=ab(this.value()));var a=this.__index__>=this.__values__.length,f=a?e:this.__values__[this.__index__++];return{done:a,value:f}}i(_R,"wrapperNext");function ER(){return this}i(ER,"wrapperToIterator");function bR(a){for(var f,m=this;m instanceof vn;){var x=Nn(m);x.__index__=0,x.__values__=e,f?T.__wrapped__=x:f=x;var T=x;m=m.__wrapped__}return T.__wrapped__=a,f}i(bR,"wrapperPlant");function TR(){var a=this.__wrapped__;if(a instanceof $e){var f=a;return this.__actions__.length&&(f=new $e(this)),f=f.reverse(),f.__actions__.push({func:rv,args:[Hw],thisArg:e}),new Lt(f,this.__chain__)}return this.thru(Hw)}i(TR,"wrapperReverse");function kR(){return zc(this.__wrapped__,this.__actions__)}i(kR,"wrapperValue");var NR=pu(function(a,f,m){kt.call(a,m)?++a[m]:bs(a,m,1)});function AR(a,f,m){var x=at(a)?wc:bw;return m&&u(a,f,m)&&(f=e),x(a,We(f,3))}i(AR,"every");function PR(a,f){var m=at(a)?jt:Xa;return m(a,We(f,3))}i(PR,"filter");var LR=Eh(Zo),MR=Eh(ma);function OR(a,f){return Fr(nv(a,f),1)}i(OR,"flatMap");function RR(a,f){return Fr(nv(a,f),je)}i(RR,"flatMapDeep");function DR(a,f,m){return m=m===e?1:ct(m),Fr(nv(a,f),m)}i(DR,"flatMapDepth");function GE(a,f){var m=at(a)?Zn:So;return m(a,We(f,3))}i(GE,"forEach");function YE(a,f){var m=at(a)?Xf:fh;return m(a,We(f,3))}i(YE,"forEachRight");var IR=pu(function(a,f,m){kt.call(a,m)?a[m].push(f):bs(a,m,[f])});function FR(a,f,m,x){a=Wi(a)?a:Ad(a),m=m&&!x?ct(m):0;var T=a.length;return m<0&&(m=er(T+m,0)),lv(a)?m<=T&&a.indexOf(f,m)>-1:!!T&&Kt(a,f,m)>-1}i(FR,"includes");var BR=ut(function(a,f,m){var x=-1,T=typeof f=="function",P=Wi(a)?J(a.length):[];return So(a,function(H){P[++x]=T?Qr(f,H,m):su(H,f,m)}),P}),HR=pu(function(a,f,m){bs(a,m,f)});function nv(a,f){var m=at(a)?$t:mh;return m(a,We(f,3))}i(nv,"map");function zR(a,f,m,x){return a==null?[]:(at(f)||(f=f==null?[]:[f]),m=x?e:m,at(m)||(m=m==null?[]:[m]),Fg(a,f,m))}i(zR,"orderBy");var UR=pu(function(a,f,m){a[m?0:1].push(f)},function(){return[[],[]]});function WR(a,f,m){var x=at(a)?Sc:ed,T=arguments.length<3;return x(a,We(f,4),m,T,So)}i(WR,"reduce");function $R(a,f,m){var x=at(a)?Qf:ed,T=arguments.length<3;return x(a,We(f,4),m,T,fh)}i($R,"reduceRight");function VR(a,f){var m=at(a)?jt:Xa;return m(a,sv(We(f,3)))}i(VR,"reject");function qR(a){var f=at(a)?ah:zg;return f(a)}i(qR,"sample");function jR(a,f,m){(m?u(a,f,m):f===e)?f=1:f=ct(f);var x=at(a)?_w:Ug;return x(a,f)}i(jR,"sampleSize");function KR(a){var f=at(a)?lh:Aw;return f(a)}i(KR,"shuffle");function GR(a){if(a==null)return 0;if(Wi(a))return lv(a)?mn(a):a.length;var f=Hr(a);return f==st||f==wr?a.size:Ja(a).length}i(GR,"size");function YR(a,f,m){var x=at(a)?Qs:Bc;return m&&u(a,f,m)&&(f=e),x(a,We(f,3))}i(YR,"some");var XR=ut(function(a,f){if(a==null)return[];var m=f.length;return m>1&&u(a,f[0],f[1])?f=[]:m>2&&u(f[0],f[1],f[2])&&(f=[f[0]]),Fg(a,Fr(f,1),[])}),iv=Jl||function(){return Rt.Date.now()};function QR(a,f){if(typeof f!="function")throw new Bi(l);return a=ct(a),function(){if(--a<1)return f.apply(this,arguments)}}i(QR,"after");function XE(a,f,m){return f=m?e:f,f=a&&f==null?a.length:f,wt(a,re,e,e,e,e,f)}i(XE,"ary");function QE(a,f){var m;if(typeof f!="function")throw new Bi(l);return a=ct(a),function(){return--a>0&&(m=f.apply(this,arguments)),a<=1&&(f=e),m}}i(QE,"before");var Uw=ut(function(a,f,m){var x=q;if(m.length){var T=Tn(m,vu(Uw));x|=B}return wt(a,x,f,m,T)}),JE=ut(function(a,f,m){var x=q|Q;if(m.length){var T=Tn(m,vu(JE));x|=B}return wt(f,x,a,m,T)});function ZE(a,f,m){f=m?e:f;var x=wt(a,D,e,e,e,e,e,f);return x.placeholder=ZE.placeholder,x}i(ZE,"curry");function eb(a,f,m){f=m?e:f;var x=wt(a,L,e,e,e,e,e,f);return x.placeholder=eb.placeholder,x}i(eb,"curryRight");function tb(a,f,m){var x,T,P,H,$,X,le=0,ue=!1,fe=!1,Ne=!0;if(typeof a!="function")throw new Bi(l);f=ts(f)||0,_r(m)&&(ue=!!m.leading,fe="maxWait"in m,P=fe?er(ts(m.maxWait)||0,f):P,Ne="trailing"in m?!!m.trailing:Ne);function He(Wr){var As=x,ol=T;return x=T=e,le=Wr,H=a.apply(ol,As),H}i(He,"invokeFunc");function Ke(Wr){return le=Wr,$=Ie(ht,f),ue?He(Wr):H}i(Ke,"leadingEdge");function dt(Wr){var As=Wr-X,ol=Wr-le,Sb=f-As;return fe?Ar(Sb,P-ol):Sb}i(dt,"remainingWait");function Ge(Wr){var As=Wr-X,ol=Wr-le;return X===e||As>=f||As<0||fe&&ol>=P}i(Ge,"shouldInvoke");function ht(){var Wr=iv();if(Ge(Wr))return St(Wr);$=Ie(ht,dt(Wr))}i(ht,"timerExpired");function St(Wr){return $=e,Ne&&x?He(Wr):(x=T=e,H)}i(St,"trailingEdge");function Eo(){$!==e&&Vg($),le=0,x=X=T=$=e}i(Eo,"cancel");function Ci(){return $===e?H:St(iv())}i(Ci,"flush");function bo(){var Wr=iv(),As=Ge(Wr);if(x=arguments,T=this,X=Wr,As){if($===e)return Ke(X);if(fe)return Vg($),$=Ie(ht,f),He(X)}return $===e&&($=Ie(ht,f)),H}return i(bo,"debounced"),bo.cancel=Eo,bo.flush=Ci,bo}i(tb,"debounce");var JR=ut(function(a,f){return Tg(a,1,f)}),ZR=ut(function(a,f,m){return Tg(a,ts(f)||0,m)});function eD(a){return wt(a,oe)}i(eD,"flip");function ov(a,f){if(typeof a!="function"||f!=null&&typeof f!="function")throw new Bi(l);var m=i(function(){var x=arguments,T=f?f.apply(this,x):x[0],P=m.cache;if(P.has(T))return P.get(T);var H=a.apply(this,x);return m.cache=P.set(T,H)||P,H},"memoized");return m.cache=new(ov.Cache||yo),m}i(ov,"memoize"),ov.Cache=yo;function sv(a){if(typeof a!="function")throw new Bi(l);return function(){var f=arguments;switch(f.length){case 0:return!a.call(this);case 1:return!a.call(this,f[0]);case 2:return!a.call(this,f[0],f[1]);case 3:return!a.call(this,f[0],f[1],f[2])}return!a.apply(this,f)}}i(sv,"negate");function tD(a){return QE(2,a)}i(tD,"once");var rD=$c(function(a,f){f=f.length==1&&at(f[0])?$t(f[0],hn(We())):$t(Fr(f,1),hn(We()));var m=f.length;return ut(function(x){for(var T=-1,P=Ar(x.length,m);++T=f}),Jc=ph(function(){return arguments}())?ph:function(a){return Lr(a)&&kt.call(a,"callee")&&!od.call(a,"callee")},at=J.isArray,vD=Xs?hn(Xs):au;function Wi(a){return a!=null&&av(a.length)&&!nl(a)}i(Wi,"isArrayLike");function Ur(a){return Lr(a)&&Wi(a)}i(Ur,"isArrayLikeObject");function yD(a){return a===!0||a===!1||Lr(a)&&Zr(a)==Gt}i(yD,"isBoolean");var Su=dw||Zw,wD=vi?hn(vi):Lg;function SD(a){return Lr(a)&&a.nodeType===1&&!Ph(a)}i(SD,"isElement");function xD(a){if(a==null)return!0;if(Wi(a)&&(at(a)||typeof a=="string"||typeof a.splice=="function"||Su(a)||Nd(a)||Jc(a)))return!a.length;var f=Hr(a);if(f==st||f==wr)return!a.size;if(E(a))return!Ja(a).length;for(var m in a)if(kt.call(a,m))return!1;return!0}i(xD,"isEmpty");function CD(a,f){return ua(a,f)}i(CD,"isEqual");function _D(a,f,m){m=typeof m=="function"?m:e;var x=m?m(a,f):e;return x===e?ua(a,f,e,m):!!x}i(_D,"isEqualWith");function $w(a){if(!Lr(a))return!1;var f=Zr(a);return f==Ue||f==se||typeof a.message=="string"&&typeof a.name=="string"&&!Ph(a)}i($w,"isError");function ED(a){return typeof a=="number"&&gg(a)}i(ED,"isFinite");function nl(a){if(!_r(a))return!1;var f=Zr(a);return f==Kr||f==Zt||f==yr||f==Ho}i(nl,"isFunction");function nb(a){return typeof a=="number"&&a==ct(a)}i(nb,"isInteger");function av(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Qe}i(av,"isLength");function _r(a){var f=typeof a;return a!=null&&(f=="object"||f=="function")}i(_r,"isObject");function Lr(a){return a!=null&&typeof a=="object"}i(Lr,"isObjectLike");var ib=Ze?hn(Ze):Ic;function bD(a,f){return a===f||hh(a,f,bt(f))}i(bD,"isMatch");function TD(a,f,m){return m=typeof m=="function"?m:e,hh(a,f,bt(f),m)}i(TD,"isMatchWith");function kD(a){return ob(a)&&a!=+a}i(kD,"isNaN");function ND(a){if(_(a))throw new Je(s);return Qa(a)}i(ND,"isNative");function AD(a){return a===null}i(AD,"isNull");function PD(a){return a==null}i(PD,"isNil");function ob(a){return typeof a=="number"||Lr(a)&&Zr(a)==Fe}i(ob,"isNumber");function Ph(a){if(!Lr(a)||Zr(a)!=En)return!1;var f=ra(a);if(f===null)return!0;var m=kt.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Xl.call(m)==Ua}i(Ph,"isPlainObject");var Vw=Bl?hn(Bl):Og;function LD(a){return nb(a)&&a>=-Qe&&a<=Qe}i(LD,"isSafeInteger");var sb=pn?hn(pn):Rg;function lv(a){return typeof a=="string"||!at(a)&&Lr(a)&&Zr(a)==fr}i(lv,"isString");function _o(a){return typeof a=="symbol"||Lr(a)&&Zr(a)==pt}i(_o,"isSymbol");var Nd=Hl?hn(Hl):Dg;function MD(a){return a===e}i(MD,"isUndefined");function OD(a){return Lr(a)&&Hr(a)==Bn}i(OD,"isWeakMap");function RD(a){return Lr(a)&&Zr(a)==Mi}i(RD,"isWeakSet");var DD=jc(Za),ID=jc(function(a,f){return a<=f});function ab(a){if(!a)return[];if(Wi(a))return lv(a)?Xt(a):ei(a);if($a&&a[$a])return Xp(a[$a]());var f=Hr(a),m=f==st?Kl:f==wr?w:Ad;return m(a)}i(ab,"toArray");function il(a){if(!a)return a===0?a:0;if(a=ts(a),a===je||a===-je){var f=a<0?-1:1;return f*ot}return a===a?a:0}i(il,"toFinite");function ct(a){var f=il(a),m=f%1;return f===f?m?f-m:f:0}i(ct,"toInteger");function lb(a){return a?Ts(ct(a),0,At):0}i(lb,"toLength");function ts(a){if(typeof a=="number")return a;if(_o(a))return It;if(_r(a)){var f=typeof a.valueOf=="function"?a.valueOf():a;a=_r(f)?f+"":f}if(typeof a!="string")return a===0?a:+a;a=Vl(a);var m=vs.test(a);return m||Up.test(a)?ve(a.slice(2),m?2:8):ac.test(a)?It:+a}i(ts,"toNumber");function ub(a){return Co(a,$i(a))}i(ub,"toPlainObject");function FD(a){return a?Ts(ct(a),-Qe,Qe):a===0?a:0}i(FD,"toSafeInteger");function zt(a){return a==null?"":Si(a)}i(zt,"toString");var BD=Xo(function(a,f){if(E(f)||Wi(f)){Co(f,Pn(f),a);return}for(var m in f)kt.call(f,m)&&eu(a,m,f[m])}),cb=Xo(function(a,f){Co(f,$i(f),a)}),uv=Xo(function(a,f,m,x){Co(f,$i(f),a,x)}),HD=Xo(function(a,f,m,x){Co(f,Pn(f),a,x)}),zD=Qo(ru);function UD(a,f){var m=Zl(a);return f==null?m:uh(m,f)}i(UD,"create");var WD=ut(function(a,f){a=Ht(a);var m=-1,x=f.length,T=x>2?f[2]:e;for(T&&u(f[0],f[1],T)&&(x=1);++m1),P}),Co(a,Td(a),m),x&&(m=wi(m,b|k|R,Gc));for(var T=f.length;T--;)vd(m,f[T]);return m});function s2(a,f){return db(a,sv(We(f)))}i(s2,"omitBy");var a2=Qo(function(a,f){return a==null?{}:Bg(a,f)});function db(a,f){if(a==null)return{};var m=$t(Td(a),function(x){return[x]});return f=We(f),Hg(a,m,function(x,T){return f(x,T[0])})}i(db,"pickBy");function l2(a,f,m){f=fa(f,a);var x=-1,T=f.length;for(T||(T=1,a=e);++xf){var x=a;a=f,f=x}if(m||a%1||f%1){var T=nh();return Ar(a+T*(f-a+Fl("1e-"+((T+"").length-1))),f)}return gd(a,f)}i(y2,"random");var w2=mu(function(a,f,m){return f=f.toLowerCase(),a+(m?mb(f):f)});function mb(a){return Kw(zt(a).toLowerCase())}i(mb,"capitalize");function gb(a){return a=zt(a),a&&a.replace(lc,Tc).replace($p,"")}i(gb,"deburr");function S2(a,f,m){a=zt(a),f=Si(f);var x=a.length;m=m===e?x:Ts(ct(m),0,x);var T=m;return m-=f.length,m>=0&&a.slice(m,T)==f}i(S2,"endsWith");function x2(a){return a=zt(a),a&&Na.test(a)?a.replace(Mt,Fi):a}i(x2,"escape");function C2(a){return a=zt(a),a&&nc.test(a)?a.replace(Pa,"\\$&"):a}i(C2,"escapeRegExp");var _2=mu(function(a,f,m){return a+(m?"-":"")+f.toLowerCase()}),E2=mu(function(a,f,m){return a+(m?" ":"")+f.toLowerCase()}),b2=Gg("toLowerCase");function T2(a,f,m){a=zt(a),f=ct(f);var x=f?mn(a):0;if(!f||x>=f)return a;var T=(f-x)/2;return Cd(Va(T),m)+a+Cd(Ac(T),m)}i(T2,"pad");function k2(a,f,m){a=zt(a),f=ct(f);var x=f?mn(a):0;return f&&x>>0,m?(a=zt(a),a&&(typeof f=="string"||f!=null&&!Vw(f))&&(f=Si(f),!f&&xs(a))?ks(Xt(a),0,m):a.split(f,m)):[]}i(O2,"split");var R2=mu(function(a,f,m){return a+(m?" ":"")+Kw(f)});function D2(a,f,m){return a=zt(a),m=m==null?0:Ts(ct(m),0,a.length),f=Si(f),a.slice(m,m+f.length)==f}i(D2,"startsWith");function I2(a,f,m){var x=A.templateSettings;m&&u(a,f,m)&&(f=e),a=zt(a),f=uv({},f,x,Jg);var T=uv({},f.imports,x.imports,Jg),P=Pn(T),H=bc(T,P),$,X,le=0,ue=f.interpolate||ao,fe="__p += '",Ne=Nc((f.escape||ao).source+"|"+ue.source+"|"+(ue===kr?Nl:ao).source+"|"+(f.evaluate||ao).source+"|$","g"),He="//# sourceURL="+(kt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jp+"]")+` +`;a.replace(Ne,function(Ge,ht,St,Eo,Ci,bo){return St||(St=Eo),fe+=a.slice(le,bo).replace(qf,$o),ht&&($=!0,fe+=`' + __e(`+ht+`) + -'`),ui&&(X=!0,fe+=`'; -`+ui+`; -__p += '`),wt&&(fe+=`' + -((__t = (`+wt+`)) == null ? '' : __t) + -'`),ae=io+Ge.length,Ge}),fe+=`'; -`;var je=Ct.call(f,"variable")&&f.variable;if(!je)fe=`with (obj) { +'`),Ci&&(X=!0,fe+=`'; +`+Ci+`; +__p += '`),St&&(fe+=`' + +((__t = (`+St+`)) == null ? '' : __t) + +'`),le=bo+Ge.length,Ge}),fe+=`'; +`;var Ke=kt.call(f,"variable")&&f.variable;if(!Ke)fe=`with (obj) { `+fe+` } -`;else if(Cd.test(je))throw new Je(h);fe=(X?fe.replace(fa,""):fe).replace(He,"$1").replace(jr,"$1;"),fe="function("+(je||"obj")+`) { -`+(je?"":`obj || (obj = {}); +`;else if(Bp.test(Ke))throw new Je(h);fe=(X?fe.replace(Tl,""):fe).replace(ze,"$1").replace(Xr,"$1;"),fe="function("+(Ke||"obj")+`) { +`+(Ke?"":`obj || (obj = {}); `)+"var __t, __p = ''"+($?", __e = _.escape":"")+(X?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+fe+`return __p -}`;var pt=pE(function(){return vt(A,Be+"return "+fe).apply(e,H)});if(pt.source=fe,mw(pt))throw pt;return pt}i(q2,"template");function j2(l){return Ft(l).toLowerCase()}i(j2,"toLower");function G2(l){return Ft(l).toUpperCase()}i(G2,"toUpper");function K2(l,f,g){if(l=Ft(l),l&&(g||f===e))return Oa(l);if(!l||!(f=li(f)))return l;var x=Gt(l),T=Gt(f),A=oi(x,T),H=Ds(x,T)+1;return ss(x,A,H).join("")}i(K2,"trim");function Y2(l,f,g){if(l=Ft(l),l&&(g||f===e))return l.slice(0,Dn(l)+1);if(!l||!(f=li(f)))return l;var x=Gt(l),T=Ds(x,Gt(f))+1;return ss(x,0,T).join("")}i(Y2,"trimEnd");function X2(l,f,g){if(l=Ft(l),l&&(g||f===e))return l.replace(Vu,"");if(!l||!(f=li(f)))return l;var x=Gt(l),T=oi(x,Gt(f));return ss(x,T).join("")}i(X2,"trimStart");function Q2(l,f){var g=de,x=Re;if(Sr(f)){var T="separator"in f?f.separator:T;g="length"in f?ct(f.length):g,x="omission"in f?li(f.omission):x}l=Ft(l);var A=l.length;if(es(l)){var H=Gt(l);A=H.length}if(g>=A)return l;var $=g-an(x);if($<1)return x;var X=H?ss(H,0,$).join(""):l.slice(0,$);if(T===e)return X+x;if(H&&($+=X.length-$),vw(T)){if(l.slice($).search(T)){var ae,ue=X;for(T.global||(T=hc(T.source,Ft(Mf.exec(T))+"g")),T.lastIndex=0;ae=T.exec(ue);)var fe=ae.index;X=X.slice(0,fe===e?$:fe)}}else if(l.indexOf(li(T),$)!=$){var ke=X.lastIndexOf(T);ke>-1&&(X=X.slice(0,ke))}return X+x}i(Q2,"truncate");function J2(l){return l=Ft(l),l&&kt.test(l)?l.replace(jt,qi):l}i(J2,"unescape");var Z2=eu(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),Sw=Lm("toUpperCase");function fE(l,f,g){return l=Ft(l),f=g?e:f,f===e?Uf(l)?dc(l):zf(l):l.match(f)||[]}i(fE,"words");var pE=ut(function(l,f){try{return Gr(l,e,f)}catch(g){return mw(g)?g:new Je(g)}}),eD=Mo(function(l,f){return qn(f,function(g){g=ir(g),is(l,g,hw(l[g],l))}),l});function tD(l){var f=l==null?0:l.length,g=We();return l=f?zt(l,function(x){if(typeof x[1]!="function")throw new _i(c);return[g(x[0]),x[1]]}):[],ut(function(x){for(var T=-1;++TQe)return[];var g=Tt,x=Tr(l,Tt);f=We(f),l-=Tt;for(var T=cc(x,f);++g0||f<0)?new Ue(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==e&&(f=ct(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},Ue.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ue.prototype.toArray=function(){return this.take(Tt)},Ei(Ue.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),x=/^(?:head|last)$/.test(f),T=O[x?"take"+(f=="last"?"Right":""):f],A=x||/^find/.test(f);T&&(O.prototype[f]=function(){var H=this.__wrapped__,$=x?[1]:arguments,X=H instanceof Ue,ae=$[0],ue=X||lt(H),fe=i(function(ht){var wt=T.apply(O,Si([ht],$));return x&&ke?wt[0]:wt},"interceptor");ue&&g&&typeof ae=="function"&&ae.length!=1&&(X=ue=!1);var ke=this.__chain__,Be=!!this.__actions__.length,je=A&&!ke,pt=X&&!Be;if(!A&&ue){H=pt?H:new Ue(this);var Ge=l.apply(H,$);return Ge.__actions__.push({func:zm,args:[fe],thisArg:e}),new Nt(Ge,ke)}return je&&pt?l.apply(this,$):(Ge=this.thru(fe),je?x?Ge.value()[0]:Ge.value():Ge)})}),qn(["pop","push","shift","sort","splice","unshift"],function(l){var f=$f[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",x=/^(?:pop|shift)$/.test(l);O.prototype[l]=function(){var T=arguments;if(x&&!this.__chain__){var A=this.value();return f.apply(lt(A)?A:[],T)}return this[g](function(H){return f.apply(lt(H)?H:[],T)})}}),Ei(Ue.prototype,function(l,f){var g=O[f];if(g){var x=g.name+"";Ct.call(Nl,x)||(Nl[x]=[]),Nl[x].push({name:f,func:g})}}),Nl[lp(e,Q).name]=[{name:"wrapper",func:e}],Ue.prototype.clone=Rr,Ue.prototype.reverse=wc,Ue.prototype.value=$0,O.prototype.at=OP,O.prototype.chain=AP,O.prototype.commit=MP,O.prototype.next=LP,O.prototype.plant=RP,O.prototype.reverse=DP,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=IP,O.prototype.first=O.prototype.head,bl&&(O.prototype[bl]=PP),O},"runInContext"),un=Ra();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Mt._=un,define(function(){return un})):As?((As.exports=un)._=un,If._=un):Mt._=un}).call(Gp)});var bN=rt((tx,rx)=>{(function(e,t){typeof tx=="object"&&typeof rx<"u"?rx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})(tx,function(){"use strict";var e=i(function(s,c){return t(s.slice(),c)},"stable");e.inplace=function(s,c){var h=t(s,c);return h!==s&&n(h,null,s.length,s),s};function t(s,c){typeof c!="function"&&(c=i(function(b,k){return String(b).localeCompare(k)},"comp"));var h=s.length;if(h<=1)return s;for(var p=new Array(h),v=1;vv&&(D=v),M>v&&(M=v),z=k,q=D;;)if(z{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var c="",h=0;h{(function(e,t){typeof Zx=="object"&&typeof e_<"u"?e_.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(Zx,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),s=/MSIE \d/.test(e),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),h=/Edge\/(\d+)/.exec(e),p=s||c||h,v=p&&(s?document.documentMode||6:+(h||c)[1]),S=!h&&/WebKit\//.test(e),b=S&&/Qt\/\d+\.\d+/.test(e),k=!h&&/Chrome\/(\d+)/.exec(e),D=k&&+k[1],M=/Opera\//.test(e),z=/Apple Computer/.test(navigator.vendor),q=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),Q=/PhantomJS/.test(e),ie=z&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),I=/Android/.test(e),L=ie||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),B=ie||/Mac/.test(t),G=/\bCrOS\b/.test(e),re=/win/i.test(t),Z=M&&e.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(M=!1,S=!0);var oe=B&&(b||M&&(Z==null||Z<12.11)),de=n||p&&v>=9;function Re(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}i(Re,"classTest");var Ce=i(function(r,o){var u=r.className,a=Re(o).exec(u);if(a){var d=u.slice(a.index+a[0].length);r.className=u.slice(0,a.index)+(d?a[1]+d:"")}},"rmClass");function Ye(r){for(var o=r.childNodes.length;o>0;--o)r.removeChild(r.firstChild);return r}i(Ye,"removeChildren");function tt(r,o){return Ye(r).appendChild(o)}i(tt,"removeChildrenAndAdd");function Se(r,o,u,a){var d=document.createElement(r);if(u&&(d.className=u),a&&(d.style.cssText=a),typeof o=="string")d.appendChild(document.createTextNode(o));else if(o)for(var m=0;m=o)return y+(o-m);y+=_-m,y+=u-y%u,m=_+1}}i(Rt,"countColumn");var se=i(function(){this.id=null,this.f=null,this.time=0,this.handler=gr(this.onTimeout,this)},"Delayed");se.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},se.prototype.set=function(r,o){this.f=o;var u=+new Date+r;(!this.id||u=o)return a+Math.min(y,o-d);if(d+=m-a,d+=u-d%u,a=m+1,d>=o)return a}}i(yn,"findColumn");var Fi=[""];function wo(r){for(;Fi.length<=r;)Fi.push(at(Fi)+" ");return Fi[r]}i(wo,"spaceStr");function at(r){return r[r.length-1]}i(at,"lst");function mr(r,o){for(var u=[],a=0;a"\x80"&&(r.toUpperCase()!=r.toLowerCase()||Ln.test(r))}i(mi,"isWordCharBasic");function Vr(r,o){return o?o.source.indexOf("\\w")>-1&&mi(r)?!0:o.test(r):mi(r)}i(Vr,"isWordChar");function qr(r){for(var o in r)if(r.hasOwnProperty(o)&&r[o])return!1;return!0}i(qr,"isEmpty");var Hi=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ti(r){return r.charCodeAt(0)>=768&&Hi.test(r)}i(ti,"isExtendingChar");function Pn(r,o,u){for(;(u<0?o>0:ou?-1:1;;){if(o==u)return o;var d=(o+u)/2,m=a<0?Math.ceil(d):Math.floor(d);if(m==o)return r(m)?o:u;r(m)?u=m:o=m+a}}i(zi,"findFirst");function ca(r,o,u,a){if(!r)return a(o,u,"ltr",0);for(var d=!1,m=0;mo||o==u&&y.to==o)&&(a(Math.max(y.from,o),Math.min(y.to,u),y.level==1?"rtl":"ltr",m),d=!0)}d||a(o,u,"ltr")}i(ca,"iterateBidiSections");var Y=null;function ee(r,o,u){var a;Y=null;for(var d=0;do)return d;m.to==o&&(m.from!=m.to&&u=="before"?a=d:Y=d),m.from==o&&(m.from!=m.to&&u!="before"?a=d:Y=d)}return a??Y}i(ee,"getBidiPartAt");var xe=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(E){return E<=247?r.charAt(E):1424<=E&&E<=1524?"R":1536<=E&&E<=1785?o.charAt(E-1536):1774<=E&&E<=2220?"r":8192<=E&&E<=8203?"w":E==8204?"b":"L"}i(u,"charType");var a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,m=/[LRr]/,y=/[Lb1n]/,_=/[1n]/;function C(E,R,F){this.level=E,this.from=R,this.to=F}return i(C,"BidiSpan"),function(E,R){var F=R=="ltr"?"L":"R";if(E.length==0||R=="ltr"&&!a.test(E))return!1;for(var j=E.length,V=[],te=0;te-1&&(a[o]=d.slice(0,m).concat(d.slice(m+1)))}}}i(jt,"off");function Ot(r,o){var u=jr(r,o);if(u.length)for(var a=Array.prototype.slice.call(arguments,2),d=0;d0}i(on,"hasHandler");function Rn(r){r.prototype.on=function(o,u){He(this,o,u)},r.prototype.off=function(o,u){jt(this,o,u)}}i(Rn,"eventMixin");function Er(r){r.preventDefault?r.preventDefault():r.returnValue=!1}i(Er,"e_preventDefault");function Yo(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}i(Yo,"e_stopPropagation");function wn(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}i(wn,"e_defaultPrevented");function fl(r){Er(r),Yo(r)}i(fl,"e_stop");function pl(r){return r.target||r.srcElement}i(pl,"e_target");function $u(r){var o=r.which;return o==null&&(r.button&1?o=1:r.button&2?o=3:r.button&4&&(o=2)),B&&r.ctrlKey&&o==1&&(o=3),o}i($u,"e_button");var Vu=function(){if(p&&v<9)return!1;var r=Se("div");return"draggable"in r||"dragDrop"in r}(),qu;function Af(r){if(qu==null){var o=Se("span","\u200B");tt(r,Se("span",[o,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(qu=o.offsetWidth<=1&&o.offsetHeight>2&&!(p&&v<8))}var u=qu?Se("span","\u200B"):Se("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}i(Af,"zeroWidthElement");var ju;function _d(r){if(ju!=null)return ju;var o=tt(r,document.createTextNode("A\u062EA")),u=qe(o,0,1).getBoundingClientRect(),a=qe(o,1,2).getBoundingClientRect();return Ye(r),!u||u.left==u.right?!1:ju=a.right-u.right<3}i(_d,"hasBadBidiRects");var pa=` +}`;var dt=yb(function(){return yt(P,He+"return "+fe).apply(e,H)});if(dt.source=fe,$w(dt))throw dt;return dt}i(I2,"template");function F2(a){return zt(a).toLowerCase()}i(F2,"toLower");function B2(a){return zt(a).toUpperCase()}i(B2,"toUpper");function H2(a,f,m){if(a=zt(a),a&&(m||f===e))return Vl(a);if(!a||!(f=Si(f)))return a;var x=Xt(a),T=Xt(f),P=yi(x,T),H=ea(x,T)+1;return ks(x,P,H).join("")}i(H2,"trim");function z2(a,f,m){if(a=zt(a),a&&(m||f===e))return a.slice(0,Un(a)+1);if(!a||!(f=Si(f)))return a;var x=Xt(a),T=ea(x,Xt(f))+1;return ks(x,0,T).join("")}i(z2,"trimEnd");function U2(a,f,m){if(a=zt(a),a&&(m||f===e))return a.replace(ic,"");if(!a||!(f=Si(f)))return a;var x=Xt(a),T=yi(x,Xt(f));return ks(x,T).join("")}i(U2,"trimStart");function W2(a,f){var m=he,x=Re;if(_r(f)){var T="separator"in f?f.separator:T;m="length"in f?ct(f.length):m,x="omission"in f?Si(f.omission):x}a=zt(a);var P=a.length;if(xs(a)){var H=Xt(a);P=H.length}if(m>=P)return a;var $=m-mn(x);if($<1)return x;var X=H?ks(H,0,$).join(""):a.slice(0,$);if(T===e)return X+x;if(H&&($+=X.length-$),Vw(T)){if(a.slice($).search(T)){var le,ue=X;for(T.global||(T=Nc(T.source,zt(Vf.exec(T))+"g")),T.lastIndex=0;le=T.exec(ue);)var fe=le.index;X=X.slice(0,fe===e?$:fe)}}else if(a.indexOf(Si(T),$)!=$){var Ne=X.lastIndexOf(T);Ne>-1&&(X=X.slice(0,Ne))}return X+x}i(W2,"truncate");function $2(a){return a=zt(a),a&&Pt.test(a)?a.replace(Yt,fo):a}i($2,"unescape");var V2=mu(function(a,f,m){return a+(m?" ":"")+f.toUpperCase()}),Kw=Gg("toUpperCase");function vb(a,f,m){return a=zt(a),f=m?e:f,f===e?td(a)?kc(a):Zf(a):a.match(f)||[]}i(vb,"words");var yb=ut(function(a,f){try{return Qr(a,e,f)}catch(m){return $w(m)?m:new Je(m)}}),q2=Qo(function(a,f){return Zn(f,function(m){m=ar(m),bs(a,m,Uw(a[m],a))}),a});function j2(a){var f=a==null?0:a.length,m=We();return a=f?$t(a,function(x){if(typeof x[1]!="function")throw new Bi(l);return[m(x[0]),x[1]]}):[],ut(function(x){for(var T=-1;++TQe)return[];var m=At,x=Ar(a,At);f=We(f),a-=At;for(var T=Ec(x,f);++m0||f<0)?new $e(m):(a<0?m=m.takeRight(-a):a&&(m=m.drop(a)),f!==e&&(f=ct(f),m=f<0?m.dropRight(-f):m.take(f-a)),m)},$e.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},$e.prototype.toArray=function(){return this.take(At)},zi($e.prototype,function(a,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),x=/^(?:head|last)$/.test(f),T=A[x?"take"+(f=="last"?"Right":""):f],P=x||/^find/.test(f);T&&(A.prototype[f]=function(){var H=this.__wrapped__,$=x?[1]:arguments,X=H instanceof $e,le=$[0],ue=X||at(H),fe=i(function(ht){var St=T.apply(A,Ii([ht],$));return x&&Ne?St[0]:St},"interceptor");ue&&m&&typeof le=="function"&&le.length!=1&&(X=ue=!1);var Ne=this.__chain__,He=!!this.__actions__.length,Ke=P&&!Ne,dt=X&&!He;if(!P&&ue){H=dt?H:new $e(this);var Ge=a.apply(H,$);return Ge.__actions__.push({func:rv,args:[fe],thisArg:e}),new Lt(Ge,Ne)}return Ke&&dt?a.apply(this,$):(Ge=this.thru(fe),Ke?x?Ge.value()[0]:Ge.value():Ge)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(a){var f=rd[a],m=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",x=/^(?:pop|shift)$/.test(a);A.prototype[a]=function(){var T=arguments;if(x&&!this.__chain__){var P=this.value();return f.apply(at(P)?P:[],T)}return this[m](function(H){return f.apply(at(H)?H:[],T)})}}),zi($e.prototype,function(a,f){var m=A[f];if(m){var x=m.name+"";kt.call(ja,x)||(ja[x]=[]),ja[x].push({name:f,func:m})}}),ja[Sd(e,Q).name]=[{name:"wrapper",func:e}],$e.prototype.clone=Ir,$e.prototype.reverse=Oc,$e.prototype.value=gw,A.prototype.at=SR,A.prototype.chain=xR,A.prototype.commit=CR,A.prototype.next=_R,A.prototype.plant=bR,A.prototype.reverse=TR,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=kR,A.prototype.first=A.prototype.head,$a&&(A.prototype[$a]=ER),A},"runInContext"),gn=Yl();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Rt._=gn,define(function(){return gn})):Ys?((Ys.exports=gn)._=gn,Yf._=gn):Rt._=gn}).call(sp)});var PA=rt((kx,Nx)=>{(function(e,t){typeof kx=="object"&&typeof Nx<"u"?Nx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})(kx,function(){"use strict";var e=i(function(s,l){return t(s.slice(),l)},"stable");e.inplace=function(s,l){var h=t(s,l);return h!==s&&n(h,null,s.length,s),s};function t(s,l){typeof l!="function"&&(l=i(function(b,k){return String(b).localeCompare(k)},"comp"));var h=s.length;if(h<=1)return s;for(var d=new Array(h),v=1;vv&&(R=v),I>v&&(I=v),z=k,q=R;;)if(z{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var l="",h=0;h{(function(e,t){typeof t_=="object"&&typeof r_<"u"?r_.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(t_,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),s=/MSIE \d/.test(e),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),h=/Edge\/(\d+)/.exec(e),d=s||l||h,v=d&&(s?document.documentMode||6:+(h||l)[1]),S=!h&&/WebKit\//.test(e),b=S&&/Qt\/\d+\.\d+/.test(e),k=!h&&/Chrome\/(\d+)/.exec(e),R=k&&+k[1],I=/Opera\//.test(e),z=/Apple Computer/.test(navigator.vendor),q=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),Q=/PhantomJS/.test(e),ne=z&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),D=/Android/.test(e),L=ne||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),B=ne||/Mac/.test(t),j=/\bCrOS\b/.test(e),re=/win/i.test(t),Z=I&&e.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(I=!1,S=!0);var oe=B&&(b||I&&(Z==null||Z<12.11)),he=n||d&&v>=9;function Re(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}i(Re,"classTest");var Ee=i(function(r,o){var c=r.className,u=Re(o).exec(c);if(u){var p=c.slice(u.index+u[0].length);r.className=c.slice(0,u.index)+(p?u[1]+p:"")}},"rmClass");function Ye(r){for(var o=r.childNodes.length;o>0;--o)r.removeChild(r.firstChild);return r}i(Ye,"removeChildren");function tt(r,o){return Ye(r).appendChild(o)}i(tt,"removeChildrenAndAdd");function xe(r,o,c,u){var p=document.createElement(r);if(c&&(p.className=c),u&&(p.style.cssText=u),typeof o=="string")p.appendChild(document.createTextNode(o));else if(o)for(var g=0;g=o)return y+(o-g);y+=C-g,y+=c-y%c,g=C+1}}i(Ft,"countColumn");var se=i(function(){this.id=null,this.f=null,this.time=0,this.handler=yr(this.onTimeout,this)},"Delayed");se.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},se.prototype.set=function(r,o){this.f=o;var c=+new Date+r;(!this.id||c=o)return u+Math.min(y,o-p);if(p+=g-u,p+=c-p%c,u=g+1,p>=o)return u}}i(En,"findColumn");var no=[""];function Ho(r){for(;no.length<=r;)no.push(lt(no)+" ");return no[r]}i(Ho,"spaceStr");function lt(r){return r[r.length-1]}i(lt,"lst");function wr(r,o){for(var c=[],u=0;u"\x80"&&(r.toUpperCase()!=r.toLowerCase()||Bn.test(r))}i(Mi,"isWordCharBasic");function Gr(r,o){return o?o.source.indexOf("\\w")>-1&&Mi(r)?!0:o.test(r):Mi(r)}i(Gr,"isWordChar");function Yr(r){for(var o in r)if(r.hasOwnProperty(o)&&r[o])return!1;return!0}i(Yr,"isEmpty");var oo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function hi(r){return r.charCodeAt(0)>=768&&oo.test(r)}i(hi,"isExtendingChar");function Hn(r,o,c){for(;(c<0?o>0:oc?-1:1;;){if(o==c)return o;var p=(o+c)/2,g=u<0?Math.ceil(p):Math.floor(p);if(g==o)return r(g)?o:c;r(g)?c=g:o=g+u}}i(so,"findFirst");function bl(r,o,c,u){if(!r)return u(o,c,"ltr",0);for(var p=!1,g=0;go||o==c&&y.to==o)&&(u(Math.max(y.from,o),Math.min(y.to,c),y.level==1?"rtl":"ltr",g),p=!0)}p||u(o,c,"ltr")}i(bl,"iterateBidiSections");var Y=null;function ee(r,o,c){var u;Y=null;for(var p=0;po)return p;g.to==o&&(g.from!=g.to&&c=="before"?u=p:Y=p),g.from==o&&(g.from!=g.to&&c!="before"?u=p:Y=p)}return u??Y}i(ee,"getBidiPartAt");var Ce=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function c(E){return E<=247?r.charAt(E):1424<=E&&E<=1524?"R":1536<=E&&E<=1785?o.charAt(E-1536):1774<=E&&E<=2220?"r":8192<=E&&E<=8203?"w":E==8204?"b":"L"}i(c,"charType");var u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,p=/[stwN]/,g=/[LRr]/,y=/[Lb1n]/,C=/[1n]/;function _(E,O,F){this.level=E,this.from=O,this.to=F}return i(_,"BidiSpan"),function(E,O){var F=O=="ltr"?"L":"R";if(E.length==0||O=="ltr"&&!u.test(E))return!1;for(var K=E.length,V=[],te=0;te-1&&(u[o]=p.slice(0,g).concat(p.slice(g+1)))}}}i(Yt,"off");function Mt(r,o){var c=Xr(r,o);if(c.length)for(var u=Array.prototype.slice.call(arguments,2),p=0;p0}i(dn,"hasHandler");function zn(r){r.prototype.on=function(o,c){ze(this,o,c)},r.prototype.off=function(o,c){Yt(this,o,c)}}i(zn,"eventMixin");function kr(r){r.preventDefault?r.preventDefault():r.returnValue=!1}i(kr,"e_preventDefault");function gs(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}i(gs,"e_stopPropagation");function bn(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}i(bn,"e_defaultPrevented");function Aa(r){kr(r),gs(r)}i(Aa,"e_stop");function Pa(r){return r.target||r.srcElement}i(Pa,"e_target");function nc(r){var o=r.which;return o==null&&(r.button&1?o=1:r.button&2?o=3:r.button&4&&(o=2)),B&&r.ctrlKey&&o==1&&(o=3),o}i(nc,"e_button");var ic=function(){if(d&&v<9)return!1;var r=xe("div");return"draggable"in r||"dragDrop"in r}(),oc;function $f(r){if(oc==null){var o=xe("span","\u200B");tt(r,xe("span",[o,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(oc=o.offsetWidth<=1&&o.offsetHeight>2&&!(d&&v<8))}var c=oc?xe("span","\u200B"):xe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}i($f,"zeroWidthElement");var sc;function Fp(r){if(sc!=null)return sc;var o=tt(r,document.createTextNode("A\u062EA")),c=je(o,0,1).getBoundingClientRect(),u=je(o,1,2).getBoundingClientRect();return Ye(r),!c||c.left==c.right?!1:sc=u.right-c.right<3}i(Fp,"hasBadBidiRects");var kl=` -b`.split(/\n/).length!=3?function(r){for(var o=0,u=[],a=r.length;o<=a;){var d=r.indexOf(` -`,o);d==-1&&(d=r.length);var m=r.slice(o,r.charAt(d-1)=="\r"?d-1:d),y=m.indexOf("\r");y!=-1?(u.push(m.slice(0,y)),o+=y+1):(u.push(m),o=d+1)}return u}:function(r){return r.split(/\r\n?|\n/)},Cd=window.getSelection?function(r){try{return r.selectionStart!=r.selectionEnd}catch{return!1}}:function(r){var o;try{o=r.ownerDocument.selection.createRange()}catch{}return!o||o.parentElement()!=r?!1:o.compareEndPoints("StartToEnd",o)!=0},Ed=function(){var r=Se("div");return"oncopy"in r?!0:(r.setAttribute("oncopy","return;"),typeof r.oncopy=="function")}(),da=null;function Mf(r){if(da!=null)return da;var o=tt(r,Se("span","x")),u=o.getBoundingClientRect(),a=qe(o,0,1).getBoundingClientRect();return da=Math.abs(u.left-a.left)>1}i(Mf,"hasBadZoomedRects");var Gu={},Xo={};function bd(r,o){arguments.length>2&&(o.dependencies=Array.prototype.slice.call(arguments,2)),Gu[r]=o}i(bd,"defineMode");function Td(r,o){Xo[r]=o}i(Td,"defineMIME");function dl(r){if(typeof r=="string"&&Xo.hasOwnProperty(r))r=Xo[r];else if(r&&typeof r.name=="string"&&Xo.hasOwnProperty(r.name)){var o=Xo[r.name];typeof o=="string"&&(o={name:o}),r=Bi(o,r),r.name=o.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return dl("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return dl("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}i(dl,"resolveMode");function Ku(r,o){o=dl(o);var u=Gu[o.name];if(!u)return Ku(r,"text/plain");var a=u(r,o);if(Wi.hasOwnProperty(o.name)){var d=Wi[o.name];for(var m in d)d.hasOwnProperty(m)&&(a.hasOwnProperty(m)&&(a["_"+m]=a[m]),a[m]=d[m])}if(a.name=o.name,o.helperType&&(a.helperType=o.helperType),o.modeProps)for(var y in o.modeProps)a[y]=o.modeProps[y];return a}i(Ku,"getMode");var Wi={};function Lf(r,o){var u=Wi.hasOwnProperty(r)?Wi[r]:Wi[r]={};qt(o,u)}i(Lf,"extendMode");function vi(r,o){if(o===!0)return o;if(r.copyState)return r.copyState(o);var u={};for(var a in o){var d=o[a];d instanceof Array&&(d=d.concat([])),u[a]=d}return u}i(vi,"copyState");function Yu(r,o){for(var u;r.innerMode&&(u=r.innerMode(o),!(!u||u.mode==r));)o=u.state,r=u.mode;return u||{mode:r,state:o}}i(Yu,"innerMode");function Xu(r,o,u){return r.startState?r.startState(o,u):!0}i(Xu,"startState");var rr=i(function(r,o,u){this.pos=this.start=0,this.string=r,this.tabSize=o||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u},"StringStream");rr.prototype.eol=function(){return this.pos>=this.string.length},rr.prototype.sol=function(){return this.pos==this.lineStart},rr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},rr.prototype.next=function(){if(this.poso},rr.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},rr.prototype.skipToEnd=function(){this.pos=this.string.length},rr.prototype.skipTo=function(r){var o=this.string.indexOf(r,this.pos);if(o>-1)return this.pos=o,!0},rr.prototype.backUp=function(r){this.pos-=r},rr.prototype.column=function(){return this.lastColumnPos0?null:(m&&o!==!1&&(this.pos+=m[0].length),m)}},rr.prototype.current=function(){return this.string.slice(this.start,this.pos)},rr.prototype.hideFirstChars=function(r,o){this.lineStart+=r;try{return o()}finally{this.lineStart-=r}},rr.prototype.lookAhead=function(r){var o=this.lineOracle;return o&&o.lookAhead(r)},rr.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Ae(r,o){if(o-=r.first,o<0||o>=r.size)throw new Error("There is no line "+(o+r.first)+" in the document.");for(var u=r;!u.lines;)for(var a=0;;++a){var d=u.children[a],m=d.chunkSize();if(o=r.first&&ou?ce(u,Ae(r,u).text.length):Pf(o,Ae(r,o.line).text.length)}i(Ve,"clipPos");function Pf(r,o){var u=r.ch;return u==null||u>o?ce(r.line,o):u<0?ce(r.line,0):r}i(Pf,"clipToLen");function ga(r,o){for(var u=[],a=0;athis.maxLookAhead&&(this.maxLookAhead=r),o},ri.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var o=this.baseTokens[this.baseTokenPos+1];return{type:o&&o.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},ri.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ri.fromSaved=function(r,o,u){return o instanceof Jo?new ri(r,vi(r.mode,o.state),u,o.lookAhead):new ri(r,vi(r.mode,o),u)},ri.prototype.save=function(r){var o=r!==!1?vi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Jo(o,this.maxLookAhead):o};function ma(r,o,u,a){var d=[r.state.modeGen],m={};tc(r,o.text,r.doc.mode,u,function(E,R){return d.push(E,R)},m,a);for(var y=u.state,_=i(function(E){u.baseTokens=d;var R=r.state.overlays[E],F=1,j=0;u.state=!0,tc(r,o.text,R.mode,u,function(V,te){for(var le=F;jV&&d.splice(F,1,V,d[F+1],pe),F+=2,j=Math.min(V,pe)}if(te)if(R.opaque)d.splice(le,F-le,V,"overlay "+te),F=le+2;else for(;ler.options.maxHighlightLength&&vi(r.doc.mode,a.state),m=ma(r,o,a);d&&(a.state=d),o.stateAfter=a.save(!d),o.styles=m.styles,m.classes?o.styleClasses=m.classes:o.styleClasses&&(o.styleClasses=null),u===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return o.styles}i(va,"getLineStyles");function Zo(r,o,u){var a=r.doc,d=r.display;if(!a.mode.startState)return new ri(a,!0,o);var m=Sa(r,o,u),y=m>a.first&&Ae(a,m-1).stateAfter,_=y?ri.fromSaved(a,y,m):new ri(a,Xu(a.mode),m);return a.iter(m,o,function(C){$i(r,C.text,_);var E=_.line;C.stateAfter=E==o-1||E%5==0||E>=d.viewFrom&&Eo.start)return m}throw new Error("Mode "+r.name+" failed to advance stream.")}i(Ns,"readToken");var Zu=i(function(r,o,u){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=o||null,this.state=u},"Token");function wa(r,o,u,a){var d=r.doc,m=d.mode,y;o=Ve(d,o);var _=Ae(d,o.line),C=Zo(r,o.line,u),E=new rr(_.text,r.options.tabSize,C),R;for(a&&(R=[]);(a||E.posr.options.maxHighlightLength?(_=!1,y&&$i(r,o,a,R.pos),R.pos=o.length,F=null):F=ec(Ns(u,R,a.state,j),m),j){var V=j[0].name;V&&(F="m-"+(F?V+" "+F:V))}if(!_||E!=F){for(;Cy;--_){if(_<=m.first)return m.first;var C=Ae(m,_-1),E=C.stateAfter;if(E&&(!u||_+(E instanceof Jo?E.lookAhead:0)<=m.modeFrontier))return _;var R=Rt(C.text,null,r.options.tabSize);(d==null||a>R)&&(d=_-1,a=R)}return d}i(Sa,"findStartLine");function ml(r,o){if(r.modeFrontier=Math.min(r.modeFrontier,o),!(r.highlightFrontieru;a--){var d=Ae(r,a).stateAfter;if(d&&(!(d instanceof Jo)||a+d.lookAhead=o:m.to>o);(a||(a=[])).push(new xa(y,m.from,C?null:m.to))}}return a}i(Od,"markedSpansBefore");function Ad(r,o,u){var a;if(r)for(var d=0;d=o:m.to>o);if(_||m.from==o&&y.type=="bookmark"&&(!u||m.marker.insertLeft)){var C=m.from==null||(y.inclusiveLeft?m.from<=o:m.from0&&_)for(var Te=0;Te<_.length;++Te)_[Te].to==null&&(ve||(ve=[])).push(new xa(_[Te].marker,null,null));for(var Ie=0;Ie<_e;++Ie)ye.push(ve);ye.push(C)}return ye}i(ic,"stretchSpansOverChange");function Df(r){for(var o=0;o0)){var R=[C,1],F=$e(E.from,_.from),j=$e(E.to,_.to);(F<0||!y.inclusiveLeft&&!F)&&R.push({from:E.from,to:_.from}),(j>0||!y.inclusiveRight&&!j)&&R.push({from:_.to,to:E.to}),d.splice.apply(d,R),C+=R.length-3}}return d}i(Md,"removeReadOnlyRanges");function Dt(r){var o=r.markedSpans;if(o){for(var u=0;uo)&&(!a||Os(a,m.marker)<0)&&(a=m.marker)}return a}i(yl,"collapsedSpanAround");function Ld(r,o,u,a,d){var m=Ae(r,o),y=wi&&m.markedSpans;if(y)for(var _=0;_=0&&F<=0||R<=0&&F>=0)&&(R<=0&&(C.marker.inclusiveRight&&d.inclusiveLeft?$e(E.to,u)>=0:$e(E.to,u)>0)||R>=0&&(C.marker.inclusiveRight&&d.inclusiveLeft?$e(E.from,a)<=0:$e(E.from,a)<0)))return!0}}}i(Ld,"conflictingCollapsedRange");function Mt(r){for(var o;o=_a(r);)r=o.find(-1,!0).line;return r}i(Mt,"visualLine");function If(r){for(var o;o=me(r);)r=o.find(1,!0).line;return r}i(If,"visualLineEnd");function As(r){for(var o,u;o=me(r);)r=o.find(1,!0).line,(u||(u=[])).push(r);return u}i(As,"visualLineContinued");function wl(r,o){var u=Ae(r,o),a=Mt(u);return u==a?o:mt(a)}i(wl,"visualLineNo");function xo(r,o){if(o>r.lastLine())return o;var u=Ae(r,o),a;if(!we(r,u))return o;for(;a=me(u);)u=a.find(1,!0).line;return mt(u)+1}i(xo,"visualLineEndNo");function we(r,o){var u=wi&&o.markedSpans;if(u){for(var a=void 0,d=0;do.maxLineLength&&(o.maxLineLength=d,o.maxLine=a)})}i(Ca,"findMaxLine");var sn=i(function(r,o,u){this.text=r,At(this,o),this.height=u?u(this):1},"Line");sn.prototype.lineNo=function(){return mt(this)},Rn(sn);function Ea(r,o,u,a){r.text=o,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),Dt(r),At(r,u);var d=a?a(r):1;d!=r.height&&yi(r,d)}i(Ea,"updateLine");function Gr(r){r.parent=null,Dt(r)}i(Gr,"cleanUpLine");var ba={},qn={};function Ff(r,o){if(!r||/^\s*$/.test(r))return null;var u=o.addModeClass?qn:ba;return u[r]||(u[r]=r.replace(/\S+/g,"cm-$&"))}i(Ff,"interpretTokenStyle");function oc(r,o){var u=Xe("span",null,null,S?"padding-right: .1px":null),a={pre:Xe("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};o.measure={};for(var d=0;d<=(o.rest?o.rest.length:0);d++){var m=d?o.rest[d-1]:o.line,y=void 0;a.pos=0,a.addToken=Sl,_d(r.display.measure)&&(y=Le(m,r.doc.direction))&&(a.addToken=zt(a.addToken,y)),a.map=[];var _=o!=r.display.externalMeasured&&mt(m);sc(m,a,va(r,m,_)),m.styleClasses&&(m.styleClasses.bgClass&&(a.bgClass=Tt(m.styleClasses.bgClass,a.bgClass||"")),m.styleClasses.textClass&&(a.textClass=Tt(m.styleClasses.textClass,a.textClass||""))),a.map.length==0&&a.map.push(0,0,a.content.appendChild(Af(r.display.measure))),d==0?(o.measure.map=a.map,o.measure.cache={}):((o.measure.maps||(o.measure.maps=[])).push(a.map),(o.measure.caches||(o.measure.caches=[])).push({}))}if(S){var C=a.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(a.content.className="cm-tab-wrap-hack")}return Ot(r,"renderLine",r,o.line,a.pre),a.pre.className&&(a.textClass=Tt(a.pre.className,a.textClass||"")),a}i(oc,"buildLineContent");function $t(r){var o=Se("span","\u2022","cm-invalidchar");return o.title="\\u"+r.charCodeAt(0).toString(16),o.setAttribute("aria-label",o.title),o}i($t,"defaultSpecialCharPlaceholder");function Sl(r,o,u,a,d,m,y){if(o){var _=r.splitSpaces?Ta(o,r.trailingSpace):o,C=r.cm.state.specialChars,E=!1,R;if(!C.test(o))r.col+=o.length,R=document.createTextNode(_),r.map.push(r.pos,r.pos+o.length,R),p&&v<9&&(E=!0),r.pos+=o.length;else{R=document.createDocumentFragment();for(var F=0;;){C.lastIndex=F;var j=C.exec(o),V=j?j.index-F:o.length-F;if(V){var te=document.createTextNode(_.slice(F,F+V));p&&v<9?R.appendChild(Se("span",[te])):R.appendChild(te),r.map.push(r.pos,r.pos+V,te),r.col+=V,r.pos+=V}if(!j)break;F+=V+1;var le=void 0;if(j[0]==" "){var pe=r.cm.options.tabSize,ye=pe-r.col%pe;le=R.appendChild(Se("span",wo(ye),"cm-tab")),le.setAttribute("role","presentation"),le.setAttribute("cm-text"," "),r.col+=ye}else j[0]=="\r"||j[0]==` -`?(le=R.appendChild(Se("span",j[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),le.setAttribute("cm-text",j[0]),r.col+=1):(le=r.cm.options.specialCharPlaceholder(j[0]),le.setAttribute("cm-text",j[0]),p&&v<9?R.appendChild(Se("span",[le])):R.appendChild(le),r.col+=1);r.map.push(r.pos,r.pos+1,le),r.pos++}}if(r.trailingSpace=_.charCodeAt(o.length-1)==32,u||a||d||E||m||y){var _e=u||"";a&&(_e+=a),d&&(_e+=d);var ve=Se("span",[R],_e,m);if(y)for(var Te in y)y.hasOwnProperty(Te)&&Te!="style"&&Te!="class"&&ve.setAttribute(Te,y[Te]);return r.content.appendChild(ve)}r.content.appendChild(R)}}i(Sl,"buildToken");function Ta(r,o){if(r.length>1&&!/ /.test(r))return r;for(var u=o,a="",d=0;dE&&F.from<=E));j++);if(F.to>=R)return r(u,a,d,m,y,_,C);r(u,a.slice(0,F.to-E),d,m,null,_,C),m=null,a=a.slice(F.to-E),E=F.to}}}i(zt,"buildTokenBadBidi");function Si(r,o,u,a){var d=!a&&u.widgetNode;d&&r.map.push(r.pos,r.pos+o,d),!a&&r.cm.display.input.needsContentAttribute&&(d||(d=r.content.appendChild(document.createElement("span"))),d.setAttribute("cm-marker",u.id)),d&&(r.cm.display.input.setUneditable(d),r.content.appendChild(d)),r.pos+=o,r.trailingSpace=!1}i(Si,"buildCollapsedSpan");function sc(r,o,u){var a=r.markedSpans,d=r.text,m=0;if(!a){for(var y=1;yC||it.collapsed&&Pe.to==C&&Pe.from==C)){if(Pe.to!=null&&Pe.to!=C&&V>Pe.to&&(V=Pe.to,le=""),it.className&&(te+=" "+it.className),it.css&&(j=(j?j+";":"")+it.css),it.startStyle&&Pe.from==C&&(pe+=" "+it.startStyle),it.endStyle&&Pe.to==V&&(Te||(Te=[])).push(it.endStyle,Pe.to),it.title&&((_e||(_e={})).title=it.title),it.attributes)for(var Lt in it.attributes)(_e||(_e={}))[Lt]=it.attributes[Lt];it.collapsed&&(!ye||Os(ye.marker,it)<0)&&(ye=Pe)}else Pe.from>C&&V>Pe.from&&(V=Pe.from)}if(Te)for(var cr=0;cr=_)break;for(var ir=Math.min(_,V);;){if(R){var vr=C+R.length;if(!ye){var yr=vr>ir?R.slice(0,ir-C):R;o.addToken(o,yr,F?F+te:te,pe,C+yr.length==V?le:"",j,_e)}if(vr>=ir){R=R.slice(ir-C),C=ir;break}C=vr,pe=""}R=d.slice(m,m=u[E++]),F=Ff(u[E++],o.cm.options)}}}i(sc,"insertLineContent");function Bf(r,o,u){this.line=o,this.rest=As(o),this.size=this.rest?mt(at(this.rest))-u+1:1,this.node=this.text=null,this.hidden=we(r,o)}i(Bf,"LineView");function Ls(r,o,u){for(var a=[],d,m=o;m2&&m.push((C.bottom+E.top)/2-u.top)}}m.push(u.bottom-u.top)}}i(es,"ensureLineHeights");function Uf(r,o,u){if(r.line==o)return{map:r.measure.map,cache:r.measure.cache};if(r.rest){for(var a=0;au)return{map:r.measure.maps[d],cache:r.measure.caches[d],before:!0}}}i(Uf,"mapFromLineView");function Dd(r,o){o=Mt(o);var u=mt(o),a=r.display.externalMeasured=new Bf(r.doc,o,u);a.lineN=u;var d=a.built=oc(r,a);return a.text=d.pre,tt(r.display.lineMeasure,d.pre),a}i(Dd,"updateExternalMeasurement");function La(r,o,u,a){return w(r,Sn(r,o),u,a)}i(La,"measureChar");function Pa(r,o){if(o>=r.display.viewFrom&&o=u.lineN&&oo)&&(m=C-_,d=m-1,o>=C&&(y="right")),d!=null){if(a=r[E+2],_==C&&u==(a.insertLeft?"left":"right")&&(y=u),u=="left"&&d==0)for(;E&&r[E-2]==r[E-3]&&r[E-1].insertLeft;)a=r[(E-=3)+2],y="left";if(u=="right"&&d==C-_)for(;E=0&&(u=r[d]).left==u.right;d--);return u}i(U,"getUsefulRect");function an(r,o,u,a){var d=W(o.map,u,a),m=d.node,y=d.start,_=d.end,C=d.collapse,E;if(m.nodeType==3){for(var R=0;R<4;R++){for(;y&&ti(o.line.text.charAt(d.coverStart+y));)--y;for(;d.coverStart+_0&&(C=a="right");var F;r.options.lineWrapping&&(F=m.getClientRects()).length>1?E=F[a=="right"?F.length-1:0]:E=m.getBoundingClientRect()}if(p&&v<9&&!y&&(!E||!E.left&&!E.right)){var j=m.parentNode.getClientRects()[0];j?E={left:j.left,right:j.left+ts(r.display),top:j.top,bottom:j.bottom}:E=N}for(var V=E.top-o.rect.top,te=E.bottom-o.rect.top,le=(V+te)/2,pe=o.view.measure.heights,ye=0;ye=a.text.length?(C=a.text.length,E="before"):C<=0&&(C=0,E="after"),!_)return y(E=="before"?C-1:C,E=="before");function R(te,le,pe){var ye=_[le],_e=ye.level==1;return y(pe?te-1:te,_e!=pe)}i(R,"getBidi");var F=ee(_,C,E),j=Y,V=R(C,F,E=="before");return j!=null&&(V.other=R(C,j,E!="before")),V}i(J,"cursorCoords");function Oe(r,o){var u=0;o=Ve(r.doc,o),r.options.lineWrapping||(u=ts(r.display)*o.ch);var a=Ae(r.doc,o.line),d=ii(a)+Ds(r.display);return{left:u,right:u,top:d,bottom:d+a.height}}i(Oe,"estimateCoords");function Je(r,o,u,a,d){var m=ce(r,o,u);return m.xRel=d,a&&(m.outside=a),m}i(Je,"PosWithInfo");function vt(r,o,u){var a=r.doc;if(u+=r.display.viewOffset,u<0)return Je(a.first,0,null,-1,-1);var d=Qo(a,u),m=a.first+a.size-1;if(d>m)return Je(a.first+a.size-1,Ae(a,m).text.length,null,1,1);o<0&&(o=0);for(var y=Ae(a,d);;){var _=B0(r,y,d,o,u),C=yl(y,_.ch+(_.xRel>0||_.outside>0?1:0));if(!C)return _;var E=C.find(1);if(E.line==d)return E;y=Ae(a,d=E.line)}}i(vt,"coordsChar");function br(r,o,u,a){a-=Ra(o);var d=o.text.length,m=zi(function(y){return w(r,u,y-1).bottom<=a},d,0);return d=zi(function(y){return w(r,u,y).top>a},m,d),{begin:m,end:d}}i(br,"wrappedLineExtent");function It(r,o,u,a){u||(u=Sn(r,o));var d=un(r,o,w(r,u,a),"line").top;return br(r,o,u,d)}i(It,"wrappedLineExtentChar");function hc(r,o,u,a){return r.bottom<=u?!1:r.top>u?!0:(a?r.left:r.right)>o}i(hc,"boxIsAfter");function B0(r,o,u,a,d){d-=ii(o);var m=Sn(r,o),y=Ra(o),_=0,C=o.text.length,E=!0,R=Le(o,r.doc.direction);if(R){var F=(r.options.lineWrapping?$f:_i)(r,o,u,m,R,a,d);E=F.level!=1,_=E?F.from:F.to-1,C=E?F.to:F.from-1}var j=null,V=null,te=zi(function(Ie){var Pe=w(r,m,Ie);return Pe.top+=y,Pe.bottom+=y,hc(Pe,a,d,!1)?(Pe.top<=d&&Pe.left<=a&&(j=Ie,V=Pe),!0):!1},_,C),le,pe,ye=!1;if(V){var _e=a-V.left=Te.bottom?1:0}return te=Pn(o.text,te,1),Je(u,te,pe,ye,a-le)}i(B0,"coordsCharInner");function _i(r,o,u,a,d,m,y){var _=zi(function(F){var j=d[F],V=j.level!=1;return hc(J(r,ce(u,V?j.to:j.from,V?"before":"after"),"line",o,a),m,y,!0)},0,d.length-1),C=d[_];if(_>0){var E=C.level!=1,R=J(r,ce(u,E?C.from:C.to,E?"after":"before"),"line",o,a);hc(R,m,y,!0)&&R.top>y&&(C=d[_-1])}return C}i(_i,"coordsBidiPart");function $f(r,o,u,a,d,m,y){var _=br(r,o,a,y),C=_.begin,E=_.end;/\s/.test(o.text.charAt(E-1))&&E--;for(var R=null,F=null,j=0;j=E||V.to<=C)){var te=V.level!=1,le=w(r,a,te?Math.min(E,V.to)-1:Math.max(C,V.from)).right,pe=lepe)&&(R=V,F=pe)}}return R||(R=d[d.length-1]),R.fromE&&(R={from:R.from,to:E,level:R.level}),R}i($f,"coordsBidiPartWrapped");var _l;function ji(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(_l==null){_l=Se("pre",null,"CodeMirror-line-like");for(var o=0;o<49;++o)_l.appendChild(document.createTextNode("x")),_l.appendChild(Se("br"));_l.appendChild(document.createTextNode("x"))}tt(r.measure,_l);var u=_l.offsetHeight/50;return u>3&&(r.cachedTextHeight=u),Ye(r.measure),u||1}i(ji,"textHeight");function ts(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var o=Se("span","xxxxxxxxxx"),u=Se("pre",[o],"CodeMirror-line-like");tt(r.measure,u);var a=o.getBoundingClientRect(),d=(a.right-a.left)/10;return d>2&&(r.cachedCharWidth=d),d||10}i(ts,"charWidth");function Da(r){for(var o=r.display,u={},a={},d=o.gutters.clientLeft,m=o.gutters.firstChild,y=0;m;m=m.nextSibling,++y){var _=r.display.gutterSpecs[y].className;u[_]=m.offsetLeft+m.clientLeft+d,a[_]=m.clientWidth}return{fixedPos:Ct(o),gutterTotalWidth:o.gutters.offsetWidth,gutterLeft:u,gutterWidth:a,wrapperWidth:o.wrapper.clientWidth}}i(Da,"getDimensions");function Ct(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}i(Ct,"compensateForHScroll");function Jg(r){var o=ji(r.display),u=r.options.lineWrapping,a=u&&Math.max(5,r.display.scroller.clientWidth/ts(r.display)-3);return function(d){if(we(r.doc,d))return 0;var m=0;if(d.widgets)for(var y=0;y0&&(E=Ae(r.doc,C.line).text).length==C.ch){var R=Rt(E,E.length,r.options.tabSize)-E.length;C=ce(C.line,Math.max(0,Math.round((m-pc(r.display).left)/ts(r.display))-R))}return C}i(To,"posFromMouse");function Cl(r,o){if(o>=r.display.viewTo||(o-=r.display.viewFrom,o<0))return null;for(var u=r.display.view,a=0;ao)&&(d.updateLineNumbers=o),r.curOp.viewChanged=!0,o>=d.viewTo)wi&&wl(r.doc,o)d.viewFrom?Gi(r):(d.viewFrom+=a,d.viewTo+=a);else if(o<=d.viewFrom&&u>=d.viewTo)Gi(r);else if(o<=d.viewFrom){var m=Ki(r,u,u+a,1);m?(d.view=d.view.slice(m.index),d.viewFrom=m.lineN,d.viewTo+=a):Gi(r)}else if(u>=d.viewTo){var y=Ki(r,o,o,-1);y?(d.view=d.view.slice(0,y.index),d.viewTo=y.lineN):Gi(r)}else{var _=Ki(r,o,o,-1),C=Ki(r,u,u+a,1);_&&C?(d.view=d.view.slice(0,_.index).concat(Ls(r,_.lineN,C.lineN)).concat(d.view.slice(C.index)),d.viewTo+=a):Gi(r)}var E=d.externalMeasured;E&&(u=d.lineN&&o=a.viewTo)){var m=a.view[Cl(r,o)];if(m.node!=null){var y=m.changes||(m.changes=[]);ze(y,u)==-1&&y.push(u)}}}i(Is,"regLineChange");function Gi(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}i(Gi,"resetView");function Ki(r,o,u,a){var d=Cl(r,o),m,y=r.display.view;if(!wi||u==r.doc.first+r.doc.size)return{index:d,lineN:u};for(var _=r.display.viewFrom,C=0;C0){if(d==y.length-1)return null;m=_+y[d].size-o,d++}else m=_-o;o+=m,u+=m}for(;wl(r.doc,u)!=u;){if(d==(a<0?0:y.length-1))return null;u+=a*y[d-(a<0?1:0)].size,d+=a}return{index:d,lineN:u}}i(Ki,"viewCuttingPoint");function qf(r,o,u){var a=r.display,d=a.view;d.length==0||o>=a.viewTo||u<=a.viewFrom?(a.view=Ls(r,o,u),a.viewFrom=o):(a.viewFrom>o?a.view=Ls(r,o,a.viewFrom).concat(a.view):a.viewFromu&&(a.view=a.view.slice(0,Cl(r,u)))),a.viewTo=u}i(qf,"adjustView");function Id(r){for(var o=r.display.view,u=0,a=0;a=r.display.viewTo||C.to().line0?y:r.defaultCharWidth())+"px"}if(a.other){var _=u.appendChild(Se("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));_.style.display="",_.style.left=a.other.left+"px",_.style.top=a.other.top+"px",_.style.height=(a.other.bottom-a.other.top)*.85+"px"}}i(jf,"drawSelectionCursor");function El(r,o){return r.top-o.top||r.left-o.left}i(El,"cmpCoords");function Zg(r,o,u){var a=r.display,d=r.doc,m=document.createDocumentFragment(),y=pc(r.display),_=y.left,C=Math.max(a.sizerWidth,Co(r)-a.sizer.offsetLeft)-y.right,E=d.direction=="ltr";function R(ve,Te,Ie,Pe){Te<0&&(Te=0),Te=Math.round(Te),Pe=Math.round(Pe),m.appendChild(Se("div",null,"CodeMirror-selected","position: absolute; left: "+ve+`px; - top: `+Te+"px; width: "+(Ie??C-ve)+`px; - height: `+(Pe-Te)+"px"))}i(R,"add");function F(ve,Te,Ie){var Pe=Ae(d,ve),it=Pe.text.length,Lt,cr;function Kt(yr,_n){return ne(r,ce(ve,yr),"div",Pe,_n)}i(Kt,"coords");function ir(yr,_n,Xr){var kr=It(r,Pe,null,yr),wr=_n=="ltr"==(Xr=="after")?"left":"right",or=Xr=="after"?kr.begin:kr.end-(/\s/.test(Pe.text.charAt(kr.end-1))?2:1);return Kt(or,wr)[wr]}i(ir,"wrapX");var vr=Le(Pe,d.direction);return ca(vr,Te||0,Ie??it,function(yr,_n,Xr,kr){var wr=Xr=="ltr",or=Kt(yr,wr?"left":"right"),Fn=Kt(_n-1,wr?"right":"left"),nu=Te==null&&yr==0,Ys=Ie==null&&_n==it,fn=kr==0,Lo=!vr||kr==vr.length-1;if(Fn.top-or.top<=3){var Br=(E?nu:Ys)&&fn,dh=(E?Ys:nu)&&Lo,Po=Br?_:(wr?or:Fn).left,Xs=dh?C:(wr?Fn:or).right;R(Po,or.top,Xs-Po,or.bottom)}else{var Qs,Cn,iu,hh;wr?(Qs=E&&nu&&fn?_:or.left,Cn=E?C:ir(yr,Xr,"before"),iu=E?_:ir(_n,Xr,"after"),hh=E&&Ys&&Lo?C:Fn.right):(Qs=E?ir(yr,Xr,"before"):_,Cn=!E&&nu&&fn?C:or.right,iu=!E&&Ys&&Lo?_:Fn.left,hh=E?ir(_n,Xr,"after"):C),R(Qs,or.top,Cn-Qs,or.bottom),or.bottom0?o.blinker=setInterval(function(){r.hasFocus()||Fa(r),o.cursorDiv.style.visibility=(u=!u)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(o.cursorDiv.style.visibility="hidden")}}i(bl,"restartBlink");function Bs(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||Bd(r))}i(Bs,"ensureFocus");function Ia(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&Fa(r))},100)}i(Ia,"delayBlurEvent");function Bd(r,o){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(Ot(r,"focus",r,o),r.state.focused=!0,Pt(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),S&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),bl(r))}i(Bd,"onFocus");function Fa(r,o){r.state.delayingBlurEvent||(r.state.focused&&(Ot(r,"blur",r,o),r.state.focused=!1,Ce(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}i(Fa,"onBlur");function Gf(r){for(var o=r.display,u=o.lineDiv.offsetTop,a=Math.max(0,o.scroller.getBoundingClientRect().top),d=o.lineDiv.getBoundingClientRect().top,m=0,y=0;y.005||V<-.005)&&(dr.display.sizerWidth){var le=Math.ceil(R/ts(r.display));le>r.display.maxLineLength&&(r.display.maxLineLength=le,r.display.maxLine=_.line,r.display.maxLineChanged=!0)}}}Math.abs(m)>2&&(o.scroller.scrollTop+=m)}i(Gf,"updateHeightsInViewport");function gc(r){if(r.widgets)for(var o=0;o=y&&(m=Qo(o,ii(Ae(o,C))-r.wrapper.clientHeight),y=C)}return{from:m,to:Math.max(y,m+1)}}i(Tl,"visibleLines");function Hd(r,o){if(!kt(r,"scrollCursorIntoView")){var u=r.display,a=u.sizer.getBoundingClientRect(),d=null,m=u.wrapper.ownerDocument;if(o.top+a.top<0?d=!0:o.bottom+a.top>(m.defaultView.innerHeight||m.documentElement.clientHeight)&&(d=!1),d!=null&&!Q){var y=Se("div","\u200B",null,`position: absolute; - top: `+(o.top-u.viewOffset-Ds(r.display))+`px; - height: `+(o.bottom-o.top+xi(r)+u.barHeight)+`px; - left: `+o.left+"px; width: "+Math.max(2,o.right-o.left)+"px;");r.display.lineSpace.appendChild(y),y.scrollIntoView(d),r.display.lineSpace.removeChild(y)}}}i(Hd,"maybeScrollWindow");function H0(r,o,u,a){a==null&&(a=0);var d;!r.options.lineWrapping&&o==u&&(u=o.sticky=="before"?ce(o.line,o.ch+1,"before"):o,o=o.ch?ce(o.line,o.sticky=="before"?o.ch-1:o.ch,"after"):o);for(var m=0;m<5;m++){var y=!1,_=J(r,o),C=!u||u==o?_:J(r,u);d={left:Math.min(_.left,C.left),top:Math.min(_.top,C.top)-a,right:Math.max(_.left,C.left),bottom:Math.max(_.bottom,C.bottom)+a};var E=zd(r,d),R=r.doc.scrollTop,F=r.doc.scrollLeft;if(E.scrollTop!=null&&(mc(r,E.scrollTop),Math.abs(r.doc.scrollTop-R)>1&&(y=!0)),E.scrollLeft!=null&&(Yi(r,E.scrollLeft),Math.abs(r.doc.scrollLeft-F)>1&&(y=!0)),!y)break}return d}i(H0,"scrollPosIntoView");function em(r,o){var u=zd(r,o);u.scrollTop!=null&&mc(r,u.scrollTop),u.scrollLeft!=null&&Yi(r,u.scrollLeft)}i(em,"scrollIntoView");function zd(r,o){var u=r.display,a=ji(r.display);o.top<0&&(o.top=0);var d=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:u.scroller.scrollTop,m=Ma(r),y={};o.bottom-o.top>m&&(o.bottom=o.top+m);var _=r.doc.height+Aa(u),C=o.top_-a;if(o.topd+m){var R=Math.min(o.top,(E?_:o.bottom)-m);R!=d&&(y.scrollTop=R)}var F=r.options.fixedGutter?0:u.gutters.offsetWidth,j=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:u.scroller.scrollLeft-F,V=Co(r)-u.gutters.offsetWidth,te=o.right-o.left>V;return te&&(o.right=o.left+V),o.left<10?y.scrollLeft=0:o.leftV+j-3&&(y.scrollLeft=o.right+(te?0:10)-V),y}i(zd,"calculateScrollPos");function Wd(r,o){o!=null&&(Kf(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+o)}i(Wd,"addToScrollTop");function Qt(r){Kf(r);var o=r.getCursor();r.curOp.scrollToPos={from:o,to:o,margin:r.options.cursorScrollMargin}}i(Qt,"ensureCursorVisible");function Tr(r,o,u){(o!=null||u!=null)&&Kf(r),o!=null&&(r.curOp.scrollLeft=o),u!=null&&(r.curOp.scrollTop=u)}i(Tr,"scrollToCoords");function z0(r,o){Kf(r),r.curOp.scrollToPos=o}i(z0,"scrollToRange");function Kf(r){var o=r.curOp.scrollToPos;if(o){r.curOp.scrollToPos=null;var u=Oe(r,o.from),a=Oe(r,o.to);Ud(r,u,a,o.margin)}}i(Kf,"resolveScrollToPos");function Ud(r,o,u,a){var d=zd(r,{left:Math.min(o.left,u.left),top:Math.min(o.top,u.top)-a,right:Math.max(o.right,u.right),bottom:Math.max(o.bottom,u.bottom)+a});Tr(r,d.scrollLeft,d.scrollTop)}i(Ud,"scrollToCoordsRange");function mc(r,o){Math.abs(r.doc.scrollTop-o)<2||(n||Xi(r,{top:o}),Yf(r,o,!0),n&&Xi(r),wc(r,100))}i(mc,"updateScrollTop");function Yf(r,o,u){o=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,o)),!(r.display.scroller.scrollTop==o&&!u)&&(r.doc.scrollTop=o,r.display.scrollbars.setScrollTop(o),r.display.scroller.scrollTop!=o&&(r.display.scroller.scrollTop=o))}i(Yf,"setScrollTop");function Yi(r,o,u,a){o=Math.max(0,Math.min(o,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((u?o==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-o)<2)&&!a)&&(r.doc.scrollLeft=o,im(r),r.display.scroller.scrollLeft!=o&&(r.display.scroller.scrollLeft=o),r.display.scrollbars.setScrollLeft(o))}i(Yi,"setScrollLeft");function kl(r){var o=r.display,u=o.gutters.offsetWidth,a=Math.round(r.doc.height+Aa(r.display));return{clientHeight:o.scroller.clientHeight,viewHeight:o.wrapper.clientHeight,scrollWidth:o.scroller.scrollWidth,clientWidth:o.scroller.clientWidth,viewWidth:o.wrapper.clientWidth,barLeft:r.options.fixedGutter?u:0,docHeight:a,scrollHeight:a+xi(r)+o.barHeight,nativeBarWidth:o.nativeBarWidth,gutterWidth:u}}i(kl,"measureForScrollbars");var Ci=i(function(r,o,u){this.cm=u;var a=this.vert=Se("div",[Se("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),d=this.horiz=Se("div",[Se("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a.tabIndex=d.tabIndex=-1,r(a),r(d),He(a,"scroll",function(){a.clientHeight&&o(a.scrollTop,"vertical")}),He(d,"scroll",function(){d.clientWidth&&o(d.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Ci.prototype.update=function(r){var o=r.scrollWidth>r.clientWidth+1,u=r.scrollHeight>r.clientHeight+1,a=r.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=o?a+"px":"0";var d=r.viewHeight-(o?a:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+d)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(o){this.horiz.style.display="block",this.horiz.style.right=u?a+"px":"0",this.horiz.style.left=r.barLeft+"px";var m=r.viewWidth-r.barLeft-(u?a:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+m)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(a==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?a:0,bottom:o?a:0}},Ci.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ci.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ci.prototype.zeroWidthHack=function(){var r=B&&!q?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new se,this.disableVert=new se},Ci.prototype.enableZeroWidthBar=function(r,o,u){r.style.visibility="";function a(){var d=r.getBoundingClientRect(),m=u=="vert"?document.elementFromPoint(d.right-1,(d.top+d.bottom)/2):document.elementFromPoint((d.right+d.left)/2,d.bottom-1);m!=r?r.style.visibility="hidden":o.set(1e3,a)}i(a,"maybeDisable"),o.set(1e3,a)},Ci.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var rs=i(function(){},"NullScrollbars");rs.prototype.update=function(){return{bottom:0,right:0}},rs.prototype.setScrollLeft=function(){},rs.prototype.setScrollTop=function(){},rs.prototype.clear=function(){};function ko(r,o){o||(o=kl(r));var u=r.display.barWidth,a=r.display.barHeight;vc(r,o);for(var d=0;d<4&&u!=r.display.barWidth||a!=r.display.barHeight;d++)u!=r.display.barWidth&&r.options.lineWrapping&&Gf(r),vc(r,kl(r)),u=r.display.barWidth,a=r.display.barHeight}i(ko,"updateScrollbars");function vc(r,o){var u=r.display,a=u.scrollbars.update(o);u.sizer.style.paddingRight=(u.barWidth=a.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=a.bottom)+"px",u.heightForcer.style.borderBottom=a.bottom+"px solid transparent",a.right&&a.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=a.bottom+"px",u.scrollbarFiller.style.width=a.right+"px"):u.scrollbarFiller.style.display="",a.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=a.bottom+"px",u.gutterFiller.style.width=o.gutterWidth+"px"):u.gutterFiller.style.display=""}i(vc,"updateScrollbarsInner");var Nl={native:Ci,null:rs};function tm(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&Ce(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Nl[r.options.scrollbarStyle](function(o){r.display.wrapper.insertBefore(o,r.display.scrollbarFiller),He(o,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),o.setAttribute("cm-not-content","true")},function(o,u){u=="horizontal"?Yi(r,o):mc(r,o)},r),r.display.scrollbars.addClass&&Pt(r.display.wrapper,r.display.scrollbars.addClass)}i(tm,"initScrollbars");var W0=0;function Ol(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++W0,markArrays:null},Hf(r.curOp)}i(Ol,"startOperation");function Al(r){var o=r.curOp;o&&lc(o,function(u){for(var a=0;a=u.viewTo)||u.maxLineChanged&&o.options.lineWrapping,r.update=r.mustUpdate&&new No(o,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}i(Xf,"endOperation_R1");function yc(r){r.updatedDisplay=r.mustUpdate&&$d(r.cm,r.update)}i(yc,"endOperation_W1");function rm(r){var o=r.cm,u=o.display;r.updatedDisplay&&Gf(o),r.barMeasure=kl(o),u.maxLineChanged&&!o.options.lineWrapping&&(r.adjustWidthTo=La(o,u.maxLine,u.maxLine.text.length).left+3,o.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+r.adjustWidthTo+xi(o)+o.display.barWidth),r.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+r.adjustWidthTo-Co(o))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=u.input.prepareSelection())}i(rm,"endOperation_R2");function O(r){var o=r.cm;r.adjustWidthTo!=null&&(o.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var u=+new Date+r.options.workTime,a=Zo(r,o.highlightFrontier),d=[];o.iter(a.line,Math.min(o.first+o.size,r.display.viewTo+500),function(m){if(a.line>=r.display.viewFrom){var y=m.styles,_=m.text.length>r.options.maxHighlightLength?vi(o.mode,a.state):null,C=ma(r,m,a,!0);_&&(a.state=_),m.styles=C.styles;var E=m.styleClasses,R=C.classes;R?m.styleClasses=R:E&&(m.styleClasses=null);for(var F=!y||y.length!=m.styles.length||E!=R&&(!E||!R||E.bgClass!=R.bgClass||E.textClass!=R.textClass),j=0;!F&&ju)return wc(r,r.options.workDelay),!0}),o.highlightFrontier=a.line,o.modeFrontier=Math.max(o.modeFrontier,a.line),d.length&&cn(r,function(){for(var m=0;m=u.viewFrom&&o.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&Id(r)==0)return!1;om(r)&&(Gi(r),o.dims=Da(r));var d=a.first+a.size,m=Math.max(o.visible.from-r.options.viewportMargin,a.first),y=Math.min(d,o.visible.to+r.options.viewportMargin);u.viewFromy&&u.viewTo-y<20&&(y=Math.min(d,u.viewTo)),wi&&(m=wl(r.doc,m),y=xo(r.doc,y));var _=m!=u.viewFrom||y!=u.viewTo||u.lastWrapHeight!=o.wrapperHeight||u.lastWrapWidth!=o.wrapperWidth;qf(r,m,y),u.viewOffset=ii(Ae(r.doc,u.viewFrom)),r.display.mover.style.top=u.viewOffset+"px";var C=Id(r);if(!_&&C==0&&!o.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var E=q0(r);return C>4&&(u.lineDiv.style.display="none"),G0(r,u.updateLineNumbers,o.dims),C>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,j0(E),Ye(u.cursorDiv),Ye(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,_&&(u.lastWrapHeight=o.wrapperHeight,u.lastWrapWidth=o.wrapperWidth,wc(r,400)),u.updateLineNumbers=null,!0}i($d,"updateDisplayIfNeeded");function nm(r,o){for(var u=o.viewport,a=!0;;a=!1){if(!a||!r.options.lineWrapping||o.oldDisplayWidth==Co(r)){if(u&&u.top!=null&&(u={top:Math.min(r.doc.height+Aa(r.display)-Ma(r),u.top)}),o.visible=Tl(r.display,r.doc,u),o.visible.from>=r.display.viewFrom&&o.visible.to<=r.display.viewTo)break}else a&&(o.visible=Tl(r.display,r.doc,u));if(!$d(r,o))break;Gf(r);var d=kl(r);Fs(r),ko(r,d),qd(r,d),o.force=!1}o.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(o.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}i(nm,"postUpdateDisplay");function Xi(r,o){var u=new No(r,o);if($d(r,u)){Gf(r),nm(r,u);var a=kl(r);Fs(r),ko(r,a),qd(r,a),u.finish()}}i(Xi,"updateDisplaySimple");function G0(r,o,u){var a=r.display,d=r.options.lineNumbers,m=a.lineDiv,y=m.firstChild;function _(te){var le=te.nextSibling;return S&&B&&r.display.currentWheelTarget==te?te.style.display="none":te.parentNode.removeChild(te),le}i(_,"rm");for(var C=a.view,E=a.viewFrom,R=0;R-1&&(V=!1),ac(r,F,E,u)),V&&(Ye(F.lineNumber),F.lineNumber.appendChild(document.createTextNode(gl(r.options,E)))),y=F.node.nextSibling}E+=F.size}for(;y;)y=_(y)}i(G0,"patchDisplay");function Vd(r){var o=r.gutters.offsetWidth;r.sizer.style.marginLeft=o+"px",Vt(r,"gutterChanged",r)}i(Vd,"updateGutterSpace");function qd(r,o){r.display.sizer.style.minHeight=o.docHeight+"px",r.display.heightForcer.style.top=o.docHeight+"px",r.display.gutters.style.height=o.docHeight+r.display.barHeight+xi(r)+"px"}i(qd,"setDocumentHeight");function im(r){var o=r.display,u=o.view;if(!(!o.alignWidgets&&(!o.gutters.firstChild||!r.options.fixedGutter))){for(var a=Ct(o)-o.scroller.scrollLeft+r.doc.scrollLeft,d=o.gutters.offsetWidth,m=a+"px",y=0;y=105&&(d.wrapper.style.clipPath="inset(0px)"),d.wrapper.setAttribute("translate","no"),p&&v<8&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),!S&&!(n&&L)&&(d.scroller.draggable=!0),r&&(r.appendChild?r.appendChild(d.wrapper):r(d.wrapper)),d.viewFrom=d.viewTo=o.first,d.reportedViewFrom=d.reportedViewTo=o.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,d.gutterSpecs=Qi(a.gutters,a.lineNumbers),sm(d),u.init(d)}i(K0,"Display");var Qf=0,ns=null;p?ns=-.53:n?ns=15:k?ns=-.7:z&&(ns=-1/3);function Hs(r){var o=r.wheelDeltaX,u=r.wheelDeltaY;return o==null&&r.detail&&r.axis==r.HORIZONTAL_AXIS&&(o=r.detail),u==null&&r.detail&&r.axis==r.VERTICAL_AXIS?u=r.detail:u==null&&(u=r.wheelDelta),{x:o,y:u}}i(Hs,"wheelEventDelta");function Y0(r){var o=Hs(r);return o.x*=ns,o.y*=ns,o}i(Y0,"wheelEventPixels");function lm(r,o){k&&D==102&&(r.display.chromeScrollHack==null?r.display.sizer.style.pointerEvents="none":clearTimeout(r.display.chromeScrollHack),r.display.chromeScrollHack=setTimeout(function(){r.display.chromeScrollHack=null,r.display.sizer.style.pointerEvents=""},100));var u=Hs(o),a=u.x,d=u.y,m=ns;o.deltaMode===0&&(a=o.deltaX,d=o.deltaY,m=1);var y=r.display,_=y.scroller,C=_.scrollWidth>_.clientWidth,E=_.scrollHeight>_.clientHeight;if(a&&C||d&&E){if(d&&B&&S){e:for(var R=o.target,F=y.view;R!=_;R=R.parentNode)for(var j=0;j=0&&$e(r,a.to())<=0)return u}return-1};var St=i(function(r,o){this.anchor=r,this.head=o},"Range");St.prototype.from=function(){return So(this.anchor,this.head)},St.prototype.to=function(){return ks(this.anchor,this.head)},St.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ji(r,o,u){var a=r&&r.options.selectionsMayTouch,d=o[u];o.sort(function(j,V){return $e(j.from(),V.from())}),u=ze(o,d);for(var m=1;m0:C>=0){var E=So(_.from(),y.from()),R=ks(_.to(),y.to()),F=_.empty()?y.from()==y.head:_.from()==_.head;m<=u&&--u,o.splice(--m,2,new St(F?R:E,F?E:R))}}return new nr(o,u)}i(Ji,"normalizeSelection");function zs(r,o){return new nr([new St(r,o||r)],0)}i(zs,"simpleSelection");function Ws(r){return r.text?ce(r.from.line+r.text.length-1,at(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}i(Ws,"changeEnd");function am(r,o){if($e(r,o.from)<0)return r;if($e(r,o.to)<=0)return Ws(o);var u=r.line+o.text.length-(o.to.line-o.from.line)-1,a=r.ch;return r.line==o.to.line&&(a+=Ws(o).ch-o.to.ch),ce(u,a)}i(am,"adjustForChange");function Jf(r,o){for(var u=[],a=0;a1&&r.remove(_.line+1,te-1),r.insert(_.line+1,ye)}Vt(r,"change",r,o)}i(za,"updateDoc");function Us(r,o,u){function a(d,m,y){if(d.linked)for(var _=0;_1&&!r.done[r.done.length-2].ranges)return r.done.pop(),at(r.done)}i(Q0,"lastChangeEvent");function Yd(r,o,u,a){var d=r.history;d.undone.length=0;var m=+new Date,y,_;if((d.lastOp==a||d.lastOrigin==o.origin&&o.origin&&(o.origin.charAt(0)=="+"&&d.lastModTime>m-(r.cm?r.cm.options.historyEventDelay:500)||o.origin.charAt(0)=="*"))&&(y=Q0(d,d.lastOp==a)))_=at(y.changes),$e(o.from,o.to)==0&&$e(o.from,_.to)==0?_.to=Ws(o):y.changes.push(os(r,o));else{var C=at(d.done);for((!C||!C.ranges)&&Zi(r.sel,d.done),y={changes:[os(r,o)],generation:d.generation},d.done.push(y);d.done.length>d.undoDepth;)d.done.shift(),d.done[0].ranges||d.done.shift()}d.done.push(u),d.generation=++d.maxGeneration,d.lastModTime=d.lastSelTime=m,d.lastOp=d.lastSelOp=a,d.lastOrigin=d.lastSelOrigin=o.origin,_||Ot(r,"historyAdded")}i(Yd,"addChangeToHistory");function cm(r,o,u,a){var d=o.charAt(0);return d=="*"||d=="+"&&u.ranges.length==a.ranges.length&&u.somethingSelected()==a.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}i(cm,"selectionEventCanBeMerged");function xc(r,o,u,a){var d=r.history,m=a&&a.origin;u==d.lastSelOp||m&&d.lastSelOrigin==m&&(d.lastModTime==d.lastSelTime&&d.lastOrigin==m||cm(r,m,at(d.done),o))?d.done[d.done.length-1]=o:Zi(o,d.done),d.lastSelTime=+new Date,d.lastSelOrigin=m,d.lastSelOp=u,a&&a.clearRedo!==!1&&si(d.undone)}i(xc,"addSelectionToHistory");function Zi(r,o){var u=at(o);u&&u.ranges&&u.equals(r)||o.push(r)}i(Zi,"pushSelectionToHistory");function Xd(r,o,u,a){var d=o["spans_"+r.id],m=0;r.iter(Math.max(r.first,u),Math.min(r.first+r.size,a),function(y){y.markedSpans&&((d||(d=o["spans_"+r.id]={}))[m]=y.markedSpans),++m})}i(Xd,"attachLocalSpans");function J0(r){if(!r)return null;for(var o,u=0;u-1&&(at(_)[F]=E[F],delete E[F])}}return a}i(Ll,"copyHistoryArray");function Dr(r,o,u,a){if(a){var d=r.anchor;if(u){var m=$e(o,d)<0;m!=$e(u,d)<0?(d=o,o=u):m!=$e(o,u)<0&&(o=u)}return new St(d,o)}else return new St(u||o,o)}i(Dr,"extendRange");function Ua(r,o,u,a,d){d==null&&(d=r.cm&&(r.cm.display.shift||r.extend)),Kr(r,new nr([Dr(r.sel.primary(),o,u,d)],0),a)}i(Ua,"extendSelection");function Qd(r,o,u){for(var a=[],d=r.cm&&(r.cm.display.shift||r.extend),m=0;m=o.ch:_.to>o.ch))){if(d&&(Ot(C,"beforeCursorEnter"),C.explicitlyCleared))if(m.markedSpans){--y;continue}else break;if(!C.atomic)continue;if(u){var F=C.find(a<0?1:-1),j=void 0;if((a<0?R:E)&&(F=hm(r,F,-a,F&&F.line==o.line?m:null)),F&&F.line==o.line&&(j=$e(F,u))&&(a<0?j<0:j>0))return $a(r,F,o,a,d)}var V=C.find(a<0?-1:1);return(a<0?E:R)&&(V=hm(r,V,a,V.line==o.line?m:null)),V?$a(r,V,o,a,d):null}}return o}i($a,"skipAtomicInner");function Va(r,o,u,a,d){var m=a||1,y=$a(r,o,u,m,d)||!d&&$a(r,o,u,m,!0)||$a(r,o,u,-m,d)||!d&&$a(r,o,u,-m,!0);return y||(r.cantEdit=!0,ce(r.first,0))}i(Va,"skipAtomic");function hm(r,o,u,a){return u<0&&o.ch==0?o.line>r.first?Ve(r,ce(o.line-1)):null:u>0&&o.ch==(a||Ae(r,o.line)).text.length?o.line=0;--d)gm(r,{from:a[d].from,to:a[d].to,text:d?[""]:o.text,origin:o.origin});else gm(r,o)}}i(ja,"makeChange");function gm(r,o){if(!(o.text.length==1&&o.text[0]==""&&$e(o.from,o.to)==0)){var u=Jf(r,o);Yd(r,o,u,r.cm?r.cm.curOp.id:NaN),_c(r,o,u,ic(r,o));var a=[];Us(r,function(d,m){!m&&ze(a,d.history)==-1&&(wm(d.history,o),a.push(d.history)),_c(d,o,null,ic(d,o))})}}i(gm,"makeChangeInner");function Vs(r,o,u){var a=r.cm&&r.cm.state.suppressEdits;if(!(a&&!u)){for(var d=r.history,m,y=r.sel,_=o=="undo"?d.done:d.undone,C=o=="undo"?d.undone:d.done,E=0;E<_.length&&(m=_[E],!(u?m.ranges&&!m.equals(r.sel):!m.ranges));E++);if(E!=_.length){for(d.lastOrigin=d.lastSelOrigin=null;;)if(m=_.pop(),m.ranges){if(Zi(m,C),u&&!m.equals(r.sel)){Kr(r,m,{clearRedo:!1});return}y=m}else if(a){_.push(m);return}else break;var R=[];Zi(y,C),C.push({changes:R,generation:d.generation}),d.generation=m.generation||++d.maxGeneration;for(var F=on(r,"beforeChange")||r.cm&&on(r.cm,"beforeChange"),j=i(function(le){var pe=m.changes[le];if(pe.origin=o,F&&!Jd(r,pe,!1))return _.length=0,{};R.push(os(r,pe));var ye=le?Jf(r,pe):at(_);_c(r,pe,ye,fm(r,pe)),!le&&r.cm&&r.cm.scrollIntoView({from:pe.from,to:Ws(pe)});var _e=[];Us(r,function(ve,Te){!Te&&ze(_e,ve.history)==-1&&(wm(ve.history,pe),_e.push(ve.history)),_c(ve,pe,null,fm(ve,pe))})},"loop"),V=m.changes.length-1;V>=0;--V){var te=j(V);if(te)return te.v}}}}i(Vs,"makeChangeFromHistory");function mm(r,o){if(o!=0&&(r.first+=o,r.sel=new nr(mr(r.sel.ranges,function(d){return new St(ce(d.anchor.line+o,d.anchor.ch),ce(d.head.line+o,d.head.ch))}),r.sel.primIndex),r.cm)){In(r.cm,r.first,r.first-o,o);for(var u=r.cm.display,a=u.viewFrom;ar.lastLine())){if(o.from.linem&&(o={from:o.from,to:ce(m,Ae(r,m).text.length),text:[o.text[0]],origin:o.origin}),o.removed=Ui(r,o.from,o.to),u||(u=Jf(r,o)),r.cm?Zd(r.cm,o,a):za(r,o,a),Yr(r,u,st),r.cantEdit&&Va(r,ce(r.firstLine(),0))&&(r.cantEdit=!1)}}i(_c,"makeChangeSingleDoc");function Zd(r,o,u){var a=r.doc,d=r.display,m=o.from,y=o.to,_=!1,C=m.line;r.options.lineWrapping||(C=mt(Mt(Ae(a,m.line))),a.iter(C,y.line+1,function(V){if(V==d.maxLine)return _=!0,!0})),a.sel.contains(o.from,o.to)>-1&&cl(r),za(a,o,u,Jg(r)),r.options.lineWrapping||(a.iter(C,m.line+o.text.length,function(V){var te=Ze(V);te>d.maxLineLength&&(d.maxLine=V,d.maxLineLength=te,d.maxLineChanged=!0,_=!1)}),_&&(r.curOp.updateMaxLine=!0)),ml(a,m.line),wc(r,400);var E=o.text.length-(y.line-m.line)-1;o.full?In(r):m.line==y.line&&o.text.length==1&&!Ha(r.doc,o)?Is(r,m.line,"text"):In(r,m.line,y.line+1,E);var R=on(r,"changes"),F=on(r,"change");if(F||R){var j={from:m,to:y,text:o.text,removed:o.removed,origin:o.origin};F&&Vt(r,"change",r,j),R&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(j)}r.display.selForContextMenu=null}i(Zd,"makeChangeSingleDocInEditor");function Pl(r,o,u,a,d){var m;a||(a=u),$e(a,u)<0&&(m=[a,u],u=m[0],a=m[1]),typeof o=="string"&&(o=r.splitLines(o)),ja(r,{from:u,to:a,text:o,origin:d})}i(Pl,"replaceRange");function vm(r,o,u,a){u1||!(this.children[0]instanceof Rl))){var _=[];this.collapse(_),this.children=[new Rl(_)],this.children[0].parent=this}},"removeInner"),collapse:i(function(r){for(var o=0;o50){for(var y=d.lines.length%25+25,_=y;_10);r.parent.maybeSpill()}},"maybeSpill"),iterN:i(function(r,o,u){for(var a=0;ar.display.maxLineLength&&(r.display.maxLine=E,r.display.maxLineLength=R,r.display.maxLineChanged=!0)}a!=null&&r&&this.collapsed&&In(r,a,d+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&pm(r.doc)),r&&Vt(r,"markerCleared",r,this,a,d),o&&Al(r),this.parent&&this.parent.clear()}},eo.prototype.find=function(r,o){r==null&&this.type=="bookmark"&&(r=1);for(var u,a,d=0;d0||y==0&&m.clearWhenEmpty!==!1)return m;if(m.replacedWith&&(m.collapsed=!0,m.widgetNode=Xe("span",[m.replacedWith],"CodeMirror-widget"),a.handleMouseEvents||m.widgetNode.setAttribute("cm-ignore-events","true"),a.insertLeft&&(m.widgetNode.insertLeft=!0)),m.collapsed){if(Ld(r,o.line,o,u,m)||o.line!=u.line&&Ld(r,u.line,o,u,m))throw new Error("Inserting collapsed marker partially overlapping an existing one");kd()}m.addToHistory&&Yd(r,{from:o,to:u,origin:"markText"},r.sel,NaN);var _=o.line,C=r.cm,E;if(r.iter(_,u.line+1,function(F){C&&m.collapsed&&!C.options.lineWrapping&&Mt(F)==C.display.maxLine&&(E=!0),m.collapsed&&_!=o.line&&yi(F,0),nc(F,new xa(m,_==o.line?o.ch:null,_==u.line?u.ch:null),r.cm&&r.cm.curOp),++_}),m.collapsed&&r.iter(o.line,u.line+1,function(F){we(r,F)&&yi(F,0)}),m.clearOnEnter&&He(m,"beforeCursorEnter",function(){return m.clear()}),m.readOnly&&(Rf(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),m.collapsed&&(m.id=++th,m.atomic=!0),C){if(E&&(C.curOp.updateMaxLine=!0),m.collapsed)In(C,o.line,u.line+1);else if(m.className||m.startStyle||m.endStyle||m.css||m.attributes||m.title)for(var R=o.line;R<=u.line;R++)Is(C,R,"text");m.atomic&&pm(C.doc),Vt(C,"markerAdded",C,m)}return m}i(Ka,"markText");var Ya=i(function(r,o){this.markers=r,this.primary=o;for(var u=0;u=0;C--)ja(this,a[C]);_?$s(this,_):this.cm&&Qt(this.cm)}),undo:Rr(function(){Vs(this,"undo")}),redo:Rr(function(){Vs(this,"redo")}),undoSelection:Rr(function(){Vs(this,"undo",!0)}),redoSelection:Rr(function(){Vs(this,"redo",!0)}),setExtending:i(function(r){this.extend=r},"setExtending"),getExtending:i(function(){return this.extend},"getExtending"),historySize:i(function(){for(var r=this.history,o=0,u=0,a=0;a=r.ch)&&o.push(d.marker.parent||d.marker)}return o},"findMarksAt"),findMarks:i(function(r,o,u){r=Ve(this,r),o=Ve(this,o);var a=[],d=r.line;return this.iter(r.line,o.line+1,function(m){var y=m.markedSpans;if(y)for(var _=0;_=C.to||C.from==null&&d!=r.line||C.from!=null&&d==o.line&&C.from>=o.ch)&&(!u||u(C.marker))&&a.push(C.marker.parent||C.marker)}++d}),a},"findMarks"),getAllMarks:i(function(){var r=[];return this.iter(function(o){var u=o.markedSpans;if(u)for(var a=0;ar)return o=r,!0;r-=m,++u}),Ve(this,ce(u,o))},"posFromIndex"),indexFromPos:i(function(r){r=Ve(this,r);var o=r.ch;if(r.lineo&&(o=r.from),r.to!=null&&r.to-1){o.state.draggingText(r),setTimeout(function(){return o.display.input.focus()},20);return}try{var R=r.dataTransfer.getData("Text");if(R){var F;if(o.state.draggingText&&!o.state.draggingText.copy&&(F=o.listSelections()),Yr(o.doc,zs(u,u)),F)for(var j=0;j=0;_--)Pl(r.doc,"",a[_].from,a[_].to,"+delete");Qt(r)})}i(qs,"deleteNearSelection");function op(r,o,u){var a=Pn(r.text,o+u,u);return a<0||a>r.text.length?null:a}i(op,"moveCharLogically");function kc(r,o,u){var a=op(r,o.ch,u);return a==null?null:new ce(o.line,a,u<0?"after":"before")}i(kc,"moveLogically");function Nc(r,o,u,a,d){if(r){o.doc.direction=="rtl"&&(d=-d);var m=Le(u,o.doc.direction);if(m){var y=d<0?at(m):m[0],_=d<0==(y.level==1),C=_?"after":"before",E;if(y.level>0||o.doc.direction=="rtl"){var R=Sn(o,u);E=d<0?u.text.length-1:0;var F=w(o,R,E).top;E=zi(function(j){return w(o,R,j).top==F},d<0==(y.level==1)?y.from:y.to-1,E),C=="before"&&(E=op(u,E,1))}else E=d<0?y.to:y.from;return new ce(a,E,C)}}return new ce(a,d<0?u.text.length:0,d<0?"before":"after")}i(Nc,"endOfLine");function js(r,o,u,a){var d=Le(o,r.doc.direction);if(!d)return kc(o,u,a);u.ch>=o.text.length?(u.ch=o.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var m=ee(d,u.ch,u.sticky),y=d[m];if(r.doc.direction=="ltr"&&y.level%2==0&&(a>0?y.to>u.ch:y.from=y.from&&j>=R.begin)){var V=F?"before":"after";return new ce(u.line,j,V)}}var te=i(function(ye,_e,ve){for(var Te=i(function(Lt,cr){return cr?new ce(u.line,_(Lt,1),"before"):new ce(u.line,Lt,"after")},"getRes");ye>=0&&ye0==(Ie.level!=1),it=Pe?ve.begin:_(ve.end,-1);if(Ie.from<=it&&it0?R.end:_(R.begin,-1);return pe!=null&&!(a>0&&pe==o.text.length)&&(le=te(a>0?0:d.length-1,a,E(pe)),le)?le:null}i(js,"moveVisually");var Oc={selectAll:qa,singleSelection:i(function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),st)},"singleSelection"),killLine:i(function(r){return qs(r,function(o){if(o.empty()){var u=Ae(r.doc,o.head.line).text.length;return o.head.ch==u&&o.head.line0)d=new ce(d.line,d.ch+1),r.replaceRange(m.charAt(d.ch-1)+m.charAt(d.ch-2),ce(d.line,d.ch-2),d,"+transpose");else if(d.line>r.doc.first){var y=Ae(r.doc,d.line-1).text;y&&(d=new ce(d.line,1),r.replaceRange(m.charAt(0)+r.doc.lineSeparator()+y.charAt(y.length-1),ce(d.line-1,y.length-1),d,"+transpose"))}}u.push(new St(d,d))}r.setSelections(u)})},"transposeChars"),newlineAndIndent:i(function(r){return cn(r,function(){for(var o=r.listSelections(),u=o.length-1;u>=0;u--)r.replaceRange(r.doc.lineSeparator(),o[u].anchor,o[u].head,"+input");o=r.listSelections();for(var a=0;ar&&$e(o,this.pos)==0&&u==this.button};var Ao,Za;function Am(r,o){var u=+new Date;return Za&&Za.compare(u,r,o)?(Ao=Za=null,"triple"):Ao&&Ao.compare(u,r,o)?(Za=new Ja(u,r,o),Ao=null,"double"):(Ao=new Ja(u,r,o),Za=null,"single")}i(Am,"clickRepeat");function Mm(r){var o=this,u=o.display;if(!(kt(o,r)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=r.shiftKey,oi(u,r)){S||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!tu(o,r)){var a=To(o,r),d=$u(r),m=a?Am(a,d):"single";hr(o).focus(),d==1&&o.state.selectingText&&o.state.selectingText(r),!(a&&Lm(o,d,a,m,r))&&(d==1?a?Mc(o,a,m,r):pl(r)==u.scroller&&Er(r):d==2?(a&&Ua(o.doc,a),setTimeout(function(){return u.input.focus()},20)):d==3&&(de?o.display.input.onContextMenu(r):Ia(o)))}}}i(Mm,"onMouseDown");function Lm(r,o,u,a,d){var m="Click";return a=="double"?m="Double"+m:a=="triple"&&(m="Triple"+m),m=(o==1?"Left":o==2?"Middle":"Right")+m,Ac(r,ih(m,d),d,function(y){if(typeof y=="string"&&(y=Oc[y]),!y)return!1;var _=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),_=y(r,u)!=Xt}finally{r.state.suppressEdits=!1}return _})}i(Lm,"handleMappedButton");function eu(r,o,u){var a=r.getOption("configureMouse"),d=a?a(r,o,u):{};if(d.unit==null){var m=G?u.shiftKey&&u.metaKey:u.altKey;d.unit=m?"rectangle":o=="single"?"char":o=="double"?"word":"line"}return(d.extend==null||r.doc.extend)&&(d.extend=r.doc.extend||u.shiftKey),d.addNew==null&&(d.addNew=B?u.metaKey:u.ctrlKey),d.moveOnDrag==null&&(d.moveOnDrag=!(B?u.altKey:u.ctrlKey)),d}i(eu,"configureMouse");function Mc(r,o,u,a){p?setTimeout(gr(Bs,r),0):r.curOp.focus=ot(dr(r));var d=eu(r,u,a),m=r.doc.sel,y;r.options.dragDrop&&Vu&&!r.isReadOnly()&&u=="single"&&(y=m.contains(o))>-1&&($e((y=m.ranges[y]).from(),o)<0||o.xRel>0)&&($e(y.to(),o)>0||o.xRel<0)?lw(r,a,o,d):Pm(r,a,o,d)}i(Mc,"leftButtonDown");function lw(r,o,u,a){var d=r.display,m=!1,y=Nt(r,function(E){S&&(d.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:Ia(r)),jt(d.wrapper.ownerDocument,"mouseup",y),jt(d.wrapper.ownerDocument,"mousemove",_),jt(d.scroller,"dragstart",C),jt(d.scroller,"drop",y),m||(Er(E),a.addNew||Ua(r.doc,u,null,null,a.extend),S&&!z||p&&v==9?setTimeout(function(){d.wrapper.ownerDocument.body.focus({preventScroll:!0}),d.input.focus()},20):d.input.focus())}),_=i(function(E){m=m||Math.abs(o.clientX-E.clientX)+Math.abs(o.clientY-E.clientY)>=10},"mouseMove"),C=i(function(){return m=!0},"dragStart");S&&(d.scroller.draggable=!0),r.state.draggingText=y,y.copy=!a.moveOnDrag,He(d.wrapper.ownerDocument,"mouseup",y),He(d.wrapper.ownerDocument,"mousemove",_),He(d.scroller,"dragstart",C),He(d.scroller,"drop",y),r.state.delayingBlurEvent=!0,setTimeout(function(){return d.input.focus()},20),d.scroller.dragDrop&&d.scroller.dragDrop()}i(lw,"leftButtonStartDrag");function uh(r,o,u){if(u=="char")return new St(o,o);if(u=="word")return r.findWordAt(o);if(u=="line")return new St(ce(o.line,0),Ve(r.doc,ce(o.line+1,0)));var a=u(r,o);return new St(a.from,a.to)}i(uh,"rangeForUnit");function Pm(r,o,u,a){p&&Ia(r);var d=r.display,m=r.doc;Er(o);var y,_,C=m.sel,E=C.ranges;if(a.addNew&&!a.extend?(_=m.sel.contains(u),_>-1?y=E[_]:y=new St(u,u)):(y=m.sel.primary(),_=m.sel.primIndex),a.unit=="rectangle")a.addNew||(y=new St(u,u)),u=To(r,o,!0,!0),_=-1;else{var R=uh(r,u,a.unit);a.extend?y=Dr(y,R.anchor,R.head,a.extend):y=R}a.addNew?_==-1?(_=E.length,Kr(m,Ji(r,E.concat([y]),_),{scroll:!1,origin:"*mouse"})):E.length>1&&E[_].empty()&&a.unit=="char"&&!a.extend?(Kr(m,Ji(r,E.slice(0,_).concat(E.slice(_+1)),0),{scroll:!1,origin:"*mouse"}),C=m.sel):Ei(m,_,y,Fe):(_=0,Kr(m,new nr([y],0),Fe),C=m.sel);var F=u;function j(ve){if($e(F,ve)!=0)if(F=ve,a.unit=="rectangle"){for(var Te=[],Ie=r.options.tabSize,Pe=Rt(Ae(m,u.line).text,u.ch,Ie),it=Rt(Ae(m,ve.line).text,ve.ch,Ie),Lt=Math.min(Pe,it),cr=Math.max(Pe,it),Kt=Math.min(u.line,ve.line),ir=Math.min(r.lastLine(),Math.max(u.line,ve.line));Kt<=ir;Kt++){var vr=Ae(m,Kt).text,yr=yn(vr,Lt,Ie);Lt==cr?Te.push(new St(ce(Kt,yr),ce(Kt,yr))):vr.length>yr&&Te.push(new St(ce(Kt,yr),ce(Kt,yn(vr,cr,Ie))))}Te.length||Te.push(new St(u,u)),Kr(m,Ji(r,C.ranges.slice(0,_).concat(Te),_),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ve)}else{var _n=y,Xr=uh(r,ve,a.unit),kr=_n.anchor,wr;$e(Xr.anchor,kr)>0?(wr=Xr.head,kr=So(_n.from(),Xr.anchor)):(wr=Xr.anchor,kr=ks(_n.to(),Xr.head));var or=C.ranges.slice(0);or[_]=lp(r,new St(Ve(m,kr),wr)),Kr(m,Ji(r,or,_),Fe)}}i(j,"extendTo");var V=d.wrapper.getBoundingClientRect(),te=0;function le(ve){var Te=++te,Ie=To(r,ve,!0,a.unit=="rectangle");if(Ie)if($e(Ie,F)!=0){r.curOp.focus=ot(dr(r)),j(Ie);var Pe=Tl(d,m);(Ie.line>=Pe.to||Ie.lineV.bottom?20:0;it&&setTimeout(Nt(r,function(){te==Te&&(d.scroller.scrollTop+=it,le(ve))}),50)}}i(le,"extend");function pe(ve){r.state.selectingText=!1,te=1/0,ve&&(Er(ve),d.input.focus()),jt(d.wrapper.ownerDocument,"mousemove",ye),jt(d.wrapper.ownerDocument,"mouseup",_e),m.history.lastSelOrigin=null}i(pe,"done");var ye=Nt(r,function(ve){ve.buttons===0||!$u(ve)?pe(ve):le(ve)}),_e=Nt(r,pe);r.state.selectingText=_e,He(d.wrapper.ownerDocument,"mousemove",ye),He(d.wrapper.ownerDocument,"mouseup",_e)}i(Pm,"leftButtonSelect");function lp(r,o){var u=o.anchor,a=o.head,d=Ae(r.doc,u.line);if($e(u,a)==0&&u.sticky==a.sticky)return o;var m=Le(d);if(!m)return o;var y=ee(m,u.ch,u.sticky),_=m[y];if(_.from!=u.ch&&_.to!=u.ch)return o;var C=y+(_.from==u.ch==(_.level!=1)?0:1);if(C==0||C==m.length)return o;var E;if(a.line!=u.line)E=(a.line-u.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var R=ee(m,a.ch,a.sticky),F=R-y||(a.ch-u.ch)*(_.level==1?-1:1);R==C-1||R==C?E=F<0:E=F>0}var j=m[C+(E?-1:0)],V=E==(j.level==1),te=V?j.from:j.to,le=V?"after":"before";return u.ch==te&&u.sticky==le?o:new St(new ce(u.line,te,le),a)}i(lp,"bidiSimplify");function ch(r,o,u,a){var d,m;if(o.touches)d=o.touches[0].clientX,m=o.touches[0].clientY;else try{d=o.clientX,m=o.clientY}catch{return!1}if(d>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;a&&Er(o);var y=r.display,_=y.lineDiv.getBoundingClientRect();if(m>_.bottom||!on(r,u))return wn(o);m-=_.top-y.viewOffset;for(var C=0;C=d){var R=Qo(r.doc,m),F=r.display.gutterSpecs[C];return Ot(r,u,r,R,F.className,o),wn(o)}}}i(ch,"gutterEvent");function tu(r,o){return ch(r,o,"gutterClick",!0)}i(tu,"clickInGutter");function ap(r,o){oi(r.display,o)||up(r,o)||kt(r,o,"contextmenu")||de||r.display.input.onContextMenu(o)}i(ap,"onContextMenu");function up(r,o){return on(r,"gutterContextMenu")?ch(r,o,"gutterContextMenu",!1):!1}i(up,"contextMenuInGutter");function Rm(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Eo(r)}i(Rm,"themeChanged");var Bl={toString:i(function(){return"CodeMirror.Init"},"toString")},Lc={},Pc={};function fh(r){var o=r.optionHandlers;function u(a,d,m,y){r.defaults[a]=d,m&&(o[a]=y?function(_,C,E){E!=Bl&&m(_,C,E)}:m)}i(u,"option"),r.defineOption=u,r.Init=Bl,u("value","",function(a,d){return a.setValue(d)},!0),u("mode",null,function(a,d){a.doc.modeOption=d,Gd(a)},!0),u("indentUnit",2,Gd,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(a){Ml(a),Eo(a),In(a)},!0),u("lineSeparator",null,function(a,d){if(a.doc.lineSep=d,!!d){var m=[],y=a.doc.first;a.doc.iter(function(C){for(var E=0;;){var R=C.text.indexOf(d,E);if(R==-1)break;E=R+d.length,m.push(ce(y,R))}y++});for(var _=m.length-1;_>=0;_--)Pl(a.doc,d,m[_],ce(m[_].line,m[_].ch+d.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(a,d,m){a.state.specialChars=new RegExp(d.source+(d.test(" ")?"":"| "),"g"),m!=Bl&&a.refresh()}),u("specialCharPlaceholder",$t,function(a){return a.refresh()},!0),u("electricChars",!0),u("inputStyle",L?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(a,d){return a.getInputField().spellcheck=d},!0),u("autocorrect",!1,function(a,d){return a.getInputField().autocorrect=d},!0),u("autocapitalize",!1,function(a,d){return a.getInputField().autocapitalize=d},!0),u("rtlMoveVisually",!re),u("wholeLineUpdateBefore",!0),u("theme","default",function(a){Rm(a),Sc(a)},!0),u("keyMap","default",function(a,d,m){var y=Tc(d),_=m!=Bl&&Tc(m);_&&_.detach&&_.detach(a,y),y.attach&&y.attach(a,_||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,Dm,!0),u("gutters",[],function(a,d){a.display.gutterSpecs=Qi(d,a.options.lineNumbers),Sc(a)},!0),u("fixedGutter",!0,function(a,d){a.display.gutters.style.left=d?Ct(a.display)+"px":"0",a.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(a){return ko(a)},!0),u("scrollbarStyle","native",function(a){tm(a),ko(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),u("lineNumbers",!1,function(a,d){a.display.gutterSpecs=Qi(a.options.gutters,d),Sc(a)},!0),u("firstLineNumber",1,Sc,!0),u("lineNumberFormatter",function(a){return a},Sc,!0),u("showCursorWhenSelecting",!1,Fs,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(a,d){d=="nocursor"&&(Fa(a),a.display.input.blur()),a.display.input.readOnlyChanged(d)}),u("screenReaderLabel",null,function(a,d){d=d===""?null:d,a.display.input.screenReaderLabelChanged(d)}),u("disableInput",!1,function(a,d){d||a.display.input.reset()},!0),u("dragDrop",!0,aw),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Fs,!0),u("singleCursorHeightPerLine",!0,Fs,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,Ml,!0),u("addModeClass",!1,Ml,!0),u("pollInterval",100),u("undoDepth",200,function(a,d){return a.doc.history.undoDepth=d}),u("historyEventDelay",1250),u("viewportMargin",10,function(a){return a.refresh()},!0),u("maxHighlightLength",1e4,Ml,!0),u("moveInputWithCursor",!0,function(a,d){d||a.display.input.resetPosition()}),u("tabindex",null,function(a,d){return a.display.input.getField().tabIndex=d||""}),u("autofocus",null),u("direction","ltr",function(a,d){return a.doc.setDirection(d)},!0),u("phrases",null)}i(fh,"defineOptions");function aw(r,o,u){var a=u&&u!=Bl;if(!o!=!a){var d=r.display.dragFunctions,m=o?He:jt;m(r.display.scroller,"dragstart",d.start),m(r.display.scroller,"dragenter",d.enter),m(r.display.scroller,"dragover",d.over),m(r.display.scroller,"dragleave",d.leave),m(r.display.scroller,"drop",d.drop)}}i(aw,"dragDropChanged");function Dm(r){r.options.lineWrapping?(Pt(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(Ce(r.display.wrapper,"CodeMirror-wrap"),Ca(r)),Vf(r),In(r),Eo(r),setTimeout(function(){return ko(r)},100)}i(Dm,"wrappingChanged");function yt(r,o){var u=this;if(!(this instanceof yt))return new yt(r,o);this.options=o=o?qt(o):{},qt(Lc,o,!1);var a=o.value;typeof a=="string"?a=new xn(a,o.mode,null,o.lineSeparator,o.direction):o.mode&&(a.modeOption=o.mode),this.doc=a;var d=new yt.inputStyles[o.inputStyle](this),m=this.display=new K0(r,a,d,o);m.wrapper.CodeMirror=this,Rm(this),o.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),tm(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new se,keySeq:null,specialChars:null},o.autofocus&&!L&&m.input.focus(),p&&v<11&&setTimeout(function(){return u.display.input.reset(!0)},20),Im(this),Tm(),Ol(this),this.curOp.forceUpdate=!0,Kd(this,a),o.autofocus&&!L||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&Bd(u)},20):Fa(this);for(var y in Pc)Pc.hasOwnProperty(y)&&Pc[y](this,o[y],Bl);om(this),o.finishInit&&o.finishInit(this);for(var _=0;_20*20}i(y,"farAway"),He(o.scroller,"touchstart",function(C){if(!kt(r,C)&&!m(C)&&!tu(r,C)){o.input.ensurePolled(),clearTimeout(u);var E=+new Date;o.activeTouch={start:E,moved:!1,prev:E-a.end<=300?a:null},C.touches.length==1&&(o.activeTouch.left=C.touches[0].pageX,o.activeTouch.top=C.touches[0].pageY)}}),He(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),He(o.scroller,"touchend",function(C){var E=o.activeTouch;if(E&&!oi(o,C)&&E.left!=null&&!E.moved&&new Date-E.start<300){var R=r.coordsChar(o.activeTouch,"page"),F;!E.prev||y(E,E.prev)?F=new St(R,R):!E.prev.prev||y(E,E.prev.prev)?F=r.findWordAt(R):F=new St(ce(R.line,0),Ve(r.doc,ce(R.line+1,0))),r.setSelection(F.anchor,F.head),r.focus(),Er(C)}d()}),He(o.scroller,"touchcancel",d),He(o.scroller,"scroll",function(){o.scroller.clientHeight&&(mc(r,o.scroller.scrollTop),Yi(r,o.scroller.scrollLeft,!0),Ot(r,"scroll",r))}),He(o.scroller,"mousewheel",function(C){return lm(r,C)}),He(o.scroller,"DOMMouseScroll",function(C){return lm(r,C)}),He(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:i(function(C){kt(r,C)||fl(C)},"enter"),over:i(function(C){kt(r,C)||(ut(r,C),fl(C))},"over"),start:i(function(C){return nh(r,C)},"start"),drop:Nt(r,ew),leave:i(function(C){kt(r,C)||Em(r)},"leave")};var _=o.input.getField();He(_,"keyup",function(C){return to.call(r,C)}),He(_,"keydown",Nt(r,ah)),He(_,"keypress",Nt(r,Om)),He(_,"focus",function(C){return Bd(r,C)}),He(_,"blur",function(C){return Fa(r,C)})}i(Im,"registerEventHandlers");var cp=[];yt.defineInitHook=function(r){return cp.push(r)};function Rc(r,o,u,a){var d=r.doc,m;u==null&&(u="add"),u=="smart"&&(d.mode.indent?m=Zo(r,o).state:u="prev");var y=r.options.tabSize,_=Ae(d,o),C=Rt(_.text,null,y);_.stateAfter&&(_.stateAfter=null);var E=_.text.match(/^\s*/)[0],R;if(!a&&!/\S/.test(_.text))R=0,u="not";else if(u=="smart"&&(R=d.mode.indent(m,_.text.slice(E.length),_.text),R==Xt||R>150)){if(!a)return;u="prev"}u=="prev"?o>d.first?R=Rt(Ae(d,o-1).text,null,y):R=0:u=="add"?R=C+r.options.indentUnit:u=="subtract"?R=C-r.options.indentUnit:typeof u=="number"&&(R=C+u),R=Math.max(0,R);var F="",j=0;if(r.options.indentWithTabs)for(var V=Math.floor(R/y);V;--V)j+=y,F+=" ";if(jy,C=pa(o),E=null;if(_&&a.ranges.length>1)if(bi&&bi.text.join(` -`)==o){if(a.ranges.length%bi.text.length==0){E=[];for(var R=0;R=0;j--){var V=a.ranges[j],te=V.from(),le=V.to();V.empty()&&(u&&u>0?te=ce(te.line,te.ch-u):r.state.overwrite&&!_?le=ce(le.line,Math.min(Ae(m,le.line).text.length,le.ch+at(C).length)):_&&bi&&bi.lineWise&&bi.text.join(` -`)==C.join(` -`)&&(te=le=ce(te.line,0)));var pe={from:te,to:le,text:E?E[j%E.length]:C,origin:d||(_?"paste":r.state.cutIncoming>y?"cut":"+input")};ja(r.doc,pe),Vt(r,"inputRead",r,pe)}o&&!_&&pp(r,o),Qt(r),r.curOp.updateInput<2&&(r.curOp.updateInput=F),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}i(ph,"applyTextInput");function Mo(r,o){var u=r.clipboardData&&r.clipboardData.getData("Text");if(u)return r.preventDefault(),!o.isReadOnly()&&!o.options.disableInput&&o.hasFocus()&&cn(o,function(){return ph(o,u,0,null,"paste")}),!0}i(Mo,"handlePaste");function pp(r,o){if(!(!r.options.electricChars||!r.options.smartIndent))for(var u=r.doc.sel,a=u.ranges.length-1;a>=0;a--){var d=u.ranges[a];if(!(d.head.ch>100||a&&u.ranges[a-1].head.line==d.head.line)){var m=r.getModeAt(d.head),y=!1;if(m.electricChars){for(var _=0;_-1){y=Rc(r,d.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(Ae(r.doc,d.head.line).text.slice(0,d.head.ch))&&(y=Rc(r,d.head.line,"smart"));y&&Vt(r,"electricInput",r,d.head.line)}}}i(pp,"triggerElectric");function dp(r){for(var o=[],u=[],a=0;am&&(Rc(this,_.head.line,a,!0),m=_.head.line,y==this.doc.sel.primIndex&&Qt(this));else{var C=_.from(),E=_.to(),R=Math.max(m,C.line);m=Math.min(this.lastLine(),E.line-(E.ch?0:1))+1;for(var F=R;F0&&Ei(this.doc,y,new St(C,j[y].to()),st)}}}),getTokenAt:i(function(a,d){return wa(this,a,d)},"getTokenAt"),getLineTokens:i(function(a,d){return wa(this,ce(a),d,!0)},"getLineTokens"),getTokenTypeAt:i(function(a){a=Ve(this.doc,a);var d=va(this,Ae(this.doc,a.line)),m=0,y=(d.length-1)/2,_=a.ch,C;if(_==0)C=d[2];else for(;;){var E=m+y>>1;if((E?d[E*2-1]:0)>=_)y=E;else if(d[E*2+1]<_)m=E+1;else{C=d[E*2+2];break}}var R=C?C.indexOf("overlay "):-1;return R<0?C:R==0?null:C.slice(0,R-1)},"getTokenTypeAt"),getModeAt:i(function(a){var d=this.doc.mode;return d.innerMode?r.innerMode(d,this.getTokenAt(a).state).mode:d},"getModeAt"),getHelper:i(function(a,d){return this.getHelpers(a,d)[0]},"getHelper"),getHelpers:i(function(a,d){var m=[];if(!u.hasOwnProperty(d))return m;var y=u[d],_=this.getModeAt(a);if(typeof _[d]=="string")y[_[d]]&&m.push(y[_[d]]);else if(_[d])for(var C=0;C<_[d].length;C++){var E=y[_[d][C]];E&&m.push(E)}else _.helperType&&y[_.helperType]?m.push(y[_.helperType]):y[_.name]&&m.push(y[_.name]);for(var R=0;RC&&(a=C,y=!0),_=Ae(this.doc,a)}else _=a;return un(this,_,{top:0,left:0},d||"page",m||y).top+(y?this.doc.height-ii(_):0)},"heightAtLine"),defaultTextHeight:i(function(){return ji(this.display)},"defaultTextHeight"),defaultCharWidth:i(function(){return ts(this.display)},"defaultCharWidth"),getViewport:i(function(){return{from:this.display.viewFrom,to:this.display.viewTo}},"getViewport"),addWidget:i(function(a,d,m,y,_){var C=this.display;a=J(this,Ve(this.doc,a));var E=a.bottom,R=a.left;if(d.style.position="absolute",d.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(d),C.sizer.appendChild(d),y=="over")E=a.top;else if(y=="above"||y=="near"){var F=Math.max(C.wrapper.clientHeight,this.doc.height),j=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(y=="above"||a.bottom+d.offsetHeight>F)&&a.top>d.offsetHeight?E=a.top-d.offsetHeight:a.bottom+d.offsetHeight<=F&&(E=a.bottom),R+d.offsetWidth>j&&(R=j-d.offsetWidth)}d.style.top=E+"px",d.style.left=d.style.right="",_=="right"?(R=C.sizer.clientWidth-d.offsetWidth,d.style.right="0px"):(_=="left"?R=0:_=="middle"&&(R=(C.sizer.clientWidth-d.offsetWidth)/2),d.style.left=R+"px"),m&&em(this,{left:R,top:E,right:R+d.offsetWidth,bottom:E+d.offsetHeight})},"addWidget"),triggerOnKeyDown:Ue(ah),triggerOnKeyPress:Ue(Om),triggerOnKeyUp:to,triggerOnMouseDown:Ue(Mm),execCommand:i(function(a){if(Oc.hasOwnProperty(a))return Oc[a].call(null,this)},"execCommand"),triggerElectric:Ue(function(a){pp(this,a)}),findPosH:i(function(a,d,m,y){var _=1;d<0&&(_=-1,d=-d);for(var C=Ve(this.doc,a),E=0;E0&&R(m.charAt(y-1));)--y;for(;_.5||this.options.lineWrapping)&&Vf(this),Ot(this,"refresh",this)}),swapDoc:Ue(function(a){var d=this.doc;return d.cm=null,this.state.selectingText&&this.state.selectingText(),Kd(this,a),Eo(this),this.display.input.reset(),Tr(this,a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,Vt(this,"swapDoc",this,d),d}),phrase:i(function(a){var d=this.options.phrases;return d&&Object.prototype.hasOwnProperty.call(d,a)?d[a]:a},"phrase"),getInputField:i(function(){return this.display.input.getField()},"getInputField"),getWrapperElement:i(function(){return this.display.wrapper},"getWrapperElement"),getScrollerElement:i(function(){return this.display.scroller},"getScrollerElement"),getGutterElement:i(function(){return this.display.gutters},"getGutterElement")},Rn(r),r.registerHelper=function(a,d,m){u.hasOwnProperty(a)||(u[a]=r[a]={_global:[]}),u[a][d]=m},r.registerGlobalHelper=function(a,d,m,y){r.registerHelper(a,d,y),u[a]._global.push({pred:m,val:y})}}i(ru,"addEditorMethods");function We(r,o,u,a,d){var m=o,y=u,_=Ae(r,o.line),C=d&&r.direction=="rtl"?-u:u;function E(){var _e=o.line+C;return _e=r.first+r.size?!1:(o=new ce(_e,o.ch,o.sticky),_=Ae(r,_e))}i(E,"findNextLine");function R(_e){var ve;if(a=="codepoint"){var Te=_.text.charCodeAt(o.ch+(u>0?0:-1));if(isNaN(Te))ve=null;else{var Ie=u>0?Te>=55296&&Te<56320:Te>=56320&&Te<57343;ve=new ce(o.line,Math.max(0,Math.min(_.text.length,o.ch+u*(Ie?2:1))),-u)}}else d?ve=js(r.cm,_,o,u):ve=kc(_,o,u);if(ve==null)if(!_e&&E())o=Nc(d,r.cm,_,o.line,C);else return!1;else o=ve;return!0}if(i(R,"moveOnce"),a=="char"||a=="codepoint")R();else if(a=="column")R(!0);else if(a=="word"||a=="group")for(var F=null,j=a=="group",V=r.cm&&r.cm.getHelper(o,"wordChars"),te=!0;!(u<0&&!R(!te));te=!1){var le=_.text.charAt(o.ch)||` -`,pe=Vr(le,V)?"w":j&&le==` -`?"n":!j||/\s/.test(le)?null:"p";if(j&&!te&&!pe&&(pe="s"),F&&F!=pe){u<0&&(u=1,R(),o.sticky="after");break}if(pe&&(F=pe),u>0&&!R(!te))break}var ye=Va(r,o,m,y,!0);return Ts(m,ye)&&(ye.hitSide=!0),ye}i(We,"findPosH");function Fc(r,o,u,a){var d=r.doc,m=o.left,y;if(a=="page"){var _=Math.min(r.display.wrapper.clientHeight,hr(r).innerHeight||d(r).documentElement.clientHeight),C=Math.max(_-.5*ji(r.display),3);y=(u>0?o.bottom:o.top)+u*C}else a=="line"&&(y=u>0?o.bottom+3:o.top-3);for(var E;E=vt(r,m,y),!!E.outside;){if(u<0?y<=0:y>=d.height){E.hitSide=!0;break}y+=u*5}return E}i(Fc,"findPosV");var xt=i(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");xt.prototype.init=function(r){var o=this,u=this,a=u.cm,d=u.div=r.lineDiv;d.contentEditable=!0,Dc(d,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize);function m(_){for(var C=_.target;C;C=C.parentNode){if(C==d)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}i(m,"belongsToInput"),He(d,"paste",function(_){!m(_)||kt(a,_)||Mo(_,a)||v<=11&&setTimeout(Nt(a,function(){return o.updateFromDOM()}),20)}),He(d,"compositionstart",function(_){o.composing={data:_.data,done:!1}}),He(d,"compositionupdate",function(_){o.composing||(o.composing={data:_.data,done:!1})}),He(d,"compositionend",function(_){o.composing&&(_.data!=o.composing.data&&o.readFromDOMSoon(),o.composing.done=!0)}),He(d,"touchstart",function(){return u.forceCompositionEnd()}),He(d,"input",function(){o.composing||o.readFromDOMSoon()});function y(_){if(!(!m(_)||kt(a,_))){if(a.somethingSelected())fp({lineWise:!1,text:a.getSelections()}),_.type=="cut"&&a.replaceSelection("",null,"cut");else if(a.options.lineWiseCopyCut){var C=dp(a);fp({lineWise:!0,text:C.text}),_.type=="cut"&&a.operation(function(){a.setSelections(C.ranges,0,st),a.replaceSelection("",null,"cut")})}else return;if(_.clipboardData){_.clipboardData.clearData();var E=bi.text.join(` -`);if(_.clipboardData.setData("Text",E),_.clipboardData.getData("Text")==E){_.preventDefault();return}}var R=Ic(),F=R.firstChild;Dc(F),a.display.lineSpace.insertBefore(R,a.display.lineSpace.firstChild),F.value=bi.text.join(` -`);var j=ot(Ht(d));rn(F),setTimeout(function(){a.display.lineSpace.removeChild(R),j.focus(),j==d&&u.showPrimarySelection()},50)}}i(y,"onCopyCut"),He(d,"copy",y),He(d,"cut",y)},xt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},xt.prototype.prepareSelection=function(){var r=Fd(this.cm,!1);return r.focus=ot(Ht(this.div))==this.div,r},xt.prototype.showSelection=function(r,o){!r||!this.cm.display.view.length||((r.focus||o)&&this.showPrimarySelection(),this.showMultipleSelections(r))},xt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xt.prototype.showPrimarySelection=function(){var r=this.getSelection(),o=this.cm,u=o.doc.sel.primary(),a=u.from(),d=u.to();if(o.display.viewTo==o.display.viewFrom||a.line>=o.display.viewTo||d.line=o.display.viewFrom&&Gs(o,a)||{node:_[0].measure.map[2],offset:0},E=d.liner.firstLine()&&(a=ce(a.line-1,Ae(r.doc,a.line-1).length)),d.ch==Ae(r.doc,d.line).text.length&&d.lineo.viewTo-1)return!1;var m,y,_;a.line==o.viewFrom||(m=Cl(r,a.line))==0?(y=mt(o.view[0].line),_=o.view[0].node):(y=mt(o.view[m].line),_=o.view[m-1].node.nextSibling);var C=Cl(r,d.line),E,R;if(C==o.view.length-1?(E=o.viewTo-1,R=o.lineDiv.lastChild):(E=mt(o.view[C+1].line)-1,R=o.view[C+1].node.previousSibling),!_)return!1;for(var F=r.doc.splitLines(Fm(r,_,R,y,E)),j=Ui(r.doc,ce(y,0),ce(E,Ae(r.doc,E).text.length));F.length>1&&j.length>1;)if(at(F)==at(j))F.pop(),j.pop(),E--;else if(F[0]==j[0])F.shift(),j.shift(),y++;else break;for(var V=0,te=0,le=F[0],pe=j[0],ye=Math.min(le.length,pe.length);Va.ch&&_e.charCodeAt(_e.length-te-1)==ve.charCodeAt(ve.length-te-1);)V--,te++;F[F.length-1]=_e.slice(0,_e.length-te).replace(/^\u200b+/,""),F[0]=F[0].slice(V).replace(/\u200b+$/,"");var Ie=ce(y,V),Pe=ce(E,j.length?at(j).length-te:0);if(F.length>1||F[0]||$e(Ie,Pe))return Pl(r.doc,F,Ie,Pe,"+input"),!0},xt.prototype.ensurePolled=function(){this.forceCompositionEnd()},xt.prototype.reset=function(){this.forceCompositionEnd()},xt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},xt.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},xt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&cn(this.cm,function(){return In(r.cm)})},xt.prototype.setUneditable=function(r){r.contentEditable="false"},xt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||Nt(this.cm,ph)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},xt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},xt.prototype.onContextMenu=function(){},xt.prototype.resetPosition=function(){},xt.prototype.needsContentAttribute=!0;function Gs(r,o){var u=Pa(r,o.line);if(!u||u.hidden)return null;var a=Ae(r.doc,o.line),d=Uf(u,a,o.line),m=Le(a,r.doc.direction),y="left";if(m){var _=ee(m,o.ch);y=_%2?"right":"left"}var C=W(d.map,o.ch,y);return C.offset=C.collapse=="right"?C.end:C.start,C}i(Gs,"posToDOM");function uw(r){for(var o=r;o;o=o.parentNode)if(/CodeMirror-gutter-wrapper/.test(o.className))return!0;return!1}i(uw,"isInGutter");function Ks(r,o){return o&&(r.bad=!0),r}i(Ks,"badPos");function Fm(r,o,u,a,d){var m="",y=!1,_=r.doc.lineSeparator(),C=!1;function E(V){return function(te){return te.id==V}}i(E,"recognizeMarker");function R(){y&&(m+=_,C&&(m+=_),y=C=!1)}i(R,"close");function F(V){V&&(R(),m+=V)}i(F,"addText");function j(V){if(V.nodeType==1){var te=V.getAttribute("cm-text");if(te){F(te);return}var le=V.getAttribute("cm-marker"),pe;if(le){var ye=r.findMarks(ce(a,0),ce(d+1,0),E(+le));ye.length&&(pe=ye[0].find(0))&&F(Ui(r.doc,pe.from,pe.to).join(_));return}if(V.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(V.nodeName);if(!/^br$/i.test(V.nodeName)&&V.textContent.length==0)return;_e&&R();for(var ve=0;ve=9&&o.hasSelection&&(o.hasSelection=null),u.poll()}),He(d,"paste",function(y){kt(a,y)||Mo(y,a)||(a.state.pasteIncoming=+new Date,u.fastPoll())});function m(y){if(!kt(a,y)){if(a.somethingSelected())fp({lineWise:!1,text:a.getSelections()});else if(a.options.lineWiseCopyCut){var _=dp(a);fp({lineWise:!0,text:_.text}),y.type=="cut"?a.setSelections(_.ranges,null,st):(u.prevInput="",d.value=_.text.join(` -`),rn(d))}else return;y.type=="cut"&&(a.state.cutIncoming=+new Date)}}i(m,"prepareCopyCut"),He(d,"cut",m),He(d,"copy",m),He(r.scroller,"paste",function(y){if(!(oi(r,y)||kt(a,y))){if(!d.dispatchEvent){a.state.pasteIncoming=+new Date,u.focus();return}var _=new Event("paste");_.clipboardData=y.clipboardData,d.dispatchEvent(_)}}),He(r.lineSpace,"selectstart",function(y){oi(r,y)||Er(y)}),He(d,"compositionstart",function(){var y=a.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:y,range:a.markText(y,a.getCursor("to"),{className:"CodeMirror-composing"})}}),He(d,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},ur.prototype.createField=function(r){this.wrapper=Ic(),this.textarea=this.wrapper.firstChild;var o=this.cm.options;Dc(this.textarea,o.spellcheck,o.autocorrect,o.autocapitalize)},ur.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},ur.prototype.prepareSelection=function(){var r=this.cm,o=r.display,u=r.doc,a=Fd(r);if(r.options.moveInputWithCursor){var d=J(r,u.sel.primary().head,"div"),m=o.wrapper.getBoundingClientRect(),y=o.lineDiv.getBoundingClientRect();a.teTop=Math.max(0,Math.min(o.wrapper.clientHeight-10,d.top+y.top-m.top)),a.teLeft=Math.max(0,Math.min(o.wrapper.clientWidth-10,d.left+y.left-m.left))}return a},ur.prototype.showSelection=function(r){var o=this.cm,u=o.display;tt(u.cursorDiv,r.cursors),tt(u.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},ur.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing&&r)){var o=this.cm;if(this.resetting=!0,o.somethingSelected()){this.prevInput="";var u=o.getSelection();this.textarea.value=u,o.state.focused&&rn(this.textarea),p&&v>=9&&(this.hasSelection=u)}else r||(this.prevInput=this.textarea.value="",p&&v>=9&&(this.hasSelection=null));this.resetting=!1}},ur.prototype.getField=function(){return this.textarea},ur.prototype.supportsTouch=function(){return!1},ur.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!L||ot(Ht(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ur.prototype.blur=function(){this.textarea.blur()},ur.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ur.prototype.receivedFocus=function(){this.slowPoll()},ur.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},ur.prototype.fastPoll=function(){var r=!1,o=this;o.pollingFast=!0;function u(){var a=o.poll();!a&&!r?(r=!0,o.polling.set(60,u)):(o.pollingFast=!1,o.slowPoll())}i(u,"p"),o.polling.set(20,u)},ur.prototype.poll=function(){var r=this,o=this.cm,u=this.textarea,a=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||Cd(u)&&!a&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;var d=u.value;if(d==a&&!o.somethingSelected())return!1;if(p&&v>=9&&this.hasSelection===d||B&&/[\uf700-\uf7ff]/.test(d))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu){var m=d.charCodeAt(0);if(m==8203&&!a&&(a="\u200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,_=Math.min(a.length,d.length);y<_&&a.charCodeAt(y)==d.charCodeAt(y);)++y;return cn(o,function(){ph(o,d.slice(y),a.length-y,null,r.composing?"*compose":null),d.length>1e3||d.indexOf(` -`)>-1?u.value=r.prevInput="":r.prevInput=d,r.composing&&(r.composing.range.clear(),r.composing.range=o.markText(r.composing.start,o.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ur.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ur.prototype.onKeyPress=function(){p&&v>=9&&(this.hasSelection=null),this.fastPoll()},ur.prototype.onContextMenu=function(r){var o=this,u=o.cm,a=u.display,d=o.textarea;o.contextMenuPending&&o.contextMenuPending();var m=To(u,r),y=a.scroller.scrollTop;if(!m||M)return;var _=u.options.resetSelectionOnContextMenu;_&&u.doc.sel.contains(m)==-1&&Nt(u,Kr)(u.doc,zs(m),st);var C=d.style.cssText,E=o.wrapper.style.cssText,R=o.wrapper.offsetParent.getBoundingClientRect();o.wrapper.style.cssText="position: static",d.style.cssText=`position: absolute; width: 30px; height: 30px; - top: `+(r.clientY-R.top-5)+"px; left: "+(r.clientX-R.left-5)+`px; - z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var F;S&&(F=d.ownerDocument.defaultView.scrollY),a.input.focus(),S&&d.ownerDocument.defaultView.scrollTo(null,F),a.input.reset(),u.somethingSelected()||(d.value=o.prevInput=" "),o.contextMenuPending=V,a.selForContextMenu=u.doc.sel,clearTimeout(a.detectingSelectAll);function j(){if(d.selectionStart!=null){var le=u.somethingSelected(),pe="\u200B"+(le?d.value:"");d.value="\u21DA",d.value=pe,o.prevInput=le?"":"\u200B",d.selectionStart=1,d.selectionEnd=pe.length,a.selForContextMenu=u.doc.sel}}i(j,"prepareSelectAllHack");function V(){if(o.contextMenuPending==V&&(o.contextMenuPending=!1,o.wrapper.style.cssText=E,d.style.cssText=C,p&&v<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=y),d.selectionStart!=null)){(!p||p&&v<9)&&j();var le=0,pe=i(function(){a.selForContextMenu==u.doc.sel&&d.selectionStart==0&&d.selectionEnd>0&&o.prevInput=="\u200B"?Nt(u,qa)(u):le++<10?a.detectingSelectAll=setTimeout(pe,500):(a.selForContextMenu=null,a.input.reset())},"poll");a.detectingSelectAll=setTimeout(pe,200)}}if(i(V,"rehide"),p&&v>=9&&j(),de){fl(r);var te=i(function(){jt(window,"mouseup",te),setTimeout(V,20)},"mouseup");He(window,"mouseup",te)}else setTimeout(V,50)},ur.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},ur.prototype.setUneditable=function(){},ur.prototype.needsContentAttribute=!1;function Bm(r,o){if(o=o?qt(o):{},o.value=r.value,!o.tabindex&&r.tabIndex&&(o.tabindex=r.tabIndex),!o.placeholder&&r.placeholder&&(o.placeholder=r.placeholder),o.autofocus==null){var u=ot(Ht(r));o.autofocus=u==r||r.getAttribute("autofocus")!=null&&u==document.body}function a(){r.value=_.getValue()}i(a,"save");var d;if(r.form&&(He(r.form,"submit",a),!o.leaveSubmitMethodAlone)){var m=r.form;d=m.submit;try{var y=m.submit=function(){a(),m.submit=d,m.submit(),m.submit=y}}catch{}}o.finishInit=function(C){C.save=a,C.getTextArea=function(){return r},C.toTextArea=function(){C.toTextArea=isNaN,a(),r.parentNode.removeChild(C.getWrapperElement()),r.style.display="",r.form&&(jt(r.form,"submit",a),!o.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=d))}},r.style.display="none";var _=yt(function(C){return r.parentNode.insertBefore(C,r.nextSibling)},o);return _}i(Bm,"fromTextArea");function fw(r){r.off=jt,r.on=He,r.wheelEventPixels=Y0,r.Doc=xn,r.splitLines=pa,r.countColumn=Rt,r.findColumn=yn,r.isWordChar=mi,r.Pass=Xt,r.signal=Ot,r.Line=sn,r.changeEnd=Ws,r.scrollbarModel=Nl,r.Pos=ce,r.cmpPos=$e,r.modes=Gu,r.mimeModes=Xo,r.resolveMode=dl,r.getMode=Ku,r.modeExtensions=Wi,r.extendMode=Lf,r.copyState=vi,r.startState=Xu,r.innerMode=Yu,r.commands=Oc,r.keyMap=Oo,r.keyName=bc,r.isModifierKey=ip,r.lookupKey=ai,r.normalizeKeyMap=li,r.StringStream=rr,r.SharedTextMarker=Ya,r.TextMarker=eo,r.LineWidget=Dl,r.e_preventDefault=Er,r.e_stopPropagation=Yo,r.e_stop=fl,r.addClass=Pt,r.contains=Qe,r.rmClass=Ce,r.keyNames=Ir}i(fw,"addLegacyProps"),fh(yt),ru(yt);var Hm="iter insert remove copy getEditor constructor".split(" ");for(var hp in xn.prototype)xn.prototype.hasOwnProperty(hp)&&ze(Hm,hp)<0&&(yt.prototype[hp]=function(r){return function(){return r.apply(this.doc,arguments)}}(xn.prototype[hp]));return Rn(xn),yt.inputStyles={textarea:ur,contenteditable:xt},yt.defineMode=function(r){!yt.defaults.mode&&r!="null"&&(yt.defaults.mode=r),bd.apply(this,arguments)},yt.defineMIME=Td,yt.defineMode("null",function(){return{token:i(function(r){return r.skipToEnd()},"token")}}),yt.defineMIME("text/plain","null"),yt.defineExtension=function(r,o){yt.prototype[r]=o},yt.defineDocExtension=function(r,o){xn.prototype[r]=o},yt.fromTextArea=Bm,fw(yt),yt.version="5.65.16",yt})});var KA=rt((F7,GA)=>{var FH=typeof Element<"u",BH=typeof Map=="function",HH=typeof Set=="function",zH=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s0(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,s,c;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!s0(e[s],t[s]))return!1;return!0}var h;if(BH&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;for(h=e.entries();!(s=h.next()).done;)if(!s0(s.value[1],t.get(s.value[0])))return!1;return!0}if(HH&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;return!0}if(zH&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(e[s]!==t[s])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(c=Object.keys(e),n=c.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[s]))return!1;if(FH&&e instanceof Element)return!1;for(s=n;s--!==0;)if(!((c[s]==="_owner"||c[s]==="__v"||c[s]==="__o")&&e.$$typeof)&&!s0(e[c[s]],t[c[s]]))return!1;return!0}return e!==e&&t!==t}i(s0,"equal");GA.exports=i(function(t,n){try{return s0(t,n)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}},"isEqual")});var hM=rt((jj,dM)=>{dM.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Iu=rt(_f=>{var W_,ez=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_f.getSymbolSize=i(function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},"getSymbolSize");_f.getSymbolTotalCodewords=i(function(t){return ez[t]},"getSymbolTotalCodewords");_f.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};_f.setToSJISFunction=i(function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');W_=t},"setToSJISFunction");_f.isKanjiModeEnabled=function(){return typeof W_<"u"};_f.toSJIS=i(function(t){return W_(t)},"toSJIS")});var v0=rt(jo=>{jo.L={bit:1};jo.M={bit:0};jo.Q={bit:3};jo.H={bit:2};function tz(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return jo.L;case"m":case"medium":return jo.M;case"q":case"quartile":return jo.Q;case"h":case"high":return jo.H;default:throw new Error("Unknown EC Level: "+e)}}i(tz,"fromString");jo.isValid=i(function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},"isValid");jo.from=i(function(t,n){if(jo.isValid(t))return t;try{return tz(t)}catch{return n}},"from")});var vM=rt((Qj,mM)=>{function gM(){this.buffer=[],this.length=0}i(gM,"BitBuffer");gM.prototype={get:i(function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},"get"),put:i(function(e,t){for(let n=0;n>>t-n-1&1)===1)},"put"),getLengthInBits:i(function(){return this.length},"getLengthInBits"),putBit:i(function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++},"putBit")};mM.exports=gM});var wM=rt((Zj,yM)=>{function Hg(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}i(Hg,"BitMatrix");Hg.prototype.set=function(e,t,n,s){let c=e*this.size+t;this.data[c]=n,s&&(this.reservedBit[c]=!0)};Hg.prototype.get=function(e,t){return this.data[e*this.size+t]};Hg.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};Hg.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};yM.exports=Hg});var SM=rt(y0=>{var rz=Iu().getSymbolSize;y0.getRowColCoords=i(function(t){if(t===1)return[];let n=Math.floor(t/7)+2,s=rz(t),c=s===145?26:Math.ceil((s-13)/(2*n-2))*2,h=[s-7];for(let p=1;p{var nz=Iu().getSymbolSize,xM=7;_M.getPositions=i(function(t){let n=nz(t);return[[0,0],[n-xM,0],[0,n-xM]]},"getPositions")});var EM=rt(tr=>{tr.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Cf={N1:3,N2:3,N3:40,N4:10};tr.isValid=i(function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},"isValid");tr.from=i(function(t){return tr.isValid(t)?parseInt(t,10):void 0},"from");tr.getPenaltyN1=i(function(t){let n=t.size,s=0,c=0,h=0,p=null,v=null;for(let S=0;S=5&&(s+=Cf.N1+(c-5)),p=k,c=1),k=t.get(b,S),k===v?h++:(h>=5&&(s+=Cf.N1+(h-5)),v=k,h=1)}c>=5&&(s+=Cf.N1+(c-5)),h>=5&&(s+=Cf.N1+(h-5))}return s},"getPenaltyN1");tr.getPenaltyN2=i(function(t){let n=t.size,s=0;for(let c=0;c=10&&(c===1488||c===93)&&s++,h=h<<1&2047|t.get(v,p),v>=10&&(h===1488||h===93)&&s++}return s*Cf.N3},"getPenaltyN3");tr.getPenaltyN4=i(function(t){let n=0,s=t.data.length;for(let h=0;h{var Fu=v0(),w0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],S0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];U_.getBlocksCount=i(function(t,n){switch(n){case Fu.L:return w0[(t-1)*4+0];case Fu.M:return w0[(t-1)*4+1];case Fu.Q:return w0[(t-1)*4+2];case Fu.H:return w0[(t-1)*4+3];default:return}},"getBlocksCount");U_.getTotalCodewordsCount=i(function(t,n){switch(n){case Fu.L:return S0[(t-1)*4+0];case Fu.M:return S0[(t-1)*4+1];case Fu.Q:return S0[(t-1)*4+2];case Fu.H:return S0[(t-1)*4+3];default:return}},"getTotalCodewordsCount")});var bM=rt(_0=>{var zg=new Uint8Array(512),x0=new Uint8Array(256);i(function(){let t=1;for(let n=0;n<255;n++)zg[n]=t,x0[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)zg[n]=zg[n-255]},"initTables")();_0.log=i(function(t){if(t<1)throw new Error("log("+t+")");return x0[t]},"log");_0.exp=i(function(t){return zg[t]},"exp");_0.mul=i(function(t,n){return t===0||n===0?0:zg[x0[t]+x0[n]]},"mul")});var TM=rt(Wg=>{var V_=bM();Wg.mul=i(function(t,n){let s=new Uint8Array(t.length+n.length-1);for(let c=0;c=0;){let c=s[0];for(let p=0;p{var kM=TM();function q_(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i(q_,"ReedSolomonEncoder");q_.prototype.initialize=i(function(t){this.degree=t,this.genPoly=kM.generateECPolynomial(this.degree)},"initialize");q_.prototype.encode=i(function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(t.length+this.degree);n.set(t);let s=kM.mod(n,this.genPoly),c=this.degree-s.length;if(c>0){let h=new Uint8Array(this.degree);return h.set(s,c),h}return s},"encode");NM.exports=q_});var j_=rt(AM=>{AM.isValid=i(function(t){return!isNaN(t)&&t>=1&&t<=40},"isValid")});var G_=rt(aa=>{var MM="[0-9]+",oz="[A-Z $%*+\\-./:]+",Ug="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ug=Ug.replace(/u/g,"\\u");var sz="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ug+`)(?:.|[\r -]))+`;aa.KANJI=new RegExp(Ug,"g");aa.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");aa.BYTE=new RegExp(sz,"g");aa.NUMERIC=new RegExp(MM,"g");aa.ALPHANUMERIC=new RegExp(oz,"g");var lz=new RegExp("^"+Ug+"$"),az=new RegExp("^"+MM+"$"),uz=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");aa.testKanji=i(function(t){return lz.test(t)},"testKanji");aa.testNumeric=i(function(t){return az.test(t)},"testNumeric");aa.testAlphanumeric=i(function(t){return uz.test(t)},"testAlphanumeric")});var Bu=rt(en=>{var cz=j_(),K_=G_();en.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};en.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};en.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};en.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};en.MIXED={bit:-1};en.getCharCountIndicator=i(function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!cz.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},"getCharCountIndicator");en.getBestModeForData=i(function(t){return K_.testNumeric(t)?en.NUMERIC:K_.testAlphanumeric(t)?en.ALPHANUMERIC:K_.testKanji(t)?en.KANJI:en.BYTE},"getBestModeForData");en.toString=i(function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},"toString");en.isValid=i(function(t){return t&&t.bit&&t.ccBits},"isValid");function fz(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return en.NUMERIC;case"alphanumeric":return en.ALPHANUMERIC;case"kanji":return en.KANJI;case"byte":return en.BYTE;default:throw new Error("Unknown mode: "+e)}}i(fz,"fromString");en.from=i(function(t,n){if(en.isValid(t))return t;try{return fz(t)}catch{return n}},"from")});var IM=rt(Ef=>{var C0=Iu(),pz=$_(),LM=v0(),Hu=Bu(),Y_=j_(),RM=7973,PM=C0.getBCHDigit(RM);function dz(e,t,n){for(let s=1;s<=40;s++)if(t<=Ef.getCapacity(s,n,e))return s}i(dz,"getBestVersionForDataLength");function DM(e,t){return Hu.getCharCountIndicator(e,t)+4}i(DM,"getReservedBitsCount");function hz(e,t){let n=0;return e.forEach(function(s){let c=DM(s.mode,t);n+=c+s.getBitsLength()}),n}i(hz,"getTotalBitsFromDataArray");function gz(e,t){for(let n=1;n<=40;n++)if(hz(e,n)<=Ef.getCapacity(n,t,Hu.MIXED))return n}i(gz,"getBestVersionForMixedData");Ef.from=i(function(t,n){return Y_.isValid(t)?parseInt(t,10):n},"from");Ef.getCapacity=i(function(t,n,s){if(!Y_.isValid(t))throw new Error("Invalid QR Code version");typeof s>"u"&&(s=Hu.BYTE);let c=C0.getSymbolTotalCodewords(t),h=pz.getTotalCodewordsCount(t,n),p=(c-h)*8;if(s===Hu.MIXED)return p;let v=p-DM(s,t);switch(s){case Hu.NUMERIC:return Math.floor(v/10*3);case Hu.ALPHANUMERIC:return Math.floor(v/11*2);case Hu.KANJI:return Math.floor(v/13);case Hu.BYTE:default:return Math.floor(v/8)}},"getCapacity");Ef.getBestVersionForData=i(function(t,n){let s,c=LM.from(n,LM.M);if(Array.isArray(t)){if(t.length>1)return gz(t,c);if(t.length===0)return 1;s=t[0]}else s=t;return dz(s.mode,s.getLength(),c)},"getBestVersionForData");Ef.getEncodedBits=i(function(t){if(!Y_.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;C0.getBCHDigit(n)-PM>=0;)n^=RM<{var X_=Iu(),BM=1335,mz=21522,FM=X_.getBCHDigit(BM);HM.getEncodedBits=i(function(t,n){let s=t.bit<<3|n,c=s<<10;for(;X_.getBCHDigit(c)-FM>=0;)c^=BM<{var vz=Bu();function hd(e){this.mode=vz.NUMERIC,this.data=e.toString()}i(hd,"NumericData");hd.getBitsLength=i(function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},"getBitsLength");hd.prototype.getLength=i(function(){return this.data.length},"getLength");hd.prototype.getBitsLength=i(function(){return hd.getBitsLength(this.data.length)},"getBitsLength");hd.prototype.write=i(function(t){let n,s,c;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),c=parseInt(s,10),t.put(c,10);let h=this.data.length-n;h>0&&(s=this.data.substr(n),c=parseInt(s,10),t.put(c,h*3+1))},"write");WM.exports=hd});var VM=rt((kG,$M)=>{var yz=Bu(),Q_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function gd(e){this.mode=yz.ALPHANUMERIC,this.data=e}i(gd,"AlphanumericData");gd.getBitsLength=i(function(t){return 11*Math.floor(t/2)+6*(t%2)},"getBitsLength");gd.prototype.getLength=i(function(){return this.data.length},"getLength");gd.prototype.getBitsLength=i(function(){return gd.getBitsLength(this.data.length)},"getBitsLength");gd.prototype.write=i(function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=Q_.indexOf(this.data[n])*45;s+=Q_.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(Q_.indexOf(this.data[n]),6)},"write");$M.exports=gd});var jM=rt((OG,qM)=>{"use strict";qM.exports=i(function(t){for(var n=[],s=t.length,c=0;c=55296&&h<=56319&&s>c+1){var p=t.charCodeAt(c+1);p>=56320&&p<=57343&&(h=(h-55296)*1024+p-56320+65536,c+=1)}if(h<128){n.push(h);continue}if(h<2048){n.push(h>>6|192),n.push(h&63|128);continue}if(h<55296||h>=57344&&h<65536){n.push(h>>12|224),n.push(h>>6&63|128),n.push(h&63|128);continue}if(h>=65536&&h<=1114111){n.push(h>>18|240),n.push(h>>12&63|128),n.push(h>>6&63|128),n.push(h&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer},"encodeUtf8")});var KM=rt((MG,GM)=>{var wz=jM(),Sz=Bu();function md(e){this.mode=Sz.BYTE,typeof e=="string"&&(e=wz(e)),this.data=new Uint8Array(e)}i(md,"ByteData");md.getBitsLength=i(function(t){return t*8},"getBitsLength");md.prototype.getLength=i(function(){return this.data.length},"getLength");md.prototype.getBitsLength=i(function(){return md.getBitsLength(this.data.length)},"getBitsLength");md.prototype.write=function(e){for(let t=0,n=this.data.length;t{var xz=Bu(),_z=Iu();function vd(e){this.mode=xz.KANJI,this.data=e}i(vd,"KanjiData");vd.getBitsLength=i(function(t){return t*13},"getBitsLength");vd.prototype.getLength=i(function(){return this.data.length},"getLength");vd.prototype.getBitsLength=i(function(){return vd.getBitsLength(this.data.length)},"getBitsLength");vd.prototype.write=function(e){let t;for(t=0;t=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};YM.exports=vd});var QM=rt((DG,J_)=>{"use strict";var $g={single_source_shortest_paths:i(function(e,t,n){var s={},c={};c[t]=0;var h=$g.PriorityQueue.make();h.push(t,0);for(var p,v,S,b,k,D,M,z,q;!h.empty();){p=h.pop(),v=p.value,b=p.cost,k=e[v]||{};for(S in k)k.hasOwnProperty(S)&&(D=k[S],M=b+D,z=c[S],q=typeof c[S]>"u",(q||z>M)&&(c[S]=M,h.push(S,M),s[S]=v))}if(typeof n<"u"&&typeof c[n]>"u"){var Q=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(Q)}return s},"single_source_shortest_paths"),extract_shortest_path_from_predecessor_list:i(function(e,t){for(var n=[],s=t,c;s;)n.push(s),c=e[s],s=e[s];return n.reverse(),n},"extract_shortest_path_from_predecessor_list"),find_path:i(function(e,t,n){var s=$g.single_source_shortest_paths(e,t,n);return $g.extract_shortest_path_from_predecessor_list(s,n)},"find_path"),PriorityQueue:{make:i(function(e){var t=$g.PriorityQueue,n={},s;e=e||{};for(s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);return n.queue=[],n.sorter=e.sorter||t.default_sorter,n},"make"),default_sorter:i(function(e,t){return e.cost-t.cost},"default_sorter"),push:i(function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},"push"),pop:i(function(){return this.queue.shift()},"pop"),empty:i(function(){return this.queue.length===0},"empty")}};typeof J_<"u"&&(J_.exports=$g)});var oL=rt(yd=>{var Bt=Bu(),eL=UM(),tL=VM(),rL=KM(),nL=XM(),Vg=G_(),E0=Iu(),Cz=QM();function JM(e){return unescape(encodeURIComponent(e)).length}i(JM,"getStringByteLength");function qg(e,t,n){let s=[],c;for(;(c=e.exec(n))!==null;)s.push({data:c[0],index:c.index,mode:t,length:c[0].length});return s}i(qg,"getSegments");function iL(e){let t=qg(Vg.NUMERIC,Bt.NUMERIC,e),n=qg(Vg.ALPHANUMERIC,Bt.ALPHANUMERIC,e),s,c;return E0.isKanjiModeEnabled()?(s=qg(Vg.BYTE,Bt.BYTE,e),c=qg(Vg.KANJI,Bt.KANJI,e)):(s=qg(Vg.BYTE_KANJI,Bt.BYTE,e),c=[]),t.concat(n,s,c).sort(function(p,v){return p.index-v.index}).map(function(p){return{data:p.data,mode:p.mode,length:p.length}})}i(iL,"getSegmentsFromString");function Z_(e,t){switch(t){case Bt.NUMERIC:return eL.getBitsLength(e);case Bt.ALPHANUMERIC:return tL.getBitsLength(e);case Bt.KANJI:return nL.getBitsLength(e);case Bt.BYTE:return rL.getBitsLength(e)}}i(Z_,"getSegmentBitsLength");function Ez(e){return e.reduce(function(t,n){let s=t.length-1>=0?t[t.length-1]:null;return s&&s.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)},[])}i(Ez,"mergeSegments");function bz(e){let t=[];for(let n=0;n{var T0=Iu(),eC=v0(),kz=vM(),Nz=wM(),Oz=SM(),Az=CM(),nC=EM(),iC=$_(),Mz=OM(),b0=IM(),Lz=zM(),Pz=Bu(),tC=oL();function Rz(e,t){let n=e.size,s=Az.getPositions(t);for(let c=0;c=0&&v<=6&&(S===0||S===6)||S>=0&&S<=6&&(v===0||v===6)||v>=2&&v<=4&&S>=2&&S<=4?e.set(h+v,p+S,!0,!0):e.set(h+v,p+S,!1,!0))}}i(Rz,"setupFinderPattern");function Dz(e){let t=e.size;for(let n=8;n>v&1)===1,e.set(c,h,p,!0),e.set(h,c,p,!0)}i(Fz,"setupVersionInfo");function rC(e,t,n){let s=e.size,c=Lz.getEncodedBits(t,n),h,p;for(h=0;h<15;h++)p=(c>>h&1)===1,h<6?e.set(h,8,p,!0):h<8?e.set(h+1,8,p,!0):e.set(s-15+h,8,p,!0),h<8?e.set(8,s-h-1,p,!0):h<9?e.set(8,15-h-1+1,p,!0):e.set(8,15-h-1,p,!0);e.set(s-8,8,1,!0)}i(rC,"setupFormatInfo");function Bz(e,t){let n=e.size,s=-1,c=n-1,h=7,p=0;for(let v=n-1;v>0;v-=2)for(v===6&&v--;;){for(let S=0;S<2;S++)if(!e.isReserved(c,v-S)){let b=!1;p>>h&1)===1),e.set(c,v-S,b),h--,h===-1&&(p++,h=7)}if(c+=s,c<0||n<=c){c-=s,s=-s;break}}}i(Bz,"setupData");function Hz(e,t,n){let s=new kz;n.forEach(function(S){s.put(S.mode.bit,4),s.put(S.getLength(),Pz.getCharCountIndicator(S.mode,e)),S.write(s)});let c=T0.getSymbolTotalCodewords(e),h=iC.getTotalCodewordsCount(e,t),p=(c-h)*8;for(s.getLengthInBits()+4<=p&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);let v=(p-s.getLengthInBits())/8;for(let S=0;S1}i(Vf,"hasBadZoomedRects");var ac={},vs={};function zp(r,o){arguments.length>2&&(o.dependencies=Array.prototype.slice.call(arguments,2)),ac[r]=o}i(zp,"defineMode");function Up(r,o){vs[r]=o}i(Up,"defineMIME");function La(r){if(typeof r=="string"&&vs.hasOwnProperty(r))r=vs[r];else if(r&&typeof r.name=="string"&&vs.hasOwnProperty(r.name)){var o=vs[r.name];typeof o=="string"&&(o={name:o}),r=io(o,r),r.name=o.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return La("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return La("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}i(La,"resolveMode");function lc(r,o){o=La(o);var c=ac[o.name];if(!c)return lc(r,"text/plain");var u=c(r,o);if(ao.hasOwnProperty(o.name)){var p=ao[o.name];for(var g in p)p.hasOwnProperty(g)&&(u.hasOwnProperty(g)&&(u["_"+g]=u[g]),u[g]=p[g])}if(u.name=o.name,o.helperType&&(u.helperType=o.helperType),o.modeProps)for(var y in o.modeProps)u[y]=o.modeProps[y];return u}i(lc,"getMode");var ao={};function qf(r,o){var c=ao.hasOwnProperty(r)?ao[r]:ao[r]={};Gt(o,c)}i(qf,"extendMode");function Oi(r,o){if(o===!0)return o;if(r.copyState)return r.copyState(o);var c={};for(var u in o){var p=o[u];p instanceof Array&&(p=p.concat([])),c[u]=p}return c}i(Oi,"copyState");function uc(r,o){for(var c;r.innerMode&&(c=r.innerMode(o),!(!c||c.mode==r));)o=c.state,r=c.mode;return c||{mode:r,state:o}}i(uc,"innerMode");function cc(r,o,c){return r.startState?r.startState(o,c):!0}i(cc,"startState");var or=i(function(r,o,c){this.pos=this.start=0,this.string=r,this.tabSize=o||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=c},"StringStream");or.prototype.eol=function(){return this.pos>=this.string.length},or.prototype.sol=function(){return this.pos==this.lineStart},or.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},or.prototype.next=function(){if(this.poso},or.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},or.prototype.skipToEnd=function(){this.pos=this.string.length},or.prototype.skipTo=function(r){var o=this.string.indexOf(r,this.pos);if(o>-1)return this.pos=o,!0},or.prototype.backUp=function(r){this.pos-=r},or.prototype.column=function(){return this.lastColumnPos0?null:(g&&o!==!1&&(this.pos+=g[0].length),g)}},or.prototype.current=function(){return this.string.slice(this.start,this.pos)},or.prototype.hideFirstChars=function(r,o){this.lineStart+=r;try{return o()}finally{this.lineStart-=r}},or.prototype.lookAhead=function(r){var o=this.lineOracle;return o&&o.lookAhead(r)},or.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Pe(r,o){if(o-=r.first,o<0||o>=r.size)throw new Error("There is no line "+(o+r.first)+" in the document.");for(var c=r;!c.lines;)for(var u=0;;++u){var p=c.children[u],g=p.chunkSize();if(o=r.first&&oc?ce(c,Pe(r,c).text.length):jf(o,Pe(r,o.line).text.length)}i(qe,"clipPos");function jf(r,o){var c=r.ch;return c==null||c>o?ce(r.line,o):c<0?ce(r.line,0):r}i(jf,"clipToLen");function Pl(r,o){for(var c=[],u=0;uthis.maxLookAhead&&(this.maxLookAhead=r),o},mi.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var o=this.baseTokens[this.baseTokenPos+1];return{type:o&&o.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},mi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mi.fromSaved=function(r,o,c){return o instanceof ws?new mi(r,Oi(r.mode,o.state),c,o.lookAhead):new mi(r,Oi(r.mode,o),c)},mi.prototype.save=function(r){var o=r!==!1?Oi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ws(o,this.maxLookAhead):o};function Ll(r,o,c,u){var p=[r.state.modeGen],g={};mc(r,o.text,r.doc.mode,c,function(E,O){return p.push(E,O)},g,u);for(var y=c.state,C=i(function(E){c.baseTokens=p;var O=r.state.overlays[E],F=1,K=0;c.state=!0,mc(r,o.text,O.mode,c,function(V,te){for(var ae=F;KV&&p.splice(F,1,V,p[F+1],de),F+=2,K=Math.min(V,de)}if(te)if(O.opaque)p.splice(ae,F-ae,V,"overlay "+te),F=ae+2;else for(;aer.options.maxHighlightLength&&Oi(r.doc.mode,u.state),g=Ll(r,o,u);p&&(u.state=p),o.stateAfter=u.save(!p),o.styles=g.styles,g.classes?o.styleClasses=g.classes:o.styleClasses&&(o.styleClasses=null),c===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return o.styles}i(Ml,"getLineStyles");function Ss(r,o,c){var u=r.doc,p=r.display;if(!u.mode.startState)return new mi(u,!0,o);var g=Dl(r,o,c),y=g>u.first&&Pe(u,g-1).stateAfter,C=y?mi.fromSaved(u,y,g):new mi(u,cc(u.mode),g);return u.iter(g,o,function(_){uo(r,_.text,C);var E=C.line;_.stateAfter=E==o-1||E%5==0||E>=p.viewFrom&&Eo.start)return g}throw new Error("Mode "+r.name+" failed to advance stream.")}i(Ks,"readToken");var pc=i(function(r,o,c){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=o||null,this.state=c},"Token");function Rl(r,o,c,u){var p=r.doc,g=p.mode,y;o=qe(p,o);var C=Pe(p,o.line),_=Ss(r,o.line,c),E=new or(C.text,r.options.tabSize,_),O;for(u&&(O=[]);(u||E.posr.options.maxHighlightLength?(C=!1,y&&uo(r,o,u,O.pos),O.pos=o.length,F=null):F=hc(Ks(c,O,u.state,K),g),K){var V=K[0].name;V&&(F="m-"+(F?V+" "+F:V))}if(!C||E!=F){for(;_y;--C){if(C<=g.first)return g.first;var _=Pe(g,C-1),E=_.stateAfter;if(E&&(!c||C+(E instanceof ws?E.lookAhead:0)<=g.modeFrontier))return C;var O=Ft(_.text,null,r.options.tabSize);(p==null||u>O)&&(p=C-1,u=O)}return p}i(Dl,"findStartLine");function Ra(r,o){if(r.modeFrontier=Math.min(r.modeFrontier,o),!(r.highlightFrontierc;u--){var p=Pe(r,u).stateAfter;if(p&&(!(p instanceof ws)||u+p.lookAhead=o:g.to>o);(u||(u=[])).push(new Il(y,g.from,_?null:g.to))}}return u}i(Vp,"markedSpansBefore");function qp(r,o,c){var u;if(r)for(var p=0;p=o:g.to>o);if(C||g.from==o&&y.type=="bookmark"&&(!c||g.marker.insertLeft)){var _=g.from==null||(y.inclusiveLeft?g.from<=o:g.from0&&C)for(var ke=0;ke0)){var O=[_,1],F=Ve(E.from,C.from),K=Ve(E.to,C.to);(F<0||!y.inclusiveLeft&&!F)&&O.push({from:E.from,to:C.from}),(K>0||!y.inclusiveRight&&!K)&&O.push({from:C.to,to:E.to}),p.splice.apply(p,O),_+=O.length-3}}return p}i(jp,"removeReadOnlyRanges");function Bt(r){var o=r.markedSpans;if(o){for(var c=0;co)&&(!u||Gs(u,g.marker)<0)&&(u=g.marker)}return u}i(Ia,"collapsedSpanAround");function Kp(r,o,c,u,p){var g=Pe(r,o),y=Di&&g.markedSpans;if(y)for(var C=0;C=0&&F<=0||O<=0&&F>=0)&&(O<=0&&(_.marker.inclusiveRight&&p.inclusiveLeft?Ve(E.to,c)>=0:Ve(E.to,c)>0)||O>=0&&(_.marker.inclusiveRight&&p.inclusiveLeft?Ve(E.from,u)<=0:Ve(E.from,u)<0)))return!0}}}i(Kp,"conflictingCollapsedRange");function Rt(r){for(var o;o=Fl(r);)r=o.find(-1,!0).line;return r}i(Rt,"visualLine");function Yf(r){for(var o;o=ve(r);)r=o.find(1,!0).line;return r}i(Yf,"visualLineEnd");function Ys(r){for(var o,c;o=ve(r);)r=o.find(1,!0).line,(c||(c=[])).push(r);return c}i(Ys,"visualLineContinued");function Fa(r,o){var c=Pe(r,o),u=Rt(c);return c==u?o:vt(u)}i(Fa,"visualLineNo");function Uo(r,o){if(o>r.lastLine())return o;var c=Pe(r,o),u;if(!Se(r,c))return o;for(;u=ve(c);)c=u.find(1,!0).line;return vt(c)+1}i(Uo,"visualLineEndNo");function Se(r,o){var c=Di&&o.markedSpans;if(c){for(var u=void 0,p=0;po.maxLineLength&&(o.maxLineLength=p,o.maxLine=u)})}i(Bl,"findMaxLine");var pn=i(function(r,o,c){this.text=r,Ot(this,o),this.height=c?c(this):1},"Line");pn.prototype.lineNo=function(){return vt(this)},zn(pn);function Hl(r,o,c,u){r.text=o,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),Bt(r),Ot(r,c);var p=u?u(r):1;p!=r.height&&Ri(r,p)}i(Hl,"updateLine");function Qr(r){r.parent=null,Bt(r)}i(Qr,"cleanUpLine");var zl={},Zn={};function Xf(r,o){if(!r||/^\s*$/.test(r))return null;var c=o.addModeClass?Zn:zl;return c[r]||(c[r]=r.replace(/\S+/g,"cm-$&"))}i(Xf,"interpretTokenStyle");function wc(r,o){var c=Xe("span",null,null,S?"padding-right: .1px":null),u={pre:Xe("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};o.measure={};for(var p=0;p<=(o.rest?o.rest.length:0);p++){var g=p?o.rest[p-1]:o.line,y=void 0;u.pos=0,u.addToken=Ba,Fp(r.display.measure)&&(y=Me(g,r.doc.direction))&&(u.addToken=$t(u.addToken,y)),u.map=[];var C=o!=r.display.externalMeasured&&vt(g);Sc(g,u,Ml(r,g,C)),g.styleClasses&&(g.styleClasses.bgClass&&(u.bgClass=At(g.styleClasses.bgClass,u.bgClass||"")),g.styleClasses.textClass&&(u.textClass=At(g.styleClasses.textClass,u.textClass||""))),u.map.length==0&&u.map.push(0,0,u.content.appendChild($f(r.display.measure))),p==0?(o.measure.map=u.map,o.measure.cache={}):((o.measure.maps||(o.measure.maps=[])).push(u.map),(o.measure.caches||(o.measure.caches=[])).push({}))}if(S){var _=u.content.lastChild;(/\bcm-tab\b/.test(_.className)||_.querySelector&&_.querySelector(".cm-tab"))&&(u.content.className="cm-tab-wrap-hack")}return Mt(r,"renderLine",r,o.line,u.pre),u.pre.className&&(u.textClass=At(u.pre.className,u.textClass||"")),u}i(wc,"buildLineContent");function jt(r){var o=xe("span","\u2022","cm-invalidchar");return o.title="\\u"+r.charCodeAt(0).toString(16),o.setAttribute("aria-label",o.title),o}i(jt,"defaultSpecialCharPlaceholder");function Ba(r,o,c,u,p,g,y){if(o){var C=r.splitSpaces?Ul(o,r.trailingSpace):o,_=r.cm.state.specialChars,E=!1,O;if(!_.test(o))r.col+=o.length,O=document.createTextNode(C),r.map.push(r.pos,r.pos+o.length,O),d&&v<9&&(E=!0),r.pos+=o.length;else{O=document.createDocumentFragment();for(var F=0;;){_.lastIndex=F;var K=_.exec(o),V=K?K.index-F:o.length-F;if(V){var te=document.createTextNode(C.slice(F,F+V));d&&v<9?O.appendChild(xe("span",[te])):O.appendChild(te),r.map.push(r.pos,r.pos+V,te),r.col+=V,r.pos+=V}if(!K)break;F+=V+1;var ae=void 0;if(K[0]==" "){var de=r.cm.options.tabSize,we=de-r.col%de;ae=O.appendChild(xe("span",Ho(we),"cm-tab")),ae.setAttribute("role","presentation"),ae.setAttribute("cm-text"," "),r.col+=we}else K[0]=="\r"||K[0]==` +`?(ae=O.appendChild(xe("span",K[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ae.setAttribute("cm-text",K[0]),r.col+=1):(ae=r.cm.options.specialCharPlaceholder(K[0]),ae.setAttribute("cm-text",K[0]),d&&v<9?O.appendChild(xe("span",[ae])):O.appendChild(ae),r.col+=1);r.map.push(r.pos,r.pos+1,ae),r.pos++}}if(r.trailingSpace=C.charCodeAt(o.length-1)==32,c||u||p||E||g||y){var _e=c||"";u&&(_e+=u),p&&(_e+=p);var ye=xe("span",[O],_e,g);if(y)for(var ke in y)y.hasOwnProperty(ke)&&ke!="style"&&ke!="class"&&ye.setAttribute(ke,y[ke]);return r.content.appendChild(ye)}r.content.appendChild(O)}}i(Ba,"buildToken");function Ul(r,o){if(r.length>1&&!/ /.test(r))return r;for(var c=o,u="",p=0;pE&&F.from<=E));K++);if(F.to>=O)return r(c,u,p,g,y,C,_);r(c,u.slice(0,F.to-E),p,g,null,C,_),g=null,u=u.slice(F.to-E),E=F.to}}}i($t,"buildTokenBadBidi");function Ii(r,o,c,u){var p=!u&&c.widgetNode;p&&r.map.push(r.pos,r.pos+o,p),!u&&r.cm.display.input.needsContentAttribute&&(p||(p=r.content.appendChild(document.createElement("span"))),p.setAttribute("cm-marker",c.id)),p&&(r.cm.display.input.setUneditable(p),r.content.appendChild(p)),r.pos+=o,r.trailingSpace=!1}i(Ii,"buildCollapsedSpan");function Sc(r,o,c){var u=r.markedSpans,p=r.text,g=0;if(!u){for(var y=1;y_||it.collapsed&&Oe.to==_&&Oe.from==_)){if(Oe.to!=null&&Oe.to!=_&&V>Oe.to&&(V=Oe.to,ae=""),it.className&&(te+=" "+it.className),it.css&&(K=(K?K+";":"")+it.css),it.startStyle&&Oe.from==_&&(de+=" "+it.startStyle),it.endStyle&&Oe.to==V&&(ke||(ke=[])).push(it.endStyle,Oe.to),it.title&&((_e||(_e={})).title=it.title),it.attributes)for(var Dt in it.attributes)(_e||(_e={}))[Dt]=it.attributes[Dt];it.collapsed&&(!we||Gs(we.marker,it)<0)&&(we=Oe)}else Oe.from>_&&V>Oe.from&&(V=Oe.from)}if(ke)for(var pr=0;pr=C)break;for(var ar=Math.min(C,V);;){if(O){var Sr=_+O.length;if(!we){var xr=Sr>ar?O.slice(0,ar-_):O;o.addToken(o,xr,F?F+te:te,de,_+xr.length==V?ae:"",K,_e)}if(Sr>=ar){O=O.slice(ar-_),_=ar;break}_=Sr,de=""}O=p.slice(g,g=c[E++]),F=Xf(c[E++],o.cm.options)}}}i(Sc,"insertLineContent");function Qf(r,o,c){this.line=o,this.rest=Ys(o),this.size=this.rest?vt(lt(this.rest))-c+1:1,this.node=this.text=null,this.hidden=Se(r,o)}i(Qf,"LineView");function Qs(r,o,c){for(var u=[],p,g=o;g2&&g.push((_.bottom+E.top)/2-c.top)}}g.push(c.bottom-c.top)}}i(xs,"ensureLineHeights");function td(r,o,c){if(r.line==o)return{map:r.measure.map,cache:r.measure.cache};if(r.rest){for(var u=0;uc)return{map:r.measure.maps[p],cache:r.measure.caches[p],before:!0}}}i(td,"mapFromLineView");function Xp(r,o){o=Rt(o);var c=vt(o),u=r.display.externalMeasured=new Qf(r.doc,o,c);u.lineN=c;var p=u.built=wc(r,u);return u.text=p.pre,tt(r.display.lineMeasure,p.pre),u}i(Xp,"updateExternalMeasurement");function Kl(r,o,c,u){return w(r,Tn(r,o),c,u)}i(Kl,"measureChar");function Gl(r,o){if(o>=r.display.viewFrom&&o=c.lineN&&oo)&&(g=_-C,p=g-1,o>=_&&(y="right")),p!=null){if(u=r[E+2],C==_&&c==(u.insertLeft?"left":"right")&&(y=c),c=="left"&&p==0)for(;E&&r[E-2]==r[E-3]&&r[E-1].insertLeft;)u=r[(E-=3)+2],y="left";if(c=="right"&&p==_-C)for(;E=0&&(c=r[p]).left==c.right;p--);return c}i(W,"getUsefulRect");function mn(r,o,c,u){var p=U(o.map,c,u),g=p.node,y=p.start,C=p.end,_=p.collapse,E;if(g.nodeType==3){for(var O=0;O<4;O++){for(;y&&hi(o.line.text.charAt(p.coverStart+y));)--y;for(;p.coverStart+C0&&(_=u="right");var F;r.options.lineWrapping&&(F=g.getClientRects()).length>1?E=F[u=="right"?F.length-1:0]:E=g.getBoundingClientRect()}if(d&&v<9&&!y&&(!E||!E.left&&!E.right)){var K=g.parentNode.getClientRects()[0];K?E={left:K.left,right:K.left+Cs(r.display),top:K.top,bottom:K.bottom}:E=N}for(var V=E.top-o.rect.top,te=E.bottom-o.rect.top,ae=(V+te)/2,de=o.view.measure.heights,we=0;we=u.text.length?(_=u.text.length,E="before"):_<=0&&(_=0,E="after"),!C)return y(E=="before"?_-1:_,E=="before");function O(te,ae,de){var we=C[ae],_e=we.level==1;return y(de?te-1:te,_e!=de)}i(O,"getBidi");var F=ee(C,_,E),K=Y,V=O(_,F,E=="before");return K!=null&&(V.other=O(_,K,E!="before")),V}i(J,"cursorCoords");function Ae(r,o){var c=0;o=qe(r.doc,o),r.options.lineWrapping||(c=Cs(r.display)*o.ch);var u=Pe(r.doc,o.line),p=vi(u)+ea(r.display);return{left:c,right:c,top:p,bottom:p+u.height}}i(Ae,"estimateCoords");function Je(r,o,c,u,p){var g=ce(r,o,c);return g.xRel=p,u&&(g.outside=u),g}i(Je,"PosWithInfo");function yt(r,o,c){var u=r.doc;if(c+=r.display.viewOffset,c<0)return Je(u.first,0,null,-1,-1);var p=ys(u,c),g=u.first+u.size-1;if(p>g)return Je(u.first+u.size-1,Pe(u,g).text.length,null,1,1);o<0&&(o=0);for(var y=Pe(u,p);;){var C=fw(r,y,p,o,c),_=Ia(y,C.ch+(C.xRel>0||C.outside>0?1:0));if(!_)return C;var E=_.find(1);if(E.line==p)return E;y=Pe(u,p=E.line)}}i(yt,"coordsChar");function Nr(r,o,c,u){u-=Yl(o);var p=o.text.length,g=so(function(y){return w(r,c,y-1).bottom<=u},p,0);return p=so(function(y){return w(r,c,y).top>u},g,p),{begin:g,end:p}}i(Nr,"wrappedLineExtent");function Ht(r,o,c,u){c||(c=Tn(r,o));var p=gn(r,o,w(r,c,u),"line").top;return Nr(r,o,c,p)}i(Ht,"wrappedLineExtentChar");function Nc(r,o,c,u){return r.bottom<=c?!1:r.top>c?!0:(u?r.left:r.right)>o}i(Nc,"boxIsAfter");function fw(r,o,c,u,p){p-=vi(o);var g=Tn(r,o),y=Yl(o),C=0,_=o.text.length,E=!0,O=Me(o,r.doc.direction);if(O){var F=(r.options.lineWrapping?rd:Bi)(r,o,c,g,O,u,p);E=F.level!=1,C=E?F.from:F.to-1,_=E?F.to:F.from-1}var K=null,V=null,te=so(function(Ie){var Oe=w(r,g,Ie);return Oe.top+=y,Oe.bottom+=y,Nc(Oe,u,p,!1)?(Oe.top<=p&&Oe.left<=u&&(K=Ie,V=Oe),!0):!1},C,_),ae,de,we=!1;if(V){var _e=u-V.left=ke.bottom?1:0}return te=Hn(o.text,te,1),Je(c,te,de,we,u-ae)}i(fw,"coordsCharInner");function Bi(r,o,c,u,p,g,y){var C=so(function(F){var K=p[F],V=K.level!=1;return Nc(J(r,ce(c,V?K.to:K.from,V?"before":"after"),"line",o,u),g,y,!0)},0,p.length-1),_=p[C];if(C>0){var E=_.level!=1,O=J(r,ce(c,E?_.from:_.to,E?"after":"before"),"line",o,u);Nc(O,g,y,!0)&&O.top>y&&(_=p[C-1])}return _}i(Bi,"coordsBidiPart");function rd(r,o,c,u,p,g,y){var C=Nr(r,o,u,y),_=C.begin,E=C.end;/\s/.test(o.text.charAt(E-1))&&E--;for(var O=null,F=null,K=0;K=E||V.to<=_)){var te=V.level!=1,ae=w(r,u,te?Math.min(E,V.to)-1:Math.max(_,V.from)).right,de=aede)&&(O=V,F=de)}}return O||(O=p[p.length-1]),O.from<_&&(O={from:_,to:O.to,level:O.level}),O.to>E&&(O={from:O.from,to:E,level:O.level}),O}i(rd,"coordsBidiPartWrapped");var za;function po(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(za==null){za=xe("pre",null,"CodeMirror-line-like");for(var o=0;o<49;++o)za.appendChild(document.createTextNode("x")),za.appendChild(xe("br"));za.appendChild(document.createTextNode("x"))}tt(r.measure,za);var c=za.offsetHeight/50;return c>3&&(r.cachedTextHeight=c),Ye(r.measure),c||1}i(po,"textHeight");function Cs(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var o=xe("span","xxxxxxxxxx"),c=xe("pre",[o],"CodeMirror-line-like");tt(r.measure,c);var u=o.getBoundingClientRect(),p=(u.right-u.left)/10;return p>2&&(r.cachedCharWidth=p),p||10}i(Cs,"charWidth");function Xl(r){for(var o=r.display,c={},u={},p=o.gutters.clientLeft,g=o.gutters.firstChild,y=0;g;g=g.nextSibling,++y){var C=r.display.gutterSpecs[y].className;c[C]=g.offsetLeft+g.clientLeft+p,u[C]=g.clientWidth}return{fixedPos:kt(o),gutterTotalWidth:o.gutters.offsetWidth,gutterLeft:c,gutterWidth:u,wrapperWidth:o.wrapper.clientWidth}}i(Xl,"getDimensions");function kt(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}i(kt,"compensateForHScroll");function hg(r){var o=po(r.display),c=r.options.lineWrapping,u=c&&Math.max(5,r.display.scroller.clientWidth/Cs(r.display)-3);return function(p){if(Se(r.doc,p))return 0;var g=0;if(p.widgets)for(var y=0;y0&&(E=Pe(r.doc,_.line).text).length==_.ch){var O=Ft(E,E.length,r.options.tabSize)-E.length;_=ce(_.line,Math.max(0,Math.round((g-Tc(r.display).left)/Cs(r.display))-O))}return _}i(jo,"posFromMouse");function Ua(r,o){if(o>=r.display.viewTo||(o-=r.display.viewFrom,o<0))return null;for(var c=r.display.view,u=0;uo)&&(p.updateLineNumbers=o),r.curOp.viewChanged=!0,o>=p.viewTo)Di&&Fa(r.doc,o)p.viewFrom?ho(r):(p.viewFrom+=u,p.viewTo+=u);else if(o<=p.viewFrom&&c>=p.viewTo)ho(r);else if(o<=p.viewFrom){var g=mo(r,c,c+u,1);g?(p.view=p.view.slice(g.index),p.viewFrom=g.lineN,p.viewTo+=u):ho(r)}else if(c>=p.viewTo){var y=mo(r,o,o,-1);y?(p.view=p.view.slice(0,y.index),p.viewTo=y.lineN):ho(r)}else{var C=mo(r,o,o,-1),_=mo(r,c,c+u,1);C&&_?(p.view=p.view.slice(0,C.index).concat(Qs(r,C.lineN,_.lineN)).concat(p.view.slice(_.index)),p.viewTo+=u):ho(r)}var E=p.externalMeasured;E&&(c=p.lineN&&o=u.viewTo)){var g=u.view[Ua(r,o)];if(g.node!=null){var y=g.changes||(g.changes=[]);Ue(y,c)==-1&&y.push(c)}}}i(ta,"regLineChange");function ho(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}i(ho,"resetView");function mo(r,o,c,u){var p=Ua(r,o),g,y=r.display.view;if(!Di||c==r.doc.first+r.doc.size)return{index:p,lineN:c};for(var C=r.display.viewFrom,_=0;_0){if(p==y.length-1)return null;g=C+y[p].size-o,p++}else g=C-o;o+=g,c+=g}for(;Fa(r.doc,c)!=c;){if(p==(u<0?0:y.length-1))return null;c+=u*y[p-(u<0?1:0)].size,p+=u}return{index:p,lineN:c}}i(mo,"viewCuttingPoint");function id(r,o,c){var u=r.display,p=u.view;p.length==0||o>=u.viewTo||c<=u.viewFrom?(u.view=Qs(r,o,c),u.viewFrom=o):(u.viewFrom>o?u.view=Qs(r,o,u.viewFrom).concat(u.view):u.viewFromc&&(u.view=u.view.slice(0,Ua(r,c)))),u.viewTo=c}i(id,"adjustView");function Qp(r){for(var o=r.display.view,c=0,u=0;u=r.display.viewTo||_.to().line0?y:r.defaultCharWidth())+"px"}if(u.other){var C=c.appendChild(xe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));C.style.display="",C.style.left=u.other.left+"px",C.style.top=u.other.top+"px",C.style.height=(u.other.bottom-u.other.top)*.85+"px"}}i(od,"drawSelectionCursor");function Wa(r,o){return r.top-o.top||r.left-o.left}i(Wa,"cmpCoords");function mg(r,o,c){var u=r.display,p=r.doc,g=document.createDocumentFragment(),y=Tc(r.display),C=y.left,_=Math.max(u.sizerWidth,$o(r)-u.sizer.offsetLeft)-y.right,E=p.direction=="ltr";function O(ye,ke,Ie,Oe){ke<0&&(ke=0),ke=Math.round(ke),Oe=Math.round(Oe),g.appendChild(xe("div",null,"CodeMirror-selected","position: absolute; left: "+ye+`px; + top: `+ke+"px; width: "+(Ie??_-ye)+`px; + height: `+(Oe-ke)+"px"))}i(O,"add");function F(ye,ke,Ie){var Oe=Pe(p,ye),it=Oe.text.length,Dt,pr;function Qt(xr,Nn){return ie(r,ce(ye,xr),"div",Oe,Nn)}i(Qt,"coords");function ar(xr,Nn,en){var Pr=Ht(r,Oe,null,xr),Cr=Nn=="ltr"==(en=="after")?"left":"right",lr=en=="after"?Pr.begin:Pr.end-(/\s/.test(Oe.text.charAt(Pr.end-1))?2:1);return Qt(lr,Cr)[Cr]}i(ar,"wrapX");var Sr=Me(Oe,p.direction);return bl(Sr,ke||0,Ie??it,function(xr,Nn,en,Pr){var Cr=en=="ltr",lr=Qt(xr,Cr?"left":"right"),$n=Qt(Nn-1,Cr?"right":"left"),yu=ke==null&&xr==0,ha=Ie==null&&Nn==it,yn=Pr==0,Jo=!Sr||Pr==Sr.length-1;if($n.top-lr.top<=3){var zr=(E?yu:ha)&&yn,Nh=(E?ha:yu)&&Jo,Zo=zr?C:(Cr?lr:$n).left,ma=Nh?_:(Cr?$n:lr).right;O(Zo,lr.top,ma-Zo,lr.bottom)}else{var ga,An,wu,Ah;Cr?(ga=E&&yu&&yn?C:lr.left,An=E?_:ar(xr,en,"before"),wu=E?C:ar(Nn,en,"after"),Ah=E&&ha&&Jo?_:$n.right):(ga=E?ar(xr,en,"before"):C,An=!E&&yu&&yn?_:lr.right,wu=!E&&ha&&Jo?C:$n.left,Ah=E?ar(Nn,en,"after"):_),O(ga,lr.top,An-ga,lr.bottom),lr.bottom<$n.top&&O(C,lr.bottom,null,$n.top),O(wu,$n.top,Ah-wu,$n.bottom)}(!Dt||Wa(lr,Dt)<0)&&(Dt=lr),Wa($n,Dt)<0&&(Dt=$n),(!pr||Wa(lr,pr)<0)&&(pr=lr),Wa($n,pr)<0&&(pr=$n)}),{start:Dt,end:pr}}i(F,"drawForLine");var K=o.from(),V=o.to();if(K.line==V.line)F(K.line,K.ch,V.ch);else{var te=Pe(p,K.line),ae=Pe(p,V.line),de=Rt(te)==Rt(ae),we=F(K.line,K.ch,de?te.text.length+1:null).end,_e=F(V.line,de?0:null,V.ch).start;de&&(we.top<_e.top-2?(O(we.right,we.top,null,we.bottom),O(C,_e.top,_e.left,_e.bottom)):O(we.right,we.top,_e.left-we.right,we.bottom)),we.bottom<_e.top&&O(C,we.bottom,null,_e.top)}c.appendChild(g)}i(mg,"drawSelectionRange");function $a(r){if(r.state.focused){var o=r.display;clearInterval(o.blinker);var c=!0;o.cursorDiv.style.visibility="",r.options.cursorBlinkRate>0?o.blinker=setInterval(function(){r.hasFocus()||Jl(r),o.cursorDiv.style.visibility=(c=!c)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(o.cursorDiv.style.visibility="hidden")}}i($a,"restartBlink");function na(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||Zp(r))}i(na,"ensureFocus");function Ql(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&Jl(r))},100)}i(Ql,"delayBlurEvent");function Zp(r,o){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(Mt(r,"focus",r,o),r.state.focused=!0,It(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),S&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),$a(r))}i(Zp,"onFocus");function Jl(r,o){r.state.delayingBlurEvent||(r.state.focused&&(Mt(r,"blur",r,o),r.state.focused=!1,Ee(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}i(Jl,"onBlur");function sd(r){for(var o=r.display,c=o.lineDiv.offsetTop,u=Math.max(0,o.scroller.getBoundingClientRect().top),p=o.lineDiv.getBoundingClientRect().top,g=0,y=0;y.005||V<-.005)&&(pr.display.sizerWidth){var ae=Math.ceil(O/Cs(r.display));ae>r.display.maxLineLength&&(r.display.maxLineLength=ae,r.display.maxLine=C.line,r.display.maxLineChanged=!0)}}}Math.abs(g)>2&&(o.scroller.scrollTop+=g)}i(sd,"updateHeightsInViewport");function Ac(r){if(r.widgets)for(var o=0;o=y&&(g=ys(o,vi(Pe(o,_))-r.wrapper.clientHeight),y=_)}return{from:g,to:Math.max(y,g+1)}}i(Va,"visibleLines");function eh(r,o){if(!Pt(r,"scrollCursorIntoView")){var c=r.display,u=c.sizer.getBoundingClientRect(),p=null,g=c.wrapper.ownerDocument;if(o.top+u.top<0?p=!0:o.bottom+u.top>(g.defaultView.innerHeight||g.documentElement.clientHeight)&&(p=!1),p!=null&&!Q){var y=xe("div","\u200B",null,`position: absolute; + top: `+(o.top-c.viewOffset-ea(r.display))+`px; + height: `+(o.bottom-o.top+Fi(r)+c.barHeight)+`px; + left: `+o.left+"px; width: "+Math.max(2,o.right-o.left)+"px;");r.display.lineSpace.appendChild(y),y.scrollIntoView(p),r.display.lineSpace.removeChild(y)}}}i(eh,"maybeScrollWindow");function dw(r,o,c,u){u==null&&(u=0);var p;!r.options.lineWrapping&&o==c&&(c=o.sticky=="before"?ce(o.line,o.ch+1,"before"):o,o=o.ch?ce(o.line,o.sticky=="before"?o.ch-1:o.ch,"after"):o);for(var g=0;g<5;g++){var y=!1,C=J(r,o),_=!c||c==o?C:J(r,c);p={left:Math.min(C.left,_.left),top:Math.min(C.top,_.top)-u,right:Math.max(C.left,_.left),bottom:Math.max(C.bottom,_.bottom)+u};var E=th(r,p),O=r.doc.scrollTop,F=r.doc.scrollLeft;if(E.scrollTop!=null&&(Pc(r,E.scrollTop),Math.abs(r.doc.scrollTop-O)>1&&(y=!0)),E.scrollLeft!=null&&(go(r,E.scrollLeft),Math.abs(r.doc.scrollLeft-F)>1&&(y=!0)),!y)break}return p}i(dw,"scrollPosIntoView");function gg(r,o){var c=th(r,o);c.scrollTop!=null&&Pc(r,c.scrollTop),c.scrollLeft!=null&&go(r,c.scrollLeft)}i(gg,"scrollIntoView");function th(r,o){var c=r.display,u=po(r.display);o.top<0&&(o.top=0);var p=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:c.scroller.scrollTop,g=jl(r),y={};o.bottom-o.top>g&&(o.bottom=o.top+g);var C=r.doc.height+ql(c),_=o.topC-u;if(o.topp+g){var O=Math.min(o.top,(E?C:o.bottom)-g);O!=p&&(y.scrollTop=O)}var F=r.options.fixedGutter?0:c.gutters.offsetWidth,K=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:c.scroller.scrollLeft-F,V=$o(r)-c.gutters.offsetWidth,te=o.right-o.left>V;return te&&(o.right=o.left+V),o.left<10?y.scrollLeft=0:o.leftV+K-3&&(y.scrollLeft=o.right+(te?0:10)-V),y}i(th,"calculateScrollPos");function rh(r,o){o!=null&&(ad(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+o)}i(rh,"addToScrollTop");function er(r){ad(r);var o=r.getCursor();r.curOp.scrollToPos={from:o,to:o,margin:r.options.cursorScrollMargin}}i(er,"ensureCursorVisible");function Ar(r,o,c){(o!=null||c!=null)&&ad(r),o!=null&&(r.curOp.scrollLeft=o),c!=null&&(r.curOp.scrollTop=c)}i(Ar,"scrollToCoords");function pw(r,o){ad(r),r.curOp.scrollToPos=o}i(pw,"scrollToRange");function ad(r){var o=r.curOp.scrollToPos;if(o){r.curOp.scrollToPos=null;var c=Ae(r,o.from),u=Ae(r,o.to);nh(r,c,u,o.margin)}}i(ad,"resolveScrollToPos");function nh(r,o,c,u){var p=th(r,{left:Math.min(o.left,c.left),top:Math.min(o.top,c.top)-u,right:Math.max(o.right,c.right),bottom:Math.max(o.bottom,c.bottom)+u});Ar(r,p.scrollLeft,p.scrollTop)}i(nh,"scrollToCoordsRange");function Pc(r,o){Math.abs(r.doc.scrollTop-o)<2||(n||vo(r,{top:o}),ld(r,o,!0),n&&vo(r),Oc(r,100))}i(Pc,"updateScrollTop");function ld(r,o,c){o=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,o)),!(r.display.scroller.scrollTop==o&&!c)&&(r.doc.scrollTop=o,r.display.scrollbars.setScrollTop(o),r.display.scroller.scrollTop!=o&&(r.display.scroller.scrollTop=o))}i(ld,"setScrollTop");function go(r,o,c,u){o=Math.max(0,Math.min(o,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((c?o==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-o)<2)&&!u)&&(r.doc.scrollLeft=o,Sg(r),r.display.scroller.scrollLeft!=o&&(r.display.scroller.scrollLeft=o),r.display.scrollbars.setScrollLeft(o))}i(go,"setScrollLeft");function qa(r){var o=r.display,c=o.gutters.offsetWidth,u=Math.round(r.doc.height+ql(r.display));return{clientHeight:o.scroller.clientHeight,viewHeight:o.wrapper.clientHeight,scrollWidth:o.scroller.scrollWidth,clientWidth:o.scroller.clientWidth,viewWidth:o.wrapper.clientWidth,barLeft:r.options.fixedGutter?c:0,docHeight:u,scrollHeight:u+Fi(r)+o.barHeight,nativeBarWidth:o.nativeBarWidth,gutterWidth:c}}i(qa,"measureForScrollbars");var Hi=i(function(r,o,c){this.cm=c;var u=this.vert=xe("div",[xe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),p=this.horiz=xe("div",[xe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");u.tabIndex=p.tabIndex=-1,r(u),r(p),ze(u,"scroll",function(){u.clientHeight&&o(u.scrollTop,"vertical")}),ze(p,"scroll",function(){p.clientWidth&&o(p.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Hi.prototype.update=function(r){var o=r.scrollWidth>r.clientWidth+1,c=r.scrollHeight>r.clientHeight+1,u=r.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=o?u+"px":"0";var p=r.viewHeight-(o?u:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+p)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(o){this.horiz.style.display="block",this.horiz.style.right=c?u+"px":"0",this.horiz.style.left=r.barLeft+"px";var g=r.viewWidth-r.barLeft-(c?u:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+g)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(u==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:c?u:0,bottom:o?u:0}},Hi.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Hi.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Hi.prototype.zeroWidthHack=function(){var r=B&&!q?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new se,this.disableVert=new se},Hi.prototype.enableZeroWidthBar=function(r,o,c){r.style.visibility="";function u(){var p=r.getBoundingClientRect(),g=c=="vert"?document.elementFromPoint(p.right-1,(p.top+p.bottom)/2):document.elementFromPoint((p.right+p.left)/2,p.bottom-1);g!=r?r.style.visibility="hidden":o.set(1e3,u)}i(u,"maybeDisable"),o.set(1e3,u)},Hi.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var _s=i(function(){},"NullScrollbars");_s.prototype.update=function(){return{bottom:0,right:0}},_s.prototype.setScrollLeft=function(){},_s.prototype.setScrollTop=function(){},_s.prototype.clear=function(){};function Ko(r,o){o||(o=qa(r));var c=r.display.barWidth,u=r.display.barHeight;Lc(r,o);for(var p=0;p<4&&c!=r.display.barWidth||u!=r.display.barHeight;p++)c!=r.display.barWidth&&r.options.lineWrapping&&sd(r),Lc(r,qa(r)),c=r.display.barWidth,u=r.display.barHeight}i(Ko,"updateScrollbars");function Lc(r,o){var c=r.display,u=c.scrollbars.update(o);c.sizer.style.paddingRight=(c.barWidth=u.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=u.bottom)+"px",c.heightForcer.style.borderBottom=u.bottom+"px solid transparent",u.right&&u.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=u.bottom+"px",c.scrollbarFiller.style.width=u.right+"px"):c.scrollbarFiller.style.display="",u.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=u.bottom+"px",c.gutterFiller.style.width=o.gutterWidth+"px"):c.gutterFiller.style.display=""}i(Lc,"updateScrollbarsInner");var ja={native:Hi,null:_s};function vg(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&Ee(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new ja[r.options.scrollbarStyle](function(o){r.display.wrapper.insertBefore(o,r.display.scrollbarFiller),ze(o,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),o.setAttribute("cm-not-content","true")},function(o,c){c=="horizontal"?go(r,o):Pc(r,o)},r),r.display.scrollbars.addClass&&It(r.display.wrapper,r.display.scrollbars.addClass)}i(vg,"initScrollbars");var hw=0;function Ka(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++hw,markArrays:null},Jf(r.curOp)}i(Ka,"startOperation");function Ga(r){var o=r.curOp;o&&xc(o,function(c){for(var u=0;u=c.viewTo)||c.maxLineChanged&&o.options.lineWrapping,r.update=r.mustUpdate&&new Go(o,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}i(ud,"endOperation_R1");function Mc(r){r.updatedDisplay=r.mustUpdate&&ih(r.cm,r.update)}i(Mc,"endOperation_W1");function yg(r){var o=r.cm,c=o.display;r.updatedDisplay&&sd(o),r.barMeasure=qa(o),c.maxLineChanged&&!o.options.lineWrapping&&(r.adjustWidthTo=Kl(o,c.maxLine,c.maxLine.text.length).left+3,o.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+r.adjustWidthTo+Fi(o)+o.display.barWidth),r.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+r.adjustWidthTo-$o(o))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=c.input.prepareSelection())}i(yg,"endOperation_R2");function A(r){var o=r.cm;r.adjustWidthTo!=null&&(o.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var c=+new Date+r.options.workTime,u=Ss(r,o.highlightFrontier),p=[];o.iter(u.line,Math.min(o.first+o.size,r.display.viewTo+500),function(g){if(u.line>=r.display.viewFrom){var y=g.styles,C=g.text.length>r.options.maxHighlightLength?Oi(o.mode,u.state):null,_=Ll(r,g,u,!0);C&&(u.state=C),g.styles=_.styles;var E=g.styleClasses,O=_.classes;O?g.styleClasses=O:E&&(g.styleClasses=null);for(var F=!y||y.length!=g.styles.length||E!=O&&(!E||!O||E.bgClass!=O.bgClass||E.textClass!=O.textClass),K=0;!F&&Kc)return Oc(r,r.options.workDelay),!0}),o.highlightFrontier=u.line,o.modeFrontier=Math.max(o.modeFrontier,u.line),p.length&&vn(r,function(){for(var g=0;g=c.viewFrom&&o.visible.to<=c.viewTo&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&Qp(r)==0)return!1;xg(r)&&(ho(r),o.dims=Xl(r));var p=u.first+u.size,g=Math.max(o.visible.from-r.options.viewportMargin,u.first),y=Math.min(p,o.visible.to+r.options.viewportMargin);c.viewFromy&&c.viewTo-y<20&&(y=Math.min(p,c.viewTo)),Di&&(g=Fa(r.doc,g),y=Uo(r.doc,y));var C=g!=c.viewFrom||y!=c.viewTo||c.lastWrapHeight!=o.wrapperHeight||c.lastWrapWidth!=o.wrapperWidth;id(r,g,y),c.viewOffset=vi(Pe(r.doc,c.viewFrom)),r.display.mover.style.top=c.viewOffset+"px";var _=Qp(r);if(!C&&_==0&&!o.force&&c.renderedView==c.view&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo))return!1;var E=yw(r);return _>4&&(c.lineDiv.style.display="none"),Sw(r,c.updateLineNumbers,o.dims),_>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,ww(E),Ye(c.cursorDiv),Ye(c.selectionDiv),c.gutters.style.height=c.sizer.style.minHeight=0,C&&(c.lastWrapHeight=o.wrapperHeight,c.lastWrapWidth=o.wrapperWidth,Oc(r,400)),c.updateLineNumbers=null,!0}i(ih,"updateDisplayIfNeeded");function wg(r,o){for(var c=o.viewport,u=!0;;u=!1){if(!u||!r.options.lineWrapping||o.oldDisplayWidth==$o(r)){if(c&&c.top!=null&&(c={top:Math.min(r.doc.height+ql(r.display)-jl(r),c.top)}),o.visible=Va(r.display,r.doc,c),o.visible.from>=r.display.viewFrom&&o.visible.to<=r.display.viewTo)break}else u&&(o.visible=Va(r.display,r.doc,c));if(!ih(r,o))break;sd(r);var p=qa(r);ra(r),Ko(r,p),sh(r,p),o.force=!1}o.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(o.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}i(wg,"postUpdateDisplay");function vo(r,o){var c=new Go(r,o);if(ih(r,c)){sd(r),wg(r,c);var u=qa(r);ra(r),Ko(r,u),sh(r,u),c.finish()}}i(vo,"updateDisplaySimple");function Sw(r,o,c){var u=r.display,p=r.options.lineNumbers,g=u.lineDiv,y=g.firstChild;function C(te){var ae=te.nextSibling;return S&&B&&r.display.currentWheelTarget==te?te.style.display="none":te.parentNode.removeChild(te),ae}i(C,"rm");for(var _=u.view,E=u.viewFrom,O=0;O<_.length;O++){var F=_[O];if(!F.hidden)if(!F.node||F.node.parentNode!=g){var K=Yp(r,F,E,c);g.insertBefore(K,y)}else{for(;y!=F.node;)y=C(y);var V=p&&o!=null&&o<=E&&F.lineNumber;F.changes&&(Ue(F.changes,"gutter")>-1&&(V=!1),Cc(r,F,E,c)),V&&(Ye(F.lineNumber),F.lineNumber.appendChild(document.createTextNode(Oa(r.options,E)))),y=F.node.nextSibling}E+=F.size}for(;y;)y=C(y)}i(Sw,"patchDisplay");function oh(r){var o=r.gutters.offsetWidth;r.sizer.style.marginLeft=o+"px",Kt(r,"gutterChanged",r)}i(oh,"updateGutterSpace");function sh(r,o){r.display.sizer.style.minHeight=o.docHeight+"px",r.display.heightForcer.style.top=o.docHeight+"px",r.display.gutters.style.height=o.docHeight+r.display.barHeight+Fi(r)+"px"}i(sh,"setDocumentHeight");function Sg(r){var o=r.display,c=o.view;if(!(!o.alignWidgets&&(!o.gutters.firstChild||!r.options.fixedGutter))){for(var u=kt(o)-o.scroller.scrollLeft+r.doc.scrollLeft,p=o.gutters.offsetWidth,g=u+"px",y=0;y=105&&(p.wrapper.style.clipPath="inset(0px)"),p.wrapper.setAttribute("translate","no"),d&&v<8&&(p.gutters.style.zIndex=-1,p.scroller.style.paddingRight=0),!S&&!(n&&L)&&(p.scroller.draggable=!0),r&&(r.appendChild?r.appendChild(p.wrapper):r(p.wrapper)),p.viewFrom=p.viewTo=o.first,p.reportedViewFrom=p.reportedViewTo=o.first,p.view=[],p.renderedView=null,p.externalMeasured=null,p.viewOffset=0,p.lastWrapHeight=p.lastWrapWidth=0,p.updateLineNumbers=null,p.nativeBarWidth=p.barHeight=p.barWidth=0,p.scrollbarsClipped=!1,p.lineNumWidth=p.lineNumInnerWidth=p.lineNumChars=null,p.alignWidgets=!1,p.cachedCharWidth=p.cachedTextHeight=p.cachedPaddingH=null,p.maxLine=null,p.maxLineLength=0,p.maxLineChanged=!1,p.wheelDX=p.wheelDY=p.wheelStartX=p.wheelStartY=null,p.shift=!1,p.selForContextMenu=null,p.activeTouch=null,p.gutterSpecs=yo(u.gutters,u.lineNumbers),Cg(p),c.init(p)}i(xw,"Display");var cd=0,Es=null;d?Es=-.53:n?Es=15:k?Es=-.7:z&&(Es=-1/3);function ia(r){var o=r.wheelDeltaX,c=r.wheelDeltaY;return o==null&&r.detail&&r.axis==r.HORIZONTAL_AXIS&&(o=r.detail),c==null&&r.detail&&r.axis==r.VERTICAL_AXIS?c=r.detail:c==null&&(c=r.wheelDelta),{x:o,y:c}}i(ia,"wheelEventDelta");function Cw(r){var o=ia(r);return o.x*=Es,o.y*=Es,o}i(Cw,"wheelEventPixels");function _g(r,o){k&&R==102&&(r.display.chromeScrollHack==null?r.display.sizer.style.pointerEvents="none":clearTimeout(r.display.chromeScrollHack),r.display.chromeScrollHack=setTimeout(function(){r.display.chromeScrollHack=null,r.display.sizer.style.pointerEvents=""},100));var c=ia(o),u=c.x,p=c.y,g=Es;o.deltaMode===0&&(u=o.deltaX,p=o.deltaY,g=1);var y=r.display,C=y.scroller,_=C.scrollWidth>C.clientWidth,E=C.scrollHeight>C.clientHeight;if(u&&_||p&&E){if(p&&B&&S){e:for(var O=o.target,F=y.view;O!=C;O=O.parentNode)for(var K=0;K=0&&Ve(r,u.to())<=0)return c}return-1};var Et=i(function(r,o){this.anchor=r,this.head=o},"Range");Et.prototype.from=function(){return zo(this.anchor,this.head)},Et.prototype.to=function(){return js(this.anchor,this.head)},Et.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wo(r,o,c){var u=r&&r.options.selectionsMayTouch,p=o[c];o.sort(function(K,V){return Ve(K.from(),V.from())}),c=Ue(o,p);for(var g=1;g0:_>=0){var E=zo(C.from(),y.from()),O=js(C.to(),y.to()),F=C.empty()?y.from()==y.head:C.from()==C.head;g<=c&&--c,o.splice(--g,2,new Et(F?O:E,F?E:O))}}return new sr(o,c)}i(wo,"normalizeSelection");function oa(r,o){return new sr([new Et(r,o||r)],0)}i(oa,"simpleSelection");function sa(r){return r.text?ce(r.from.line+r.text.length-1,lt(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}i(sa,"changeEnd");function Eg(r,o){if(Ve(r,o.from)<0)return r;if(Ve(r,o.to)<=0)return sa(o);var c=r.line+o.text.length-(o.to.line-o.from.line)-1,u=r.ch;return r.line==o.to.line&&(u+=sa(o).ch-o.to.ch),ce(c,u)}i(Eg,"adjustForChange");function fd(r,o){for(var c=[],u=0;u1&&r.remove(C.line+1,te-1),r.insert(C.line+1,we)}Kt(r,"change",r,o)}i(tu,"updateDoc");function aa(r,o,c){function u(p,g,y){if(p.linked)for(var C=0;C1&&!r.done[r.done.length-2].ranges)return r.done.pop(),lt(r.done)}i(Ew,"lastChangeEvent");function ch(r,o,c,u){var p=r.history;p.undone.length=0;var g=+new Date,y,C;if((p.lastOp==u||p.lastOrigin==o.origin&&o.origin&&(o.origin.charAt(0)=="+"&&p.lastModTime>g-(r.cm?r.cm.options.historyEventDelay:500)||o.origin.charAt(0)=="*"))&&(y=Ew(p,p.lastOp==u)))C=lt(y.changes),Ve(o.from,o.to)==0&&Ve(o.from,C.to)==0?C.to=sa(o):y.changes.push(Ts(r,o));else{var _=lt(p.done);for((!_||!_.ranges)&&So(r.sel,p.done),y={changes:[Ts(r,o)],generation:p.generation},p.done.push(y);p.done.length>p.undoDepth;)p.done.shift(),p.done[0].ranges||p.done.shift()}p.done.push(c),p.generation=++p.maxGeneration,p.lastModTime=p.lastSelTime=g,p.lastOp=p.lastSelOp=u,p.lastOrigin=p.lastSelOrigin=o.origin,C||Mt(r,"historyAdded")}i(ch,"addChangeToHistory");function Tg(r,o,c,u){var p=o.charAt(0);return p=="*"||p=="+"&&c.ranges.length==u.ranges.length&&c.somethingSelected()==u.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}i(Tg,"selectionEventCanBeMerged");function Dc(r,o,c,u){var p=r.history,g=u&&u.origin;c==p.lastSelOp||g&&p.lastSelOrigin==g&&(p.lastModTime==p.lastSelTime&&p.lastOrigin==g||Tg(r,g,lt(p.done),o))?p.done[p.done.length-1]=o:So(o,p.done),p.lastSelTime=+new Date,p.lastSelOrigin=g,p.lastSelOp=c,u&&u.clearRedo!==!1&&wi(p.undone)}i(Dc,"addSelectionToHistory");function So(r,o){var c=lt(o);c&&c.ranges&&c.equals(r)||o.push(r)}i(So,"pushSelectionToHistory");function fh(r,o,c,u){var p=o["spans_"+r.id],g=0;r.iter(Math.max(r.first,c),Math.min(r.first+r.size,u),function(y){y.markedSpans&&((p||(p=o["spans_"+r.id]={}))[g]=y.markedSpans),++g})}i(fh,"attachLocalSpans");function bw(r){if(!r)return null;for(var o,c=0;c-1&&(lt(C)[F]=E[F],delete E[F])}}return u}i(Xa,"copyHistoryArray");function Fr(r,o,c,u){if(u){var p=r.anchor;if(c){var g=Ve(o,p)<0;g!=Ve(c,p)<0?(p=o,o=c):g!=Ve(o,c)<0&&(o=c)}return new Et(p,o)}else return new Et(c||o,o)}i(Fr,"extendRange");function nu(r,o,c,u,p){p==null&&(p=r.cm&&(r.cm.display.shift||r.extend)),Jr(r,new sr([Fr(r.sel.primary(),o,c,p)],0),u)}i(nu,"extendSelection");function dh(r,o,c){for(var u=[],p=r.cm&&(r.cm.display.shift||r.extend),g=0;g=o.ch:C.to>o.ch))){if(p&&(Mt(_,"beforeCursorEnter"),_.explicitlyCleared))if(g.markedSpans){--y;continue}else break;if(!_.atomic)continue;if(c){var F=_.find(u<0?1:-1),K=void 0;if((u<0?O:E)&&(F=Pg(r,F,-u,F&&F.line==o.line?g:null)),F&&F.line==o.line&&(K=Ve(F,c))&&(u<0?K<0:K>0))return iu(r,F,o,u,p)}var V=_.find(u<0?-1:1);return(u<0?E:O)&&(V=Pg(r,V,u,V.line==o.line?g:null)),V?iu(r,V,o,u,p):null}}return o}i(iu,"skipAtomicInner");function ou(r,o,c,u,p){var g=u||1,y=iu(r,o,c,g,p)||!p&&iu(r,o,c,g,!0)||iu(r,o,c,-g,p)||!p&&iu(r,o,c,-g,!0);return y||(r.cantEdit=!0,ce(r.first,0))}i(ou,"skipAtomic");function Pg(r,o,c,u){return c<0&&o.ch==0?o.line>r.first?qe(r,ce(o.line-1)):null:c>0&&o.ch==(u||Pe(r,o.line)).text.length?o.line=0;--p)Lg(r,{from:u[p].from,to:u[p].to,text:p?[""]:o.text,origin:o.origin});else Lg(r,o)}}i(au,"makeChange");function Lg(r,o){if(!(o.text.length==1&&o.text[0]==""&&Ve(o.from,o.to)==0)){var c=fd(r,o);ch(r,o,c,r.cm?r.cm.curOp.id:NaN),Ic(r,o,c,yc(r,o));var u=[];aa(r,function(p,g){!g&&Ue(u,p.history)==-1&&(Dg(p.history,o),u.push(p.history)),Ic(p,o,null,yc(p,o))})}}i(Lg,"makeChangeInner");function ua(r,o,c){var u=r.cm&&r.cm.state.suppressEdits;if(!(u&&!c)){for(var p=r.history,g,y=r.sel,C=o=="undo"?p.done:p.undone,_=o=="undo"?p.undone:p.done,E=0;E=0;--V){var te=K(V);if(te)return te.v}}}}i(ua,"makeChangeFromHistory");function Mg(r,o){if(o!=0&&(r.first+=o,r.sel=new sr(wr(r.sel.ranges,function(p){return new Et(ce(p.anchor.line+o,p.anchor.ch),ce(p.head.line+o,p.head.ch))}),r.sel.primIndex),r.cm)){Wn(r.cm,r.first,r.first-o,o);for(var c=r.cm.display,u=c.viewFrom;ur.lastLine())){if(o.from.lineg&&(o={from:o.from,to:ce(g,Pe(r,g).text.length),text:[o.text[0]],origin:o.origin}),o.removed=lo(r,o.from,o.to),c||(c=fd(r,o)),r.cm?hh(r.cm,o,u):tu(r,o,u),Zr(r,c,st),r.cantEdit&&ou(r,ce(r.firstLine(),0))&&(r.cantEdit=!1)}}i(Ic,"makeChangeSingleDoc");function hh(r,o,c){var u=r.doc,p=r.display,g=o.from,y=o.to,C=!1,_=g.line;r.options.lineWrapping||(_=vt(Rt(Pe(u,g.line))),u.iter(_,y.line+1,function(V){if(V==p.maxLine)return C=!0,!0})),u.sel.contains(o.from,o.to)>-1&&Na(r),tu(u,o,c,hg(r)),r.options.lineWrapping||(u.iter(_,g.line+o.text.length,function(V){var te=Ze(V);te>p.maxLineLength&&(p.maxLine=V,p.maxLineLength=te,p.maxLineChanged=!0,C=!1)}),C&&(r.curOp.updateMaxLine=!0)),Ra(u,g.line),Oc(r,400);var E=o.text.length-(y.line-g.line)-1;o.full?Wn(r):g.line==y.line&&o.text.length==1&&!eu(r.doc,o)?ta(r,g.line,"text"):Wn(r,g.line,y.line+1,E);var O=dn(r,"changes"),F=dn(r,"change");if(F||O){var K={from:g,to:y,text:o.text,removed:o.removed,origin:o.origin};F&&Kt(r,"change",r,K),O&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(K)}r.display.selForContextMenu=null}i(hh,"makeChangeSingleDocInEditor");function Qa(r,o,c,u,p){var g;u||(u=c),Ve(u,c)<0&&(g=[u,c],c=g[0],u=g[1]),typeof o=="string"&&(o=r.splitLines(o)),au(r,{from:c,to:u,text:o,origin:p})}i(Qa,"replaceRange");function Og(r,o,c,u){c1||!(this.children[0]instanceof Ja))){var C=[];this.collapse(C),this.children=[new Ja(C)],this.children[0].parent=this}},"removeInner"),collapse:i(function(r){for(var o=0;o50){for(var y=p.lines.length%25+25,C=y;C10);r.parent.maybeSpill()}},"maybeSpill"),iterN:i(function(r,o,c){for(var u=0;ur.display.maxLineLength&&(r.display.maxLine=E,r.display.maxLineLength=O,r.display.maxLineChanged=!0)}u!=null&&r&&this.collapsed&&Wn(r,u,p+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&Ng(r.doc)),r&&Kt(r,"markerCleared",r,this,u,p),o&&Ga(r),this.parent&&this.parent.clear()}},xo.prototype.find=function(r,o){r==null&&this.type=="bookmark"&&(r=1);for(var c,u,p=0;p0||y==0&&g.clearWhenEmpty!==!1)return g;if(g.replacedWith&&(g.collapsed=!0,g.widgetNode=Xe("span",[g.replacedWith],"CodeMirror-widget"),u.handleMouseEvents||g.widgetNode.setAttribute("cm-ignore-events","true"),u.insertLeft&&(g.widgetNode.insertLeft=!0)),g.collapsed){if(Kp(r,o.line,o,c,g)||o.line!=c.line&&Kp(r,c.line,o,c,g))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wp()}g.addToHistory&&ch(r,{from:o,to:c,origin:"markText"},r.sel,NaN);var C=o.line,_=r.cm,E;if(r.iter(C,c.line+1,function(F){_&&g.collapsed&&!_.options.lineWrapping&&Rt(F)==_.display.maxLine&&(E=!0),g.collapsed&&C!=o.line&&Ri(F,0),vc(F,new Il(g,C==o.line?o.ch:null,C==c.line?c.ch:null),r.cm&&r.cm.curOp),++C}),g.collapsed&&r.iter(o.line,c.line+1,function(F){Se(r,F)&&Ri(F,0)}),g.clearOnEnter&&ze(g,"beforeCursorEnter",function(){return g.clear()}),g.readOnly&&(Kf(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),g.collapsed&&(g.id=++gh,g.atomic=!0),_){if(E&&(_.curOp.updateMaxLine=!0),g.collapsed)Wn(_,o.line,c.line+1);else if(g.className||g.startStyle||g.endStyle||g.css||g.attributes||g.title)for(var O=o.line;O<=c.line;O++)ta(_,O,"text");g.atomic&&Ng(_.doc),Kt(_,"markerAdded",_,g)}return g}i(uu,"markText");var cu=i(function(r,o){this.markers=r,this.primary=o;for(var c=0;c=0;_--)au(this,u[_]);C?la(this,C):this.cm&&er(this.cm)}),undo:Ir(function(){ua(this,"undo")}),redo:Ir(function(){ua(this,"redo")}),undoSelection:Ir(function(){ua(this,"undo",!0)}),redoSelection:Ir(function(){ua(this,"redo",!0)}),setExtending:i(function(r){this.extend=r},"setExtending"),getExtending:i(function(){return this.extend},"getExtending"),historySize:i(function(){for(var r=this.history,o=0,c=0,u=0;u=r.ch)&&o.push(p.marker.parent||p.marker)}return o},"findMarksAt"),findMarks:i(function(r,o,c){r=qe(this,r),o=qe(this,o);var u=[],p=r.line;return this.iter(r.line,o.line+1,function(g){var y=g.markedSpans;if(y)for(var C=0;C=_.to||_.from==null&&p!=r.line||_.from!=null&&p==o.line&&_.from>=o.ch)&&(!c||c(_.marker))&&u.push(_.marker.parent||_.marker)}++p}),u},"findMarks"),getAllMarks:i(function(){var r=[];return this.iter(function(o){var c=o.markedSpans;if(c)for(var u=0;ur)return o=r,!0;r-=g,++c}),qe(this,ce(c,o))},"posFromIndex"),indexFromPos:i(function(r){r=qe(this,r);var o=r.ch;if(r.lineo&&(o=r.from),r.to!=null&&r.to-1){o.state.draggingText(r),setTimeout(function(){return o.display.input.focus()},20);return}try{var O=r.dataTransfer.getData("Text");if(O){var F;if(o.state.draggingText&&!o.state.draggingText.copy&&(F=o.listSelections()),Zr(o.doc,oa(c,c)),F)for(var K=0;K=0;C--)Qa(r.doc,"",u[C].from,u[C].to,"+delete");er(r)})}i(ca,"deleteNearSelection");function yd(r,o,c){var u=Hn(r.text,o+c,c);return u<0||u>r.text.length?null:u}i(yd,"moveCharLogically");function Uc(r,o,c){var u=yd(r,o.ch,c);return u==null?null:new ce(o.line,u,c<0?"after":"before")}i(Uc,"moveLogically");function Wc(r,o,c,u,p){if(r){o.doc.direction=="rtl"&&(p=-p);var g=Me(c,o.doc.direction);if(g){var y=p<0?lt(g):g[0],C=p<0==(y.level==1),_=C?"after":"before",E;if(y.level>0||o.doc.direction=="rtl"){var O=Tn(o,c);E=p<0?c.text.length-1:0;var F=w(o,O,E).top;E=so(function(K){return w(o,O,K).top==F},p<0==(y.level==1)?y.from:y.to-1,E),_=="before"&&(E=yd(c,E,1))}else E=p<0?y.to:y.from;return new ce(u,E,_)}}return new ce(u,p<0?c.text.length:0,p<0?"before":"after")}i(Wc,"endOfLine");function fa(r,o,c,u){var p=Me(o,r.doc.direction);if(!p)return Uc(o,c,u);c.ch>=o.text.length?(c.ch=o.text.length,c.sticky="before"):c.ch<=0&&(c.ch=0,c.sticky="after");var g=ee(p,c.ch,c.sticky),y=p[g];if(r.doc.direction=="ltr"&&y.level%2==0&&(u>0?y.to>c.ch:y.from=y.from&&K>=O.begin)){var V=F?"before":"after";return new ce(c.line,K,V)}}var te=i(function(we,_e,ye){for(var ke=i(function(Dt,pr){return pr?new ce(c.line,C(Dt,1),"before"):new ce(c.line,Dt,"after")},"getRes");we>=0&&we0==(Ie.level!=1),it=Oe?ye.begin:C(ye.end,-1);if(Ie.from<=it&&it0?O.end:C(O.begin,-1);return de!=null&&!(u>0&&de==o.text.length)&&(ae=te(u>0?0:p.length-1,u,E(de)),ae)?ae:null}i(fa,"moveVisually");var $c={selectAll:su,singleSelection:i(function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),st)},"singleSelection"),killLine:i(function(r){return ca(r,function(o){if(o.empty()){var c=Pe(r.doc,o.head.line).text.length;return o.head.ch==c&&o.head.line0)p=new ce(p.line,p.ch+1),r.replaceRange(g.charAt(p.ch-1)+g.charAt(p.ch-2),ce(p.line,p.ch-2),p,"+transpose");else if(p.line>r.doc.first){var y=Pe(r.doc,p.line-1).text;y&&(p=new ce(p.line,1),r.replaceRange(g.charAt(0)+r.doc.lineSeparator()+y.charAt(y.length-1),ce(p.line-1,y.length-1),p,"+transpose"))}}c.push(new Et(p,p))}r.setSelections(c)})},"transposeChars"),newlineAndIndent:i(function(r){return vn(r,function(){for(var o=r.listSelections(),c=o.length-1;c>=0;c--)r.replaceRange(r.doc.lineSeparator(),o[c].anchor,o[c].head,"+input");o=r.listSelections();for(var u=0;ur&&Ve(o,this.pos)==0&&c==this.button};var Xo,hu;function jg(r,o){var c=+new Date;return hu&&hu.compare(c,r,o)?(Xo=hu=null,"triple"):Xo&&Xo.compare(c,r,o)?(hu=new pu(c,r,o),Xo=null,"double"):(Xo=new pu(c,r,o),hu=null,"single")}i(jg,"clickRepeat");function Kg(r){var o=this,c=o.display;if(!(Pt(o,r)||c.activeTouch&&c.input.supportsTouch())){if(c.input.ensurePolled(),c.shift=r.shiftKey,yi(c,r)){S||(c.scroller.draggable=!1,setTimeout(function(){return c.scroller.draggable=!0},100));return}if(!gu(o,r)){var u=jo(o,r),p=nc(r),g=u?jg(u,p):"single";vr(o).focus(),p==1&&o.state.selectingText&&o.state.selectingText(r),!(u&&Gg(o,p,u,g,r))&&(p==1?u?qc(o,u,g,r):Pa(r)==c.scroller&&kr(r):p==2?(u&&nu(o.doc,u),setTimeout(function(){return c.input.focus()},20)):p==3&&(he?o.display.input.onContextMenu(r):Ql(o)))}}}i(Kg,"onMouseDown");function Gg(r,o,c,u,p){var g="Click";return u=="double"?g="Double"+g:u=="triple"&&(g="Triple"+g),g=(o==1?"Left":o==2?"Middle":"Right")+g,Vc(r,wh(g,p),p,function(y){if(typeof y=="string"&&(y=$c[y]),!y)return!1;var C=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),C=y(r,c)!=Zt}finally{r.state.suppressEdits=!1}return C})}i(Gg,"handleMappedButton");function mu(r,o,c){var u=r.getOption("configureMouse"),p=u?u(r,o,c):{};if(p.unit==null){var g=j?c.shiftKey&&c.metaKey:c.altKey;p.unit=g?"rectangle":o=="single"?"char":o=="double"?"word":"line"}return(p.extend==null||r.doc.extend)&&(p.extend=r.doc.extend||c.shiftKey),p.addNew==null&&(p.addNew=B?c.metaKey:c.ctrlKey),p.moveOnDrag==null&&(p.moveOnDrag=!(B?c.altKey:c.ctrlKey)),p}i(mu,"configureMouse");function qc(r,o,c,u){d?setTimeout(yr(na,r),0):r.curOp.focus=ot(gr(r));var p=mu(r,c,u),g=r.doc.sel,y;r.options.dragDrop&&ic&&!r.isReadOnly()&&c=="single"&&(y=g.contains(o))>-1&&(Ve((y=g.ranges[y]).from(),o)<0||o.xRel>0)&&(Ve(y.to(),o)>0||o.xRel<0)?Rw(r,u,o,p):Yg(r,u,o,p)}i(qc,"leftButtonDown");function Rw(r,o,c,u){var p=r.display,g=!1,y=Lt(r,function(E){S&&(p.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:Ql(r)),Yt(p.wrapper.ownerDocument,"mouseup",y),Yt(p.wrapper.ownerDocument,"mousemove",C),Yt(p.scroller,"dragstart",_),Yt(p.scroller,"drop",y),g||(kr(E),u.addNew||nu(r.doc,c,null,null,u.extend),S&&!z||d&&v==9?setTimeout(function(){p.wrapper.ownerDocument.body.focus({preventScroll:!0}),p.input.focus()},20):p.input.focus())}),C=i(function(E){g=g||Math.abs(o.clientX-E.clientX)+Math.abs(o.clientY-E.clientY)>=10},"mouseMove"),_=i(function(){return g=!0},"dragStart");S&&(p.scroller.draggable=!0),r.state.draggingText=y,y.copy=!u.moveOnDrag,ze(p.wrapper.ownerDocument,"mouseup",y),ze(p.wrapper.ownerDocument,"mousemove",C),ze(p.scroller,"dragstart",_),ze(p.scroller,"drop",y),r.state.delayingBlurEvent=!0,setTimeout(function(){return p.input.focus()},20),p.scroller.dragDrop&&p.scroller.dragDrop()}i(Rw,"leftButtonStartDrag");function Eh(r,o,c){if(c=="char")return new Et(o,o);if(c=="word")return r.findWordAt(o);if(c=="line")return new Et(ce(o.line,0),qe(r.doc,ce(o.line+1,0)));var u=c(r,o);return new Et(u.from,u.to)}i(Eh,"rangeForUnit");function Yg(r,o,c,u){d&&Ql(r);var p=r.display,g=r.doc;kr(o);var y,C,_=g.sel,E=_.ranges;if(u.addNew&&!u.extend?(C=g.sel.contains(c),C>-1?y=E[C]:y=new Et(c,c)):(y=g.sel.primary(),C=g.sel.primIndex),u.unit=="rectangle")u.addNew||(y=new Et(c,c)),c=jo(r,o,!0,!0),C=-1;else{var O=Eh(r,c,u.unit);u.extend?y=Fr(y,O.anchor,O.head,u.extend):y=O}u.addNew?C==-1?(C=E.length,Jr(g,wo(r,E.concat([y]),C),{scroll:!1,origin:"*mouse"})):E.length>1&&E[C].empty()&&u.unit=="char"&&!u.extend?(Jr(g,wo(r,E.slice(0,C).concat(E.slice(C+1)),0),{scroll:!1,origin:"*mouse"}),_=g.sel):zi(g,C,y,Fe):(C=0,Jr(g,new sr([y],0),Fe),_=g.sel);var F=c;function K(ye){if(Ve(F,ye)!=0)if(F=ye,u.unit=="rectangle"){for(var ke=[],Ie=r.options.tabSize,Oe=Ft(Pe(g,c.line).text,c.ch,Ie),it=Ft(Pe(g,ye.line).text,ye.ch,Ie),Dt=Math.min(Oe,it),pr=Math.max(Oe,it),Qt=Math.min(c.line,ye.line),ar=Math.min(r.lastLine(),Math.max(c.line,ye.line));Qt<=ar;Qt++){var Sr=Pe(g,Qt).text,xr=En(Sr,Dt,Ie);Dt==pr?ke.push(new Et(ce(Qt,xr),ce(Qt,xr))):Sr.length>xr&&ke.push(new Et(ce(Qt,xr),ce(Qt,En(Sr,pr,Ie))))}ke.length||ke.push(new Et(c,c)),Jr(g,wo(r,_.ranges.slice(0,C).concat(ke),C),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ye)}else{var Nn=y,en=Eh(r,ye,u.unit),Pr=Nn.anchor,Cr;Ve(en.anchor,Pr)>0?(Cr=en.head,Pr=zo(Nn.from(),en.anchor)):(Cr=en.anchor,Pr=js(Nn.to(),en.head));var lr=_.ranges.slice(0);lr[C]=Sd(r,new Et(qe(g,Pr),Cr)),Jr(g,wo(r,lr,C),Fe)}}i(K,"extendTo");var V=p.wrapper.getBoundingClientRect(),te=0;function ae(ye){var ke=++te,Ie=jo(r,ye,!0,u.unit=="rectangle");if(Ie)if(Ve(Ie,F)!=0){r.curOp.focus=ot(gr(r)),K(Ie);var Oe=Va(p,g);(Ie.line>=Oe.to||Ie.lineV.bottom?20:0;it&&setTimeout(Lt(r,function(){te==ke&&(p.scroller.scrollTop+=it,ae(ye))}),50)}}i(ae,"extend");function de(ye){r.state.selectingText=!1,te=1/0,ye&&(kr(ye),p.input.focus()),Yt(p.wrapper.ownerDocument,"mousemove",we),Yt(p.wrapper.ownerDocument,"mouseup",_e),g.history.lastSelOrigin=null}i(de,"done");var we=Lt(r,function(ye){ye.buttons===0||!nc(ye)?de(ye):ae(ye)}),_e=Lt(r,de);r.state.selectingText=_e,ze(p.wrapper.ownerDocument,"mousemove",we),ze(p.wrapper.ownerDocument,"mouseup",_e)}i(Yg,"leftButtonSelect");function Sd(r,o){var c=o.anchor,u=o.head,p=Pe(r.doc,c.line);if(Ve(c,u)==0&&c.sticky==u.sticky)return o;var g=Me(p);if(!g)return o;var y=ee(g,c.ch,c.sticky),C=g[y];if(C.from!=c.ch&&C.to!=c.ch)return o;var _=y+(C.from==c.ch==(C.level!=1)?0:1);if(_==0||_==g.length)return o;var E;if(u.line!=c.line)E=(u.line-c.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var O=ee(g,u.ch,u.sticky),F=O-y||(u.ch-c.ch)*(C.level==1?-1:1);O==_-1||O==_?E=F<0:E=F>0}var K=g[_+(E?-1:0)],V=E==(K.level==1),te=V?K.from:K.to,ae=V?"after":"before";return c.ch==te&&c.sticky==ae?o:new Et(new ce(c.line,te,ae),u)}i(Sd,"bidiSimplify");function bh(r,o,c,u){var p,g;if(o.touches)p=o.touches[0].clientX,g=o.touches[0].clientY;else try{p=o.clientX,g=o.clientY}catch{return!1}if(p>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;u&&kr(o);var y=r.display,C=y.lineDiv.getBoundingClientRect();if(g>C.bottom||!dn(r,c))return bn(o);g-=C.top-y.viewOffset;for(var _=0;_=p){var O=ys(r.doc,g),F=r.display.gutterSpecs[_];return Mt(r,c,r,O,F.className,o),bn(o)}}}i(bh,"gutterEvent");function gu(r,o){return bh(r,o,"gutterClick",!0)}i(gu,"clickInGutter");function xd(r,o){yi(r.display,o)||Cd(r,o)||Pt(r,o,"contextmenu")||he||r.display.input.onContextMenu(o)}i(xd,"onContextMenu");function Cd(r,o){return dn(r,"gutterContextMenu")?bh(r,o,"gutterContextMenu",!1):!1}i(Cd,"contextMenuInGutter");function Xg(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vo(r)}i(Xg,"themeChanged");var rl={toString:i(function(){return"CodeMirror.Init"},"toString")},jc={},Kc={};function Th(r){var o=r.optionHandlers;function c(u,p,g,y){r.defaults[u]=p,g&&(o[u]=y?function(C,_,E){E!=rl&&g(C,_,E)}:g)}i(c,"option"),r.defineOption=c,r.Init=rl,c("value","",function(u,p){return u.setValue(p)},!0),c("mode",null,function(u,p){u.doc.modeOption=p,lh(u)},!0),c("indentUnit",2,lh,!0),c("indentWithTabs",!1),c("smartIndent",!0),c("tabSize",4,function(u){Ya(u),Vo(u),Wn(u)},!0),c("lineSeparator",null,function(u,p){if(u.doc.lineSep=p,!!p){var g=[],y=u.doc.first;u.doc.iter(function(_){for(var E=0;;){var O=_.text.indexOf(p,E);if(O==-1)break;E=O+p.length,g.push(ce(y,O))}y++});for(var C=g.length-1;C>=0;C--)Qa(u.doc,p,g[C],ce(g[C].line,g[C].ch+p.length))}}),c("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(u,p,g){u.state.specialChars=new RegExp(p.source+(p.test(" ")?"":"| "),"g"),g!=rl&&u.refresh()}),c("specialCharPlaceholder",jt,function(u){return u.refresh()},!0),c("electricChars",!0),c("inputStyle",L?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),c("spellcheck",!1,function(u,p){return u.getInputField().spellcheck=p},!0),c("autocorrect",!1,function(u,p){return u.getInputField().autocorrect=p},!0),c("autocapitalize",!1,function(u,p){return u.getInputField().autocapitalize=p},!0),c("rtlMoveVisually",!re),c("wholeLineUpdateBefore",!0),c("theme","default",function(u){Xg(u),Rc(u)},!0),c("keyMap","default",function(u,p,g){var y=zc(p),C=g!=rl&&zc(g);C&&C.detach&&C.detach(u,y),y.attach&&y.attach(u,C||null)}),c("extraKeys",null),c("configureMouse",null),c("lineWrapping",!1,Qg,!0),c("gutters",[],function(u,p){u.display.gutterSpecs=yo(p,u.options.lineNumbers),Rc(u)},!0),c("fixedGutter",!0,function(u,p){u.display.gutters.style.left=p?kt(u.display)+"px":"0",u.refresh()},!0),c("coverGutterNextToScrollbar",!1,function(u){return Ko(u)},!0),c("scrollbarStyle","native",function(u){vg(u),Ko(u),u.display.scrollbars.setScrollTop(u.doc.scrollTop),u.display.scrollbars.setScrollLeft(u.doc.scrollLeft)},!0),c("lineNumbers",!1,function(u,p){u.display.gutterSpecs=yo(u.options.gutters,p),Rc(u)},!0),c("firstLineNumber",1,Rc,!0),c("lineNumberFormatter",function(u){return u},Rc,!0),c("showCursorWhenSelecting",!1,ra,!0),c("resetSelectionOnContextMenu",!0),c("lineWiseCopyCut",!0),c("pasteLinesPerSelection",!0),c("selectionsMayTouch",!1),c("readOnly",!1,function(u,p){p=="nocursor"&&(Jl(u),u.display.input.blur()),u.display.input.readOnlyChanged(p)}),c("screenReaderLabel",null,function(u,p){p=p===""?null:p,u.display.input.screenReaderLabelChanged(p)}),c("disableInput",!1,function(u,p){p||u.display.input.reset()},!0),c("dragDrop",!0,Dw),c("allowDropFileTypes",null),c("cursorBlinkRate",530),c("cursorScrollMargin",0),c("cursorHeight",1,ra,!0),c("singleCursorHeightPerLine",!0,ra,!0),c("workTime",100),c("workDelay",100),c("flattenSpans",!0,Ya,!0),c("addModeClass",!1,Ya,!0),c("pollInterval",100),c("undoDepth",200,function(u,p){return u.doc.history.undoDepth=p}),c("historyEventDelay",1250),c("viewportMargin",10,function(u){return u.refresh()},!0),c("maxHighlightLength",1e4,Ya,!0),c("moveInputWithCursor",!0,function(u,p){p||u.display.input.resetPosition()}),c("tabindex",null,function(u,p){return u.display.input.getField().tabIndex=p||""}),c("autofocus",null),c("direction","ltr",function(u,p){return u.doc.setDirection(p)},!0),c("phrases",null)}i(Th,"defineOptions");function Dw(r,o,c){var u=c&&c!=rl;if(!o!=!u){var p=r.display.dragFunctions,g=o?ze:Yt;g(r.display.scroller,"dragstart",p.start),g(r.display.scroller,"dragenter",p.enter),g(r.display.scroller,"dragover",p.over),g(r.display.scroller,"dragleave",p.leave),g(r.display.scroller,"drop",p.drop)}}i(Dw,"dragDropChanged");function Qg(r){r.options.lineWrapping?(It(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(Ee(r.display.wrapper,"CodeMirror-wrap"),Bl(r)),nd(r),Wn(r),Vo(r),setTimeout(function(){return Ko(r)},100)}i(Qg,"wrappingChanged");function wt(r,o){var c=this;if(!(this instanceof wt))return new wt(r,o);this.options=o=o?Gt(o):{},Gt(jc,o,!1);var u=o.value;typeof u=="string"?u=new kn(u,o.mode,null,o.lineSeparator,o.direction):o.mode&&(u.modeOption=o.mode),this.doc=u;var p=new wt.inputStyles[o.inputStyle](this),g=this.display=new xw(r,u,p,o);g.wrapper.CodeMirror=this,Xg(this),o.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vg(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new se,keySeq:null,specialChars:null},o.autofocus&&!L&&g.input.focus(),d&&v<11&&setTimeout(function(){return c.display.input.reset(!0)},20),Jg(this),Wg(),Ka(this),this.curOp.forceUpdate=!0,uh(this,u),o.autofocus&&!L||this.hasFocus()?setTimeout(function(){c.hasFocus()&&!c.state.focused&&Zp(c)},20):Jl(this);for(var y in Kc)Kc.hasOwnProperty(y)&&Kc[y](this,o[y],rl);xg(this),o.finishInit&&o.finishInit(this);for(var C=0;C<_d.length;++C)_d[C](this);Ga(this),S&&o.lineWrapping&&getComputedStyle(g.lineDiv).textRendering=="optimizelegibility"&&(g.lineDiv.style.textRendering="auto")}i(wt,"CodeMirror"),wt.defaults=jc,wt.optionHandlers=Kc;function Jg(r){var o=r.display;ze(o.scroller,"mousedown",Lt(r,Kg)),d&&v<11?ze(o.scroller,"dblclick",Lt(r,function(_){if(!Pt(r,_)){var E=jo(r,_);if(!(!E||gu(r,_)||yi(r.display,_))){kr(_);var O=r.findWordAt(E);nu(r.doc,O.anchor,O.head)}}})):ze(o.scroller,"dblclick",function(_){return Pt(r,_)||kr(_)}),ze(o.scroller,"contextmenu",function(_){return xd(r,_)}),ze(o.input.getField(),"contextmenu",function(_){o.scroller.contains(_.target)||xd(r,_)});var c,u={end:0};function p(){o.activeTouch&&(c=setTimeout(function(){return o.activeTouch=null},1e3),u=o.activeTouch,u.end=+new Date)}i(p,"finishTouch");function g(_){if(_.touches.length!=1)return!1;var E=_.touches[0];return E.radiusX<=1&&E.radiusY<=1}i(g,"isMouseLikeTouchEvent");function y(_,E){if(E.left==null)return!0;var O=E.left-_.left,F=E.top-_.top;return O*O+F*F>20*20}i(y,"farAway"),ze(o.scroller,"touchstart",function(_){if(!Pt(r,_)&&!g(_)&&!gu(r,_)){o.input.ensurePolled(),clearTimeout(c);var E=+new Date;o.activeTouch={start:E,moved:!1,prev:E-u.end<=300?u:null},_.touches.length==1&&(o.activeTouch.left=_.touches[0].pageX,o.activeTouch.top=_.touches[0].pageY)}}),ze(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),ze(o.scroller,"touchend",function(_){var E=o.activeTouch;if(E&&!yi(o,_)&&E.left!=null&&!E.moved&&new Date-E.start<300){var O=r.coordsChar(o.activeTouch,"page"),F;!E.prev||y(E,E.prev)?F=new Et(O,O):!E.prev.prev||y(E,E.prev.prev)?F=r.findWordAt(O):F=new Et(ce(O.line,0),qe(r.doc,ce(O.line+1,0))),r.setSelection(F.anchor,F.head),r.focus(),kr(_)}p()}),ze(o.scroller,"touchcancel",p),ze(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Pc(r,o.scroller.scrollTop),go(r,o.scroller.scrollLeft,!0),Mt(r,"scroll",r))}),ze(o.scroller,"mousewheel",function(_){return _g(r,_)}),ze(o.scroller,"DOMMouseScroll",function(_){return _g(r,_)}),ze(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:i(function(_){Pt(r,_)||Aa(_)},"enter"),over:i(function(_){Pt(r,_)||(ut(r,_),Aa(_))},"over"),start:i(function(_){return yh(r,_)},"start"),drop:Lt(r,kw),leave:i(function(_){Pt(r,_)||zg(r)},"leave")};var C=o.input.getField();ze(C,"keyup",function(_){return Co.call(r,_)}),ze(C,"keydown",Lt(r,_h)),ze(C,"keypress",Lt(r,qg)),ze(C,"focus",function(_){return Zp(r,_)}),ze(C,"blur",function(_){return Jl(r,_)})}i(Jg,"registerEventHandlers");var _d=[];wt.defineInitHook=function(r){return _d.push(r)};function Gc(r,o,c,u){var p=r.doc,g;c==null&&(c="add"),c=="smart"&&(p.mode.indent?g=Ss(r,o).state:c="prev");var y=r.options.tabSize,C=Pe(p,o),_=Ft(C.text,null,y);C.stateAfter&&(C.stateAfter=null);var E=C.text.match(/^\s*/)[0],O;if(!u&&!/\S/.test(C.text))O=0,c="not";else if(c=="smart"&&(O=p.mode.indent(g,C.text.slice(E.length),C.text),O==Zt||O>150)){if(!u)return;c="prev"}c=="prev"?o>p.first?O=Ft(Pe(p,o-1).text,null,y):O=0:c=="add"?O=_+r.options.indentUnit:c=="subtract"?O=_-r.options.indentUnit:typeof c=="number"&&(O=_+c),O=Math.max(0,O);var F="",K=0;if(r.options.indentWithTabs)for(var V=Math.floor(O/y);V;--V)K+=y,F+=" ";if(Ky,_=kl(o),E=null;if(C&&u.ranges.length>1)if(Ui&&Ui.text.join(` +`)==o){if(u.ranges.length%Ui.text.length==0){E=[];for(var O=0;O=0;K--){var V=u.ranges[K],te=V.from(),ae=V.to();V.empty()&&(c&&c>0?te=ce(te.line,te.ch-c):r.state.overwrite&&!C?ae=ce(ae.line,Math.min(Pe(g,ae.line).text.length,ae.ch+lt(_).length)):C&&Ui&&Ui.lineWise&&Ui.text.join(` +`)==_.join(` +`)&&(te=ae=ce(te.line,0)));var de={from:te,to:ae,text:E?E[K%E.length]:_,origin:p||(C?"paste":r.state.cutIncoming>y?"cut":"+input")};au(r.doc,de),Kt(r,"inputRead",r,de)}o&&!C&&bd(r,o),er(r),r.curOp.updateInput<2&&(r.curOp.updateInput=F),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}i(kh,"applyTextInput");function Qo(r,o){var c=r.clipboardData&&r.clipboardData.getData("Text");if(c)return r.preventDefault(),!o.isReadOnly()&&!o.options.disableInput&&o.hasFocus()&&vn(o,function(){return kh(o,c,0,null,"paste")}),!0}i(Qo,"handlePaste");function bd(r,o){if(!(!r.options.electricChars||!r.options.smartIndent))for(var c=r.doc.sel,u=c.ranges.length-1;u>=0;u--){var p=c.ranges[u];if(!(p.head.ch>100||u&&c.ranges[u-1].head.line==p.head.line)){var g=r.getModeAt(p.head),y=!1;if(g.electricChars){for(var C=0;C-1){y=Gc(r,p.head.line,"smart");break}}else g.electricInput&&g.electricInput.test(Pe(r.doc,p.head.line).text.slice(0,p.head.ch))&&(y=Gc(r,p.head.line,"smart"));y&&Kt(r,"electricInput",r,p.head.line)}}}i(bd,"triggerElectric");function Td(r){for(var o=[],c=[],u=0;ug&&(Gc(this,C.head.line,u,!0),g=C.head.line,y==this.doc.sel.primIndex&&er(this));else{var _=C.from(),E=C.to(),O=Math.max(g,_.line);g=Math.min(this.lastLine(),E.line-(E.ch?0:1))+1;for(var F=O;F0&&zi(this.doc,y,new Et(_,K[y].to()),st)}}}),getTokenAt:i(function(u,p){return Rl(this,u,p)},"getTokenAt"),getLineTokens:i(function(u,p){return Rl(this,ce(u),p,!0)},"getLineTokens"),getTokenTypeAt:i(function(u){u=qe(this.doc,u);var p=Ml(this,Pe(this.doc,u.line)),g=0,y=(p.length-1)/2,C=u.ch,_;if(C==0)_=p[2];else for(;;){var E=g+y>>1;if((E?p[E*2-1]:0)>=C)y=E;else if(p[E*2+1]_&&(u=_,y=!0),C=Pe(this.doc,u)}else C=u;return gn(this,C,{top:0,left:0},p||"page",g||y).top+(y?this.doc.height-vi(C):0)},"heightAtLine"),defaultTextHeight:i(function(){return po(this.display)},"defaultTextHeight"),defaultCharWidth:i(function(){return Cs(this.display)},"defaultCharWidth"),getViewport:i(function(){return{from:this.display.viewFrom,to:this.display.viewTo}},"getViewport"),addWidget:i(function(u,p,g,y,C){var _=this.display;u=J(this,qe(this.doc,u));var E=u.bottom,O=u.left;if(p.style.position="absolute",p.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(p),_.sizer.appendChild(p),y=="over")E=u.top;else if(y=="above"||y=="near"){var F=Math.max(_.wrapper.clientHeight,this.doc.height),K=Math.max(_.sizer.clientWidth,_.lineSpace.clientWidth);(y=="above"||u.bottom+p.offsetHeight>F)&&u.top>p.offsetHeight?E=u.top-p.offsetHeight:u.bottom+p.offsetHeight<=F&&(E=u.bottom),O+p.offsetWidth>K&&(O=K-p.offsetWidth)}p.style.top=E+"px",p.style.left=p.style.right="",C=="right"?(O=_.sizer.clientWidth-p.offsetWidth,p.style.right="0px"):(C=="left"?O=0:C=="middle"&&(O=(_.sizer.clientWidth-p.offsetWidth)/2),p.style.left=O+"px"),g&&gg(this,{left:O,top:E,right:O+p.offsetWidth,bottom:E+p.offsetHeight})},"addWidget"),triggerOnKeyDown:$e(_h),triggerOnKeyPress:$e(qg),triggerOnKeyUp:Co,triggerOnMouseDown:$e(Kg),execCommand:i(function(u){if($c.hasOwnProperty(u))return $c[u].call(null,this)},"execCommand"),triggerElectric:$e(function(u){bd(this,u)}),findPosH:i(function(u,p,g,y){var C=1;p<0&&(C=-1,p=-p);for(var _=qe(this.doc,u),E=0;E0&&O(g.charAt(y-1));)--y;for(;C.5||this.options.lineWrapping)&&nd(this),Mt(this,"refresh",this)}),swapDoc:$e(function(u){var p=this.doc;return p.cm=null,this.state.selectingText&&this.state.selectingText(),uh(this,u),Vo(this),this.display.input.reset(),Ar(this,u.scrollLeft,u.scrollTop),this.curOp.forceScroll=!0,Kt(this,"swapDoc",this,p),p}),phrase:i(function(u){var p=this.options.phrases;return p&&Object.prototype.hasOwnProperty.call(p,u)?p[u]:u},"phrase"),getInputField:i(function(){return this.display.input.getField()},"getInputField"),getWrapperElement:i(function(){return this.display.wrapper},"getWrapperElement"),getScrollerElement:i(function(){return this.display.scroller},"getScrollerElement"),getGutterElement:i(function(){return this.display.gutters},"getGutterElement")},zn(r),r.registerHelper=function(u,p,g){c.hasOwnProperty(u)||(c[u]=r[u]={_global:[]}),c[u][p]=g},r.registerGlobalHelper=function(u,p,g,y){r.registerHelper(u,p,y),c[u]._global.push({pred:g,val:y})}}i(vu,"addEditorMethods");function We(r,o,c,u,p){var g=o,y=c,C=Pe(r,o.line),_=p&&r.direction=="rtl"?-c:c;function E(){var _e=o.line+_;return _e=r.first+r.size?!1:(o=new ce(_e,o.ch,o.sticky),C=Pe(r,_e))}i(E,"findNextLine");function O(_e){var ye;if(u=="codepoint"){var ke=C.text.charCodeAt(o.ch+(c>0?0:-1));if(isNaN(ke))ye=null;else{var Ie=c>0?ke>=55296&&ke<56320:ke>=56320&&ke<57343;ye=new ce(o.line,Math.max(0,Math.min(C.text.length,o.ch+c*(Ie?2:1))),-c)}}else p?ye=fa(r.cm,C,o,c):ye=Uc(C,o,c);if(ye==null)if(!_e&&E())o=Wc(p,r.cm,C,o.line,_);else return!1;else o=ye;return!0}if(i(O,"moveOnce"),u=="char"||u=="codepoint")O();else if(u=="column")O(!0);else if(u=="word"||u=="group")for(var F=null,K=u=="group",V=r.cm&&r.cm.getHelper(o,"wordChars"),te=!0;!(c<0&&!O(!te));te=!1){var ae=C.text.charAt(o.ch)||` +`,de=Gr(ae,V)?"w":K&&ae==` +`?"n":!K||/\s/.test(ae)?null:"p";if(K&&!te&&!de&&(de="s"),F&&F!=de){c<0&&(c=1,O(),o.sticky="after");break}if(de&&(F=de),c>0&&!O(!te))break}var we=ou(r,o,g,y,!0);return qs(g,we)&&(we.hitSide=!0),we}i(We,"findPosH");function Qc(r,o,c,u){var p=r.doc,g=o.left,y;if(u=="page"){var C=Math.min(r.display.wrapper.clientHeight,vr(r).innerHeight||p(r).documentElement.clientHeight),_=Math.max(C-.5*po(r.display),3);y=(c>0?o.bottom:o.top)+c*_}else u=="line"&&(y=c>0?o.bottom+3:o.top-3);for(var E;E=yt(r,g,y),!!E.outside;){if(c<0?y<=0:y>=p.height){E.hitSide=!0;break}y+=c*5}return E}i(Qc,"findPosV");var bt=i(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");bt.prototype.init=function(r){var o=this,c=this,u=c.cm,p=c.div=r.lineDiv;p.contentEditable=!0,Yc(p,u.options.spellcheck,u.options.autocorrect,u.options.autocapitalize);function g(C){for(var _=C.target;_;_=_.parentNode){if(_==p)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(_.className))break}return!1}i(g,"belongsToInput"),ze(p,"paste",function(C){!g(C)||Pt(u,C)||Qo(C,u)||v<=11&&setTimeout(Lt(u,function(){return o.updateFromDOM()}),20)}),ze(p,"compositionstart",function(C){o.composing={data:C.data,done:!1}}),ze(p,"compositionupdate",function(C){o.composing||(o.composing={data:C.data,done:!1})}),ze(p,"compositionend",function(C){o.composing&&(C.data!=o.composing.data&&o.readFromDOMSoon(),o.composing.done=!0)}),ze(p,"touchstart",function(){return c.forceCompositionEnd()}),ze(p,"input",function(){o.composing||o.readFromDOMSoon()});function y(C){if(!(!g(C)||Pt(u,C))){if(u.somethingSelected())Ed({lineWise:!1,text:u.getSelections()}),C.type=="cut"&&u.replaceSelection("",null,"cut");else if(u.options.lineWiseCopyCut){var _=Td(u);Ed({lineWise:!0,text:_.text}),C.type=="cut"&&u.operation(function(){u.setSelections(_.ranges,0,st),u.replaceSelection("",null,"cut")})}else return;if(C.clipboardData){C.clipboardData.clearData();var E=Ui.text.join(` +`);if(C.clipboardData.setData("Text",E),C.clipboardData.getData("Text")==E){C.preventDefault();return}}var O=Xc(),F=O.firstChild;Yc(F),u.display.lineSpace.insertBefore(O,u.display.lineSpace.firstChild),F.value=Ui.text.join(` +`);var K=ot(Wt(p));cn(F),setTimeout(function(){u.display.lineSpace.removeChild(O),K.focus(),K==p&&c.showPrimarySelection()},50)}}i(y,"onCopyCut"),ze(p,"copy",y),ze(p,"cut",y)},bt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},bt.prototype.prepareSelection=function(){var r=Jp(this.cm,!1);return r.focus=ot(Wt(this.div))==this.div,r},bt.prototype.showSelection=function(r,o){!r||!this.cm.display.view.length||((r.focus||o)&&this.showPrimarySelection(),this.showMultipleSelections(r))},bt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bt.prototype.showPrimarySelection=function(){var r=this.getSelection(),o=this.cm,c=o.doc.sel.primary(),u=c.from(),p=c.to();if(o.display.viewTo==o.display.viewFrom||u.line>=o.display.viewTo||p.line=o.display.viewFrom&&da(o,u)||{node:C[0].measure.map[2],offset:0},E=p.liner.firstLine()&&(u=ce(u.line-1,Pe(r.doc,u.line-1).length)),p.ch==Pe(r.doc,p.line).text.length&&p.lineo.viewTo-1)return!1;var g,y,C;u.line==o.viewFrom||(g=Ua(r,u.line))==0?(y=vt(o.view[0].line),C=o.view[0].node):(y=vt(o.view[g].line),C=o.view[g-1].node.nextSibling);var _=Ua(r,p.line),E,O;if(_==o.view.length-1?(E=o.viewTo-1,O=o.lineDiv.lastChild):(E=vt(o.view[_+1].line)-1,O=o.view[_+1].node.previousSibling),!C)return!1;for(var F=r.doc.splitLines(Zg(r,C,O,y,E)),K=lo(r.doc,ce(y,0),ce(E,Pe(r.doc,E).text.length));F.length>1&&K.length>1;)if(lt(F)==lt(K))F.pop(),K.pop(),E--;else if(F[0]==K[0])F.shift(),K.shift(),y++;else break;for(var V=0,te=0,ae=F[0],de=K[0],we=Math.min(ae.length,de.length);Vu.ch&&_e.charCodeAt(_e.length-te-1)==ye.charCodeAt(ye.length-te-1);)V--,te++;F[F.length-1]=_e.slice(0,_e.length-te).replace(/^\u200b+/,""),F[0]=F[0].slice(V).replace(/\u200b+$/,"");var Ie=ce(y,V),Oe=ce(E,K.length?lt(K).length-te:0);if(F.length>1||F[0]||Ve(Ie,Oe))return Qa(r.doc,F,Ie,Oe,"+input"),!0},bt.prototype.ensurePolled=function(){this.forceCompositionEnd()},bt.prototype.reset=function(){this.forceCompositionEnd()},bt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},bt.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},bt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&vn(this.cm,function(){return Wn(r.cm)})},bt.prototype.setUneditable=function(r){r.contentEditable="false"},bt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,kh)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},bt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},bt.prototype.onContextMenu=function(){},bt.prototype.resetPosition=function(){},bt.prototype.needsContentAttribute=!0;function da(r,o){var c=Gl(r,o.line);if(!c||c.hidden)return null;var u=Pe(r.doc,o.line),p=td(c,u,o.line),g=Me(u,r.doc.direction),y="left";if(g){var C=ee(g,o.ch);y=C%2?"right":"left"}var _=U(p.map,o.ch,y);return _.offset=_.collapse=="right"?_.end:_.start,_}i(da,"posToDOM");function Iw(r){for(var o=r;o;o=o.parentNode)if(/CodeMirror-gutter-wrapper/.test(o.className))return!0;return!1}i(Iw,"isInGutter");function pa(r,o){return o&&(r.bad=!0),r}i(pa,"badPos");function Zg(r,o,c,u,p){var g="",y=!1,C=r.doc.lineSeparator(),_=!1;function E(V){return function(te){return te.id==V}}i(E,"recognizeMarker");function O(){y&&(g+=C,_&&(g+=C),y=_=!1)}i(O,"close");function F(V){V&&(O(),g+=V)}i(F,"addText");function K(V){if(V.nodeType==1){var te=V.getAttribute("cm-text");if(te){F(te);return}var ae=V.getAttribute("cm-marker"),de;if(ae){var we=r.findMarks(ce(u,0),ce(p+1,0),E(+ae));we.length&&(de=we[0].find(0))&&F(lo(r.doc,de.from,de.to).join(C));return}if(V.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(V.nodeName);if(!/^br$/i.test(V.nodeName)&&V.textContent.length==0)return;_e&&O();for(var ye=0;ye=9&&o.hasSelection&&(o.hasSelection=null),c.poll()}),ze(p,"paste",function(y){Pt(u,y)||Qo(y,u)||(u.state.pasteIncoming=+new Date,c.fastPoll())});function g(y){if(!Pt(u,y)){if(u.somethingSelected())Ed({lineWise:!1,text:u.getSelections()});else if(u.options.lineWiseCopyCut){var C=Td(u);Ed({lineWise:!0,text:C.text}),y.type=="cut"?u.setSelections(C.ranges,null,st):(c.prevInput="",p.value=C.text.join(` +`),cn(p))}else return;y.type=="cut"&&(u.state.cutIncoming=+new Date)}}i(g,"prepareCopyCut"),ze(p,"cut",g),ze(p,"copy",g),ze(r.scroller,"paste",function(y){if(!(yi(r,y)||Pt(u,y))){if(!p.dispatchEvent){u.state.pasteIncoming=+new Date,c.focus();return}var C=new Event("paste");C.clipboardData=y.clipboardData,p.dispatchEvent(C)}}),ze(r.lineSpace,"selectstart",function(y){yi(r,y)||kr(y)}),ze(p,"compositionstart",function(){var y=u.getCursor("from");c.composing&&c.composing.range.clear(),c.composing={start:y,range:u.markText(y,u.getCursor("to"),{className:"CodeMirror-composing"})}}),ze(p,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},dr.prototype.createField=function(r){this.wrapper=Xc(),this.textarea=this.wrapper.firstChild;var o=this.cm.options;Yc(this.textarea,o.spellcheck,o.autocorrect,o.autocapitalize)},dr.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},dr.prototype.prepareSelection=function(){var r=this.cm,o=r.display,c=r.doc,u=Jp(r);if(r.options.moveInputWithCursor){var p=J(r,c.sel.primary().head,"div"),g=o.wrapper.getBoundingClientRect(),y=o.lineDiv.getBoundingClientRect();u.teTop=Math.max(0,Math.min(o.wrapper.clientHeight-10,p.top+y.top-g.top)),u.teLeft=Math.max(0,Math.min(o.wrapper.clientWidth-10,p.left+y.left-g.left))}return u},dr.prototype.showSelection=function(r){var o=this.cm,c=o.display;tt(c.cursorDiv,r.cursors),tt(c.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},dr.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing&&r)){var o=this.cm;if(this.resetting=!0,o.somethingSelected()){this.prevInput="";var c=o.getSelection();this.textarea.value=c,o.state.focused&&cn(this.textarea),d&&v>=9&&(this.hasSelection=c)}else r||(this.prevInput=this.textarea.value="",d&&v>=9&&(this.hasSelection=null));this.resetting=!1}},dr.prototype.getField=function(){return this.textarea},dr.prototype.supportsTouch=function(){return!1},dr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!L||ot(Wt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},dr.prototype.blur=function(){this.textarea.blur()},dr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},dr.prototype.receivedFocus=function(){this.slowPoll()},dr.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},dr.prototype.fastPoll=function(){var r=!1,o=this;o.pollingFast=!0;function c(){var u=o.poll();!u&&!r?(r=!0,o.polling.set(60,c)):(o.pollingFast=!1,o.slowPoll())}i(c,"p"),o.polling.set(20,c)},dr.prototype.poll=function(){var r=this,o=this.cm,c=this.textarea,u=this.prevInput;if(this.contextMenuPending||this.resetting||!o.state.focused||Bp(c)&&!u&&!this.composing||o.isReadOnly()||o.options.disableInput||o.state.keySeq)return!1;var p=c.value;if(p==u&&!o.somethingSelected())return!1;if(d&&v>=9&&this.hasSelection===p||B&&/[\uf700-\uf7ff]/.test(p))return o.display.input.reset(),!1;if(o.doc.sel==o.display.selForContextMenu){var g=p.charCodeAt(0);if(g==8203&&!u&&(u="\u200B"),g==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,C=Math.min(u.length,p.length);y1e3||p.indexOf(` +`)>-1?c.value=r.prevInput="":r.prevInput=p,r.composing&&(r.composing.range.clear(),r.composing.range=o.markText(r.composing.start,o.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},dr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},dr.prototype.onKeyPress=function(){d&&v>=9&&(this.hasSelection=null),this.fastPoll()},dr.prototype.onContextMenu=function(r){var o=this,c=o.cm,u=c.display,p=o.textarea;o.contextMenuPending&&o.contextMenuPending();var g=jo(c,r),y=u.scroller.scrollTop;if(!g||I)return;var C=c.options.resetSelectionOnContextMenu;C&&c.doc.sel.contains(g)==-1&&Lt(c,Jr)(c.doc,oa(g),st);var _=p.style.cssText,E=o.wrapper.style.cssText,O=o.wrapper.offsetParent.getBoundingClientRect();o.wrapper.style.cssText="position: static",p.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(r.clientY-O.top-5)+"px; left: "+(r.clientX-O.left-5)+`px; + z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var F;S&&(F=p.ownerDocument.defaultView.scrollY),u.input.focus(),S&&p.ownerDocument.defaultView.scrollTo(null,F),u.input.reset(),c.somethingSelected()||(p.value=o.prevInput=" "),o.contextMenuPending=V,u.selForContextMenu=c.doc.sel,clearTimeout(u.detectingSelectAll);function K(){if(p.selectionStart!=null){var ae=c.somethingSelected(),de="\u200B"+(ae?p.value:"");p.value="\u21DA",p.value=de,o.prevInput=ae?"":"\u200B",p.selectionStart=1,p.selectionEnd=de.length,u.selForContextMenu=c.doc.sel}}i(K,"prepareSelectAllHack");function V(){if(o.contextMenuPending==V&&(o.contextMenuPending=!1,o.wrapper.style.cssText=E,p.style.cssText=_,d&&v<9&&u.scrollbars.setScrollTop(u.scroller.scrollTop=y),p.selectionStart!=null)){(!d||d&&v<9)&&K();var ae=0,de=i(function(){u.selForContextMenu==c.doc.sel&&p.selectionStart==0&&p.selectionEnd>0&&o.prevInput=="\u200B"?Lt(c,su)(c):ae++<10?u.detectingSelectAll=setTimeout(de,500):(u.selForContextMenu=null,u.input.reset())},"poll");u.detectingSelectAll=setTimeout(de,200)}}if(i(V,"rehide"),d&&v>=9&&K(),he){Aa(r);var te=i(function(){Yt(window,"mouseup",te),setTimeout(V,20)},"mouseup");ze(window,"mouseup",te)}else setTimeout(V,50)},dr.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},dr.prototype.setUneditable=function(){},dr.prototype.needsContentAttribute=!1;function ev(r,o){if(o=o?Gt(o):{},o.value=r.value,!o.tabindex&&r.tabIndex&&(o.tabindex=r.tabIndex),!o.placeholder&&r.placeholder&&(o.placeholder=r.placeholder),o.autofocus==null){var c=ot(Wt(r));o.autofocus=c==r||r.getAttribute("autofocus")!=null&&c==document.body}function u(){r.value=C.getValue()}i(u,"save");var p;if(r.form&&(ze(r.form,"submit",u),!o.leaveSubmitMethodAlone)){var g=r.form;p=g.submit;try{var y=g.submit=function(){u(),g.submit=p,g.submit(),g.submit=y}}catch{}}o.finishInit=function(_){_.save=u,_.getTextArea=function(){return r},_.toTextArea=function(){_.toTextArea=isNaN,u(),r.parentNode.removeChild(_.getWrapperElement()),r.style.display="",r.form&&(Yt(r.form,"submit",u),!o.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=p))}},r.style.display="none";var C=wt(function(_){return r.parentNode.insertBefore(_,r.nextSibling)},o);return C}i(ev,"fromTextArea");function Bw(r){r.off=Yt,r.on=ze,r.wheelEventPixels=Cw,r.Doc=kn,r.splitLines=kl,r.countColumn=Ft,r.findColumn=En,r.isWordChar=Mi,r.Pass=Zt,r.signal=Mt,r.Line=pn,r.changeEnd=sa,r.scrollbarModel=ja,r.Pos=ce,r.cmpPos=Ve,r.modes=ac,r.mimeModes=vs,r.resolveMode=La,r.getMode=lc,r.modeExtensions=ao,r.extendMode=qf,r.copyState=Oi,r.startState=cc,r.innerMode=uc,r.commands=$c,r.keyMap=Yo,r.keyName=Hc,r.isModifierKey=vd,r.lookupKey=xi,r.normalizeKeyMap=Si,r.StringStream=or,r.SharedTextMarker=cu,r.TextMarker=xo,r.LineWidget=Za,r.e_preventDefault=kr,r.e_stopPropagation=gs,r.e_stop=Aa,r.addClass=It,r.contains=Qe,r.rmClass=Ee,r.keyNames=Br}i(Bw,"addLegacyProps"),Th(wt),vu(wt);var tv="iter insert remove copy getEditor constructor".split(" ");for(var kd in kn.prototype)kn.prototype.hasOwnProperty(kd)&&Ue(tv,kd)<0&&(wt.prototype[kd]=function(r){return function(){return r.apply(this.doc,arguments)}}(kn.prototype[kd]));return zn(kn),wt.inputStyles={textarea:dr,contenteditable:bt},wt.defineMode=function(r){!wt.defaults.mode&&r!="null"&&(wt.defaults.mode=r),zp.apply(this,arguments)},wt.defineMIME=Up,wt.defineMode("null",function(){return{token:i(function(r){return r.skipToEnd()},"token")}}),wt.defineMIME("text/plain","null"),wt.defineExtension=function(r,o){wt.prototype[r]=o},wt.defineDocExtension=function(r,o){kn.prototype[r]=o},wt.fromTextArea=ev,Bw(wt),wt.version="5.65.16",wt})});var HL=rt((IK,BL)=>{var Dz=typeof Element<"u",Iz=typeof Map=="function",Fz=typeof Set=="function",Bz=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function O0(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,s,l;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!O0(e[s],t[s]))return!1;return!0}var h;if(Iz&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;for(h=e.entries();!(s=h.next()).done;)if(!O0(s.value[1],t.get(s.value[0])))return!1;return!0}if(Fz&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(h=e.entries();!(s=h.next()).done;)if(!t.has(s.value[0]))return!1;return!0}if(Bz&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(e[s]!==t[s])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(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[s]))return!1;if(Dz&&e instanceof Element)return!1;for(s=n;s--!==0;)if(!((l[s]==="_owner"||l[s]==="__v"||l[s]==="__o")&&e.$$typeof)&&!O0(e[l[s]],t[l[s]]))return!1;return!0}return e!==e&&t!==t}i(O0,"equal");BL.exports=i(function(t,n){try{return O0(t,n)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}},"isEqual")});var oM=rt((qY,iM)=>{iM.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Qu=rt(Ff=>{var $_,Jz=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ff.getSymbolSize=i(function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},"getSymbolSize");Ff.getSymbolTotalCodewords=i(function(t){return Jz[t]},"getSymbolTotalCodewords");Ff.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Ff.setToSJISFunction=i(function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');$_=t},"setToSJISFunction");Ff.isKanjiModeEnabled=function(){return typeof $_<"u"};Ff.toSJIS=i(function(t){return $_(t)},"toSJIS")});var V0=rt(ps=>{ps.L={bit:1};ps.M={bit:0};ps.Q={bit:3};ps.H={bit:2};function Zz(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return ps.L;case"m":case"medium":return ps.M;case"q":case"quartile":return ps.Q;case"h":case"high":return ps.H;default:throw new Error("Unknown EC Level: "+e)}}i(Zz,"fromString");ps.isValid=i(function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},"isValid");ps.from=i(function(t,n){if(ps.isValid(t))return t;try{return Zz(t)}catch{return n}},"from")});var lM=rt((XY,aM)=>{function sM(){this.buffer=[],this.length=0}i(sM,"BitBuffer");sM.prototype={get:i(function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},"get"),put:i(function(e,t){for(let n=0;n>>t-n-1&1)===1)},"put"),getLengthInBits:i(function(){return this.length},"getLengthInBits"),putBit:i(function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++},"putBit")};aM.exports=sM});var cM=rt((JY,uM)=>{function tg(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}i(tg,"BitMatrix");tg.prototype.set=function(e,t,n,s){let l=e*this.size+t;this.data[l]=n,s&&(this.reservedBit[l]=!0)};tg.prototype.get=function(e,t){return this.data[e*this.size+t]};tg.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};tg.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};uM.exports=tg});var fM=rt(q0=>{var eU=Qu().getSymbolSize;q0.getRowColCoords=i(function(t){if(t===1)return[];let n=Math.floor(t/7)+2,s=eU(t),l=s===145?26:Math.ceil((s-13)/(2*n-2))*2,h=[s-7];for(let d=1;d{var tU=Qu().getSymbolSize,dM=7;pM.getPositions=i(function(t){let n=tU(t);return[[0,0],[n-dM,0],[0,n-dM]]},"getPositions")});var mM=rt(ir=>{ir.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Bf={N1:3,N2:3,N3:40,N4:10};ir.isValid=i(function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},"isValid");ir.from=i(function(t){return ir.isValid(t)?parseInt(t,10):void 0},"from");ir.getPenaltyN1=i(function(t){let n=t.size,s=0,l=0,h=0,d=null,v=null;for(let S=0;S=5&&(s+=Bf.N1+(l-5)),d=k,l=1),k=t.get(b,S),k===v?h++:(h>=5&&(s+=Bf.N1+(h-5)),v=k,h=1)}l>=5&&(s+=Bf.N1+(l-5)),h>=5&&(s+=Bf.N1+(h-5))}return s},"getPenaltyN1");ir.getPenaltyN2=i(function(t){let n=t.size,s=0;for(let l=0;l=10&&(l===1488||l===93)&&s++,h=h<<1&2047|t.get(v,d),v>=10&&(h===1488||h===93)&&s++}return s*Bf.N3},"getPenaltyN3");ir.getPenaltyN4=i(function(t){let n=0,s=t.data.length;for(let h=0;h{var Ju=V0(),j0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],K0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];V_.getBlocksCount=i(function(t,n){switch(n){case Ju.L:return j0[(t-1)*4+0];case Ju.M:return j0[(t-1)*4+1];case Ju.Q:return j0[(t-1)*4+2];case Ju.H:return j0[(t-1)*4+3];default:return}},"getBlocksCount");V_.getTotalCodewordsCount=i(function(t,n){switch(n){case Ju.L:return K0[(t-1)*4+0];case Ju.M:return K0[(t-1)*4+1];case Ju.Q:return K0[(t-1)*4+2];case Ju.H:return K0[(t-1)*4+3];default:return}},"getTotalCodewordsCount")});var gM=rt(Y0=>{var rg=new Uint8Array(512),G0=new Uint8Array(256);i(function(){let t=1;for(let n=0;n<255;n++)rg[n]=t,G0[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)rg[n]=rg[n-255]},"initTables")();Y0.log=i(function(t){if(t<1)throw new Error("log("+t+")");return G0[t]},"log");Y0.exp=i(function(t){return rg[t]},"exp");Y0.mul=i(function(t,n){return t===0||n===0?0:rg[G0[t]+G0[n]]},"mul")});var vM=rt(ng=>{var j_=gM();ng.mul=i(function(t,n){let s=new Uint8Array(t.length+n.length-1);for(let l=0;l=0;){let l=s[0];for(let d=0;d{var yM=vM();function K_(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i(K_,"ReedSolomonEncoder");K_.prototype.initialize=i(function(t){this.degree=t,this.genPoly=yM.generateECPolynomial(this.degree)},"initialize");K_.prototype.encode=i(function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(t.length+this.degree);n.set(t);let s=yM.mod(n,this.genPoly),l=this.degree-s.length;if(l>0){let h=new Uint8Array(this.degree);return h.set(s,l),h}return s},"encode");wM.exports=K_});var G_=rt(xM=>{xM.isValid=i(function(t){return!isNaN(t)&&t>=1&&t<=40},"isValid")});var Y_=rt(_l=>{var CM="[0-9]+",nU="[A-Z $%*+\\-./:]+",ig="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ig=ig.replace(/u/g,"\\u");var iU="(?:(?![A-Z0-9 $%*+\\-./:]|"+ig+`)(?:.|[\r +]))+`;_l.KANJI=new RegExp(ig,"g");_l.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_l.BYTE=new RegExp(iU,"g");_l.NUMERIC=new RegExp(CM,"g");_l.ALPHANUMERIC=new RegExp(nU,"g");var oU=new RegExp("^"+ig+"$"),sU=new RegExp("^"+CM+"$"),aU=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_l.testKanji=i(function(t){return oU.test(t)},"testKanji");_l.testNumeric=i(function(t){return sU.test(t)},"testNumeric");_l.testAlphanumeric=i(function(t){return aU.test(t)},"testAlphanumeric")});var Zu=rt(sn=>{var lU=G_(),X_=Y_();sn.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};sn.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};sn.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};sn.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};sn.MIXED={bit:-1};sn.getCharCountIndicator=i(function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!lU.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},"getCharCountIndicator");sn.getBestModeForData=i(function(t){return X_.testNumeric(t)?sn.NUMERIC:X_.testAlphanumeric(t)?sn.ALPHANUMERIC:X_.testKanji(t)?sn.KANJI:sn.BYTE},"getBestModeForData");sn.toString=i(function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},"toString");sn.isValid=i(function(t){return t&&t.bit&&t.ccBits},"isValid");function uU(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return sn.NUMERIC;case"alphanumeric":return sn.ALPHANUMERIC;case"kanji":return sn.KANJI;case"byte":return sn.BYTE;default:throw new Error("Unknown mode: "+e)}}i(uU,"fromString");sn.from=i(function(t,n){if(sn.isValid(t))return t;try{return uU(t)}catch{return n}},"from")});var kM=rt(Hf=>{var X0=Qu(),cU=q_(),_M=V0(),ec=Zu(),Q_=G_(),bM=7973,EM=X0.getBCHDigit(bM);function fU(e,t,n){for(let s=1;s<=40;s++)if(t<=Hf.getCapacity(s,n,e))return s}i(fU,"getBestVersionForDataLength");function TM(e,t){return ec.getCharCountIndicator(e,t)+4}i(TM,"getReservedBitsCount");function dU(e,t){let n=0;return e.forEach(function(s){let l=TM(s.mode,t);n+=l+s.getBitsLength()}),n}i(dU,"getTotalBitsFromDataArray");function pU(e,t){for(let n=1;n<=40;n++)if(dU(e,n)<=Hf.getCapacity(n,t,ec.MIXED))return n}i(pU,"getBestVersionForMixedData");Hf.from=i(function(t,n){return Q_.isValid(t)?parseInt(t,10):n},"from");Hf.getCapacity=i(function(t,n,s){if(!Q_.isValid(t))throw new Error("Invalid QR Code version");typeof s>"u"&&(s=ec.BYTE);let l=X0.getSymbolTotalCodewords(t),h=cU.getTotalCodewordsCount(t,n),d=(l-h)*8;if(s===ec.MIXED)return d;let v=d-TM(s,t);switch(s){case ec.NUMERIC:return Math.floor(v/10*3);case ec.ALPHANUMERIC:return Math.floor(v/11*2);case ec.KANJI:return Math.floor(v/13);case ec.BYTE:default:return Math.floor(v/8)}},"getCapacity");Hf.getBestVersionForData=i(function(t,n){let s,l=_M.from(n,_M.M);if(Array.isArray(t)){if(t.length>1)return pU(t,l);if(t.length===0)return 1;s=t[0]}else s=t;return fU(s.mode,s.getLength(),l)},"getBestVersionForData");Hf.getEncodedBits=i(function(t){if(!Q_.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;X0.getBCHDigit(n)-EM>=0;)n^=bM<{var J_=Qu(),AM=1335,hU=21522,NM=J_.getBCHDigit(AM);PM.getEncodedBits=i(function(t,n){let s=t.bit<<3|n,l=s<<10;for(;J_.getBCHDigit(l)-NM>=0;)l^=AM<{var mU=Zu();function Ap(e){this.mode=mU.NUMERIC,this.data=e.toString()}i(Ap,"NumericData");Ap.getBitsLength=i(function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},"getBitsLength");Ap.prototype.getLength=i(function(){return this.data.length},"getLength");Ap.prototype.getBitsLength=i(function(){return Ap.getBitsLength(this.data.length)},"getBitsLength");Ap.prototype.write=i(function(t){let n,s,l;for(n=0;n+3<=this.data.length;n+=3)s=this.data.substr(n,3),l=parseInt(s,10),t.put(l,10);let h=this.data.length-n;h>0&&(s=this.data.substr(n),l=parseInt(s,10),t.put(l,h*3+1))},"write");MM.exports=Ap});var DM=rt((TX,RM)=>{var gU=Zu(),Z_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Pp(e){this.mode=gU.ALPHANUMERIC,this.data=e}i(Pp,"AlphanumericData");Pp.getBitsLength=i(function(t){return 11*Math.floor(t/2)+6*(t%2)},"getBitsLength");Pp.prototype.getLength=i(function(){return this.data.length},"getLength");Pp.prototype.getBitsLength=i(function(){return Pp.getBitsLength(this.data.length)},"getBitsLength");Pp.prototype.write=i(function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=Z_.indexOf(this.data[n])*45;s+=Z_.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(Z_.indexOf(this.data[n]),6)},"write");RM.exports=Pp});var FM=rt((NX,IM)=>{"use strict";IM.exports=i(function(t){for(var n=[],s=t.length,l=0;l=55296&&h<=56319&&s>l+1){var d=t.charCodeAt(l+1);d>=56320&&d<=57343&&(h=(h-55296)*1024+d-56320+65536,l+=1)}if(h<128){n.push(h);continue}if(h<2048){n.push(h>>6|192),n.push(h&63|128);continue}if(h<55296||h>=57344&&h<65536){n.push(h>>12|224),n.push(h>>6&63|128),n.push(h&63|128);continue}if(h>=65536&&h<=1114111){n.push(h>>18|240),n.push(h>>12&63|128),n.push(h>>6&63|128),n.push(h&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer},"encodeUtf8")});var HM=rt((PX,BM)=>{var vU=FM(),yU=Zu();function Lp(e){this.mode=yU.BYTE,typeof e=="string"&&(e=vU(e)),this.data=new Uint8Array(e)}i(Lp,"ByteData");Lp.getBitsLength=i(function(t){return t*8},"getBitsLength");Lp.prototype.getLength=i(function(){return this.data.length},"getLength");Lp.prototype.getBitsLength=i(function(){return Lp.getBitsLength(this.data.length)},"getBitsLength");Lp.prototype.write=function(e){for(let t=0,n=this.data.length;t{var wU=Zu(),SU=Qu();function Mp(e){this.mode=wU.KANJI,this.data=e}i(Mp,"KanjiData");Mp.getBitsLength=i(function(t){return t*13},"getBitsLength");Mp.prototype.getLength=i(function(){return this.data.length},"getLength");Mp.prototype.getBitsLength=i(function(){return Mp.getBitsLength(this.data.length)},"getBitsLength");Mp.prototype.write=function(e){let t;for(t=0;t=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};zM.exports=Mp});var WM=rt((RX,eE)=>{"use strict";var og={single_source_shortest_paths:i(function(e,t,n){var s={},l={};l[t]=0;var h=og.PriorityQueue.make();h.push(t,0);for(var d,v,S,b,k,R,I,z,q;!h.empty();){d=h.pop(),v=d.value,b=d.cost,k=e[v]||{};for(S in k)k.hasOwnProperty(S)&&(R=k[S],I=b+R,z=l[S],q=typeof l[S]>"u",(q||z>I)&&(l[S]=I,h.push(S,I),s[S]=v))}if(typeof n<"u"&&typeof l[n]>"u"){var Q=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(Q)}return s},"single_source_shortest_paths"),extract_shortest_path_from_predecessor_list:i(function(e,t){for(var n=[],s=t,l;s;)n.push(s),l=e[s],s=e[s];return n.reverse(),n},"extract_shortest_path_from_predecessor_list"),find_path:i(function(e,t,n){var s=og.single_source_shortest_paths(e,t,n);return og.extract_shortest_path_from_predecessor_list(s,n)},"find_path"),PriorityQueue:{make:i(function(e){var t=og.PriorityQueue,n={},s;e=e||{};for(s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);return n.queue=[],n.sorter=e.sorter||t.default_sorter,n},"make"),default_sorter:i(function(e,t){return e.cost-t.cost},"default_sorter"),push:i(function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},"push"),pop:i(function(){return this.queue.shift()},"pop"),empty:i(function(){return this.queue.length===0},"empty")}};typeof eE<"u"&&(eE.exports=og)});var XM=rt(Op=>{var Ut=Zu(),qM=OM(),jM=DM(),KM=HM(),GM=UM(),sg=Y_(),Q0=Qu(),xU=WM();function $M(e){return unescape(encodeURIComponent(e)).length}i($M,"getStringByteLength");function ag(e,t,n){let s=[],l;for(;(l=e.exec(n))!==null;)s.push({data:l[0],index:l.index,mode:t,length:l[0].length});return s}i(ag,"getSegments");function YM(e){let t=ag(sg.NUMERIC,Ut.NUMERIC,e),n=ag(sg.ALPHANUMERIC,Ut.ALPHANUMERIC,e),s,l;return Q0.isKanjiModeEnabled()?(s=ag(sg.BYTE,Ut.BYTE,e),l=ag(sg.KANJI,Ut.KANJI,e)):(s=ag(sg.BYTE_KANJI,Ut.BYTE,e),l=[]),t.concat(n,s,l).sort(function(d,v){return d.index-v.index}).map(function(d){return{data:d.data,mode:d.mode,length:d.length}})}i(YM,"getSegmentsFromString");function tE(e,t){switch(t){case Ut.NUMERIC:return qM.getBitsLength(e);case Ut.ALPHANUMERIC:return jM.getBitsLength(e);case Ut.KANJI:return GM.getBitsLength(e);case Ut.BYTE:return KM.getBitsLength(e)}}i(tE,"getSegmentBitsLength");function CU(e){return e.reduce(function(t,n){let s=t.length-1>=0?t[t.length-1]:null;return s&&s.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)},[])}i(CU,"mergeSegments");function _U(e){let t=[];for(let n=0;n{var Z0=Qu(),rE=V0(),bU=lM(),TU=cM(),kU=fM(),NU=hM(),oE=mM(),sE=q_(),AU=SM(),J0=kM(),PU=LM(),LU=Zu(),nE=XM();function MU(e,t){let n=e.size,s=NU.getPositions(t);for(let l=0;l=0&&v<=6&&(S===0||S===6)||S>=0&&S<=6&&(v===0||v===6)||v>=2&&v<=4&&S>=2&&S<=4?e.set(h+v,d+S,!0,!0):e.set(h+v,d+S,!1,!0))}}i(MU,"setupFinderPattern");function OU(e){let t=e.size;for(let n=8;n>v&1)===1,e.set(l,h,d,!0),e.set(h,l,d,!0)}i(DU,"setupVersionInfo");function iE(e,t,n){let s=e.size,l=PU.getEncodedBits(t,n),h,d;for(h=0;h<15;h++)d=(l>>h&1)===1,h<6?e.set(h,8,d,!0):h<8?e.set(h+1,8,d,!0):e.set(s-15+h,8,d,!0),h<8?e.set(8,s-h-1,d,!0):h<9?e.set(8,15-h-1+1,d,!0):e.set(8,15-h-1,d,!0);e.set(s-8,8,1,!0)}i(iE,"setupFormatInfo");function IU(e,t){let n=e.size,s=-1,l=n-1,h=7,d=0;for(let v=n-1;v>0;v-=2)for(v===6&&v--;;){for(let S=0;S<2;S++)if(!e.isReserved(l,v-S)){let b=!1;d>>h&1)===1),e.set(l,v-S,b),h--,h===-1&&(d++,h=7)}if(l+=s,l<0||n<=l){l-=s,s=-s;break}}}i(IU,"setupData");function FU(e,t,n){let s=new bU;n.forEach(function(S){s.put(S.mode.bit,4),s.put(S.getLength(),LU.getCharCountIndicator(S.mode,e)),S.write(s)});let l=Z0.getSymbolTotalCodewords(e),h=sE.getTotalCodewordsCount(e,t),d=(l-h)*8;for(s.getLengthInBits()+4<=d&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);let v=(d-s.getLengthInBits())/8;for(let S=0;S=7&&Fz(S,t),Bz(S,p),isNaN(s)&&(s=nC.getBestMask(S,rC.bind(null,S,n))),nC.applyMask(s,S),rC(S,n,s),{modules:S,version:t,errorCorrectionLevel:n,maskPattern:s,segments:c}}i(Wz,"createSymbol");sL.create=i(function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=eC.M,c,h;return typeof n<"u"&&(s=eC.from(n.errorCorrectionLevel,eC.M),c=b0.from(n.version),h=nC.from(n.maskPattern),n.toSJISFunc&&T0.setToSJISFunction(n.toSJISFunc)),Wz(t,c,s,h)},"create")});var oC=rt(bf=>{function aL(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(s){return[s,s]}))),t.length===6&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+t.slice(0,6).join("")}}i(aL,"hex2rgba");bf.getOptions=i(function(t){t||(t={}),t.color||(t.color={});let n=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,s=t.width&&t.width>=21?t.width:void 0,c=t.scale||4;return{width:s,scale:s?4:c,margin:n,color:{dark:aL(t.color.dark||"#000000ff"),light:aL(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},"getOptions");bf.getScale=i(function(t,n){return n.width&&n.width>=t+n.margin*2?n.width/(t+n.margin*2):n.scale},"getScale");bf.getImageWidth=i(function(t,n){let s=bf.getScale(t,n);return Math.floor((t+n.margin*2)*s)},"getImageWidth");bf.qrToImageData=i(function(t,n,s){let c=n.modules.size,h=n.modules.data,p=bf.getScale(c,s),v=Math.floor((c+s.margin*2)*p),S=s.margin*p,b=[s.color.light,s.color.dark];for(let k=0;k=S&&D>=S&&k{var sC=oC();function Uz(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}i(Uz,"clearCanvas");function $z(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}i($z,"getCanvasElement");k0.render=i(function(t,n,s){let c=s,h=n;typeof c>"u"&&(!n||!n.getContext)&&(c=n,n=void 0),n||(h=$z()),c=sC.getOptions(c);let p=sC.getImageWidth(t.modules.size,c),v=h.getContext("2d"),S=v.createImageData(p,p);return sC.qrToImageData(S.data,t,c),Uz(v,h,p),v.putImageData(S,0,0),h},"render");k0.renderToDataURL=i(function(t,n,s){let c=s;typeof c>"u"&&(!n||!n.getContext)&&(c=n,n=void 0),c||(c={});let h=k0.render(t,n,c),p=c.type||"image/png",v=c.rendererOpts||{};return h.toDataURL(p,v.quality)},"renderToDataURL")});var pL=rt(fL=>{var Vz=oC();function cL(e,t){let n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}i(cL,"getColorAttrib");function lC(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}i(lC,"svgCmd");function qz(e,t,n){let s="",c=0,h=!1,p=0;for(let v=0;v0&&S>0&&e[v-1]||(s+=h?lC("M",S+n,.5+b+n):lC("m",c,0),c=0,h=!1),S+1':"",b="',k='viewBox="0 0 '+v+" "+v+'"',M=''+S+b+` -`;return typeof s=="function"&&s(null,M),M},"render")});var hL=rt(jg=>{var jz=hM(),aC=lL(),dL=uL(),Gz=pL();function uC(e,t,n,s,c){let h=[].slice.call(arguments,1),p=h.length,v=typeof h[p-1]=="function";if(!v&&!jz())throw new Error("Callback required as last argument");if(v){if(p<2)throw new Error("Too few arguments provided");p===2?(c=n,n=t,t=s=void 0):p===3&&(t.getContext&&typeof c>"u"?(c=s,s=void 0):(c=s,s=n,n=t,t=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(n=t,t=s=void 0):p===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(S,b){try{let k=aC.create(n,s);S(e(k,t,s))}catch(k){b(k)}})}try{let S=aC.create(n,s);c(null,e(S,t,s))}catch(S){c(S)}}i(uC,"renderCanvas");jg.create=aC.create;jg.toCanvas=uC.bind(null,dL.render);jg.toDataURL=uC.bind(null,dL.renderToDataURL);jg.toString=uC.bind(null,function(e,t,n){return Gz.render(e,n)})});var bL=rt((lX,EL)=>{"use strict";var sW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";EL.exports=sW});var OL=rt((aX,NL)=>{"use strict";var lW=bL();function TL(){}i(TL,"emptyFunction");function kL(){}i(kL,"emptyFunctionWithReset");kL.resetWarningCache=TL;NL.exports=function(){function e(s,c,h,p,v,S){if(S!==lW){var b=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 b.name="Invariant Violation",b}}i(e,"shim"),e.isRequired=e;function t(){return e}i(t,"getShim");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:kL,resetWarningCache:TL};return n.PropTypes=n,n}});var ML=rt((pX,AL)=>{AL.exports=OL()();var cX,fX});var FC=he(Ne()),zL=he(Kk());var lN=he(Ne(),1),aN=he(Jk(),1),vy=he(Ne(),1);var _t="default"in vy?vy.default:vy,Zk=Symbol.for("react-redux-context"),eN=typeof globalThis<"u"?globalThis:{};function g3(){if(!_t.createContext)return{};let e=eN[Zk]??(eN[Zk]=new Map),t=e.get(_t.createContext);return t||(t=_t.createContext(null),e.set(_t.createContext,t)),t}i(g3,"getContext");var Jl=g3(),uN=i(()=>{throw new Error("uSES not initialized!")},"notInitialized");function YS(e=Jl){return i(function(){return _t.useContext(e)},"useReduxContext2")}i(YS,"createReduxContextHook");var cN=YS(),fN=uN,m3=i(e=>{fN=e},"initializeUseSelector"),v3=i((e,t)=>e===t,"refEquality");function y3(e=Jl){let t=e===Jl?cN:YS(e),n=i((s,c={})=>{let{equalityFn:h=v3,devModeChecks:p={}}=typeof c=="function"?{equalityFn:c}:c,{store:v,subscription:S,getServerState:b,stabilityCheck:k,identityFunctionCheck:D}=t(),M=_t.useRef(!0),z=_t.useCallback({[s.name](Q){let ie=s(Q);if(0){if((L==="always"||L==="once"&&M.current)&&!h(ie,B))try{}catch(re){}if((I==="always"||I==="once"&&M.current)&&ie===Q)try{}catch(G){}}return ie}}[s.name],[s,k,p.stabilityCheck]),q=fN(S.addNestedSub,v.getState,b||v.getState,z,h);return _t.useDebugValue(q),q},"useSelector2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(y3,"createSelectorHook");var pN=y3(),w3=Symbol.for("react.element"),S3=Symbol.for("react.portal"),x3=Symbol.for("react.fragment"),_3=Symbol.for("react.strict_mode"),C3=Symbol.for("react.profiler"),E3=Symbol.for("react.provider"),b3=Symbol.for("react.context"),T3=Symbol.for("react.server_context"),dN=Symbol.for("react.forward_ref"),k3=Symbol.for("react.suspense"),N3=Symbol.for("react.suspense_list"),XS=Symbol.for("react.memo"),O3=Symbol.for("react.lazy"),BW=Symbol.for("react.offscreen"),HW=Symbol.for("react.client.reference"),A3=dN,M3=XS;function L3(e){if(typeof e=="object"&&e!==null){let t=e.$$typeof;switch(t){case w3:{let n=e.type;switch(n){case x3:case C3:case _3:case k3:case N3:return n;default:{let s=n&&n.$$typeof;switch(s){case T3:case b3:case dN:case O3:case XS:case E3:return s;default:return t}}}}case S3:return t}}}i(L3,"typeOf");function P3(e){return L3(e)===XS}i(P3,"isMemo");function R3(e,t,n,s,{areStatesEqual:c,areOwnPropsEqual:h,areStatePropsEqual:p}){let v=!1,S,b,k,D,M;function z(L,B){return S=L,b=B,k=e(S,b),D=t(s,b),M=n(k,D,b),v=!0,M}i(z,"handleFirstCall");function q(){return k=e(S,b),t.dependsOnOwnProps&&(D=t(s,b)),M=n(k,D,b),M}i(q,"handleNewPropsAndNewState");function Q(){return e.dependsOnOwnProps&&(k=e(S,b)),t.dependsOnOwnProps&&(D=t(s,b)),M=n(k,D,b),M}i(Q,"handleNewProps");function ie(){let L=e(S,b),B=!p(L,k);return k=L,B&&(M=n(k,D,b)),M}i(ie,"handleNewState");function I(L,B){let G=!h(B,b),re=!c(L,S,B,b);return S=L,b=B,G&&re?q():G?Q():re?ie():M}return i(I,"handleSubsequentCalls"),i(function(B,G){return v?I(B,G):z(B,G)},"pureFinalPropsSelector")}i(R3,"pureFinalPropsSelectorFactory");function D3(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:s,...c}){let h=t(e,c),p=n(e,c),v=s(e,c);return R3(h,p,v,e,c)}i(D3,"finalPropsSelectorFactory");function I3(e,t){let n={};for(let s in e){let c=e[s];typeof c=="function"&&(n[s]=(...h)=>t(c(...h)))}return n}i(I3,"bindActionCreators");function GS(e){return i(function(n){let s=e(n);function c(){return s}return i(c,"constantSelector"),c.dependsOnOwnProps=!1,c},"initConstantSelector")}i(GS,"wrapMapToPropsConstant");function tN(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}i(tN,"getDependsOnOwnProps");function hN(e,t){return i(function(s,{displayName:c}){let h=i(function(v,S){return h.dependsOnOwnProps?h.mapToProps(v,S):h.mapToProps(v,void 0)},"mapToPropsProxy");return h.dependsOnOwnProps=!0,h.mapToProps=i(function(v,S){h.mapToProps=e,h.dependsOnOwnProps=tN(e);let b=h(v,S);return typeof b=="function"&&(h.mapToProps=b,h.dependsOnOwnProps=tN(b),b=h(v,S)),b},"detectFactoryAndVerify"),h},"initProxySelector")}i(hN,"wrapMapToPropsFunc");function QS(e,t){return(n,s)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${s.wrappedComponentName}.`)}}i(QS,"createInvalidArgFactory");function F3(e){return e&&typeof e=="object"?GS(t=>I3(e,t)):e?typeof e=="function"?hN(e,"mapDispatchToProps"):QS(e,"mapDispatchToProps"):GS(t=>({dispatch:t}))}i(F3,"mapDispatchToPropsFactory");function B3(e){return e?typeof e=="function"?hN(e,"mapStateToProps"):QS(e,"mapStateToProps"):GS(()=>({}))}i(B3,"mapStateToPropsFactory");function H3(e,t,n){return{...n,...e,...t}}i(H3,"defaultMergeProps");function z3(e){return i(function(n,{displayName:s,areMergedPropsEqual:c}){let h=!1,p;return i(function(S,b,k){let D=e(S,b,k);return h?c(D,p)||(p=D):(h=!0,p=D),p},"mergePropsProxy")},"initMergePropsProxy")}i(z3,"wrapMergePropsFunc");function W3(e){return e?typeof e=="function"?z3(e):QS(e,"mergeProps"):()=>H3}i(W3,"mergePropsFactory");function U3(e){e()}i(U3,"defaultNoopBatch");function $3(){let e=null,t=null;return{clear(){e=null,t=null},notify(){U3(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],s=e;for(;s;)n.push(s),s=s.next;return n},subscribe(n){let s=!0,c=t={callback:n,next:null,prev:t};return c.prev?c.prev.next=c:e=c,i(function(){!s||e===null||(s=!1,c.next?c.next.prev=c.prev:t=c.prev,c.prev?c.prev.next=c.next:e=c.next)},"unsubscribe")}}}i($3,"createListenerCollection");var rN={notify(){},get:i(()=>[],"get")};function gN(e,t){let n,s=rN,c=0,h=!1;function p(Q){k();let ie=s.subscribe(Q),I=!1;return()=>{I||(I=!0,ie(),D())}}i(p,"addNestedSub");function v(){s.notify()}i(v,"notifyNestedSubs");function S(){q.onStateChange&&q.onStateChange()}i(S,"handleChangeWrapper");function b(){return h}i(b,"isSubscribed");function k(){c++,n||(n=t?t.addNestedSub(S):e.subscribe(S),s=$3())}i(k,"trySubscribe");function D(){c--,n&&c===0&&(n(),n=void 0,s.clear(),s=rN)}i(D,"tryUnsubscribe");function M(){h||(h=!0,k())}i(M,"trySubscribeSelf");function z(){h&&(h=!1,D())}i(z,"tryUnsubscribeSelf");let q={addNestedSub:p,notifyNestedSubs:v,handleChangeWrapper:S,isSubscribed:b,trySubscribe:M,tryUnsubscribe:z,getListeners:i(()=>s,"getListeners")};return q}i(gN,"createSubscription");var V3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q3=typeof navigator<"u"&&navigator.product==="ReactNative",yy=V3||q3?_t.useLayoutEffect:_t.useEffect;function nN(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}i(nN,"is");function vs(e,t){if(nN(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let c=0;c{vN=e},"initializeConnect"),t4=[null,null];function r4(e,t,n){yy(()=>e(...t),n)}i(r4,"useIsomorphicLayoutEffectWithArgs");function n4(e,t,n,s,c,h){e.current=s,n.current=!1,c.current&&(c.current=null,h())}i(n4,"captureWrapperProps");function i4(e,t,n,s,c,h,p,v,S,b,k){if(!e)return()=>{};let D=!1,M=null,z=i(()=>{if(D||!v.current)return;let Q=t.getState(),ie,I;try{ie=s(Q,c.current)}catch(L){I=L,M=L}I||(M=null),ie===h.current?p.current||b():(h.current=ie,S.current=ie,p.current=!0,k())},"checkForUpdates");return n.onStateChange=z,n.trySubscribe(),z(),i(()=>{if(D=!0,n.tryUnsubscribe(),n.onStateChange=null,M)throw M},"unsubscribeWrapper")}i(i4,"subscribeUpdates");function o4(e,t){return e===t}i(o4,"strictEqual");function s4(e,t,n,{pure:s,areStatesEqual:c=o4,areOwnPropsEqual:h=vs,areStatePropsEqual:p=vs,areMergedPropsEqual:v=vs,forwardRef:S=!1,context:b=Jl}={}){let k=b,D=B3(e),M=F3(t),z=W3(n),q=!!e;return i(ie=>{let I=ie.displayName||ie.name||"Component",L=`Connect(${I})`,B={shouldHandleStateChanges:q,displayName:L,wrappedComponentName:I,WrappedComponent:ie,initMapStateToProps:D,initMapDispatchToProps:M,initMergeProps:z,areStatesEqual:c,areStatePropsEqual:p,areOwnPropsEqual:h,areMergedPropsEqual:v};function G(oe){let[de,Re,Ce]=_t.useMemo(()=>{let{reactReduxForwardedRef:st,...Fe}=oe;return[oe.context,st,Fe]},[oe]),Ye=_t.useMemo(()=>{let st=k;return de?.Consumer,st},[de,k]),tt=_t.useContext(Ye),Se=!!oe.store&&!!oe.store.getState&&!!oe.store.dispatch,Xe=!!tt&&!!tt.store,qe=Se?oe.store:tt.store,Qe=Xe?tt.getServerState:qe.getState,ot=_t.useMemo(()=>D3(qe.dispatch,B),[qe]),[Pt,Tt]=_t.useMemo(()=>{if(!q)return t4;let st=gN(qe,Se?void 0:tt.subscription),Fe=st.notifyNestedSubs.bind(st);return[st,Fe]},[qe,Se,tt]),rn=_t.useMemo(()=>Se?tt:{...tt,subscription:Pt},[Se,tt,Pt]),nn=_t.useRef(void 0),dr=_t.useRef(Ce),Ht=_t.useRef(void 0),hr=_t.useRef(!1),gr=_t.useRef(!1),qt=_t.useRef(void 0);yy(()=>(gr.current=!0,()=>{gr.current=!1}),[]);let Rt=_t.useMemo(()=>i(()=>Ht.current&&Ce===dr.current?Ht.current:ot(qe.getState(),Ce),"selector"),[qe,Ce]),se=_t.useMemo(()=>i(Fe=>Pt?i4(q,qe,Pt,ot,dr,nn,hr,gr,Ht,Tt,Fe):()=>{},"subscribe"),[Pt]);r4(n4,[dr,nn,hr,Ce,Ht,Tt]);let ze;try{ze=vN(se,Rt,Qe?()=>ot(Qe(),Ce):Rt)}catch(st){throw qt.current&&(st.message+=` +`);let d=FU(t,n,l),v=Z0.getSymbolSize(t),S=new TU(v);return MU(S,t),OU(S),RU(S,t),iE(S,n,0),t>=7&&DU(S,t),IU(S,d),isNaN(s)&&(s=oE.getBestMask(S,iE.bind(null,S,n))),oE.applyMask(s,S),iE(S,n,s),{modules:S,version:t,errorCorrectionLevel:n,maskPattern:s,segments:l}}i(HU,"createSymbol");QM.create=i(function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let s=rE.M,l,h;return typeof n<"u"&&(s=rE.from(n.errorCorrectionLevel,rE.M),l=J0.from(n.version),h=oE.from(n.maskPattern),n.toSJISFunc&&Z0.setToSJISFunction(n.toSJISFunc)),HU(t,l,s,h)},"create")});var aE=rt(zf=>{function ZM(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(s){return[s,s]}))),t.length===6&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+t.slice(0,6).join("")}}i(ZM,"hex2rgba");zf.getOptions=i(function(t){t||(t={}),t.color||(t.color={});let n=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,s=t.width&&t.width>=21?t.width:void 0,l=t.scale||4;return{width:s,scale:s?4:l,margin:n,color:{dark:ZM(t.color.dark||"#000000ff"),light:ZM(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},"getOptions");zf.getScale=i(function(t,n){return n.width&&n.width>=t+n.margin*2?n.width/(t+n.margin*2):n.scale},"getScale");zf.getImageWidth=i(function(t,n){let s=zf.getScale(t,n);return Math.floor((t+n.margin*2)*s)},"getImageWidth");zf.qrToImageData=i(function(t,n,s){let l=n.modules.size,h=n.modules.data,d=zf.getScale(l,s),v=Math.floor((l+s.margin*2)*d),S=s.margin*d,b=[s.color.light,s.color.dark];for(let k=0;k=S&&R>=S&&k{var lE=aE();function zU(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}i(zU,"clearCanvas");function UU(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}i(UU,"getCanvasElement");ew.render=i(function(t,n,s){let l=s,h=n;typeof l>"u"&&(!n||!n.getContext)&&(l=n,n=void 0),n||(h=UU()),l=lE.getOptions(l);let d=lE.getImageWidth(t.modules.size,l),v=h.getContext("2d"),S=v.createImageData(d,d);return lE.qrToImageData(S.data,t,l),zU(v,h,d),v.putImageData(S,0,0),h},"render");ew.renderToDataURL=i(function(t,n,s){let l=s;typeof l>"u"&&(!n||!n.getContext)&&(l=n,n=void 0),l||(l={});let h=ew.render(t,n,l),d=l.type||"image/png",v=l.rendererOpts||{};return h.toDataURL(d,v.quality)},"renderToDataURL")});var nO=rt(rO=>{var WU=aE();function tO(e,t){let n=e.a/255,s=t+'="'+e.hex+'"';return n<1?s+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':s}i(tO,"getColorAttrib");function uE(e,t,n){let s=e+t;return typeof n<"u"&&(s+=" "+n),s}i(uE,"svgCmd");function $U(e,t,n){let s="",l=0,h=!1,d=0;for(let v=0;v0&&S>0&&e[v-1]||(s+=h?uE("M",S+n,.5+b+n):uE("m",l,0),l=0,h=!1),S+1':"",b="',k='viewBox="0 0 '+v+" "+v+'"',I=''+S+b+` +`;return typeof s=="function"&&s(null,I),I},"render")});var oO=rt(lg=>{var VU=oM(),cE=JM(),iO=eO(),qU=nO();function fE(e,t,n,s,l){let h=[].slice.call(arguments,1),d=h.length,v=typeof h[d-1]=="function";if(!v&&!VU())throw new Error("Callback required as last argument");if(v){if(d<2)throw new Error("Too few arguments provided");d===2?(l=n,n=t,t=s=void 0):d===3&&(t.getContext&&typeof l>"u"?(l=s,s=void 0):(l=s,s=n,n=t,t=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(n=t,t=s=void 0):d===2&&!t.getContext&&(s=n,n=t,t=void 0),new Promise(function(S,b){try{let k=cE.create(n,s);S(e(k,t,s))}catch(k){b(k)}})}try{let S=cE.create(n,s);l(null,e(S,t,s))}catch(S){l(S)}}i(fE,"renderCanvas");lg.create=cE.create;lg.toCanvas=fE.bind(null,iO.render);lg.toDataURL=fE.bind(null,iO.renderToDataURL);lg.toString=fE.bind(null,function(e,t,n){return qU.render(e,n)})});var gO=rt((Cee,mO)=>{"use strict";var dW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";mO.exports=dW});var SO=rt((_ee,wO)=>{"use strict";var pW=gO();function vO(){}i(vO,"emptyFunction");function yO(){}i(yO,"emptyFunctionWithReset");yO.resetWarningCache=vO;wO.exports=function(){function e(s,l,h,d,v,S){if(S!==pW){var b=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 b.name="Invariant Violation",b}}i(e,"shim"),e.isRequired=e;function t(){return e}i(t,"getShim");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:yO,resetWarningCache:vO};return n.PropTypes=n,n}});var CO=rt((kee,xO)=>{xO.exports=SO()();var bee,Tee});var $E=pe(Te()),LO=pe(eA());var pA=pe(Te(),1),hA=pe(iA(),1),Oy=pe(Te(),1);var Tt="default"in Oy?Oy.default:Oy,oA=Symbol.for("react-redux-context"),sA=typeof globalThis<"u"?globalThis:{};function s4(){if(!Tt.createContext)return{};let e=sA[oA]??(sA[oA]=new Map),t=e.get(Tt.createContext);return t||(t=Tt.createContext(null),e.set(Tt.createContext,t)),t}i(s4,"getContext");var gl=s4(),mA=i(()=>{throw new Error("uSES not initialized!")},"notInitialized");function Cx(e=gl){return i(function(){return Tt.useContext(e)},"useReduxContext2")}i(Cx,"createReduxContextHook");var gA=Cx(),vA=mA,a4=i(e=>{vA=e},"initializeUseSelector"),l4=i((e,t)=>e===t,"refEquality");function u4(e=gl){let t=e===gl?gA:Cx(e),n=i((s,l={})=>{let{equalityFn:h=l4,devModeChecks:d={}}=typeof l=="function"?{equalityFn:l}:l,{store:v,subscription:S,getServerState:b,stabilityCheck:k,identityFunctionCheck:R}=t(),I=Tt.useRef(!0),z=Tt.useCallback({[s.name](Q){let ne=s(Q);if(0){if((L==="always"||L==="once"&&I.current)&&!h(ne,B))try{}catch(re){}if((D==="always"||D==="once"&&I.current)&&ne===Q)try{}catch(j){}}return ne}}[s.name],[s,k,d.stabilityCheck]),q=vA(S.addNestedSub,v.getState,b||v.getState,z,h);return Tt.useDebugValue(q),q},"useSelector2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(u4,"createSelectorHook");var yA=u4(),c4=Symbol.for("react.element"),f4=Symbol.for("react.portal"),d4=Symbol.for("react.fragment"),p4=Symbol.for("react.strict_mode"),h4=Symbol.for("react.profiler"),m4=Symbol.for("react.provider"),g4=Symbol.for("react.context"),v4=Symbol.for("react.server_context"),wA=Symbol.for("react.forward_ref"),y4=Symbol.for("react.suspense"),w4=Symbol.for("react.suspense_list"),_x=Symbol.for("react.memo"),S4=Symbol.for("react.lazy"),VW=Symbol.for("react.offscreen"),qW=Symbol.for("react.client.reference"),x4=wA,C4=_x;function _4(e){if(typeof e=="object"&&e!==null){let t=e.$$typeof;switch(t){case c4:{let n=e.type;switch(n){case d4:case h4:case p4:case y4:case w4:return n;default:{let s=n&&n.$$typeof;switch(s){case v4:case g4:case wA:case S4:case _x:case m4:return s;default:return t}}}}case f4:return t}}}i(_4,"typeOf");function E4(e){return _4(e)===_x}i(E4,"isMemo");function b4(e,t,n,s,{areStatesEqual:l,areOwnPropsEqual:h,areStatePropsEqual:d}){let v=!1,S,b,k,R,I;function z(L,B){return S=L,b=B,k=e(S,b),R=t(s,b),I=n(k,R,b),v=!0,I}i(z,"handleFirstCall");function q(){return k=e(S,b),t.dependsOnOwnProps&&(R=t(s,b)),I=n(k,R,b),I}i(q,"handleNewPropsAndNewState");function Q(){return e.dependsOnOwnProps&&(k=e(S,b)),t.dependsOnOwnProps&&(R=t(s,b)),I=n(k,R,b),I}i(Q,"handleNewProps");function ne(){let L=e(S,b),B=!d(L,k);return k=L,B&&(I=n(k,R,b)),I}i(ne,"handleNewState");function D(L,B){let j=!h(B,b),re=!l(L,S,B,b);return S=L,b=B,j&&re?q():j?Q():re?ne():I}return i(D,"handleSubsequentCalls"),i(function(B,j){return v?D(B,j):z(B,j)},"pureFinalPropsSelector")}i(b4,"pureFinalPropsSelectorFactory");function T4(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:s,...l}){let h=t(e,l),d=n(e,l),v=s(e,l);return b4(h,d,v,e,l)}i(T4,"finalPropsSelectorFactory");function k4(e,t){let n={};for(let s in e){let l=e[s];typeof l=="function"&&(n[s]=(...h)=>t(l(...h)))}return n}i(k4,"bindActionCreators");function Sx(e){return i(function(n){let s=e(n);function l(){return s}return i(l,"constantSelector"),l.dependsOnOwnProps=!1,l},"initConstantSelector")}i(Sx,"wrapMapToPropsConstant");function aA(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}i(aA,"getDependsOnOwnProps");function SA(e,t){return i(function(s,{displayName:l}){let h=i(function(v,S){return h.dependsOnOwnProps?h.mapToProps(v,S):h.mapToProps(v,void 0)},"mapToPropsProxy");return h.dependsOnOwnProps=!0,h.mapToProps=i(function(v,S){h.mapToProps=e,h.dependsOnOwnProps=aA(e);let b=h(v,S);return typeof b=="function"&&(h.mapToProps=b,h.dependsOnOwnProps=aA(b),b=h(v,S)),b},"detectFactoryAndVerify"),h},"initProxySelector")}i(SA,"wrapMapToPropsFunc");function Ex(e,t){return(n,s)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${s.wrappedComponentName}.`)}}i(Ex,"createInvalidArgFactory");function N4(e){return e&&typeof e=="object"?Sx(t=>k4(e,t)):e?typeof e=="function"?SA(e,"mapDispatchToProps"):Ex(e,"mapDispatchToProps"):Sx(t=>({dispatch:t}))}i(N4,"mapDispatchToPropsFactory");function A4(e){return e?typeof e=="function"?SA(e,"mapStateToProps"):Ex(e,"mapStateToProps"):Sx(()=>({}))}i(A4,"mapStateToPropsFactory");function P4(e,t,n){return{...n,...e,...t}}i(P4,"defaultMergeProps");function L4(e){return i(function(n,{displayName:s,areMergedPropsEqual:l}){let h=!1,d;return i(function(S,b,k){let R=e(S,b,k);return h?l(R,d)||(d=R):(h=!0,d=R),d},"mergePropsProxy")},"initMergePropsProxy")}i(L4,"wrapMergePropsFunc");function M4(e){return e?typeof e=="function"?L4(e):Ex(e,"mergeProps"):()=>P4}i(M4,"mergePropsFactory");function O4(e){e()}i(O4,"defaultNoopBatch");function R4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){O4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],s=e;for(;s;)n.push(s),s=s.next;return n},subscribe(n){let s=!0,l=t={callback:n,next:null,prev:t};return l.prev?l.prev.next=l:e=l,i(function(){!s||e===null||(s=!1,l.next?l.next.prev=l.prev:t=l.prev,l.prev?l.prev.next=l.next:e=l.next)},"unsubscribe")}}}i(R4,"createListenerCollection");var lA={notify(){},get:i(()=>[],"get")};function xA(e,t){let n,s=lA,l=0,h=!1;function d(Q){k();let ne=s.subscribe(Q),D=!1;return()=>{D||(D=!0,ne(),R())}}i(d,"addNestedSub");function v(){s.notify()}i(v,"notifyNestedSubs");function S(){q.onStateChange&&q.onStateChange()}i(S,"handleChangeWrapper");function b(){return h}i(b,"isSubscribed");function k(){l++,n||(n=t?t.addNestedSub(S):e.subscribe(S),s=R4())}i(k,"trySubscribe");function R(){l--,n&&l===0&&(n(),n=void 0,s.clear(),s=lA)}i(R,"tryUnsubscribe");function I(){h||(h=!0,k())}i(I,"trySubscribeSelf");function z(){h&&(h=!1,R())}i(z,"tryUnsubscribeSelf");let q={addNestedSub:d,notifyNestedSubs:v,handleChangeWrapper:S,isSubscribed:b,trySubscribe:I,tryUnsubscribe:z,getListeners:i(()=>s,"getListeners")};return q}i(xA,"createSubscription");var D4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",I4=typeof navigator<"u"&&navigator.product==="ReactNative",Ry=D4||I4?Tt.useLayoutEffect:Tt.useEffect;function uA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}i(uA,"is");function Mo(e,t){if(uA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let l=0;l{_A=e},"initializeConnect"),j4=[null,null];function K4(e,t,n){Ry(()=>e(...t),n)}i(K4,"useIsomorphicLayoutEffectWithArgs");function G4(e,t,n,s,l,h){e.current=s,n.current=!1,l.current&&(l.current=null,h())}i(G4,"captureWrapperProps");function Y4(e,t,n,s,l,h,d,v,S,b,k){if(!e)return()=>{};let R=!1,I=null,z=i(()=>{if(R||!v.current)return;let Q=t.getState(),ne,D;try{ne=s(Q,l.current)}catch(L){D=L,I=L}D||(I=null),ne===h.current?d.current||b():(h.current=ne,S.current=ne,d.current=!0,k())},"checkForUpdates");return n.onStateChange=z,n.trySubscribe(),z(),i(()=>{if(R=!0,n.tryUnsubscribe(),n.onStateChange=null,I)throw I},"unsubscribeWrapper")}i(Y4,"subscribeUpdates");function X4(e,t){return e===t}i(X4,"strictEqual");function Q4(e,t,n,{pure:s,areStatesEqual:l=X4,areOwnPropsEqual:h=Mo,areStatePropsEqual:d=Mo,areMergedPropsEqual:v=Mo,forwardRef:S=!1,context:b=gl}={}){let k=b,R=A4(e),I=N4(t),z=M4(n),q=!!e;return i(ne=>{let D=ne.displayName||ne.name||"Component",L=`Connect(${D})`,B={shouldHandleStateChanges:q,displayName:L,wrappedComponentName:D,WrappedComponent:ne,initMapStateToProps:R,initMapDispatchToProps:I,initMergeProps:z,areStatesEqual:l,areStatePropsEqual:d,areOwnPropsEqual:h,areMergedPropsEqual:v};function j(oe){let[he,Re,Ee]=Tt.useMemo(()=>{let{reactReduxForwardedRef:st,...Fe}=oe;return[oe.context,st,Fe]},[oe]),Ye=Tt.useMemo(()=>{let st=k;return he?.Consumer,st},[he,k]),tt=Tt.useContext(Ye),xe=!!oe.store&&!!oe.store.getState&&!!oe.store.dispatch,Xe=!!tt&&!!tt.store,je=xe?oe.store:tt.store,Qe=Xe?tt.getServerState:je.getState,ot=Tt.useMemo(()=>T4(je.dispatch,B),[je]),[It,At]=Tt.useMemo(()=>{if(!q)return j4;let st=xA(je,xe?void 0:tt.subscription),Fe=st.notifyNestedSubs.bind(st);return[st,Fe]},[je,xe,tt]),cn=Tt.useMemo(()=>xe?tt:{...tt,subscription:It},[xe,tt,It]),fn=Tt.useRef(void 0),gr=Tt.useRef(Ee),Wt=Tt.useRef(void 0),vr=Tt.useRef(!1),yr=Tt.useRef(!1),Gt=Tt.useRef(void 0);Ry(()=>(yr.current=!0,()=>{yr.current=!1}),[]);let Ft=Tt.useMemo(()=>i(()=>Wt.current&&Ee===gr.current?Wt.current:ot(je.getState(),Ee),"selector"),[je,Ee]),se=Tt.useMemo(()=>i(Fe=>It?Y4(q,je,It,ot,gr,fn,vr,yr,Wt,At,Fe):()=>{},"subscribe"),[It]);K4(G4,[gr,fn,vr,Ee,Wt,At]);let Ue;try{Ue=_A(se,Ft,Qe?()=>ot(Qe(),Ee):Ft)}catch(st){throw Gt.current&&(st.message+=` The error may be correlated with this previous error: -${qt.current.stack} +${Gt.current.stack} -`),st}yy(()=>{qt.current=void 0,Ht.current=void 0,nn.current=ze});let $r=_t.useMemo(()=>_t.createElement(ie,{...ze,ref:Re}),[Re,ie,ze]);return _t.useMemo(()=>q?_t.createElement(Ye.Provider,{value:rn},$r):$r,[Ye,$r,rn])}i(G,"ConnectFunction");let Z=_t.memo(G);if(Z.WrappedComponent=ie,Z.displayName=G.displayName=L,S){let de=_t.forwardRef(i(function(Ce,Ye){return _t.createElement(Z,{...Ce,reactReduxForwardedRef:Ye})},"forwardConnectRef"));return de.displayName=L,de.WrappedComponent=ie,KS(de,ie)}return KS(Z,ie)},"wrapWithConnect")}i(s4,"connect");var ku=s4;function l4({store:e,context:t,children:n,serverState:s,stabilityCheck:c="once",identityFunctionCheck:h="once"}){let p=_t.useMemo(()=>{let b=gN(e);return{store:e,subscription:b,getServerState:s?()=>s:void 0,stabilityCheck:c,identityFunctionCheck:h}},[e,s,c,h]),v=_t.useMemo(()=>e.getState(),[e]);yy(()=>{let{subscription:b}=p;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),v!==e.getState()&&b.notifyNestedSubs(),()=>{b.tryUnsubscribe(),b.onStateChange=void 0}},[p,v]);let S=t||Jl;return _t.createElement(S.Provider,{value:p},n)}i(l4,"Provider");var yN=l4;function wN(e=Jl){let t=e===Jl?cN:YS(e),n=i(()=>{let{store:s}=t();return s},"useStore2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(wN,"createStoreHook");var a4=wN();function u4(e=Jl){let t=e===Jl?a4:wN(e),n=i(()=>t().dispatch,"useDispatch2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(u4,"createDispatchHook");var SN=u4();m3(aN.useSyncExternalStoreWithSelector);e4(lN.useSyncExternalStore);var Vn=he(Ne());var xN="UI_FLOWVIEW_SET_TAB",_N="SET_CONTENT_VIEW_FOR",c4={tab:"request",contentViewFor:{}};function JS(e=c4,t){switch(t.type){case _N:return{...e,contentViewFor:{...e.contentViewFor,[t.messageId]:t.contentView}};case xN:return{...e,tab:t.tab?t.tab:"request"};default:return e}}i(JS,"reducer");function ef(e){return{type:xN,tab:e}}i(ef,"selectTab");function wy(e,t){return{type:_N,messageId:e,contentView:t}}i(wy,"setContentViewFor");var f4=he(cg()),p4=he(Ne());window.React=p4;var Sy=i(function(e){if(e===0)return"0";let t=["b","kb","mb","gb","tb"],n=0;for(;ne);n++);let s;return e%Math.pow(1024,n)===0?s=0:s=1,(e/Math.pow(1024,n)).toFixed(s)+t[n]},"formatSize"),xy=i(function(e){let t=e,n=["ms","s","min","h"],s=[1e3,60,60],c=0;for(;Math.abs(t)>=s[c]&&cbt(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});bt.post=(e,t,n={})=>bt(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});async function tf(e,...t){return await(await bt(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()}i(tf,"runCommand");async function CN(e){try{await navigator.clipboard.write([new ClipboardItem({"text/plain":e})]);return}catch(s){console.warn(s)}let t=await e;try{await navigator.clipboard.writeText(t);return}catch(s){console.warn(s)}let n=document.createElement("textarea");n.value=t,n.style.position="absolute",n.style.opacity="0",document.body.appendChild(n);try{if(n.focus(),n.select(),!document.execCommand("copy"))throw"failed to copy"}catch{alert(t)}finally{n.remove()}}i(CN,"copyToClipboard");function ex(e,t){let n=e.lastIndexOf(t);if(n===-1)return["",e];let s=e.slice(0,n),c=e.slice(n+t.length);return[s,c]}i(ex,"rpartition");function EN(e,t){let n=e.indexOf(t);if(n===-1)return[e,""];let s=e.slice(0,n),c=e.slice(n+t.length);return[s,c]}i(EN,"partition");var dg={};gE(dg,{ADD:()=>lx,RECEIVE:()=>cx,REMOVE:()=>ux,SET_FILTER:()=>ox,SET_SORT:()=>sx,UPDATE:()=>ax,add:()=>g4,defaultState:()=>Kp,receive:()=>y4,reduce:()=>Nu,remove:()=>v4,setFilter:()=>fg,setSort:()=>fx,update:()=>m4});var ix=he(bN());var ox="LIST_SET_FILTER",sx="LIST_SET_SORT",lx="LIST_ADD",ax="LIST_UPDATE",ux="LIST_REMOVE",cx="LIST_RECEIVE",Kp={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function Nu(e=Kp,t){let{byId:n,list:s,listIndex:c,view:h,viewIndex:p}=e;switch(t.type){case ox:h=(0,ix.default)(s.filter(t.filter),t.sort),p={},h.forEach((v,S)=>{p[v.id]=S});break;case sx:h=(0,ix.default)([...h],t.sort),p={},h.forEach((v,S)=>{p[v.id]=S});break;case lx:if(t.item.id in n)break;n={...n,[t.item.id]:t.item},c={...c,[t.item.id]:s.length},s=[...s,t.item],t.filter(t.item)&&({view:h,viewIndex:p}=TN(e,t.item,t.sort));break;case ax:{n={...n,[t.item.id]:t.item},s=[...s],s[c[t.item.id]]=t.item;let v=t.item.id in p,S=t.filter(t.item);S&&!v?{view:h,viewIndex:p}=TN(e,t.item,t.sort):!S&&v?{data:h,dataIndex:p}=nx(h,p,t.item.id):S&&v&&({view:h,viewIndex:p}=w4(e,t.item,t.sort));break}case ux:if(!(t.id in n))break;n={...n},delete n[t.id],{data:s,dataIndex:c}=nx(s,c,t.id),t.id in p&&({data:h,dataIndex:p}=nx(h,p,t.id));break;case cx:s=t.list,c={},n={},s.forEach((v,S)=>{n[v.id]=v,c[v.id]=S}),h=s.filter(t.filter).sort(t.sort),p={},h.forEach((v,S)=>{p[v.id]=S});break}return{byId:n,list:s,listIndex:c,view:h,viewIndex:p}}i(Nu,"reduce");function fg(e=_y,t=pg){return{type:ox,filter:e,sort:t}}i(fg,"setFilter");function fx(e=pg){return{type:sx,sort:e}}i(fx,"setSort");function g4(e,t=_y,n=pg){return{type:lx,item:e,filter:t,sort:n}}i(g4,"add");function m4(e,t=_y,n=pg){return{type:ax,item:e,filter:t,sort:n}}i(m4,"update");function v4(e){return{type:ux,id:e}}i(v4,"remove");function y4(e,t=_y,n=pg){return{type:cx,list:e,filter:t,sort:n}}i(y4,"receive");function TN(e,t,n){let s=S4(e.view,t,n),c=[...e.view],h={...e.viewIndex};c.splice(s,0,t);for(let p=c.length-1;p>=s;p--)h[c[p].id]=p;return{view:c,viewIndex:h}}i(TN,"sortedInsert");function nx(e,t,n){let s=t[n],c=[...e],h={...t};delete h[n],c.splice(s,1);for(let p=c.length-1;p>=s;p--)h[c[p].id]=p;return{data:c,dataIndex:h}}i(nx,"removeData");function w4(e,t,n){let s=[...e.view],c={...e.viewIndex},h=c[t.id];for(s[h]=t;h+10;)s[h]=s[h+1],s[h+1]=t,c[t.id]=h+1,c[s[h].id]=h,++h;for(;h>0&&n(s[h],s[h-1])<0;)s[h]=s[h-1],s[h-1]=t,c[t.id]=h-1,c[s[h].id]=h,--h;return{view:s,viewIndex:c}}i(w4,"sortedUpdate");function S4(e,t,n){let s=0,c=e.length;for(;s>>1;n(t,e[h])>=0?s=h+1:c=h}return s}i(S4,"sortedIndex");function _y(){return!0}i(_y,"defaultFilter");function pg(e,t){return 0}i(pg,"defaultSort");var kN={http:80,https:443},kn=class e{static{i(this,"MessageUtils")}static getContentType(t){let n=e.get_first_header(t,/^Content-Type$/i);if(n)return n.split(";")[0].trim()}static get_first_header(t,n){let s=t;s._headerLookups||Object.defineProperty(s,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let c=n.toString();if(!(c in s._headerLookups)){let h;for(let p=0;p{switch(e.type){case"http":{let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),e.websocket&&(t+=e.websocket.messages_meta.contentLength||0),t}case"tcp":case"udp":return e.messages_meta.contentLength||0;case"dns":return e.response?.size??0}},"getTotalSize"),Cy=i(e=>e.type==="http"&&!e.websocket,"canReplay"),mx=i(e=>{if(e.type!=="http")return e.client_conn.tls_version==="QUIC"?"resource-icon-quic":`resource-icon-${e.type}`;if(e.websocket)return"resource-icon-websocket";if(!e.response)return"resource-icon-plain";let t=Zl.getContentType(e.response)||"";return e.response.status_code===304?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},"getIcon"),vx=i(e=>{switch(e.type){case"http":return ys.pretty_url(e.request);case"tcp":case"udp":return`${e.client_conn.peername.join(":")} \u2194 ${e.server_conn?.address?.join(":")}`;case"dns":return`${e.request.questions.map(t=>`${t.name} ${t.type}`).join(", ")} = ${(e.response?.answers.map(t=>t.data).join(", ")??"...")||"?"}`}},"mainPath"),yx=i(e=>{switch(e.type){case"http":return e.response?.status_code;case"dns":return e.response?.response_code;default:return}},"statusCode"),wx=i(e=>{switch(e.type){case"http":return e.websocket?e.client_conn.tls_established?"WSS":"WS":e.request.method;case"dns":return e.request.op_code;default:return e.type.toUpperCase()}},"getMethod"),Sx=i(e=>{switch(e.type){case"http":return e.request.http_version;default:return""}},"getVersion"),NN={tls:i(e=>e.type==="http"&&e.request.scheme,"tls"),icon:mx,index:i(()=>0,"index"),path:vx,method:wx,version:Sx,status:yx,size:gx,time:i(e=>{let t=hg(e),n=hx(e);return t&&n&&n-t},"time"),timestamp:hg,quickactions:i(()=>0,"quickactions"),comment:i(e=>e.comment,"comment")};var rf=function(){"use strict";function e(s,c){function h(){this.constructor=s}i(h,"ctor"),h.prototype=c.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,c,h,p){this.message=s,this.expected=c,this.found=h,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var c=arguments.length>1?arguments[1]:{},h=this,p={},v={start:ii},S=ii,b={type:"other",description:"filter expression"},k=i(function(w){return w},"peg$c1"),D={type:"other",description:"whitespace"},M=/^[ \t\n\r]/,z={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},q={type:"other",description:"control character"},Q=/^[|&!()~"]/,ie={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},I={type:"other",description:"optional whitespace"},L="|",B={type:"literal",value:"|",description:'"|"'},G=i(function(w,N){return sc(w,N)},"peg$c11"),re="&",Z={type:"literal",value:"&",description:'"&"'},oe=i(function(w,N){return Bf(w,N)},"peg$c14"),de="!",Re={type:"literal",value:"!",description:'"!"'},Ce=i(function(w){return Ls(w)},"peg$c17"),Ye="(",tt={type:"literal",value:"(",description:'"("'},Se=")",Xe={type:"literal",value:")",description:'")"'},qe=i(function(w){return Ps(w)},"peg$c22"),Qe="~all",ot={type:"literal",value:"~all",description:'"~all"'},Pt=i(function(){return Hf},"peg$c25"),Tt="~a",rn={type:"literal",value:"~a",description:'"~a"'},nn=i(function(){return lc},"peg$c28"),dr="~b",Ht={type:"literal",value:"~b",description:'"~b"'},hr=i(function(w){return _o(w)},"peg$c31"),gr="~bq",qt={type:"literal",value:"~bq",description:'"~bq"'},Rt=i(function(w){return Vt(w)},"peg$c34"),se="~bs",ze={type:"literal",value:"~bs",description:'"~bs"'},$r=i(function(w){return Pd(w)},"peg$c37"),Xt="~c",st={type:"literal",value:"~c",description:'"~c"'},Fe=i(function(w){return ac(w)},"peg$c40"),Mn="~comment",yn={type:"literal",value:"~comment",description:'"~comment"'},Fi=i(function(w){return Rs(w)},"peg$c43"),wo="~d",at={type:"literal",value:"~d",description:'"~d"'},mr=i(function(w){return uc(w)},"peg$c46"),ar="~dns",dt={type:"literal",value:"~dns",description:'"~dns"'},Bi=i(function(){return xl},"peg$c49"),Ln="~dst",mi={type:"literal",value:"~dst",description:'"~dst"'},Vr=i(function(w){return Wf(w)},"peg$c52"),qr="~e",Hi={type:"literal",value:"~e",description:'"~e"'},ti=i(function(){return ka},"peg$c55"),Pn="~h",zi={type:"literal",value:"~h",description:'"~h"'},ca=i(function(w){return Na(w)},"peg$c58"),Y="~hq",ee={type:"literal",value:"~hq",description:'"~hq"'},xe=i(function(w){return cc(w)},"peg$c61"),Le="~hs",fa={type:"literal",value:"~hs",description:'"~hs"'},He=i(function(w){return Rd(w)},"peg$c64"),jr="~http",jt={type:"literal",value:"~http",description:'"~http"'},Ot=i(function(){return Oa},"peg$c67"),kt="~marked",cl={type:"literal",value:"~marked",description:'"~marked"'},on=i(function(){return ln},"peg$c70"),Rn="~marker",Er={type:"literal",value:"~marker",description:'"~marker"'},Yo=i(function(w){return fc(w)},"peg$c73"),wn="~m",fl={type:"literal",value:"~m",description:'"~m"'},pl=i(function(w){return Vi(w)},"peg$c76"),$u="~q",Vu={type:"literal",value:"~q",description:'"~q"'},qu=i(function(){return oi},"peg$c79"),Af="~replayq",ju={type:"literal",value:"~replayq",description:'"~replayq"'},_d=i(function(){return Ds},"peg$c82"),pa="~replays",Cd={type:"literal",value:"~replays",description:'"~replays"'},Ed=i(function(){return Aa},"peg$c85"),da="~replay",Mf={type:"literal",value:"~replay",description:'"~replay"'},Gu=i(function(){return pc},"peg$c88"),Xo="~src",bd={type:"literal",value:"~src",description:'"~src"'},Td=i(function(w){return xi(w)},"peg$c91"),dl="~s",Ku={type:"literal",value:"~s",description:'"~s"'},Wi=i(function(){return Co},"peg$c94"),Lf="~tcp",vi={type:"literal",value:"~tcp",description:'"~tcp"'},Yu=i(function(){return Ma},"peg$c97"),Xu="~udp",rr={type:"literal",value:"~udp",description:'"~udp"'},Ae=i(function(){return es},"peg$c100"),Ui="~tq",ha={type:"literal",value:"~tq",description:'"~tq"'},yi=i(function(w){return Uf(w)},"peg$c103"),mt="~ts",Qo={type:"literal",value:"~ts",description:'"~ts"'},hl=i(function(w){return Dd(w)},"peg$c106"),gl="~t",ce={type:"literal",value:"~t",description:'"~t"'},$e=i(function(w){return La(w)},"peg$c109"),Ts="~u",Qu={type:"literal",value:"~u",description:'"~u"'},ks=i(function(w){return Pa(w)},"peg$c112"),So="~websocket",Ju={type:"literal",value:"~websocket",description:'"~websocket"'},Ve=i(function(){return Sn},"peg$c115"),Pf={type:"other",description:"integer"},ga=/^['"]/,Jo={type:"class",value:`['"]`,description:`['"]`},ri=/^[0-9]/,ma={type:"class",value:"[0-9]",description:"[0-9]"},va=i(function(w){return parseInt(w.join(""),10)},"peg$c121"),Zo={type:"other",description:"string"},$i='"',ya={type:"literal",value:'"',description:'"\\""'},Ns=i(function(w){return w.join("")},"peg$c125"),Zu="'",wa={type:"literal",value:"'",description:`"'"`},ec=/^["\\]/,tc={type:"class",value:'["\\\\]',description:'["\\\\]'},Sa={type:"any",description:"any character"},ml=i(function(w){return w},"peg$c131"),rc="\\",wi={type:"literal",value:"\\",description:'"\\\\"'},Rf=/^['\\]/,kd={type:"class",value:"['\\\\]",description:"['\\\\]"},xa=/^['"\\]/,vl={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Nd="n",nc={type:"literal",value:"n",description:'"n"'},Od=i(function(){return` -`},"peg$c140"),Ad="r",ic={type:"literal",value:"r",description:'"r"'},Df=i(function(){return"\r"},"peg$c143"),Md="t",Dt={type:"literal",value:"t",description:'"t"'},At=i(function(){return" "},"peg$c146"),P=0,De=0,Os=[{line:1,column:1,seenCR:!1}],ni=0,_a=[],me=0,yl;if("startRule"in c){if(!(c.startRule in v))throw new Error(`Can't start parsing from rule "`+c.startRule+'".');S=v[c.startRule]}function Ld(){return s.substring(De,P)}i(Ld,"text");function Mt(){return xo(De,P)}i(Mt,"location");function If(w){throw Ms(null,[{type:"other",description:w}],s.substring(De,P),xo(De,P))}i(If,"expected");function As(w){throw Ms(w,null,s.substring(De,P),xo(De,P))}i(As,"error");function wl(w){var N=Os[w],W,U;if(N)return N;for(W=w-1;!Os[W];)W--;for(N=Os[W],N={line:N.line,column:N.column,seenCR:N.seenCR};Wni&&(ni=P,_a=[]),_a.push(w))}i(we,"peg$fail");function Ms(w,N,W,U){function an(Dn){var qi=1;for(Dn.sort(function(Eo,bo){return Eo.descriptionbo.description?1:0});qi1?bo.slice(0,-1).join(", ")+" or "+bo[Dn.length-1]:bo[0],Ra=qi?'"'+Eo(qi)+'"':"end of input","Expected "+dc+" but "+Ra+" found."}return i(Gt,"buildMessage"),N!==null&&an(N),new t(w!==null?w:Gt(N,W),N,W,U)}i(Ms,"peg$buildException");function ii(){var w,N,W,U;return me++,w=P,N=sn(),N!==p?(W=Ea(),W!==p?(U=sn(),U!==p?(De=w,N=k(W),w=N):(P=w,w=p)):(P=w,w=p)):(P=w,w=p),me--,w===p&&(N=p,me===0&&we(b)),w}i(ii,"peg$parsestart");function Ze(){var w,N;return me++,M.test(s.charAt(P))?(w=s.charAt(P),P++):(w=p,me===0&&we(z)),me--,w===p&&(N=p,me===0&&we(D)),w}i(Ze,"peg$parsews");function Ca(){var w,N;return me++,Q.test(s.charAt(P))?(w=s.charAt(P),P++):(w=p,me===0&&we(ie)),me--,w===p&&(N=p,me===0&&we(q)),w}i(Ca,"peg$parsecc");function sn(){var w,N;for(me++,w=[],N=Ze();N!==p;)w.push(N),N=Ze();return me--,w===p&&(N=p,me===0&&we(I)),w}i(sn,"peg$parse__");function Ea(){var w,N,W,U,an,Gt;return w=P,N=Gr(),N!==p?(W=sn(),W!==p?(s.charCodeAt(P)===124?(U=L,P++):(U=p,me===0&&we(B)),U!==p?(an=sn(),an!==p?(Gt=Ea(),Gt!==p?(De=w,N=G(N,Gt),w=N):(P=w,w=p)):(P=w,w=p)):(P=w,w=p)):(P=w,w=p)):(P=w,w=p),w===p&&(w=Gr()),w}i(Ea,"peg$parseOrExpr");function Gr(){var w,N,W,U,an,Gt;if(w=P,N=ba(),N!==p?(W=sn(),W!==p?(s.charCodeAt(P)===38?(U=re,P++):(U=p,me===0&&we(Z)),U!==p?(an=sn(),an!==p?(Gt=Gr(),Gt!==p?(De=w,N=oe(N,Gt),w=N):(P=w,w=p)):(P=w,w=p)):(P=w,w=p)):(P=w,w=p)):(P=w,w=p),w===p){if(w=P,N=ba(),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=Gr(),U!==p?(De=w,N=oe(N,U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;w===p&&(w=ba())}return w}i(Gr,"peg$parseAndExpr");function ba(){var w,N,W,U;return w=P,s.charCodeAt(P)===33?(N=de,P++):(N=p,me===0&&we(Re)),N!==p?(W=sn(),W!==p?(U=ba(),U!==p?(De=w,N=Ce(U),w=N):(P=w,w=p)):(P=w,w=p)):(P=w,w=p),w===p&&(w=qn()),w}i(ba,"peg$parseNotExpr");function qn(){var w,N,W,U,an,Gt;return w=P,s.charCodeAt(P)===40?(N=Ye,P++):(N=p,me===0&&we(tt)),N!==p?(W=sn(),W!==p?(U=Ea(),U!==p?(an=sn(),an!==p?(s.charCodeAt(P)===41?(Gt=Se,P++):(Gt=p,me===0&&we(Xe)),Gt!==p?(De=w,N=qe(U),w=N):(P=w,w=p)):(P=w,w=p)):(P=w,w=p)):(P=w,w=p)):(P=w,w=p),w===p&&(w=Ff()),w}i(qn,"peg$parseBindingExpr");function Ff(){var w,N,W,U;if(w=P,s.substr(P,4)===Qe?(N=Qe,P+=4):(N=p,me===0&&we(ot)),N!==p&&(De=w,N=Pt()),w=N,w===p&&(w=P,s.substr(P,2)===Tt?(N=Tt,P+=2):(N=p,me===0&&we(rn)),N!==p&&(De=w,N=nn()),w=N,w===p)){if(w=P,s.substr(P,2)===dr?(N=dr,P+=2):(N=p,me===0&&we(Ht)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=hr(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,3)===gr?(N=gr,P+=3):(N=p,me===0&&we(qt)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=Rt(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,3)===se?(N=se,P+=3):(N=p,me===0&&we(ze)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=$r(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,2)===Xt?(N=Xt,P+=2):(N=p,me===0&&we(st)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=oc(),U!==p?(De=w,N=Fe(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,8)===Mn?(N=Mn,P+=8):(N=p,me===0&&we(yn)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=Fi(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,2)===wo?(N=wo,P+=2):(N=p,me===0&&we(at)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=mr(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p&&(w=P,s.substr(P,4)===ar?(N=ar,P+=4):(N=p,me===0&&we(dt)),N!==p&&(De=w,N=Bi()),w=N,w===p)){if(w=P,s.substr(P,4)===Ln?(N=Ln,P+=4):(N=p,me===0&&we(mi)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=Vr(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p&&(w=P,s.substr(P,2)===qr?(N=qr,P+=2):(N=p,me===0&&we(Hi)),N!==p&&(De=w,N=ti()),w=N,w===p)){if(w=P,s.substr(P,2)===Pn?(N=Pn,P+=2):(N=p,me===0&&we(zi)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=ca(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,3)===Y?(N=Y,P+=3):(N=p,me===0&&we(ee)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=xe(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,3)===Le?(N=Le,P+=3):(N=p,me===0&&we(fa)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=He(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p&&(w=P,s.substr(P,5)===jr?(N=jr,P+=5):(N=p,me===0&&we(jt)),N!==p&&(De=w,N=Ot()),w=N,w===p&&(w=P,s.substr(P,7)===kt?(N=kt,P+=7):(N=p,me===0&&we(cl)),N!==p&&(De=w,N=on()),w=N,w===p))){if(w=P,s.substr(P,7)===Rn?(N=Rn,P+=7):(N=p,me===0&&we(Er)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=Yo(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,2)===wn?(N=wn,P+=2):(N=p,me===0&&we(fl)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=pl(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p&&(w=P,s.substr(P,2)===$u?(N=$u,P+=2):(N=p,me===0&&we(Vu)),N!==p&&(De=w,N=qu()),w=N,w===p&&(w=P,s.substr(P,8)===Af?(N=Af,P+=8):(N=p,me===0&&we(ju)),N!==p&&(De=w,N=_d()),w=N,w===p&&(w=P,s.substr(P,8)===pa?(N=pa,P+=8):(N=p,me===0&&we(Cd)),N!==p&&(De=w,N=Ed()),w=N,w===p&&(w=P,s.substr(P,7)===da?(N=da,P+=7):(N=p,me===0&&we(Mf)),N!==p&&(De=w,N=Gu()),w=N,w===p))))){if(w=P,s.substr(P,4)===Xo?(N=Xo,P+=4):(N=p,me===0&&we(bd)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=Td(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p&&(w=P,s.substr(P,2)===dl?(N=dl,P+=2):(N=p,me===0&&we(Ku)),N!==p&&(De=w,N=Wi()),w=N,w===p&&(w=P,s.substr(P,4)===Lf?(N=Lf,P+=4):(N=p,me===0&&we(vi)),N!==p&&(De=w,N=Yu()),w=N,w===p&&(w=P,s.substr(P,4)===Xu?(N=Xu,P+=4):(N=p,me===0&&we(rr)),N!==p&&(De=w,N=Ae()),w=N,w===p)))){if(w=P,s.substr(P,3)===Ui?(N=Ui,P+=3):(N=p,me===0&&we(ha)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=yi(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,3)===mt?(N=mt,P+=3):(N=p,me===0&&we(Qo)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=hl(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,2)===gl?(N=gl,P+=2):(N=p,me===0&&we(ce)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=$e(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.substr(P,2)===Ts?(N=Ts,P+=2):(N=p,me===0&&we(Qu)),N!==p){if(W=[],U=Ze(),U!==p)for(;U!==p;)W.push(U),U=Ze();else W=p;W!==p?(U=$t(),U!==p?(De=w,N=ks(U),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;w===p&&(w=P,s.substr(P,10)===So?(N=So,P+=10):(N=p,me===0&&we(Ju)),N!==p&&(De=w,N=Ve()),w=N,w===p&&(w=P,N=$t(),N!==p&&(De=w,N=ks(N)),w=N))}}}}}}}}}}}}}}}}}return w}i(Ff,"peg$parseExpr");function oc(){var w,N,W,U;if(me++,w=P,ga.test(s.charAt(P))?(N=s.charAt(P),P++):(N=p,me===0&&we(Jo)),N===p&&(N=null),N!==p){if(W=[],ri.test(s.charAt(P))?(U=s.charAt(P),P++):(U=p,me===0&&we(ma)),U!==p)for(;U!==p;)W.push(U),ri.test(s.charAt(P))?(U=s.charAt(P),P++):(U=p,me===0&&we(ma));else W=p;W!==p?(ga.test(s.charAt(P))?(U=s.charAt(P),P++):(U=p,me===0&&we(Jo)),U===p&&(U=null),U!==p?(De=w,N=va(W),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;return me--,w===p&&(N=p,me===0&&we(Pf)),w}i(oc,"peg$parseIntegerLiteral");function $t(){var w,N,W,U;if(me++,w=P,s.charCodeAt(P)===34?(N=$i,P++):(N=p,me===0&&we(ya)),N!==p){for(W=[],U=Sl();U!==p;)W.push(U),U=Sl();W!==p?(s.charCodeAt(P)===34?(U=$i,P++):(U=p,me===0&&we(ya)),U!==p?(De=w,N=Ns(W),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p){if(w=P,s.charCodeAt(P)===39?(N=Zu,P++):(N=p,me===0&&we(wa)),N!==p){for(W=[],U=Ta();U!==p;)W.push(U),U=Ta();W!==p?(s.charCodeAt(P)===39?(U=Zu,P++):(U=p,me===0&&we(wa)),U!==p?(De=w,N=Ns(W),w=N):(P=w,w=p)):(P=w,w=p)}else P=w,w=p;if(w===p)if(w=P,N=P,me++,W=Ca(),me--,W===p?N=void 0:(P=N,N=p),N!==p){if(W=[],U=zt(),U!==p)for(;U!==p;)W.push(U),U=zt();else W=p;W!==p?(De=w,N=Ns(W),w=N):(P=w,w=p)}else P=w,w=p}return me--,w===p&&(N=p,me===0&&we(Zo)),w}i($t,"peg$parseStringLiteral");function Sl(){var w,N,W;return w=P,N=P,me++,ec.test(s.charAt(P))?(W=s.charAt(P),P++):(W=p,me===0&&we(tc)),me--,W===p?N=void 0:(P=N,N=p),N!==p?(s.length>P?(W=s.charAt(P),P++):(W=p,me===0&&we(Sa)),W!==p?(De=w,N=ml(W),w=N):(P=w,w=p)):(P=w,w=p),w===p&&(w=P,s.charCodeAt(P)===92?(N=rc,P++):(N=p,me===0&&we(wi)),N!==p?(W=Si(),W!==p?(De=w,N=ml(W),w=N):(P=w,w=p)):(P=w,w=p)),w}i(Sl,"peg$parseDoubleStringChar");function Ta(){var w,N,W;return w=P,N=P,me++,Rf.test(s.charAt(P))?(W=s.charAt(P),P++):(W=p,me===0&&we(kd)),me--,W===p?N=void 0:(P=N,N=p),N!==p?(s.length>P?(W=s.charAt(P),P++):(W=p,me===0&&we(Sa)),W!==p?(De=w,N=ml(W),w=N):(P=w,w=p)):(P=w,w=p),w===p&&(w=P,s.charCodeAt(P)===92?(N=rc,P++):(N=p,me===0&&we(wi)),N!==p?(W=Si(),W!==p?(De=w,N=ml(W),w=N):(P=w,w=p)):(P=w,w=p)),w}i(Ta,"peg$parseSingleStringChar");function zt(){var w,N,W;return w=P,N=P,me++,W=Ze(),me--,W===p?N=void 0:(P=N,N=p),N!==p?(s.length>P?(W=s.charAt(P),P++):(W=p,me===0&&we(Sa)),W!==p?(De=w,N=ml(W),w=N):(P=w,w=p)):(P=w,w=p),w}i(zt,"peg$parseUnquotedStringChar");function Si(){var w,N;return xa.test(s.charAt(P))?(w=s.charAt(P),P++):(w=p,me===0&&we(vl)),w===p&&(w=P,s.charCodeAt(P)===110?(N=Nd,P++):(N=p,me===0&&we(nc)),N!==p&&(De=w,N=Od()),w=N,w===p&&(w=P,s.charCodeAt(P)===114?(N=Ad,P++):(N=p,me===0&&we(ic)),N!==p&&(De=w,N=Df()),w=N,w===p&&(w=P,s.charCodeAt(P)===116?(N=Md,P++):(N=p,me===0&&we(Dt)),N!==p&&(De=w,N=At()),w=N))),w}i(Si,"peg$parseEscapeSequence");function sc(w,N){function W(){return w.apply(this,arguments)||N.apply(this,arguments)}return i(W,"orFilter"),W.desc=w.desc+" or "+N.desc,W}i(sc,"or");function Bf(w,N){function W(){return w.apply(this,arguments)&&N.apply(this,arguments)}return i(W,"andFilter"),W.desc=w.desc+" and "+N.desc,W}i(Bf,"and");function Ls(w){function N(){return!w.apply(this,arguments)}return i(N,"notFilter"),N.desc="not "+w.desc,N}i(Ls,"not");function Ps(w){function N(){return w.apply(this,arguments)}return i(N,"bindingFilter"),N.desc="("+w.desc+")",N}i(Ps,"binding");function Hf(w){return!0}i(Hf,"allFilter"),Hf.desc="all flows";var zf=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("font/.*"),new RegExp("application/font.*")];function lc(w){if(w.response){for(var N=Zl.getContentType(w.response),W=zf.length;W--;)if(zf[W].test(N))return!0}return!1}i(lc,"assetFilter"),lc.desc="is asset";function _o(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"bodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(_o,"body");function Vt(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"requestBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Vt,"requestBody");function Pd(w){w=new RegExp(w,"i");function N(W){return!0}return i(N,"responseBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Pd,"responseBody");function ac(w){function N(W){return W.response&&W.response.status_code===w}return i(N,"responseCodeFilter"),N.desc="resp. code is "+w,N}i(ac,"responseCode");function Rs(w){w=new RegExp(w,"i");function N(W){return w.test(W.comment)}return i(N,"commentFilter"),N.desc="comment matches "+w,N}i(Rs,"comment");function uc(w){w=new RegExp(w,"i");function N(W){return W.request&&(w.test(W.request.host)||w.test(W.request.pretty_host))}return i(N,"domainFilter"),N.desc="domain matches "+w,N}i(uc,"domain");function xl(w){return w.type==="dns"}i(xl,"dnsFilter"),xl.desc="is a DNS Flow";function Wf(w){w=new RegExp(w,"i");function N(W){return!!W.server_conn.address&&w.test(W.server_conn.address[0]+":"+W.server_conn.address[1])}return i(N,"destinationFilter"),N.desc="destination address matches "+w,N}i(Wf,"destination");function ka(w){return!!w.error}i(ka,"errorFilter"),ka.desc="has error";function Na(w){w=new RegExp(w,"i");function N(W){return W.request&&ys.match_header(W.request,w)||W.response&&Zl.match_header(W.response,w)}return i(N,"headerFilter"),N.desc="header matches "+w,N}i(Na,"header");function cc(w){w=new RegExp(w,"i");function N(W){return W.request&&ys.match_header(W.request,w)}return i(N,"requestHeaderFilter"),N.desc="req. header matches "+w,N}i(cc,"requestHeader");function Rd(w){w=new RegExp(w,"i");function N(W){return W.response&&Zl.match_header(W.response,w)}return i(N,"responseHeaderFilter"),N.desc="resp. header matches "+w,N}i(Rd,"responseHeader");function Oa(w){return w.type==="http"}i(Oa,"httpFilter"),Oa.desc="is an HTTP Flow";function ln(w){return w.marked}i(ln,"markedFilter"),ln.desc="is marked";function fc(w){w=new RegExp(w,"i");function N(W){return w.test(W.marked)}return i(N,"markerFilter"),N.desc="marker matches "+w,N}i(fc,"marker");function Vi(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(W.request.method)}return i(N,"methodFilter"),N.desc="method matches "+w,N}i(Vi,"method");function oi(w){return w.request&&!w.response}i(oi,"noResponseFilter"),oi.desc="has no response";function Ds(w){return w.is_replay==="request"}i(Ds,"clientReplayFilter"),Ds.desc="request has been replayed";function Aa(w){return w.is_replay==="response"}i(Aa,"serverReplayFilter"),Aa.desc="response has been replayed";function pc(w){return!!w.is_replay}i(pc,"replayFilter"),pc.desc="flow has been replayed";function xi(w){w=new RegExp(w,"i");function N(W){return!!W.client_conn.peername&&w.test(W.client_conn.peername[0]+":"+W.client_conn.peername[1])}return i(N,"sourceFilter"),N.desc="source address matches "+w,N}i(xi,"source");function Co(w){return!!w.response}i(Co,"responseFilter"),Co.desc="has response";function Ma(w){return w.type==="tcp"}i(Ma,"tcpFilter"),Ma.desc="is a TCP Flow";function es(w){return w.type==="udp"}i(es,"udpFilter"),es.desc="is a UDP Flow";function Uf(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(ys.getContentType(W.request))}return i(N,"requestContentTypeFilter"),N.desc="req. content type matches "+w,N}i(Uf,"requestContentType");function Dd(w){w=new RegExp(w,"i");function N(W){return W.response&&w.test(Zl.getContentType(W.response))}return i(N,"responseContentTypeFilter"),N.desc="resp. content type matches "+w,N}i(Dd,"responseContentType");function La(w){w=new RegExp(w,"i");function N(W){return W.request&&w.test(ys.getContentType(W.request))||W.response&&w.test(Zl.getContentType(W.response))}return i(N,"contentTypeFilter"),N.desc="content type matches "+w,N}i(La,"contentType");function Pa(w){w=new RegExp(w,"i");function N(W){if(W.type==="dns"){let U=W.request?.questions[0];return U&&w.test(U.name)}return W.request&&w.test(ys.pretty_url(W.request))}return i(N,"urlFilter"),N.desc="url matches "+w,N}i(Pa,"url");function Sn(w){return!!w.websocket}if(i(Sn,"websocketFilter"),Sn.desc="is a Websocket Flow",yl=S(),yl!==p&&P===s.length)return yl;throw yl!==p&&P1)s=s.filter(c=>c!==t.data);else if(s=[],t.data in e.viewIndex&&e.view.length>1){let c=e.viewIndex[t.data],h;c===e.view.length-1?h=e.view[c-1]:h=e.view[c+1],s.push(h.id)}}return{...e,selected:s,...Nu(e,n)}}case LN:return{...e,filter:t.filter,...Nu(e,fg(AN(t.filter),xx(e.sort)))};case RN:return{...e,highlight:t.highlight};case PN:return{...e,sort:t.sort,...Nu(e,fx(xx(t.sort)))};case MN:return{...e,selected:t.flowIds};default:return e}}i(_x,"reducer");function AN(e){if(e)return rf.parse(e)}i(AN,"makeFilter");function xx({column:e,desc:t}){if(!e)return(s,c)=>0;let n=NN[e];return(s,c)=>{let h=n(s),p=n(c);return h>p?t?-1:1:hbt(`/flows/${e.id}/resume`,{method:"POST"})}i(Yp,"resume");function Ty(){return()=>bt("/flows/resume",{method:"POST"})}i(Ty,"resumeAll");function ky(e){return()=>bt(`/flows/${e.id}/kill`,{method:"POST"})}i(ky,"kill");function IN(){return()=>bt("/flows/kill",{method:"POST"})}i(IN,"killAll");function Ny(e){return()=>bt(`/flows/${e.id}`,{method:"DELETE"})}i(Ny,"remove");function Oy(e){return()=>bt(`/flows/${e.id}/duplicate`,{method:"POST"})}i(Oy,"duplicate");function Xp(e){return()=>bt(`/flows/${e.id}/replay`,{method:"POST"})}i(Xp,"replay");function Ay(e){return()=>bt(`/flows/${e.id}/revert`,{method:"POST"})}i(Ay,"revert");function Jn(e,t){return()=>bt.put(`/flows/${e.id}`,t)}i(Jn,"update");function FN(e,t,n){let s=new FormData;return t=new window.Blob([t],{type:"plain/text"}),s.append("file",t),()=>bt(`/flows/${e.id}/${n}/content.data`,{method:"POST",body:s})}i(FN,"uploadContent");function My(){return()=>bt("/clear",{method:"POST"})}i(My,"clear");function BN(e){let t=new FormData;return t.append("file",e),()=>bt("/flows/dump",{method:"POST",body:t})}i(BN,"upload");function ea(e){return{type:MN,flowIds:e?[e]:[]}}i(ea,"select");var Ly="UI_HIDE_MODAL",HN="UI_SET_ACTIVE_MODAL",N4={activeModal:void 0};function Cx(e=N4,t){switch(t.type){case HN:return{...e,activeModal:t.activeModal};case Ly:return{...e,activeModal:void 0};default:return e}}i(Cx,"reducer");function zN(e){return{type:HN,activeModal:e}}i(zN,"setActiveModal");function Py(){return{type:Ly}}i(Py,"hideModal");var ll=he(Ne());var Ut=he(Ne());var Jp=he(Ne());var gg=he(Ne()),UN=he(Zn());var WN=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),Qp=!1,hn=class extends gg.Component{constructor(){super(...arguments);this.input=gg.default.createRef();this.isEditing=i(()=>this.input.current?.contentEditable===WN,"isEditing");this.startEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=WN,window.requestAnimationFrame(()=>{if(!this.input.current)return;this.input.current.focus(),this.suppress_events=!1;let n=document.createRange();n.selectNodeContents(this.input.current);let s=window.getSelection();s?.removeAllRanges(),s?.addRange(n),this.props.onEditStart?.()}))},"startEditing");this.resetValue=i(()=>{if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,this.props.onInput?.(this.props.content)},"resetValue");this.finishEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"},"finishEditing");this.onPaste=i(n=>{n.preventDefault();let s=n.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,s)},"onPaste");this.suppress_events=!1;this.onMouseDown=i(n=>{Qp&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=i(n=>{let s=n.target===this.input.current,c=!window.getSelection()?.toString();Qp&&console.warn("mouseUp",this.suppress_events,s,c),s&&c&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=i(n=>{Qp&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=i(n=>{if(Qp&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=i(n=>{this.props.onInput?.(this.input.current?.textContent||"")},"onInput");this.onBlur=i(n=>{Qp&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=i(n=>{switch(Qp&&console.debug("keydown",n),n.stopPropagation(),n.key){case"Escape":n.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":n.shiftKey||(n.preventDefault(),this.finishEditing());break;default:break}this.props.onKeyDown?.(n)},"onKeyDown")}static{i(this,"ValueEditor")}render(){let n=(0,UN.default)("inline-input",this.props.className);return gg.default.createElement("span",{ref:this.input,tabIndex:0,className:n,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick},this.props.content)}componentDidUpdate(n){n.content!==this.props.content&&this.props.onInput?.(this.props.content)}};var $N=he(Zn());function of(e){let[t,n]=(0,Jp.useState)(e.isValid(e.content)),s=(0,Jp.useRef)(null),c=i(p=>{e.isValid(p)?e.onEditDone(p):s.current?.resetValue()},"onEditDone"),h=(0,$N.default)(e.className,t?"has-success":"has-warning");return Jp.default.createElement(hn,{...e,className:h,onInput:p=>n(e.isValid(p)),onEditDone:c,ref:s})}i(of,"ValidateEditor");var Ke=i(()=>SN(),"useAppDispatch"),be=pN;function Wn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(Wn,"formatProdErrorMessage");var O4=typeof Symbol=="function"&&Symbol.observable||"@@observable",VN=O4,bx=i(()=>Math.random().toString(36).substring(7).split("").join("."),"randomString"),A4={INIT:`@@redux/INIT${bx()}`,REPLACE:`@@redux/REPLACE${bx()}`,PROBE_UNKNOWN_ACTION:i(()=>`@@redux/PROBE_UNKNOWN_ACTION${bx()}`,"PROBE_UNKNOWN_ACTION")},Dy=A4;function Iy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}i(Iy,"isPlainObject");function Tx(e,t,n){if(typeof e!="function")throw new Error(Wn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Wn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Wn(1));return n(Tx)(e,t)}let s=e,c=t,h=new Map,p=h,v=0,S=!1;function b(){p===h&&(p=new Map,h.forEach((ie,I)=>{p.set(I,ie)}))}i(b,"ensureCanMutateNextListeners");function k(){if(S)throw new Error(Wn(3));return c}i(k,"getState");function D(ie){if(typeof ie!="function")throw new Error(Wn(4));if(S)throw new Error(Wn(5));let I=!0;b();let L=v++;return p.set(L,ie),i(function(){if(I){if(S)throw new Error(Wn(6));I=!1,b(),p.delete(L),h=null}},"unsubscribe")}i(D,"subscribe");function M(ie){if(!Iy(ie))throw new Error(Wn(7));if(typeof ie.type>"u")throw new Error(Wn(8));if(typeof ie.type!="string")throw new Error(Wn(17));if(S)throw new Error(Wn(9));try{S=!0,c=s(c,ie)}finally{S=!1}return(h=p).forEach(L=>{L()}),ie}i(M,"dispatch");function z(ie){if(typeof ie!="function")throw new Error(Wn(10));s=ie,M({type:Dy.REPLACE})}i(z,"replaceReducer");function q(){let ie=D;return{subscribe(I){if(typeof I!="object"||I===null)throw new Error(Wn(11));function L(){let G=I;G.next&&G.next(k())}return i(L,"observeState"),L(),{unsubscribe:ie(L)}},[VN](){return this}}}return i(q,"observable"),M({type:Dy.INIT}),{dispatch:M,subscribe:D,getState:k,replaceReducer:z,[VN]:q}}i(Tx,"createStore");function M4(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Dy.INIT})>"u")throw new Error(Wn(12));if(typeof n(void 0,{type:Dy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Wn(13))})}i(M4,"assertReducerShape");function Zp(e){let t=Object.keys(e),n={};for(let p=0;p"u"){let ie=S&&S.type;throw new Error(Wn(14))}k[M]=Q,b=b||Q!==q}return b=b||s.length!==Object.keys(v).length,b?k:v},"combination")}i(Zp,"combineReducers");function ed(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}i(ed,"compose");function qN(...e){return t=>(n,s)=>{let c=t(n,s),h=i(()=>{throw new Error(Wn(15))},"dispatch"),p={getState:c.getState,dispatch:i((S,...b)=>h(S,...b),"dispatch")},v=e.map(S=>S(p));return h=ed(...v)(c.dispatch),{...c,dispatch:h}}}i(qN,"applyMiddleware");function jN(e){return Iy(e)&&"type"in e&&typeof e.type=="string"}i(jN,"isAction");var JN=Symbol.for("immer-nothing"),GN=Symbol.for("immer-draftable"),po=Symbol.for("immer-state");function ws(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}i(ws,"die");var td=Object.getPrototypeOf;function il(e){return!!e&&!!e[po]}i(il,"isDraft");function Ss(e){return e?ZN(e)||Array.isArray(e)||!!e[GN]||!!e.constructor?.[GN]||Wy(e)||Uy(e):!1}i(Ss,"isDraftable");var L4=Object.prototype.constructor.toString();function ZN(e){if(!e||typeof e!="object")return!1;let t=td(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===L4}i(ZN,"isPlainObject");function Fy(e,t){zy(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,s)=>t(s,n,e))}i(Fy,"each");function zy(e){let t=e[po];return t?t.type_:Array.isArray(e)?1:Wy(e)?2:Uy(e)?3:0}i(zy,"getArchtype");function Ox(e,t){return zy(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}i(Ox,"has");function eO(e,t,n){let s=zy(e);s===2?e.set(t,n):s===3?e.add(n):e[t]=n}i(eO,"set");function P4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}i(P4,"is");function Wy(e){return e instanceof Map}i(Wy,"isMap");function Uy(e){return e instanceof Set}i(Uy,"isSet");function sf(e){return e.copy_||e.base_}i(sf,"latest");function Ax(e,t){if(Wy(e))return new Map(e);if(Uy(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=ZN(e);if(t===!0||t==="class_only"&&!n){let s=Object.getOwnPropertyDescriptors(e);delete s[po];let c=Reflect.ownKeys(s);for(let h=0;h1&&(e.set=e.add=e.clear=e.delete=R4),Object.freeze(e),t&&Object.entries(e).forEach(([n,s])=>Dx(s,!0))),e}i(Dx,"freeze");function R4(){ws(2)}i(R4,"dontMutateFrozenCollections");function $y(e){return Object.isFrozen(e)}i($y,"isFrozen");var D4={};function lf(e){let t=D4[e];return t||ws(0,e),t}i(lf,"getPlugin");var mg;function tO(){return mg}i(tO,"getCurrentScope");function I4(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}i(I4,"createScope");function KN(e,t){t&&(lf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}i(KN,"usePatchesInScope");function Mx(e){Lx(e),e.drafts_.forEach(F4),e.drafts_=null}i(Mx,"revokeScope");function Lx(e){e===mg&&(mg=e.parent_)}i(Lx,"leaveScope");function YN(e){return mg=I4(mg,e)}i(YN,"enterScope");function F4(e){let t=e[po];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}i(F4,"revokeDraft");function XN(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[po].modified_&&(Mx(t),ws(4)),Ss(e)&&(e=By(t,e),t.parent_||Hy(t,e)),t.patches_&&lf("Patches").generateReplacementPatches_(n[po].base_,e,t.patches_,t.inversePatches_)):e=By(t,n,[]),Mx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==JN?e:void 0}i(XN,"processResult");function By(e,t,n){if($y(t))return t;let s=t[po];if(!s)return Fy(t,(c,h)=>QN(e,s,t,c,h,n)),t;if(s.scope_!==e)return t;if(!s.modified_)return Hy(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;let c=s.copy_,h=c,p=!1;s.type_===3&&(h=new Set(c),c.clear(),p=!0),Fy(h,(v,S)=>QN(e,s,c,v,S,n,p)),Hy(e,c,!1),n&&e.patches_&&lf("Patches").generatePatches_(s,n,e.patches_,e.inversePatches_)}return s.copy_}i(By,"finalize");function QN(e,t,n,s,c,h,p){if(il(c)){let v=h&&t&&t.type_!==3&&!Ox(t.assigned_,s)?h.concat(s):void 0,S=By(e,c,v);if(eO(n,s,S),il(S))e.canAutoFreeze_=!1;else return}else p&&n.add(c);if(Ss(c)&&!$y(c)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;By(e,c),(!t||!t.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,s)&&Hy(e,c)}}i(QN,"finalizeProperty");function Hy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dx(t,n)}i(Hy,"maybeFreeze");function B4(e,t){let n=Array.isArray(e),s={type_:n?1:0,scope_:t?t.scope_:tO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},c=s,h=Ix;n&&(c=[s],h=vg);let{revoke:p,proxy:v}=Proxy.revocable(c,h);return s.draft_=v,s.revoke_=p,v}i(B4,"createProxyProxy");var Ix={get(e,t){if(t===po)return e;let n=sf(e);if(!Ox(n,t))return H4(e,n,t);let s=n[t];return e.finalized_||!Ss(s)?s:s===kx(e.base_,t)?(Nx(e),e.copy_[t]=Rx(s,e)):s},has(e,t){return t in sf(e)},ownKeys(e){return Reflect.ownKeys(sf(e))},set(e,t,n){let s=rO(sf(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){let c=kx(sf(e),t),h=c?.[po];if(h&&h.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(P4(n,c)&&(n!==void 0||Ox(e.base_,t)))return!0;Nx(e),Px(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return kx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Nx(e),Px(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=sf(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:s.enumerable,value:n[t]}},defineProperty(){ws(11)},getPrototypeOf(e){return td(e.base_)},setPrototypeOf(){ws(12)}},vg={};Fy(Ix,(e,t)=>{vg[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});vg.deleteProperty=function(e,t){return vg.set.call(this,e,t,void 0)};vg.set=function(e,t,n){return Ix.set.call(this,e[0],t,n,e[0])};function kx(e,t){let n=e[po];return(n?sf(n):e)[t]}i(kx,"peek");function H4(e,t,n){let s=rO(t,n);return s?"value"in s?s.value:s.get?.call(e.draft_):void 0}i(H4,"readPropFromProto");function rO(e,t){if(!(t in e))return;let n=td(e);for(;n;){let s=Object.getOwnPropertyDescriptor(n,t);if(s)return s;n=td(n)}}i(rO,"getDescriptorFromProto");function Px(e){e.modified_||(e.modified_=!0,e.parent_&&Px(e.parent_))}i(Px,"markChanged");function Nx(e){e.copy_||(e.copy_=Ax(e.base_,e.scope_.immer_.useStrictShallowCopy_))}i(Nx,"prepareCopy");var z4=class{static{i(this,"Immer2")}constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,s)=>{if(typeof t=="function"&&typeof n!="function"){let h=n;n=t;let p=this;return i(function(S=h,...b){return p.produce(S,k=>n.call(this,k,...b))},"curriedProduce")}typeof n!="function"&&ws(6),s!==void 0&&typeof s!="function"&&ws(7);let c;if(Ss(t)){let h=YN(this),p=Rx(t,void 0),v=!0;try{c=n(p),v=!1}finally{v?Mx(h):Lx(h)}return KN(h,s),XN(c,h)}else if(!t||typeof t!="object"){if(c=n(t),c===void 0&&(c=t),c===JN&&(c=void 0),this.autoFreeze_&&Dx(c,!0),s){let h=[],p=[];lf("Patches").generateReplacementPatches_(t,c,h,p),s(h,p)}return c}else ws(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(p,...v)=>this.produceWithPatches(p,S=>t(S,...v));let s,c;return[this.produce(t,n,(p,v)=>{s=p,c=v}),s,c]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ss(e)||ws(8),il(e)&&(e=Fx(e));let t=YN(this),n=Rx(e,void 0);return n[po].isManual_=!0,Lx(t),n}finishDraft(e,t){let n=e&&e[po];(!n||!n.isManual_)&&ws(9);let{scope_:s}=n;return KN(s,t),XN(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let c=t[n];if(c.path.length===0&&c.op==="replace"){e=c.value;break}}n>-1&&(t=t.slice(n+1));let s=lf("Patches").applyPatches_;return il(e)?s(e,t):this.produce(e,c=>s(c,t))}};function Rx(e,t){let n=Wy(e)?lf("MapSet").proxyMap_(e,t):Uy(e)?lf("MapSet").proxySet_(e,t):B4(e,t);return(t?t.scope_:tO()).drafts_.push(n),n}i(Rx,"createProxy");function Fx(e){return il(e)||ws(10,e),nO(e)}i(Fx,"current");function nO(e){if(!Ss(e)||$y(e))return e;let t=e[po],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ax(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ax(e,!0);return Fy(n,(s,c)=>{eO(n,s,nO(c))}),t&&(t.finalized_=!1),n}i(nO,"currentImpl");var ho=new z4,Vy=ho.produce,vU=ho.produceWithPatches.bind(ho),yU=ho.setAutoFreeze.bind(ho),wU=ho.setUseStrictShallowCopy.bind(ho),SU=ho.applyPatches.bind(ho),xU=ho.createDraft.bind(ho),_U=ho.finishDraft.bind(ho);function W4(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}i(W4,"assertIsFunction");function U4(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}i(U4,"assertIsObject");function $4(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(s=>typeof s=="function"?`function ${s.name||"unnamed"}()`:typeof s).join(", ");throw new TypeError(`${t}[${n}]`)}}i($4,"assertIsArrayOfFunctions");var iO=i(e=>Array.isArray(e)?e:[e],"ensureIsArray");function V4(e){let t=Array.isArray(e[0])?e[0]:e;return $4(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}i(V4,"getDependencies");function q4(e,t){let n=[],{length:s}=e;for(let c=0;c{n=qy(),p.resetResultsCount()},p.resultsCount=()=>h,p.resetResultsCount=()=>{h=0},p}i(jy,"weakMapMemoize");function Bx(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,s=i((...c)=>{let h=0,p=0,v,S={},b=c.pop();typeof b=="object"&&(S=b,b=c.pop()),W4(b,`createSelector expects an output function after the inputs, but received: [${typeof b}]`);let k={...n,...S},{memoize:D,memoizeOptions:M=[],argsMemoize:z=jy,argsMemoizeOptions:q=[],devModeChecks:Q={}}=k,ie=iO(M),I=iO(q),L=V4(c),B=D(i(function(){return h++,b.apply(null,arguments)},"recomputationWrapper"),...ie),G=!0,re=z(i(function(){p++;let oe=q4(L,arguments);return v=B.apply(null,oe),v},"dependenciesChecker"),...I);return Object.assign(re,{resultFunc:b,memoizedResultFunc:B,dependencies:L,dependencyRecomputations:i(()=>p,"dependencyRecomputations"),resetDependencyRecomputations:i(()=>{p=0},"resetDependencyRecomputations"),lastResult:i(()=>v,"lastResult"),recomputations:i(()=>h,"recomputations"),resetRecomputations:i(()=>{h=0},"resetRecomputations"),memoize:D,argsMemoize:z})},"createSelector2");return Object.assign(s,{withTypes:i(()=>s,"withTypes")}),s}i(Bx,"createSelectorCreator");var Y4=Bx(jy),X4=Object.assign((e,t=Y4)=>{U4(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),s=n.map(h=>e[h]);return t(s,(...h)=>h.reduce((p,v,S)=>(p[n[S]]=v,p),{}))},{withTypes:i(()=>X4,"withTypes")});function sO(e){return i(({dispatch:n,getState:s})=>c=>h=>typeof h=="function"?h(n,s,e):c(h),"middleware")}i(sO,"createThunkMiddleware");var lO=sO(),aO=sO;var Q4=i((...e)=>{let t=Bx(...e),n=Object.assign((...s)=>{let c=t(...s),h=i((p,...v)=>c(il(p)?Fx(p):p,...v),"wrappedSelector");return Object.assign(h,c),h},{withTypes:i(()=>n,"withTypes")});return n},"createDraftSafeSelectorCreator"),DU=Q4(jy),J4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ed:ed.apply(null,arguments)},BU=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Z4=i(e=>e&&typeof e.match=="function","hasMatchFunction");function ra(e,t){function n(...s){if(t){let c=t(...s);if(!c)throw new Error(Jr(0));return{type:e,payload:c.payload,..."meta"in c&&{meta:c.meta},..."error"in c&&{error:c.error}}}return{type:e,payload:s[0]}}return i(n,"actionCreator"),n.toString=()=>`${e}`,n.type=e,n.match=s=>jN(s)&&s.type===e,n}i(ra,"createAction");var pO=class yg extends Array{static{i(this,"_Tuple")}constructor(...t){super(...t),Object.setPrototypeOf(this,yg.prototype)}static get[Symbol.species](){return yg}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new yg(...t[0].concat(this)):new yg(...t.concat(this))}};function uO(e){return Ss(e)?Vy(e,()=>{}):e}i(uO,"freezeDraftable");function cO(e,t,n){if(e.has(t)){let c=e.get(t);return n.update&&(c=n.update(c,t,e),e.set(t,c)),c}if(!n.insert)throw new Error(Jr(10));let s=n.insert(t,e);return e.set(t,s),s}i(cO,"emplace");function eB(e){return typeof e=="boolean"}i(eB,"isBoolean");var tB=i(()=>i(function(t){let{thunk:n=!0,immutableCheck:s=!0,serializableCheck:c=!0,actionCreatorCheck:h=!0}=t??{},p=new pO;return n&&(eB(n)?p.push(lO):p.push(aO(n.extraArgument))),p},"getDefaultMiddleware"),"buildGetDefaultMiddleware"),rB="RTK_autoBatch";var dO=i(e=>t=>{setTimeout(t,e)},"createQueueWithTimer"),nB=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:dO(10),iB=i((e={type:"raf"})=>t=>(...n)=>{let s=t(...n),c=!0,h=!1,p=!1,v=new Set,S=e.type==="tick"?queueMicrotask:e.type==="raf"?nB:e.type==="callback"?e.queueNotification:dO(e.timeout),b=i(()=>{p=!1,h&&(h=!1,v.forEach(k=>k()))},"notifyListeners");return Object.assign({},s,{subscribe(k){let D=i(()=>c&&k(),"wrappedListener"),M=s.subscribe(D);return v.add(k),()=>{M(),v.delete(k)}},dispatch(k){try{return c=!k?.meta?.[rB],h=!c,h&&(p||(p=!0,S(b))),s.dispatch(k)}finally{c=!0}}})},"autoBatchEnhancer"),oB=i(e=>i(function(n){let{autoBatch:s=!0}=n??{},c=new pO(e);return s&&c.push(iB(typeof s=="object"?s:void 0)),c},"getDefaultEnhancers"),"buildGetDefaultEnhancers"),Ou=!0;function hO(e){let t=tB(),{reducer:n=void 0,middleware:s,devTools:c=!0,preloadedState:h=void 0,enhancers:p=void 0}=e||{},v;if(typeof n=="function")v=n;else if(Iy(n))v=Zp(n);else throw new Error(Jr(1));if(!Ou&&s&&typeof s!="function")throw new Error(Jr(2));let S;if(typeof s=="function"){if(S=s(t),!Ou&&!Array.isArray(S))throw new Error(Jr(3))}else S=t();if(!Ou&&S.some(q=>typeof q!="function"))throw new Error(Jr(4));let b=ed;c&&(b=J4({trace:!Ou,...typeof c=="object"&&c}));let k=qN(...S),D=oB(k);if(!Ou&&p&&typeof p!="function")throw new Error(Jr(5));let M=typeof p=="function"?p(D):D();if(!Ou&&!Array.isArray(M))throw new Error(Jr(6));if(!Ou&&M.some(q=>typeof q!="function"))throw new Error(Jr(7));!Ou&&S.length&&!M.includes(k)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");let z=b(...M);return Tx(v,h,z)}i(hO,"configureStore");function gO(e){let t={},n=[],s,c={addCase(h,p){let v=typeof h=="string"?h:h.type;if(!v)throw new Error(Jr(28));if(v in t)throw new Error(Jr(29));return t[v]=p,c},addMatcher(h,p){return n.push({matcher:h,reducer:p}),c},addDefaultCase(h){return s=h,c}};return e(c),[t,n,s]}i(gO,"executeReducerBuilderCallback");function sB(e){return typeof e=="function"}i(sB,"isStateFunction");function lB(e,t){let[n,s,c]=gO(t),h;if(sB(e))h=i(()=>uO(e()),"getInitialState");else{let v=uO(e);h=i(()=>v,"getInitialState")}function p(v=h(),S){let b=[n[S.type],...s.filter(({matcher:k})=>k(S)).map(({reducer:k})=>k)];return b.filter(k=>!!k).length===0&&(b=[c]),b.reduce((k,D)=>{if(D)if(il(k)){let z=D(k,S);return z===void 0?k:z}else{if(Ss(k))return Vy(k,M=>D(M,S));{let M=D(k,S);if(M===void 0){if(k===null)return k;throw new Error(Jr(9))}return M}}return k},v)}return i(p,"reducer"),p.getInitialState=h,p}i(lB,"createReducer");var aB="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",mO=i((e=21)=>{let t="",n=e;for(;n--;)t+=aB[Math.random()*64|0];return t},"nanoid"),uB=i((e,t)=>Z4(e)?e.match(t):e(t),"matches");function cB(...e){return t=>e.some(n=>uB(n,t))}i(cB,"isAnyOf");var fB=["name","message","stack","code"],Hx=class{static{i(this,"RejectWithValue")}constructor(e,t){this.payload=e,this.meta=t}_type},fO=class{static{i(this,"FulfillWithMeta")}constructor(e,t){this.payload=e,this.meta=t}_type},pB=i(e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of fB)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},"miniSerializeError"),dB=(()=>{function e(t,n,s){let c=ra(t+"/fulfilled",(S,b,k,D)=>({payload:S,meta:{...D||{},arg:k,requestId:b,requestStatus:"fulfilled"}})),h=ra(t+"/pending",(S,b,k)=>({payload:void 0,meta:{...k||{},arg:b,requestId:S,requestStatus:"pending"}})),p=ra(t+"/rejected",(S,b,k,D,M)=>({payload:D,error:(s&&s.serializeError||pB)(S||"Rejected"),meta:{...M||{},arg:k,requestId:b,rejectedWithValue:!!D,requestStatus:"rejected",aborted:S?.name==="AbortError",condition:S?.name==="ConditionError"}}));function v(S){return(b,k,D)=>{let M=s?.idGenerator?s.idGenerator(S):mO(),z=new AbortController,q,Q;function ie(L){Q=L,z.abort()}i(ie,"abort");let I=async function(){let L;try{let G=s?.condition?.(S,{getState:k,extra:D});if(gB(G)&&(G=await G),G===!1||z.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let re=new Promise((Z,oe)=>{q=i(()=>{oe({name:"AbortError",message:Q||"Aborted"})},"abortHandler"),z.signal.addEventListener("abort",q)});b(h(M,S,s?.getPendingMeta?.({requestId:M,arg:S},{getState:k,extra:D}))),L=await Promise.race([re,Promise.resolve(n(S,{dispatch:b,getState:k,extra:D,requestId:M,signal:z.signal,abort:ie,rejectWithValue:i((Z,oe)=>new Hx(Z,oe),"rejectWithValue"),fulfillWithValue:i((Z,oe)=>new fO(Z,oe),"fulfillWithValue")})).then(Z=>{if(Z instanceof Hx)throw Z;return Z instanceof fO?c(Z.payload,M,S,Z.meta):c(Z,M,S)})])}catch(G){L=G instanceof Hx?p(null,M,S,G.payload,G.meta):p(G,M,S)}finally{q&&z.signal.removeEventListener("abort",q)}return s&&!s.dispatchConditionRejection&&p.match(L)&&L.meta.condition||b(L),L}();return Object.assign(I,{abort:ie,requestId:M,arg:S,unwrap(){return I.then(hB)}})}}return i(v,"actionCreator"),Object.assign(v,{pending:h,rejected:p,fulfilled:c,settled:cB(p,c),typePrefix:t})}return i(e,"createAsyncThunk2"),e.withTypes=()=>e,e})();function hB(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}i(hB,"unwrapResult");function gB(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}i(gB,"isThenable");var vO=Symbol.for("rtk-slice-createasyncthunk"),$U={[vO]:dB};function mB(e,t){return`${e}/${t}`}i(mB,"getType");function vB({creators:e}={}){let t=e?.asyncThunk?.[vO];return i(function(s){let{name:c,reducerPath:h=c}=s;if(!c)throw new Error(Jr(11));typeof process<"u";let p=(typeof s.reducers=="function"?s.reducers(wB()):s.reducers)||{},v=Object.keys(p),S={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},b={addCase(L,B){let G=typeof L=="string"?L:L.type;if(!G)throw new Error(Jr(12));if(G in S.sliceCaseReducersByType)throw new Error(Jr(13));return S.sliceCaseReducersByType[G]=B,b},addMatcher(L,B){return S.sliceMatchers.push({matcher:L,reducer:B}),b},exposeAction(L,B){return S.actionCreators[L]=B,b},exposeCaseReducer(L,B){return S.sliceCaseReducersByName[L]=B,b}};v.forEach(L=>{let B=p[L],G={reducerName:L,type:mB(c,L),createNotation:typeof s.reducers=="function"};xB(B)?CB(G,B,b,t):SB(G,B,b)});function k(){let[L={},B=[],G=void 0]=typeof s.extraReducers=="function"?gO(s.extraReducers):[s.extraReducers],re={...L,...S.sliceCaseReducersByType};return lB(s.initialState,Z=>{for(let oe in re)Z.addCase(oe,re[oe]);for(let oe of S.sliceMatchers)Z.addMatcher(oe.matcher,oe.reducer);for(let oe of B)Z.addMatcher(oe.matcher,oe.reducer);G&&Z.addDefaultCase(G)})}i(k,"buildReducer");let D=i(L=>L,"selectSelf"),M=new Map,z;function q(L,B){return z||(z=k()),z(L,B)}i(q,"reducer");function Q(){return z||(z=k()),z.getInitialState()}i(Q,"getInitialState");function ie(L,B=!1){function G(Z){let oe=Z[L];return typeof oe>"u"&&B&&(oe=Q()),oe}i(G,"selectSlice");function re(Z=D){let oe=cO(M,B,{insert:i(()=>new WeakMap,"insert")});return cO(oe,Z,{insert:i(()=>{let de={};for(let[Re,Ce]of Object.entries(s.selectors??{}))de[Re]=yB(Ce,Z,Q,B);return de},"insert")})}return i(re,"getSelectors"),{reducerPath:L,getSelectors:re,get selectors(){return re(G)},selectSlice:G}}i(ie,"makeSelectorProps");let I={name:c,reducer:q,actions:S.actionCreators,caseReducers:S.sliceCaseReducersByName,getInitialState:Q,...ie(h),injectInto(L,{reducerPath:B,...G}={}){let re=B??h;return L.inject({reducerPath:re,reducer:q},G),{...I,...ie(re,!0)}}};return I},"createSlice2")}i(vB,"buildCreateSlice");function yB(e,t,n,s){function c(h,...p){let v=t(h);return typeof v>"u"&&s&&(v=n()),e(v,...p)}return i(c,"wrapper"),c.unwrapped=e,c}i(yB,"wrapSelector");var yO=vB();function wB(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return i(e,"asyncThunk"),e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}i(wB,"buildReducerCreators");function SB({type:e,reducerName:t,createNotation:n},s,c){let h,p;if("reducer"in s){if(n&&!_B(s))throw new Error(Jr(17));h=s.reducer,p=s.prepare}else h=s;c.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,p?ra(e,p):ra(e))}i(SB,"handleNormalReducerDefinition");function xB(e){return e._reducerDefinitionType==="asyncThunk"}i(xB,"isAsyncThunkSliceReducerDefinition");function _B(e){return e._reducerDefinitionType==="reducerWithPrepare"}i(_B,"isCaseReducerWithPrepareDefinition");function CB({type:e,reducerName:t},n,s,c){if(!c)throw new Error(Jr(18));let{payloadCreator:h,fulfilled:p,pending:v,rejected:S,settled:b,options:k}=n,D=c(e,h,k);s.exposeAction(t,D),p&&s.addCase(D.fulfilled,p),v&&s.addCase(D.pending,v),S&&s.addCase(D.rejected,S),b&&s.addMatcher(D.settled,b),s.exposeCaseReducer(t,{fulfilled:p||Gy,pending:v||Gy,rejected:S||Gy,settled:b||Gy})}i(CB,"handleThunkCaseReducerDefinition");function Gy(){}i(Gy,"noop");var wO="listener",SO="completed",xO="cancelled",VU=`task-${xO}`,qU=`task-${SO}`,jU=`${wO}-${xO}`,GU=`${wO}-${SO}`;var EB=i((e,t)=>{if(typeof e!="function")throw new Error(Jr(32))},"assertFunction");var{assign:KU}=Object;var zx="listenerMiddleware";var bB=i(e=>{let{type:t,actionCreator:n,matcher:s,predicate:c,effect:h}=e;if(t)c=ra(t).match;else if(n)t=n.type,c=n.match;else if(s)c=s;else if(!c)throw new Error(Jr(21));return EB(h,"options.listener"),{predicate:c,type:t,effect:h}},"getListenerEntryPropsFrom"),TB=Object.assign(e=>{let{type:t,predicate:n,effect:s}=bB(e);return{id:mO(),effect:s,type:t,predicate:n,pending:new Set,unsubscribe:i(()=>{throw new Error(Jr(22))},"unsubscribe")}},{withTypes:i(()=>TB,"withTypes")});var kB=Object.assign(ra(`${zx}/add`),{withTypes:i(()=>kB,"withTypes")}),YU=ra(`${zx}/removeAll`),NB=Object.assign(ra(`${zx}/remove`),{withTypes:i(()=>NB,"withTypes")});var XU=Symbol.for("rtk-state-proxy-original");function Jr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(Jr,"formatProdErrorMessage");var _O="EVENTS_ADD",OB="EVENTS_RECEIVE",CO="EVENTS_TOGGLE_VISIBILITY",EO="EVENTS_TOGGLE_FILTER",Wx=(h=>(h.debug="debug",h.info="info",h.web="web",h.warn="warn",h.error="error",h))(Wx||{}),AB={visible:!1,filters:{debug:!1,info:!0,web:!0,warn:!0,error:!0},...Kp};function Ux(e=AB,t){switch(t.type){case CO:return{...e,visible:!e.visible};case EO:{let n={...e.filters,[t.filter]:!e.filters[t.filter]};return{...e,filters:n,...Nu(e,fg(s=>n[s.level]))}}case _O:case OB:return{...e,...Nu(e,dg[t.cmd](t.data,n=>e.filters[n.level]))};default:return e}}i(Ux,"reduce");function bO(e){return{type:EO,filter:e}}i(bO,"toggleFilter");function rd(){return{type:CO}}i(rd,"toggleVisibility");function TO(e,t="web"){let n={id:Math.random().toString(),message:e,level:t};return{type:_O,cmd:"add",data:n}}i(TO,"add");var NO="UI_OPTION_UPDATE_START",OO="UI_OPTION_UPDATE_SUCCESS",AO="UI_OPTION_UPDATE_ERROR",MB={};function $x(e=MB,t){switch(t.type){case NO:return{...e,[t.option]:{isUpdating:!0,value:t.value,error:!1}};case OO:return{...e,[t.option]:void 0};case AO:{let n=e[t.option].value;return typeof n=="boolean"&&(n=!n),{...e,[t.option]:{value:n,isUpdating:!1,error:t.error}}}case Ly:return{};default:return e}}i($x,"reducer");function MO(e,t){return{type:NO,option:e,value:t}}i(MO,"startUpdate");function LO(e){return{type:OO,option:e}}i(LO,"updateSuccess");function PO(e,t){return{type:AO,option:e,error:String(t)}}i(PO,"updateError");var PB=yO({name:"ui/tabs",initialState:{current:1,isInitial:!0},reducers:{setCurrent(e,t){e.current=t.payload,e.isInitial=!1}}}),{actions:RB,reducer:DB}=PB,{setCurrent:wg}=RB,RO=DB;var DO=Zp({flow:JS,modal:Cx,optionsEditor:$x,tabs:RO});var IB={state:"CONNECTION_INIT",message:void 0};function Vx(e=IB,t){switch(t.type){case"CONNECTION_ESTABLISHED":case"CONNECTION_FETCHING":case"CONNECTION_ERROR":case"CONNECTION_OFFLINE":return{state:t.type,message:t.message};default:return e}}i(Vx,"reducer");function IO(){return{type:"CONNECTION_FETCHING"}}i(IO,"startFetching");function FO(){return{type:"CONNECTION_ESTABLISHED"}}i(FO,"connectionEstablished");function BO(e){return{type:"CONNECTION_ERROR",message:e}}i(BO,"connectionError");var HO={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],client_replay_concurrency:1,command_history:!0,confdir:"~/.mitmproxy",connect_addr:void 0,connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,dns_name_servers:[],dns_use_hosts_file:!0,experimental_transparent_http3:!1,export_preserve_original_ip:!1,hardump:"",http2:!0,http2_ping_keepalive:58,http3:!0,http_connect_send_host_header:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:void 0,map_local:[],map_remote:[],mode:["regular"],modify_body:[],modify_headers:[],normalize_outbound_headers:!0,onboarding:!0,onboarding_host:"mitm.it",proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_extra:"forward",server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_reuse:!1,server_replay_use_headers:[],showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,stream_large_bodies:void 0,strip_ech:!0,tcp_hosts:[],termlog_verbosity:"info",tls_ecdh_curve_client:void 0,tls_ecdh_curve_server:void 0,tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",udp_hosts:[],upstream_auth:void 0,upstream_cert:!0,validate_inbound_headers:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_port:8081,web_static_viewer:"",websocket:!0};var qx="OPTIONS_RECEIVE",jx="OPTIONS_UPDATE";function Gx(e=HO,t){switch(t.type){case qx:{let n={};for(let[s,{value:c}]of Object.entries(t.data))n[s]=c;return n}case jx:{let n={...e};for(let[s,{value:c}]of Object.entries(t.data))n[s]=c;return n}default:return e}}i(Gx,"reducer");async function BB(e,t,n){try{let s=await bt.put("/options",{[e]:t});if(s.status===200)n(LO(e));else throw await s.text()}catch(s){n(PO(e,s))}}i(BB,"pureSendUpdate");var HB=BB;function nd(e,t){return n=>{n(MO(e,t)),HB(e,t,n)}}i(nd,"update");var zO="COMMANDBAR_TOGGLE_VISIBILITY",WB={visible:!1};function Kx(e=WB,t){switch(t.type){case zO:return{...e,visible:!e.visible};default:return e}}i(Kx,"reducer");function Ky(){return{type:zO}}i(Ky,"toggleVisibility");var na="STATE_RECEIVE",ia="STATE_UPDATE",UB={available:!1,version:"",contentViews:[],servers:[]};function Yx(e=UB,t){switch(t.type){case na:case ia:return{...e,available:!0,...t.data};default:return e}}i(Yx,"reducer");var $B={},VB=i((e=$B,t)=>{switch(t.type){case qx:return t.data;case jx:return{...e,...t.data};default:return e}},"reducer"),UO=VB;var $O="MODE_LOCAL_TOGGLE",VO="MODE_LOCAL_SET_APPLICATIONS",Xx="MODE_LOCAL_ERROR",qB={active:!1,applications:""},qO=i(e=>{let t=e.local.applications?`local:${e.local.applications}`:"local";return Au(t,e.local)},"getMode"),jO=i(()=>async e=>{e({type:$O});try{await e(go())}catch(t){e({type:Xx,error:t.message})}},"toggleLocal"),GO=i(e=>async t=>{t({type:VO,applications:e});try{await t(go())}catch(n){t({type:Xx,error:n.message})}},"setApplications"),jB=i((e=qB,t)=>{switch(t.type){case $O:return{...e,active:!e.active,error:void 0};case VO:return{...e,applications:t.applications,error:void 0};case ia:case na:if(t.data&&t.data.servers){let n=Mu("local",t.data.servers)[0],s=n!==void 0;return{...e,active:s,applications:s?n.data:e.applications,error:s?void 0:e.error}}return e;case Xx:return{...e,error:t.error};default:return e}},"localReducer"),KO=jB;var YO="MODE_WIREGUARD_TOGGLE",XO="MODE_WIREGUARD_ERROR",GB={active:!1,path:""},QO=i(e=>Au("wireguard",e.wireguard),"getMode"),JO=i(()=>async e=>{e({type:YO});try{await e(go())}catch(t){e({type:XO,error:t.message})}},"toggleWireguard"),KB=i((e=GB,t)=>{switch(t.type){case YO:return{...e,active:!e.active};case ia:case na:if(t.data&&t.data.servers){let n=Mu("wireguard",t.data.servers)[0],s=n!==void 0;return{...e,active:s,path:s?n.data:e.path,listen_host:s?n.listen_host:e.listen_host,listen_port:s?n.listen_port:e.listen_port,error:s?void 0:e.error}}return e;case XO:return{...e,error:t.error};default:return e}},"wireguardReducer"),ZO=KB;var Yy=(b=>(b.HTTP="http",b.HTTPS="https",b.HTTP3="http3",b.TLS="tls",b.DTLS="dtls",b.TCP="tcp",b.UDP="udp",b.DNS="dns",b.QUIC="quic",b))(Yy||{});var eA="MODE_REVERSE_TOGGLE",tA="MODE_REVERSE_SET_LISTEN_CONFIG",rA="MODE_REVERSE_SET_DESTINATION",nA="MODE_REVERSE_SET_PROTOCOL",Sg="MODE_REVERSE_ERROR",YB={active:!1,protocol:"https",destination:""},iA=i(e=>{let t=`reverse:${e.reverse.protocol}://${e.reverse.destination}`;return Au(t,e.reverse)},"getMode"),oA=i(()=>async e=>{e({type:eA});try{await e(go())}catch(t){e({type:Sg,error:t.message})}},"toggleReverse"),sA=i(e=>async t=>{t({type:nA,protocol:e});try{await t(go())}catch(n){t({type:Sg,error:n.message})}},"setProtocol"),lA=i((e,t)=>async n=>{n({type:tA,port:e,host:t});try{await n(go())}catch(s){n({type:Sg,error:s.message})}},"setListenConfig"),aA=i(e=>async t=>{t({type:rA,destination:e});try{await t(go())}catch(n){t({type:Sg,error:n.message})}},"setDestination"),XB=i((e=YB,t)=>{switch(t.type){case eA:return{...e,active:!e.active};case tA:return{...e,listen_port:t.port,listen_host:t.host,error:void 0};case rA:return{...e,destination:t.destination,error:void 0};case nA:return{...e,protocol:t.protocol,error:void 0};case ia:case na:if(t.data&&t.data.servers){let n=Mu("reverse",t.data.servers)[0],s=n!==void 0,c,h="";return s&&([c,h]=n.data.split("://")),{...e,active:s,protocol:s?c:e.protocol,destination:s?h:e.destination,listen_host:s?n.listen_host:e.listen_host,listen_port:s?n.listen_port:e.listen_port,error:s?void 0:e.error}}return e;case Sg:return{...e,error:t.error};default:return e}},"reverseReducer"),uA=XB;var go=i(()=>async(e,t)=>{let n=t().modes,s=[...cA(n),...qO(n),...QO(n),...iA(n)],c=await bt.put("/options",{mode:s});if(c.status!==200)throw new Error(await c.text())},"updateMode"),Au=i((e,t)=>{let n=e;return!t.active||t.error?[]:(t.listen_host&&t.listen_port?n+=`@${t.listen_host}:${t.listen_port}`:t.listen_port&&(n+=`@${t.listen_port}`),[n])},"includeModeState"),QB=i(e=>{let[t,n]=ex(e,"@");t||(t=n,n="");let[s,c]=EN(t,":"),h="",p="";if(n&&(n.includes(":")?[h,p]=ex(n,":"):(h="",p=n),p&&(p=parseInt(p,10),isNaN(p)||p<0||p>65535)))throw new Error(`invalid port: ${p}`);return{name:s,data:c||"",listen_host:h,listen_port:p}},"parseMode"),Mu=i((e,t)=>t.filter(n=>n.type===e).map(n=>QB(n.full_spec)),"getModesOfType");var fA="MODE_REGULAR_TOGGLE",pA="MODE_REGULAR_SET_PORT",Qx="MODE_REGULAR_ERROR",JB=8080,ZB={active:!0},cA=i(e=>Au("regular",e.regular),"getMode"),dA=i(()=>async e=>{e({type:fA});try{await e(go())}catch(t){e({type:Qx,error:t.message})}},"toggleRegular"),hA=i(e=>async t=>{t({type:pA,port:e});try{await t(go())}catch(n){t({type:Qx,error:n.message})}},"setPort"),eH=i((e=ZB,t)=>{switch(t.type){case fA:return{...e,active:!e.active,error:void 0};case pA:return{...e,listen_port:t.port,error:void 0};case ia:case na:if(t.data&&t.data.servers){let n=Mu("regular",t.data.servers)[0],s=n!==void 0;return{...e,active:s,listen_host:s?n.listen_host:e.listen_host,listen_port:s?n.listen_port||JB:e.listen_port,error:s?void 0:e.error}}return e;case Qx:return{...e,error:t.error};default:return e}},"regularReducer"),gA=eH;var tH=Zp({regular:gA,local:KO,wireguard:ZO,reverse:uA}),mA=tH;var rH={commandBar:Kx,eventLog:Ux,flows:_x,connection:Vx,modes:mA,ui:DO,options:Gx,options_meta:UO,backendState:Yx},af=hO({reducer:rH,middleware:i(e=>e({immutableCheck:{warnAfter:5e5},serializableCheck:{warnAfter:5e5}}),"middleware")});var mo=he(Ne());var vA=he(cg()),yA=he(Zn());var Jx=class extends mo.Component{constructor(){super(...arguments);this.container=mo.default.createRef();this.nameInput=mo.default.createRef();this.valueInput=mo.default.createRef();this.render=i(()=>{let[n,s]=this.props.item;return mo.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},mo.default.createElement(hn,{ref:this.nameInput,className:"kv-key",content:n,onEditStart:this.props.onEditStart,onEditDone:c=>this.props.onEditDone([c,s])}),":\xA0",mo.default.createElement(hn,{ref:this.valueInput,className:"kv-value",content:s,onEditStart:this.props.onEditStart,onEditDone:c=>this.props.onEditDone([n,c]),placeholder:"empty"}))},"render");this.onClick=i(n=>{n.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=i(n=>{n.target===this.valueInput.current?.input.current&&n.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}static{i(this,"Row")}},id=class extends mo.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=i(()=>{this.rowRefs={};let n=this.state.currentList.map((s,c)=>mo.default.createElement(Jx,{key:c,item:s,onEditStart:()=>this.currentlyEditing=c,onEditDone:h=>this.onEditDone(c,h),onClickEmptyArea:()=>this.onClickEmptyArea(c),onTabNext:()=>this.onTabNext(c),ref:h=>this.rowRefs[c]=h}));return mo.default.createElement("div",{className:(0,yA.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},n,mo.default.createElement("div",{onClick:s=>{s.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"}))},"render");this.onEditDone=i((n,s)=>{let c=[...this.state.currentList];s[0]?c[n]=s:c.splice(n,1),this.currentlyEditing=void 0,(0,vA.isEqual)(this.state.currentList,c)||this.props.onChange(c),this.setState({currentList:c})},"onEditDone");this.onClickEmptyArea=i(n=>{if(this.justFinishedEditing)return;let s=[...this.state.currentList];s.splice(n+1,0,["",""]),this.setState({currentList:s},()=>this.rowRefs[n+1]?.nameInput.current?.startEditing())},"onClickEmptyArea");this.onTabNext=i(n=>{n==this.state.currentList.length-1&&this.onClickEmptyArea(n)},"onTabNext");this.onMouseDown=i(n=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static{i(this,"KeyValueListEditor")}static getDerivedStateFromProps(n,s){return n.data!==s.initialList?{currentList:n.data||[],initialList:n.data}:null}};var er=he(Ne());var xg=he(Ne());function Xy(e,t){let[n,s]=(0,xg.useState)(),[c,h]=(0,xg.useState)();return(0,xg.useEffect)(()=>{c&&c.abort();let p=new AbortController;return bt(e,{signal:p.signal}).then(v=>{if(!v.ok)throw`${v.status} ${v.statusText}`.trim();return v.text()}).then(v=>{s(v)}).catch(v=>{p.signal.aborted||s(`Error getting content: ${v}.`)}),h(p),()=>{p.signal.aborted||p.abort()}},[e,t]),n}i(Xy,"useContent");var _g=he(Ne());var Qy=_g.default.memo(i(function({icon:t,text:n,className:s,title:c,onOpenFile:h,onClick:p}){let v;return _g.default.createElement("a",{href:"#",onClick:S=>{v.click(),p&&p(S)},className:s,title:c},_g.default.createElement("i",{className:"fa fa-fw "+t}),n,_g.default.createElement("input",{ref:S=>v=S,className:"hidden",type:"file",onChange:S=>{S.preventDefault(),S.target.files&&S.target.files.length>0&&h(S.target.files[0]),v.value=""}}))},"FileChooser"));var od=he(Ne()),wA=he(Zn());function Ar({onClick:e,children:t,icon:n,disabled:s,className:c,title:h}){return od.createElement("button",{className:(0,wA.default)(c,"btn btn-default"),onClick:s?void 0:e,disabled:s,title:h},n&&od.createElement(od.Fragment,null,od.createElement("i",{className:"fa "+n}),"\xA0"),t)}i(Ar,"Button");var bg=he(Ne()),bA=he(Ne());var Cg=he(Ne()),_A=he(Zn()),CA=he(SA()),EA=he(cg());function xA(e){return e&&e.replace(/\r\n|\r/g,` -`)}i(xA,"normalizeLineEndings");var Eg=class extends Cg.Component{static{i(this,"CodeMirror")}constructor(t){super(t),this.state={isFocused:!1}}static{this.defaultProps={preserveScrollPosition:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||CA.default}UNSAFE_componentWillMount(){this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")}componentDidMount(){let t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged.bind(this)),this.codeMirror.on("cursorActivity",this.cursorActivity.bind(this)),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged.bind(this)),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")}componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()}UNSAFE_componentWillReceiveProps(t){if(this.codeMirror&&t.value!==void 0&&t.value!==this.props.value&&xA(this.codeMirror.getValue())!==xA(t.value))if(this.props.preserveScrollPosition){let n=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(n.left,n.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let n in t.options)t.options.hasOwnProperty(n)&&this.setOptionIfChanged(n,t.options[n])}setOptionIfChanged(t,n){let s=this.codeMirror.getOption(t);(0,EA.isEqual)(s,n)||this.codeMirror.setOption(t,n)}getCodeMirror(){return this.codeMirror}focus(){this.codeMirror&&this.codeMirror.focus()}focusChanged(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)}cursorActivity(t){this.props.onCursorActivity&&this.props.onCursorActivity(t)}scrollChanged(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())}codemirrorValueChanged(t,n){this.props.onChange&&n.origin!=="setValue"&&this.props.onChange(t.getValue(),n)}render(){let t=(0,_A.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return Cg.createElement("div",{className:t},Cg.createElement("textarea",{ref:n=>this.textareaNode=n,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};var Tg=class extends bA.Component{constructor(){super(...arguments);this.editor=bg.createRef();this.getContent=i(()=>this.editor.current?.codeMirror.getValue(),"getContent");this.render=i(()=>{let n={lineNumbers:!0};return bg.createElement("div",{className:"codeeditor",onKeyDown:s=>s.stopPropagation()},bg.createElement(Eg,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:n}))},"render")}static{i(this,"CodeEditor")}};var uf=he(Ne());var nH=uf.default.memo(i(function({lines:t,maxLines:n,showMore:s}){return t.length===0?null:uf.default.createElement("pre",null,t.map((c,h)=>h===n?uf.default.createElement("button",{key:"showmore",onClick:s,className:"btn btn-xs btn-info"},uf.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," ","Show more"):uf.default.createElement("div",{key:h},c.map(([p,v],S)=>uf.default.createElement("span",{key:S,className:p},v)))))},"LineRenderer")),Jy=nH;var yf=he(Ne());var gi=he(Ne());var Zy=he(Ne());var t_=i(function(t){return t.reduce(function(n,s){var c=s[0],h=s[1];return n[c]=h,n},{})},"fromEntries"),r_=typeof window<"u"&&window.document&&window.document.createElement?Zy.useLayoutEffect:Zy.useEffect;var Ru=he(Ne()),YA=he(qS());var Mr="top",gn="bottom",Zr="right",Ur="left",e0="auto",Lu=[Mr,gn,Zr,Ur],oa="start",cf="end",TA="clippingParents",t0="viewport",sd="popper",kA="reference",n_=Lu.reduce(function(e,t){return e.concat([t+"-"+oa,t+"-"+cf])},[]),r0=[].concat(Lu,[e0]).reduce(function(e,t){return e.concat([t,t+"-"+oa,t+"-"+cf])},[]),iH="beforeRead",oH="read",sH="afterRead",lH="beforeMain",aH="main",uH="afterMain",cH="beforeWrite",fH="write",pH="afterWrite",NA=[iH,oH,sH,lH,aH,uH,cH,fH,pH];function Nn(e){return e?(e.nodeName||"").toLowerCase():null}i(Nn,"getNodeName");function pr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}i(pr,"getWindow");function $o(e){var t=pr(e).Element;return e instanceof t||e instanceof Element}i($o,"isElement");function mn(e){var t=pr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}i(mn,"isHTMLElement");function ld(e){if(typeof ShadowRoot>"u")return!1;var t=pr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}i(ld,"isShadowRoot");function dH(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},c=t.attributes[n]||{},h=t.elements[n];!mn(h)||!Nn(h)||(Object.assign(h.style,s),Object.keys(c).forEach(function(p){var v=c[p];v===!1?h.removeAttribute(p):h.setAttribute(p,v===!0?"":v)}))})}i(dH,"applyStyles");function hH(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var c=t.elements[s],h=t.attributes[s]||{},p=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),v=p.reduce(function(S,b){return S[b]="",S},{});!mn(c)||!Nn(c)||(Object.assign(c.style,v),Object.keys(h).forEach(function(S){c.removeAttribute(S)}))})}}i(hH,"effect");var OA={name:"applyStyles",enabled:!0,phase:"write",fn:dH,effect:hH,requires:["computeStyles"]};function On(e){return e.split("-")[0]}i(On,"getBasePlacement");var xs=Math.max,ff=Math.min,sa=Math.round;function ad(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}i(ad,"getUAString");function kg(){return!/^((?!chrome|android).)*safari/i.test(ad())}i(kg,"isLayoutViewport");function Vo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),c=1,h=1;t&&mn(e)&&(c=e.offsetWidth>0&&sa(s.width)/e.offsetWidth||1,h=e.offsetHeight>0&&sa(s.height)/e.offsetHeight||1);var p=$o(e)?pr(e):window,v=p.visualViewport,S=!kg()&&n,b=(s.left+(S&&v?v.offsetLeft:0))/c,k=(s.top+(S&&v?v.offsetTop:0))/h,D=s.width/c,M=s.height/h;return{width:D,height:M,top:k,right:b+D,bottom:k+M,left:b,x:b,y:k}}i(Vo,"getBoundingClientRect");function pf(e){var t=Vo(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}i(pf,"getLayoutRect");function Ng(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ld(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}i(Ng,"contains");function hi(e){return pr(e).getComputedStyle(e)}i(hi,"getComputedStyle");function i_(e){return["table","td","th"].indexOf(Nn(e))>=0}i(i_,"isTableElement");function Un(e){return(($o(e)?e.ownerDocument:e.document)||window.document).documentElement}i(Un,"getDocumentElement");function la(e){return Nn(e)==="html"?e:e.assignedSlot||e.parentNode||(ld(e)?e.host:null)||Un(e)}i(la,"getParentNode");function AA(e){return!mn(e)||hi(e).position==="fixed"?null:e.offsetParent}i(AA,"getTrueOffsetParent");function gH(e){var t=/firefox/i.test(ad()),n=/Trident/i.test(ad());if(n&&mn(e)){var s=hi(e);if(s.position==="fixed")return null}var c=la(e);for(ld(c)&&(c=c.host);mn(c)&&["html","body"].indexOf(Nn(c))<0;){var h=hi(c);if(h.transform!=="none"||h.perspective!=="none"||h.contain==="paint"||["transform","perspective"].indexOf(h.willChange)!==-1||t&&h.willChange==="filter"||t&&h.filter&&h.filter!=="none")return c;c=c.parentNode}return null}i(gH,"getContainingBlock");function _s(e){for(var t=pr(e),n=AA(e);n&&i_(n)&&hi(n).position==="static";)n=AA(n);return n&&(Nn(n)==="html"||Nn(n)==="body"&&hi(n).position==="static")?t:n||gH(e)||t}i(_s,"getOffsetParent");function df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}i(df,"getMainAxisFromPlacement");function hf(e,t,n){return xs(e,ff(t,n))}i(hf,"within");function MA(e,t,n){var s=hf(e,t,n);return s>n?n:s}i(MA,"withinMaxClamp");function Og(){return{top:0,right:0,bottom:0,left:0}}i(Og,"getFreshSideObject");function Ag(e){return Object.assign({},Og(),e)}i(Ag,"mergePaddingObject");function Mg(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}i(Mg,"expandToHashMap");var mH=i(function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ag(typeof t!="number"?t:Mg(t,Lu))},"toPaddingObject");function vH(e){var t,n=e.state,s=e.name,c=e.options,h=n.elements.arrow,p=n.modifiersData.popperOffsets,v=On(n.placement),S=df(v),b=[Ur,Zr].indexOf(v)>=0,k=b?"height":"width";if(!(!h||!p)){var D=mH(c.padding,n),M=pf(h),z=S==="y"?Mr:Ur,q=S==="y"?gn:Zr,Q=n.rects.reference[k]+n.rects.reference[S]-p[S]-n.rects.popper[k],ie=p[S]-n.rects.reference[S],I=_s(h),L=I?S==="y"?I.clientHeight||0:I.clientWidth||0:0,B=Q/2-ie/2,G=D[z],re=L-M[k]-D[q],Z=L/2-M[k]/2+B,oe=hf(G,Z,re),de=S;n.modifiersData[s]=(t={},t[de]=oe,t.centerOffset=oe-Z,t)}}i(vH,"arrow");function yH(e){var t=e.state,n=e.options,s=n.element,c=s===void 0?"[data-popper-arrow]":s;c!=null&&(typeof c=="string"&&(c=t.elements.popper.querySelector(c),!c)||Ng(t.elements.popper,c)&&(t.elements.arrow=c))}i(yH,"effect");var LA={name:"arrow",enabled:!0,phase:"main",fn:vH,effect:yH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qo(e){return e.split("-")[1]}i(qo,"getVariation");var wH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function SH(e,t){var n=e.x,s=e.y,c=t.devicePixelRatio||1;return{x:sa(n*c)/c||0,y:sa(s*c)/c||0}}i(SH,"roundOffsetsByDPR");function PA(e){var t,n=e.popper,s=e.popperRect,c=e.placement,h=e.variation,p=e.offsets,v=e.position,S=e.gpuAcceleration,b=e.adaptive,k=e.roundOffsets,D=e.isFixed,M=p.x,z=M===void 0?0:M,q=p.y,Q=q===void 0?0:q,ie=typeof k=="function"?k({x:z,y:Q}):{x:z,y:Q};z=ie.x,Q=ie.y;var I=p.hasOwnProperty("x"),L=p.hasOwnProperty("y"),B=Ur,G=Mr,re=window;if(b){var Z=_s(n),oe="clientHeight",de="clientWidth";if(Z===pr(n)&&(Z=Un(n),hi(Z).position!=="static"&&v==="absolute"&&(oe="scrollHeight",de="scrollWidth")),Z=Z,c===Mr||(c===Ur||c===Zr)&&h===cf){G=gn;var Re=D&&Z===re&&re.visualViewport?re.visualViewport.height:Z[oe];Q-=Re-s.height,Q*=S?1:-1}if(c===Ur||(c===Mr||c===gn)&&h===cf){B=Zr;var Ce=D&&Z===re&&re.visualViewport?re.visualViewport.width:Z[de];z-=Ce-s.width,z*=S?1:-1}}var Ye=Object.assign({position:v},b&&wH),tt=k===!0?SH({x:z,y:Q},pr(n)):{x:z,y:Q};if(z=tt.x,Q=tt.y,S){var Se;return Object.assign({},Ye,(Se={},Se[G]=L?"0":"",Se[B]=I?"0":"",Se.transform=(re.devicePixelRatio||1)<=1?"translate("+z+"px, "+Q+"px)":"translate3d("+z+"px, "+Q+"px, 0)",Se))}return Object.assign({},Ye,(t={},t[G]=L?Q+"px":"",t[B]=I?z+"px":"",t.transform="",t))}i(PA,"mapToStyles");function xH(e){var t=e.state,n=e.options,s=n.gpuAcceleration,c=s===void 0?!0:s,h=n.adaptive,p=h===void 0?!0:h,v=n.roundOffsets,S=v===void 0?!0:v,b={placement:On(t.placement),variation:qo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:c,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,PA(Object.assign({},b,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:p,roundOffsets:S})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,PA(Object.assign({},b,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:S})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}i(xH,"computeStyles");var RA={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xH,data:{}};var n0={passive:!0};function _H(e){var t=e.state,n=e.instance,s=e.options,c=s.scroll,h=c===void 0?!0:c,p=s.resize,v=p===void 0?!0:p,S=pr(t.elements.popper),b=[].concat(t.scrollParents.reference,t.scrollParents.popper);return h&&b.forEach(function(k){k.addEventListener("scroll",n.update,n0)}),v&&S.addEventListener("resize",n.update,n0),function(){h&&b.forEach(function(k){k.removeEventListener("scroll",n.update,n0)}),v&&S.removeEventListener("resize",n.update,n0)}}i(_H,"effect");var DA={name:"eventListeners",enabled:!0,phase:"write",fn:i(function(){},"fn"),effect:_H,data:{}};var CH={left:"right",right:"left",bottom:"top",top:"bottom"};function ud(e){return e.replace(/left|right|bottom|top/g,function(t){return CH[t]})}i(ud,"getOppositePlacement");var EH={start:"end",end:"start"};function i0(e){return e.replace(/start|end/g,function(t){return EH[t]})}i(i0,"getOppositeVariationPlacement");function gf(e){var t=pr(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}i(gf,"getWindowScroll");function mf(e){return Vo(Un(e)).left+gf(e).scrollLeft}i(mf,"getWindowScrollBarX");function o_(e,t){var n=pr(e),s=Un(e),c=n.visualViewport,h=s.clientWidth,p=s.clientHeight,v=0,S=0;if(c){h=c.width,p=c.height;var b=kg();(b||!b&&t==="fixed")&&(v=c.offsetLeft,S=c.offsetTop)}return{width:h,height:p,x:v+mf(e),y:S}}i(o_,"getViewportRect");function s_(e){var t,n=Un(e),s=gf(e),c=(t=e.ownerDocument)==null?void 0:t.body,h=xs(n.scrollWidth,n.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),p=xs(n.scrollHeight,n.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),v=-s.scrollLeft+mf(e),S=-s.scrollTop;return hi(c||n).direction==="rtl"&&(v+=xs(n.clientWidth,c?c.clientWidth:0)-h),{width:h,height:p,x:v,y:S}}i(s_,"getDocumentRect");function vf(e){var t=hi(e),n=t.overflow,s=t.overflowX,c=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+c+s)}i(vf,"isScrollParent");function o0(e){return["html","body","#document"].indexOf(Nn(e))>=0?e.ownerDocument.body:mn(e)&&vf(e)?e:o0(la(e))}i(o0,"getScrollParent");function Pu(e,t){var n;t===void 0&&(t=[]);var s=o0(e),c=s===((n=e.ownerDocument)==null?void 0:n.body),h=pr(s),p=c?[h].concat(h.visualViewport||[],vf(s)?s:[]):s,v=t.concat(p);return c?v:v.concat(Pu(la(p)))}i(Pu,"listScrollParents");function cd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}i(cd,"rectToClientRect");function bH(e,t){var n=Vo(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}i(bH,"getInnerBoundingClientRect");function IA(e,t,n){return t===t0?cd(o_(e,n)):$o(t)?bH(t,n):cd(s_(Un(e)))}i(IA,"getClientRectFromMixedType");function TH(e){var t=Pu(la(e)),n=["absolute","fixed"].indexOf(hi(e).position)>=0,s=n&&mn(e)?_s(e):e;return $o(s)?t.filter(function(c){return $o(c)&&Ng(c,s)&&Nn(c)!=="body"}):[]}i(TH,"getClippingParents");function l_(e,t,n,s){var c=t==="clippingParents"?TH(e):[].concat(t),h=[].concat(c,[n]),p=h[0],v=h.reduce(function(S,b){var k=IA(e,b,s);return S.top=xs(k.top,S.top),S.right=ff(k.right,S.right),S.bottom=ff(k.bottom,S.bottom),S.left=xs(k.left,S.left),S},IA(e,p,s));return v.width=v.right-v.left,v.height=v.bottom-v.top,v.x=v.left,v.y=v.top,v}i(l_,"getClippingRect");function Lg(e){var t=e.reference,n=e.element,s=e.placement,c=s?On(s):null,h=s?qo(s):null,p=t.x+t.width/2-n.width/2,v=t.y+t.height/2-n.height/2,S;switch(c){case Mr:S={x:p,y:t.y-n.height};break;case gn:S={x:p,y:t.y+t.height};break;case Zr:S={x:t.x+t.width,y:v};break;case Ur:S={x:t.x-n.width,y:v};break;default:S={x:t.x,y:t.y}}var b=c?df(c):null;if(b!=null){var k=b==="y"?"height":"width";switch(h){case oa:S[b]=S[b]-(t[k]/2-n[k]/2);break;case cf:S[b]=S[b]+(t[k]/2-n[k]/2);break;default:}}return S}i(Lg,"computeOffsets");function Cs(e,t){t===void 0&&(t={});var n=t,s=n.placement,c=s===void 0?e.placement:s,h=n.strategy,p=h===void 0?e.strategy:h,v=n.boundary,S=v===void 0?TA:v,b=n.rootBoundary,k=b===void 0?t0:b,D=n.elementContext,M=D===void 0?sd:D,z=n.altBoundary,q=z===void 0?!1:z,Q=n.padding,ie=Q===void 0?0:Q,I=Ag(typeof ie!="number"?ie:Mg(ie,Lu)),L=M===sd?kA:sd,B=e.rects.popper,G=e.elements[q?L:M],re=l_($o(G)?G:G.contextElement||Un(e.elements.popper),S,k,p),Z=Vo(e.elements.reference),oe=Lg({reference:Z,element:B,strategy:"absolute",placement:c}),de=cd(Object.assign({},B,oe)),Re=M===sd?de:Z,Ce={top:re.top-Re.top+I.top,bottom:Re.bottom-re.bottom+I.bottom,left:re.left-Re.left+I.left,right:Re.right-re.right+I.right},Ye=e.modifiersData.offset;if(M===sd&&Ye){var tt=Ye[c];Object.keys(Ce).forEach(function(Se){var Xe=[Zr,gn].indexOf(Se)>=0?1:-1,qe=[Mr,gn].indexOf(Se)>=0?"y":"x";Ce[Se]+=tt[qe]*Xe})}return Ce}i(Cs,"detectOverflow");function a_(e,t){t===void 0&&(t={});var n=t,s=n.placement,c=n.boundary,h=n.rootBoundary,p=n.padding,v=n.flipVariations,S=n.allowedAutoPlacements,b=S===void 0?r0:S,k=qo(s),D=k?v?n_:n_.filter(function(q){return qo(q)===k}):Lu,M=D.filter(function(q){return b.indexOf(q)>=0});M.length===0&&(M=D);var z=M.reduce(function(q,Q){return q[Q]=Cs(e,{placement:Q,boundary:c,rootBoundary:h,padding:p})[On(Q)],q},{});return Object.keys(z).sort(function(q,Q){return z[q]-z[Q]})}i(a_,"computeAutoPlacement");function kH(e){if(On(e)===e0)return[];var t=ud(e);return[i0(e),t,i0(t)]}i(kH,"getExpandedFallbackPlacements");function NH(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var c=n.mainAxis,h=c===void 0?!0:c,p=n.altAxis,v=p===void 0?!0:p,S=n.fallbackPlacements,b=n.padding,k=n.boundary,D=n.rootBoundary,M=n.altBoundary,z=n.flipVariations,q=z===void 0?!0:z,Q=n.allowedAutoPlacements,ie=t.options.placement,I=On(ie),L=I===ie,B=S||(L||!q?[ud(ie)]:kH(ie)),G=[ie].concat(B).reduce(function(hr,gr){return hr.concat(On(gr)===e0?a_(t,{placement:gr,boundary:k,rootBoundary:D,padding:b,flipVariations:q,allowedAutoPlacements:Q}):gr)},[]),re=t.rects.reference,Z=t.rects.popper,oe=new Map,de=!0,Re=G[0],Ce=0;Ce=0,qe=Xe?"width":"height",Qe=Cs(t,{placement:Ye,boundary:k,rootBoundary:D,altBoundary:M,padding:b}),ot=Xe?Se?Zr:Ur:Se?gn:Mr;re[qe]>Z[qe]&&(ot=ud(ot));var Pt=ud(ot),Tt=[];if(h&&Tt.push(Qe[tt]<=0),v&&Tt.push(Qe[ot]<=0,Qe[Pt]<=0),Tt.every(function(hr){return hr})){Re=Ye,de=!1;break}oe.set(Ye,Tt)}if(de)for(var rn=q?3:1,nn=i(function(gr){var qt=G.find(function(Rt){var se=oe.get(Rt);if(se)return se.slice(0,gr).every(function(ze){return ze})});if(qt)return Re=qt,"break"},"_loop"),dr=rn;dr>0;dr--){var Ht=nn(dr);if(Ht==="break")break}t.placement!==Re&&(t.modifiersData[s]._skip=!0,t.placement=Re,t.reset=!0)}}i(NH,"flip");var FA={name:"flip",enabled:!0,phase:"main",fn:NH,requiresIfExists:["offset"],data:{_skip:!1}};function BA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}i(BA,"getSideOffsets");function HA(e){return[Mr,Zr,gn,Ur].some(function(t){return e[t]>=0})}i(HA,"isAnySideFullyClipped");function OH(e){var t=e.state,n=e.name,s=t.rects.reference,c=t.rects.popper,h=t.modifiersData.preventOverflow,p=Cs(t,{elementContext:"reference"}),v=Cs(t,{altBoundary:!0}),S=BA(p,s),b=BA(v,c,h),k=HA(S),D=HA(b);t.modifiersData[n]={referenceClippingOffsets:S,popperEscapeOffsets:b,isReferenceHidden:k,hasPopperEscaped:D},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":k,"data-popper-escaped":D})}i(OH,"hide");var zA={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:OH};function AH(e,t,n){var s=On(e),c=[Ur,Mr].indexOf(s)>=0?-1:1,h=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,p=h[0],v=h[1];return p=p||0,v=(v||0)*c,[Ur,Zr].indexOf(s)>=0?{x:v,y:p}:{x:p,y:v}}i(AH,"distanceAndSkiddingToXY");function MH(e){var t=e.state,n=e.options,s=e.name,c=n.offset,h=c===void 0?[0,0]:c,p=r0.reduce(function(k,D){return k[D]=AH(D,t.rects,h),k},{}),v=p[t.placement],S=v.x,b=v.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=S,t.modifiersData.popperOffsets.y+=b),t.modifiersData[s]=p}i(MH,"offset");var WA={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:MH};function LH(e){var t=e.state,n=e.name;t.modifiersData[n]=Lg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}i(LH,"popperOffsets");var UA={name:"popperOffsets",enabled:!0,phase:"read",fn:LH,data:{}};function u_(e){return e==="x"?"y":"x"}i(u_,"getAltAxis");function PH(e){var t=e.state,n=e.options,s=e.name,c=n.mainAxis,h=c===void 0?!0:c,p=n.altAxis,v=p===void 0?!1:p,S=n.boundary,b=n.rootBoundary,k=n.altBoundary,D=n.padding,M=n.tether,z=M===void 0?!0:M,q=n.tetherOffset,Q=q===void 0?0:q,ie=Cs(t,{boundary:S,rootBoundary:b,padding:D,altBoundary:k}),I=On(t.placement),L=qo(t.placement),B=!L,G=df(I),re=u_(G),Z=t.modifiersData.popperOffsets,oe=t.rects.reference,de=t.rects.popper,Re=typeof Q=="function"?Q(Object.assign({},t.rects,{placement:t.placement})):Q,Ce=typeof Re=="number"?{mainAxis:Re,altAxis:Re}:Object.assign({mainAxis:0,altAxis:0},Re),Ye=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(Z){if(h){var Se,Xe=G==="y"?Mr:Ur,qe=G==="y"?gn:Zr,Qe=G==="y"?"height":"width",ot=Z[G],Pt=ot+ie[Xe],Tt=ot-ie[qe],rn=z?-de[Qe]/2:0,nn=L===oa?oe[Qe]:de[Qe],dr=L===oa?-de[Qe]:-oe[Qe],Ht=t.elements.arrow,hr=z&&Ht?pf(Ht):{width:0,height:0},gr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Og(),qt=gr[Xe],Rt=gr[qe],se=hf(0,oe[Qe],hr[Qe]),ze=B?oe[Qe]/2-rn-se-qt-Ce.mainAxis:nn-se-qt-Ce.mainAxis,$r=B?-oe[Qe]/2+rn+se+Rt+Ce.mainAxis:dr+se+Rt+Ce.mainAxis,Xt=t.elements.arrow&&_s(t.elements.arrow),st=Xt?G==="y"?Xt.clientTop||0:Xt.clientLeft||0:0,Fe=(Se=Ye?.[G])!=null?Se:0,Mn=ot+ze-Fe-st,yn=ot+$r-Fe,Fi=hf(z?ff(Pt,Mn):Pt,ot,z?xs(Tt,yn):Tt);Z[G]=Fi,tt[G]=Fi-ot}if(v){var wo,at=G==="x"?Mr:Ur,mr=G==="x"?gn:Zr,ar=Z[re],dt=re==="y"?"height":"width",Bi=ar+ie[at],Ln=ar-ie[mr],mi=[Mr,Ur].indexOf(I)!==-1,Vr=(wo=Ye?.[re])!=null?wo:0,qr=mi?Bi:ar-oe[dt]-de[dt]-Vr+Ce.altAxis,Hi=mi?ar+oe[dt]+de[dt]-Vr-Ce.altAxis:Ln,ti=z&&mi?MA(qr,ar,Hi):hf(z?qr:Bi,ar,z?Hi:Ln);Z[re]=ti,tt[re]=ti-ar}t.modifiersData[s]=tt}}i(PH,"preventOverflow");var $A={name:"preventOverflow",enabled:!0,phase:"main",fn:PH,requiresIfExists:["offset"]};function c_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}i(c_,"getHTMLElementScroll");function f_(e){return e===pr(e)||!mn(e)?gf(e):c_(e)}i(f_,"getNodeScroll");function RH(e){var t=e.getBoundingClientRect(),n=sa(t.width)/e.offsetWidth||1,s=sa(t.height)/e.offsetHeight||1;return n!==1||s!==1}i(RH,"isElementScaled");function p_(e,t,n){n===void 0&&(n=!1);var s=mn(t),c=mn(t)&&RH(t),h=Un(t),p=Vo(e,c,n),v={scrollLeft:0,scrollTop:0},S={x:0,y:0};return(s||!s&&!n)&&((Nn(t)!=="body"||vf(h))&&(v=f_(t)),mn(t)?(S=Vo(t,!0),S.x+=t.clientLeft,S.y+=t.clientTop):h&&(S.x=mf(h))),{x:p.left+v.scrollLeft-S.x,y:p.top+v.scrollTop-S.y,width:p.width,height:p.height}}i(p_,"getCompositeRect");function DH(e){var t=new Map,n=new Set,s=[];e.forEach(function(h){t.set(h.name,h)});function c(h){n.add(h.name);var p=[].concat(h.requires||[],h.requiresIfExists||[]);p.forEach(function(v){if(!n.has(v)){var S=t.get(v);S&&c(S)}}),s.push(h)}return i(c,"sort"),e.forEach(function(h){n.has(h.name)||c(h)}),s}i(DH,"order");function d_(e){var t=DH(e);return NA.reduce(function(n,s){return n.concat(t.filter(function(c){return c.phase===s}))},[])}i(d_,"orderModifiers");function h_(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}i(h_,"debounce");function g_(e){var t=e.reduce(function(n,s){var c=n[s.name];return n[s.name]=c?Object.assign({},c,s,{options:Object.assign({},c.options,s.options),data:Object.assign({},c.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}i(g_,"mergeByName");var VA={placement:"bottom",modifiers:[],strategy:"absolute"};function qA(){for(var e=arguments.length,t=new Array(e),n=0;ngi.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function An({onClick:e,children:t,...n}){return gi.default.createElement("li",null,gi.default.createElement("a",{href:"#",onClick:i(c=>{c.preventDefault(),e()},"click"),...n},t))}i(An,"MenuItem");var ol=gi.default.memo(i(function({text:t,children:n,options:s,className:c,onOpen:h,...p}){let[v,S]=(0,gi.useState)(null),[b,k]=(0,gi.useState)(!1),[D,M]=(0,gi.useState)(null),{styles:z,attributes:q}=v_(v,D,{...s}),Q=i(I=>{k(I),h&&h(I)},"setOpen");(0,gi.useEffect)(()=>{D&&document.addEventListener("click",I=>{D.contains(I.target)?document.addEventListener("click",()=>Q(!1),{once:!0}):(I.preventDefault(),I.stopPropagation(),Q(!1))},{once:!0,capture:!0})},[D]);let ie;return b?ie=gi.default.createElement("ul",{className:"dropdown-menu show",ref:M,style:z.popper,...q.popper},n):ie=null,gi.default.createElement(gi.default.Fragment,null,gi.default.createElement("a",{href:"#",ref:S,className:(0,QA.default)(c,{open:b}),onClick:I=>{I.preventDefault(),Q(!0)},...p},t),ie)},"Dropdown"));function Pg({value:e,onChange:t}){let n=be(c=>c.backendState.contentViews||[]),s=yf.default.createElement("span",null,yf.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",yf.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",yf.default.createElement("span",{className:"caret"}));return yf.default.createElement(ol,{text:s,className:"btn btn-default btn-xs",options:{placement:"top-end"}},n.map(c=>yf.default.createElement(An,{key:c,onClick:()=>t(c)},c.toLowerCase().replace("_"," "))))}i(Pg,"ViewSelector");function w_({flow:e,message:t}){let n=Ke(),s=e.request===t?"request":"response",c=be(q=>q.ui.flow.contentViewFor[e.id+s]||"Auto"),h=(0,er.useRef)(null),[p,v]=(0,er.useState)(be(q=>q.options.content_view_lines_cutoff)),S=(0,er.useCallback)(()=>v(Math.max(1024,p*2)),[p]),[b,k]=(0,er.useState)(!1),D;b?D=kn.getContentURL(e,t):D=kn.getContentURL(e,t,c,p+1);let M=Xy(D,t.contentHash),z=(0,er.useMemo)(()=>{if(M&&!b)try{return JSON.parse(M)}catch{return{description:"Network Error",lines:[[["error",`${M}`]]]}}else return},[M]);if(b)return er.default.createElement("div",{className:"contentview",key:"edit"},er.default.createElement("div",{className:"controls"},er.default.createElement("h5",null,"[Editing]"),er.default.createElement(Ar,{onClick:i(async()=>{let Q=h.current?.getContent();await n(Jn(e,{[s]:{content:Q}})),k(!1)},"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",er.default.createElement(Ar,{onClick:()=>k(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),er.default.createElement(Tg,{ref:h,initialContent:M||""}));{let q=z?z.description:"Loading...";return er.default.createElement("div",{className:"contentview",key:"view"},er.default.createElement("div",{className:"controls"},er.default.createElement("h5",null,q),er.default.createElement(Ar,{onClick:()=>k(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",er.default.createElement(Qy,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Q=>n(FN(e,Q,s)),className:"btn btn-default btn-xs"}),"\xA0",er.default.createElement(Pg,{value:c,onChange:Q=>n(wy(e.id+s,Q))})),y_.matches(t)&&er.default.createElement(y_,{flow:e,message:t}),er.default.createElement(Jy,{lines:z?.lines||[],maxLines:p,showMore:S}))}}i(w_,"HttpMessage");var UH=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon|svg\+xml)$/i;y_.matches=e=>UH.test(kn.getContentType(e)||"");function y_({flow:e,message:t}){return er.default.createElement("div",{className:"flowview-image"},er.default.createElement("img",{src:kn.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}i(y_,"ViewImage");function $H({flow:e}){let t=Ke();return Ut.createElement("div",{className:"first-line request-line"},Ut.createElement("div",null,Ut.createElement(of,{content:e.request.method,onEditDone:n=>t(Jn(e,{request:{method:n}})),isValid:n=>n.length>0}),"\xA0",Ut.createElement(of,{content:ys.pretty_url(e.request),onEditDone:n=>t(Jn(e,{request:{path:"",...px(n)}})),isValid:n=>!!px(n)?.host}),"\xA0",Ut.createElement(of,{content:e.request.http_version,onEditDone:n=>t(Jn(e,{request:{http_version:n}})),isValid:dx})))}i($H,"RequestLine");function VH({flow:e}){let t=Ke();return Ut.createElement("div",{className:"first-line response-line"},Ut.createElement(of,{content:e.response.http_version,onEditDone:n=>t(Jn(e,{response:{http_version:n}})),isValid:dx}),"\xA0",Ut.createElement(of,{content:e.response.status_code+"",onEditDone:n=>t(Jn(e,{response:{code:parseInt(n)}})),isValid:n=>/^\d+$/.test(n)}),e.response.http_version!=="HTTP/2.0"&&Ut.createElement(Ut.Fragment,null,"\xA0",Ut.createElement(hn,{content:e.response.reason,onEditDone:n=>t(Jn(e,{response:{msg:n}}))})))}i(VH,"ResponseLine");function qH({flow:e,message:t}){let n=Ke(),s=e.request===t?"request":"response";return Ut.createElement(id,{className:"headers",data:t.headers,onChange:c=>n(Jn(e,{[s]:{headers:c}}))})}i(qH,"Headers");function jH({flow:e,message:t}){let n=Ke(),s=e.request===t?"request":"response";return!kn.get_first_header(t,/^trailer$/i)?null:Ut.createElement(Ut.Fragment,null,Ut.createElement("hr",null),Ut.createElement("h5",null,"HTTP Trailers"),Ut.createElement(id,{className:"trailers",data:t.trailers,onChange:h=>n(Jn(e,{[s]:{trailers:h}}))}))}i(jH,"Trailers");var ZA=Ut.memo(i(function({flow:t,message:n}){let s=t.request===n?"request":"response",c=t.request===n?$H:VH;return Ut.createElement("section",{className:s},Ut.createElement(c,{flow:t}),Ut.createElement(qH,{flow:t,message:n}),Ut.createElement("hr",null),Ut.createElement(w_,{key:t.id+s,flow:t,message:n}),Ut.createElement(jH,{flow:t,message:n}))},"Message"));function S_(){let e=be(t=>t.flows.byId[t.flows.selected[0]]);return Ut.createElement(ZA,{flow:e,message:e.request})}i(S_,"Request");S_.displayName="Request";function x_(){let e=be(t=>t.flows.byId[t.flows.selected[0]]);return Ut.createElement(ZA,{flow:e,message:e.response})}i(x_,"Response");x_.displayName="Response";var et=he(Ne());var GH=i(({message:e})=>et.createElement("div",null,e.query?e.op_code:e.response_code,"\xA0",e.truncation?"(Truncated)":""),"Summary"),KH=i(({message:e})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e.recursion_desired?"Recursive ":"","Question"),et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"))),et.createElement("tbody",null,e.questions.map((t,n)=>et.createElement("tr",{key:n},et.createElement("td",null,t.name),et.createElement("td",null,t.type),et.createElement("td",null,t.class)))))),"Questions"),__=i(({name:e,values:t})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e),t.length>0?et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"),et.createElement("th",null,"TTL"),et.createElement("th",null,"Data"))),et.createElement("tbody",null,t.map((n,s)=>et.createElement("tr",{key:s},et.createElement("td",null,n.name),et.createElement("td",null,n.type),et.createElement("td",null,n.class),et.createElement("td",null,n.ttl),et.createElement("td",null,n.data))))):"\u2014"),"ResourceRecords"),eM=i(({type:e,message:t})=>et.createElement("section",{className:"dns-"+e},et.createElement("div",{className:`first-line ${e}-line`},et.createElement(GH,{message:t})),et.createElement(KH,{message:t}),et.createElement("hr",null),et.createElement(__,{name:`${t.authoritative_answer?"Authoritative ":""}${t.recursion_available?"Recursive ":""}Answer`,values:t.answers}),et.createElement("hr",null),et.createElement(__,{name:"Authority",values:t.authorities}),et.createElement("hr",null),et.createElement(__,{name:"Additional",values:t.additionals})),"Message");function C_(){let e=be(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(eM,{type:"request",message:e.request})}i(C_,"Request");C_.displayName="Request";function E_(){let e=be(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(eM,{type:"response",message:e.response})}i(E_,"Response");E_.displayName="Response";var Ee=he(Ne());function tM({conn:e}){let t=null;return"address"in e?t=Ee.createElement(Ee.Fragment,null,Ee.createElement("tr",null,Ee.createElement("td",null,"Address:"),Ee.createElement("td",null,e.address?.join(":"))),e.peername&&Ee.createElement("tr",null,Ee.createElement("td",null,"Resolved address:"),Ee.createElement("td",null,e.peername.join(":"))),e.sockname&&Ee.createElement("tr",null,Ee.createElement("td",null,"Source address:"),Ee.createElement("td",null,e.sockname.join(":")))):e.peername?.[0]&&(t=Ee.createElement(Ee.Fragment,null,Ee.createElement("tr",null,Ee.createElement("td",null,"Address:"),Ee.createElement("td",null,e.peername?.join(":"))))),Ee.createElement("table",{className:"connection-table"},Ee.createElement("tbody",null,t,e.sni?Ee.createElement("tr",null,Ee.createElement("td",null,Ee.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),Ee.createElement("td",null,e.sni)):null,e.alpn?Ee.createElement("tr",null,Ee.createElement("td",null,Ee.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),Ee.createElement("td",null,e.alpn)):null,e.tls_version?Ee.createElement("tr",null,Ee.createElement("td",null,"TLS Version:"),Ee.createElement("td",null,e.tls_version)):null,e.cipher?Ee.createElement("tr",null,Ee.createElement("td",null,"TLS Cipher:"),Ee.createElement("td",null,e.cipher)):null))}i(tM,"ConnectionInfo");function rM(e){return Ee.createElement("dl",{className:"cert-attributes"},e.map(([t,n])=>Ee.createElement(Ee.Fragment,{key:t},Ee.createElement("dt",null,t),Ee.createElement("dd",null,n))))}i(rM,"attrList");function YH({flow:e}){let t=e.server_conn?.cert;return t?Ee.createElement(Ee.Fragment,null,Ee.createElement("h4",{key:"name"},"Server Certificate"),Ee.createElement("table",{className:"certificate-table"},Ee.createElement("tbody",null,Ee.createElement("tr",null,Ee.createElement("td",null,"Type"),Ee.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),Ee.createElement("tr",null,Ee.createElement("td",null,"SHA256 digest"),Ee.createElement("td",null,t.sha256)),Ee.createElement("tr",null,Ee.createElement("td",null,"Valid from"),Ee.createElement("td",null,fo(t.notbefore,{milliseconds:!1}))),Ee.createElement("tr",null,Ee.createElement("td",null,"Valid to"),Ee.createElement("td",null,fo(t.notafter,{milliseconds:!1}))),Ee.createElement("tr",null,Ee.createElement("td",null,"Subject Alternative Names"),Ee.createElement("td",null,t.altnames.join(", "))),Ee.createElement("tr",null,Ee.createElement("td",null,"Subject"),Ee.createElement("td",null,rM(t.subject))),Ee.createElement("tr",null,Ee.createElement("td",null,"Issuer"),Ee.createElement("td",null,rM(t.issuer))),Ee.createElement("tr",null,Ee.createElement("td",null,"Serial"),Ee.createElement("td",null,t.serial))))):Ee.createElement(Ee.Fragment,null)}i(YH,"CertificateInfo");function l0({flow:e}){return Ee.createElement("section",{className:"detail"},Ee.createElement("h4",null,"Client Connection"),Ee.createElement(tM,{conn:e.client_conn}),e.server_conn?.address&&Ee.createElement(Ee.Fragment,null,Ee.createElement("h4",null,"Server Connection"),Ee.createElement(tM,{conn:e.server_conn})),Ee.createElement(YH,{flow:e}))}i(l0,"Connection");l0.displayName="Connection";var Rg=he(Ne());function a0({flow:e}){return Rg.createElement("section",{className:"error"},Rg.createElement("div",{className:"alert alert-warning"},e.error.msg,Rg.createElement("div",null,Rg.createElement("small",null,fo(e.error.timestamp)))))}i(a0,"Error");a0.displayName="Error";var Es=he(Ne());function XH({t:e,deltaTo:t,title:n}){return e?Es.createElement("tr",null,Es.createElement("td",null,n,":"),Es.createElement("td",null,fo(e),t&&Es.createElement("span",{className:"text-muted"},"(",xy(1e3*(e-t)),")"))):Es.createElement("tr",null)}i(XH,"TimeStamp");function u0({flow:e}){let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let n=[{title:"Server conn. initiated",t:e.server_conn?.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:e.server_conn?.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:e.server_conn?.timestamp_tls_setup,deltaTo:t},{title:"Server conn. closed",t:e.server_conn?.timestamp_end,deltaTo:t},{title:"Client conn. established",t:e.client_conn.timestamp_start,deltaTo:e.type==="http"?t:void 0},{title:"Client conn. TLS handshake",t:e.client_conn.timestamp_tls_setup,deltaTo:t},{title:"Client conn. closed",t:e.client_conn.timestamp_end,deltaTo:t}];return e.type==="http"&&n.push({title:"First request byte",t:e.request.timestamp_start},{title:"Request complete",t:e.request.timestamp_end,deltaTo:t},{title:"First response byte",t:e.response?.timestamp_start,deltaTo:t},{title:"Response complete",t:e.response?.timestamp_end,deltaTo:t}),Es.createElement("section",{className:"timing"},Es.createElement("h4",null,"Timing"),Es.createElement("table",{className:"timing-table"},Es.createElement("tbody",null,n.filter(s=>!!s.t).sort((s,c)=>s.t-c.t).map(({title:s,t:c,deltaTo:h})=>Es.createElement(XH,{key:s,title:s,t:c,deltaTo:h})))))}i(u0,"Timing");u0.displayName="Timing";var Du=he(Ne());var sl=he(Ne()),fd=he(Ne());function wf({flow:e,messages_meta:t}){let n=Ke(),s=be(k=>k.ui.flow.contentViewFor[e.id+"messages"]||"Auto"),[c,h]=(0,fd.useState)(be(k=>k.options.content_view_lines_cutoff)),p=(0,fd.useCallback)(()=>h(Math.max(1024,c*2)),[c]),v=Xy(kn.getContentURL(e,"messages",s,c+1),e.id+t.count),S=(0,fd.useMemo)(()=>{if(v)try{return JSON.parse(v)}catch{return[{description:"Network Error",lines:[[["error",`${v}`]]]}]}},[v])||[],b=c;return sl.createElement("div",{className:"contentview"},sl.createElement("div",{className:"controls"},sl.createElement("h5",null,t.count," Messages"),sl.createElement(Pg,{value:s,onChange:k=>n(wy(e.id+"messages",k))})),S.map((k,D)=>{let M=`fa fa-fw fa-arrow-${k.from_client?"right text-primary":"left text-danger"}`,z=sl.createElement("div",{key:D},sl.createElement("small",null,sl.createElement("i",{className:M}),sl.createElement("span",{className:"pull-right"},k.timestamp&&fo(k.timestamp))),sl.createElement(Jy,{lines:k.lines,maxLines:b,showMore:p}));return b-=k.lines.length,z}))}i(wf,"Messages");function c0({flow:e}){return Du.createElement("section",{className:"websocket"},Du.createElement("h4",null,"WebSocket"),Du.createElement(wf,{flow:e,messages_meta:e.websocket.messages_meta}),Du.createElement(QH,{websocket:e.websocket}))}i(c0,"WebSocket");c0.displayName="WebSocket";function QH({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return Du.createElement("div",null,Du.createElement("i",{className:"fa fa-fw fa-window-close text-muted"}),"\xA0 Closed by ",e.closed_by_client?"client":"server"," ","with code ",e.close_code," ",t,".",Du.createElement("small",{className:"pull-right"},fo(e.timestamp_end)))}i(QH,"CloseSummary");var f0=he(Ne());function p0({flow:e}){let t=Ke();return f0.createElement("section",{className:"timing"},f0.createElement("h4",null,"Comment"),f0.createElement(hn,{className:"kv-value",content:e.comment,onEditDone:n=>{t(Jn(e,{comment:n}))},placeholder:"empty"}))}i(p0,"Comment");p0.displayName="Comment";var iM=he(Zn());var b_=he(Ne());function d0({flow:e}){return b_.createElement("section",{className:"tcp"},b_.createElement(wf,{flow:e,messages_meta:e.messages_meta}))}i(d0,"TcpMessages");d0.displayName="Stream Data";var T_=he(Ne());function h0({flow:e}){return T_.createElement("section",{className:"udp"},T_.createElement(wf,{flow:e,messages_meta:e.messages_meta}))}i(h0,"UdpMessages");h0.displayName="Datagrams";var nM={request:S_,response:x_,error:a0,connection:l0,timing:u0,websocket:c0,tcpmessages:d0,udpmessages:h0,dnsrequest:C_,dnsresponse:E_,comment:p0};function g0(e){let t;switch(e.type){case"http":t=["request","response","websocket"].filter(n=>e[n]);break;case"tcp":t=["tcpmessages"];break;case"udp":t=["udpmessages"];break;case"dns":t=["request","response"].filter(n=>e[n]).map(n=>"dns"+n);break}return e.error&&t.push("error"),t.push("connection"),t.push("timing"),t.push("comment"),t}i(g0,"tabsForFlow");function k_(){let e=Ke(),t=be(h=>h.flows.byId[h.flows.selected[0]]),n=be(h=>h.ui.flow.tab);if(t==null)return ll.createElement(ll.Fragment,null);let s=g0(t);s.indexOf(n)<0&&(n==="response"&&t.error?n="error":n==="error"&&"response"in t?n="response":n=s[0]);let c=nM[n];return ll.createElement("div",{className:"flow-detail"},ll.createElement("nav",{className:"nav-tabs nav-tabs-sm"},ll.createElement("button",{"data-testid":"close-button-id",className:"close-button",onClick:()=>e(ea(void 0))},ll.createElement("i",{className:"fa fa-times-circle"})),s.map(h=>ll.createElement("a",{key:h,href:"#",className:(0,iM.default)({active:n===h}),onClick:p=>{p.preventDefault(),e(ef(h))}},nM[h].displayName))),ll.createElement(c,{flow:t}))}i(k_,"FlowView");function oM(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.key;return e.preventDefault(),(n,s)=>{let c=s().flows,h=c.byId[s().flows.selected[0]];switch(t){case"k":case"ArrowUp":n(nf(c,-1));break;case"j":case"ArrowDown":n(nf(c,1));break;case" ":case"PageDown":n(nf(c,10));break;case"PageUp":n(nf(c,-10));break;case"End":n(nf(c,1e10));break;case"Home":n(nf(c,-1e10));break;case"Escape":s().ui.modal.activeModal?n(Py()):n(ea(void 0));break;case"ArrowLeft":{if(!h)break;let p=g0(h),v=s().ui.flow.tab,S=p[(Math.max(0,p.indexOf(v))-1+p.length)%p.length];n(ef(S));break}case"Tab":case"ArrowRight":{if(!h)break;let p=g0(h),v=s().ui.flow.tab,S=p[(Math.max(0,p.indexOf(v))+1)%p.length];n(ef(S));break}case"Delete":case"d":{if(!h)return;n(Ny(h));break}case"n":{tf("view.flows.create","get","https://example.com/");break}case"D":{if(!h)return;n(Oy(h));break}case"a":{h&&h.intercepted&&n(Yp(h));break}case"A":{n(Ty());break}case"r":{h&&n(Xp(h));break}case"v":{h&&h.modified&&n(Ay(h));break}case"x":{h&&h.intercepted&&n(ky(h));break}case"X":{n(IN());break}case"z":{n(My());break}default:return}}}i(oM,"onKeyDown");var al=he(Ne());var pd=he(Ne()),sM=he(Zn());var Dg=class extends pd.Component{constructor(n,s){super(n,s);this.node=pd.default.createRef();this.state={applied:!1,startPos:0,dragPointer:.1},this.onLostPointerCapture=this.onLostPointerCapture.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}static{i(this,"Splitter")}static{this.defaultProps={axis:"x"}}onPointerDown(n){this.state.dragPointer===.1&&(n.target.setPointerCapture(n.pointerId),this.setState({startPos:this.props.axis==="x"?n.pageX:n.pageY,dragPointer:n.pointerId}))}onLostPointerCapture(n){if(this.state.dragPointer!==n.pointerId)return;let s=this.node.current,c=s.previousElementSibling,h=s.nextElementSibling;s.style.transform="",c.style.flex=`0 0 ${Math.max(0,(this.props.axis==="x"?c.offsetWidth+n.pageX:c.offsetHeight+n.pageY)-this.state.startPos)}px`,h.style.flex="1 1 auto",this.setState({applied:!0,dragPointer:.1}),this.onResize()}onPointerMove(n){this.state.dragPointer===n.pointerId&&(this.node.current.style.transform=this.props.axis==="x"?`translateX(${n.pageX-this.state.startPos}px)`:`translateY(${n.pageY-this.state.startPos}px)`)}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(n){this.state.applied&&(this.node.current?.previousElementSibling instanceof HTMLElement&&(this.node.current.previousElementSibling.style.flex=""),this.node.current?.nextElementSibling instanceof HTMLElement&&(this.node.current.nextElementSibling.style.flex=""),n||this.setState({applied:!1}),this.onResize())}componentWillUnmount(){this.reset(!0)}render(){return pd.default.createElement("div",{ref:this.node,className:(0,sM.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},pd.default.createElement("div",{onLostPointerCapture:this.onLostPointerCapture,onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove}))}};var Ri=he(Ne());var Ig=i(e=>{let t=e.current;return t===null||t.scrollTop===0?!1:Math.ceil(t.scrollTop)+t.clientHeight>=t.scrollHeight},"isAtBottom"),m0=i(e=>{e.current&&!Ig(e)&&(e.current.scrollTop=e.current.scrollHeight)},"adjustScrollTop");function Sf(e=void 0){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:n,viewportTop:s,viewportHeight:c,itemHeights:h}=e,p=s+c,v=0,S=0,b=0,k=0;if(h){let D=0;for(let M=0;M0&&DH_,default:()=>ZH,icon:()=>M_,index:()=>A_,method:()=>P_,path:()=>L_,quickactions:()=>xf,size:()=>I_,status:()=>D_,time:()=>F_,timestamp:()=>B_,tls:()=>O_,version:()=>R_});var Yt=he(Ne());var N_=he(Zn());var O_=i(({flow:e})=>Yt.default.createElement("td",{className:(0,N_.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");O_.headerName="";var A_=i(({flow:e})=>{let t=be(n=>n.flows.listIndex[e.id]);return Yt.default.createElement("td",{className:"col-index"},t+1)},"index");A_.headerName="#";var M_=i(({flow:e})=>Yt.default.createElement("td",{className:"col-icon"},Yt.default.createElement("div",{className:(0,N_.default)("resource-icon",mx(e))})),"icon");M_.headerName="";var L_=i(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=Yt.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=Yt.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),Yt.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&Yt.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&Yt.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,Yt.default.createElement("span",{className:"marker pull-right"},e.marked),vx(e))},"path");L_.headerName="Path";var P_=i(({flow:e})=>Yt.default.createElement("td",{className:"col-method"},wx(e)),"method");P_.headerName="Method";var R_=i(({flow:e})=>Yt.default.createElement("td",{className:"col-http-version"},Sx(e)),"version");R_.headerName="Version";var D_=i(({flow:e})=>{let t="darkred";return e.type!=="http"&&e.type!="dns"||!e.response?Yt.default.createElement("td",{className:"col-status"}):(100<=e.response.status_code&&e.response.status_code<200?t="green":200<=e.response.status_code&&e.response.status_code<300?t="darkgreen":300<=e.response.status_code&&e.response.status_code<400?t="lightblue":(400<=e.response.status_code&&e.response.status_code<500||500<=e.response.status_code&&e.response.status_code<600)&&(t="red"),Yt.default.createElement("td",{className:"col-status",style:{color:t}},yx(e)))},"status");D_.headerName="Status";var I_=i(({flow:e})=>Yt.default.createElement("td",{className:"col-size"},Sy(gx(e))),"size");I_.headerName="Size";var F_=i(({flow:e})=>{let t=hg(e),n=hx(e);return Yt.default.createElement("td",{className:"col-time"},t&&n?xy(1e3*(n-t)):"...")},"time");F_.headerName="Time";var B_=i(({flow:e})=>{let t=hg(e);return Yt.default.createElement("td",{className:"col-timestamp"},t?fo(t):"...")},"timestamp");B_.headerName="Start time";var xf=i(({flow:e})=>{let t=Ke(),n=null;return e.intercepted?n=Yt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(Yp(e))},Yt.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):Cy(e)&&(n=Yt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(Xp(e))},Yt.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"}))),Yt.default.createElement("td",{className:"col-quickactions"},n?Yt.default.createElement("div",null,n):Yt.default.createElement(Yt.default.Fragment,null))},"quickactions");xf.headerName="";var H_=i(({flow:e})=>{let t=e.comment;return Yt.default.createElement("td",{className:"col-comment"},t)},"comment");H_.headerName="Comment";var JH={icon:M_,index:A_,method:P_,version:R_,path:L_,quickactions:xf,size:I_,status:D_,time:F_,timestamp:B_,tls:O_,comment:H_},ZH=JH;var uM=Bg.memo(i(function(){let t=Ke(),n=be(v=>v.flows.sort.desc),s=be(v=>v.flows.sort.column),c=be(v=>v.options.web_columns),h=n?"sort-desc":"sort-asc",p=c.map(v=>Fg[v]).filter(v=>v).concat(xf);return Bg.createElement("tr",null,p.map(v=>Bg.createElement("th",{className:(0,aM.default)(`col-${v.name}`,s===v.name&&h),key:v.name,onClick:()=>t(DN(v.name===s&&n?void 0:v.name,v.name!==s?!1:!n))},v.headerName)))},"FlowTableHead"));var dd=he(Ne()),cM=he(Zn());var fM=dd.default.memo(i(function({flow:t,selected:n,highlighted:s}){let c=Ke(),h=be(b=>b.options.web_columns),p=(0,cM.default)({selected:n,highlighted:s,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),v=(0,dd.useCallback)(b=>{let k=b.target;for(;k.parentNode;){if(k.classList.contains("col-quickactions"))return;k=k.parentNode}c(ea(t.id))},[t]),S=h.map(b=>Fg[b]).filter(b=>b).concat(xf);return dd.default.createElement("tr",{className:p,onClick:v},S.map(b=>dd.default.createElement(b,{key:b.name,flow:t})))},"FlowRow"));var z_=class extends Ri.Component{constructor(n,s){super(n,s);this.viewport=Ri.createRef();this.head=Ri.createRef();this.state={vScroll:Sf(),viewportTop:0},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"PureFlowTable")}static{this.defaultProps={rowHeight:32}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Ig(this.viewport)}componentDidUpdate(n,s,c){if(c&&m0(this.viewport),this.onViewportUpdate(),this.props.selected&&this.props.selected!==n.selected){let{rowHeight:p,flows:v,selected:S}=this.props,b=this.viewport.current,k=this.head.current,D=k?k.offsetHeight:0,M=v.indexOf(S)*p+D,z=M+p,q=b.scrollTop,Q=b.offsetHeight;M-Dq+Q&&(b.scrollTop=z-Q),this.onViewportUpdate()}}onViewportUpdate(){let n=this.viewport.current,s=n.scrollTop||0,c=Sf({viewportTop:s,viewportHeight:n.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});if(this.state.viewportTop!==s||!vs(this.state.vScroll,c)){let h=Math.min(s,c.end*this.props.rowHeight);this.setState({vScroll:c,viewportTop:h})}}render(){let{vScroll:n,viewportTop:s}=this.state,{flows:c,selected:h,highlight:p}=this.props,v=p?rf.parse(p):()=>!1;return Ri.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate,ref:this.viewport},Ri.createElement("table",null,Ri.createElement("thead",{ref:this.head,style:{transform:`translateY(${s}px)`}},Ri.createElement(uM,null)),Ri.createElement("tbody",null,Ri.createElement("tr",{style:{height:n.paddingTop}}),c.slice(n.start,n.end).map(S=>Ri.createElement(fM,{key:S.id,flow:S,selected:S===h,highlighted:v(S)})),Ri.createElement("tr",{style:{height:n.paddingBottom}}))))}},pM=ku(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(z_);var Lr=he(Ne()),N0=he(Ne());var gL=he(hL());function cC(){let e=be(n=>n.backendState.servers),t;return e.length===0?t="":e.length===1?t="Configure your client to use the following proxy server:":t="Configure your client to use one of the following proxy servers:",Lr.createElement("div",{style:{padding:"1em 2em"}},Lr.createElement("h3",null,"mitmproxy is running."),Lr.createElement("p",null,"No flows have been recorded yet.",Lr.createElement("br",null),t),Lr.createElement("ul",{className:"fa-ul"},e.map(n=>Lr.createElement("li",{key:n.full_spec},Lr.createElement(Kz,{...n})))))}i(cC,"CaptureSetup");function Kz({description:e,listen_addrs:t,last_exception:n,is_running:s,full_spec:c,wireguard_conf:h}){let p=(0,N0.useRef)(null);(0,N0.useEffect)(()=>{h&&p.current&&gL.default.toCanvas(p.current,h,{margin:0,scale:3})},[h]);let v,S=t.length===1||t.length===2&&t[0][1]===t[1][1],b=t.every(M=>["::","0.0.0.0"].includes(M[0]));S&&b?v=ZS(["*",t[0][1]]):v=t.map(ZS).join(" and "),e=e[0].toUpperCase()+e.substr(1);let k,D;return n?(D="fa-exclamation text-error",k=Lr.createElement(Lr.Fragment,null,e," (",c,"):",Lr.createElement("br",null),n)):s?(D="fa-check text-success",k=`${e} listening at ${v}.`,h&&(k=Lr.createElement(Lr.Fragment,null,k,Lr.createElement("div",{className:"wireguard-config"},Lr.createElement("pre",null,h),Lr.createElement("canvas",{ref:p}))))):(D="fa-pause text-warning",k=Lr.createElement(Lr.Fragment,null,e," (",c,")")),Lr.createElement(Lr.Fragment,null,Lr.createElement("i",{className:`fa fa-li ${D}`}),k)}i(Kz,"ServerDescription");var bs=he(Ne());var Tf=he(Ne());var fC=he(Ne());function zu({value:e,onChange:t,children:n}){return fC.createElement("div",{className:"mode-entry"},fC.createElement("input",{type:"checkbox",checked:e,onChange:t}),n)}i(zu,"ModeToggle");function pC(){let e=Ke(),{active:t,applications:n,error:s}=be(p=>p.modes.local),c=be(p=>{if(p.backendState.servers){for(let v of p.backendState.servers)if(v.type==="local")return v.last_exception}return""}),h=i(p=>{e(GO(p))},"handleListApplicationsChange");return Tf.createElement("div",null,Tf.createElement("h4",{className:"mode-title"},"Local Applications"),Tf.createElement("p",{className:"mode-description"},"Transparently Intercept local application(s)."),Tf.createElement(zu,{value:t,onChange:()=>e(jO())},"Intercept traffic for",Tf.createElement(hn,{className:"mode-local-input",content:n||"",onEditDone:p=>h(p)})),(s||c)&&Tf.createElement("div",{className:"mode-error text-danger"},s||c))}i(pC,"Local");var kf=he(Ne());function dC(){let e=Ke(),{active:t,error:n,listen_port:s}=be(p=>p.modes.regular),c=be(p=>{if(p.backendState.servers){for(let v of p.backendState.servers)if(v.type==="regular")return v.last_exception}return""}),h=i(p=>{e(hA(p))},"handlePortChange");return kf.createElement("div",null,kf.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy"),kf.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use an HTTP(S) proxy."),kf.createElement(zu,{value:t,onChange:()=>e(dA())},"Run HTTP/S Proxy on port"," ",kf.createElement(hn,{className:"mode-regular-input",content:s?.toString()||"",onEditDone:p=>h(p)})),(n||c)&&kf.createElement("div",{className:"mode-error text-danger"},n||c))}i(dC,"Regular");var wd=he(Ne());function hC(){let e=Ke(),{active:t,error:n}=be(c=>c.modes.wireguard),s=be(c=>{if(c.backendState.servers){for(let h of c.backendState.servers)if(h.type==="wireguard")return h.last_exception}return""});return wd.createElement("div",null,wd.createElement("h4",{className:"mode-title"},"WireGuard Server"),wd.createElement("p",{className:"mode-description"},"Start a WireGuard\u2122 server and connect an external device for transparent proxying."),wd.createElement(zu,{value:t,onChange:()=>e(JO())},"Run WireGuard Server"),(n||s)&&wd.createElement("div",{className:"mode-error text-danger"},n||s))}i(hC,"Wireguard");var vo=he(Ne());function gC(){let e=Ke(),{active:t,protocol:n,error:s,listen_port:c,listen_host:h,destination:p}=be(M=>M.modes.reverse),v=Object.values(Yy),S=vo.createElement("span",null,"\xA0",vo.createElement("b",null,n," "),vo.createElement("span",{className:"caret"})),b=i(M=>{e(sA(M))},"handleProtocolChange"),k=i(M=>{let[z,q]=M.split(":");e(lA(q,z))},"handleListenHostAndPortChange"),D=i(M=>{e(aA(M))},"handleDestinationChange");return vo.createElement("div",null,vo.createElement("h4",{className:"mode-title"},"Reverse Proxy"),vo.createElement("p",{className:"mode-description"},"Requests are forwarded to a preconfigured destination."),vo.createElement(zu,{value:t,onChange:()=>{e(oA())}},"Forward",vo.createElement(ol,{text:S,className:"btn btn-default btn-xs mode-reverse-dropdown",options:{placement:"bottom"}},v.map(M=>vo.createElement(An,{key:M,onClick:()=>b(M)},M)))," ","traffic from"," ",vo.createElement(hn,{className:"mode-reverse-input",content:h&&c?`${h?.toString()}:${c?.toString()}`:"",onEditDone:M=>k(M),placeholder:"*:8080"})," ","to"," ",vo.createElement(hn,{className:"mode-reverse-input",content:p?.toString()||"",onEditDone:M=>D(M),placeholder:"example.com"})),s&&vo.createElement("div",{className:"mode-error text-danger"},s))}i(gC,"Reverse");function mC(){return bs.createElement("div",{className:"modes"},bs.createElement("h2",null,"Intercept Traffic"),bs.createElement("p",null,"Configure how you want to intercept traffic with mitmproxy."),bs.createElement("h3",null,"Recommended"),bs.createElement("div",{className:"modes-container"},bs.createElement(dC,null),bs.createElement(pC,null),bs.createElement(hC,null),bs.createElement(gC,null),bs.createElement("i",null,"Remaining modes are coming soon...")))}i(mC,"Modes");function vC(){let e=be(s=>!!s.flows.byId[s.flows.selected[0]]),t=be(s=>s.flows.list.length>0),n=be(s=>s.ui.tabs.current);return al.createElement("div",{className:"main-view"},n===0?al.createElement(mC,null):al.createElement(al.Fragment,null,t?al.createElement(pM,null):al.createElement(cC,null),e&&al.createElement(Dg,{key:"splitter"}),e&&al.createElement(k_,{key:"flowDetails"})))}i(vC,"MainView");var Di=he(Ne()),_L=he(Zn());var $n=he(Ne());var O0=he(Ne());function Go({children:e}){return window.MITMWEB_STATIC?null:O0.createElement(O0.Fragment,null,e)}i(Go,"HideInStatic");var mL=$n.memo(i(function(){let t=Ke(),n=be(s=>s.flows.filter);return $n.createElement(ol,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},$n.createElement("li",null,$n.createElement(Qy,{icon:"fa-folder-open",text:"\xA0Open...",onClick:s=>s.stopPropagation(),onOpenFile:s=>{t(BN(s)),document.body.click()}})),$n.createElement(An,{onClick:()=>location.replace("/flows/dump")},$n.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save"),$n.createElement(An,{onClick:()=>location.replace("/flows/dump?filter="+n)},$n.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save filtered"),$n.createElement(An,{onClick:()=>confirm("Delete all flows?")&&t(My())},$n.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),$n.createElement(Go,null,$n.createElement(JA,null),$n.createElement("li",null,$n.createElement("a",{href:"http://mitm.it/",target:"_blank",rel:"noreferrer"},$n.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var Wu=he(Ne());var vL=Wu.memo(i(function(){let t=be(s=>s.connection.state),n=be(s=>s.connection.message);switch(t){case"CONNECTION_INIT":return Wu.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case"CONNECTION_FETCHING":return Wu.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case"CONNECTION_ESTABLISHED":return Wu.createElement("span",{className:"connection-indicator established"},"connected");case"CONNECTION_ERROR":return Wu.createElement("span",{className:"connection-indicator error",title:n},"connection lost");case"CONNECTION_OFFLINE":return Wu.createElement("span",{className:"connection-indicator offline"},"offline")}},"ConnectionIndicator"));var A0=he(Ne());M0.title="Capture";function M0(){return A0.createElement(A0.Fragment,null)}i(M0,"CaptureMenu");var ei=he(Ne());var Ko=he(Ne()),yL=he(Zn());var yo=he(Ne());var Gg=class e extends yo.Component{static{i(this,"FilterDocs")}constructor(t,n){super(t,n),this.state={doc:e.doc}}componentDidMount(){e.xhr||(e.xhr=bt("/filter-help").then(t=>t.json()),e.xhr.catch(()=>{e.xhr=null})),this.state.doc||e.xhr.then(t=>{e.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?yo.default.createElement("table",{className:"table table-condensed"},yo.default.createElement("tbody",null,t.commands.map(n=>yo.default.createElement("tr",{key:n[1],onClick:()=>this.props.selectHandler(n[0].split(" ")[0]+" ")},yo.default.createElement("td",null,n[0].replace(" ","\xA0")),yo.default.createElement("td",null,n[1]))),yo.default.createElement("tr",{key:"docs-link"},yo.default.createElement("td",{colSpan:2},yo.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank",rel:"noreferrer"},yo.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):yo.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};var Nf=class extends Ko.Component{constructor(n,s){super(n,s);this.inputRef=Ko.default.createRef();this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}static{i(this,"FilterInput")}UNSAFE_componentWillReceiveProps(n){this.setState({value:n.value})}isValid(n){try{return n&&rf.parse(n),!0}catch{return!1}}getDesc(){if(!this.state.value)return Ko.default.createElement(Gg,{selectHandler:this.selectFilter});try{return rf.parse(this.state.value).desc}catch(n){return""+n}}onChange(n){let s=n.target.value;this.setState({value:s}),this.isValid(s)&&this.props.onChange(s)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(n){(n.key==="Escape"||n.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),n.stopPropagation()}selectFilter(n){this.setState({value:n}),this.inputRef.current?.focus()}blur(){this.inputRef.current?.blur()}select(){this.inputRef.current?.select()}render(){let{type:n,color:s,placeholder:c}=this.props,{value:h,focus:p,mousefocus:v}=this.state;return Ko.default.createElement("div",{className:(0,yL.default)("filter-input input-group",{"has-error":!this.isValid(h)})},Ko.default.createElement("span",{className:"input-group-addon"},Ko.default.createElement("i",{className:"fa fa-fw fa-"+n,style:{color:s}})),Ko.default.createElement("input",{type:"text",ref:this.inputRef,placeholder:c,className:"form-control",value:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(p||v)&&Ko.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},Ko.default.createElement("div",{className:"arrow"}),Ko.default.createElement("div",{className:"popover-content"},this.getDesc())))}};L0.title="Flow List";function L0(){return ei.createElement("div",{className:"main-menu"},ei.createElement("div",{className:"menu-group"},ei.createElement("div",{className:"menu-content"},ei.createElement(Qz,null),ei.createElement(Jz,null)),ei.createElement("div",{className:"menu-legend"},"Find")),ei.createElement("div",{className:"menu-group"},ei.createElement("div",{className:"menu-content"},ei.createElement(Xz,null),ei.createElement(Zz,null)),ei.createElement("div",{className:"menu-legend"},"Intercept")))}i(L0,"FlowListMenu");function Xz(){let e=Ke(),t=be(n=>n.options.intercept);return ei.createElement(Nf,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:n=>e(nd("intercept",n))})}i(Xz,"InterceptInput");function Qz(){let e=Ke(),t=be(n=>n.flows.filter);return ei.createElement(Nf,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:n=>e(Ey(n))})}i(Qz,"FlowFilterInput");function Jz(){let e=Ke(),t=be(n=>n.flows.highlight);return ei.createElement(Nf,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:n=>e(by(n))})}i(Jz,"HighlightInput");function Zz(){let e=Ke();return ei.createElement(Ar,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(Ty())},"Resume All")}i(Zz,"ResumeAll");var tn=he(Ne());var Of=he(Ne());function yC({value:e,onChange:t,children:n}){return Of.createElement("div",{className:"menu-entry"},Of.createElement("label",null,Of.createElement("input",{type:"checkbox",checked:e,onChange:t}),n))}i(yC,"MenuToggle");function P0({name:e,children:t}){let n=Ke(),s=be(c=>c.options[e]);return Of.createElement(yC,{value:!!s,onChange:()=>n(nd(e,!s))},t)}i(P0,"OptionsToggle");function wL(){let e=Ke(),t=be(n=>n.eventLog.visible);return Of.createElement(yC,{value:t,onChange:()=>e(rd())},"Display Event Log")}i(wL,"EventlogToggle");function SL(){let e=Ke(),t=be(n=>n.commandBar.visible);return Of.createElement(yC,{value:t,onChange:()=>e(Ky())},"Display Command Bar")}i(SL,"CommandBarToggle");var wC=he(Ne());function SC({children:e,resource:t}){let n=`https://docs.mitmproxy.org/stable/${t}`;return wC.createElement("a",{target:"_blank",href:n,rel:"noreferrer"},e||wC.createElement("i",{className:"fa fa-question-circle"}))}i(SC,"DocsLink");R0.title="Options";function R0(){let e=Ke(),t=i(()=>zN("OptionModal"),"openOptions");return tn.createElement("div",null,tn.createElement(Go,null,tn.createElement("div",{className:"menu-group"},tn.createElement("div",{className:"menu-content"},tn.createElement(Ar,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",tn.createElement("sup",null,"alpha"))),tn.createElement("div",{className:"menu-legend"},"Options Editor")),tn.createElement("div",{className:"menu-group"},tn.createElement("div",{className:"menu-content"},tn.createElement(P0,{name:"anticache"},"Strip cache headers"," ",tn.createElement(SC,{resource:"overview-features/#anticache"})),tn.createElement(P0,{name:"showhost"},"Use host header for display"),tn.createElement(P0,{name:"ssl_insecure"},"Don't verify server certificates")),tn.createElement("div",{className:"menu-legend"},"Quick Options"))),tn.createElement("div",{className:"menu-group"},tn.createElement("div",{className:"menu-content"},tn.createElement(wL,null),tn.createElement(SL,null)),tn.createElement("div",{className:"menu-legend"},"View Options")))}i(R0,"OptionMenu");var ft=he(Ne());var Sd=i(async(e,t)=>{let n=(async()=>{let s=await tf("export",t,`@${e.id}`);if(s.value)return s.value;throw s.error?s.error:s})();try{await CN(n)}catch(s){alert(s)}},"copy");I0.title="Flow";function I0(){let e=Ke(),t=be(n=>n.flows.byId[n.flows.selected[0]]);return t?ft.createElement("div",{className:"flow-menu"},ft.createElement(Go,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Ar,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(Xp(t)),disabled:!Cy(t)},"Replay"),ft.createElement(Ar,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(Oy(t))},"Duplicate"),ft.createElement(Ar,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(Ay(t))},"Revert"),ft.createElement(Ar,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(Ny(t))},"Delete"),ft.createElement(nW,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Flow Modification"))),ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(eW,{flow:t}),ft.createElement(tW,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Export")),ft.createElement(Go,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Ar,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(Yp(t))},"Resume"),ft.createElement(Ar,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(ky(t))},"Abort")),ft.createElement("div",{className:"menu-legend"},"Interception")))):ft.createElement("div",null)}i(I0,"FlowMenu");var D0=i(e=>{let t=window.open(e,"_blank","noopener,noreferrer");t&&(t.opener=null)},"openInNewTab");function eW({flow:e}){if(e.type!=="http")return ft.createElement(Ar,{icon:"fa-download",onClick:()=>0,disabled:!0},"Download");if(e.request.contentLength&&!e.response?.contentLength)return ft.createElement(Ar,{icon:"fa-download",onClick:()=>D0(kn.getContentURL(e,e.request))},"Download");if(e.response){let t=e.response;if(!e.request.contentLength&&e.response.contentLength)return ft.createElement(Ar,{icon:"fa-download",onClick:()=>D0(kn.getContentURL(e,t))},"Download");if(e.request.contentLength&&e.response.contentLength)return ft.createElement(ol,{text:ft.createElement(Ar,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},ft.createElement(An,{onClick:()=>D0(kn.getContentURL(e,e.request))},"Download request"),ft.createElement(An,{onClick:()=>D0(kn.getContentURL(e,t))},"Download response"))}return null}i(eW,"DownloadButton");function tW({flow:e}){return ft.createElement(ol,{className:"",text:ft.createElement(Ar,{title:"Export flow.",icon:"fa-clone",onClick:()=>1,disabled:e.type!=="http"},"Export\u25BE"),options:{placement:"bottom-start"}},ft.createElement(An,{onClick:()=>Sd(e,"raw_request")},"Copy raw request"),ft.createElement(An,{onClick:()=>Sd(e,"raw_response")},"Copy raw response"),ft.createElement(An,{onClick:()=>Sd(e,"raw")},"Copy raw request and response"),ft.createElement(An,{onClick:()=>Sd(e,"curl")},"Copy as cURL"),ft.createElement(An,{onClick:()=>Sd(e,"httpie")},"Copy as HTTPie"))}i(tW,"ExportButton");var rW={":red_circle:":"\u{1F534}",":orange_circle:":"\u{1F7E0}",":yellow_circle:":"\u{1F7E1}",":green_circle:":"\u{1F7E2}",":large_blue_circle:":"\u{1F535}",":purple_circle:":"\u{1F7E3}",":brown_circle:":"\u{1F7E4}"};function nW({flow:e}){let t=Ke();return ft.createElement(ol,{className:"",text:ft.createElement(Ar,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:()=>1},"Mark\u25BE"),options:{placement:"bottom-start"}},ft.createElement(An,{onClick:()=>t(Jn(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(rW).map(([n,s])=>ft.createElement(An,{key:n,onClick:()=>t(Jn(e,{marked:n}))},s," ",n.replace(/[:_]/g," "))))}i(nW,"MarkButton");var xL={0:M0,1:L0,2:R0,3:I0};function xC(){let e=Ke(),t=be(k=>k.ui.tabs.current),n=be(k=>k.flows.selected.filter(D=>D in k.flows.byId),vs),[s,c]=(0,Di.useState)(!1),h=be(k=>k.flows.list.length>0),p=be(k=>k.ui.tabs.isInitial),v=[0,1,2];n.length>0&&v.push(3),(0,Di.useEffect)(()=>{h&&p&&e(wg(1))},[h]),(0,Di.useEffect)(()=>{n.length>0&&!s?(e(wg(3)),c(!0)):n.length===0&&(s&&c(!1),t===3&&e(wg(1)))},[n,s,t]);function S(k,D){D.preventDefault(),e(wg(k))}i(S,"handleClick");let b=xL[t];return Di.default.createElement("header",null,Di.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},Di.default.createElement(mL,null),v.map(k=>Di.default.createElement("a",{key:k,href:"#",className:(0,_L.default)({active:k===t}),onClick:D=>S(k,D)},xL[k].title)),Di.default.createElement(Go,null,Di.default.createElement(vL,null))),Di.default.createElement("div",null,Di.default.createElement(b,null)))}i(xC,"Header");var nt=he(Ne()),CL=he(Zn());var F0=function(){"use strict";function e(s,c){function h(){this.constructor=s}i(h,"ctor"),h.prototype=c.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,c,h,p){this.message=s,this.expected=c,this.found=h,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var c=arguments.length>1?arguments[1]:{},h=this,p={},v={Expr:Ln},S=Ln,b=i(function(Y,ee){return[Y,...ee]},"peg$c0"),k=i(function(Y){return[Y]},"peg$c1"),D=i(function(){return""},"peg$c2"),M={type:"other",description:"string"},z='"',q={type:"literal",value:'"',description:'"\\""'},Q=i(function(Y){return Y.join("")},"peg$c6"),ie="'",I={type:"literal",value:"'",description:`"'"`},L=/^["\\]/,B={type:"class",value:'["\\\\]',description:'["\\\\]'},G={type:"any",description:"any character"},re=i(function(Y){return Y},"peg$c12"),Z="\\",oe={type:"literal",value:"\\",description:'"\\\\"'},de=/^['\\]/,Re={type:"class",value:"['\\\\]",description:"['\\\\]"},Ce=/^['"\\]/,Ye={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},tt="n",Se={type:"literal",value:"n",description:'"n"'},Xe=i(function(){return` -`},"peg$c21"),qe="r",Qe={type:"literal",value:"r",description:'"r"'},ot=i(function(){return"\r"},"peg$c24"),Pt="t",Tt={type:"literal",value:"t",description:'"t"'},rn=i(function(){return" "},"peg$c27"),nn={type:"other",description:"whitespace"},dr=/^[ \t\n\r]/,Ht={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},hr={type:"other",description:"control character"},gr=/^[|&!()~"]/,qt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},Rt={type:"other",description:"optional whitespace"},se=0,ze=0,$r=[{line:1,column:1,seenCR:!1}],Xt=0,st=[],Fe=0,Mn;if("startRule"in c){if(!(c.startRule in v))throw new Error(`Can't start parsing from rule "`+c.startRule+'".');S=v[c.startRule]}function yn(){return s.substring(ze,se)}i(yn,"text");function Fi(){return ar(ze,se)}i(Fi,"location");function wo(Y){throw Bi(null,[{type:"other",description:Y}],s.substring(ze,se),ar(ze,se))}i(wo,"expected");function at(Y){throw Bi(Y,null,s.substring(ze,se),ar(ze,se))}i(at,"error");function mr(Y){var ee=$r[Y],xe,Le;if(ee)return ee;for(xe=Y-1;!$r[xe];)xe--;for(ee=$r[xe],ee={line:ee.line,column:ee.column,seenCR:ee.seenCR};xeXt&&(Xt=se,st=[]),st.push(Y))}i(dt,"peg$fail");function Bi(Y,ee,xe,Le){function fa(jr){var jt=1;for(jr.sort(function(Ot,kt){return Ot.descriptionkt.description?1:0});jt1?kt.slice(0,-1).join(", ")+" or "+kt[jr.length-1]:kt[0],on=jt?'"'+Ot(jt)+'"':"end of input","Expected "+cl+" but "+on+" found."}return i(He,"buildMessage"),ee!==null&&fa(ee),new t(Y!==null?Y:He(ee,xe),ee,xe,Le)}i(Bi,"peg$buildException");function Ln(){var Y,ee,xe,Le;if(Y=se,ee=mi(),ee!==p){if(xe=[],Le=Pn(),Le!==p)for(;Le!==p;)xe.push(Le),Le=Pn();else xe=p;xe!==p?(Le=Ln(),Le!==p?(ze=Y,ee=b(ee,Le),Y=ee):(se=Y,Y=p)):(se=Y,Y=p)}else se=Y,Y=p;if(Y===p&&(Y=se,ee=mi(),ee!==p&&(ze=Y,ee=k(ee)),Y=ee,Y===p)){for(Y=se,ee=[],xe=Pn();xe!==p;)ee.push(xe),xe=Pn();ee!==p&&(ze=Y,ee=D()),Y=ee}return Y}i(Ln,"peg$parseExpr");function mi(){var Y,ee,xe,Le;if(Fe++,Y=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=p,Fe===0&&dt(q)),ee!==p){for(xe=[],Le=Vr();Le!==p;)xe.push(Le),Le=Vr();xe!==p?(s.charCodeAt(se)===34?(Le=z,se++):(Le=p,Fe===0&&dt(q)),Le!==p?(ze=Y,ee=Q(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p)}else se=Y,Y=p;if(Y===p){if(Y=se,s.charCodeAt(se)===39?(ee=ie,se++):(ee=p,Fe===0&&dt(I)),ee!==p){for(xe=[],Le=qr();Le!==p;)xe.push(Le),Le=qr();xe!==p?(s.charCodeAt(se)===39?(Le=ie,se++):(Le=p,Fe===0&&dt(I)),Le!==p?(ze=Y,ee=Q(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p)}else se=Y,Y=p;if(Y===p){if(Y=se,ee=se,Fe++,xe=zi(),Fe--,xe===p?ee=void 0:(se=ee,ee=p),ee!==p){if(xe=[],Le=Hi(),Le!==p)for(;Le!==p;)xe.push(Le),Le=Hi();else xe=p;xe!==p?(ze=Y,ee=Q(xe),Y=ee):(se=Y,Y=p)}else se=Y,Y=p;if(Y===p){if(Y=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=p,Fe===0&&dt(q)),ee!==p){for(xe=[],Le=Vr();Le!==p;)xe.push(Le),Le=Vr();xe!==p?(ze=Y,ee=Q(xe),Y=ee):(se=Y,Y=p)}else se=Y,Y=p;if(Y===p)if(Y=se,s.charCodeAt(se)===39?(ee=ie,se++):(ee=p,Fe===0&&dt(I)),ee!==p){for(xe=[],Le=qr();Le!==p;)xe.push(Le),Le=qr();xe!==p?(ze=Y,ee=Q(xe),Y=ee):(se=Y,Y=p)}else se=Y,Y=p}}}return Fe--,Y===p&&(ee=p,Fe===0&&dt(M)),Y}i(mi,"peg$parseStringLiteral");function Vr(){var Y,ee,xe;return Y=se,ee=se,Fe++,L.test(s.charAt(se))?(xe=s.charAt(se),se++):(xe=p,Fe===0&&dt(B)),Fe--,xe===p?ee=void 0:(se=ee,ee=p),ee!==p?(s.length>se?(xe=s.charAt(se),se++):(xe=p,Fe===0&&dt(G)),xe!==p?(ze=Y,ee=re(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p),Y===p&&(Y=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=p,Fe===0&&dt(oe)),ee!==p?(xe=ti(),xe!==p?(ze=Y,ee=re(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p)),Y}i(Vr,"peg$parseDoubleStringChar");function qr(){var Y,ee,xe;return Y=se,ee=se,Fe++,de.test(s.charAt(se))?(xe=s.charAt(se),se++):(xe=p,Fe===0&&dt(Re)),Fe--,xe===p?ee=void 0:(se=ee,ee=p),ee!==p?(s.length>se?(xe=s.charAt(se),se++):(xe=p,Fe===0&&dt(G)),xe!==p?(ze=Y,ee=re(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p),Y===p&&(Y=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=p,Fe===0&&dt(oe)),ee!==p?(xe=ti(),xe!==p?(ze=Y,ee=re(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p)),Y}i(qr,"peg$parseSingleStringChar");function Hi(){var Y,ee,xe;return Y=se,ee=se,Fe++,xe=Pn(),Fe--,xe===p?ee=void 0:(se=ee,ee=p),ee!==p?(s.length>se?(xe=s.charAt(se),se++):(xe=p,Fe===0&&dt(G)),xe!==p?(ze=Y,ee=re(xe),Y=ee):(se=Y,Y=p)):(se=Y,Y=p),Y}i(Hi,"peg$parseUnquotedStringChar");function ti(){var Y,ee;return Ce.test(s.charAt(se))?(Y=s.charAt(se),se++):(Y=p,Fe===0&&dt(Ye)),Y===p&&(Y=se,s.charCodeAt(se)===110?(ee=tt,se++):(ee=p,Fe===0&&dt(Se)),ee!==p&&(ze=Y,ee=Xe()),Y=ee,Y===p&&(Y=se,s.charCodeAt(se)===114?(ee=qe,se++):(ee=p,Fe===0&&dt(Qe)),ee!==p&&(ze=Y,ee=ot()),Y=ee,Y===p&&(Y=se,s.charCodeAt(se)===116?(ee=Pt,se++):(ee=p,Fe===0&&dt(Tt)),ee!==p&&(ze=Y,ee=rn()),Y=ee))),Y}i(ti,"peg$parseEscapeSequence");function Pn(){var Y,ee;return Fe++,dr.test(s.charAt(se))?(Y=s.charAt(se),se++):(Y=p,Fe===0&&dt(Ht)),Fe--,Y===p&&(ee=p,Fe===0&&dt(nn)),Y}i(Pn,"peg$parsews");function zi(){var Y,ee;return Fe++,gr.test(s.charAt(se))?(Y=s.charAt(se),se++):(Y=p,Fe===0&&dt(qt)),Fe--,Y===p&&(ee=p,Fe===0&&dt(hr)),Y}i(zi,"peg$parsecc");function ca(){var Y,ee;for(Fe++,Y=[],ee=Pn();ee!==p;)Y.push(ee),ee=Pn();return Fe--,Y===p&&(ee=p,Fe===0&&dt(Rt)),Y}if(i(ca,"peg$parse__"),Mn=S(),Mn!==p&&se===s.length)return Mn;throw Mn!==p&&se{t&&t.current.addEventListener("DOMNodeInserted",n=>{let s=n.currentTarget;s.scroll({top:s.scrollHeight,behavior:"auto"})})},[]),nt.default.createElement("div",{className:"command-result",ref:t},e.map((n,s)=>nt.default.createElement("div",{key:s},nt.default.createElement("div",null,nt.default.createElement("strong",null,"$ ",n.command)),n.result)))}i(iW,"Results");function oW({nextArgs:e,currentArg:t,help:n,description:s,availableCommands:c}){let h=[];for(let p=0;p0&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Argument suggestion:")," ",h),n?.includes("->")&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Signature help: "),n),s&&nt.default.createElement("div",null,"# ",s),nt.default.createElement("div",null,nt.default.createElement("strong",null,"Available Commands: "),nt.default.createElement("p",{className:"available-commands"},JSON.stringify(c)))))}i(oW,"CommandHelp");function CC(){let[e,t]=(0,nt.useState)(""),[n,s]=(0,nt.useState)(""),[c,h]=(0,nt.useState)(0),[p,v]=(0,nt.useState)([]),[S,b]=(0,nt.useState)([]),[k,D]=(0,nt.useState)({}),[M,z]=(0,nt.useState)([]),[q,Q]=(0,nt.useState)(0),[ie,I]=(0,nt.useState)(""),[L,B]=(0,nt.useState)(""),[G,re]=(0,nt.useState)([]),[Z,oe]=(0,nt.useState)([]),[de,Re]=(0,nt.useState)(void 0);(0,nt.useEffect)(()=>{bt("/commands",{method:"GET"}).then(Xe=>Xe.json()).then(Xe=>{D(Xe),v(_C(Xe)),b(Object.keys(Xe))}).catch(Xe=>console.error(Xe))},[]),(0,nt.useEffect)(()=>{tf("commands.history.get").then(Xe=>{oe(Xe.value)}).catch(Xe=>console.error(Xe))},[]);let Ce=i((Xe,qe)=>{let Qe=F0.parse(qe),ot=F0.parse(Xe);I(k[Qe[0]]?.signature_help),B(k[Qe[0]]?.help||""),v(_C(k,ot[0])),b(_C(k,Qe[0]));let Pt=k[Qe[0]]?.parameters.map(Tt=>Tt.name);Pt&&(z([Qe[0],...Pt]),Q(Qe.length-1))},"parseCommand"),Ye=i(Xe=>{t(Xe.target.value),s(Xe.target.value),h(0)},"onChange"),tt=i(Xe=>{if(Xe.key==="Enter"){let[qe,...Qe]=F0.parse(e);oe([...Z,e]),tf("commands.history.add",e).catch(()=>0),bt.post(`/commands/${qe}`,{arguments:Qe}).then(ot=>ot.json()).then(ot=>{Re(void 0),z([]),re([...G,{command:e,result:JSON.stringify(ot.value||ot.error)}])}).catch(ot=>{Re(void 0),z([]),re([...G,{command:e,result:ot.toString()}])}),I(""),B(""),t(""),s(""),h(0),v(S)}if(Xe.key==="ArrowUp"){let qe;de===void 0?qe=Z.length-1:qe=Math.max(0,de-1),t(Z[qe]),s(Z[qe]),Re(qe)}if(Xe.key==="ArrowDown"){if(de===void 0)return;if(de==Z.length-1)t(""),s(""),Re(void 0);else{let qe=de+1;t(Z[qe]),s(Z[qe]),Re(qe)}}Xe.key==="Tab"&&(t(p[c]),h((c+1)%p.length),Xe.preventDefault()),Xe.stopPropagation()},"onKeyDown"),Se=i(Xe=>{if(!e){b(Object.keys(k));return}Ce(n,e),Xe.stopPropagation()},"onKeyUp");return nt.default.createElement("div",{className:"command"},nt.default.createElement("div",{className:"command-title"},"Command Result"),nt.default.createElement(iW,{results:G}),nt.default.createElement(oW,{nextArgs:M,currentArg:q,help:ie,description:L,availableCommands:S}),nt.default.createElement("div",{className:(0,CL.default)("command-input input-group")},nt.default.createElement("span",{className:"input-group-addon"},nt.default.createElement("i",{className:"fa fa-fw fa-terminal"})),nt.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e||"",onChange:Ye,onKeyDown:tt,onKeyUp:Se})))}i(CC,"CommandBar");var ua=he(Ne());var EC=he(Ne());function bC({checked:e,onToggle:t,text:n}){return EC.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},EC.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",n)}i(bC,"ToggleButton");var ul=he(Ne()),TC=he(ML());var Kg=class extends ul.Component{constructor(n){super(n);this.viewport=ul.default.createRef();this.heights={},this.state={vScroll:Sf()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"EventLogList")}static{this.propTypes={events:TC.default.array.isRequired,rowHeight:TC.default.number}}static{this.defaultProps={rowHeight:18}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Ig(this.viewport)}componentDidUpdate(n,s,c){c&&m0(this.viewport),this.onViewportUpdate()}onViewportUpdate(){let n=this.viewport.current,s=Sf({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:n.scrollTop,viewportHeight:n.offsetHeight,itemHeights:this.props.events.map(c=>this.heights[c.id])});vs(this.state.vScroll,s)||this.setState({vScroll:s})}setHeight(n,s){if(s&&!this.heights[n]){let c=s.offsetHeight;this.heights[n]!==c&&(this.heights[n]=c,this.onViewportUpdate())}}render(){let{vScroll:n}=this.state,{events:s}=this.props;return ul.default.createElement("pre",{ref:this.viewport,onScroll:this.onViewportUpdate},ul.default.createElement("div",{style:{height:n.paddingTop}}),s.slice(n.start,n.end).map(c=>ul.default.createElement("div",{key:c.id,ref:h=>this.setHeight(c.id,h)},ul.default.createElement(aW,{event:c}),c.message)),ul.default.createElement("div",{style:{height:n.paddingBottom}}))}};function aW({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return ul.default.createElement("i",{className:`fa fa-fw fa-${t}`})}i(aW,"LogIcon");var kC=class extends ua.Component{static{i(this,"PureEventLog")}static{this.defaultProps={defaultHeight:200}}constructor(t,n){super(t,n),this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(t){t.preventDefault(),this.dragStart=this.state.height+t.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(t){t.preventDefault(),this.setState({height:this.dragStart-t.pageY})}onDragStop(t){t.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){let{height:t}=this.state,{filters:n,events:s,toggleFilter:c,close:h}=this.props;return ua.default.createElement("div",{className:"eventlog",style:{height:t}},ua.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",ua.default.createElement("div",{className:"pull-right"},Object.values(Wx).map(p=>ua.default.createElement(bC,{key:p,text:p,checked:n[p],onToggle:()=>c(p)})),ua.default.createElement("i",{onClick:h,className:"fa fa-close"}))),ua.default.createElement(Kg,{events:s}))}},LL=ku(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:rd,toggleFilter:bO})(kC);var vn=he(Ne());function NC(){let e=be(I=>I.backendState.version),{mode:t,intercept:n,showhost:s,upstream_cert:c,rawtcp:h,http2:p,websocket:v,anticache:S,anticomp:b,stickyauth:k,stickycookie:D,stream_large_bodies:M,listen_host:z,listen_port:q,server:Q,ssl_insecure:ie}=be(I=>I.options);return vn.createElement("footer",null,t&&(t.length!==1||t[0]!=="regular")&&vn.createElement("span",{className:"label label-success"},t.join(",")),n&&vn.createElement("span",{className:"label label-success"},"Intercept: ",n),ie&&vn.createElement("span",{className:"label label-danger"},"ssl_insecure"),s&&vn.createElement("span",{className:"label label-success"},"showhost"),!c&&vn.createElement("span",{className:"label label-success"},"no-upstream-cert"),!h&&vn.createElement("span",{className:"label label-success"},"no-raw-tcp"),!p&&vn.createElement("span",{className:"label label-success"},"no-http2"),!v&&vn.createElement("span",{className:"label label-success"},"no-websocket"),S&&vn.createElement("span",{className:"label label-success"},"anticache"),b&&vn.createElement("span",{className:"label label-success"},"anticomp"),k&&vn.createElement("span",{className:"label label-success"},"stickyauth: ",k),D&&vn.createElement("span",{className:"label label-success"},"stickycookie: ",D),M&&vn.createElement("span",{className:"label label-success"},"stream: ",Sy(M)),vn.createElement("div",{className:"pull-right"},vn.createElement(Go,null,Q&&vn.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},z||"*",":",q||8080)),vn.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}i(NC,"Footer");var PC=he(Ne());var LC=he(Ne());var xd=he(Ne());function OC({children:e}){return xd.createElement("div",null,xd.createElement("div",{className:"modal-backdrop fade in"}),xd.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:-1,role:"dialog","aria-labelledby":"options"},xd.createElement("div",{className:"modal-dialog modal-lg",role:"document"},xd.createElement("div",{className:"modal-content"},e))))}i(OC,"ModalLayout");var Pr=he(Ne());var Yg=he(cg());var Ii=he(Ne());var IL=he(Zn());var uW=i(e=>{e.key!=="Escape"&&e.stopPropagation()},"stopPropagation");function FL({value:e,onChange:t,...n}){return Ii.default.createElement("div",{className:"checkbox"},Ii.default.createElement("label",null,Ii.default.createElement("input",{type:"checkbox",checked:e,onChange:s=>t(s.target.checked),...n}),"Enable"))}i(FL,"BooleanOption");function PL({value:e,onChange:t,...n}){return Ii.default.createElement("input",{type:"text",value:e||"",onChange:s=>t(s.target.value),...n})}i(PL,"StringOption");function RL(e){return i(function({onChange:n,...s}){return Ii.default.createElement(e,{onChange:c=>n(c||null),...s})},"OptionalWrapper")}i(RL,"Optional");function DL({value:e,onChange:t,...n}){return Ii.default.createElement("input",{type:"number",value:e,onChange:s=>t(parseInt(s.target.value)),...n})}i(DL,"NumberOption");function cW({value:e,onChange:t,choices:n,...s}){return Ii.default.createElement("select",{onChange:c=>t(c.target.value),value:e,...s},n.map(c=>Ii.default.createElement("option",{key:c,value:c},c)))}i(cW,"ChoicesOption");function fW({value:e,onChange:t,...n}){let s=Math.max(e.length,1),[c,h]=Ii.default.useState(e.join(` -`));return Ii.default.createElement("textarea",{rows:s,value:c,onChange:i(v=>{let S=v.target.value;h(S),t(S.split(` -`).map(b=>b.trim()).filter(b=>b!==""))},"handleChange"),...n})}i(fW,"StringSequenceOption");var pW={bool:FL,str:PL,int:DL,"optional str":RL(PL),"optional int":RL(DL),"sequence of str":fW};function dW({choices:e,type:t,value:n,onChange:s,name:c,error:h}){let p,v={onChange:s,value:n};if(e)p=cW,v.choices=e;else if(p=pW[t],!p)throw`unknown option type ${t}`;return p!==FL&&(v.className="form-control"),Ii.default.createElement("div",{className:(0,IL.default)({"has-error":h})},Ii.default.createElement(p,{name:c,onKeyDown:uW,...v}))}i(dW,"PureOption");function AC({name:e}){let t=Ke(),n=be(p=>p.options_meta[e]?.choices),s=be(p=>p.options_meta[e]?.type),c=be(p=>{let v=p.ui.optionsEditor[e];return v?v.value:p.options_meta[e]?.value}),h=be(p=>p.ui.optionsEditor[e]?.error);return Ii.default.createElement(dW,{name:e,choices:n,type:s,value:c,error:h,onChange:p=>t(nd(e,p))})}i(AC,"OptionInput");function hW({name:e}){let t=be(n=>n.options_meta[e]?.help);return Pr.default.createElement("div",{className:"help-block small"},t)}i(hW,"OptionHelp");function gW({name:e}){let t=be(n=>n.options_meta[e]?.error);return t?Pr.default.createElement("div",{className:"small text-danger"},t):null}i(gW,"OptionError");function mW({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if((0,Yg.isEmpty)((0,Yg.compact)(e))&&(0,Yg.isEmpty)(t))return null;t="[ ]"}else t===""?t='""':t===null&&(t="null");return Pr.default.createElement("div",{className:"small"},"Default: ",Pr.default.createElement("strong",null," ",t," ")," ")}i(mW,"PureOptionDefault");var vW=ku((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t]?.default}))(mW);function MC(){let e=Ke(),t=be(n=>Object.keys(n.options_meta),vs).sort();return Pr.default.createElement("div",null,Pr.default.createElement("div",{className:"modal-header"},Pr.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal",onClick:()=>e(Py())},Pr.default.createElement("i",{className:"fa fa-fw fa-times"})),Pr.default.createElement("div",{className:"modal-title"},Pr.default.createElement("h4",null,"Options"))),Pr.default.createElement("div",{className:"modal-body"},Pr.default.createElement("div",{className:"form-horizontal"},t.map(n=>Pr.default.createElement("div",{key:n,className:"form-group"},Pr.default.createElement("div",{className:"col-xs-6"},Pr.default.createElement("label",{htmlFor:n},n),Pr.default.createElement(hW,{name:n})),Pr.default.createElement("div",{className:"col-xs-6"},Pr.default.createElement(AC,{name:n}),Pr.default.createElement(gW,{name:n}),Pr.default.createElement(vW,{name:n})))))),Pr.default.createElement("div",{className:"modal-footer"}))}i(MC,"OptionModal");function yW(){return LC.createElement(OC,null,LC.createElement(MC,null))}i(yW,"OptionModal");var BL=[yW];function RC(){let e=be(n=>n.ui.modal.activeModal),t=BL.find(n=>n.name===e);return e&&t!==void 0?PC.createElement(t,null):PC.createElement("div",null)}i(RC,"PureModal");var DC=class extends Vn.Component{constructor(){super(...arguments);this.state={};this.render=i(()=>{let{showEventLog:n,showCommandBar:s}=this.props;return this.state.error?(console.log("ERR",this.state),Vn.default.createElement("div",{className:"container"},Vn.default.createElement("h1",null,"mitmproxy has crashed."),Vn.default.createElement("pre",null,this.state.error.stack,Vn.default.createElement("br",null),Vn.default.createElement("br",null),"Component Stack:",this.state.errorInfo?.componentStack),Vn.default.createElement("p",null,"Please lodge a bug report at"," ",Vn.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):Vn.default.createElement("div",{id:"container",tabIndex:0},Vn.default.createElement(xC,null),Vn.default.createElement(vC,null),s&&Vn.default.createElement(CC,{key:"commandbar"}),n&&Vn.default.createElement(LL,{key:"eventlog"}),Vn.default.createElement(NC,null),Vn.default.createElement(RC,null))},"render")}static{i(this,"ProxyAppMain")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(n,s){this.setState({error:n,errorInfo:s})}},HL=ku(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:oM})(DC);var Uu={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function wW(e){let[t,n]=window.location.hash.substr(1).split("?",2),s=t.substr(1).split("/");if(s[0]==="flows"&&s.length==3){let[c,h]=s.slice(1);e.dispatch(ea(c)),e.dispatch(ef(h))}n&&n.split("&").forEach(c=>{let[h,p]=c.split("=",2),v=decodeURIComponent(p);switch(h){case Uu.SEARCH:e.dispatch(Ey(v));break;case Uu.HIGHLIGHT:e.dispatch(by(v));break;case Uu.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(rd());break;case Uu.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(Ky());break;default:console.error(`unimplemented query arg: ${c}`)}})}i(wW,"updateStoreFromUrl");function SW(e){let t=e.getState(),n={[Uu.SEARCH]:t.flows.filter,[Uu.HIGHLIGHT]:t.flows.highlight,[Uu.SHOW_EVENTLOG]:t.eventLog.visible,[Uu.SHOW_COMMANDBAR]:t.commandBar.visible},s=Object.keys(n).filter(p=>n[p]).map(p=>`${p}=${encodeURIComponent(n[p])}`).join("&"),c;t.flows.selected.length>0?c=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:c="/flows",s&&(c+="?"+s);let h=window.location.pathname;h==="blank"&&(h="/"),window.location.hash.substr(1)!==c&&history.replaceState(void 0,"",`${h}#${c}`)}i(SW,"updateUrlFromStore");function IC(e){wW(e),e.subscribe(()=>SW(e))}i(IC,"initialize");var xW="reset",Xg=class{static{i(this,"WebsocketBackend")}constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+location.pathname.replace(/\/$/,"")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",t=>this.onClose(t)),this.socket.addEventListener("message",t=>this.onMessage(JSON.parse(t.data))),this.socket.addEventListener("error",t=>this.onError(t))}onOpen(){this.fetchData("state"),this.fetchData("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(IO())}fetchData(t){let n=[];this.activeFetches[t]=n,bt(`./${t}`).then(s=>s.json()).then(s=>{this.activeFetches[t]===n&&this.receive(t,s)})}onMessage(t){if(t.cmd===xW)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let n=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch({type:n,...t})}}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:s,cmd:"receive",resource:t,data:n});let c=this.activeFetches[t];delete this.activeFetches[t],c.forEach(h=>this.onMessage(h)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(FO())}onClose(t){this.store.dispatch(BO(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(...t){console.error("websocket connection errored",t)}};var Qg=class{static{i(this,"StaticBackend")}constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){bt(`./${t}`).then(n=>n.json()).then(n=>{this.receive(t,n)})}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:s,cmd:"receive",resource:t,data:n})}};IC(af);window.MITMWEB_STATIC?window.backend=new Qg(af):window.backend=new Xg(af);window.addEventListener("error",e=>{af.dispatch(TO(`${e.message} -${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{let e=document.getElementById("mitmproxy");(0,zL.createRoot)(e).render(FC.createElement(yN,{store:af},FC.createElement(HL,null)))});})(); +`),st}Ry(()=>{Gt.current=void 0,Wt.current=void 0,fn.current=Ue});let Kr=Tt.useMemo(()=>Tt.createElement(ne,{...Ue,ref:Re}),[Re,ne,Ue]);return Tt.useMemo(()=>q?Tt.createElement(Ye.Provider,{value:cn},Kr):Kr,[Ye,Kr,cn])}i(j,"ConnectFunction");let Z=Tt.memo(j);if(Z.WrappedComponent=ne,Z.displayName=j.displayName=L,S){let he=Tt.forwardRef(i(function(Ee,Ye){return Tt.createElement(Z,{...Ee,reactReduxForwardedRef:Ye})},"forwardConnectRef"));return he.displayName=L,he.WrappedComponent=ne,xx(he,ne)}return xx(Z,ne)},"wrapWithConnect")}i(Q4,"connect");var Wu=Q4;function J4({store:e,context:t,children:n,serverState:s,stabilityCheck:l="once",identityFunctionCheck:h="once"}){let d=Tt.useMemo(()=>{let b=xA(e);return{store:e,subscription:b,getServerState:s?()=>s:void 0,stabilityCheck:l,identityFunctionCheck:h}},[e,s,l,h]),v=Tt.useMemo(()=>e.getState(),[e]);Ry(()=>{let{subscription:b}=d;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),v!==e.getState()&&b.notifyNestedSubs(),()=>{b.tryUnsubscribe(),b.onStateChange=void 0}},[d,v]);let S=t||gl;return Tt.createElement(S.Provider,{value:d},n)}i(J4,"Provider");var EA=J4;function bA(e=gl){let t=e===gl?gA:Cx(e),n=i(()=>{let{store:s}=t();return s},"useStore2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(bA,"createStoreHook");var Z4=bA();function eB(e=gl){let t=e===gl?Z4:bA(e),n=i(()=>t().dispatch,"useDispatch2");return Object.assign(n,{withTypes:i(()=>n,"withTypes")}),n}i(eB,"createDispatchHook");var TA=eB();a4(hA.useSyncExternalStoreWithSelector);q4(pA.useSyncExternalStore);var Jn=pe(Te());var kA="UI_FLOWVIEW_SET_TAB",NA="SET_CONTENT_VIEW_FOR",tB={tab:"request",contentViewFor:{}};function bx(e=tB,t){switch(t.type){case NA:return{...e,contentViewFor:{...e.contentViewFor,[t.messageId]:t.contentView}};case kA:return{...e,tab:t.tab?t.tab:"request"};default:return e}}i(bx,"reducer");function mf(e){return{type:kA,tab:e}}i(mf,"selectTab");function Dy(e,t){return{type:NA,messageId:e,contentView:t}}i(Dy,"setContentViewFor");var rB=pe(bm()),nB=pe(Te());window.React=nB;var Iy=i(function(e){if(e===0)return"0";let t=["b","kb","mb","gb","tb"],n=0;for(;ne);n++);let s;return e%Math.pow(1024,n)===0?s=0:s=1,(e/Math.pow(1024,n)).toFixed(s)+t[n]},"formatSize"),Fy=i(function(e){let t=e,n=["ms","s","min","h"],s=[1e3,60,60],l=0;for(;Math.abs(t)>=s[l]&&lxt(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});xt.post=(e,t,n={})=>xt(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),...n});async function gf(e,...t){return await(await xt(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()}i(gf,"runCommand");async function AA(e){try{await navigator.clipboard.write([new ClipboardItem({"text/plain":e})]);return}catch(s){console.warn(s)}let t=await e;try{await navigator.clipboard.writeText(t);return}catch(s){console.warn(s)}let n=document.createElement("textarea");n.value=t,n.style.position="absolute",n.style.opacity="0",document.body.appendChild(n);try{if(n.focus(),n.select(),!document.execCommand("copy"))throw"failed to copy"}catch{alert(t)}finally{n.remove()}}i(AA,"copyToClipboard");function Tm(e,t){let n=e.lastIndexOf(t);if(n===-1)return["",e];let s=e.slice(0,n),l=e.slice(n+t.length);return[s,l]}i(Tm,"rpartition");function By(e,t){let n=e.indexOf(t);if(n===-1)return[e,""];let s=e.slice(0,n),l=e.slice(n+t.length);return[s,l]}i(By,"partition");var Am={};xb(Am,{ADD:()=>Ox,RECEIVE:()=>Ix,REMOVE:()=>Dx,SET_FILTER:()=>Lx,SET_SORT:()=>Mx,UPDATE:()=>Rx,add:()=>sB,defaultState:()=>ap,receive:()=>uB,reduce:()=>$u,remove:()=>lB,setFilter:()=>km,setSort:()=>Fx,update:()=>aB});var Px=pe(PA());var Lx="LIST_SET_FILTER",Mx="LIST_SET_SORT",Ox="LIST_ADD",Rx="LIST_UPDATE",Dx="LIST_REMOVE",Ix="LIST_RECEIVE",ap={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function $u(e=ap,t){let{byId:n,list:s,listIndex:l,view:h,viewIndex:d}=e;switch(t.type){case Lx:h=(0,Px.default)(s.filter(t.filter),t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break;case Mx:h=(0,Px.default)([...h],t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break;case Ox:if(t.item.id in n)break;n={...n,[t.item.id]:t.item},l={...l,[t.item.id]:s.length},s=[...s,t.item],t.filter(t.item)&&({view:h,viewIndex:d}=LA(e,t.item,t.sort));break;case Rx:{n={...n,[t.item.id]:t.item},s=[...s],s[l[t.item.id]]=t.item;let v=t.item.id in d,S=t.filter(t.item);S&&!v?{view:h,viewIndex:d}=LA(e,t.item,t.sort):!S&&v?{data:h,dataIndex:d}=Ax(h,d,t.item.id):S&&v&&({view:h,viewIndex:d}=cB(e,t.item,t.sort));break}case Dx:if(!(t.id in n))break;n={...n},delete n[t.id],{data:s,dataIndex:l}=Ax(s,l,t.id),t.id in d&&({data:h,dataIndex:d}=Ax(h,d,t.id));break;case Ix:s=t.list,l={},n={},s.forEach((v,S)=>{n[v.id]=v,l[v.id]=S}),h=s.filter(t.filter).sort(t.sort),d={},h.forEach((v,S)=>{d[v.id]=S});break}return{byId:n,list:s,listIndex:l,view:h,viewIndex:d}}i($u,"reduce");function km(e=Hy,t=Nm){return{type:Lx,filter:e,sort:t}}i(km,"setFilter");function Fx(e=Nm){return{type:Mx,sort:e}}i(Fx,"setSort");function sB(e,t=Hy,n=Nm){return{type:Ox,item:e,filter:t,sort:n}}i(sB,"add");function aB(e,t=Hy,n=Nm){return{type:Rx,item:e,filter:t,sort:n}}i(aB,"update");function lB(e){return{type:Dx,id:e}}i(lB,"remove");function uB(e,t=Hy,n=Nm){return{type:Ix,list:e,filter:t,sort:n}}i(uB,"receive");function LA(e,t,n){let s=fB(e.view,t,n),l=[...e.view],h={...e.viewIndex};l.splice(s,0,t);for(let d=l.length-1;d>=s;d--)h[l[d].id]=d;return{view:l,viewIndex:h}}i(LA,"sortedInsert");function Ax(e,t,n){let s=t[n],l=[...e],h={...t};delete h[n],l.splice(s,1);for(let d=l.length-1;d>=s;d--)h[l[d].id]=d;return{data:l,dataIndex:h}}i(Ax,"removeData");function cB(e,t,n){let s=[...e.view],l={...e.viewIndex},h=l[t.id];for(s[h]=t;h+10;)s[h]=s[h+1],s[h+1]=t,l[t.id]=h+1,l[s[h].id]=h,++h;for(;h>0&&n(s[h],s[h-1])<0;)s[h]=s[h-1],s[h-1]=t,l[t.id]=h-1,l[s[h].id]=h,--h;return{view:s,viewIndex:l}}i(cB,"sortedUpdate");function fB(e,t,n){let s=0,l=e.length;for(;s>>1;n(t,e[h])>=0?s=h+1:l=h}return s}i(fB,"sortedIndex");function Hy(){return!0}i(Hy,"defaultFilter");function Nm(e,t){return 0}i(Nm,"defaultSort");var MA={http:80,https:443},On=class e{static{i(this,"MessageUtils")}static getContentType(t){let n=e.get_first_header(t,/^Content-Type$/i);if(n)return n.split(";")[0].trim()}static get_first_header(t,n){let s=t;s._headerLookups||Object.defineProperty(s,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let l=n.toString();if(!(l in s._headerLookups)){let h;for(let d=0;d{switch(e.type){case"http":{let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),e.websocket&&(t+=e.websocket.messages_meta.contentLength||0),t}case"tcp":case"udp":return e.messages_meta.contentLength||0;case"dns":return e.response?.size??0}},"getTotalSize"),zy=i(e=>e.type==="http"&&!e.websocket,"canReplay"),Wx=i(e=>{if(e.type!=="http")return e.client_conn.tls_version==="QUICv1"?"resource-icon-quic":`resource-icon-${e.type}`;if(e.websocket)return"resource-icon-websocket";if(!e.response)return"resource-icon-plain";let t=vl.getContentType(e.response)||"";return e.response.status_code===304?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},"getIcon"),$x=i(e=>{switch(e.type){case"http":return Bs.pretty_url(e.request);case"tcp":case"udp":return`${e.client_conn.peername.join(":")} \u2194 ${e.server_conn?.address?.join(":")}`;case"dns":return`${e.request.questions.map(t=>`${t.name} ${t.type}`).join(", ")} = ${(e.response?.answers.map(t=>t.data).join(", ")??"...")||"?"}`}},"mainPath"),Vx=i(e=>{switch(e.type){case"http":return e.response?.status_code;case"dns":return e.response?.response_code;default:return}},"statusCode"),qx=i(e=>{switch(e.type){case"http":return e.websocket?e.client_conn.tls_established?"WSS":"WS":e.request.method;case"dns":return e.request.op_code;default:return e.type.toUpperCase()}},"getMethod"),jx=i(e=>{switch(e.type){case"http":return e.request.http_version;default:return""}},"getVersion"),OA={tls:i(e=>e.type==="http"&&e.request.scheme,"tls"),icon:Wx,index:i(()=>0,"index"),path:$x,method:qx,version:jx,status:Vx,size:Ux,time:i(e=>{let t=Pm(e),n=zx(e);return t&&n&&n-t},"time"),timestamp:Pm,quickactions:i(()=>0,"quickactions"),comment:i(e=>e.comment,"comment")};var vf=function(){"use strict";function e(s,l){function h(){this.constructor=s}i(h,"ctor"),h.prototype=l.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,l,h,d){this.message=s,this.expected=l,this.found=h,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var l=arguments.length>1?arguments[1]:{},h=this,d={},v={start:vi},S=vi,b={type:"other",description:"filter expression"},k=i(function(w){return w},"peg$c1"),R={type:"other",description:"whitespace"},I=/^[ \t\n\r]/,z={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},q={type:"other",description:"control character"},Q=/^[|&!()~"]/,ne={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},D={type:"other",description:"optional whitespace"},L="|",B={type:"literal",value:"|",description:'"|"'},j=i(function(w,N){return Sc(w,N)},"peg$c11"),re="&",Z={type:"literal",value:"&",description:'"&"'},oe=i(function(w,N){return Qf(w,N)},"peg$c14"),he="!",Re={type:"literal",value:"!",description:'"!"'},Ee=i(function(w){return Qs(w)},"peg$c17"),Ye="(",tt={type:"literal",value:"(",description:'"("'},xe=")",Xe={type:"literal",value:")",description:'")"'},je=i(function(w){return Js(w)},"peg$c22"),Qe="~all",ot={type:"literal",value:"~all",description:'"~all"'},It=i(function(){return Jf},"peg$c25"),At="~a",cn={type:"literal",value:"~a",description:'"~a"'},fn=i(function(){return xc},"peg$c28"),gr="~b",Wt={type:"literal",value:"~b",description:'"~b"'},vr=i(function(w){return Wo(w)},"peg$c31"),yr="~bq",Gt={type:"literal",value:"~bq",description:'"~bq"'},Ft=i(function(w){return Kt(w)},"peg$c34"),se="~bs",Ue={type:"literal",value:"~bs",description:'"~bs"'},Kr=i(function(w){return Gp(w)},"peg$c37"),Zt="~c",st={type:"literal",value:"~c",description:'"~c"'},Fe=i(function(w){return Cc(w)},"peg$c40"),Fn="~comment",En={type:"literal",value:"~comment",description:'"~comment"'},no=i(function(w){return Zs(w)},"peg$c43"),Ho="~d",lt={type:"literal",value:"~d",description:'"~d"'},wr=i(function(w){return _c(w)},"peg$c46"),fr="~dns",pt={type:"literal",value:"~dns",description:'"~dns"'},io=i(function(){return Ha},"peg$c49"),Bn="~dst",Mi={type:"literal",value:"~dst",description:'"~dst"'},Gr=i(function(w){return ed(w)},"peg$c52"),Yr="~e",oo={type:"literal",value:"~e",description:'"~e"'},hi=i(function(){return Wl},"peg$c55"),Hn="~h",so={type:"literal",value:"~h",description:'"~h"'},bl=i(function(w){return $l(w)},"peg$c58"),Y="~hq",ee={type:"literal",value:"~hq",description:'"~hq"'},Ce=i(function(w){return Ec(w)},"peg$c61"),Me="~hs",Tl={type:"literal",value:"~hs",description:'"~hs"'},ze=i(function(w){return Yp(w)},"peg$c64"),Xr="~http",Yt={type:"literal",value:"~http",description:'"~http"'},Mt=i(function(){return Vl},"peg$c67"),Pt="~marked",Na={type:"literal",value:"~marked",description:'"~marked"'},dn=i(function(){return hn},"peg$c70"),zn="~marker",kr={type:"literal",value:"~marker",description:'"~marker"'},gs=i(function(w){return bc(w)},"peg$c73"),bn="~m",Aa={type:"literal",value:"~m",description:'"~m"'},Pa=i(function(w){return co(w)},"peg$c76"),nc="~q",ic={type:"literal",value:"~q",description:'"~q"'},oc=i(function(){return yi},"peg$c79"),$f="~replayq",sc={type:"literal",value:"~replayq",description:'"~replayq"'},Fp=i(function(){return ea},"peg$c82"),kl="~replays",Bp={type:"literal",value:"~replays",description:'"~replays"'},Hp=i(function(){return ql},"peg$c85"),Nl="~replay",Vf={type:"literal",value:"~replay",description:'"~replay"'},ac=i(function(){return Tc},"peg$c88"),vs="~src",zp={type:"literal",value:"~src",description:'"~src"'},Up=i(function(w){return Fi(w)},"peg$c91"),La="~s",lc={type:"literal",value:"~s",description:'"~s"'},ao=i(function(){return $o},"peg$c94"),qf="~tcp",Oi={type:"literal",value:"~tcp",description:'"~tcp"'},uc=i(function(){return jl},"peg$c97"),cc="~udp",or={type:"literal",value:"~udp",description:'"~udp"'},Pe=i(function(){return xs},"peg$c100"),lo="~tq",Al={type:"literal",value:"~tq",description:'"~tq"'},Ri=i(function(w){return td(w)},"peg$c103"),vt="~ts",ys={type:"literal",value:"~ts",description:'"~ts"'},Ma=i(function(w){return Xp(w)},"peg$c106"),Oa="~t",ce={type:"literal",value:"~t",description:'"~t"'},Ve=i(function(w){return Kl(w)},"peg$c109"),qs="~u",fc={type:"literal",value:"~u",description:'"~u"'},js=i(function(w){return Gl(w)},"peg$c112"),zo="~websocket",dc={type:"literal",value:"~websocket",description:'"~websocket"'},qe=i(function(){return Tn},"peg$c115"),jf={type:"other",description:"integer"},Pl=/^['"]/,ws={type:"class",value:`['"]`,description:`['"]`},mi=/^[0-9]/,Ll={type:"class",value:"[0-9]",description:"[0-9]"},Ml=i(function(w){return parseInt(w.join(""),10)},"peg$c121"),Ss={type:"other",description:"string"},uo='"',Ol={type:"literal",value:'"',description:'"\\""'},Ks=i(function(w){return w.join("")},"peg$c125"),pc="'",Rl={type:"literal",value:"'",description:`"'"`},hc=/^["\\]/,mc={type:"class",value:'["\\\\]',description:'["\\\\]'},Dl={type:"any",description:"any character"},Ra=i(function(w){return w},"peg$c131"),gc="\\",Di={type:"literal",value:"\\",description:'"\\\\"'},Kf=/^['\\]/,Wp={type:"class",value:"['\\\\]",description:"['\\\\]"},Il=/^['"\\]/,Da={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},$p="n",vc={type:"literal",value:"n",description:'"n"'},Vp=i(function(){return` +`},"peg$c140"),qp="r",yc={type:"literal",value:"r",description:'"r"'},Gf=i(function(){return"\r"},"peg$c143"),jp="t",Bt={type:"literal",value:"t",description:'"t"'},Ot=i(function(){return" "},"peg$c146"),M=0,De=0,Gs=[{line:1,column:1,seenCR:!1}],gi=0,Fl=[],ve=0,Ia;if("startRule"in l){if(!(l.startRule in v))throw new Error(`Can't start parsing from rule "`+l.startRule+'".');S=v[l.startRule]}function Kp(){return s.substring(De,M)}i(Kp,"text");function Rt(){return Uo(De,M)}i(Rt,"location");function Yf(w){throw Xs(null,[{type:"other",description:w}],s.substring(De,M),Uo(De,M))}i(Yf,"expected");function Ys(w){throw Xs(w,null,s.substring(De,M),Uo(De,M))}i(Ys,"error");function Fa(w){var N=Gs[w],U,W;if(N)return N;for(U=w-1;!Gs[U];)U--;for(N=Gs[U],N={line:N.line,column:N.column,seenCR:N.seenCR};Ugi&&(gi=M,Fl=[]),Fl.push(w))}i(Se,"peg$fail");function Xs(w,N,U,W){function mn(Un){var fo=1;for(Un.sort(function(Vo,qo){return Vo.descriptionqo.description?1:0});fo1?qo.slice(0,-1).join(", ")+" or "+qo[Un.length-1]:qo[0],Yl=fo?'"'+Vo(fo)+'"':"end of input","Expected "+kc+" but "+Yl+" found."}return i(Xt,"buildMessage"),N!==null&&mn(N),new t(w!==null?w:Xt(N,U),N,U,W)}i(Xs,"peg$buildException");function vi(){var w,N,U,W;return ve++,w=M,N=pn(),N!==d?(U=Hl(),U!==d?(W=pn(),W!==d?(De=w,N=k(U),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),ve--,w===d&&(N=d,ve===0&&Se(b)),w}i(vi,"peg$parsestart");function Ze(){var w,N;return ve++,I.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(z)),ve--,w===d&&(N=d,ve===0&&Se(R)),w}i(Ze,"peg$parsews");function Bl(){var w,N;return ve++,Q.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(ne)),ve--,w===d&&(N=d,ve===0&&Se(q)),w}i(Bl,"peg$parsecc");function pn(){var w,N;for(ve++,w=[],N=Ze();N!==d;)w.push(N),N=Ze();return ve--,w===d&&(N=d,ve===0&&Se(D)),w}i(pn,"peg$parse__");function Hl(){var w,N,U,W,mn,Xt;return w=M,N=Qr(),N!==d?(U=pn(),U!==d?(s.charCodeAt(M)===124?(W=L,M++):(W=d,ve===0&&Se(B)),W!==d?(mn=pn(),mn!==d?(Xt=Hl(),Xt!==d?(De=w,N=j(N,Xt),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Qr()),w}i(Hl,"peg$parseOrExpr");function Qr(){var w,N,U,W,mn,Xt;if(w=M,N=zl(),N!==d?(U=pn(),U!==d?(s.charCodeAt(M)===38?(W=re,M++):(W=d,ve===0&&Se(Z)),W!==d?(mn=pn(),mn!==d?(Xt=Qr(),Xt!==d?(De=w,N=oe(N,Xt),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d){if(w=M,N=zl(),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=Qr(),W!==d?(De=w,N=oe(N,W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;w===d&&(w=zl())}return w}i(Qr,"peg$parseAndExpr");function zl(){var w,N,U,W;return w=M,s.charCodeAt(M)===33?(N=he,M++):(N=d,ve===0&&Se(Re)),N!==d?(U=pn(),U!==d?(W=zl(),W!==d?(De=w,N=Ee(W),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Zn()),w}i(zl,"peg$parseNotExpr");function Zn(){var w,N,U,W,mn,Xt;return w=M,s.charCodeAt(M)===40?(N=Ye,M++):(N=d,ve===0&&Se(tt)),N!==d?(U=pn(),U!==d?(W=Hl(),W!==d?(mn=pn(),mn!==d?(s.charCodeAt(M)===41?(Xt=xe,M++):(Xt=d,ve===0&&Se(Xe)),Xt!==d?(De=w,N=je(W),w=N):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d)):(M=w,w=d),w===d&&(w=Xf()),w}i(Zn,"peg$parseBindingExpr");function Xf(){var w,N,U,W;if(w=M,s.substr(M,4)===Qe?(N=Qe,M+=4):(N=d,ve===0&&Se(ot)),N!==d&&(De=w,N=It()),w=N,w===d&&(w=M,s.substr(M,2)===At?(N=At,M+=2):(N=d,ve===0&&Se(cn)),N!==d&&(De=w,N=fn()),w=N,w===d)){if(w=M,s.substr(M,2)===gr?(N=gr,M+=2):(N=d,ve===0&&Se(Wt)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=vr(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===yr?(N=yr,M+=3):(N=d,ve===0&&Se(Gt)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Ft(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===se?(N=se,M+=3):(N=d,ve===0&&Se(Ue)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Kr(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Zt?(N=Zt,M+=2):(N=d,ve===0&&Se(st)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=wc(),W!==d?(De=w,N=Fe(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,8)===Fn?(N=Fn,M+=8):(N=d,ve===0&&Se(En)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=no(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Ho?(N=Ho,M+=2):(N=d,ve===0&&Se(lt)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=wr(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,4)===fr?(N=fr,M+=4):(N=d,ve===0&&Se(pt)),N!==d&&(De=w,N=io()),w=N,w===d)){if(w=M,s.substr(M,4)===Bn?(N=Bn,M+=4):(N=d,ve===0&&Se(Mi)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Gr(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===Yr?(N=Yr,M+=2):(N=d,ve===0&&Se(oo)),N!==d&&(De=w,N=hi()),w=N,w===d)){if(w=M,s.substr(M,2)===Hn?(N=Hn,M+=2):(N=d,ve===0&&Se(so)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=bl(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===Y?(N=Y,M+=3):(N=d,ve===0&&Se(ee)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Ce(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===Me?(N=Me,M+=3):(N=d,ve===0&&Se(Tl)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=ze(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,5)===Xr?(N=Xr,M+=5):(N=d,ve===0&&Se(Yt)),N!==d&&(De=w,N=Mt()),w=N,w===d&&(w=M,s.substr(M,7)===Pt?(N=Pt,M+=7):(N=d,ve===0&&Se(Na)),N!==d&&(De=w,N=dn()),w=N,w===d))){if(w=M,s.substr(M,7)===zn?(N=zn,M+=7):(N=d,ve===0&&Se(kr)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=gs(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===bn?(N=bn,M+=2):(N=d,ve===0&&Se(Aa)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Pa(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===nc?(N=nc,M+=2):(N=d,ve===0&&Se(ic)),N!==d&&(De=w,N=oc()),w=N,w===d&&(w=M,s.substr(M,8)===$f?(N=$f,M+=8):(N=d,ve===0&&Se(sc)),N!==d&&(De=w,N=Fp()),w=N,w===d&&(w=M,s.substr(M,8)===kl?(N=kl,M+=8):(N=d,ve===0&&Se(Bp)),N!==d&&(De=w,N=Hp()),w=N,w===d&&(w=M,s.substr(M,7)===Nl?(N=Nl,M+=7):(N=d,ve===0&&Se(Vf)),N!==d&&(De=w,N=ac()),w=N,w===d))))){if(w=M,s.substr(M,4)===vs?(N=vs,M+=4):(N=d,ve===0&&Se(zp)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Up(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d&&(w=M,s.substr(M,2)===La?(N=La,M+=2):(N=d,ve===0&&Se(lc)),N!==d&&(De=w,N=ao()),w=N,w===d&&(w=M,s.substr(M,4)===qf?(N=qf,M+=4):(N=d,ve===0&&Se(Oi)),N!==d&&(De=w,N=uc()),w=N,w===d&&(w=M,s.substr(M,4)===cc?(N=cc,M+=4):(N=d,ve===0&&Se(or)),N!==d&&(De=w,N=Pe()),w=N,w===d)))){if(w=M,s.substr(M,3)===lo?(N=lo,M+=3):(N=d,ve===0&&Se(Al)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Ri(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,3)===vt?(N=vt,M+=3):(N=d,ve===0&&Se(ys)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Ma(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===Oa?(N=Oa,M+=2):(N=d,ve===0&&Se(ce)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=Ve(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.substr(M,2)===qs?(N=qs,M+=2):(N=d,ve===0&&Se(fc)),N!==d){if(U=[],W=Ze(),W!==d)for(;W!==d;)U.push(W),W=Ze();else U=d;U!==d?(W=jt(),W!==d?(De=w,N=js(W),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;w===d&&(w=M,s.substr(M,10)===zo?(N=zo,M+=10):(N=d,ve===0&&Se(dc)),N!==d&&(De=w,N=qe()),w=N,w===d&&(w=M,N=jt(),N!==d&&(De=w,N=js(N)),w=N))}}}}}}}}}}}}}}}}}return w}i(Xf,"peg$parseExpr");function wc(){var w,N,U,W;if(ve++,w=M,Pl.test(s.charAt(M))?(N=s.charAt(M),M++):(N=d,ve===0&&Se(ws)),N===d&&(N=null),N!==d){if(U=[],mi.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Ll)),W!==d)for(;W!==d;)U.push(W),mi.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se(Ll));else U=d;U!==d?(Pl.test(s.charAt(M))?(W=s.charAt(M),M++):(W=d,ve===0&&Se(ws)),W===d&&(W=null),W!==d?(De=w,N=Ml(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;return ve--,w===d&&(N=d,ve===0&&Se(jf)),w}i(wc,"peg$parseIntegerLiteral");function jt(){var w,N,U,W;if(ve++,w=M,s.charCodeAt(M)===34?(N=uo,M++):(N=d,ve===0&&Se(Ol)),N!==d){for(U=[],W=Ba();W!==d;)U.push(W),W=Ba();U!==d?(s.charCodeAt(M)===34?(W=uo,M++):(W=d,ve===0&&Se(Ol)),W!==d?(De=w,N=Ks(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d){if(w=M,s.charCodeAt(M)===39?(N=pc,M++):(N=d,ve===0&&Se(Rl)),N!==d){for(U=[],W=Ul();W!==d;)U.push(W),W=Ul();U!==d?(s.charCodeAt(M)===39?(W=pc,M++):(W=d,ve===0&&Se(Rl)),W!==d?(De=w,N=Ks(U),w=N):(M=w,w=d)):(M=w,w=d)}else M=w,w=d;if(w===d)if(w=M,N=M,ve++,U=Bl(),ve--,U===d?N=void 0:(M=N,N=d),N!==d){if(U=[],W=$t(),W!==d)for(;W!==d;)U.push(W),W=$t();else U=d;U!==d?(De=w,N=Ks(U),w=N):(M=w,w=d)}else M=w,w=d}return ve--,w===d&&(N=d,ve===0&&Se(Ss)),w}i(jt,"peg$parseStringLiteral");function Ba(){var w,N,U;return w=M,N=M,ve++,hc.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(mc)),ve--,U===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Dl)),U!==d?(De=w,N=Ra(U),w=N):(M=w,w=d)):(M=w,w=d),w===d&&(w=M,s.charCodeAt(M)===92?(N=gc,M++):(N=d,ve===0&&Se(Di)),N!==d?(U=Ii(),U!==d?(De=w,N=Ra(U),w=N):(M=w,w=d)):(M=w,w=d)),w}i(Ba,"peg$parseDoubleStringChar");function Ul(){var w,N,U;return w=M,N=M,ve++,Kf.test(s.charAt(M))?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Wp)),ve--,U===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Dl)),U!==d?(De=w,N=Ra(U),w=N):(M=w,w=d)):(M=w,w=d),w===d&&(w=M,s.charCodeAt(M)===92?(N=gc,M++):(N=d,ve===0&&Se(Di)),N!==d?(U=Ii(),U!==d?(De=w,N=Ra(U),w=N):(M=w,w=d)):(M=w,w=d)),w}i(Ul,"peg$parseSingleStringChar");function $t(){var w,N,U;return w=M,N=M,ve++,U=Ze(),ve--,U===d?N=void 0:(M=N,N=d),N!==d?(s.length>M?(U=s.charAt(M),M++):(U=d,ve===0&&Se(Dl)),U!==d?(De=w,N=Ra(U),w=N):(M=w,w=d)):(M=w,w=d),w}i($t,"peg$parseUnquotedStringChar");function Ii(){var w,N;return Il.test(s.charAt(M))?(w=s.charAt(M),M++):(w=d,ve===0&&Se(Da)),w===d&&(w=M,s.charCodeAt(M)===110?(N=$p,M++):(N=d,ve===0&&Se(vc)),N!==d&&(De=w,N=Vp()),w=N,w===d&&(w=M,s.charCodeAt(M)===114?(N=qp,M++):(N=d,ve===0&&Se(yc)),N!==d&&(De=w,N=Gf()),w=N,w===d&&(w=M,s.charCodeAt(M)===116?(N=jp,M++):(N=d,ve===0&&Se(Bt)),N!==d&&(De=w,N=Ot()),w=N))),w}i(Ii,"peg$parseEscapeSequence");function Sc(w,N){function U(){return w.apply(this,arguments)||N.apply(this,arguments)}return i(U,"orFilter"),U.desc=w.desc+" or "+N.desc,U}i(Sc,"or");function Qf(w,N){function U(){return w.apply(this,arguments)&&N.apply(this,arguments)}return i(U,"andFilter"),U.desc=w.desc+" and "+N.desc,U}i(Qf,"and");function Qs(w){function N(){return!w.apply(this,arguments)}return i(N,"notFilter"),N.desc="not "+w.desc,N}i(Qs,"not");function Js(w){function N(){return w.apply(this,arguments)}return i(N,"bindingFilter"),N.desc="("+w.desc+")",N}i(Js,"binding");function Jf(w){return!0}i(Jf,"allFilter"),Jf.desc="all flows";var Zf=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("font/.*"),new RegExp("application/font.*")];function xc(w){if(w.response){for(var N=vl.getContentType(w.response),U=Zf.length;U--;)if(Zf[U].test(N))return!0}return!1}i(xc,"assetFilter"),xc.desc="is asset";function Wo(w){w=new RegExp(w,"i");function N(U){return!0}return i(N,"bodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Wo,"body");function Kt(w){w=new RegExp(w,"i");function N(U){return!0}return i(N,"requestBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Kt,"requestBody");function Gp(w){w=new RegExp(w,"i");function N(U){return!0}return i(N,"responseBodyFilter"),N.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmproxy/issues/3609",N}i(Gp,"responseBody");function Cc(w){function N(U){return U.response&&U.response.status_code===w}return i(N,"responseCodeFilter"),N.desc="resp. code is "+w,N}i(Cc,"responseCode");function Zs(w){w=new RegExp(w,"i");function N(U){return w.test(U.comment)}return i(N,"commentFilter"),N.desc="comment matches "+w,N}i(Zs,"comment");function _c(w){w=new RegExp(w,"i");function N(U){return U.request&&(w.test(U.request.host)||w.test(U.request.pretty_host))}return i(N,"domainFilter"),N.desc="domain matches "+w,N}i(_c,"domain");function Ha(w){return w.type==="dns"}i(Ha,"dnsFilter"),Ha.desc="is a DNS Flow";function ed(w){w=new RegExp(w,"i");function N(U){return!!U.server_conn.address&&w.test(U.server_conn.address[0]+":"+U.server_conn.address[1])}return i(N,"destinationFilter"),N.desc="destination address matches "+w,N}i(ed,"destination");function Wl(w){return!!w.error}i(Wl,"errorFilter"),Wl.desc="has error";function $l(w){w=new RegExp(w,"i");function N(U){return U.request&&Bs.match_header(U.request,w)||U.response&&vl.match_header(U.response,w)}return i(N,"headerFilter"),N.desc="header matches "+w,N}i($l,"header");function Ec(w){w=new RegExp(w,"i");function N(U){return U.request&&Bs.match_header(U.request,w)}return i(N,"requestHeaderFilter"),N.desc="req. header matches "+w,N}i(Ec,"requestHeader");function Yp(w){w=new RegExp(w,"i");function N(U){return U.response&&vl.match_header(U.response,w)}return i(N,"responseHeaderFilter"),N.desc="resp. header matches "+w,N}i(Yp,"responseHeader");function Vl(w){return w.type==="http"}i(Vl,"httpFilter"),Vl.desc="is an HTTP Flow";function hn(w){return w.marked}i(hn,"markedFilter"),hn.desc="is marked";function bc(w){w=new RegExp(w,"i");function N(U){return w.test(U.marked)}return i(N,"markerFilter"),N.desc="marker matches "+w,N}i(bc,"marker");function co(w){w=new RegExp(w,"i");function N(U){return U.request&&w.test(U.request.method)}return i(N,"methodFilter"),N.desc="method matches "+w,N}i(co,"method");function yi(w){return w.request&&!w.response}i(yi,"noResponseFilter"),yi.desc="has no response";function ea(w){return w.is_replay==="request"}i(ea,"clientReplayFilter"),ea.desc="request has been replayed";function ql(w){return w.is_replay==="response"}i(ql,"serverReplayFilter"),ql.desc="response has been replayed";function Tc(w){return!!w.is_replay}i(Tc,"replayFilter"),Tc.desc="flow has been replayed";function Fi(w){w=new RegExp(w,"i");function N(U){return!!U.client_conn.peername&&w.test(U.client_conn.peername[0]+":"+U.client_conn.peername[1])}return i(N,"sourceFilter"),N.desc="source address matches "+w,N}i(Fi,"source");function $o(w){return!!w.response}i($o,"responseFilter"),$o.desc="has response";function jl(w){return w.type==="tcp"}i(jl,"tcpFilter"),jl.desc="is a TCP Flow";function xs(w){return w.type==="udp"}i(xs,"udpFilter"),xs.desc="is a UDP Flow";function td(w){w=new RegExp(w,"i");function N(U){return U.request&&w.test(Bs.getContentType(U.request))}return i(N,"requestContentTypeFilter"),N.desc="req. content type matches "+w,N}i(td,"requestContentType");function Xp(w){w=new RegExp(w,"i");function N(U){return U.response&&w.test(vl.getContentType(U.response))}return i(N,"responseContentTypeFilter"),N.desc="resp. content type matches "+w,N}i(Xp,"responseContentType");function Kl(w){w=new RegExp(w,"i");function N(U){return U.request&&w.test(Bs.getContentType(U.request))||U.response&&w.test(vl.getContentType(U.response))}return i(N,"contentTypeFilter"),N.desc="content type matches "+w,N}i(Kl,"contentType");function Gl(w){w=new RegExp(w,"i");function N(U){if(U.type==="dns"){let W=U.request?.questions[0];return W&&w.test(W.name)}return U.request&&w.test(Bs.pretty_url(U.request))}return i(N,"urlFilter"),N.desc="url matches "+w,N}i(Gl,"url");function Tn(w){return!!w.websocket}if(i(Tn,"websocketFilter"),Tn.desc="is a Websocket Flow",Ia=S(),Ia!==d&&M===s.length)return Ia;throw Ia!==d&&M1)s=s.filter(l=>l!==t.data);else if(s=[],t.data in e.viewIndex&&e.view.length>1){let l=e.viewIndex[t.data],h;l===e.view.length-1?h=e.view[l-1]:h=e.view[l+1],s.push(h.id)}}return{...e,selected:s,...$u(e,n)}}case FA:return{...e,filter:t.filter,...$u(e,km(DA(t.filter),Kx(e.sort)))};case HA:return{...e,highlight:t.highlight};case BA:return{...e,sort:t.sort,...$u(e,Fx(Kx(t.sort)))};case IA:return{...e,selected:t.flowIds};default:return e}}i(Gx,"reducer");function DA(e){if(e)return vf.parse(e)}i(DA,"makeFilter");function Kx({column:e,desc:t}){if(!e)return(s,l)=>0;let n=OA[e];return(s,l)=>{let h=n(s),d=n(l);return h>d?t?-1:1:hxt(`/flows/${e.id}/resume`,{method:"POST"})}i(lp,"resume");function $y(){return()=>xt("/flows/resume",{method:"POST"})}i($y,"resumeAll");function Vy(e){return()=>xt(`/flows/${e.id}/kill`,{method:"POST"})}i(Vy,"kill");function UA(){return()=>xt("/flows/kill",{method:"POST"})}i(UA,"killAll");function qy(e){return()=>xt(`/flows/${e.id}`,{method:"DELETE"})}i(qy,"remove");function jy(e){return()=>xt(`/flows/${e.id}/duplicate`,{method:"POST"})}i(jy,"duplicate");function up(e){return()=>xt(`/flows/${e.id}/replay`,{method:"POST"})}i(up,"replay");function Ky(e){return()=>xt(`/flows/${e.id}/revert`,{method:"POST"})}i(Ky,"revert");function si(e,t){return()=>xt.put(`/flows/${e.id}`,t)}i(si,"update");function WA(e,t,n){let s=new FormData;return t=new window.Blob([t],{type:"plain/text"}),s.append("file",t),()=>xt(`/flows/${e.id}/${n}/content.data`,{method:"POST",body:s})}i(WA,"uploadContent");function Gy(){return()=>xt("/clear",{method:"POST"})}i(Gy,"clear");function $A(e){let t=new FormData;return t.append("file",e),()=>xt("/flows/dump",{method:"POST",body:t})}i($A,"upload");function yl(e){return{type:IA,flowIds:e?[e]:[]}}i(yl,"select");var Yy="UI_HIDE_MODAL",VA="UI_SET_ACTIVE_MODAL",wB={activeModal:void 0};function Yx(e=wB,t){switch(t.type){case VA:return{...e,activeModal:t.activeModal};case Yy:return{...e,activeModal:void 0};default:return e}}i(Yx,"reducer");function qA(e){return{type:VA,activeModal:e}}i(qA,"setActiveModal");function Xy(){return{type:Yy}}i(Xy,"hideModal");var ba=pe(Te());var qt=pe(Te());var fp=pe(Te());var Lm=pe(Te()),KA=pe(ai());var jA=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),cp=!1,gt=class extends Lm.Component{constructor(){super(...arguments);this.input=Lm.default.createRef();this.isEditing=i(()=>this.input.current?.contentEditable===jA,"isEditing");this.startEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=jA,window.requestAnimationFrame(()=>{if(!this.input.current)return;this.input.current.focus(),this.suppress_events=!1;let n=document.createRange();n.selectNodeContents(this.input.current);let s=window.getSelection();s?.removeAllRanges(),s?.addRange(n),this.props.onEditStart?.()}))},"startEditing");this.resetValue=i(()=>{if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,this.props.onInput?.(this.props.content)},"resetValue");this.finishEditing=i(()=>{if(!this.input.current)return console.error("unreachable");this.props.onEditDone(this.input.current.textContent||""),this.input.current.blur(),this.input.current.contentEditable="inherit"},"finishEditing");this.onPaste=i(n=>{n.preventDefault();let s=n.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,s)},"onPaste");this.suppress_events=!1;this.onMouseDown=i(n=>{cp&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=i(n=>{let s=n.target===this.input.current,l=!window.getSelection()?.toString();cp&&console.warn("mouseUp",this.suppress_events,s,l),s&&l&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=i(n=>{cp&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=i(n=>{if(cp&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=i(n=>{this.props.onInput?.(this.input.current?.textContent||"")},"onInput");this.onBlur=i(n=>{cp&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=i(n=>{switch(cp&&console.debug("keydown",n),n.stopPropagation(),n.key){case"Escape":n.preventDefault(),this.resetValue(),this.finishEditing();break;case"Enter":n.shiftKey||(n.preventDefault(),this.finishEditing());break;default:break}this.props.onKeyDown?.(n)},"onKeyDown")}static{i(this,"ValueEditor")}render(){let n=(0,KA.default)("inline-input",this.props.className);return Lm.default.createElement("span",{ref:this.input,tabIndex:0,className:n,placeholder:this.props.placeholder,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,onMouseDown:this.onMouseDown,onClick:this.onClick},this.props.content)}componentDidUpdate(n){n.content!==this.props.content&&this.props.onInput?.(this.props.content)}};var GA=pe(ai());function wf(e){let[t,n]=(0,fp.useState)(e.isValid(e.content)),s=(0,fp.useRef)(null),l=i(d=>{e.isValid(d)?e.onEditDone(d):s.current?.resetValue()},"onEditDone"),h=(0,GA.default)(e.className,t?"has-success":"has-warning");return fp.default.createElement(gt,{...e,className:h,onInput:d=>n(e.isValid(d)),onEditDone:l,ref:s})}i(wf,"ValidateEditor");function Kn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(Kn,"formatProdErrorMessage");var SB=typeof Symbol=="function"&&Symbol.observable||"@@observable",YA=SB,Qx=i(()=>Math.random().toString(36).substring(7).split("").join("."),"randomString"),xB={INIT:`@@redux/INIT${Qx()}`,REPLACE:`@@redux/REPLACE${Qx()}`,PROBE_UNKNOWN_ACTION:i(()=>`@@redux/PROBE_UNKNOWN_ACTION${Qx()}`,"PROBE_UNKNOWN_ACTION")},Jy=xB;function Zy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}i(Zy,"isPlainObject");function Jx(e,t,n){if(typeof e!="function")throw new Error(Kn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Kn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Kn(1));return n(Jx)(e,t)}let s=e,l=t,h=new Map,d=h,v=0,S=!1;function b(){d===h&&(d=new Map,h.forEach((ne,D)=>{d.set(D,ne)}))}i(b,"ensureCanMutateNextListeners");function k(){if(S)throw new Error(Kn(3));return l}i(k,"getState");function R(ne){if(typeof ne!="function")throw new Error(Kn(4));if(S)throw new Error(Kn(5));let D=!0;b();let L=v++;return d.set(L,ne),i(function(){if(D){if(S)throw new Error(Kn(6));D=!1,b(),d.delete(L),h=null}},"unsubscribe")}i(R,"subscribe");function I(ne){if(!Zy(ne))throw new Error(Kn(7));if(typeof ne.type>"u")throw new Error(Kn(8));if(typeof ne.type!="string")throw new Error(Kn(17));if(S)throw new Error(Kn(9));try{S=!0,l=s(l,ne)}finally{S=!1}return(h=d).forEach(L=>{L()}),ne}i(I,"dispatch");function z(ne){if(typeof ne!="function")throw new Error(Kn(10));s=ne,I({type:Jy.REPLACE})}i(z,"replaceReducer");function q(){let ne=R;return{subscribe(D){if(typeof D!="object"||D===null)throw new Error(Kn(11));function L(){let j=D;j.next&&j.next(k())}return i(L,"observeState"),L(),{unsubscribe:ne(L)}},[YA](){return this}}}return i(q,"observable"),I({type:Jy.INIT}),{dispatch:I,subscribe:R,getState:k,replaceReducer:z,[YA]:q}}i(Jx,"createStore");function CB(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Jy.INIT})>"u")throw new Error(Kn(12));if(typeof n(void 0,{type:Jy.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kn(13))})}i(CB,"assertReducerShape");function dp(e){let t=Object.keys(e),n={};for(let d=0;d"u"){let ne=S&&S.type;throw new Error(Kn(14))}k[I]=Q,b=b||Q!==q}return b=b||s.length!==Object.keys(v).length,b?k:v},"combination")}i(dp,"combineReducers");function pp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}i(pp,"compose");function XA(...e){return t=>(n,s)=>{let l=t(n,s),h=i(()=>{throw new Error(Kn(15))},"dispatch"),d={getState:l.getState,dispatch:i((S,...b)=>h(S,...b),"dispatch")},v=e.map(S=>S(d));return h=pp(...v)(l.dispatch),{...l,dispatch:h}}}i(XA,"applyMiddleware");function QA(e){return Zy(e)&&"type"in e&&typeof e.type=="string"}i(QA,"isAction");var nP=Symbol.for("immer-nothing"),JA=Symbol.for("immer-draftable"),Ro=Symbol.for("immer-state");function Hs(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}i(Hs,"die");var hp=Object.getPrototypeOf;function _a(e){return!!e&&!!e[Ro]}i(_a,"isDraft");function zs(e){return e?iP(e)||Array.isArray(e)||!!e[JA]||!!e.constructor?.[JA]||i0(e)||o0(e):!1}i(zs,"isDraftable");var _B=Object.prototype.constructor.toString();function iP(e){if(!e||typeof e!="object")return!1;let t=hp(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===_B}i(iP,"isPlainObject");function e0(e,t){n0(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,s)=>t(s,n,e))}i(e0,"each");function n0(e){let t=e[Ro];return t?t.type_:Array.isArray(e)?1:i0(e)?2:o0(e)?3:0}i(n0,"getArchtype");function tC(e,t){return n0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}i(tC,"has");function oP(e,t,n){let s=n0(e);s===2?e.set(t,n):s===3?e.add(n):e[t]=n}i(oP,"set");function EB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}i(EB,"is");function i0(e){return e instanceof Map}i(i0,"isMap");function o0(e){return e instanceof Set}i(o0,"isSet");function Sf(e){return e.copy_||e.base_}i(Sf,"latest");function rC(e,t){if(i0(e))return new Map(e);if(o0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=iP(e);if(t===!0||t==="class_only"&&!n){let s=Object.getOwnPropertyDescriptors(e);delete s[Ro];let l=Reflect.ownKeys(s);for(let h=0;h1&&(e.set=e.add=e.clear=e.delete=bB),Object.freeze(e),t&&Object.entries(e).forEach(([n,s])=>aC(s,!0))),e}i(aC,"freeze");function bB(){Hs(2)}i(bB,"dontMutateFrozenCollections");function s0(e){return Object.isFrozen(e)}i(s0,"isFrozen");var TB={};function xf(e){let t=TB[e];return t||Hs(0,e),t}i(xf,"getPlugin");var Mm;function sP(){return Mm}i(sP,"getCurrentScope");function kB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}i(kB,"createScope");function ZA(e,t){t&&(xf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}i(ZA,"usePatchesInScope");function nC(e){iC(e),e.drafts_.forEach(NB),e.drafts_=null}i(nC,"revokeScope");function iC(e){e===Mm&&(Mm=e.parent_)}i(iC,"leaveScope");function eP(e){return Mm=kB(Mm,e)}i(eP,"enterScope");function NB(e){let t=e[Ro];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}i(NB,"revokeDraft");function tP(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ro].modified_&&(nC(t),Hs(4)),zs(e)&&(e=t0(t,e),t.parent_||r0(t,e)),t.patches_&&xf("Patches").generateReplacementPatches_(n[Ro].base_,e,t.patches_,t.inversePatches_)):e=t0(t,n,[]),nC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nP?e:void 0}i(tP,"processResult");function t0(e,t,n){if(s0(t))return t;let s=t[Ro];if(!s)return e0(t,(l,h)=>rP(e,s,t,l,h,n)),t;if(s.scope_!==e)return t;if(!s.modified_)return r0(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;let l=s.copy_,h=l,d=!1;s.type_===3&&(h=new Set(l),l.clear(),d=!0),e0(h,(v,S)=>rP(e,s,l,v,S,n,d)),r0(e,l,!1),n&&e.patches_&&xf("Patches").generatePatches_(s,n,e.patches_,e.inversePatches_)}return s.copy_}i(t0,"finalize");function rP(e,t,n,s,l,h,d){if(_a(l)){let v=h&&t&&t.type_!==3&&!tC(t.assigned_,s)?h.concat(s):void 0,S=t0(e,l,v);if(oP(n,s,S),_a(S))e.canAutoFreeze_=!1;else return}else d&&n.add(l);if(zs(l)&&!s0(l)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;t0(e,l),(!t||!t.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,s)&&r0(e,l)}}i(rP,"finalizeProperty");function r0(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&aC(t,n)}i(r0,"maybeFreeze");function AB(e,t){let n=Array.isArray(e),s={type_:n?1:0,scope_:t?t.scope_:sP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},l=s,h=lC;n&&(l=[s],h=Om);let{revoke:d,proxy:v}=Proxy.revocable(l,h);return s.draft_=v,s.revoke_=d,v}i(AB,"createProxyProxy");var lC={get(e,t){if(t===Ro)return e;let n=Sf(e);if(!tC(n,t))return PB(e,n,t);let s=n[t];return e.finalized_||!zs(s)?s:s===Zx(e.base_,t)?(eC(e),e.copy_[t]=sC(s,e)):s},has(e,t){return t in Sf(e)},ownKeys(e){return Reflect.ownKeys(Sf(e))},set(e,t,n){let s=aP(Sf(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){let l=Zx(Sf(e),t),h=l?.[Ro];if(h&&h.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(EB(n,l)&&(n!==void 0||tC(e.base_,t)))return!0;eC(e),oC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Zx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,eC(e),oC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Sf(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:s.enumerable,value:n[t]}},defineProperty(){Hs(11)},getPrototypeOf(e){return hp(e.base_)},setPrototypeOf(){Hs(12)}},Om={};e0(lC,(e,t)=>{Om[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Om.deleteProperty=function(e,t){return Om.set.call(this,e,t,void 0)};Om.set=function(e,t,n){return lC.set.call(this,e[0],t,n,e[0])};function Zx(e,t){let n=e[Ro];return(n?Sf(n):e)[t]}i(Zx,"peek");function PB(e,t,n){let s=aP(t,n);return s?"value"in s?s.value:s.get?.call(e.draft_):void 0}i(PB,"readPropFromProto");function aP(e,t){if(!(t in e))return;let n=hp(e);for(;n;){let s=Object.getOwnPropertyDescriptor(n,t);if(s)return s;n=hp(n)}}i(aP,"getDescriptorFromProto");function oC(e){e.modified_||(e.modified_=!0,e.parent_&&oC(e.parent_))}i(oC,"markChanged");function eC(e){e.copy_||(e.copy_=rC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}i(eC,"prepareCopy");var LB=class{static{i(this,"Immer2")}constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,s)=>{if(typeof t=="function"&&typeof n!="function"){let h=n;n=t;let d=this;return i(function(S=h,...b){return d.produce(S,k=>n.call(this,k,...b))},"curriedProduce")}typeof n!="function"&&Hs(6),s!==void 0&&typeof s!="function"&&Hs(7);let l;if(zs(t)){let h=eP(this),d=sC(t,void 0),v=!0;try{l=n(d),v=!1}finally{v?nC(h):iC(h)}return ZA(h,s),tP(l,h)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===nP&&(l=void 0),this.autoFreeze_&&aC(l,!0),s){let h=[],d=[];xf("Patches").generateReplacementPatches_(t,l,h,d),s(h,d)}return l}else Hs(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(d,...v)=>this.produceWithPatches(d,S=>t(S,...v));let s,l;return[this.produce(t,n,(d,v)=>{s=d,l=v}),s,l]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){zs(e)||Hs(8),_a(e)&&(e=uC(e));let t=eP(this),n=sC(e,void 0);return n[Ro].isManual_=!0,iC(t),n}finishDraft(e,t){let n=e&&e[Ro];(!n||!n.isManual_)&&Hs(9);let{scope_:s}=n;return ZA(s,t),tP(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));let s=xf("Patches").applyPatches_;return _a(e)?s(e,t):this.produce(e,l=>s(l,t))}};function sC(e,t){let n=i0(e)?xf("MapSet").proxyMap_(e,t):o0(e)?xf("MapSet").proxySet_(e,t):AB(e,t);return(t?t.scope_:sP()).drafts_.push(n),n}i(sC,"createProxy");function uC(e){return _a(e)||Hs(10,e),lP(e)}i(uC,"current");function lP(e){if(!zs(e)||s0(e))return e;let t=e[Ro],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=rC(e,!0);return e0(n,(s,l)=>{oP(n,s,lP(l))}),t&&(t.finalized_=!1),n}i(lP,"currentImpl");var Do=new LB,a0=Do.produce,w8=Do.produceWithPatches.bind(Do),S8=Do.setAutoFreeze.bind(Do),x8=Do.setUseStrictShallowCopy.bind(Do),C8=Do.applyPatches.bind(Do),_8=Do.createDraft.bind(Do),E8=Do.finishDraft.bind(Do);function MB(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}i(MB,"assertIsFunction");function OB(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}i(OB,"assertIsObject");function RB(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(s=>typeof s=="function"?`function ${s.name||"unnamed"}()`:typeof s).join(", ");throw new TypeError(`${t}[${n}]`)}}i(RB,"assertIsArrayOfFunctions");var uP=i(e=>Array.isArray(e)?e:[e],"ensureIsArray");function DB(e){let t=Array.isArray(e[0])?e[0]:e;return RB(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}i(DB,"getDependencies");function IB(e,t){let n=[],{length:s}=e;for(let l=0;l{n=l0(),d.resetResultsCount()},d.resultsCount=()=>h,d.resetResultsCount=()=>{h=0},d}i(u0,"weakMapMemoize");function cC(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,s=i((...l)=>{let h=0,d=0,v,S={},b=l.pop();typeof b=="object"&&(S=b,b=l.pop()),MB(b,`createSelector expects an output function after the inputs, but received: [${typeof b}]`);let k={...n,...S},{memoize:R,memoizeOptions:I=[],argsMemoize:z=u0,argsMemoizeOptions:q=[],devModeChecks:Q={}}=k,ne=uP(I),D=uP(q),L=DB(l),B=R(i(function(){return h++,b.apply(null,arguments)},"recomputationWrapper"),...ne),j=!0,re=z(i(function(){d++;let oe=IB(L,arguments);return v=B.apply(null,oe),v},"dependenciesChecker"),...D);return Object.assign(re,{resultFunc:b,memoizedResultFunc:B,dependencies:L,dependencyRecomputations:i(()=>d,"dependencyRecomputations"),resetDependencyRecomputations:i(()=>{d=0},"resetDependencyRecomputations"),lastResult:i(()=>v,"lastResult"),recomputations:i(()=>h,"recomputations"),resetRecomputations:i(()=>{h=0},"resetRecomputations"),memoize:R,argsMemoize:z})},"createSelector2");return Object.assign(s,{withTypes:i(()=>s,"withTypes")}),s}i(cC,"createSelectorCreator");var zB=cC(u0),UB=Object.assign((e,t=zB)=>{OB(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),s=n.map(h=>e[h]);return t(s,(...h)=>h.reduce((d,v,S)=>(d[n[S]]=v,d),{}))},{withTypes:i(()=>UB,"withTypes")});function fP(e){return i(({dispatch:n,getState:s})=>l=>h=>typeof h=="function"?h(n,s,e):l(h),"middleware")}i(fP,"createThunkMiddleware");var dP=fP(),pP=fP;var WB=i((...e)=>{let t=cC(...e),n=Object.assign((...s)=>{let l=t(...s),h=i((d,...v)=>l(_a(d)?uC(d):d,...v),"wrappedSelector");return Object.assign(h,l),h},{withTypes:i(()=>n,"withTypes")});return n},"createDraftSafeSelectorCreator"),F8=WB(u0),$B=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pp:pp.apply(null,arguments)},z8=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},VB=i(e=>e&&typeof e.match=="function","hasMatchFunction");function us(e,t){function n(...s){if(t){let l=t(...s);if(!l)throw new Error(rn(0));return{type:e,payload:l.payload,..."meta"in l&&{meta:l.meta},..."error"in l&&{error:l.error}}}return{type:e,payload:s[0]}}return i(n,"actionCreator"),n.toString=()=>`${e}`,n.type=e,n.match=s=>QA(s)&&s.type===e,n}i(us,"createAction");var vP=class Rm extends Array{static{i(this,"_Tuple")}constructor(...t){super(...t),Object.setPrototypeOf(this,Rm.prototype)}static get[Symbol.species](){return Rm}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Rm(...t[0].concat(this)):new Rm(...t.concat(this))}};function hP(e){return zs(e)?a0(e,()=>{}):e}i(hP,"freezeDraftable");function mP(e,t,n){if(e.has(t)){let l=e.get(t);return n.update&&(l=n.update(l,t,e),e.set(t,l)),l}if(!n.insert)throw new Error(rn(10));let s=n.insert(t,e);return e.set(t,s),s}i(mP,"emplace");function qB(e){return typeof e=="boolean"}i(qB,"isBoolean");var jB=i(()=>i(function(t){let{thunk:n=!0,immutableCheck:s=!0,serializableCheck:l=!0,actionCreatorCheck:h=!0}=t??{},d=new vP;return n&&(qB(n)?d.push(dP):d.push(pP(n.extraArgument))),d},"getDefaultMiddleware"),"buildGetDefaultMiddleware"),KB="RTK_autoBatch";var yP=i(e=>t=>{setTimeout(t,e)},"createQueueWithTimer"),GB=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yP(10),YB=i((e={type:"raf"})=>t=>(...n)=>{let s=t(...n),l=!0,h=!1,d=!1,v=new Set,S=e.type==="tick"?queueMicrotask:e.type==="raf"?GB:e.type==="callback"?e.queueNotification:yP(e.timeout),b=i(()=>{d=!1,h&&(h=!1,v.forEach(k=>k()))},"notifyListeners");return Object.assign({},s,{subscribe(k){let R=i(()=>l&&k(),"wrappedListener"),I=s.subscribe(R);return v.add(k),()=>{I(),v.delete(k)}},dispatch(k){try{return l=!k?.meta?.[KB],h=!l,h&&(d||(d=!0,S(b))),s.dispatch(k)}finally{l=!0}}})},"autoBatchEnhancer"),XB=i(e=>i(function(n){let{autoBatch:s=!0}=n??{},l=new vP(e);return s&&l.push(YB(typeof s=="object"?s:void 0)),l},"getDefaultEnhancers"),"buildGetDefaultEnhancers"),Vu=!0;function wP(e){let t=jB(),{reducer:n=void 0,middleware:s,devTools:l=!0,preloadedState:h=void 0,enhancers:d=void 0}=e||{},v;if(typeof n=="function")v=n;else if(Zy(n))v=dp(n);else throw new Error(rn(1));if(!Vu&&s&&typeof s!="function")throw new Error(rn(2));let S;if(typeof s=="function"){if(S=s(t),!Vu&&!Array.isArray(S))throw new Error(rn(3))}else S=t();if(!Vu&&S.some(q=>typeof q!="function"))throw new Error(rn(4));let b=pp;l&&(b=$B({trace:!Vu,...typeof l=="object"&&l}));let k=XA(...S),R=XB(k);if(!Vu&&d&&typeof d!="function")throw new Error(rn(5));let I=typeof d=="function"?d(R):R();if(!Vu&&!Array.isArray(I))throw new Error(rn(6));if(!Vu&&I.some(q=>typeof q!="function"))throw new Error(rn(7));!Vu&&S.length&&!I.includes(k)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");let z=b(...I);return Jx(v,h,z)}i(wP,"configureStore");function SP(e){let t={},n=[],s,l={addCase(h,d){let v=typeof h=="string"?h:h.type;if(!v)throw new Error(rn(28));if(v in t)throw new Error(rn(29));return t[v]=d,l},addMatcher(h,d){return n.push({matcher:h,reducer:d}),l},addDefaultCase(h){return s=h,l}};return e(l),[t,n,s]}i(SP,"executeReducerBuilderCallback");function QB(e){return typeof e=="function"}i(QB,"isStateFunction");function JB(e,t){let[n,s,l]=SP(t),h;if(QB(e))h=i(()=>hP(e()),"getInitialState");else{let v=hP(e);h=i(()=>v,"getInitialState")}function d(v=h(),S){let b=[n[S.type],...s.filter(({matcher:k})=>k(S)).map(({reducer:k})=>k)];return b.filter(k=>!!k).length===0&&(b=[l]),b.reduce((k,R)=>{if(R)if(_a(k)){let z=R(k,S);return z===void 0?k:z}else{if(zs(k))return a0(k,I=>R(I,S));{let I=R(k,S);if(I===void 0){if(k===null)return k;throw new Error(rn(9))}return I}}return k},v)}return i(d,"reducer"),d.getInitialState=h,d}i(JB,"createReducer");var ZB="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xP=i((e=21)=>{let t="",n=e;for(;n--;)t+=ZB[Math.random()*64|0];return t},"nanoid"),eH=i((e,t)=>VB(e)?e.match(t):e(t),"matches");function tH(...e){return t=>e.some(n=>eH(n,t))}i(tH,"isAnyOf");var rH=["name","message","stack","code"],fC=class{static{i(this,"RejectWithValue")}constructor(e,t){this.payload=e,this.meta=t}_type},gP=class{static{i(this,"FulfillWithMeta")}constructor(e,t){this.payload=e,this.meta=t}_type},nH=i(e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of rH)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},"miniSerializeError"),Dm=(()=>{function e(t,n,s){let l=us(t+"/fulfilled",(S,b,k,R)=>({payload:S,meta:{...R||{},arg:k,requestId:b,requestStatus:"fulfilled"}})),h=us(t+"/pending",(S,b,k)=>({payload:void 0,meta:{...k||{},arg:b,requestId:S,requestStatus:"pending"}})),d=us(t+"/rejected",(S,b,k,R,I)=>({payload:R,error:(s&&s.serializeError||nH)(S||"Rejected"),meta:{...I||{},arg:k,requestId:b,rejectedWithValue:!!R,requestStatus:"rejected",aborted:S?.name==="AbortError",condition:S?.name==="ConditionError"}}));function v(S){return(b,k,R)=>{let I=s?.idGenerator?s.idGenerator(S):xP(),z=new AbortController,q,Q;function ne(L){Q=L,z.abort()}i(ne,"abort");let D=async function(){let L;try{let j=s?.condition?.(S,{getState:k,extra:R});if(oH(j)&&(j=await j),j===!1||z.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let re=new Promise((Z,oe)=>{q=i(()=>{oe({name:"AbortError",message:Q||"Aborted"})},"abortHandler"),z.signal.addEventListener("abort",q)});b(h(I,S,s?.getPendingMeta?.({requestId:I,arg:S},{getState:k,extra:R}))),L=await Promise.race([re,Promise.resolve(n(S,{dispatch:b,getState:k,extra:R,requestId:I,signal:z.signal,abort:ne,rejectWithValue:i((Z,oe)=>new fC(Z,oe),"rejectWithValue"),fulfillWithValue:i((Z,oe)=>new gP(Z,oe),"fulfillWithValue")})).then(Z=>{if(Z instanceof fC)throw Z;return Z instanceof gP?l(Z.payload,I,S,Z.meta):l(Z,I,S)})])}catch(j){L=j instanceof fC?d(null,I,S,j.payload,j.meta):d(j,I,S)}finally{q&&z.signal.removeEventListener("abort",q)}return s&&!s.dispatchConditionRejection&&d.match(L)&&L.meta.condition||b(L),L}();return Object.assign(D,{abort:ne,requestId:I,arg:S,unwrap(){return D.then(iH)}})}}return i(v,"actionCreator"),Object.assign(v,{pending:h,rejected:d,fulfilled:l,settled:tH(d,l),typePrefix:t})}return i(e,"createAsyncThunk2"),e.withTypes=()=>e,e})();function iH(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}i(iH,"unwrapResult");function oH(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}i(oH,"isThenable");var CP=Symbol.for("rtk-slice-createasyncthunk"),q8={[CP]:Dm};function sH(e,t){return`${e}/${t}`}i(sH,"getType");function aH({creators:e}={}){let t=e?.asyncThunk?.[CP];return i(function(s){let{name:l,reducerPath:h=l}=s;if(!l)throw new Error(rn(11));typeof process<"u";let d=(typeof s.reducers=="function"?s.reducers(uH()):s.reducers)||{},v=Object.keys(d),S={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},b={addCase(L,B){let j=typeof L=="string"?L:L.type;if(!j)throw new Error(rn(12));if(j in S.sliceCaseReducersByType)throw new Error(rn(13));return S.sliceCaseReducersByType[j]=B,b},addMatcher(L,B){return S.sliceMatchers.push({matcher:L,reducer:B}),b},exposeAction(L,B){return S.actionCreators[L]=B,b},exposeCaseReducer(L,B){return S.sliceCaseReducersByName[L]=B,b}};v.forEach(L=>{let B=d[L],j={reducerName:L,type:sH(l,L),createNotation:typeof s.reducers=="function"};fH(B)?pH(j,B,b,t):cH(j,B,b)});function k(){let[L={},B=[],j=void 0]=typeof s.extraReducers=="function"?SP(s.extraReducers):[s.extraReducers],re={...L,...S.sliceCaseReducersByType};return JB(s.initialState,Z=>{for(let oe in re)Z.addCase(oe,re[oe]);for(let oe of S.sliceMatchers)Z.addMatcher(oe.matcher,oe.reducer);for(let oe of B)Z.addMatcher(oe.matcher,oe.reducer);j&&Z.addDefaultCase(j)})}i(k,"buildReducer");let R=i(L=>L,"selectSelf"),I=new Map,z;function q(L,B){return z||(z=k()),z(L,B)}i(q,"reducer");function Q(){return z||(z=k()),z.getInitialState()}i(Q,"getInitialState");function ne(L,B=!1){function j(Z){let oe=Z[L];return typeof oe>"u"&&B&&(oe=Q()),oe}i(j,"selectSlice");function re(Z=R){let oe=mP(I,B,{insert:i(()=>new WeakMap,"insert")});return mP(oe,Z,{insert:i(()=>{let he={};for(let[Re,Ee]of Object.entries(s.selectors??{}))he[Re]=lH(Ee,Z,Q,B);return he},"insert")})}return i(re,"getSelectors"),{reducerPath:L,getSelectors:re,get selectors(){return re(j)},selectSlice:j}}i(ne,"makeSelectorProps");let D={name:l,reducer:q,actions:S.actionCreators,caseReducers:S.sliceCaseReducersByName,getInitialState:Q,...ne(h),injectInto(L,{reducerPath:B,...j}={}){let re=B??h;return L.inject({reducerPath:re,reducer:q},j),{...D,...ne(re,!0)}}};return D},"createSlice2")}i(aH,"buildCreateSlice");function lH(e,t,n,s){function l(h,...d){let v=t(h);return typeof v>"u"&&s&&(v=n()),e(v,...d)}return i(l,"wrapper"),l.unwrapped=e,l}i(lH,"wrapSelector");var nn=aH();function uH(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return i(e,"asyncThunk"),e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}i(uH,"buildReducerCreators");function cH({type:e,reducerName:t,createNotation:n},s,l){let h,d;if("reducer"in s){if(n&&!dH(s))throw new Error(rn(17));h=s.reducer,d=s.prepare}else h=s;l.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,d?us(e,d):us(e))}i(cH,"handleNormalReducerDefinition");function fH(e){return e._reducerDefinitionType==="asyncThunk"}i(fH,"isAsyncThunkSliceReducerDefinition");function dH(e){return e._reducerDefinitionType==="reducerWithPrepare"}i(dH,"isCaseReducerWithPrepareDefinition");function pH({type:e,reducerName:t},n,s,l){if(!l)throw new Error(rn(18));let{payloadCreator:h,fulfilled:d,pending:v,rejected:S,settled:b,options:k}=n,R=l(e,h,k);s.exposeAction(t,R),d&&s.addCase(R.fulfilled,d),v&&s.addCase(R.pending,v),S&&s.addCase(R.rejected,S),b&&s.addMatcher(R.settled,b),s.exposeCaseReducer(t,{fulfilled:d||c0,pending:v||c0,rejected:S||c0,settled:b||c0})}i(pH,"handleThunkCaseReducerDefinition");function c0(){}i(c0,"noop");var _P="listener",EP="completed",bP="cancelled",j8=`task-${bP}`,K8=`task-${EP}`,G8=`${_P}-${bP}`,Y8=`${_P}-${EP}`;var hH=i((e,t)=>{if(typeof e!="function")throw new Error(rn(32))},"assertFunction");var{assign:X8}=Object;var dC="listenerMiddleware";var mH=i(e=>{let{type:t,actionCreator:n,matcher:s,predicate:l,effect:h}=e;if(t)l=us(t).match;else if(n)t=n.type,l=n.match;else if(s)l=s;else if(!l)throw new Error(rn(21));return hH(h,"options.listener"),{predicate:l,type:t,effect:h}},"getListenerEntryPropsFrom"),gH=Object.assign(e=>{let{type:t,predicate:n,effect:s}=mH(e);return{id:xP(),effect:s,type:t,predicate:n,pending:new Set,unsubscribe:i(()=>{throw new Error(rn(22))},"unsubscribe")}},{withTypes:i(()=>gH,"withTypes")});var vH=Object.assign(us(`${dC}/add`),{withTypes:i(()=>vH,"withTypes")}),Q8=us(`${dC}/removeAll`),yH=Object.assign(us(`${dC}/remove`),{withTypes:i(()=>yH,"withTypes")});var J8=Symbol.for("rtk-state-proxy-original");function rn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(rn,"formatProdErrorMessage");var Be=i(()=>TA(),"useAppDispatch"),me=yA,TP=Dm.withTypes();var kP="EVENTS_ADD",wH="EVENTS_RECEIVE",NP="EVENTS_TOGGLE_VISIBILITY",AP="EVENTS_TOGGLE_FILTER",pC=(h=>(h.debug="debug",h.info="info",h.web="web",h.warn="warn",h.error="error",h))(pC||{}),SH={visible:!1,filters:{debug:!1,info:!0,web:!0,warn:!0,error:!0},...ap};function hC(e=SH,t){switch(t.type){case NP:return{...e,visible:!e.visible};case AP:{let n={...e.filters,[t.filter]:!e.filters[t.filter]};return{...e,filters:n,...$u(e,km(s=>n[s.level]))}}case kP:case wH:return{...e,...$u(e,Am[t.cmd](t.data,n=>e.filters[n.level]))};default:return e}}i(hC,"reduce");function PP(e){return{type:AP,filter:e}}i(PP,"toggleFilter");function mp(){return{type:NP}}i(mp,"toggleVisibility");function LP(e,t="web"){let n={id:Math.random().toString(),message:e,level:t};return{type:kP,cmd:"add",data:n}}i(LP,"add");var OP="UI_OPTION_UPDATE_START",RP="UI_OPTION_UPDATE_SUCCESS",DP="UI_OPTION_UPDATE_ERROR",xH={};function mC(e=xH,t){switch(t.type){case OP:return{...e,[t.option]:{isUpdating:!0,value:t.value,error:!1}};case RP:return{...e,[t.option]:void 0};case DP:{let n=e[t.option].value;return typeof n=="boolean"&&(n=!n),{...e,[t.option]:{value:n,isUpdating:!1,error:t.error}}}case Yy:return{};default:return e}}i(mC,"reducer");function IP(e,t){return{type:OP,option:e,value:t}}i(IP,"startUpdate");function FP(e){return{type:RP,option:e}}i(FP,"updateSuccess");function BP(e,t){return{type:DP,option:e,error:String(t)}}i(BP,"updateError");var _H=nn({name:"ui/tabs",initialState:{current:1,isInitial:!0},reducers:{setCurrent(e,t){e.current=t.payload,e.isInitial=!1}}}),{actions:EH,reducer:bH}=_H,{setCurrent:Im}=EH,HP=bH;var zP=dp({flow:bx,modal:Yx,optionsEditor:mC,tabs:HP});var TH={state:"CONNECTION_INIT",message:void 0};function gC(e=TH,t){switch(t.type){case"CONNECTION_ESTABLISHED":case"CONNECTION_FETCHING":case"CONNECTION_ERROR":case"CONNECTION_OFFLINE":return{state:t.type,message:t.message};default:return e}}i(gC,"reducer");function UP(){return{type:"CONNECTION_FETCHING"}}i(UP,"startFetching");function WP(){return{type:"CONNECTION_ESTABLISHED"}}i(WP,"connectionEstablished");function $P(e){return{type:"CONNECTION_ERROR",message:e}}i($P,"connectionError");var VP={add_upstream_certs_to_client_chain:!1,allow_hosts:[],anticache:!1,anticomp:!1,block_global:!0,block_list:[],block_private:!1,body_size_limit:void 0,cert_passphrase:void 0,certs:[],ciphers_client:void 0,ciphers_server:void 0,client_certs:void 0,client_replay:[],client_replay_concurrency:1,command_history:!0,confdir:"~/.mitmproxy",connect_addr:void 0,connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,dns_name_servers:[],dns_use_hosts_file:!0,export_preserve_original_ip:!1,hardump:"",http2:!0,http2_ping_keepalive:58,http3:!0,http_connect_send_host_header:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_alt_svc_header:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:void 0,map_local:[],map_remote:[],mode:["regular"],modify_body:[],modify_headers:[],normalize_outbound_headers:!0,onboarding:!0,onboarding_host:"mitm.it",proxy_debug:!1,proxyauth:void 0,rawtcp:!0,readfile_filter:void 0,request_client_cert:!1,rfile:void 0,save_stream_file:void 0,save_stream_filter:void 0,scripts:[],server:!0,server_replay:[],server_replay_extra:"forward",server_replay_ignore_content:!1,server_replay_ignore_host:!1,server_replay_ignore_params:[],server_replay_ignore_payload_params:[],server_replay_ignore_port:!1,server_replay_kill_extra:!1,server_replay_nopop:!1,server_replay_refresh:!0,server_replay_reuse:!1,server_replay_use_headers:[],show_ignored_hosts:!1,showhost:!1,ssl_insecure:!1,ssl_verify_upstream_trusted_ca:void 0,ssl_verify_upstream_trusted_confdir:void 0,stickyauth:void 0,stickycookie:void 0,stream_large_bodies:void 0,strip_ech:!0,tcp_hosts:[],termlog_verbosity:"info",tls_ecdh_curve_client:void 0,tls_ecdh_curve_server:void 0,tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",udp_hosts:[],upstream_auth:void 0,upstream_cert:!0,validate_inbound_headers:!0,view_filter:void 0,view_order:"time",view_order_reversed:!1,web_columns:["tls","icon","path","method","status","size","time"],web_debug:!1,web_host:"127.0.0.1",web_open_browser:!0,web_port:8081,web_static_viewer:"",websocket:!0};var vC="OPTIONS_RECEIVE",yC="OPTIONS_UPDATE";function wC(e=VP,t){switch(t.type){case vC:{let n={};for(let[s,{value:l}]of Object.entries(t.data))n[s]=l;return n}case yC:{let n={...e};for(let[s,{value:l}]of Object.entries(t.data))n[s]=l;return n}default:return e}}i(wC,"reducer");async function NH(e,t,n){try{let s=await xt.put("/options",{[e]:t});if(s.status===200)n(FP(e));else throw await s.text()}catch(s){n(BP(e,s))}}i(NH,"pureSendUpdate");var AH=NH;function gp(e,t){return n=>{n(IP(e,t)),AH(e,t,n)}}i(gp,"update");var qP="COMMANDBAR_TOGGLE_VISIBILITY",LH={visible:!1};function SC(e=LH,t){switch(t.type){case qP:return{...e,visible:!e.visible};default:return e}}i(SC,"reducer");function f0(){return{type:qP}}i(f0,"toggleVisibility");var Gn=us("STATE_RECEIVE"),Yn=us("STATE_UPDATE"),MH={available:!1,version:"",contentViews:[],servers:{},platform:""};function xC(e=MH,t){switch(t.type){case Gn.type:case Yn.type:return{...e,available:!0,...t.payload};default:return e}}i(xC,"reducer");var OH={},RH=i((e=OH,t)=>{switch(t.type){case vC:return t.data;case yC:return{...e,...t.data};default:return e}},"reducer"),KP=RH;var Xi=i((e,t)=>t.listen_host&&t.listen_port?`${e}@${t.listen_host}:${t.listen_port}`:t.listen_port?`${e}@${t.listen_port}`:e,"includeListenAddress"),d0=i(e=>{let[t,n]=Tm(e,"@");t||(t=n,n="");let[s,l]=By(t,":"),h,d;if(n){let v;if(n.includes(":")?[h,v]=Tm(n,":"):(h="",v=n),v&&(d=parseInt(v,10),isNaN(d)||d<0||d>65535))throw new Error(`invalid port: ${v}`)}return{full_spec:e,name:s,data:l,listen_host:h,listen_port:d}},"parseSpec");var p0=i(e=>Xi("regular",e),"getSpec"),CC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var h0=i(e=>e.selectedProcesses?`local:${e.selectedProcesses}`:"local","getSpec"),_C=i(({data:e})=>({ui_id:Math.random(),active:!0,selectedProcesses:e}),"parseRaw");var m0=i(e=>{let t=e.file_path?`wireguard:${e.file_path}`:"wireguard";return Xi(t,e)},"getSpec"),EC=i(({data:e,listen_host:t,listen_port:n})=>({ui_id:Math.random(),active:!0,listen_host:t,listen_port:n,file_path:e}),"parseRaw");var g0=(b=>(b.HTTP="http",b.HTTPS="https",b.HTTP3="http3",b.TLS="tls",b.DTLS="dtls",b.TCP="tcp",b.UDP="udp",b.DNS="dns",b.QUIC="quic",b))(g0||{});var v0=i(()=>({active:!1,protocol:"https",destination:"",ui_id:Math.random()}),"defaultReverseState"),vp=i(e=>Xi(`reverse:${e.protocol}://${e.destination}`,e),"getSpec"),GP=i(({data:e,listen_host:t,listen_port:n})=>{let[s,l]=By(e,"://");return l||(l=s,s="https"),{ui_id:Math.random(),active:!0,protocol:s,destination:l,listen_host:t,listen_port:n}},"parseRaw");var y0=i(e=>Xi("transparent",e),"getSpec"),bC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var w0=i(e=>Xi("socks5",e),"getSpec"),TC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var S0=i(e=>Xi(`upstream:${e.destination}`,e),"getSpec"),kC=i(({data:e,listen_host:t,listen_port:n})=>({ui_id:Math.random(),active:!0,destination:e||"",listen_host:t,listen_port:n}),"parseRaw");var x0=i(e=>Xi("dns",e),"getSpec"),NC=i(({listen_host:e,listen_port:t})=>({ui_id:Math.random(),active:!0,listen_host:e,listen_port:t}),"parseRaw");var qu=i(e=>e.active&&!e.error,"isActiveMode");async function DH(e,t){let n=t.getState().modes,s=[...n.regular.filter(qu).map(p0),...n.local.filter(qu).map(h0),...n.wireguard.filter(qu).map(m0),...n.reverse.filter(qu).map(vp),...n.transparent.filter(qu).map(y0),...n.socks.filter(qu).map(w0),...n.upstream.filter(qu).map(S0),...n.dns.filter(qu).map(x0)],l=await xt.put("/options",{mode:s});if(l.status!==200)throw new Error(await l.text())}i(DH,"updateModes");function Ct(e){return TP(e,DH)}i(Ct,"createModeUpdateThunk");function _t(e,t,n){e.addCase(n.pending,(s,l)=>{let{server:h,value:d}=l.meta.arg,v=s.findIndex(S=>S.ui_id===h.ui_id);v>=0&&(s[v][t]=d,s[v].error=void 0)}),e.addCase(n.rejected,(s,l)=>{let{server:h}=l.meta.arg,d=s.findIndex(v=>v.ui_id===h.ui_id);d>=0&&(s[d].error=l.error.message)})}i(_t,"addSetter");function Vr(e,t){return i(function(s,l){if(l.payload.servers){let h=Object.values(l.payload.servers).filter(d=>d.type===e).map(d=>d0(d.full_spec));if(h.length>0)return h.map(t);for(let d of s)d.active=!1}},"reducer")}i(Vr,"updateState");var AC=Ct("modes/regular/setActive"),PC=Ct("modes/regular/setListenHost"),LC=Ct("modes/regular/setListenPort"),IH=[{active:!0,ui_id:Math.random()}],FH=nn({name:"modes/regular",initialState:IH,reducers:{},extraReducers:i(e=>{_t(e,"active",AC),_t(e,"listen_host",PC),_t(e,"listen_port",LC),e.addCase(Gn,Vr("regular",CC)),e.addCase(Yn,Vr("regular",CC))},"extraReducers")}),YP=FH.reducer;var MC=Ct("modes/local/setActive"),yp=Ct("modes/local/setSelectedProcesses"),BH=[{active:!1,selectedProcesses:"",ui_id:Math.random()}],HH=nn({name:"modes/local",initialState:BH,reducers:{},extraReducers:i(e=>{_t(e,"active",MC),_t(e,"selectedProcesses",yp),e.addCase(Gn,Vr("local",_C)),e.addCase(Yn,Vr("local",_C))},"extraReducers")}),XP=HH.reducer;var OC=Ct("modes/wireguard/setActive"),RC=Ct("modes/wireguard/setListenHost"),DC=Ct("modes/wireguard/setListenPort"),IC=Ct("modes/wireguard/setFilePath"),zH=[{active:!1,ui_id:Math.random()}],UH=nn({name:"modes/wireguard",initialState:zH,reducers:{},extraReducers:i(e=>{_t(e,"active",OC),_t(e,"listen_host",RC),_t(e,"listen_port",DC),_t(e,"file_path",IC),e.addCase(Gn,Vr("wireguard",EC)),e.addCase(Yn,Vr("wireguard",EC))},"extraReducers")}),QP=UH.reducer;var C0=Ct("modes/reverse/setActive"),FC=Ct("modes/reverse/setListenHost"),BC=Ct("modes/reverse/setListenPort"),HC=Ct("modes/reverse/setProtocol"),zC=Ct("modes/reverse/setDestination"),WH=[v0()],JP=nn({name:"modes/reverse",initialState:WH,reducers:{addServer:i(e=>{e.push(v0())},"addServer"),removeServer:i((e,t)=>{let n=e.findIndex(s=>s.ui_id===t.payload.ui_id);n!==-1&&(e[n].active&&console.error("servers should be deactivated before removal"),e.splice(n,1))},"removeServer")},extraReducers:i(e=>{_t(e,"active",C0),_t(e,"listen_host",FC),_t(e,"listen_port",BC),_t(e,"protocol",HC),_t(e,"destination",zC),e.addCase(Gn,t),e.addCase(Yn,t);function t(n,s){if(s.payload.servers){let l=Object.fromEntries(Object.entries(s.payload.servers).filter(([d,v])=>v.type==="reverse").map(([d,v])=>[d,d0(d)])),h=[];for(let d of n){let v=vp(d),S=v in l;delete l[v],h.push({...d,active:S})}for(let d of Object.values(l))h.push(GP(d));return h.length>1&&Mo({...h[0],ui_id:void 0},{...v0(),ui_id:void 0})&&h.shift(),h}}i(t,"updateState")},"extraReducers")}),{addServer:ZP,removeServer:eL}=JP.actions,tL=JP.reducer;var UC=Ct("modes/transparent/setActive"),WC=Ct("modes/transparent/setListenHost"),$C=Ct("modes/transparent/setListenPort"),$H=[{active:!1,ui_id:Math.random()}],VH=nn({name:"modes/transparent",initialState:$H,reducers:{},extraReducers:i(e=>{_t(e,"active",UC),_t(e,"listen_host",WC),_t(e,"listen_port",$C),e.addCase(Gn,Vr("transparent",bC)),e.addCase(Yn,Vr("transparent",bC))},"extraReducers")}),rL=VH.reducer;var VC=Ct("modes/socks5/setActive"),qC=Ct("modes/socks5/setListenHost"),jC=Ct("modes/socks5/setListenPort"),qH=[{active:!1,ui_id:Math.random()}],jH=nn({name:"modes/socks5",initialState:qH,reducers:{},extraReducers:i(e=>{_t(e,"active",VC),_t(e,"listen_host",qC),_t(e,"listen_port",jC),e.addCase(Gn,Vr("socks5",TC)),e.addCase(Yn,Vr("socks5",TC))},"extraReducers")}),nL=jH.reducer;var KC=Ct("modes/upstream/setActive"),GC=Ct("modes/upstream/setListenHost"),YC=Ct("modes/upstream/setListenPort"),XC=Ct("modes/upstream/setDestination"),KH=[{active:!1,destination:"",ui_id:Math.random()}],GH=nn({name:"modes/upstream",initialState:KH,reducers:{},extraReducers:i(e=>{_t(e,"active",KC),_t(e,"listen_host",GC),_t(e,"listen_port",YC),_t(e,"destination",XC),e.addCase(Gn,Vr("upstream",kC)),e.addCase(Yn,Vr("upstream",kC))},"extraReducers")}),iL=GH.reducer;var QC=Ct("modes/dns/setActive"),JC=Ct("modes/dns/setListenHost"),ZC=Ct("modes/dns/setListenPort"),YH=[{active:!0,ui_id:Math.random()}],XH=nn({name:"modes/dns",initialState:YH,reducers:{},extraReducers:i(e=>{_t(e,"active",QC),_t(e,"listen_host",JC),_t(e,"listen_port",ZC),e.addCase(Gn,Vr("dns",NC)),e.addCase(Yn,Vr("dns",NC))},"extraReducers")}),oL=XH.reducer;var QH=dp({regular:YP,local:XP,wireguard:QP,reverse:tL,transparent:rL,socks:nL,upstream:iL,dns:oL}),sL=QH;var Cf=Dm("fetchProcesses",async(e,{rejectWithValue:t})=>{try{return(await xt("/processes")).json()}catch(n){return t(n.message)}}),JH={currentProcesses:[],isLoading:!1},ZH=nn({name:"processes",initialState:JH,reducers:{},extraReducers:i(e=>{e.addCase(Cf.pending,t=>{t.isLoading=!0,t.error=void 0}),e.addCase(Cf.fulfilled,(t,n)=>{t.isLoading=!1,t.currentProcesses=n.payload}),e.addCase(Cf.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload})},"extraReducers")}),aL=ZH.reducer;var ez={commandBar:SC,eventLog:hC,flows:Gx,connection:gC,modes:sL,ui:zP,options:wC,options_meta:KP,backendState:xC,processes:aL},_f=wP({reducer:ez,middleware:i(e=>e({immutableCheck:{warnAfter:5e5},serializableCheck:{warnAfter:5e5}}),"middleware")});var Io=pe(Te());var lL=pe(bm()),uL=pe(ai());var e_=class extends Io.Component{constructor(){super(...arguments);this.container=Io.default.createRef();this.nameInput=Io.default.createRef();this.valueInput=Io.default.createRef();this.render=i(()=>{let[n,s]=this.props.item;return Io.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},Io.default.createElement(gt,{ref:this.nameInput,className:"kv-key",content:n,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([l,s])}),":\xA0",Io.default.createElement(gt,{ref:this.valueInput,className:"kv-value",content:s,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([n,l]),placeholder:"empty"}))},"render");this.onClick=i(n=>{n.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=i(n=>{n.target===this.valueInput.current?.input.current&&n.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}static{i(this,"Row")}},wp=class extends Io.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=i(()=>{this.rowRefs={};let n=this.state.currentList.map((s,l)=>Io.default.createElement(e_,{key:l,item:s,onEditStart:()=>this.currentlyEditing=l,onEditDone:h=>this.onEditDone(l,h),onClickEmptyArea:()=>this.onClickEmptyArea(l),onTabNext:()=>this.onTabNext(l),ref:h=>this.rowRefs[l]=h}));return Io.default.createElement("div",{className:(0,uL.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},n,Io.default.createElement("div",{onClick:s=>{s.preventDefault(),this.onClickEmptyArea(this.state.currentList.length-1)},className:"kv-add-row fa fa-plus-square-o",role:"button","aria-label":"Add"}))},"render");this.onEditDone=i((n,s)=>{let l=[...this.state.currentList];s[0]?l[n]=s:l.splice(n,1),this.currentlyEditing=void 0,(0,lL.isEqual)(this.state.currentList,l)||this.props.onChange(l),this.setState({currentList:l})},"onEditDone");this.onClickEmptyArea=i(n=>{if(this.justFinishedEditing)return;let s=[...this.state.currentList];s.splice(n+1,0,["",""]),this.setState({currentList:s},()=>this.rowRefs[n+1]?.nameInput.current?.startEditing())},"onClickEmptyArea");this.onTabNext=i(n=>{n==this.state.currentList.length-1&&this.onClickEmptyArea(n)},"onTabNext");this.onMouseDown=i(n=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static{i(this,"KeyValueListEditor")}static getDerivedStateFromProps(n,s){return n.data!==s.initialList?{currentList:n.data||[],initialList:n.data}:null}};var nr=pe(Te());var Fm=pe(Te());function _0(e,t){let[n,s]=(0,Fm.useState)(),[l,h]=(0,Fm.useState)();return(0,Fm.useEffect)(()=>{l&&l.abort();let d=new AbortController;return xt(e,{signal:d.signal}).then(v=>{if(!v.ok)throw`${v.status} ${v.statusText}`.trim();return v.text()}).then(v=>{s(v)}).catch(v=>{d.signal.aborted||s(`Error getting content: ${v}.`)}),h(d),()=>{d.signal.aborted||d.abort()}},[e,t]),n}i(_0,"useContent");var Bm=pe(Te());var E0=Bm.default.memo(i(function({icon:t,text:n,className:s,title:l,onOpenFile:h,onClick:d}){let v;return Bm.default.createElement("a",{href:"#",onClick:S=>{v.click(),d&&d(S)},className:s,title:l},Bm.default.createElement("i",{className:"fa fa-fw "+t}),n,Bm.default.createElement("input",{ref:S=>v=S,className:"hidden",type:"file",onChange:S=>{S.preventDefault(),S.target.files&&S.target.files.length>0&&h(S.target.files[0]),v.value=""}}))},"FileChooser"));var Sp=pe(Te()),cL=pe(ai());function Or({onClick:e,children:t,icon:n,disabled:s,className:l,title:h}){return Sp.createElement("button",{className:(0,cL.default)(l,"btn btn-default"),onClick:s?void 0:e,disabled:s,title:h},n&&Sp.createElement(Sp.Fragment,null,Sp.createElement("i",{className:"fa "+n}),"\xA0"),t)}i(Or,"Button");var Um=pe(Te()),gL=pe(Te());var Hm=pe(Te()),pL=pe(ai()),hL=pe(fL()),mL=pe(bm());function dL(e){return e&&e.replace(/\r\n|\r/g,` +`)}i(dL,"normalizeLineEndings");var zm=class extends Hm.Component{static{i(this,"CodeMirror")}constructor(t){super(t),this.state={isFocused:!1}}static{this.defaultProps={preserveScrollPosition:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||hL.default}UNSAFE_componentWillMount(){this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")}componentDidMount(){let t=this.getCodeMirrorInstance();this.codeMirror=t.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged.bind(this)),this.codeMirror.on("cursorActivity",this.cursorActivity.bind(this)),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged.bind(this)),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")}componentWillUnmount(){this.codeMirror&&this.codeMirror.toTextArea()}UNSAFE_componentWillReceiveProps(t){if(this.codeMirror&&t.value!==void 0&&t.value!==this.props.value&&dL(this.codeMirror.getValue())!==dL(t.value))if(this.props.preserveScrollPosition){let n=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(n.left,n.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let n in t.options)t.options.hasOwnProperty(n)&&this.setOptionIfChanged(n,t.options[n])}setOptionIfChanged(t,n){let s=this.codeMirror.getOption(t);(0,mL.isEqual)(s,n)||this.codeMirror.setOption(t,n)}getCodeMirror(){return this.codeMirror}focus(){this.codeMirror&&this.codeMirror.focus()}focusChanged(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)}cursorActivity(t){this.props.onCursorActivity&&this.props.onCursorActivity(t)}scrollChanged(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())}codemirrorValueChanged(t,n){this.props.onChange&&n.origin!=="setValue"&&this.props.onChange(t.getValue(),n)}render(){let t=(0,pL.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return Hm.createElement("div",{className:t},Hm.createElement("textarea",{ref:n=>this.textareaNode=n,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};var Wm=class extends gL.Component{constructor(){super(...arguments);this.editor=Um.createRef();this.getContent=i(()=>this.editor.current?.codeMirror.getValue(),"getContent");this.render=i(()=>{let n={lineNumbers:!0};return Um.createElement("div",{className:"codeeditor",onKeyDown:s=>s.stopPropagation()},Um.createElement(zm,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:n}))},"render")}static{i(this,"CodeEditor")}};var Ef=pe(Te());var tz=Ef.default.memo(i(function({lines:t,maxLines:n,showMore:s}){return t.length===0?null:Ef.default.createElement("pre",null,t.map((l,h)=>h===n?Ef.default.createElement("button",{key:"showmore",onClick:s,className:"btn btn-xs btn-info"},Ef.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," ","Show more"):Ef.default.createElement("div",{key:h},l.map(([d,v],S)=>Ef.default.createElement("span",{key:S,className:d},v)))))},"LineRenderer")),b0=tz;var Of=pe(Te());var Ni=pe(Te());var T0=pe(Te());var n_=i(function(t){return t.reduce(function(n,s){var l=s[0],h=s[1];return n[l]=h,n},{})},"fromEntries"),i_=typeof window<"u"&&window.document&&window.document.createElement?T0.useLayoutEffect:T0.useEffect;var Gu=pe(Te()),zL=pe(yx());var Rr="top",xn="bottom",on="right",qr="left",k0="auto",ju=[Rr,xn,on,qr],Sl="start",bf="end",vL="clippingParents",N0="viewport",xp="popper",yL="reference",o_=ju.reduce(function(e,t){return e.concat([t+"-"+Sl,t+"-"+bf])},[]),A0=[].concat(ju,[k0]).reduce(function(e,t){return e.concat([t,t+"-"+Sl,t+"-"+bf])},[]),rz="beforeRead",nz="read",iz="afterRead",oz="beforeMain",sz="main",az="afterMain",lz="beforeWrite",uz="write",cz="afterWrite",wL=[rz,nz,iz,oz,sz,az,lz,uz,cz];function Rn(e){return e?(e.nodeName||"").toLowerCase():null}i(Rn,"getNodeName");function mr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}i(mr,"getWindow");function cs(e){var t=mr(e).Element;return e instanceof t||e instanceof Element}i(cs,"isElement");function Cn(e){var t=mr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}i(Cn,"isHTMLElement");function Cp(e){if(typeof ShadowRoot>"u")return!1;var t=mr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}i(Cp,"isShadowRoot");function fz(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},l=t.attributes[n]||{},h=t.elements[n];!Cn(h)||!Rn(h)||(Object.assign(h.style,s),Object.keys(l).forEach(function(d){var v=l[d];v===!1?h.removeAttribute(d):h.setAttribute(d,v===!0?"":v)}))})}i(fz,"applyStyles");function dz(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var l=t.elements[s],h=t.attributes[s]||{},d=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),v=d.reduce(function(S,b){return S[b]="",S},{});!Cn(l)||!Rn(l)||(Object.assign(l.style,v),Object.keys(h).forEach(function(S){l.removeAttribute(S)}))})}}i(dz,"effect");var SL={name:"applyStyles",enabled:!0,phase:"write",fn:fz,effect:dz,requires:["computeStyles"]};function Dn(e){return e.split("-")[0]}i(Dn,"getBasePlacement");var Us=Math.max,Tf=Math.min,xl=Math.round;function _p(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}i(_p,"getUAString");function $m(){return!/^((?!chrome|android).)*safari/i.test(_p())}i($m,"isLayoutViewport");function fs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),l=1,h=1;t&&Cn(e)&&(l=e.offsetWidth>0&&xl(s.width)/e.offsetWidth||1,h=e.offsetHeight>0&&xl(s.height)/e.offsetHeight||1);var d=cs(e)?mr(e):window,v=d.visualViewport,S=!$m()&&n,b=(s.left+(S&&v?v.offsetLeft:0))/l,k=(s.top+(S&&v?v.offsetTop:0))/h,R=s.width/l,I=s.height/h;return{width:R,height:I,top:k,right:b+R,bottom:k+I,left:b,x:b,y:k}}i(fs,"getBoundingClientRect");function kf(e){var t=fs(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}i(kf,"getLayoutRect");function Vm(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Cp(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}i(Vm,"contains");function ki(e){return mr(e).getComputedStyle(e)}i(ki,"getComputedStyle");function s_(e){return["table","td","th"].indexOf(Rn(e))>=0}i(s_,"isTableElement");function Xn(e){return((cs(e)?e.ownerDocument:e.document)||window.document).documentElement}i(Xn,"getDocumentElement");function Cl(e){return Rn(e)==="html"?e:e.assignedSlot||e.parentNode||(Cp(e)?e.host:null)||Xn(e)}i(Cl,"getParentNode");function xL(e){return!Cn(e)||ki(e).position==="fixed"?null:e.offsetParent}i(xL,"getTrueOffsetParent");function pz(e){var t=/firefox/i.test(_p()),n=/Trident/i.test(_p());if(n&&Cn(e)){var s=ki(e);if(s.position==="fixed")return null}var l=Cl(e);for(Cp(l)&&(l=l.host);Cn(l)&&["html","body"].indexOf(Rn(l))<0;){var h=ki(l);if(h.transform!=="none"||h.perspective!=="none"||h.contain==="paint"||["transform","perspective"].indexOf(h.willChange)!==-1||t&&h.willChange==="filter"||t&&h.filter&&h.filter!=="none")return l;l=l.parentNode}return null}i(pz,"getContainingBlock");function Ws(e){for(var t=mr(e),n=xL(e);n&&s_(n)&&ki(n).position==="static";)n=xL(n);return n&&(Rn(n)==="html"||Rn(n)==="body"&&ki(n).position==="static")?t:n||pz(e)||t}i(Ws,"getOffsetParent");function Nf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}i(Nf,"getMainAxisFromPlacement");function Af(e,t,n){return Us(e,Tf(t,n))}i(Af,"within");function CL(e,t,n){var s=Af(e,t,n);return s>n?n:s}i(CL,"withinMaxClamp");function qm(){return{top:0,right:0,bottom:0,left:0}}i(qm,"getFreshSideObject");function jm(e){return Object.assign({},qm(),e)}i(jm,"mergePaddingObject");function Km(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}i(Km,"expandToHashMap");var hz=i(function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,jm(typeof t!="number"?t:Km(t,ju))},"toPaddingObject");function mz(e){var t,n=e.state,s=e.name,l=e.options,h=n.elements.arrow,d=n.modifiersData.popperOffsets,v=Dn(n.placement),S=Nf(v),b=[qr,on].indexOf(v)>=0,k=b?"height":"width";if(!(!h||!d)){var R=hz(l.padding,n),I=kf(h),z=S==="y"?Rr:qr,q=S==="y"?xn:on,Q=n.rects.reference[k]+n.rects.reference[S]-d[S]-n.rects.popper[k],ne=d[S]-n.rects.reference[S],D=Ws(h),L=D?S==="y"?D.clientHeight||0:D.clientWidth||0:0,B=Q/2-ne/2,j=R[z],re=L-I[k]-R[q],Z=L/2-I[k]/2+B,oe=Af(j,Z,re),he=S;n.modifiersData[s]=(t={},t[he]=oe,t.centerOffset=oe-Z,t)}}i(mz,"arrow");function gz(e){var t=e.state,n=e.options,s=n.element,l=s===void 0?"[data-popper-arrow]":s;l!=null&&(typeof l=="string"&&(l=t.elements.popper.querySelector(l),!l)||Vm(t.elements.popper,l)&&(t.elements.arrow=l))}i(gz,"effect");var _L={name:"arrow",enabled:!0,phase:"main",fn:mz,effect:gz,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ds(e){return e.split("-")[1]}i(ds,"getVariation");var vz={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yz(e,t){var n=e.x,s=e.y,l=t.devicePixelRatio||1;return{x:xl(n*l)/l||0,y:xl(s*l)/l||0}}i(yz,"roundOffsetsByDPR");function EL(e){var t,n=e.popper,s=e.popperRect,l=e.placement,h=e.variation,d=e.offsets,v=e.position,S=e.gpuAcceleration,b=e.adaptive,k=e.roundOffsets,R=e.isFixed,I=d.x,z=I===void 0?0:I,q=d.y,Q=q===void 0?0:q,ne=typeof k=="function"?k({x:z,y:Q}):{x:z,y:Q};z=ne.x,Q=ne.y;var D=d.hasOwnProperty("x"),L=d.hasOwnProperty("y"),B=qr,j=Rr,re=window;if(b){var Z=Ws(n),oe="clientHeight",he="clientWidth";if(Z===mr(n)&&(Z=Xn(n),ki(Z).position!=="static"&&v==="absolute"&&(oe="scrollHeight",he="scrollWidth")),Z=Z,l===Rr||(l===qr||l===on)&&h===bf){j=xn;var Re=R&&Z===re&&re.visualViewport?re.visualViewport.height:Z[oe];Q-=Re-s.height,Q*=S?1:-1}if(l===qr||(l===Rr||l===xn)&&h===bf){B=on;var Ee=R&&Z===re&&re.visualViewport?re.visualViewport.width:Z[he];z-=Ee-s.width,z*=S?1:-1}}var Ye=Object.assign({position:v},b&&vz),tt=k===!0?yz({x:z,y:Q},mr(n)):{x:z,y:Q};if(z=tt.x,Q=tt.y,S){var xe;return Object.assign({},Ye,(xe={},xe[j]=L?"0":"",xe[B]=D?"0":"",xe.transform=(re.devicePixelRatio||1)<=1?"translate("+z+"px, "+Q+"px)":"translate3d("+z+"px, "+Q+"px, 0)",xe))}return Object.assign({},Ye,(t={},t[j]=L?Q+"px":"",t[B]=D?z+"px":"",t.transform="",t))}i(EL,"mapToStyles");function wz(e){var t=e.state,n=e.options,s=n.gpuAcceleration,l=s===void 0?!0:s,h=n.adaptive,d=h===void 0?!0:h,v=n.roundOffsets,S=v===void 0?!0:v,b={placement:Dn(t.placement),variation:ds(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,EL(Object.assign({},b,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:d,roundOffsets:S})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,EL(Object.assign({},b,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:S})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}i(wz,"computeStyles");var bL={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wz,data:{}};var P0={passive:!0};function Sz(e){var t=e.state,n=e.instance,s=e.options,l=s.scroll,h=l===void 0?!0:l,d=s.resize,v=d===void 0?!0:d,S=mr(t.elements.popper),b=[].concat(t.scrollParents.reference,t.scrollParents.popper);return h&&b.forEach(function(k){k.addEventListener("scroll",n.update,P0)}),v&&S.addEventListener("resize",n.update,P0),function(){h&&b.forEach(function(k){k.removeEventListener("scroll",n.update,P0)}),v&&S.removeEventListener("resize",n.update,P0)}}i(Sz,"effect");var TL={name:"eventListeners",enabled:!0,phase:"write",fn:i(function(){},"fn"),effect:Sz,data:{}};var xz={left:"right",right:"left",bottom:"top",top:"bottom"};function Ep(e){return e.replace(/left|right|bottom|top/g,function(t){return xz[t]})}i(Ep,"getOppositePlacement");var Cz={start:"end",end:"start"};function L0(e){return e.replace(/start|end/g,function(t){return Cz[t]})}i(L0,"getOppositeVariationPlacement");function Pf(e){var t=mr(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}i(Pf,"getWindowScroll");function Lf(e){return fs(Xn(e)).left+Pf(e).scrollLeft}i(Lf,"getWindowScrollBarX");function a_(e,t){var n=mr(e),s=Xn(e),l=n.visualViewport,h=s.clientWidth,d=s.clientHeight,v=0,S=0;if(l){h=l.width,d=l.height;var b=$m();(b||!b&&t==="fixed")&&(v=l.offsetLeft,S=l.offsetTop)}return{width:h,height:d,x:v+Lf(e),y:S}}i(a_,"getViewportRect");function l_(e){var t,n=Xn(e),s=Pf(e),l=(t=e.ownerDocument)==null?void 0:t.body,h=Us(n.scrollWidth,n.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),d=Us(n.scrollHeight,n.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),v=-s.scrollLeft+Lf(e),S=-s.scrollTop;return ki(l||n).direction==="rtl"&&(v+=Us(n.clientWidth,l?l.clientWidth:0)-h),{width:h,height:d,x:v,y:S}}i(l_,"getDocumentRect");function Mf(e){var t=ki(e),n=t.overflow,s=t.overflowX,l=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+l+s)}i(Mf,"isScrollParent");function M0(e){return["html","body","#document"].indexOf(Rn(e))>=0?e.ownerDocument.body:Cn(e)&&Mf(e)?e:M0(Cl(e))}i(M0,"getScrollParent");function Ku(e,t){var n;t===void 0&&(t=[]);var s=M0(e),l=s===((n=e.ownerDocument)==null?void 0:n.body),h=mr(s),d=l?[h].concat(h.visualViewport||[],Mf(s)?s:[]):s,v=t.concat(d);return l?v:v.concat(Ku(Cl(d)))}i(Ku,"listScrollParents");function bp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}i(bp,"rectToClientRect");function _z(e,t){var n=fs(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}i(_z,"getInnerBoundingClientRect");function kL(e,t,n){return t===N0?bp(a_(e,n)):cs(t)?_z(t,n):bp(l_(Xn(e)))}i(kL,"getClientRectFromMixedType");function Ez(e){var t=Ku(Cl(e)),n=["absolute","fixed"].indexOf(ki(e).position)>=0,s=n&&Cn(e)?Ws(e):e;return cs(s)?t.filter(function(l){return cs(l)&&Vm(l,s)&&Rn(l)!=="body"}):[]}i(Ez,"getClippingParents");function u_(e,t,n,s){var l=t==="clippingParents"?Ez(e):[].concat(t),h=[].concat(l,[n]),d=h[0],v=h.reduce(function(S,b){var k=kL(e,b,s);return S.top=Us(k.top,S.top),S.right=Tf(k.right,S.right),S.bottom=Tf(k.bottom,S.bottom),S.left=Us(k.left,S.left),S},kL(e,d,s));return v.width=v.right-v.left,v.height=v.bottom-v.top,v.x=v.left,v.y=v.top,v}i(u_,"getClippingRect");function Gm(e){var t=e.reference,n=e.element,s=e.placement,l=s?Dn(s):null,h=s?ds(s):null,d=t.x+t.width/2-n.width/2,v=t.y+t.height/2-n.height/2,S;switch(l){case Rr:S={x:d,y:t.y-n.height};break;case xn:S={x:d,y:t.y+t.height};break;case on:S={x:t.x+t.width,y:v};break;case qr:S={x:t.x-n.width,y:v};break;default:S={x:t.x,y:t.y}}var b=l?Nf(l):null;if(b!=null){var k=b==="y"?"height":"width";switch(h){case Sl:S[b]=S[b]-(t[k]/2-n[k]/2);break;case bf:S[b]=S[b]+(t[k]/2-n[k]/2);break;default:}}return S}i(Gm,"computeOffsets");function $s(e,t){t===void 0&&(t={});var n=t,s=n.placement,l=s===void 0?e.placement:s,h=n.strategy,d=h===void 0?e.strategy:h,v=n.boundary,S=v===void 0?vL:v,b=n.rootBoundary,k=b===void 0?N0:b,R=n.elementContext,I=R===void 0?xp:R,z=n.altBoundary,q=z===void 0?!1:z,Q=n.padding,ne=Q===void 0?0:Q,D=jm(typeof ne!="number"?ne:Km(ne,ju)),L=I===xp?yL:xp,B=e.rects.popper,j=e.elements[q?L:I],re=u_(cs(j)?j:j.contextElement||Xn(e.elements.popper),S,k,d),Z=fs(e.elements.reference),oe=Gm({reference:Z,element:B,strategy:"absolute",placement:l}),he=bp(Object.assign({},B,oe)),Re=I===xp?he:Z,Ee={top:re.top-Re.top+D.top,bottom:Re.bottom-re.bottom+D.bottom,left:re.left-Re.left+D.left,right:Re.right-re.right+D.right},Ye=e.modifiersData.offset;if(I===xp&&Ye){var tt=Ye[l];Object.keys(Ee).forEach(function(xe){var Xe=[on,xn].indexOf(xe)>=0?1:-1,je=[Rr,xn].indexOf(xe)>=0?"y":"x";Ee[xe]+=tt[je]*Xe})}return Ee}i($s,"detectOverflow");function c_(e,t){t===void 0&&(t={});var n=t,s=n.placement,l=n.boundary,h=n.rootBoundary,d=n.padding,v=n.flipVariations,S=n.allowedAutoPlacements,b=S===void 0?A0:S,k=ds(s),R=k?v?o_:o_.filter(function(q){return ds(q)===k}):ju,I=R.filter(function(q){return b.indexOf(q)>=0});I.length===0&&(I=R);var z=I.reduce(function(q,Q){return q[Q]=$s(e,{placement:Q,boundary:l,rootBoundary:h,padding:d})[Dn(Q)],q},{});return Object.keys(z).sort(function(q,Q){return z[q]-z[Q]})}i(c_,"computeAutoPlacement");function bz(e){if(Dn(e)===k0)return[];var t=Ep(e);return[L0(e),t,L0(t)]}i(bz,"getExpandedFallbackPlacements");function Tz(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var l=n.mainAxis,h=l===void 0?!0:l,d=n.altAxis,v=d===void 0?!0:d,S=n.fallbackPlacements,b=n.padding,k=n.boundary,R=n.rootBoundary,I=n.altBoundary,z=n.flipVariations,q=z===void 0?!0:z,Q=n.allowedAutoPlacements,ne=t.options.placement,D=Dn(ne),L=D===ne,B=S||(L||!q?[Ep(ne)]:bz(ne)),j=[ne].concat(B).reduce(function(vr,yr){return vr.concat(Dn(yr)===k0?c_(t,{placement:yr,boundary:k,rootBoundary:R,padding:b,flipVariations:q,allowedAutoPlacements:Q}):yr)},[]),re=t.rects.reference,Z=t.rects.popper,oe=new Map,he=!0,Re=j[0],Ee=0;Ee=0,je=Xe?"width":"height",Qe=$s(t,{placement:Ye,boundary:k,rootBoundary:R,altBoundary:I,padding:b}),ot=Xe?xe?on:qr:xe?xn:Rr;re[je]>Z[je]&&(ot=Ep(ot));var It=Ep(ot),At=[];if(h&&At.push(Qe[tt]<=0),v&&At.push(Qe[ot]<=0,Qe[It]<=0),At.every(function(vr){return vr})){Re=Ye,he=!1;break}oe.set(Ye,At)}if(he)for(var cn=q?3:1,fn=i(function(yr){var Gt=j.find(function(Ft){var se=oe.get(Ft);if(se)return se.slice(0,yr).every(function(Ue){return Ue})});if(Gt)return Re=Gt,"break"},"_loop"),gr=cn;gr>0;gr--){var Wt=fn(gr);if(Wt==="break")break}t.placement!==Re&&(t.modifiersData[s]._skip=!0,t.placement=Re,t.reset=!0)}}i(Tz,"flip");var NL={name:"flip",enabled:!0,phase:"main",fn:Tz,requiresIfExists:["offset"],data:{_skip:!1}};function AL(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}i(AL,"getSideOffsets");function PL(e){return[Rr,on,xn,qr].some(function(t){return e[t]>=0})}i(PL,"isAnySideFullyClipped");function kz(e){var t=e.state,n=e.name,s=t.rects.reference,l=t.rects.popper,h=t.modifiersData.preventOverflow,d=$s(t,{elementContext:"reference"}),v=$s(t,{altBoundary:!0}),S=AL(d,s),b=AL(v,l,h),k=PL(S),R=PL(b);t.modifiersData[n]={referenceClippingOffsets:S,popperEscapeOffsets:b,isReferenceHidden:k,hasPopperEscaped:R},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":k,"data-popper-escaped":R})}i(kz,"hide");var LL={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:kz};function Nz(e,t,n){var s=Dn(e),l=[qr,Rr].indexOf(s)>=0?-1:1,h=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,d=h[0],v=h[1];return d=d||0,v=(v||0)*l,[qr,on].indexOf(s)>=0?{x:v,y:d}:{x:d,y:v}}i(Nz,"distanceAndSkiddingToXY");function Az(e){var t=e.state,n=e.options,s=e.name,l=n.offset,h=l===void 0?[0,0]:l,d=A0.reduce(function(k,R){return k[R]=Nz(R,t.rects,h),k},{}),v=d[t.placement],S=v.x,b=v.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=S,t.modifiersData.popperOffsets.y+=b),t.modifiersData[s]=d}i(Az,"offset");var ML={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Az};function Pz(e){var t=e.state,n=e.name;t.modifiersData[n]=Gm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}i(Pz,"popperOffsets");var OL={name:"popperOffsets",enabled:!0,phase:"read",fn:Pz,data:{}};function f_(e){return e==="x"?"y":"x"}i(f_,"getAltAxis");function Lz(e){var t=e.state,n=e.options,s=e.name,l=n.mainAxis,h=l===void 0?!0:l,d=n.altAxis,v=d===void 0?!1:d,S=n.boundary,b=n.rootBoundary,k=n.altBoundary,R=n.padding,I=n.tether,z=I===void 0?!0:I,q=n.tetherOffset,Q=q===void 0?0:q,ne=$s(t,{boundary:S,rootBoundary:b,padding:R,altBoundary:k}),D=Dn(t.placement),L=ds(t.placement),B=!L,j=Nf(D),re=f_(j),Z=t.modifiersData.popperOffsets,oe=t.rects.reference,he=t.rects.popper,Re=typeof Q=="function"?Q(Object.assign({},t.rects,{placement:t.placement})):Q,Ee=typeof Re=="number"?{mainAxis:Re,altAxis:Re}:Object.assign({mainAxis:0,altAxis:0},Re),Ye=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(Z){if(h){var xe,Xe=j==="y"?Rr:qr,je=j==="y"?xn:on,Qe=j==="y"?"height":"width",ot=Z[j],It=ot+ne[Xe],At=ot-ne[je],cn=z?-he[Qe]/2:0,fn=L===Sl?oe[Qe]:he[Qe],gr=L===Sl?-he[Qe]:-oe[Qe],Wt=t.elements.arrow,vr=z&&Wt?kf(Wt):{width:0,height:0},yr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:qm(),Gt=yr[Xe],Ft=yr[je],se=Af(0,oe[Qe],vr[Qe]),Ue=B?oe[Qe]/2-cn-se-Gt-Ee.mainAxis:fn-se-Gt-Ee.mainAxis,Kr=B?-oe[Qe]/2+cn+se+Ft+Ee.mainAxis:gr+se+Ft+Ee.mainAxis,Zt=t.elements.arrow&&Ws(t.elements.arrow),st=Zt?j==="y"?Zt.clientTop||0:Zt.clientLeft||0:0,Fe=(xe=Ye?.[j])!=null?xe:0,Fn=ot+Ue-Fe-st,En=ot+Kr-Fe,no=Af(z?Tf(It,Fn):It,ot,z?Us(At,En):At);Z[j]=no,tt[j]=no-ot}if(v){var Ho,lt=j==="x"?Rr:qr,wr=j==="x"?xn:on,fr=Z[re],pt=re==="y"?"height":"width",io=fr+ne[lt],Bn=fr-ne[wr],Mi=[Rr,qr].indexOf(D)!==-1,Gr=(Ho=Ye?.[re])!=null?Ho:0,Yr=Mi?io:fr-oe[pt]-he[pt]-Gr+Ee.altAxis,oo=Mi?fr+oe[pt]+he[pt]-Gr-Ee.altAxis:Bn,hi=z&&Mi?CL(Yr,fr,oo):Af(z?Yr:io,fr,z?oo:Bn);Z[re]=hi,tt[re]=hi-fr}t.modifiersData[s]=tt}}i(Lz,"preventOverflow");var RL={name:"preventOverflow",enabled:!0,phase:"main",fn:Lz,requiresIfExists:["offset"]};function d_(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}i(d_,"getHTMLElementScroll");function p_(e){return e===mr(e)||!Cn(e)?Pf(e):d_(e)}i(p_,"getNodeScroll");function Mz(e){var t=e.getBoundingClientRect(),n=xl(t.width)/e.offsetWidth||1,s=xl(t.height)/e.offsetHeight||1;return n!==1||s!==1}i(Mz,"isElementScaled");function h_(e,t,n){n===void 0&&(n=!1);var s=Cn(t),l=Cn(t)&&Mz(t),h=Xn(t),d=fs(e,l,n),v={scrollLeft:0,scrollTop:0},S={x:0,y:0};return(s||!s&&!n)&&((Rn(t)!=="body"||Mf(h))&&(v=p_(t)),Cn(t)?(S=fs(t,!0),S.x+=t.clientLeft,S.y+=t.clientTop):h&&(S.x=Lf(h))),{x:d.left+v.scrollLeft-S.x,y:d.top+v.scrollTop-S.y,width:d.width,height:d.height}}i(h_,"getCompositeRect");function Oz(e){var t=new Map,n=new Set,s=[];e.forEach(function(h){t.set(h.name,h)});function l(h){n.add(h.name);var d=[].concat(h.requires||[],h.requiresIfExists||[]);d.forEach(function(v){if(!n.has(v)){var S=t.get(v);S&&l(S)}}),s.push(h)}return i(l,"sort"),e.forEach(function(h){n.has(h.name)||l(h)}),s}i(Oz,"order");function m_(e){var t=Oz(e);return wL.reduce(function(n,s){return n.concat(t.filter(function(l){return l.phase===s}))},[])}i(m_,"orderModifiers");function g_(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}i(g_,"debounce");function v_(e){var t=e.reduce(function(n,s){var l=n[s.name];return n[s.name]=l?Object.assign({},l,s,{options:Object.assign({},l.options,s.options),data:Object.assign({},l.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}i(v_,"mergeByName");var DL={placement:"bottom",modifiers:[],strategy:"absolute"};function IL(){for(var e=arguments.length,t=new Array(e),n=0;nNi.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function li({onClick:e,children:t,...n}){return Ni.default.createElement("li",null,Ni.default.createElement("a",{href:"#",onClick:i(l=>{l.preventDefault(),e()},"click"),...n},t))}i(li,"MenuItem");var Yu=Ni.default.memo(i(function({text:t,children:n,options:s,className:l,onOpen:h,...d}){let[v,S]=(0,Ni.useState)(null),[b,k]=(0,Ni.useState)(!1),[R,I]=(0,Ni.useState)(null),{styles:z,attributes:q}=w_(v,R,{...s}),Q=i(D=>{k(D),h&&h(D)},"setOpen");(0,Ni.useEffect)(()=>{R&&document.addEventListener("click",D=>{R.contains(D.target)?document.addEventListener("click",()=>Q(!1),{once:!0}):(D.preventDefault(),D.stopPropagation(),Q(!1))},{once:!0,capture:!0})},[R]);let ne;return b?ne=Ni.default.createElement("ul",{className:"dropdown-menu show",ref:I,style:z.popper,...q.popper},n):ne=null,Ni.default.createElement(Ni.default.Fragment,null,Ni.default.createElement("a",{href:"#",ref:S,className:(0,WL.default)(l,{open:b}),onClick:D=>{D.preventDefault(),Q(!0)},...d},t),ne)},"Dropdown"));function Ym({value:e,onChange:t}){let n=me(l=>l.backendState.contentViews||[]),s=Of.default.createElement("span",null,Of.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",Of.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",Of.default.createElement("span",{className:"caret"}));return Of.default.createElement(Yu,{text:s,className:"btn btn-default btn-xs",options:{placement:"top-end"}},n.map(l=>Of.default.createElement(li,{key:l,onClick:()=>t(l)},l.toLowerCase().replace("_"," "))))}i(Ym,"ViewSelector");function x_({flow:e,message:t}){let n=Be(),s=e.request===t?"request":"response",l=me(q=>q.ui.flow.contentViewFor[e.id+s]||"Auto"),h=(0,nr.useRef)(null),[d,v]=(0,nr.useState)(me(q=>q.options.content_view_lines_cutoff)),S=(0,nr.useCallback)(()=>v(Math.max(1024,d*2)),[d]),[b,k]=(0,nr.useState)(!1),R;b?R=On.getContentURL(e,t):R=On.getContentURL(e,t,l,d+1);let I=_0(R,t.contentHash),z=(0,nr.useMemo)(()=>{if(I&&!b)try{return JSON.parse(I)}catch{return{description:"Network Error",lines:[[["error",`${I}`]]]}}else return},[I]);if(b)return nr.default.createElement("div",{className:"contentview",key:"edit"},nr.default.createElement("div",{className:"controls"},nr.default.createElement("h5",null,"[Editing]"),nr.default.createElement(Or,{onClick:i(async()=>{let Q=h.current?.getContent();await n(si(e,{[s]:{content:Q}})),k(!1)},"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",nr.default.createElement(Or,{onClick:()=>k(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),nr.default.createElement(Wm,{ref:h,initialContent:I||""}));{let q=z?z.description:"Loading...";return nr.default.createElement("div",{className:"contentview",key:"view"},nr.default.createElement("div",{className:"controls"},nr.default.createElement("h5",null,q),nr.default.createElement(Or,{onClick:()=>k(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",nr.default.createElement(E0,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Q=>n(WA(e,Q,s)),className:"btn btn-default btn-xs"}),"\xA0",nr.default.createElement(Ym,{value:l,onChange:Q=>n(Dy(e.id+s,Q))})),S_.matches(t)&&nr.default.createElement(S_,{flow:e,message:t}),nr.default.createElement(b0,{lines:z?.lines||[],maxLines:d,showMore:S}))}}i(x_,"HttpMessage");var zz=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon|svg\+xml)$/i;S_.matches=e=>zz.test(On.getContentType(e)||"");function S_({flow:e,message:t}){return nr.default.createElement("div",{className:"flowview-image"},nr.default.createElement("img",{src:On.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}i(S_,"ViewImage");function Uz({flow:e}){let t=Be();return qt.createElement("div",{className:"first-line request-line"},qt.createElement("div",null,qt.createElement(wf,{content:e.request.method,onEditDone:n=>t(si(e,{request:{method:n}})),isValid:n=>n.length>0}),"\xA0",qt.createElement(wf,{content:Bs.pretty_url(e.request),onEditDone:n=>t(si(e,{request:{path:"",...Bx(n)}})),isValid:n=>!!Bx(n)?.host}),"\xA0",qt.createElement(wf,{content:e.request.http_version,onEditDone:n=>t(si(e,{request:{http_version:n}})),isValid:Hx})))}i(Uz,"RequestLine");function Wz({flow:e}){let t=Be();return qt.createElement("div",{className:"first-line response-line"},qt.createElement(wf,{content:e.response.http_version,onEditDone:n=>t(si(e,{response:{http_version:n}})),isValid:Hx}),"\xA0",qt.createElement(wf,{content:e.response.status_code+"",onEditDone:n=>t(si(e,{response:{code:parseInt(n)}})),isValid:n=>/^\d+$/.test(n)}),e.response.http_version!=="HTTP/2.0"&&qt.createElement(qt.Fragment,null,"\xA0",qt.createElement(gt,{content:e.response.reason,onEditDone:n=>t(si(e,{response:{msg:n}}))})))}i(Wz,"ResponseLine");function $z({flow:e,message:t}){let n=Be(),s=e.request===t?"request":"response";return qt.createElement(wp,{className:"headers",data:t.headers,onChange:l=>n(si(e,{[s]:{headers:l}}))})}i($z,"Headers");function Vz({flow:e,message:t}){let n=Be(),s=e.request===t?"request":"response";return!On.get_first_header(t,/^trailer$/i)?null:qt.createElement(qt.Fragment,null,qt.createElement("hr",null),qt.createElement("h5",null,"HTTP Trailers"),qt.createElement(wp,{className:"trailers",data:t.trailers,onChange:h=>n(si(e,{[s]:{trailers:h}}))}))}i(Vz,"Trailers");var VL=qt.memo(i(function({flow:t,message:n}){let s=t.request===n?"request":"response",l=t.request===n?Uz:Wz;return qt.createElement("section",{className:s},qt.createElement(l,{flow:t}),qt.createElement($z,{flow:t,message:n}),qt.createElement("hr",null),qt.createElement(x_,{key:t.id+s,flow:t,message:n}),qt.createElement(Vz,{flow:t,message:n}))},"Message"));function C_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return qt.createElement(VL,{flow:e,message:e.request})}i(C_,"Request");C_.displayName="Request";function __(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return qt.createElement(VL,{flow:e,message:e.response})}i(__,"Response");__.displayName="Response";var et=pe(Te());var qz=i(({message:e})=>et.createElement("div",null,e.query?e.op_code:e.response_code,"\xA0",e.truncation?"(Truncated)":""),"Summary"),jz=i(({message:e})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e.recursion_desired?"Recursive ":"","Question"),et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"))),et.createElement("tbody",null,e.questions.map((t,n)=>et.createElement("tr",{key:n},et.createElement("td",null,t.name),et.createElement("td",null,t.type),et.createElement("td",null,t.class)))))),"Questions"),E_=i(({name:e,values:t})=>et.createElement(et.Fragment,null,et.createElement("h5",null,e),t.length>0?et.createElement("table",null,et.createElement("thead",null,et.createElement("tr",null,et.createElement("th",null,"Name"),et.createElement("th",null,"Type"),et.createElement("th",null,"Class"),et.createElement("th",null,"TTL"),et.createElement("th",null,"Data"))),et.createElement("tbody",null,t.map((n,s)=>et.createElement("tr",{key:s},et.createElement("td",null,n.name),et.createElement("td",null,n.type),et.createElement("td",null,n.class),et.createElement("td",null,n.ttl),et.createElement("td",null,n.data))))):"\u2014"),"ResourceRecords"),qL=i(({type:e,message:t})=>et.createElement("section",{className:"dns-"+e},et.createElement("div",{className:`first-line ${e}-line`},et.createElement(qz,{message:t})),et.createElement(jz,{message:t}),et.createElement("hr",null),et.createElement(E_,{name:`${t.authoritative_answer?"Authoritative ":""}${t.recursion_available?"Recursive ":""}Answer`,values:t.answers}),et.createElement("hr",null),et.createElement(E_,{name:"Authority",values:t.authorities}),et.createElement("hr",null),et.createElement(E_,{name:"Additional",values:t.additionals})),"Message");function b_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(qL,{type:"request",message:e.request})}i(b_,"Request");b_.displayName="Request";function T_(){let e=me(t=>t.flows.byId[t.flows.selected[0]]);return et.createElement(qL,{type:"response",message:e.response})}i(T_,"Response");T_.displayName="Response";var be=pe(Te());function jL({conn:e}){let t=null;return"address"in e?t=be.createElement(be.Fragment,null,be.createElement("tr",null,be.createElement("td",null,"Address:"),be.createElement("td",null,e.address?.join(":"))),e.peername&&be.createElement("tr",null,be.createElement("td",null,"Resolved address:"),be.createElement("td",null,e.peername.join(":"))),e.sockname&&be.createElement("tr",null,be.createElement("td",null,"Source address:"),be.createElement("td",null,e.sockname.join(":")))):e.peername?.[0]&&(t=be.createElement(be.Fragment,null,be.createElement("tr",null,be.createElement("td",null,"Address:"),be.createElement("td",null,e.peername?.join(":"))))),be.createElement("table",{className:"connection-table"},be.createElement("tbody",null,t,e.sni?be.createElement("tr",null,be.createElement("td",null,be.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),be.createElement("td",null,e.sni)):null,e.alpn?be.createElement("tr",null,be.createElement("td",null,be.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),be.createElement("td",null,e.alpn)):null,e.tls_version?be.createElement("tr",null,be.createElement("td",null,"TLS Version:"),be.createElement("td",null,e.tls_version)):null,e.cipher?be.createElement("tr",null,be.createElement("td",null,"TLS Cipher:"),be.createElement("td",null,e.cipher)):null))}i(jL,"ConnectionInfo");function KL(e){return be.createElement("dl",{className:"cert-attributes"},e.map(([t,n])=>be.createElement(be.Fragment,{key:t},be.createElement("dt",null,t),be.createElement("dd",null,n))))}i(KL,"attrList");function Kz({flow:e}){let t=e.server_conn?.cert;return t?be.createElement(be.Fragment,null,be.createElement("h4",{key:"name"},"Server Certificate"),be.createElement("table",{className:"certificate-table"},be.createElement("tbody",null,be.createElement("tr",null,be.createElement("td",null,"Type"),be.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),be.createElement("tr",null,be.createElement("td",null,"SHA256 digest"),be.createElement("td",null,t.sha256)),be.createElement("tr",null,be.createElement("td",null,"Valid from"),be.createElement("td",null,Oo(t.notbefore,{milliseconds:!1}))),be.createElement("tr",null,be.createElement("td",null,"Valid to"),be.createElement("td",null,Oo(t.notafter,{milliseconds:!1}))),be.createElement("tr",null,be.createElement("td",null,"Subject Alternative Names"),be.createElement("td",null,t.altnames.join(", "))),be.createElement("tr",null,be.createElement("td",null,"Subject"),be.createElement("td",null,KL(t.subject))),be.createElement("tr",null,be.createElement("td",null,"Issuer"),be.createElement("td",null,KL(t.issuer))),be.createElement("tr",null,be.createElement("td",null,"Serial"),be.createElement("td",null,t.serial))))):be.createElement(be.Fragment,null)}i(Kz,"CertificateInfo");function R0({flow:e}){return be.createElement("section",{className:"detail"},be.createElement("h4",null,"Client Connection"),be.createElement(jL,{conn:e.client_conn}),e.server_conn?.address&&be.createElement(be.Fragment,null,be.createElement("h4",null,"Server Connection"),be.createElement(jL,{conn:e.server_conn})),be.createElement(Kz,{flow:e}))}i(R0,"Connection");R0.displayName="Connection";var Xm=pe(Te());function D0({flow:e}){return Xm.createElement("section",{className:"error"},Xm.createElement("div",{className:"alert alert-warning"},e.error.msg,Xm.createElement("div",null,Xm.createElement("small",null,Oo(e.error.timestamp)))))}i(D0,"Error");D0.displayName="Error";var Vs=pe(Te());function Gz({t:e,deltaTo:t,title:n}){return e?Vs.createElement("tr",null,Vs.createElement("td",null,n,":"),Vs.createElement("td",null,Oo(e),t&&Vs.createElement("span",{className:"text-muted"},"(",Fy(1e3*(e-t)),")"))):Vs.createElement("tr",null)}i(Gz,"TimeStamp");function I0({flow:e}){let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let n=[{title:"Server conn. initiated",t:e.server_conn?.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:e.server_conn?.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:e.server_conn?.timestamp_tls_setup,deltaTo:t},{title:"Server conn. closed",t:e.server_conn?.timestamp_end,deltaTo:t},{title:"Client conn. established",t:e.client_conn.timestamp_start,deltaTo:e.type==="http"?t:void 0},{title:"Client conn. TLS handshake",t:e.client_conn.timestamp_tls_setup,deltaTo:t},{title:"Client conn. closed",t:e.client_conn.timestamp_end,deltaTo:t}];return e.type==="http"&&n.push({title:"First request byte",t:e.request.timestamp_start},{title:"Request complete",t:e.request.timestamp_end,deltaTo:t},{title:"First response byte",t:e.response?.timestamp_start,deltaTo:t},{title:"Response complete",t:e.response?.timestamp_end,deltaTo:t}),Vs.createElement("section",{className:"timing"},Vs.createElement("h4",null,"Timing"),Vs.createElement("table",{className:"timing-table"},Vs.createElement("tbody",null,n.filter(s=>!!s.t).sort((s,l)=>s.t-l.t).map(({title:s,t:l,deltaTo:h})=>Vs.createElement(Gz,{key:s,title:s,t:l,deltaTo:h})))))}i(I0,"Timing");I0.displayName="Timing";var Xu=pe(Te());var Ea=pe(Te()),Tp=pe(Te());function Rf({flow:e,messages_meta:t}){let n=Be(),s=me(k=>k.ui.flow.contentViewFor[e.id+"messages"]||"Auto"),[l,h]=(0,Tp.useState)(me(k=>k.options.content_view_lines_cutoff)),d=(0,Tp.useCallback)(()=>h(Math.max(1024,l*2)),[l]),v=_0(On.getContentURL(e,"messages",s,l+1),e.id+t.count),S=(0,Tp.useMemo)(()=>{if(v)try{return JSON.parse(v)}catch{return[{description:"Network Error",lines:[[["error",`${v}`]]]}]}},[v])||[],b=l;return Ea.createElement("div",{className:"contentview"},Ea.createElement("div",{className:"controls"},Ea.createElement("h5",null,t.count," Messages"),Ea.createElement(Ym,{value:s,onChange:k=>n(Dy(e.id+"messages",k))})),S.map((k,R)=>{let I=`fa fa-fw fa-arrow-${k.from_client?"right text-primary":"left text-danger"}`,z=Ea.createElement("div",{key:R},Ea.createElement("small",null,Ea.createElement("i",{className:I}),Ea.createElement("span",{className:"pull-right"},k.timestamp&&Oo(k.timestamp))),Ea.createElement(b0,{lines:k.lines,maxLines:b,showMore:d}));return b-=k.lines.length,z}))}i(Rf,"Messages");function F0({flow:e}){return Xu.createElement("section",{className:"websocket"},Xu.createElement("h4",null,"WebSocket"),Xu.createElement(Rf,{flow:e,messages_meta:e.websocket.messages_meta}),Xu.createElement(Yz,{websocket:e.websocket}))}i(F0,"WebSocket");F0.displayName="WebSocket";function Yz({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return Xu.createElement("div",null,Xu.createElement("i",{className:"fa fa-fw fa-window-close text-muted"}),"\xA0 Closed by ",e.closed_by_client?"client":"server"," ","with code ",e.close_code," ",t,".",Xu.createElement("small",{className:"pull-right"},Oo(e.timestamp_end)))}i(Yz,"CloseSummary");var B0=pe(Te());function H0({flow:e}){let t=Be();return B0.createElement("section",{className:"timing"},B0.createElement("h4",null,"Comment"),B0.createElement(gt,{className:"kv-value",content:e.comment,onEditDone:n=>{t(si(e,{comment:n}))},placeholder:"empty"}))}i(H0,"Comment");H0.displayName="Comment";var YL=pe(ai());var k_=pe(Te());function z0({flow:e}){return k_.createElement("section",{className:"tcp"},k_.createElement(Rf,{flow:e,messages_meta:e.messages_meta}))}i(z0,"TcpMessages");z0.displayName="Stream Data";var N_=pe(Te());function U0({flow:e}){return N_.createElement("section",{className:"udp"},N_.createElement(Rf,{flow:e,messages_meta:e.messages_meta}))}i(U0,"UdpMessages");U0.displayName="Datagrams";var GL={request:C_,response:__,error:D0,connection:R0,timing:I0,websocket:F0,tcpmessages:z0,udpmessages:U0,dnsrequest:b_,dnsresponse:T_,comment:H0};function W0(e){let t;switch(e.type){case"http":t=["request","response","websocket"].filter(n=>e[n]);break;case"tcp":t=["tcpmessages"];break;case"udp":t=["udpmessages"];break;case"dns":t=["request","response"].filter(n=>e[n]).map(n=>"dns"+n);break}return e.error&&t.push("error"),t.push("connection"),t.push("timing"),t.push("comment"),t}i(W0,"tabsForFlow");function A_(){let e=Be(),t=me(h=>h.flows.byId[h.flows.selected[0]]),n=me(h=>h.ui.flow.tab);if(t==null)return ba.createElement(ba.Fragment,null);let s=W0(t);s.indexOf(n)<0&&(n==="response"&&t.error?n="error":n==="error"&&"response"in t?n="response":n=s[0]);let l=GL[n];return ba.createElement("div",{className:"flow-detail"},ba.createElement("nav",{className:"nav-tabs nav-tabs-sm"},ba.createElement("button",{"data-testid":"close-button-id",className:"close-button",onClick:()=>e(yl(void 0))},ba.createElement("i",{className:"fa fa-times-circle"})),s.map(h=>ba.createElement("a",{key:h,href:"#",className:(0,YL.default)({active:n===h}),onClick:d=>{d.preventDefault(),e(mf(h))}},GL[h].displayName))),ba.createElement(l,{flow:t}))}i(A_,"FlowView");function XL(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.key;return e.preventDefault(),(n,s)=>{let l=s().flows,h=l.byId[s().flows.selected[0]];switch(t){case"k":case"ArrowUp":n(yf(l,-1));break;case"j":case"ArrowDown":n(yf(l,1));break;case" ":case"PageDown":n(yf(l,10));break;case"PageUp":n(yf(l,-10));break;case"End":n(yf(l,1e10));break;case"Home":n(yf(l,-1e10));break;case"Escape":s().ui.modal.activeModal?n(Xy()):n(yl(void 0));break;case"ArrowLeft":{if(!h)break;let d=W0(h),v=s().ui.flow.tab,S=d[(Math.max(0,d.indexOf(v))-1+d.length)%d.length];n(mf(S));break}case"Tab":case"ArrowRight":{if(!h)break;let d=W0(h),v=s().ui.flow.tab,S=d[(Math.max(0,d.indexOf(v))+1)%d.length];n(mf(S));break}case"Delete":case"d":{if(!h)return;n(qy(h));break}case"n":{gf("view.flows.create","get","https://example.com/");break}case"D":{if(!h)return;n(jy(h));break}case"a":{h&&h.intercepted&&n(lp(h));break}case"A":{n($y());break}case"r":{h&&n(up(h));break}case"v":{h&&h.modified&&n(Ky(h));break}case"x":{h&&h.intercepted&&n(Vy(h));break}case"X":{n(UA());break}case"z":{n(Gy());break}default:return}}}i(XL,"onKeyDown");var Ta=pe(Te());var kp=pe(Te()),QL=pe(ai());var Qm=class extends kp.Component{constructor(n,s){super(n,s);this.node=kp.default.createRef();this.state={applied:!1,startPos:0,dragPointer:.1},this.onLostPointerCapture=this.onLostPointerCapture.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}static{i(this,"Splitter")}static{this.defaultProps={axis:"x"}}onPointerDown(n){this.state.dragPointer===.1&&(n.target.setPointerCapture(n.pointerId),this.setState({startPos:this.props.axis==="x"?n.pageX:n.pageY,dragPointer:n.pointerId}))}onLostPointerCapture(n){if(this.state.dragPointer!==n.pointerId)return;let s=this.node.current,l=s.previousElementSibling,h=s.nextElementSibling;s.style.transform="",l.style.flex=`0 0 ${Math.max(0,(this.props.axis==="x"?l.offsetWidth+n.pageX:l.offsetHeight+n.pageY)-this.state.startPos)}px`,h.style.flex="1 1 auto",this.setState({applied:!0,dragPointer:.1}),this.onResize()}onPointerMove(n){this.state.dragPointer===n.pointerId&&(this.node.current.style.transform=this.props.axis==="x"?`translateX(${n.pageX-this.state.startPos}px)`:`translateY(${n.pageY-this.state.startPos}px)`)}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(n){this.state.applied&&(this.node.current?.previousElementSibling instanceof HTMLElement&&(this.node.current.previousElementSibling.style.flex=""),this.node.current?.nextElementSibling instanceof HTMLElement&&(this.node.current.nextElementSibling.style.flex=""),n||this.setState({applied:!1}),this.onResize())}componentWillUnmount(){this.reset(!0)}render(){return kp.default.createElement("div",{ref:this.node,className:(0,QL.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},kp.default.createElement("div",{onLostPointerCapture:this.onLostPointerCapture,onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove}))}};var Qi=pe(Te());var Jm=i(e=>{let t=e.current;return t===null||t.scrollTop===0?!1:Math.ceil(t.scrollTop)+t.clientHeight>=t.scrollHeight},"isAtBottom"),$0=i(e=>{e.current&&!Jm(e)&&(e.current.scrollTop=e.current.scrollHeight)},"adjustScrollTop");function Df(e=void 0){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:n,viewportTop:s,viewportHeight:l,itemHeights:h}=e,d=s+l,v=0,S=0,b=0,k=0;if(h){let R=0;for(let I=0;I0&&RU_,default:()=>Qz,icon:()=>O_,index:()=>M_,method:()=>D_,path:()=>R_,quickactions:()=>If,size:()=>B_,status:()=>F_,time:()=>H_,timestamp:()=>z_,tls:()=>L_,version:()=>I_});var Jt=pe(Te());var P_=pe(ai());var L_=i(({flow:e})=>Jt.default.createElement("td",{className:(0,P_.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");L_.headerName="";var M_=i(({flow:e})=>{let t=me(n=>n.flows.listIndex[e.id]);return Jt.default.createElement("td",{className:"col-index"},t+1)},"index");M_.headerName="#";var O_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-icon"},Jt.default.createElement("div",{className:(0,P_.default)("resource-icon",Wx(e))})),"icon");O_.headerName="";var R_=i(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=Jt.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=Jt.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),Jt.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&Jt.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&Jt.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,Jt.default.createElement("span",{className:"marker pull-right"},e.marked),$x(e))},"path");R_.headerName="Path";var D_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-method"},qx(e)),"method");D_.headerName="Method";var I_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-http-version"},jx(e)),"version");I_.headerName="Version";var F_=i(({flow:e})=>{let t="darkred";return e.type!=="http"&&e.type!="dns"||!e.response?Jt.default.createElement("td",{className:"col-status"}):(100<=e.response.status_code&&e.response.status_code<200?t="green":200<=e.response.status_code&&e.response.status_code<300?t="darkgreen":300<=e.response.status_code&&e.response.status_code<400?t="lightblue":(400<=e.response.status_code&&e.response.status_code<500||500<=e.response.status_code&&e.response.status_code<600)&&(t="red"),Jt.default.createElement("td",{className:"col-status",style:{color:t}},Vx(e)))},"status");F_.headerName="Status";var B_=i(({flow:e})=>Jt.default.createElement("td",{className:"col-size"},Iy(Ux(e))),"size");B_.headerName="Size";var H_=i(({flow:e})=>{let t=Pm(e),n=zx(e);return Jt.default.createElement("td",{className:"col-time"},t&&n?Fy(1e3*(n-t)):"...")},"time");H_.headerName="Time";var z_=i(({flow:e})=>{let t=Pm(e);return Jt.default.createElement("td",{className:"col-timestamp"},t?Oo(t):"...")},"timestamp");z_.headerName="Start time";var If=i(({flow:e})=>{let t=Be(),n=null;return e.intercepted?n=Jt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(lp(e))},Jt.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):zy(e)&&(n=Jt.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(up(e))},Jt.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"}))),Jt.default.createElement("td",{className:"col-quickactions"},n?Jt.default.createElement("div",null,n):Jt.default.createElement(Jt.default.Fragment,null))},"quickactions");If.headerName="";var U_=i(({flow:e})=>{let t=e.comment;return Jt.default.createElement("td",{className:"col-comment"},t)},"comment");U_.headerName="Comment";var Xz={icon:O_,index:M_,method:D_,version:I_,path:R_,quickactions:If,size:B_,status:F_,time:H_,timestamp:z_,tls:L_,comment:U_},Qz=Xz;var eM=eg.memo(i(function(){let t=Be(),n=me(v=>v.flows.sort.desc),s=me(v=>v.flows.sort.column),l=me(v=>v.options.web_columns),h=n?"sort-desc":"sort-asc",d=l.map(v=>Zm[v]).filter(v=>v).concat(If);return eg.createElement("tr",null,d.map(v=>eg.createElement("th",{className:(0,ZL.default)(`col-${v.name}`,s===v.name&&h),key:v.name,onClick:()=>t(zA(v.name===s&&n?void 0:v.name,v.name!==s?!1:!n))},v.headerName)))},"FlowTableHead"));var Np=pe(Te()),tM=pe(ai());var rM=Np.default.memo(i(function({flow:t,selected:n,highlighted:s}){let l=Be(),h=me(b=>b.options.web_columns),d=(0,tM.default)({selected:n,highlighted:s,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),v=(0,Np.useCallback)(b=>{let k=b.target;for(;k.parentNode;){if(k.classList.contains("col-quickactions"))return;k=k.parentNode}l(yl(t.id))},[t]),S=h.map(b=>Zm[b]).filter(b=>b).concat(If);return Np.default.createElement("tr",{className:d,onClick:v},S.map(b=>Np.default.createElement(b,{key:b.name,flow:t})))},"FlowRow"));var W_=class extends Qi.Component{constructor(n,s){super(n,s);this.viewport=Qi.createRef();this.head=Qi.createRef();this.state={vScroll:Df(),viewportTop:0},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"PureFlowTable")}static{this.defaultProps={rowHeight:32}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Jm(this.viewport)}componentDidUpdate(n,s,l){if(l&&$0(this.viewport),this.onViewportUpdate(),this.props.selected&&this.props.selected!==n.selected){let{rowHeight:d,flows:v,selected:S}=this.props,b=this.viewport.current,k=this.head.current,R=k?k.offsetHeight:0,I=v.indexOf(S)*d+R,z=I+d,q=b.scrollTop,Q=b.offsetHeight;I-Rq+Q&&(b.scrollTop=z-Q),this.onViewportUpdate()}}onViewportUpdate(){let n=this.viewport.current,s=n.scrollTop||0,l=Df({viewportTop:s,viewportHeight:n.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});if(this.state.viewportTop!==s||!Mo(this.state.vScroll,l)){let h=Math.min(s,l.end*this.props.rowHeight);this.setState({vScroll:l,viewportTop:h})}}render(){let{vScroll:n,viewportTop:s}=this.state,{flows:l,selected:h,highlight:d}=this.props,v=d?vf.parse(d):()=>!1;return Qi.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate,ref:this.viewport},Qi.createElement("table",null,Qi.createElement("thead",{ref:this.head,style:{transform:`translateY(${s}px)`}},Qi.createElement(eM,null)),Qi.createElement("tbody",null,Qi.createElement("tr",{style:{height:n.paddingTop}}),l.slice(n.start,n.end).map(S=>Qi.createElement(rM,{key:S.id,flow:S,selected:S===h,highlighted:v(S)})),Qi.createElement("tr",{style:{height:n.paddingBottom}}))))}},nM=Wu(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(W_);var an=pe(Te()),tw=pe(Te());var sO=pe(oO());function dE(){return an.createElement("div",{style:{padding:"1em 2em"}},an.createElement("h3",null,"mitmproxy is running."),an.createElement("p",null,"No flows have been recorded yet.",an.createElement("br",null),"To start capturing traffic, please configure your settings in the Capture tab."))}i(dE,"CaptureSetup");function jU({description:e,listen_addrs:t,is_running:n,wireguard_conf:s,type:l}){let h=(0,tw.useRef)(null);(0,tw.useEffect)(()=>{s&&h.current&&sO.default.toCanvas(h.current,s,{margin:0,scale:3})},[s]);let d,v=t.length===1||t.length===2&&t[0][1]===t[1][1],S=t.every(k=>["::","0.0.0.0"].includes(k[0]));v&&S?d=Tx(["*",t[0][1]]):d=t.map(Tx).join(" and "),e=e[0].toUpperCase()+e.substr(1);let b;return n?b=an.createElement(an.Fragment,null,l==="local"?an.createElement("div",{className:"text-success"},e," is active."):an.createElement("div",{className:"text-success"},e," listening at ",d,"."),s&&an.createElement("div",{className:"wireguard-config"},an.createElement("pre",null,s),an.createElement("canvas",{ref:h}))):b=an.createElement(an.Fragment,null,an.createElement("div",{className:"text-warning"},e," starting...")),an.createElement("div",null,b)}i(jU,"ServerDescription");function ui({error:e,backendState:t}){return an.createElement("div",{className:"mode-status"},e?an.createElement("div",{className:"text-danger"},e):t&&an.createElement(jU,{...t}))}i(ui,"ServerStatus");var In=pe(Te());var Ai=pe(Te());var Rp=pe(Te());function ci({value:e,onChange:t,children:n,label:s}){let l=Rp.useId();return Rp.createElement("div",{className:"mode-entry"},Rp.createElement("input",{type:"checkbox",name:`mode-checkbox-${l}`,id:`mode-checkbox-${l}`,checked:e,onChange:t}),Rp.createElement("label",{htmlFor:`mode-checkbox-${l}`,style:{marginBottom:0,fontWeight:"normal"}},s),n)}i(ci,"ModeToggle");var ln=pe(Te());var Fo=pe(Te());function fi({children:e,iconClass:t,classname:n,isVisible:s}){let l=Fo.useId(),h="--"+[...l].map(S=>S.charCodeAt(0).toString(16)).join(""),d=Fo.useRef(null),v=Fo.useRef(null);return Fo.useEffect(()=>{d.current.style.anchorName=h,v.current.style.positionAnchor=h},[]),Fo.useEffect(()=>{s===!0&&document.getElementById(l)?.showPopover()},[s]),Fo.createElement("div",{className:n?`mode-popover ${n}`:"mode-popover"},Fo.createElement("button",{popovertarget:l,ref:d},Fo.createElement("i",{className:t,"aria-hidden":"true"})),Fo.createElement("div",{id:l,popover:"auto",ref:v},e))}i(fi,"Popover");function pE({server:e}){let{currentProcesses:t,isLoading:n}=me(D=>D.processes),{selectedProcesses:s}=me(D=>D.modes.local[0]),[l,h]=ln.useState([]),[d,v]=ln.useState(""),S=Be(),{platform:b}=me(D=>D.backendState),k=i(D=>{v(D.target.value)},"handleInputChange"),R=i(D=>{let L=b.startsWith("win32")?"\\":"/";return Tm(D.executable,L)[1]},"extractProcessName"),I=i(D=>{if(z(D)&&s){let B=s.split(", ").filter(j=>j!==R(D)).join(", ");S(yp({server:e,value:B}));return}let L=s?`${s}, ${R(D)}`:R(D);S(yp({server:e,value:L}))},"handleApplicationClick"),z=i(D=>{let L=R(D);return s?.includes(L)},"isSelected");ln.useEffect(()=>{t.length===0&&S(Cf())},[]),ln.useEffect(()=>{if(d){let D=t.filter(L=>R(L).toLowerCase().includes(d.toLowerCase()));h(D)}else l!==t&&h(t)},[d,t]);let q=i(D=>{D.stopPropagation()},"handleInputKeyDown"),[Q,ne]=ln.useState(!1);return ln.createElement("div",{className:"local-dropdown"},ln.createElement("div",{className:"dropdown-header"},ln.createElement("input",{type:"text",className:"autocomplete-input",placeholder:s&&s?.length>0?"Add more":"(all applications)",value:d,onChange:k,onKeyDown:q,onClick:()=>ne(!0),onBlur:()=>ne(!1)}),ln.createElement(fi,{iconClass:"fa fa-chevron-down",classname:"local-popover",isVisible:Q},ln.createElement("h4",null,"Current Applications running on machine"),n?ln.createElement("i",{className:"fa fa-spinner","aria-hidden":"true"}):l.length>0?ln.createElement("ul",{className:"dropdown-list"},l.map((D,L)=>ln.createElement("li",{key:L,className:`dropdown-item ${z(D)?"selected":""}`,onClick:()=>I(D),role:"menuitem"},ln.createElement("div",{className:"process-details"},ln.createElement("img",{className:"process-icon",src:`./executable-icon?path=${D.executable}`,loading:"lazy"}),ln.createElement("span",{className:"process-name"},R(D)))))):ln.createElement("span",null,"No results"))))}i(pE,"LocalDropdown");function hE(){let e=me(s=>s.modes.local),t=me(s=>s.backendState.servers),n=e.map(s=>Ai.createElement(KU,{key:s.ui_id,server:s,backendState:t[h0(s)]}));return Ai.createElement("div",null,Ai.createElement("h4",{className:"mode-title"},"Local Applications"),Ai.createElement("p",{className:"mode-description"},"Transparently Intercept local application(s)."),n)}i(hE,"Local");function KU({server:e,backendState:t}){let n=Be(),s=me(d=>d.processes.error),l=e.error||t?.last_exception||s||void 0,h=i(d=>{let v=e.selectedProcesses?.split(", ").filter(S=>S!==d).join(", ");n(yp({server:e,value:v}))},"handleDeletionProcess");return Ai.createElement("div",{className:"mode-local"},Ai.createElement(ci,{value:e.active,label:"Intercept traffic for",onChange:()=>n(MC({server:e,value:!e.active}))},Ai.createElement("div",{className:"processes-container"},Ai.createElement("div",{className:"selected-processes"},e.selectedProcesses?.split(", ").filter(d=>d.trim()!=="").map(d=>Ai.createElement("div",{key:d,className:"selected-process"},d,Ai.createElement("i",{className:"fa fa-times","aria-hidden":"true",onClick:()=>h(d)})))),Ai.createElement("div",{className:"dropdown-container"},Ai.createElement(pE,{server:e}),Ai.createElement("i",{className:"fa fa-refresh","aria-hidden":"true",onClick:()=>n(Cf())})))),Ai.createElement(ui,{error:l,backendState:t}))}i(KU,"LocalRow");var Ji=pe(Te());function mE(){let e=me(s=>s.modes.regular),t=me(s=>s.backendState.servers),n=e.map(s=>Ji.createElement(GU,{key:s.ui_id,server:s,backendState:t[p0(s)]}));return Ji.createElement("div",null,Ji.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy"),Ji.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use an HTTP(S) proxy."),n)}i(mE,"Regular");function GU({server:e,backendState:t}){let n=Be(),s=e.error||t?.last_exception||void 0;return Ji.createElement("div",null,Ji.createElement(ci,{value:e.active,label:"Run HTTP/S Proxy",onChange:()=>n(AC({server:e,value:!e.active}))},Ji.createElement(fi,{iconClass:"fa fa-cog"},Ji.createElement("h4",null,"Advanced Configuration"),Ji.createElement("p",null,"Listen Host"),Ji.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(PC({server:e,value:l}))}),Ji.createElement("p",null,"Listen Port"),Ji.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(LC({server:e,value:parseInt(l)}))}))),Ji.createElement(ui,{error:s,backendState:t}))}i(GU,"RegularRow");var di=pe(Te());function gE(){let e=me(s=>s.modes.wireguard),t=me(s=>s.backendState.servers),n=e.map(s=>di.createElement(YU,{key:s.ui_id,server:s,backendState:t[m0(s)]}));return di.createElement("div",null,di.createElement("h4",{className:"mode-title"},"WireGuard Server"),di.createElement("p",{className:"mode-description"},"Start a WireGuard\u2122 server and connect an external device for transparent proxying."),n)}i(gE,"Wireguard");function YU({server:e,backendState:t}){let n=Be(),s=e.error||t?.last_exception||void 0;return di.createElement("div",null,di.createElement(ci,{value:e.active,label:"Run WireGuard Server",onChange:()=>n(OC({server:e,value:!e.active}))},di.createElement(fi,{iconClass:"fa fa-cog"},di.createElement("h4",null,"Advanced Configuration"),di.createElement("p",null,"Listen Host"),di.createElement(gt,{className:"mode-input",content:e.listen_host||"",placeholder:"(all interfaces)",onEditDone:l=>n(RC({server:e,value:l}))}),di.createElement("p",null,"Listen Port"),di.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"51820",onEditDone:l=>n(DC({server:e,value:parseInt(l)}))}),di.createElement("p",null,"Configuration File"),di.createElement(gt,{className:"mode-input",content:e.file_path||"",placeholder:"~/.mitmproxy/wireguard.conf",onEditDone:l=>n(IC({server:e,value:l}))}))),di.createElement(ui,{error:s,backendState:t}))}i(YU,"WireGuardRow");var jr=pe(Te());function vE(){let e=Be(),t=me(s=>s.modes.reverse),n=me(s=>s.backendState.servers);return jr.createElement("div",null,jr.createElement("h4",{className:"mode-title"},"Reverse Proxy"),jr.createElement("p",{className:"mode-description"},"Requests are forwarded to a preconfigured destination."),jr.createElement("div",{className:"mode-reverse-servers"},t.map((s,l)=>jr.createElement(XU,{key:s.ui_id,removable:l>0,server:s,backendState:n[vp(s)]})),jr.createElement("div",{className:"mode-reverse-add-server",onClick:()=>e(ZP())},jr.createElement("i",{className:"fa fa-plus-square-o","aria-hidden":"true"}),"Add additional server")))}i(vE,"Reverse");function XU({removable:e,server:t,backendState:n}){let s=Be(),l=Object.values(g0),h=i(async()=>{t.active&&await s(C0({server:t,value:!1})).unwrap(),await s(eL(t))},"deleteServer"),d=t.error||n?.last_exception||void 0;return jr.createElement("div",null,jr.createElement(ci,{value:t.active,label:"Forward",onChange:()=>{s(C0({server:t,value:!t.active}))}},jr.createElement("select",{name:"protocols",className:"mode-reverse-dropdown",value:t.protocol,onChange:v=>{s(HC({server:t,value:v.target.value}))}},l.map(v=>jr.createElement("option",{key:v,value:v},v))),"traffic to",jr.createElement(gt,{className:"mode-reverse-input",content:t.destination?.toString()||"",onEditDone:v=>s(zC({server:t,value:v})),placeholder:"example.com"}),jr.createElement(fi,{iconClass:"fa fa-cog"},jr.createElement("h4",null,"Advanced Configuration"),jr.createElement("p",null,"Listen Host"),jr.createElement(gt,{className:"mode-reverse-input",content:t.listen_host||"",onEditDone:v=>s(FC({server:t,value:v})),placeholder:"*"}),jr.createElement("p",null,"Listen Port"),jr.createElement(gt,{className:"mode-reverse-input",content:String(t.listen_port||""),onEditDone:v=>s(BC({server:t,value:v})),placeholder:"8080"})),e&&jr.createElement("i",{className:"fa fa-fw fa-trash fa-lg","aria-hidden":"true",onClick:h})),jr.createElement(ui,{error:d,backendState:n}))}i(XU,"ReverseToggleRow");var Pi=pe(Te());function yE(){let e=me(s=>s.modes.transparent),t=me(s=>s.backendState.servers),n=e.map(s=>Pi.createElement(QU,{key:s.ui_id,server:s,backendState:t[y0(s)]}));return Pi.createElement("div",null,Pi.createElement("h4",{className:"mode-title"},"Transparent Proxy"),Pi.createElement("p",{className:"mode-description"},"You"," ",Pi.createElement("a",{href:"https://docs.mitmproxy.org/stable/howto-transparent/",style:{textDecoration:"underline",color:"inherit"}},"configure your routing table")," ","to send traffic through mitmproxy."),n)}i(yE,"Transparent");function QU({server:e,backendState:t}){let n=Be(),s=e.error||t?.last_exception||void 0;return Pi.createElement("div",null,Pi.createElement(ci,{value:e.active,label:"Run Transparent Proxy",onChange:()=>n(UC({server:e,value:!e.active}))},Pi.createElement(fi,{iconClass:"fa fa-cog"},Pi.createElement("h4",null,"Advanced Configuration"),Pi.createElement("p",null,"Listen Host"),Pi.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(WC({server:e,value:l}))}),Pi.createElement("p",null,"Listen Port"),Pi.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n($C({server:e,value:parseInt(l)}))}))),Pi.createElement(ui,{error:s,backendState:t}))}i(QU,"TransparentRow");var Zi=pe(Te());function wE(){let e=me(s=>s.modes.socks),t=me(s=>s.backendState.servers),n=e.map(s=>Zi.createElement(JU,{key:s.ui_id,server:s,backendState:t[w0(s)]}));return Zi.createElement("div",null,Zi.createElement("h4",{className:"mode-title"},"SOCKS Proxy"),Zi.createElement("p",{className:"mode-description"},"You manually configure your client application or device to use a SOCKSv5 proxy."),n)}i(wE,"Socks");function JU({server:e,backendState:t}){let n=Be(),s=e.error||t?.last_exception||void 0;return Zi.createElement("div",null,Zi.createElement(ci,{value:e.active,label:"Run SOCKS Proxy",onChange:()=>n(VC({server:e,value:!e.active}))},Zi.createElement(fi,{iconClass:"fa fa-cog"},Zi.createElement("h4",null,"Advanced Configuration"),Zi.createElement("p",null,"Listen Host"),Zi.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(qC({server:e,value:l}))}),Zi.createElement("p",null,"Listen Port"),Zi.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(jC({server:e,value:parseInt(l)}))}))),Zi.createElement(ui,{error:s,backendState:t}))}i(JU,"SocksRow");var Li=pe(Te());function SE(){let e=me(s=>s.modes.upstream),t=me(s=>s.backendState.servers),n=e.map(s=>Li.createElement(ZU,{key:s.ui_id,server:s,backendState:t[S0(s)]}));return Li.createElement("div",null,Li.createElement("h4",{className:"mode-title"},"Explicit HTTP(S) Proxy (With Upstream Proxy)"),Li.createElement("p",{className:"mode-description"},"All requests are forwarded to a second HTTP(S) proxy server."),n)}i(SE,"Upstream");function ZU({server:e,backendState:t}){let n=Be(),s=e.error||t?.last_exception||void 0;return Li.createElement("div",null,Li.createElement(ci,{value:e.active,label:"Run HTTP/S Proxy and forward requests to",onChange:()=>{n(KC({server:e,value:!e.active}))}},Li.createElement(gt,{className:"mode-upstream-input",content:e.destination?.toString()||"",onEditDone:l=>n(XC({server:e,value:l})),placeholder:"http://example.com:8080"}),Li.createElement(fi,{iconClass:"fa fa-cog"},Li.createElement("h4",null,"Advanced Configuration"),Li.createElement("p",null,"Listen Host"),Li.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(GC({server:e,value:l}))}),Li.createElement("p",null,"Listen Port"),Li.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(YC({server:e,value:parseInt(l)}))}))),Li.createElement(ui,{error:s,backendState:t}))}i(ZU,"UpstreamRow");var eo=pe(Te());function xE(){let e=me(s=>s.modes.dns),t=me(s=>s.backendState.servers),n=e.map(s=>eo.createElement(eW,{key:s.ui_id,server:s,backendState:t[x0(s)]}));return eo.createElement("div",null,eo.createElement("h4",{className:"mode-title"},"DNS Server"),eo.createElement("p",{className:"mode-description"},"A recursive DNS resolver using the host's DNS configuration."),n)}i(xE,"Dns");function eW({server:e,backendState:t}){let n=Be(),s=e.error||t?.last_exception||void 0;return eo.createElement("div",null,eo.createElement(ci,{value:e.active,label:"Run DNS Server",onChange:()=>n(QC({server:e,value:!e.active}))},eo.createElement(fi,{iconClass:"fa fa-cog"},eo.createElement("h4",null,"Advanced Configuration"),eo.createElement("p",null,"Listen Host"),eo.createElement(gt,{className:"mode-input",content:e.listen_host||"",onEditDone:l=>n(JC({server:e,value:l}))}),eo.createElement("p",null,"Listen Port"),eo.createElement(gt,{className:"mode-input",content:e.listen_port?e.listen_port.toString():"",placeholder:"8080",onEditDone:l=>n(ZC({server:e,value:parseInt(l)}))}))),eo.createElement(ui,{error:s,backendState:t}))}i(eW,"DnsRow");function CE(){let e=me(t=>t.backendState.platform);return In.createElement("div",{className:"modes"},In.createElement("h2",null,"Intercept Traffic"),In.createElement("p",null,"Configure how you want to intercept traffic with mitmproxy."),In.createElement("div",{className:"modes-category green-left-border"},In.createElement("h3",null,"Recommended"),In.createElement("div",{className:"modes-container"},In.createElement(mE,null),e.startsWith("linux")?void 0:In.createElement(hE,null),In.createElement(gE,null),In.createElement(vE,null))),In.createElement("div",{className:"modes-category gray-left-border"},In.createElement("h3",null,"Advanced"),In.createElement("div",{className:"modes-container"},In.createElement(wE,null),In.createElement(SE,null),In.createElement(xE,null),e.startsWith("win32")?void 0:In.createElement(yE,null))))}i(CE,"Modes");function _E(){let e=me(s=>!!s.flows.byId[s.flows.selected[0]]),t=me(s=>s.flows.list.length>0),n=me(s=>s.ui.tabs.current);return Ta.createElement("div",{className:"main-view"},n===0?Ta.createElement(CE,null):Ta.createElement(Ta.Fragment,null,t?Ta.createElement(nM,null):Ta.createElement(dE,null),e&&Ta.createElement(Qm,{key:"splitter"}),e&&Ta.createElement(A_,{key:"flowDetails"})))}i(_E,"MainView");var to=pe(Te()),pO=pe(ai());var Qn=pe(Te());var rw=pe(Te());function hs({children:e}){return window.MITMWEB_STATIC?null:rw.createElement(rw.Fragment,null,e)}i(hs,"HideInStatic");var aO=Qn.memo(i(function(){let t=Be(),n=me(s=>s.flows.filter);return Qn.createElement(Yu,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},Qn.createElement("li",null,Qn.createElement(E0,{icon:"fa-folder-open",text:"\xA0Open...",onClick:s=>s.stopPropagation(),onOpenFile:s=>{t($A(s)),document.body.click()}})),Qn.createElement(li,{onClick:()=>location.replace("/flows/dump")},Qn.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save"),Qn.createElement(li,{onClick:()=>location.replace("/flows/dump?filter="+n)},Qn.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save filtered"),Qn.createElement(li,{onClick:()=>confirm("Delete all flows?")&&t(Gy())},Qn.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),Qn.createElement(hs,null,Qn.createElement($L,null),Qn.createElement("li",null,Qn.createElement("a",{href:"http://mitm.it/",target:"_blank",rel:"noreferrer"},Qn.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var tc=pe(Te());var lO=tc.memo(i(function(){let t=me(s=>s.connection.state),n=me(s=>s.connection.message);switch(t){case"CONNECTION_INIT":return tc.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case"CONNECTION_FETCHING":return tc.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case"CONNECTION_ESTABLISHED":return tc.createElement("span",{className:"connection-indicator established"},"connected");case"CONNECTION_ERROR":return tc.createElement("span",{className:"connection-indicator error",title:n},"connection lost");case"CONNECTION_OFFLINE":return tc.createElement("span",{className:"connection-indicator offline"},"offline")}},"ConnectionIndicator"));var nw=pe(Te());iw.title="Capture";function iw(){return nw.createElement(nw.Fragment,null)}i(iw,"CaptureMenu");var pi=pe(Te());var ms=pe(Te()),uO=pe(ai());var Bo=pe(Te());var ug=class e extends Bo.Component{static{i(this,"FilterDocs")}constructor(t,n){super(t,n),this.state={doc:e.doc}}componentDidMount(){e.xhr||(e.xhr=xt("/filter-help").then(t=>t.json()),e.xhr.catch(()=>{e.xhr=null})),this.state.doc||e.xhr.then(t=>{e.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?Bo.default.createElement("table",{className:"table table-condensed"},Bo.default.createElement("tbody",null,t.commands.map(n=>Bo.default.createElement("tr",{key:n[1],onClick:()=>this.props.selectHandler(n[0].split(" ")[0]+" ")},Bo.default.createElement("td",null,n[0].replace(" ","\xA0")),Bo.default.createElement("td",null,n[1]))),Bo.default.createElement("tr",{key:"docs-link"},Bo.default.createElement("td",{colSpan:2},Bo.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank",rel:"noreferrer"},Bo.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):Bo.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};var Uf=class extends ms.Component{constructor(n,s){super(n,s);this.inputRef=ms.default.createRef();this.state={value:this.props.value,focus:!1,mousefocus:!1},this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.selectFilter=this.selectFilter.bind(this)}static{i(this,"FilterInput")}UNSAFE_componentWillReceiveProps(n){this.setState({value:n.value})}isValid(n){try{return n&&vf.parse(n),!0}catch{return!1}}getDesc(){if(!this.state.value)return ms.default.createElement(ug,{selectHandler:this.selectFilter});try{return vf.parse(this.state.value).desc}catch(n){return""+n}}onChange(n){let s=n.target.value;this.setState({value:s}),this.isValid(s)&&this.props.onChange(s)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(n){(n.key==="Escape"||n.key==="Enter")&&(this.blur(),this.setState({mousefocus:!1})),n.stopPropagation()}selectFilter(n){this.setState({value:n}),this.inputRef.current?.focus()}blur(){this.inputRef.current?.blur()}select(){this.inputRef.current?.select()}render(){let{type:n,color:s,placeholder:l}=this.props,{value:h,focus:d,mousefocus:v}=this.state;return ms.default.createElement("div",{className:(0,uO.default)("filter-input input-group",{"has-error":!this.isValid(h)})},ms.default.createElement("span",{className:"input-group-addon"},ms.default.createElement("i",{className:"fa fa-fw fa-"+n,style:{color:s}})),ms.default.createElement("input",{type:"text",ref:this.inputRef,placeholder:l,className:"form-control",value:h,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(d||v)&&ms.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},ms.default.createElement("div",{className:"arrow"}),ms.default.createElement("div",{className:"popover-content"},this.getDesc())))}};ow.title="Flow List";function ow(){return pi.createElement("div",{className:"main-menu"},pi.createElement("div",{className:"menu-group"},pi.createElement("div",{className:"menu-content"},pi.createElement(nW,null),pi.createElement(iW,null)),pi.createElement("div",{className:"menu-legend"},"Find")),pi.createElement("div",{className:"menu-group"},pi.createElement("div",{className:"menu-content"},pi.createElement(rW,null),pi.createElement(oW,null)),pi.createElement("div",{className:"menu-legend"},"Intercept")))}i(ow,"FlowListMenu");function rW(){let e=Be(),t=me(n=>n.options.intercept);return pi.createElement(Uf,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:n=>e(gp("intercept",n))})}i(rW,"InterceptInput");function nW(){let e=Be(),t=me(n=>n.flows.filter);return pi.createElement(Uf,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:n=>e(Uy(n))})}i(nW,"FlowFilterInput");function iW(){let e=Be(),t=me(n=>n.flows.highlight);return pi.createElement(Uf,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:n=>e(Wy(n))})}i(iW,"HighlightInput");function oW(){let e=Be();return pi.createElement(Or,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e($y())},"Resume All")}i(oW,"ResumeAll");var un=pe(Te());var Wf=pe(Te());function EE({value:e,onChange:t,children:n}){return Wf.createElement("div",{className:"menu-entry"},Wf.createElement("label",null,Wf.createElement("input",{type:"checkbox",checked:e,onChange:t}),n))}i(EE,"MenuToggle");function sw({name:e,children:t}){let n=Be(),s=me(l=>l.options[e]);return Wf.createElement(EE,{value:!!s,onChange:()=>n(gp(e,!s))},t)}i(sw,"OptionsToggle");function cO(){let e=Be(),t=me(n=>n.eventLog.visible);return Wf.createElement(EE,{value:t,onChange:()=>e(mp())},"Display Event Log")}i(cO,"EventlogToggle");function fO(){let e=Be(),t=me(n=>n.commandBar.visible);return Wf.createElement(EE,{value:t,onChange:()=>e(f0())},"Display Command Bar")}i(fO,"CommandBarToggle");var bE=pe(Te());function TE({children:e,resource:t}){let n=`https://docs.mitmproxy.org/stable/${t}`;return bE.createElement("a",{target:"_blank",href:n,rel:"noreferrer"},e||bE.createElement("i",{className:"fa fa-question-circle"}))}i(TE,"DocsLink");aw.title="Options";function aw(){let e=Be(),t=i(()=>qA("OptionModal"),"openOptions");return un.createElement("div",null,un.createElement(hs,null,un.createElement("div",{className:"menu-group"},un.createElement("div",{className:"menu-content"},un.createElement(Or,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",un.createElement("sup",null,"alpha"))),un.createElement("div",{className:"menu-legend"},"Options Editor")),un.createElement("div",{className:"menu-group"},un.createElement("div",{className:"menu-content"},un.createElement(sw,{name:"anticache"},"Strip cache headers"," ",un.createElement(TE,{resource:"overview-features/#anticache"})),un.createElement(sw,{name:"showhost"},"Use host header for display"),un.createElement(sw,{name:"ssl_insecure"},"Don't verify server certificates")),un.createElement("div",{className:"menu-legend"},"Quick Options"))),un.createElement("div",{className:"menu-group"},un.createElement("div",{className:"menu-content"},un.createElement(cO,null),un.createElement(fO,null)),un.createElement("div",{className:"menu-legend"},"View Options")))}i(aw,"OptionMenu");var ft=pe(Te());var Dp=i(async(e,t)=>{let n=(async()=>{let s=await gf("export",t,`@${e.id}`);if(s.value)return s.value;throw s.error?s.error:s})();try{await AA(n)}catch(s){alert(s)}},"copy");uw.title="Flow";function uw(){let e=Be(),t=me(n=>n.flows.byId[n.flows.selected[0]]);return t?ft.createElement("div",{className:"flow-menu"},ft.createElement(hs,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Or,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(up(t)),disabled:!zy(t)},"Replay"),ft.createElement(Or,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(jy(t))},"Duplicate"),ft.createElement(Or,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(Ky(t))},"Revert"),ft.createElement(Or,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(qy(t))},"Delete"),ft.createElement(uW,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Flow Modification"))),ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(sW,{flow:t}),ft.createElement(aW,{flow:t})),ft.createElement("div",{className:"menu-legend"},"Export")),ft.createElement(hs,null,ft.createElement("div",{className:"menu-group"},ft.createElement("div",{className:"menu-content"},ft.createElement(Or,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(lp(t))},"Resume"),ft.createElement(Or,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(Vy(t))},"Abort")),ft.createElement("div",{className:"menu-legend"},"Interception")))):ft.createElement("div",null)}i(uw,"FlowMenu");var lw=i(e=>{let t=window.open(e,"_blank","noopener,noreferrer");t&&(t.opener=null)},"openInNewTab");function sW({flow:e}){if(e.type!=="http")return ft.createElement(Or,{icon:"fa-download",onClick:()=>0,disabled:!0},"Download");if(e.request.contentLength&&!e.response?.contentLength)return ft.createElement(Or,{icon:"fa-download",onClick:()=>lw(On.getContentURL(e,e.request))},"Download");if(e.response){let t=e.response;if(!e.request.contentLength&&e.response.contentLength)return ft.createElement(Or,{icon:"fa-download",onClick:()=>lw(On.getContentURL(e,t))},"Download");if(e.request.contentLength&&e.response.contentLength)return ft.createElement(Yu,{text:ft.createElement(Or,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>lw(On.getContentURL(e,e.request))},"Download request"),ft.createElement(li,{onClick:()=>lw(On.getContentURL(e,t))},"Download response"))}return null}i(sW,"DownloadButton");function aW({flow:e}){return ft.createElement(Yu,{className:"",text:ft.createElement(Or,{title:"Export flow.",icon:"fa-clone",onClick:()=>1,disabled:e.type!=="http"},"Export\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>Dp(e,"raw_request")},"Copy raw request"),ft.createElement(li,{onClick:()=>Dp(e,"raw_response")},"Copy raw response"),ft.createElement(li,{onClick:()=>Dp(e,"raw")},"Copy raw request and response"),ft.createElement(li,{onClick:()=>Dp(e,"curl")},"Copy as cURL"),ft.createElement(li,{onClick:()=>Dp(e,"httpie")},"Copy as HTTPie"))}i(aW,"ExportButton");var lW={":red_circle:":"\u{1F534}",":orange_circle:":"\u{1F7E0}",":yellow_circle:":"\u{1F7E1}",":green_circle:":"\u{1F7E2}",":large_blue_circle:":"\u{1F535}",":purple_circle:":"\u{1F7E3}",":brown_circle:":"\u{1F7E4}"};function uW({flow:e}){let t=Be();return ft.createElement(Yu,{className:"",text:ft.createElement(Or,{title:"mark flow",icon:"fa-paint-brush text-success",onClick:()=>1},"Mark\u25BE"),options:{placement:"bottom-start"}},ft.createElement(li,{onClick:()=>t(si(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(lW).map(([n,s])=>ft.createElement(li,{key:n,onClick:()=>t(si(e,{marked:n}))},s," ",n.replace(/[:_]/g," "))))}i(uW,"MarkButton");var dO={0:iw,1:ow,2:aw,3:uw};function kE(){let e=Be(),t=me(k=>k.ui.tabs.current),n=me(k=>k.flows.selected.filter(R=>R in k.flows.byId),Mo),[s,l]=(0,to.useState)(!1),h=me(k=>k.flows.list.length>0),d=me(k=>k.ui.tabs.isInitial),v=[0,1,2];n.length>0&&v.push(3),(0,to.useEffect)(()=>{h&&d&&e(Im(1))},[h]),(0,to.useEffect)(()=>{n.length>0&&!s?(e(Im(3)),l(!0)):n.length===0&&(s&&l(!1),t===3&&e(Im(1)))},[n,s,t]);function S(k,R){R.preventDefault(),e(Im(k))}i(S,"handleClick");let b=dO[t];return to.default.createElement("header",null,to.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},to.default.createElement(aO,null),v.map(k=>to.default.createElement("a",{key:k,href:"#",className:(0,pO.default)({active:k===t}),onClick:R=>S(k,R)},dO[k].title)),to.default.createElement(hs,null,to.default.createElement(lO,null))),to.default.createElement("div",null,to.default.createElement(b,null)))}i(kE,"Header");var nt=pe(Te()),hO=pe(ai());var cw=function(){"use strict";function e(s,l){function h(){this.constructor=s}i(h,"ctor"),h.prototype=l.prototype,s.prototype=new h}i(e,"peg$subclass");function t(s,l,h,d){this.message=s,this.expected=l,this.found=h,this.location=d,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}i(t,"peg$SyntaxError"),e(t,Error);function n(s){var l=arguments.length>1?arguments[1]:{},h=this,d={},v={Expr:Bn},S=Bn,b=i(function(Y,ee){return[Y,...ee]},"peg$c0"),k=i(function(Y){return[Y]},"peg$c1"),R=i(function(){return""},"peg$c2"),I={type:"other",description:"string"},z='"',q={type:"literal",value:'"',description:'"\\""'},Q=i(function(Y){return Y.join("")},"peg$c6"),ne="'",D={type:"literal",value:"'",description:`"'"`},L=/^["\\]/,B={type:"class",value:'["\\\\]',description:'["\\\\]'},j={type:"any",description:"any character"},re=i(function(Y){return Y},"peg$c12"),Z="\\",oe={type:"literal",value:"\\",description:'"\\\\"'},he=/^['\\]/,Re={type:"class",value:"['\\\\]",description:"['\\\\]"},Ee=/^['"\\]/,Ye={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},tt="n",xe={type:"literal",value:"n",description:'"n"'},Xe=i(function(){return` +`},"peg$c21"),je="r",Qe={type:"literal",value:"r",description:'"r"'},ot=i(function(){return"\r"},"peg$c24"),It="t",At={type:"literal",value:"t",description:'"t"'},cn=i(function(){return" "},"peg$c27"),fn={type:"other",description:"whitespace"},gr=/^[ \t\n\r]/,Wt={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},vr={type:"other",description:"control character"},yr=/^[|&!()~"]/,Gt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},Ft={type:"other",description:"optional whitespace"},se=0,Ue=0,Kr=[{line:1,column:1,seenCR:!1}],Zt=0,st=[],Fe=0,Fn;if("startRule"in l){if(!(l.startRule in v))throw new Error(`Can't start parsing from rule "`+l.startRule+'".');S=v[l.startRule]}function En(){return s.substring(Ue,se)}i(En,"text");function no(){return fr(Ue,se)}i(no,"location");function Ho(Y){throw io(null,[{type:"other",description:Y}],s.substring(Ue,se),fr(Ue,se))}i(Ho,"expected");function lt(Y){throw io(Y,null,s.substring(Ue,se),fr(Ue,se))}i(lt,"error");function wr(Y){var ee=Kr[Y],Ce,Me;if(ee)return ee;for(Ce=Y-1;!Kr[Ce];)Ce--;for(ee=Kr[Ce],ee={line:ee.line,column:ee.column,seenCR:ee.seenCR};CeZt&&(Zt=se,st=[]),st.push(Y))}i(pt,"peg$fail");function io(Y,ee,Ce,Me){function Tl(Xr){var Yt=1;for(Xr.sort(function(Mt,Pt){return Mt.descriptionPt.description?1:0});Yt1?Pt.slice(0,-1).join(", ")+" or "+Pt[Xr.length-1]:Pt[0],dn=Yt?'"'+Mt(Yt)+'"':"end of input","Expected "+Na+" but "+dn+" found."}return i(ze,"buildMessage"),ee!==null&&Tl(ee),new t(Y!==null?Y:ze(ee,Ce),ee,Ce,Me)}i(io,"peg$buildException");function Bn(){var Y,ee,Ce,Me;if(Y=se,ee=Mi(),ee!==d){if(Ce=[],Me=Hn(),Me!==d)for(;Me!==d;)Ce.push(Me),Me=Hn();else Ce=d;Ce!==d?(Me=Bn(),Me!==d?(Ue=Y,ee=b(ee,Me),Y=ee):(se=Y,Y=d)):(se=Y,Y=d)}else se=Y,Y=d;if(Y===d&&(Y=se,ee=Mi(),ee!==d&&(Ue=Y,ee=k(ee)),Y=ee,Y===d)){for(Y=se,ee=[],Ce=Hn();Ce!==d;)ee.push(Ce),Ce=Hn();ee!==d&&(Ue=Y,ee=R()),Y=ee}return Y}i(Bn,"peg$parseExpr");function Mi(){var Y,ee,Ce,Me;if(Fe++,Y=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=d,Fe===0&&pt(q)),ee!==d){for(Ce=[],Me=Gr();Me!==d;)Ce.push(Me),Me=Gr();Ce!==d?(s.charCodeAt(se)===34?(Me=z,se++):(Me=d,Fe===0&&pt(q)),Me!==d?(Ue=Y,ee=Q(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d)}else se=Y,Y=d;if(Y===d){if(Y=se,s.charCodeAt(se)===39?(ee=ne,se++):(ee=d,Fe===0&&pt(D)),ee!==d){for(Ce=[],Me=Yr();Me!==d;)Ce.push(Me),Me=Yr();Ce!==d?(s.charCodeAt(se)===39?(Me=ne,se++):(Me=d,Fe===0&&pt(D)),Me!==d?(Ue=Y,ee=Q(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d)}else se=Y,Y=d;if(Y===d){if(Y=se,ee=se,Fe++,Ce=so(),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d){if(Ce=[],Me=oo(),Me!==d)for(;Me!==d;)Ce.push(Me),Me=oo();else Ce=d;Ce!==d?(Ue=Y,ee=Q(Ce),Y=ee):(se=Y,Y=d)}else se=Y,Y=d;if(Y===d){if(Y=se,s.charCodeAt(se)===34?(ee=z,se++):(ee=d,Fe===0&&pt(q)),ee!==d){for(Ce=[],Me=Gr();Me!==d;)Ce.push(Me),Me=Gr();Ce!==d?(Ue=Y,ee=Q(Ce),Y=ee):(se=Y,Y=d)}else se=Y,Y=d;if(Y===d)if(Y=se,s.charCodeAt(se)===39?(ee=ne,se++):(ee=d,Fe===0&&pt(D)),ee!==d){for(Ce=[],Me=Yr();Me!==d;)Ce.push(Me),Me=Yr();Ce!==d?(Ue=Y,ee=Q(Ce),Y=ee):(se=Y,Y=d)}else se=Y,Y=d}}}return Fe--,Y===d&&(ee=d,Fe===0&&pt(I)),Y}i(Mi,"peg$parseStringLiteral");function Gr(){var Y,ee,Ce;return Y=se,ee=se,Fe++,L.test(s.charAt(se))?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(B)),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(j)),Ce!==d?(Ue=Y,ee=re(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d),Y===d&&(Y=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=d,Fe===0&&pt(oe)),ee!==d?(Ce=hi(),Ce!==d?(Ue=Y,ee=re(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d)),Y}i(Gr,"peg$parseDoubleStringChar");function Yr(){var Y,ee,Ce;return Y=se,ee=se,Fe++,he.test(s.charAt(se))?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(Re)),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(j)),Ce!==d?(Ue=Y,ee=re(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d),Y===d&&(Y=se,s.charCodeAt(se)===92?(ee=Z,se++):(ee=d,Fe===0&&pt(oe)),ee!==d?(Ce=hi(),Ce!==d?(Ue=Y,ee=re(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d)),Y}i(Yr,"peg$parseSingleStringChar");function oo(){var Y,ee,Ce;return Y=se,ee=se,Fe++,Ce=Hn(),Fe--,Ce===d?ee=void 0:(se=ee,ee=d),ee!==d?(s.length>se?(Ce=s.charAt(se),se++):(Ce=d,Fe===0&&pt(j)),Ce!==d?(Ue=Y,ee=re(Ce),Y=ee):(se=Y,Y=d)):(se=Y,Y=d),Y}i(oo,"peg$parseUnquotedStringChar");function hi(){var Y,ee;return Ee.test(s.charAt(se))?(Y=s.charAt(se),se++):(Y=d,Fe===0&&pt(Ye)),Y===d&&(Y=se,s.charCodeAt(se)===110?(ee=tt,se++):(ee=d,Fe===0&&pt(xe)),ee!==d&&(Ue=Y,ee=Xe()),Y=ee,Y===d&&(Y=se,s.charCodeAt(se)===114?(ee=je,se++):(ee=d,Fe===0&&pt(Qe)),ee!==d&&(Ue=Y,ee=ot()),Y=ee,Y===d&&(Y=se,s.charCodeAt(se)===116?(ee=It,se++):(ee=d,Fe===0&&pt(At)),ee!==d&&(Ue=Y,ee=cn()),Y=ee))),Y}i(hi,"peg$parseEscapeSequence");function Hn(){var Y,ee;return Fe++,gr.test(s.charAt(se))?(Y=s.charAt(se),se++):(Y=d,Fe===0&&pt(Wt)),Fe--,Y===d&&(ee=d,Fe===0&&pt(fn)),Y}i(Hn,"peg$parsews");function so(){var Y,ee;return Fe++,yr.test(s.charAt(se))?(Y=s.charAt(se),se++):(Y=d,Fe===0&&pt(Gt)),Fe--,Y===d&&(ee=d,Fe===0&&pt(vr)),Y}i(so,"peg$parsecc");function bl(){var Y,ee;for(Fe++,Y=[],ee=Hn();ee!==d;)Y.push(ee),ee=Hn();return Fe--,Y===d&&(ee=d,Fe===0&&pt(Ft)),Y}if(i(bl,"peg$parse__"),Fn=S(),Fn!==d&&se===s.length)return Fn;throw Fn!==d&&se{t&&t.current.addEventListener("DOMNodeInserted",n=>{let s=n.currentTarget;s.scroll({top:s.scrollHeight,behavior:"auto"})})},[]),nt.default.createElement("div",{className:"command-result",ref:t},e.map((n,s)=>nt.default.createElement("div",{key:s},nt.default.createElement("div",null,nt.default.createElement("strong",null,"$ ",n.command)),n.result)))}i(cW,"Results");function fW({nextArgs:e,currentArg:t,help:n,description:s,availableCommands:l}){let h=[];for(let d=0;d0&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Argument suggestion:")," ",h),n?.includes("->")&&nt.default.createElement("div",null,nt.default.createElement("strong",null,"Signature help: "),n),s&&nt.default.createElement("div",null,"# ",s),nt.default.createElement("div",null,nt.default.createElement("strong",null,"Available Commands: "),nt.default.createElement("p",{className:"available-commands"},JSON.stringify(l)))))}i(fW,"CommandHelp");function AE(){let[e,t]=(0,nt.useState)(""),[n,s]=(0,nt.useState)(""),[l,h]=(0,nt.useState)(0),[d,v]=(0,nt.useState)([]),[S,b]=(0,nt.useState)([]),[k,R]=(0,nt.useState)({}),[I,z]=(0,nt.useState)([]),[q,Q]=(0,nt.useState)(0),[ne,D]=(0,nt.useState)(""),[L,B]=(0,nt.useState)(""),[j,re]=(0,nt.useState)([]),[Z,oe]=(0,nt.useState)([]),[he,Re]=(0,nt.useState)(void 0);(0,nt.useEffect)(()=>{xt("/commands",{method:"GET"}).then(Xe=>Xe.json()).then(Xe=>{R(Xe),v(NE(Xe)),b(Object.keys(Xe))}).catch(Xe=>console.error(Xe))},[]),(0,nt.useEffect)(()=>{gf("commands.history.get").then(Xe=>{oe(Xe.value)}).catch(Xe=>console.error(Xe))},[]);let Ee=i((Xe,je)=>{let Qe=cw.parse(je),ot=cw.parse(Xe);D(k[Qe[0]]?.signature_help),B(k[Qe[0]]?.help||""),v(NE(k,ot[0])),b(NE(k,Qe[0]));let It=k[Qe[0]]?.parameters.map(At=>At.name);It&&(z([Qe[0],...It]),Q(Qe.length-1))},"parseCommand"),Ye=i(Xe=>{t(Xe.target.value),s(Xe.target.value),h(0)},"onChange"),tt=i(Xe=>{if(Xe.key==="Enter"){let[je,...Qe]=cw.parse(e);oe([...Z,e]),gf("commands.history.add",e).catch(()=>0),xt.post(`/commands/${je}`,{arguments:Qe}).then(ot=>ot.json()).then(ot=>{Re(void 0),z([]),re([...j,{command:e,result:JSON.stringify(ot.value||ot.error)}])}).catch(ot=>{Re(void 0),z([]),re([...j,{command:e,result:ot.toString()}])}),D(""),B(""),t(""),s(""),h(0),v(S)}if(Xe.key==="ArrowUp"){let je;he===void 0?je=Z.length-1:je=Math.max(0,he-1),t(Z[je]),s(Z[je]),Re(je)}if(Xe.key==="ArrowDown"){if(he===void 0)return;if(he==Z.length-1)t(""),s(""),Re(void 0);else{let je=he+1;t(Z[je]),s(Z[je]),Re(je)}}Xe.key==="Tab"&&(t(d[l]),h((l+1)%d.length),Xe.preventDefault()),Xe.stopPropagation()},"onKeyDown"),xe=i(Xe=>{if(!e){b(Object.keys(k));return}Ee(n,e),Xe.stopPropagation()},"onKeyUp");return nt.default.createElement("div",{className:"command"},nt.default.createElement("div",{className:"command-title"},"Command Result"),nt.default.createElement(cW,{results:j}),nt.default.createElement(fW,{nextArgs:I,currentArg:q,help:ne,description:L,availableCommands:S}),nt.default.createElement("div",{className:(0,hO.default)("command-input input-group")},nt.default.createElement("span",{className:"input-group-addon"},nt.default.createElement("i",{className:"fa fa-fw fa-terminal"})),nt.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e||"",onChange:Ye,onKeyDown:tt,onKeyUp:xe})))}i(AE,"CommandBar");var El=pe(Te());var PE=pe(Te());function LE({checked:e,onToggle:t,text:n}){return PE.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},PE.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",n)}i(LE,"ToggleButton");var ka=pe(Te()),ME=pe(CO());var cg=class extends ka.Component{constructor(n){super(n);this.viewport=ka.default.createRef();this.heights={},this.state={vScroll:Df()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}static{i(this,"EventLogList")}static{this.propTypes={events:ME.default.array.isRequired,rowHeight:ME.default.number}}static{this.defaultProps={rowHeight:18}}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}getSnapshotBeforeUpdate(){return Jm(this.viewport)}componentDidUpdate(n,s,l){l&&$0(this.viewport),this.onViewportUpdate()}onViewportUpdate(){let n=this.viewport.current,s=Df({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:n.scrollTop,viewportHeight:n.offsetHeight,itemHeights:this.props.events.map(l=>this.heights[l.id])});Mo(this.state.vScroll,s)||this.setState({vScroll:s})}setHeight(n,s){if(s&&!this.heights[n]){let l=s.offsetHeight;this.heights[n]!==l&&(this.heights[n]=l,this.onViewportUpdate())}}render(){let{vScroll:n}=this.state,{events:s}=this.props;return ka.default.createElement("pre",{ref:this.viewport,onScroll:this.onViewportUpdate},ka.default.createElement("div",{style:{height:n.paddingTop}}),s.slice(n.start,n.end).map(l=>ka.default.createElement("div",{key:l.id,ref:h=>this.setHeight(l.id,h)},ka.default.createElement(hW,{event:l}),l.message)),ka.default.createElement("div",{style:{height:n.paddingBottom}}))}};function hW({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return ka.default.createElement("i",{className:`fa fa-fw fa-${t}`})}i(hW,"LogIcon");var OE=class extends El.Component{static{i(this,"PureEventLog")}static{this.defaultProps={defaultHeight:200}}constructor(t,n){super(t,n),this.state={height:this.props.defaultHeight},this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragStop=this.onDragStop.bind(this)}onDragStart(t){t.preventDefault(),this.dragStart=this.state.height+t.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}onDragMove(t){t.preventDefault(),this.setState({height:this.dragStart-t.pageY})}onDragStop(t){t.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}render(){let{height:t}=this.state,{filters:n,events:s,toggleFilter:l,close:h}=this.props;return El.default.createElement("div",{className:"eventlog",style:{height:t}},El.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",El.default.createElement("div",{className:"pull-right"},Object.values(pC).map(d=>El.default.createElement(LE,{key:d,text:d,checked:n[d],onToggle:()=>l(d)})),El.default.createElement("i",{onClick:h,className:"fa fa-close"}))),El.default.createElement(cg,{events:s}))}},_O=Wu(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:mp,toggleFilter:PP})(OE);var _n=pe(Te());function RE(){let e=me(D=>D.backendState.version),{mode:t,intercept:n,showhost:s,upstream_cert:l,rawtcp:h,http2:d,websocket:v,anticache:S,anticomp:b,stickyauth:k,stickycookie:R,stream_large_bodies:I,listen_host:z,listen_port:q,server:Q,ssl_insecure:ne}=me(D=>D.options);return _n.createElement("footer",null,t&&(t.length!==1||t[0]!=="regular")&&_n.createElement("span",{className:"label label-success"},t.join(",")),n&&_n.createElement("span",{className:"label label-success"},"Intercept: ",n),ne&&_n.createElement("span",{className:"label label-danger"},"ssl_insecure"),s&&_n.createElement("span",{className:"label label-success"},"showhost"),!l&&_n.createElement("span",{className:"label label-success"},"no-upstream-cert"),!h&&_n.createElement("span",{className:"label label-success"},"no-raw-tcp"),!d&&_n.createElement("span",{className:"label label-success"},"no-http2"),!v&&_n.createElement("span",{className:"label label-success"},"no-websocket"),S&&_n.createElement("span",{className:"label label-success"},"anticache"),b&&_n.createElement("span",{className:"label label-success"},"anticomp"),k&&_n.createElement("span",{className:"label label-success"},"stickyauth: ",k),R&&_n.createElement("span",{className:"label label-success"},"stickycookie: ",R),I&&_n.createElement("span",{className:"label label-success"},"stream: ",Iy(I)),_n.createElement("div",{className:"pull-right"},_n.createElement(hs,null,Q&&_n.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},z||"*",":",q||8080)),_n.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}i(RE,"Footer");var HE=pe(Te());var BE=pe(Te());var Ip=pe(Te());function DE({children:e}){return Ip.createElement("div",null,Ip.createElement("div",{className:"modal-backdrop fade in"}),Ip.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:-1,role:"dialog","aria-labelledby":"options"},Ip.createElement("div",{className:"modal-dialog modal-lg",role:"document"},Ip.createElement("div",{className:"modal-content"},e))))}i(DE,"ModalLayout");var Dr=pe(Te());var fg=pe(bm());var ro=pe(Te());var kO=pe(ai());var mW=i(e=>{e.key!=="Escape"&&e.stopPropagation()},"stopPropagation");function NO({value:e,onChange:t,...n}){return ro.default.createElement("div",{className:"checkbox"},ro.default.createElement("label",null,ro.default.createElement("input",{type:"checkbox",checked:e,onChange:s=>t(s.target.checked),...n}),"Enable"))}i(NO,"BooleanOption");function EO({value:e,onChange:t,...n}){return ro.default.createElement("input",{type:"text",value:e||"",onChange:s=>t(s.target.value),...n})}i(EO,"StringOption");function bO(e){return i(function({onChange:n,...s}){return ro.default.createElement(e,{onChange:l=>n(l||null),...s})},"OptionalWrapper")}i(bO,"Optional");function TO({value:e,onChange:t,...n}){return ro.default.createElement("input",{type:"number",value:e,onChange:s=>t(parseInt(s.target.value)),...n})}i(TO,"NumberOption");function gW({value:e,onChange:t,choices:n,...s}){return ro.default.createElement("select",{onChange:l=>t(l.target.value),value:e,...s},n.map(l=>ro.default.createElement("option",{key:l,value:l},l)))}i(gW,"ChoicesOption");function vW({value:e,onChange:t,...n}){let s=Math.max(e.length,1),[l,h]=ro.default.useState(e.join(` +`));return ro.default.createElement("textarea",{rows:s,value:l,onChange:i(v=>{let S=v.target.value;h(S),t(S.split(` +`).map(b=>b.trim()).filter(b=>b!==""))},"handleChange"),...n})}i(vW,"StringSequenceOption");var yW={bool:NO,str:EO,int:TO,"optional str":bO(EO),"optional int":bO(TO),"sequence of str":vW};function wW({choices:e,type:t,value:n,onChange:s,name:l,error:h}){let d,v={onChange:s,value:n};if(e)d=gW,v.choices=e;else if(d=yW[t],!d)throw`unknown option type ${t}`;return d!==NO&&(v.className="form-control"),ro.default.createElement("div",{className:(0,kO.default)({"has-error":h})},ro.default.createElement(d,{name:l,onKeyDown:mW,...v}))}i(wW,"PureOption");function IE({name:e}){let t=Be(),n=me(d=>d.options_meta[e]?.choices),s=me(d=>d.options_meta[e]?.type),l=me(d=>{let v=d.ui.optionsEditor[e];return v?v.value:d.options_meta[e]?.value}),h=me(d=>d.ui.optionsEditor[e]?.error);return ro.default.createElement(wW,{name:e,choices:n,type:s,value:l,error:h,onChange:d=>t(gp(e,d))})}i(IE,"OptionInput");function SW({name:e}){let t=me(n=>n.options_meta[e]?.help);return Dr.default.createElement("div",{className:"help-block small"},t)}i(SW,"OptionHelp");function xW({name:e}){let t=me(n=>n.options_meta[e]?.error);return t?Dr.default.createElement("div",{className:"small text-danger"},t):null}i(xW,"OptionError");function CW({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if((0,fg.isEmpty)((0,fg.compact)(e))&&(0,fg.isEmpty)(t))return null;t="[ ]"}else t===""?t='""':t===null&&(t="null");return Dr.default.createElement("div",{className:"small"},"Default: ",Dr.default.createElement("strong",null," ",t," ")," ")}i(CW,"PureOptionDefault");var _W=Wu((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t]?.default}))(CW);function FE(){let e=Be(),t=me(n=>Object.keys(n.options_meta),Mo).sort();return Dr.default.createElement("div",null,Dr.default.createElement("div",{className:"modal-header"},Dr.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal",onClick:()=>e(Xy())},Dr.default.createElement("i",{className:"fa fa-fw fa-times"})),Dr.default.createElement("div",{className:"modal-title"},Dr.default.createElement("h4",null,"Options"))),Dr.default.createElement("div",{className:"modal-body"},Dr.default.createElement("div",{className:"form-horizontal"},t.map(n=>Dr.default.createElement("div",{key:n,className:"form-group"},Dr.default.createElement("div",{className:"col-xs-6"},Dr.default.createElement("label",{htmlFor:n},n),Dr.default.createElement(SW,{name:n})),Dr.default.createElement("div",{className:"col-xs-6"},Dr.default.createElement(IE,{name:n}),Dr.default.createElement(xW,{name:n}),Dr.default.createElement(_W,{name:n})))))),Dr.default.createElement("div",{className:"modal-footer"}))}i(FE,"OptionModal");function EW(){return BE.createElement(DE,null,BE.createElement(FE,null))}i(EW,"OptionModal");var AO=[EW];function zE(){let e=me(n=>n.ui.modal.activeModal),t=AO.find(n=>n.name===e);return e&&t!==void 0?HE.createElement(t,null):HE.createElement("div",null)}i(zE,"PureModal");var UE=class extends Jn.Component{constructor(){super(...arguments);this.state={};this.render=i(()=>{let{showEventLog:n,showCommandBar:s}=this.props;return this.state.error?(console.log("ERR",this.state),Jn.default.createElement("div",{className:"container"},Jn.default.createElement("h1",null,"mitmproxy has crashed."),Jn.default.createElement("pre",null,this.state.error.stack,Jn.default.createElement("br",null),Jn.default.createElement("br",null),"Component Stack:",this.state.errorInfo?.componentStack),Jn.default.createElement("p",null,"Please lodge a bug report at"," ",Jn.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):Jn.default.createElement("div",{id:"container",tabIndex:0},Jn.default.createElement(kE,null),Jn.default.createElement(_E,null),s&&Jn.default.createElement(AE,{key:"commandbar"}),n&&Jn.default.createElement(_O,{key:"eventlog"}),Jn.default.createElement(RE,null),Jn.default.createElement(zE,null))},"render")}static{i(this,"ProxyAppMain")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(n,s){this.setState({error:n,errorInfo:s})}},PO=Wu(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:XL})(UE);var rc={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function bW(e){let[t,n]=window.location.hash.substr(1).split("?",2),s=t.substr(1).split("/");if(s[0]==="flows"&&s.length==3){let[l,h]=s.slice(1);e.dispatch(yl(l)),e.dispatch(mf(h))}n&&n.split("&").forEach(l=>{let[h,d]=l.split("=",2),v=decodeURIComponent(d);switch(h){case rc.SEARCH:e.dispatch(Uy(v));break;case rc.HIGHLIGHT:e.dispatch(Wy(v));break;case rc.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(mp());break;case rc.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(f0());break;default:console.error(`unimplemented query arg: ${l}`)}})}i(bW,"updateStoreFromUrl");function TW(e){let t=e.getState(),n={[rc.SEARCH]:t.flows.filter,[rc.HIGHLIGHT]:t.flows.highlight,[rc.SHOW_EVENTLOG]:t.eventLog.visible,[rc.SHOW_COMMANDBAR]:t.commandBar.visible},s=Object.keys(n).filter(d=>n[d]).map(d=>`${d}=${encodeURIComponent(n[d])}`).join("&"),l;t.flows.selected.length>0?l=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:l="/flows",s&&(l+="?"+s);let h=window.location.pathname;h==="blank"&&(h="/"),window.location.hash.substr(1)!==l&&history.replaceState(void 0,"",`${h}#${l}`)}i(TW,"updateUrlFromStore");function WE(e){bW(e),e.subscribe(()=>TW(e))}i(WE,"initialize");var kW="reset",dg=class{static{i(this,"WebsocketBackend")}constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+location.pathname.replace(/\/$/,"")+"/updates"),this.socket.addEventListener("open",()=>this.onOpen()),this.socket.addEventListener("close",t=>this.onClose(t)),this.socket.addEventListener("message",t=>this.onMessage(JSON.parse(t.data))),this.socket.addEventListener("error",t=>this.onError(t))}onOpen(){this.fetchData("state"),this.fetchData("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(UP())}fetchData(t){let n=[];this.activeFetches[t]=n,xt(`./${t}`).then(s=>s.json()).then(s=>{this.activeFetches[t]===n&&this.receive(t,s)})}onMessage(t){if(t.cmd===kW)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let n=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch({type:n,...t})}}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();t==="state"?this.store.dispatch({type:s,payload:n}):this.store.dispatch({type:s,cmd:"receive",resource:t,data:n});let l=this.activeFetches[t];delete this.activeFetches[t],l.forEach(h=>this.onMessage(h)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(WP())}onClose(t){this.store.dispatch($P(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(...t){console.error("websocket connection errored",t)}};var pg=class{static{i(this,"StaticBackend")}constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){xt(`./${t}`).then(n=>n.json()).then(n=>{this.receive(t,n)})}receive(t,n){let s=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:s,cmd:"receive",resource:t,data:n})}};WE(_f);window.MITMWEB_STATIC?window.backend=new pg(_f):window.backend=new dg(_f);window.addEventListener("error",e=>{_f.dispatch(LP(`${e.message} +${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{let e=document.getElementById("mitmproxy");(0,LO.createRoot)(e).render($E.createElement(EA,{store:_f},$E.createElement(PO,null)))});})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/mitmproxy/version.py b/mitmproxy/version.py index d9ea06e618..8b9b3eee3a 100644 --- a/mitmproxy/version.py +++ b/mitmproxy/version.py @@ -2,7 +2,7 @@ import subprocess import sys -VERSION = "11.0.0.dev" +VERSION = "11.0.0" MITMPROXY = "mitmproxy " + VERSION # Serialization format version. This is displayed nowhere, it just needs to be incremented by one