From 46cd40f4935b67686d09f2fbe947b662e2475e11 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 20 Aug 2021 18:38:22 +0200 Subject: [PATCH] web: test coverage++, adjust commandbar --- mitmproxy/tools/web/app.py | 16 +- mitmproxy/tools/web/static/app.css | 1095 +- mitmproxy/tools/web/static/app.js | 50338 +++++++++++++++- mitmproxy/tools/web/static/vendor.css | 9134 ++- web/jest.config.js | 5 +- web/package-lock.json | 152 +- web/package.json | 3 + .../__tests__/components/CommandBarSpec.tsx | 59 +- .../__snapshots__/OptionMenuSpec.js.snap | 2 +- .../js/__tests__/components/HeaderSpec.tsx | 22 + .../js/__tests__/components/ProxyAppSpec.tsx | 15 + .../__snapshots__/CommandBarSpec.tsx.snap | 2 +- .../__snapshots__/HeaderSpec.tsx.snap | 533 + .../components/editors/ValidateEditorSpec.tsx | 8 +- web/src/js/__tests__/ducks/commandBarSpec.tsx | 10 + web/src/js/__tests__/ducks/flowsSpec.tsx | 9 +- web/src/js/__tests__/ducks/optionsSpec.tsx | 26 + .../js/__tests__/ducks/options_metaSpec.tsx | 16 + web/src/js/__tests__/ducks/tutils.ts | 2 +- web/src/js/__tests__/test-utils.tsx | 5 + web/src/js/components/CommandBar.tsx | 151 +- web/src/js/ducks/commandBar.ts | 2 +- web/src/js/ducks/flows.ts | 9 +- web/src/js/ducks/options.ts | 2 +- web/src/js/ducks/options_meta.ts | 2 +- web/src/js/utils.ts | 13 + 26 files changed, 61445 insertions(+), 186 deletions(-) create mode 100644 web/src/js/__tests__/components/HeaderSpec.tsx create mode 100644 web/src/js/__tests__/components/ProxyAppSpec.tsx create mode 100644 web/src/js/__tests__/components/__snapshots__/HeaderSpec.tsx.snap create mode 100644 web/src/js/__tests__/ducks/commandBarSpec.tsx create mode 100644 web/src/js/__tests__/ducks/options_metaSpec.tsx diff --git a/mitmproxy/tools/web/app.py b/mitmproxy/tools/web/app.py index f470e0308..2421d035f 100644 --- a/mitmproxy/tools/web/app.py +++ b/mitmproxy/tools/web/app.py @@ -529,11 +529,17 @@ class ExecuteCommand(RequestHandler): args = self.json['arguments'] except APIError: args = [] - result = self.master.commands.call_strings(cmd, args) - self.write({ - "value": result, - # "type": command.typename(type(result)) if result is not None else "none" - }) + try: + result = self.master.commands.call_strings(cmd, args) + except Exception as e: + self.write({ + "error": str(e) + }) + else: + self.write({ + "value": result, + # "type": command.typename(type(result)) if result is not None else "none" + }) class Events(RequestHandler): diff --git a/mitmproxy/tools/web/static/app.css b/mitmproxy/tools/web/static/app.css index 3ab71f5ac..0abf7fe7a 100644 --- a/mitmproxy/tools/web/static/app.css +++ b/mitmproxy/tools/web/static/app.css @@ -1,2 +1,1095 @@ -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)}#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{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.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-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-status{width:50px}.flow-table .col-size{width:70px}.flow-table .col-time{width:50px}.flow-table .col-timestamp{width:auto}.flow-table td.col-size,.flow-table td.col-time{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 .col-quickactions.hover,.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.open,.flow-table .col-quickactions>div>a:hover{background-color:rgba(0,0,0,.05)}.flow-table .col-quickactions .fa-ellipsis-h{transform:translate(0,3px)}.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 .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}.flow-detail table{width:100%;table-layout:fixed;word-break:break-all}.flow-detail table td:nth-child(2){font-family:Menlo,Monaco,Consolas,"Courier New",monospace;width:70%}.flow-detail table tr:not(:first-child){border-top:1px solid #f7f7f7}.flow-detail 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)}.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-mark{background-color:rgba(20,255,20,.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-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}.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}.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}.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} +html { + box-sizing: border-box; +} +*, +*:before, +*:after { + 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); +} +html, +body, +#container, +#mitmproxy { + height: 100%; + margin: 0; + overflow: hidden; +} +#container { + display: flex; + flex-direction: column; + outline: none; +} +#container > header, +#container > footer, +#container > .eventlog { + 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: white; + border-color: #a6a6a6; + border-bottom-color: white; +} +.nav-tabs > a.special { + color: white; + 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: white; +} +header > div { + 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: 0.5rem 1rem; +} +.menu-entry label { + font-size: 1.2rem; + font-weight: normal; + 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: 0.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%, 0.5) !important; +} +.connection-indicator { + display: inline; + padding: 0.2em 0.6em 0.3em; + font-size: 75%; + font-weight: 700; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25em; + float: right; + margin: 5px; + opacity: 1; + transition: all 1s linear; +} +a.connection-indicator:hover, +a.connection-indicator:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.connection-indicator:empty { + display: none; +} +.btn .connection-indicator { + position: relative; + top: -1px; +} +.connection-indicator.init, +.connection-indicator.fetching { + background-color: #5bc0de; +} +.connection-indicator.established { + background-color: #5cb85c; + opacity: 0; +} +.connection-indicator.error { + background-color: #d9534f; + transition: all 0.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: normal; + 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, 0.8); +} +.flow-table th.sort-asc:after { + content: "\f0de"; +} +.flow-table th.sort-desc:after { + content: "\f0dd"; +} +.flow-table tr { + cursor: pointer; + background-color: white; +} +.flow-table tr:nth-child(even) { + background-color: #f2f2f2; +} +.flow-table tr.selected { + background-color: #e0ebf5 !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-path, +.flow-table tr.intercepted:not(.has-response) .col-method { + color: hsl(30, 100%, 50%); +} +.flow-table tr.intercepted.has-response .col-status, +.flow-table tr.intercepted.has-response .col-size, +.flow-table tr.intercepted.has-response .col-time { + color: hsl(30, 100%, 50%); +} +.flow-table .fa { + line-height: inherit; +} +.flow-table .col-tls { + width: 10px; +} +.flow-table .col-tls-https { + background-color: rgba(0, 185, 0, 0.5); +} +.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: hsl(30, 100%, 50%); +} +.flow-table .col-path .fa-exclamation, +.flow-table .col-path .fa-times { + color: darkred; +} +.flow-table .col-method { + width: 60px; +} +.flow-table .col-status { + width: 50px; +} +.flow-table .col-size { + width: 70px; +} +.flow-table .col-time { + width: 50px; +} +.flow-table .col-timestamp { + width: auto; +} +.flow-table td.col-time, +.flow-table td.col-size { + 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, +.flow-table .col-quickactions.hover { + 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, +.flow-table .col-quickactions > div > a.open { + background-color: rgba(0, 0, 0, 0.05); +} +.flow-table .col-quickactions .fa-ellipsis-h { + transform: translate(0, 3px); +} +.flow-table .col-quickactions .fa-play { + transform: translate(1px, 2px); +} +.flow-table .col-quickactions .fa-repeat { + transform: translate(0px, 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 .first-line { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + background-color: #428bca; + color: white; + 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: bold; + 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, 0.0125), 0 2px 4px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.025); + background-color: rgba(255, 255, 255, 0.1); +} +.inline-input[placeholder]:empty:not(:focus-visible):before { + content: attr(placeholder); + color: lightgray; + font-style: italic; +} +.inline-input[contenteditable] { + outline-width: 0; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1); + background-color: rgba(255, 255, 255, 0.2); +} +.inline-input[contenteditable].has-warning { + color: #ffb8b8; +} +.flow-detail table { + width: 100%; + table-layout: fixed; + word-break: break-all; +} +.flow-detail table td:nth-child(2) { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + width: 70%; +} +.flow-detail table tr:not(:first-child) { + border-top: 1px solid #f7f7f7; +} +.flow-detail 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: 0.3em; + max-height: 12.4ex; + overflow-y: auto; +} +.headers .kv-key, +.trailers .kv-key { + font-weight: bold; +} +.headers .kv-value, +.trailers .kv-value { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +.headers .inline-input, +.trailers .inline-input { + background-color: white; +} +.headers .kv-add-row, +.trailers .kv-add-row { + opacity: 0; + color: #666; + position: absolute; + bottom: 4px; + right: 4px; + transition: all 100ms 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 dt, +dl.cert-attributes dd { + text-overflow: ellipsis; + overflow: hidden; +} +dl.cert-attributes dt { + flex: 0 0 2em; +} +dl.cert-attributes dd { + flex: 0 0 calc(100% - 2em); +} +.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, 0.7); + border: solid 2px rgba(248, 145, 59, 0.7); + text-align: center; + font-size: 22px; + line-height: 37px; + transition: all 100ms ease-in-out; +} +.edit-flow:hover { + background-color: rgba(239, 108, 0, 0.7); + color: rgba(0, 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: black; +} +.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 lightgray; + padding: 0 0 4px 3px; +} +footer .label { + margin-right: 3px; +} +.CodeMirror { + border: 1px solid #ccc; + height: auto !important; +} +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; + direction: ltr; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} +/* Shown when moving in bi-directional text */ +.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-mark { + background-color: rgba(20, 255, 20, 0.5); + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; +} +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; +} +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor {} + +.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; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.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, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3, .cm-s-default .cm-type {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: #f00;} +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +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;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 50px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -50px; margin-right: -50px; + padding-bottom: 50px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; + border-right: 50px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; + outline: none; +} +.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: none !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; /* prevents collapsing before first draw */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + 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: 0.1px; /* Force widget margins to stay inside of the container */ +} + +.CodeMirror-widget {} + +.CodeMirror-rtl pre { direction: rtl; } + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -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); +} + +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } + +.contentview .header { + font-weight: bold; +} +.contentview .highlight { + font-weight: bold; +} +.contentview .offset { + color: blue; +} +.contentview .codeeditor { + margin-bottom: 12px; +} +.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; +} +.dropdown-menu > li > a { + padding: 3px 10px; +} +.command-title { + background-color: #F2F2F2; + border: 1px solid #aaa; +} +.command-result { + display: block; + margin: 0px; + background-color: #fcfcfc; + height: 100px; + max-height: 100px; + overflow: auto; +} +.command-suggestion { + background-color: #9c9c9c; +} +.argument-suggestion { + background-color: hsla(209, 52%, 84%, 0.5) !important; +} +.command > .popover { + display: block; + position: relative; + max-width: none; +} +.available-commands { + overflow: auto; +} + /*# sourceMappingURL=app.css.map */ diff --git a/mitmproxy/tools/web/static/app.js b/mitmproxy/tools/web/static/app.js index 080ca0e49..a9deed669 100644 --- a/mitmproxy/tools/web/static/app.js +++ b/mitmproxy/tools/web/static/app.js @@ -1,66 +1,50255 @@ -(()=>{var BM=Object.create;var gc=Object.defineProperty,UM=Object.defineProperties,zM=Object.getOwnPropertyDescriptor,$M=Object.getOwnPropertyDescriptors,jM=Object.getOwnPropertyNames,tv=Object.getOwnPropertySymbols,qM=Object.getPrototypeOf,N0=Object.prototype.hasOwnProperty,cC=Object.prototype.propertyIsEnumerable;var L0=(e,t,i)=>t in e?gc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ne=(e,t)=>{for(var i in t||(t={}))N0.call(t,i)&&L0(e,i,t[i]);if(tv)for(var i of tv(t))cC.call(t,i)&&L0(e,i,t[i]);return e},Ht=(e,t)=>UM(e,$M(t)),pC=e=>gc(e,"__esModule",{value:!0}),o=(e,t)=>gc(e,"name",{value:t,configurable:!0});var Us=(e,t)=>{var i={};for(var l in e)N0.call(e,l)&&t.indexOf(l)<0&&(i[l]=e[l]);if(e!=null&&tv)for(var l of tv(e))t.indexOf(l)<0&&cC.call(e,l)&&(i[l]=e[l]);return i};var fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dC=(e,t)=>{pC(e);for(var i in t)gc(e,i,{get:t[i],enumerable:!0})},VM=(e,t,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of jM(t))!N0.call(e,l)&&l!=="default"&&gc(e,l,{get:()=>t[l],enumerable:!(i=zM(t,l))||i.enumerable});return e},pe=e=>VM(pC(gc(e!=null?BM(qM(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var es=(e,t,i)=>(L0(e,typeof t!="symbol"?t+"":t,i),i);var Ma=(e,t,i)=>new Promise((l,d)=>{var v=_=>{try{y(i.next(_))}catch(O){d(O)}},p=_=>{try{y(i.throw(_))}catch(O){d(O)}},y=_=>_.done?l(_.value):Promise.resolve(_.value).then(v,p);y((i=i.apply(e,t)).next())});var P0=fr((VI,mC)=>{"use strict";var hC=Object.getOwnPropertySymbols,KM=Object.prototype.hasOwnProperty,GM=Object.prototype.propertyIsEnumerable;function YM(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}o(YM,"toObject");function XM(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(t).map(function(v){return t[v]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(v){d[v]=v}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch(v){return!1}}o(XM,"shouldUseNative");mC.exports=XM()?Object.assign:function(e,t){for(var i,l=YM(e),d,v=1;v{"use strict";var M0=P0(),yc=60103,vC=60106;Et.Fragment=60107;Et.StrictMode=60108;Et.Profiler=60114;var gC=60109,yC=60110,wC=60112;Et.Suspense=60113;var xC=60115,SC=60116;typeof Symbol=="function"&&Symbol.for&&(xo=Symbol.for,yc=xo("react.element"),vC=xo("react.portal"),Et.Fragment=xo("react.fragment"),Et.StrictMode=xo("react.strict_mode"),Et.Profiler=xo("react.profiler"),gC=xo("react.provider"),yC=xo("react.context"),wC=xo("react.forward_ref"),Et.Suspense=xo("react.suspense"),xC=xo("react.memo"),SC=xo("react.lazy"));var xo,CC=typeof Symbol=="function"&&Symbol.iterator;function QM(e){return e===null||typeof e!="object"?null:(e=CC&&e[CC]||e["@@iterator"],typeof e=="function"?e:null)}o(QM,"y");function yd(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i{"use strict";MC.exports=PC()});var HC=fr(At=>{"use strict";var xc,wd,iv,H0;typeof performance=="object"&&typeof performance.now=="function"?(AC=performance,At.unstable_now=function(){return AC.now()}):(W0=Date,DC=W0.now(),At.unstable_now=function(){return W0.now()-DC});var AC,W0,DC;typeof window=="undefined"||typeof MessageChannel!="function"?(Sc=null,B0=null,U0=o(function(){if(Sc!==null)try{var e=At.unstable_now();Sc(!0,e),Sc=null}catch(t){throw setTimeout(U0,0),t}},"w"),xc=o(function(e){Sc!==null?setTimeout(xc,0,e):(Sc=e,setTimeout(U0,0))},"f"),wd=o(function(e,t){B0=setTimeout(e,t)},"g"),iv=o(function(){clearTimeout(B0)},"h"),At.unstable_shouldYield=function(){return!1},H0=At.unstable_forceFrameRate=function(){}):(FC=window.setTimeout,RC=window.clearTimeout,typeof console!="undefined"&&(IC=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof IC!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),xd=!1,Sd=null,ov=-1,z0=5,$0=0,At.unstable_shouldYield=function(){return At.unstable_now()>=$0},H0=o(function(){},"k"),At.unstable_forceFrameRate=function(e){0>e||125>>1,d=e[l];if(d!==void 0&&0av(p,i))_!==void 0&&0>av(_,p)?(e[l]=_,e[y]=i,l=y):(e[l]=p,e[v]=i,l=v);else if(_!==void 0&&0>av(_,i))e[l]=_,e[y]=i,l=y;else break e}}return t}return null}o(lv,"K");function av(e,t){var i=e.sortIndex-t.sortIndex;return i!==0?i:e.id-t.id}o(av,"I");var zs=[],Aa=[],rA=1,So=null,Kn=3,uv=!1,qu=!1,Cd=!1;function V0(e){for(var t=ts(Aa);t!==null;){if(t.callback===null)lv(Aa);else if(t.startTime<=e)lv(Aa),t.sortIndex=t.expirationTime,q0(zs,t);else break;t=ts(Aa)}}o(V0,"T");function K0(e){if(Cd=!1,V0(e),!qu)if(ts(zs)!==null)qu=!0,xc(G0);else{var t=ts(Aa);t!==null&&wd(K0,t.startTime-e)}}o(K0,"U");function G0(e,t){qu=!1,Cd&&(Cd=!1,iv()),uv=!0;var i=Kn;try{for(V0(t),So=ts(zs);So!==null&&(!(So.expirationTime>t)||e&&!At.unstable_shouldYield());){var l=So.callback;if(typeof l=="function"){So.callback=null,Kn=So.priorityLevel;var d=l(So.expirationTime<=t);t=At.unstable_now(),typeof d=="function"?So.callback=d:So===ts(zs)&&lv(zs),V0(t)}else lv(zs);So=ts(zs)}if(So!==null)var v=!0;else{var p=ts(Aa);p!==null&&wd(K0,p.startTime-t),v=!1}return v}finally{So=null,Kn=i,uv=!1}}o(G0,"V");var nA=H0;At.unstable_IdlePriority=5;At.unstable_ImmediatePriority=1;At.unstable_LowPriority=4;At.unstable_NormalPriority=3;At.unstable_Profiling=null;At.unstable_UserBlockingPriority=2;At.unstable_cancelCallback=function(e){e.callback=null};At.unstable_continueExecution=function(){qu||uv||(qu=!0,xc(G0))};At.unstable_getCurrentPriorityLevel=function(){return Kn};At.unstable_getFirstCallbackNode=function(){return ts(zs)};At.unstable_next=function(e){switch(Kn){case 1:case 2:case 3:var t=3;break;default:t=Kn}var i=Kn;Kn=t;try{return e()}finally{Kn=i}};At.unstable_pauseExecution=function(){};At.unstable_requestPaint=nA;At.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=Kn;Kn=e;try{return t()}finally{Kn=i}};At.unstable_scheduleCallback=function(e,t,i){var l=At.unstable_now();switch(typeof i=="object"&&i!==null?(i=i.delay,i=typeof i=="number"&&0l?(e.sortIndex=i,q0(Aa,e),ts(zs)===null&&e===ts(Aa)&&(Cd?iv():Cd=!0,wd(K0,i-l))):(e.sortIndex=d,q0(zs,e),qu||uv||(qu=!0,xc(G0))),e};At.unstable_wrapCallback=function(e){var t=Kn;return function(){var i=Kn;Kn=t;try{return e.apply(this,arguments)}finally{Kn=i}}}});var BC=fr((XI,WC)=>{"use strict";WC.exports=HC()});var kb=fr(ko=>{"use strict";var fv=Fe(),cr=P0(),xn=BC();function ye(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;it}return!1}o(lA,"na");function pi(e,t,i,l,d,v,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=v,this.removeEmptyString=p}o(pi,"B");var Pn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pn[e]=new pi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pn[t]=new pi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pn[e]=new pi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pn[e]=new pi(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){Pn[e]=new pi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pn[e]=new pi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pn[e]=new pi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pn[e]=new pi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pn[e]=new pi(e,5,!1,e.toLowerCase(),null,!1,!1)});var Y0=/[\-:]([a-z])/g;function X0(e){return e[1].toUpperCase()}o(X0,"pa");"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(Y0,X0);Pn[t]=new pi(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(Y0,X0);Pn[t]=new pi(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(Y0,X0);Pn[t]=new pi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pn[e]=new pi(e,1,!1,e.toLowerCase(),null,!1,!1)});Pn.xlinkHref=new pi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pn[e]=new pi(e,1,!1,e.toLowerCase(),null,!0,!0)});function Q0(e,t,i,l){var d=Pn.hasOwnProperty(t)?Pn[t]:null,v=d!==null?d.type===0:l?!1:!(!(2y||d[p]!==v[y])return` -`+d[p].replace(" at new "," at ");while(1<=p&&0<=y);break}}}finally{lw=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?Od(e):""}o(hv,"Pa");function aA(e){switch(e.tag){case 5:return Od(e.type);case 16:return Od("Lazy");case 13:return Od("Suspense");case 19:return Od("SuspenseList");case 0:case 2:case 15:return e=hv(e.type,!1),e;case 11:return e=hv(e.type.render,!1),e;case 22:return e=hv(e.type._render,!1),e;case 1:return e=hv(e.type,!0),e;default:return""}}o(aA,"Qa");function _c(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 Da:return"Fragment";case Gu:return"Portal";case bd:return"Profiler";case Z0:return"StrictMode";case Td:return"Suspense";case pv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ew:return(e.displayName||"Context")+".Consumer";case J0:return(e._context.displayName||"Context")+".Provider";case cv:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case dv:return _c(e.type);case rw:return _c(e._render);case tw:t=e._payload,e=e._init;try{return _c(e(t))}catch(i){}}return null}o(_c,"Ra");function Fa(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}o(Fa,"Sa");function KC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}o(KC,"Ta");function uA(e){var t=KC(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof i!="undefined"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,v=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(p){l=""+p,v.call(this,p)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}o(uA,"Ua");function mv(e){e._valueTracker||(e._valueTracker=uA(e))}o(mv,"Va");function GC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=KC(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}o(GC,"Wa");function vv(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}o(vv,"Xa");function aw(e,t){var i=t.checked;return cr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}o(aw,"Ya");function YC(e,t){var i=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;i=Fa(t.value!=null?t.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}o(YC,"Za");function XC(e,t){t=t.checked,t!=null&&Q0(e,"checked",t,!1)}o(XC,"$a");function uw(e,t){XC(e,t);var i=Fa(t.value),l=t.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fw(e,t.type,i):t.hasOwnProperty("defaultValue")&&fw(e,t.type,Fa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}o(uw,"ab");function QC(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}o(QC,"cb");function fw(e,t,i){(t!=="number"||vv(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}o(fw,"bb");function fA(e){var t="";return fv.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}o(fA,"db");function cw(e,t){return e=cr({children:void 0},t),(t=fA(t.children))&&(e.children=t),e}o(cw,"eb");function Ec(e,t,i,l){if(e=e.options,t){t={};for(var d=0;d=i.length))throw Error(ye(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:Fa(i)}}o(ZC,"hb");function JC(e,t){var i=Fa(t.value),l=Fa(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),l!=null&&(e.defaultValue=""+l)}o(JC,"ib");function e_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}o(e_,"jb");var dw={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function t_(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}o(t_,"lb");function hw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?t_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}o(hw,"mb");var gv,r_=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,i,l,d){MSApp.execUnsafeLocalFunction(function(){return e(t,i,l,d)})}:e}(function(e,t){if(e.namespaceURI!==dw.svg||"innerHTML"in e)e.innerHTML=t;else{for(gv=gv||document.createElement("div"),gv.innerHTML=""+t.valueOf().toString()+"",t=gv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Nd(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}o(Nd,"pb");var Ld={animationIterationCount:!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},cA=["Webkit","ms","Moz","O"];Object.keys(Ld).forEach(function(e){cA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ld[t]=Ld[e]})});function n_(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Ld.hasOwnProperty(e)&&Ld[e]?(""+t).trim():t+"px"}o(n_,"sb");function i_(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var l=i.indexOf("--")===0,d=n_(i,t[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,d):e[i]=d}}o(i_,"tb");var pA=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 mw(e,t){if(t){if(pA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ye(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ye(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(ye(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ye(62))}}o(mw,"vb");function vw(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}}o(vw,"wb");function gw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}o(gw,"xb");var yw=null,bc=null,Tc=null;function o_(e){if(e=Gd(e)){if(typeof yw!="function")throw Error(ye(280));var t=e.stateNode;t&&(t=Iv(t),yw(e.stateNode,e.type,t))}}o(o_,"Bb");function s_(e){bc?Tc?Tc.push(e):Tc=[e]:bc=e}o(s_,"Eb");function l_(){if(bc){var e=bc,t=Tc;if(Tc=bc=null,o_(e),t)for(e=0;el?0:1<i;i++)t.push(e);return t}o(Pw,"Zc");function Ev(e,t,i){e.pendingLanes|=t;var l=t-1;e.suspendedLanes&=l,e.pingedLanes&=l,e=e.eventTimes,t=31-Wa(t),e[t]=i}o(Ev,"$c");var Wa=Math.clz32?Math.clz32:OA,TA=Math.log,kA=Math.LN2;function OA(e){return e===0?32:31-(TA(e)/kA|0)|0}o(OA,"ad");var NA=xn.unstable_UserBlockingPriority,LA=xn.unstable_runWithPriority,bv=!0;function PA(e,t,i,l){Yu||xw();var d=Mw,v=Yu;Yu=!0;try{a_(d,e,t,i,l)}finally{(Yu=v)||Cw()}}o(PA,"gd");function MA(e,t,i,l){LA(NA,Mw.bind(null,e,t,i,l))}o(MA,"id");function Mw(e,t,i,l){if(bv){var d;if((d=(t&4)==0)&&0<$s.length&&-1=Ud),D_=String.fromCharCode(32),F_=!1;function R_(e,t){switch(e){case"keyup":return tD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}o(R_,"ge");function I_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}o(I_,"he");var Mc=!1;function nD(e,t){switch(e){case"compositionend":return I_(t);case"keypress":return t.which!==32?null:(F_=!0,D_);case"textInput":return e=t.data,e===D_&&F_?null:e;default:return null}}o(nD,"je");function iD(e,t){if(Mc)return e==="compositionend"||!Bw&&R_(e,t)?(e=O_(),Tv=Dw=Ba=null,Mc=!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:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=$_(i)}}o(j_,"Le");function q_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?q_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}o(q_,"Me");function V_(){for(var e=window,t=vv();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch(l){i=!1}if(i)e=t.contentWindow;else break;t=vv(e.document)}return t}o(V_,"Ne");function zw(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")}o(zw,"Oe");var hD=Ll&&"documentMode"in document&&11>=document.documentMode,Ac=null,$w=null,qd=null,jw=!1;function K_(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;jw||Ac==null||Ac!==vv(l)||(l=Ac,"selectionStart"in l&&zw(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),qd&&jd(qd,l)||(qd=l,l=Av($w,"onSelect"),0Hc||(e.current=Qw[Hc],Qw[Hc]=null,Hc--)}o(or,"H");function Cr(e,t){Hc++,Qw[Hc]=e.current,e.current=t}o(Cr,"I");var $a={},Gn=za($a),Pi=za(!1),Zu=$a;function Wc(e,t){var i=e.type.contextTypes;if(!i)return $a;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var d={},v;for(v in i)d[v]=t[v];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=d),d}o(Wc,"Ef");function Mi(e){return e=e.childContextTypes,e!=null}o(Mi,"Ff");function Hv(){or(Pi),or(Gn)}o(Hv,"Gf");function uE(e,t,i){if(Gn.current!==$a)throw Error(ye(168));Cr(Gn,t),Cr(Pi,i)}o(uE,"Hf");function fE(e,t,i){var l=e.stateNode;if(e=t.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var d in l)if(!(d in e))throw Error(ye(108,_c(t)||"Unknown",d));return cr({},i,l)}o(fE,"If");function Wv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$a,Zu=Gn.current,Cr(Gn,e),Cr(Pi,Pi.current),!0}o(Wv,"Jf");function cE(e,t,i){var l=e.stateNode;if(!l)throw Error(ye(169));i?(e=fE(e,t,Zu),l.__reactInternalMemoizedMergedChildContext=e,or(Pi),or(Gn),Cr(Gn,e)):or(Pi),Cr(Pi,i)}o(cE,"Kf");var Zw=null,Ju=null,gD=xn.unstable_runWithPriority,Jw=xn.unstable_scheduleCallback,e1=xn.unstable_cancelCallback,yD=xn.unstable_shouldYield,pE=xn.unstable_requestPaint,t1=xn.unstable_now,wD=xn.unstable_getCurrentPriorityLevel,Bv=xn.unstable_ImmediatePriority,dE=xn.unstable_UserBlockingPriority,hE=xn.unstable_NormalPriority,mE=xn.unstable_LowPriority,vE=xn.unstable_IdlePriority,r1={},xD=pE!==void 0?pE:function(){},Pl=null,Uv=null,n1=!1,gE=t1(),Yn=1e4>gE?t1:function(){return t1()-gE};function Bc(){switch(wD()){case Bv:return 99;case dE:return 98;case hE:return 97;case mE:return 96;case vE:return 95;default:throw Error(ye(332))}}o(Bc,"eg");function yE(e){switch(e){case 99:return Bv;case 98:return dE;case 97:return hE;case 96:return mE;case 95:return vE;default:throw Error(ye(332))}}o(yE,"fg");function ef(e,t){return e=yE(e),gD(e,t)}o(ef,"gg");function Yd(e,t,i){return e=yE(e),Jw(e,t,i)}o(Yd,"hg");function js(){if(Uv!==null){var e=Uv;Uv=null,e1(e)}wE()}o(js,"ig");function wE(){if(!n1&&Pl!==null){n1=!0;var e=0;try{var t=Pl;ef(99,function(){for(;ehe?(me=ie,ie=null):me=ie.sibling;var xe=B(F,ie,R[he],K);if(xe===null){ie===null&&(ie=me);break}e&&ie&&xe.alternate===null&&t(F,ie),P=v(xe,P,he),ue===null?V=xe:ue.sibling=xe,ue=xe,ie=me}if(he===R.length)return i(F,ie),V;if(ie===null){for(;hehe?(me=ie,ie=null):me=ie.sibling;var Ve=B(F,ie,xe.value,K);if(Ve===null){ie===null&&(ie=me);break}e&&ie&&Ve.alternate===null&&t(F,ie),P=v(Ve,P,he),ue===null?V=Ve:ue.sibling=Ve,ue=Ve,ie=me}if(xe.done)return i(F,ie),V;if(ie===null){for(;!xe.done;he++,xe=R.next())xe=Y(F,xe.value,K),xe!==null&&(P=v(xe,P,he),ue===null?V=xe:ue.sibling=xe,ue=xe);return V}for(ie=l(F,ie);!xe.done;he++,xe=R.next())xe=X(ie,F,he,xe.value,K),xe!==null&&(e&&xe.alternate!==null&&ie.delete(xe.key===null?he:xe.key),P=v(xe,P,he),ue===null?V=xe:ue.sibling=xe,ue=xe);return e&&ie.forEach(function(Qe){return t(F,Qe)}),V}return o(Q,"w"),function(F,P,R,K){var V=typeof R=="object"&&R!==null&&R.type===Da&&R.key===null;V&&(R=R.props.children);var ue=typeof R=="object"&&R!==null;if(ue)switch(R.$$typeof){case Ed:e:{for(ue=R.key,V=P;V!==null;){if(V.key===ue){switch(V.tag){case 7:if(R.type===Da){i(F,V.sibling),P=d(V,R.props.children),P.return=F,F=P;break e}break;default:if(V.elementType===R.type){i(F,V.sibling),P=d(V,R.props),P.ref=Qd(F,V,R),P.return=F,F=P;break e}}i(F,V);break}else t(F,V);V=V.sibling}R.type===Da?(P=Xc(R.props.children,F.mode,K,R.key),P.return=F,F=P):(K=pg(R.type,R.key,R.props,null,F.mode,K),K.ref=Qd(F,P,R),K.return=F,F=K)}return p(F);case Gu:e:{for(V=R.key;P!==null;){if(P.key===V)if(P.tag===4&&P.stateNode.containerInfo===R.containerInfo&&P.stateNode.implementation===R.implementation){i(F,P.sibling),P=d(P,R.children||[]),P.return=F,F=P;break e}else{i(F,P);break}else t(F,P);P=P.sibling}P=j1(R,F.mode,K),P.return=F,F=P}return p(F)}if(typeof R=="string"||typeof R=="number")return R=""+R,P!==null&&P.tag===6?(i(F,P.sibling),P=d(P,R),P.return=F,F=P):(i(F,P),P=$1(R,F.mode,K),P.return=F,F=P),p(F);if(Kv(R))return te(F,P,R,K);if(kd(R))return Q(F,P,R,K);if(ue&&Gv(F,R),typeof R=="undefined"&&!V)switch(F.tag){case 1:case 22:case 0:case 11:case 15:throw Error(ye(152,_c(F.type)||"Component"))}return i(F,P)}}o(OE,"Sg");var Yv=OE(!0),NE=OE(!1),Zd={},qs=za(Zd),Jd=za(Zd),eh=za(Zd);function tf(e){if(e===Zd)throw Error(ye(174));return e}o(tf,"dh");function a1(e,t){switch(Cr(eh,t),Cr(Jd,e),Cr(qs,Zd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hw(t,e)}or(qs),Cr(qs,t)}o(a1,"eh");function $c(){or(qs),or(Jd),or(eh)}o($c,"fh");function LE(e){tf(eh.current);var t=tf(qs.current),i=hw(t,e.type);t!==i&&(Cr(Jd,e),Cr(qs,i))}o(LE,"gh");function u1(e){Jd.current===e&&(or(qs),or(Jd))}o(u1,"hh");var _r=za(0);function Xv(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&64)!=0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}o(Xv,"ih");var Ml=null,Ka=null,Vs=!1;function PE(e,t){var i=To(5,null,null,0);i.elementType="DELETED",i.type="DELETED",i.stateNode=t,i.return=e,i.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=i,e.lastEffect=i):e.firstEffect=e.lastEffect=i}o(PE,"mh");function ME(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}o(ME,"oh");function f1(e){if(Vs){var t=Ka;if(t){var i=t;if(!ME(e,t)){if(t=Fc(i.nextSibling),!t||!ME(e,t)){e.flags=e.flags&-1025|2,Vs=!1,Ml=e;return}PE(Ml,i)}Ml=e,Ka=Fc(t.firstChild)}else e.flags=e.flags&-1025|2,Vs=!1,Ml=e}}o(f1,"ph");function AE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ml=e}o(AE,"qh");function Qv(e){if(e!==Ml)return!1;if(!Vs)return AE(e),Vs=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Gw(t,e.memoizedProps))for(t=Ka;t;)PE(e,t),t=Fc(t.nextSibling);if(AE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ye(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){Ka=Fc(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}Ka=null}}else Ka=Ml?Fc(e.stateNode.nextSibling):null;return!0}o(Qv,"rh");function c1(){Ka=Ml=null,Vs=!1}o(c1,"sh");var jc=[];function p1(){for(var e=0;ev))throw Error(ye(301));v+=1,Mn=Xn=null,t.updateQueue=null,th.current=bD,e=i(l,d)}while(nh)}if(th.current=rg,t=Xn!==null&&Xn.next!==null,rh=0,Mn=Xn=Dr=null,Zv=!1,t)throw Error(ye(300));return e}o(h1,"Ch");function rf(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mn===null?Dr.memoizedState=Mn=e:Mn=Mn.next=e,Mn}o(rf,"Hh");function nf(){if(Xn===null){var e=Dr.alternate;e=e!==null?e.memoizedState:null}else e=Xn.next;var t=Mn===null?Dr.memoizedState:Mn.next;if(t!==null)Mn=t,Xn=e;else{if(e===null)throw Error(ye(310));Xn=e,e={memoizedState:Xn.memoizedState,baseState:Xn.baseState,baseQueue:Xn.baseQueue,queue:Xn.queue,next:null},Mn===null?Dr.memoizedState=Mn=e:Mn=Mn.next=e}return Mn}o(nf,"Ih");function Ks(e,t){return typeof t=="function"?t(e):t}o(Ks,"Jh");function ih(e){var t=nf(),i=t.queue;if(i===null)throw Error(ye(311));i.lastRenderedReducer=e;var l=Xn,d=l.baseQueue,v=i.pending;if(v!==null){if(d!==null){var p=d.next;d.next=v.next,v.next=p}l.baseQueue=d=v,i.pending=null}if(d!==null){d=d.next,l=l.baseState;var y=p=v=null,_=d;do{var O=_.lane;if((rh&O)===O)y!==null&&(y=y.next={lane:0,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null}),l=_.eagerReducer===e?_.eagerState:e(l,_.action);else{var D={lane:O,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null};y===null?(p=y=D,v=l):y=y.next=D,Dr.lanes|=O,ah|=O}_=_.next}while(_!==null&&_!==d);y===null?v=l:y.next=p,Co(l,t.memoizedState)||(ns=!0),t.memoizedState=l,t.baseState=v,t.baseQueue=y,i.lastRenderedState=l}return[t.memoizedState,i.dispatch]}o(ih,"Kh");function oh(e){var t=nf(),i=t.queue;if(i===null)throw Error(ye(311));i.lastRenderedReducer=e;var l=i.dispatch,d=i.pending,v=t.memoizedState;if(d!==null){i.pending=null;var p=d=d.next;do v=e(v,p.action),p=p.next;while(p!==d);Co(v,t.memoizedState)||(ns=!0),t.memoizedState=v,t.baseQueue===null&&(t.baseState=v),i.lastRenderedState=v}return[v,l]}o(oh,"Lh");function DE(e,t,i){var l=t._getVersion;l=l(t._source);var d=t._workInProgressVersionPrimary;if(d!==null?e=d===l:(e=e.mutableReadLanes,(e=(rh&e)===e)&&(t._workInProgressVersionPrimary=l,jc.push(t))),e)return i(t._source);throw jc.push(t),Error(ye(350))}o(DE,"Mh");function FE(e,t,i,l){var d=di;if(d===null)throw Error(ye(349));var v=t._getVersion,p=v(t._source),y=th.current,_=y.useState(function(){return DE(d,t,i)}),O=_[1],D=_[0];_=Mn;var Y=e.memoizedState,B=Y.refs,X=B.getSnapshot,te=Y.source;Y=Y.subscribe;var Q=Dr;return e.memoizedState={refs:B,source:t,subscribe:l},y.useEffect(function(){B.getSnapshot=i,B.setSnapshot=O;var F=v(t._source);if(!Co(p,F)){F=i(t._source),Co(D,F)||(O(F),F=Ya(Q),d.mutableReadLanes|=F&d.pendingLanes),F=d.mutableReadLanes,d.entangledLanes|=F;for(var P=d.entanglements,R=F;0i?98:i,function(){e(!0)}),ef(97<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=p.createElement(i,{is:l.is}):(e=p.createElement(i),i==="select"&&(p=e,l.multiple?p.multiple=!0:l.size&&(p.size=l.size))):e=p.createElementNS(e,i),e[Ua]=t,e[Rv]=l,rb(e,t,!1,!1),t.stateNode=e,p=vw(i,l),i){case"dialog":ir("cancel",e),ir("close",e),d=l;break;case"iframe":case"object":case"embed":ir("load",e),d=l;break;case"video":case"audio":for(d=0;dD1&&(t.flags|=64,v=!0,lh(l,!1),t.lanes=33554432)}else{if(!v)if(e=Xv(p),e!==null){if(t.flags|=64,v=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),lh(l,!0),l.tail===null&&l.tailMode==="hidden"&&!p.alternate&&!Vs)return t=t.lastEffect=l.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Yn()-l.renderingStartTime>D1&&i!==1073741824&&(t.flags|=64,v=!0,lh(l,!1),t.lanes=33554432);l.isBackwards?(p.sibling=t.child,t.child=p):(i=l.last,i!==null?i.sibling=p:t.child=p,l.last=p)}return l.tail!==null?(i=l.tail,l.rendering=i,l.tail=i.sibling,l.lastEffect=t.lastEffect,l.renderingStartTime=Yn(),i.sibling=null,t=_r.current,Cr(_r,v?t&1|2:t&1),i):null;case 23:case 24:return B1(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&l.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(ye(156,t.tag))}o(kD,"Gi");function OD(e){switch(e.tag){case 1:Mi(e.type)&&Hv();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if($c(),or(Pi),or(Gn),p1(),t=e.flags,(t&64)!=0)throw Error(ye(285));return e.flags=t&-4097|64,e;case 5:return u1(e),null;case 13:return or(_r),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return or(_r),null;case 4:return $c(),null;case 10:return o1(e),null;case 23:case 24:return B1(),null;default:return null}}o(OD,"Li");function E1(e,t){try{var i="",l=t;do i+=aA(l),l=l.return;while(l);var d=i}catch(v){d=` -Error generating stack: `+v.message+` -`+v.stack}return{value:e,source:t,stack:d}}o(E1,"Mi");function b1(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}o(b1,"Ni");var ND=typeof WeakMap=="function"?WeakMap:Map;function ob(e,t,i){i=qa(-1,i),i.tag=3,i.payload={element:null};var l=t.value;return i.callback=function(){sg||(sg=!0,F1=l),b1(e,t)},i}o(ob,"Pi");function sb(e,t,i){i=qa(-1,i),i.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var d=t.value;i.payload=function(){return b1(e,t),l(d)}}var v=e.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(i.callback=function(){typeof l!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this),b1(e,t));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),i}o(sb,"Si");var LD=typeof WeakSet=="function"?WeakSet:Set;function lb(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){Za(e,i)}else t.current=null}o(lb,"Vi");function PD(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var i=e.memoizedProps,l=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?i:rs(t.type,i),l),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Yw(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(ye(163))}o(PD,"Xi");function MD(e,t,i){switch(i.tag){case 0:case 11:case 15:case 22:if(t=i.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)==3){var l=e.create;e.destroy=l()}e=e.next}while(e!==t)}if(t=i.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var d=e;l=d.next,d=d.tag,(d&4)!=0&&(d&1)!=0&&(Cb(i,e),BD(i,e)),e=l}while(e!==t)}return;case 1:e=i.stateNode,i.flags&4&&(t===null?e.componentDidMount():(l=i.elementType===i.type?t.memoizedProps:rs(i.type,t.memoizedProps),e.componentDidUpdate(l,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=i.updateQueue,t!==null&&_E(i,t,e);return;case 3:if(t=i.updateQueue,t!==null){if(e=null,i.child!==null)switch(i.child.tag){case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}_E(i,t,e)}return;case 5:e=i.stateNode,t===null&&i.flags&4&&iE(i.type,i.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:i.memoizedState===null&&(i=i.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&x_(i))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(ye(163))}o(MD,"Yi");function ab(e,t){for(var i=e;;){if(i.tag===5){var l=i.stateNode;if(t)l=l.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{l=i.stateNode;var d=i.memoizedProps.style;d=d!=null&&d.hasOwnProperty("display")?d.display:null,l.style.display=n_("display",d)}}else if(i.tag===6)i.stateNode.nodeValue=t?"":i.memoizedProps;else if((i.tag!==23&&i.tag!==24||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}o(ab,"aj");function ub(e,t){if(Ju&&typeof Ju.onCommitFiberUnmount=="function")try{Ju.onCommitFiberUnmount(Zw,t)}catch(v){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var i=e=e.next;do{var l=i,d=l.destroy;if(l=l.tag,d!==void 0)if((l&4)!=0)Cb(t,i);else{l=t;try{d()}catch(v){Za(l,v)}}i=i.next}while(i!==e)}break;case 1:if(lb(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(v){Za(t,v)}break;case 5:lb(t);break;case 4:db(e,t)}}o(ub,"bj");function fb(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}o(fb,"dj");function cb(e){return e.tag===5||e.tag===3||e.tag===4}o(cb,"ej");function pb(e){e:{for(var t=e.return;t!==null;){if(cb(t))break e;t=t.return}throw Error(ye(160))}var i=t;switch(t=i.stateNode,i.tag){case 5:var l=!1;break;case 3:t=t.containerInfo,l=!0;break;case 4:t=t.containerInfo,l=!0;break;default:throw Error(ye(161))}i.flags&16&&(Nd(t,""),i.flags&=-17);e:t:for(i=e;;){for(;i.sibling===null;){if(i.return===null||cb(i.return)){i=null;break e}i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue t;i.child.return=i,i=i.child}if(!(i.flags&2)){i=i.stateNode;break e}}l?T1(e,i,t):k1(e,i,t)}o(pb,"fj");function T1(e,t,i){var l=e.tag,d=l===5||l===6;if(d)e=d?e.stateNode:e.stateNode.instance,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Dv));else if(l!==4&&(e=e.child,e!==null))for(T1(e,t,i),e=e.sibling;e!==null;)T1(e,t,i),e=e.sibling}o(T1,"gj");function k1(e,t,i){var l=e.tag,d=l===5||l===6;if(d)e=d?e.stateNode:e.stateNode.instance,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(k1(e,t,i),e=e.sibling;e!==null;)k1(e,t,i),e=e.sibling}o(k1,"hj");function db(e,t){for(var i=t,l=!1,d,v;;){if(!l){l=i.return;e:for(;;){if(l===null)throw Error(ye(160));switch(d=l.stateNode,l.tag){case 5:v=!1;break e;case 3:d=d.containerInfo,v=!0;break e;case 4:d=d.containerInfo,v=!0;break e}l=l.return}l=!0}if(i.tag===5||i.tag===6){e:for(var p=e,y=i,_=y;;)if(ub(p,_),_.child!==null&&_.tag!==4)_.child.return=_,_=_.child;else{if(_===y)break e;for(;_.sibling===null;){if(_.return===null||_.return===y)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}v?(p=d,y=i.stateNode,p.nodeType===8?p.parentNode.removeChild(y):p.removeChild(y)):d.removeChild(i.stateNode)}else if(i.tag===4){if(i.child!==null){d=i.stateNode.containerInfo,v=!0,i.child.return=i,i=i.child;continue}}else if(ub(e,i),i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return,i.tag===4&&(l=!1)}i.sibling.return=i.return,i=i.sibling}}o(db,"cj");function O1(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do(l.tag&3)==3&&(e=l.destroy,l.destroy=void 0,e!==void 0&&e()),l=l.next;while(l!==i)}return;case 1:return;case 5:if(i=t.stateNode,i!=null){l=t.memoizedProps;var d=e!==null?e.memoizedProps:l;e=t.type;var v=t.updateQueue;if(t.updateQueue=null,v!==null){for(i[Rv]=l,e==="input"&&l.type==="radio"&&l.name!=null&&XC(i,l),vw(e,d),t=vw(e,l),d=0;dd&&(d=p),i&=~v}if(i=d,i=Yn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*DD(i/1960))-i,10 { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); + var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); + var __objRest = (source, exclude) => { + var target = {}; + for (var prop in source) + if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) + target[prop] = source[prop]; + if (source != null && __getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(source)) { + if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) + target[prop] = source[prop]; + } + return target; + }; + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); + }; + var __reExport = (target, module, desc) => { + if (module && typeof module === "object" || typeof module === "function") { + for (let key of __getOwnPropNames(module)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable }); + } + return target; + }; + var __toModule = (module) => { + return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module); + }; + var __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; + }; + var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + }; + var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); + }; -Add a component higher in the tree to provide a loading indicator or placeholder to display.`)}An!==5&&(An=2),_=E1(_,y),B=p;do{switch(B.tag){case 3:v=_,B.flags|=4096,t&=-t,B.lanes|=t;var ue=ob(B,v,t);CE(B,ue);break e;case 1:v=_;var ie=B.type,he=B.stateNode;if((B.flags&64)==0&&(typeof ie.getDerivedStateFromError=="function"||he!==null&&typeof he.componentDidCatch=="function"&&(Gs===null||!Gs.has(he)))){B.flags|=4096,t&=-t,B.lanes|=t;var me=sb(B,v,t);CE(B,me);break e}}B=B.return}while(B!==null)}Sb(i)}catch(xe){t=xe,rn===i&&i!==null&&(rn=i=i.return);continue}break}while(1)}o(yb,"Sj");function wb(){var e=ig.current;return ig.current=rg,e===null?rg:e}o(wb,"Pj");function dh(e,t){var i=Ge;Ge|=16;var l=wb();di===e&&Qn===t||Yc(e,t);do try{RD();break}catch(d){yb(e,d)}while(1);if(i1(),Ge=i,ig.current=l,rn!==null)throw Error(ye(261));return di=null,Qn=0,An}o(dh,"Tj");function RD(){for(;rn!==null;)xb(rn)}o(RD,"ak");function ID(){for(;rn!==null&&!yD();)xb(rn)}o(ID,"Rj");function xb(e){var t=Eb(e.alternate,e,of);e.memoizedProps=e.pendingProps,t===null?Sb(e):rn=t,N1.current=null}o(xb,"bk");function Sb(e){var t=e;do{var i=t.alternate;if(e=t.return,(t.flags&2048)==0){if(i=kD(i,t,of),i!==null){rn=i;return}if(i=t,i.tag!==24&&i.tag!==23||i.memoizedState===null||(of&1073741824)!=0||(i.mode&4)==0){for(var l=0,d=i.child;d!==null;)l|=d.lanes|d.childLanes,d=d.sibling;i.childLanes=l}e!==null&&(e.flags&2048)==0&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1p&&(y=p,p=ue,ue=y),y=j_(R,ue),v=j_(R,p),y&&v&&(V.rangeCount!==1||V.anchorNode!==y.node||V.anchorOffset!==y.offset||V.focusNode!==v.node||V.focusOffset!==v.offset)&&(K=K.createRange(),K.setStart(y.node,y.offset),V.removeAllRanges(),ue>p?(V.addRange(K),V.extend(v.node,v.offset)):(K.setEnd(v.node,v.offset),V.addRange(K)))))),K=[],V=R;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;RYn()-A1?Yc(e,0):P1|=i),bo(e,t)}o(zD,"Yj");function $D(e,t){var i=e.stateNode;i!==null&&i.delete(t),t=0,t===0&&(t=e.mode,(t&2)==0?t=1:(t&4)==0?t=Bc()===99?1:2:(Fl===0&&(Fl=qc),t=Lc(62914560&~Fl),t===0&&(t=4194304))),i=Yi(),e=fg(e,t),e!==null&&(Ev(e,t,i),bo(e,i))}o($D,"lj");var Eb;Eb=o(function(e,t,i){var l=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Pi.current)ns=!0;else if((i&l)!=0)ns=(e.flags&16384)!=0;else{switch(ns=!1,t.tag){case 3:YE(t),c1();break;case 5:LE(t);break;case 1:Mi(t.type)&&Wv(t);break;case 4:a1(t,t.stateNode.containerInfo);break;case 10:l=t.memoizedProps.value;var d=t.type._context;Cr(zv,d._currentValue),d._currentValue=l;break;case 13:if(t.memoizedState!==null)return(i&t.child.childLanes)!=0?XE(e,t,i):(Cr(_r,_r.current&1),t=Al(e,t,i),t!==null?t.sibling:null);Cr(_r,_r.current&1);break;case 19:if(l=(i&t.childLanes)!=0,(e.flags&64)!=0){if(l)return tb(e,t,i);t.flags|=64}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Cr(_r,_r.current),l)break;return null;case 23:case 24:return t.lanes=0,w1(e,t,i)}return Al(e,t,i)}else ns=!1;switch(t.lanes=0,t.tag){case 2:if(l=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,d=Wc(t,Gn.current),zc(t,i),d=h1(null,t,l,e,d,i),t.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mi(l)){var v=!0;Wv(t)}else v=!1;t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,s1(t);var p=l.getDerivedStateFromProps;typeof p=="function"&&qv(t,l,p,e),d.updater=Vv,t.stateNode=d,d._reactInternals=t,l1(t,l,e,i),t=S1(null,t,l,!0,v,i)}else t.tag=0,Di(null,t,d,i),t=t.child;return t;case 16:d=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,v=d._init,d=v(d._payload),t.type=d,v=t.tag=qD(d),e=rs(d,e),v){case 0:t=x1(null,t,d,e,i);break e;case 1:t=GE(null,t,d,e,i);break e;case 11:t=jE(null,t,d,e,i);break e;case 14:t=qE(null,t,d,rs(d.type,e),l,i);break e}throw Error(ye(306,d,""))}return t;case 0:return l=t.type,d=t.pendingProps,d=t.elementType===l?d:rs(l,d),x1(e,t,l,d,i);case 1:return l=t.type,d=t.pendingProps,d=t.elementType===l?d:rs(l,d),GE(e,t,l,d,i);case 3:if(YE(t),l=t.updateQueue,e===null||l===null)throw Error(ye(282));if(l=t.pendingProps,d=t.memoizedState,d=d!==null?d.element:null,SE(e,t),Xd(t,l,null,i),l=t.memoizedState.element,l===d)c1(),t=Al(e,t,i);else{if(d=t.stateNode,(v=d.hydrate)&&(Ka=Fc(t.stateNode.containerInfo.firstChild),Ml=t,v=Vs=!0),v){if(e=d.mutableSourceEagerHydrationData,e!=null)for(d=0;d{"use strict";function Ob(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ob)}catch(e){console.error(e)}}o(Ob,"checkDCE");Ob(),Nb.exports=kb()});var Pb=fr((JI,Lb)=>{"use strict";var ZD="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Lb.exports=ZD});var Fb=fr((e2,Db)=>{"use strict";var JD=Pb();function Mb(){}o(Mb,"emptyFunction");function Ab(){}o(Ab,"emptyFunctionWithReset");Ab.resetWarningCache=Mb;Db.exports=function(){function e(l,d,v,p,y,_){if(_!==JD){var O=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 O.name="Invariant Violation",O}}o(e,"shim"),e.isRequired=e;function t(){return e}o(t,"getShim");var i={array: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:Ab,resetWarningCache:Mb};return i.PropTypes=i,i}});var Ib=fr((n2,Rb)=>{Rb.exports=Fb()();var t2,r2});var jb=fr(Wt=>{"use strict";var Sn=typeof Symbol=="function"&&Symbol.for,Y1=Sn?Symbol.for("react.element"):60103,X1=Sn?Symbol.for("react.portal"):60106,vg=Sn?Symbol.for("react.fragment"):60107,gg=Sn?Symbol.for("react.strict_mode"):60108,yg=Sn?Symbol.for("react.profiler"):60114,wg=Sn?Symbol.for("react.provider"):60109,xg=Sn?Symbol.for("react.context"):60110,Q1=Sn?Symbol.for("react.async_mode"):60111,Sg=Sn?Symbol.for("react.concurrent_mode"):60111,Cg=Sn?Symbol.for("react.forward_ref"):60112,_g=Sn?Symbol.for("react.suspense"):60113,nF=Sn?Symbol.for("react.suspense_list"):60120,Eg=Sn?Symbol.for("react.memo"):60115,bg=Sn?Symbol.for("react.lazy"):60116,iF=Sn?Symbol.for("react.block"):60121,oF=Sn?Symbol.for("react.fundamental"):60117,sF=Sn?Symbol.for("react.responder"):60118,lF=Sn?Symbol.for("react.scope"):60119;function Xi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Y1:switch(e=e.type,e){case Q1:case Sg:case vg:case yg:case gg:case _g:return e;default:switch(e=e&&e.$$typeof,e){case xg:case Cg:case bg:case Eg:case wg:return e;default:return t}}case X1:return t}}}o(Xi,"z");function $b(e){return Xi(e)===Sg}o($b,"A");Wt.AsyncMode=Q1;Wt.ConcurrentMode=Sg;Wt.ContextConsumer=xg;Wt.ContextProvider=wg;Wt.Element=Y1;Wt.ForwardRef=Cg;Wt.Fragment=vg;Wt.Lazy=bg;Wt.Memo=Eg;Wt.Portal=X1;Wt.Profiler=yg;Wt.StrictMode=gg;Wt.Suspense=_g;Wt.isAsyncMode=function(e){return $b(e)||Xi(e)===Q1};Wt.isConcurrentMode=$b;Wt.isContextConsumer=function(e){return Xi(e)===xg};Wt.isContextProvider=function(e){return Xi(e)===wg};Wt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Y1};Wt.isForwardRef=function(e){return Xi(e)===Cg};Wt.isFragment=function(e){return Xi(e)===vg};Wt.isLazy=function(e){return Xi(e)===bg};Wt.isMemo=function(e){return Xi(e)===Eg};Wt.isPortal=function(e){return Xi(e)===X1};Wt.isProfiler=function(e){return Xi(e)===yg};Wt.isStrictMode=function(e){return Xi(e)===gg};Wt.isSuspense=function(e){return Xi(e)===_g};Wt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vg||e===Sg||e===yg||e===gg||e===_g||e===nF||typeof e=="object"&&e!==null&&(e.$$typeof===bg||e.$$typeof===Eg||e.$$typeof===wg||e.$$typeof===xg||e.$$typeof===Cg||e.$$typeof===oF||e.$$typeof===sF||e.$$typeof===lF||e.$$typeof===iF)};Wt.typeOf=Xi});var Vb=fr((y2,qb)=>{"use strict";qb.exports=jb()});var Jb=fr((w2,Zb)=>{"use strict";var Z1=Vb(),aF={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},uF={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fF={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Kb={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J1={};J1[Z1.ForwardRef]=fF;J1[Z1.Memo]=Kb;function Gb(e){return Z1.isMemo(e)?Kb:J1[e.$$typeof]||aF}o(Gb,"getStatics");var cF=Object.defineProperty,pF=Object.getOwnPropertyNames,Yb=Object.getOwnPropertySymbols,dF=Object.getOwnPropertyDescriptor,hF=Object.getPrototypeOf,Xb=Object.prototype;function Qb(e,t,i){if(typeof t!="string"){if(Xb){var l=hF(t);l&&l!==Xb&&Qb(e,l,i)}var d=pF(t);Yb&&(d=d.concat(Yb(t)));for(var v=Gb(e),p=Gb(t),y=0;y{"use strict";var Cn=typeof Symbol=="function"&&Symbol.for,ex=Cn?Symbol.for("react.element"):60103,tx=Cn?Symbol.for("react.portal"):60106,Tg=Cn?Symbol.for("react.fragment"):60107,kg=Cn?Symbol.for("react.strict_mode"):60108,Og=Cn?Symbol.for("react.profiler"):60114,Ng=Cn?Symbol.for("react.provider"):60109,Lg=Cn?Symbol.for("react.context"):60110,rx=Cn?Symbol.for("react.async_mode"):60111,Pg=Cn?Symbol.for("react.concurrent_mode"):60111,Mg=Cn?Symbol.for("react.forward_ref"):60112,Ag=Cn?Symbol.for("react.suspense"):60113,mF=Cn?Symbol.for("react.suspense_list"):60120,Dg=Cn?Symbol.for("react.memo"):60115,Fg=Cn?Symbol.for("react.lazy"):60116,vF=Cn?Symbol.for("react.block"):60121,gF=Cn?Symbol.for("react.fundamental"):60117,yF=Cn?Symbol.for("react.responder"):60118,wF=Cn?Symbol.for("react.scope"):60119;function Qi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ex:switch(e=e.type,e){case rx:case Pg:case Tg:case Og:case kg:case Ag:return e;default:switch(e=e&&e.$$typeof,e){case Lg:case Mg:case Fg:case Dg:case Ng:return e;default:return t}}case tx:return t}}}o(Qi,"z");function eT(e){return Qi(e)===Pg}o(eT,"A");Bt.AsyncMode=rx;Bt.ConcurrentMode=Pg;Bt.ContextConsumer=Lg;Bt.ContextProvider=Ng;Bt.Element=ex;Bt.ForwardRef=Mg;Bt.Fragment=Tg;Bt.Lazy=Fg;Bt.Memo=Dg;Bt.Portal=tx;Bt.Profiler=Og;Bt.StrictMode=kg;Bt.Suspense=Ag;Bt.isAsyncMode=function(e){return eT(e)||Qi(e)===rx};Bt.isConcurrentMode=eT;Bt.isContextConsumer=function(e){return Qi(e)===Lg};Bt.isContextProvider=function(e){return Qi(e)===Ng};Bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ex};Bt.isForwardRef=function(e){return Qi(e)===Mg};Bt.isFragment=function(e){return Qi(e)===Tg};Bt.isLazy=function(e){return Qi(e)===Fg};Bt.isMemo=function(e){return Qi(e)===Dg};Bt.isPortal=function(e){return Qi(e)===tx};Bt.isProfiler=function(e){return Qi(e)===Og};Bt.isStrictMode=function(e){return Qi(e)===kg};Bt.isSuspense=function(e){return Qi(e)===Ag};Bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tg||e===Pg||e===Og||e===kg||e===Ag||e===mF||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Dg||e.$$typeof===Ng||e.$$typeof===Lg||e.$$typeof===Mg||e.$$typeof===gF||e.$$typeof===yF||e.$$typeof===wF||e.$$typeof===vF)};Bt.typeOf=Qi});var nT=fr((S2,rT)=>{"use strict";rT.exports=tT()});var ep=fr((Jc,wh)=>{(function(){var e,t="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",v="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",y=500,_="__lodash_placeholder__",O=1,D=2,Y=4,B=1,X=2,te=1,Q=2,F=4,P=8,R=16,K=32,V=64,ue=128,ie=256,he=512,me=30,xe="...",Ve=800,Qe=16,Ee=1,xt=2,qe=3,ct=1/0,ze=9007199254740991,lt=17976931348623157e292,Zt=0/0,at=4294967295,Rr=at-1,Kt=at>>>1,Ot=[["ary",ue],["bind",te],["bindKey",Q],["curry",P],["curryRight",R],["flip",he],["partial",K],["partialRight",V],["rearg",ie]],St="[object Arguments]",it="[object Array]",br="[object AsyncFunction]",zt="[object Boolean]",$t="[object Date]",ne="[object DOMException]",Ze="[object Error]",Tr="[object Function]",jt="[object GeneratorFunction]",qt="[object Map]",we="[object Number]",kr="[object Null]",ln="[object Object]",In="[object Promise]",ii="[object Proxy]",an="[object RegExp]",Gt="[object Set]",dr="[object String]",ut="[object Symbol]",Io="[object Undefined]",yr="[object WeakMap]",Ii="[object WeakSet]",un="[object ArrayBuffer]",Hn="[object DataView]",vi="[object Float32Array]",gi="[object Float64Array]",Wn="[object Int8Array]",Tn="[object Int16Array]",Zs="[object Int32Array]",H="[object Uint8Array]",J="[object Uint8ClampedArray]",de="[object Uint16Array]",be="[object Uint32Array]",Jt=/\b__p \+= '';/g,zl=/\b(__p \+=) '' \+/g,Ft=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ir=/&(?:amp|lt|gt|quot|#39);/g,er=/[&<>"']/g,oi=RegExp(Ir.source),fs=RegExp(er.source),no=/<%-([\s\S]+?)%>/g,yi=/<%([\s\S]+?)%>/g,Js=/<%=([\s\S]+?)%>/g,cs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fn=/^\w*$/,_p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,el=/[\\^$.*+?()[\]{}|]/g,Ef=RegExp(el.source),tl=/^\s+/,Ep=/\s/,bf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,au=/\{\n\/\* \[wrapped with (.+)\] \*/,bp=/,? & /,$l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ps=/[()=,{}\[\]\/\s]/,Tp=/\\(\\)?/g,Tf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rl=/\w*$/,uu=/^[-+]0x[0-9a-f]+$/i,Ho=/^0b[01]+$/i,kp=/^\[object .+?Constructor\]$/,Wo=/^0o[0-7]+$/i,jl=/^(?:0|[1-9]\d*)$/,kf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rt=/($^)/,Le=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",fu="\\u0300-\\u036f",xi="\\ufe20-\\ufe2f",dt="\\u20d0-\\u20ff",Hi=fu+xi+dt,Bo="\\u2700-\\u27bf",nl="a-z\\xdf-\\xf6\\xf8-\\xff",ae="\\xac\\xb1\\xd7\\xf7",Ue="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ql="\\u2000-\\u206f",Vl=" \\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",Uo="A-Z\\xc0-\\xd6\\xd8-\\xde",ds="\\ufe0e\\ufe0f",Kl=ae+Ue+ql+Vl,Be="['\u2019]",Op="["+wi+"]",il="["+Kl+"]",si="["+Hi+"]",Bn="\\d+",cu="["+Bo+"]",pu="["+nl+"]",hs="[^"+wi+Kl+Bn+Bo+nl+Uo+"]",ol="\\ud83c[\\udffb-\\udfff]",Of="(?:"+si+"|"+ol+")",Gl="[^"+wi+"]",Yl="(?:\\ud83c[\\udde6-\\uddff]){2}",Xl="[\\ud800-\\udbff][\\udc00-\\udfff]",zo="["+Uo+"]",du="\\u200d",Nf="(?:"+pu+"|"+hs+")",Np="(?:"+zo+"|"+hs+")",hu="(?:"+Be+"(?:d|ll|m|re|s|t|ve))?",Si="(?:"+Be+"(?:D|LL|M|RE|S|T|VE))?",M=Of+"?",We="["+ds+"]?",$o="(?:"+du+"(?:"+[Gl,Yl,Xl].join("|")+")"+We+M+")*",cn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Se=We+M+$o,Ql="(?:"+[cu,Yl,Xl].join("|")+")"+Se,Qh="(?:"+[Gl+si+"?",si,Yl,Xl,Op].join("|")+")",Lf=RegExp(Be,"g"),Lp=RegExp(si,"g"),Pf=RegExp(ol+"(?="+ol+")|"+Qh+Se,"g"),vu=RegExp([zo+"?"+pu+"+"+hu+"(?="+[il,zo,"$"].join("|")+")",Np+"+"+Si+"(?="+[il,zo+Nf,"$"].join("|")+")",zo+"?"+Nf+"+"+hu,zo+"+"+Si,mu,cn,Bn,Ql].join("|"),"g"),ms=RegExp("["+du+wi+Hi+ds+"]"),Pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vs=["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"],Zl=-1,Ae={};Ae[vi]=Ae[gi]=Ae[Wn]=Ae[Tn]=Ae[Zs]=Ae[H]=Ae[J]=Ae[de]=Ae[be]=!0,Ae[St]=Ae[it]=Ae[un]=Ae[zt]=Ae[Hn]=Ae[$t]=Ae[Ze]=Ae[Tr]=Ae[qt]=Ae[we]=Ae[ln]=Ae[an]=Ae[Gt]=Ae[dr]=Ae[yr]=!1;var Tt={};Tt[St]=Tt[it]=Tt[un]=Tt[Hn]=Tt[zt]=Tt[$t]=Tt[vi]=Tt[gi]=Tt[Wn]=Tt[Tn]=Tt[Zs]=Tt[qt]=Tt[we]=Tt[ln]=Tt[an]=Tt[Gt]=Tt[dr]=Tt[ut]=Tt[H]=Tt[J]=Tt[de]=Tt[be]=!0,Tt[Ze]=Tt[Tr]=Tt[yr]=!1;var Un={\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"},gu={"&":"&","<":"<",">":">",'"':""","'":"'"},sl={"&":"&","<":"<",">":">",""":'"',"'":"'"},kn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pp=parseFloat,Mp=parseInt,Jl=typeof global=="object"&&global&&global.Object===Object&&global,Hr=typeof self=="object"&&self&&self.Object===Object&&self,Nt=Jl||Hr||Function("return this")(),gs=typeof Jc=="object"&&Jc&&!Jc.nodeType&&Jc,Wr=gs&&typeof wh=="object"&&wh&&!wh.nodeType&&wh,ys=Wr&&Wr.exports===gs,ll=ys&&Jl.process,Or=function(){try{var q=Wr&&Wr.require&&Wr.require("util").types;return q||ll&&ll.binding&&ll.binding("util")}catch(re){}}(),Mf=Or&&Or.isArrayBuffer,Af=Or&&Or.isDate,yu=Or&&Or.isMap,wu=Or&&Or.isRegExp,ea=Or&&Or.isSet,ta=Or&&Or.isTypedArray;function On(q,re,Z){switch(Z.length){case 0:return q.call(re);case 1:return q.call(re,Z[0]);case 2:return q.call(re,Z[0],Z[1]);case 3:return q.call(re,Z[0],Z[1],Z[2])}return q.apply(re,Z)}o(On,"apply");function Ap(q,re,Z,Oe){for(var Ke=-1,_t=q==null?0:q.length;++Ke<_t;){var Nr=q[Ke];re(Oe,Nr,Z(Nr),q)}return Oe}o(Ap,"arrayAggregator");function zn(q,re){for(var Z=-1,Oe=q==null?0:q.length;++Z-1}o(ws,"arrayIncludes");function xs(q,re,Z){for(var Oe=-1,Ke=q==null?0:q.length;++Oe-1;);return Z}o(Wi,"charsStartIndex");function lo(q,re){for(var Z=q.length;Z--&&jo(re,q[Z],0)>-1;);return Z}o(lo,"charsEndIndex");function Ip(q,re){for(var Z=q.length,Oe=0;Z--;)q[Z]===re&&++Oe;return Oe}o(Ip,"countHolders");var ul=k(Un),Bi=k(gu);function Zh(q){return"\\"+kn[q]}o(Zh,"escapeStringChar");function Hp(q,re){return q==null?e:q[re]}o(Hp,"getValue");function Ui(q){return ms.test(q)}o(Ui,"hasUnicode");function ao(q){return Pe.test(q)}o(ao,"hasUnicodeWord");function Jh(q){for(var re,Z=[];!(re=q.next()).done;)Z.push(re.value);return Z}o(Jh,"iteratorToArray");function Rf(q){var re=-1,Z=Array(q.size);return q.forEach(function(Oe,Ke){Z[++re]=[Ke,Oe]}),Z}o(Rf,"mapToArray");function em(q,re){return function(Z){return q(re(Z))}}o(em,"overArg");function Cs(q,re){for(var Z=-1,Oe=q.length,Ke=0,_t=[];++Z-1}o(t0,"listCacheHas");function jf(s,f){var h=this.__data__,w=gl(h,s);return w<0?(++this.size,h.push([s,f])):h[w][1]=f,this}o(jf,"listCacheSet"),mo.prototype.clear=qp,mo.prototype.delete=cm,mo.prototype.get=Ou,mo.prototype.has=t0,mo.prototype.set=jf;function vr(s){var f=-1,h=s==null?0:s.length;for(this.clear();++f=f?s:f)),s}o(yl,"baseClamp");function Ln(s,f,h,w,b,N){var I,W=f&O,G=f&D,se=f&Y;if(h&&(I=b?h(s,w,b,N):h(s)),I!==e)return I;if(!gr(s))return s;var le=tt(s);if(le){if(I=u(s),!W)return zr(s,I)}else{var fe=hn(s),ke=fe==Tr||fe==jt;if(Pa(s))return ad(s,W);if(fe==ln||fe==St||ke&&!b){if(I=G||ke?{}:a(s),!W)return G?Fm(s,i0(I,s)):p0(s,Xp(I,s))}else{if(!Tt[fe])return b?s:{};I=c(s,fe,W)}}N||(N=new Ei);var Ie=N.get(s);if(Ie)return Ie;N.set(s,I),XS(s)?s.forEach(function(je){I.add(Ln(je,f,h,je,s,N))}):GS(s)&&s.forEach(function(je,pt){I.set(pt,Ln(je,f,h,pt,s,N))});var $e=se?G?cc:zu:G?Ni:wn,ot=le?e:$e(s);return zn(ot||s,function(je,pt){ot&&(pt=je,je=s[pt]),Lu(I,pt,Ln(je,f,h,pt,s,N))}),I}o(Ln,"baseClone");function vm(s){var f=wn(s);return function(h){return gm(h,s,f)}}o(vm,"baseConforms");function gm(s,f,h){var w=h.length;if(s==null)return!w;for(s=ht(s);w--;){var b=h[w],N=f[b],I=s[b];if(I===e&&!(b in s)||!N(I))return!1}return!0}o(gm,"baseConformsTo");function ym(s,f,h){if(typeof s!="function")throw new qn(d);return Pt(function(){s.apply(e,h)},f)}o(ym,"baseDelay");function da(s,f,h,w){var b=-1,N=ws,I=!0,W=s.length,G=[],se=f.length;if(!W)return G;h&&(f=Ct(f,wr(h))),w?(N=xs,I=!1):f.length>=i&&(N=Gr,I=!1,f=new Zr(f));e:for(;++bb?0:b+h),w=w===e||w>b?b:nt(w),w<0&&(w+=b),w=h>w?0:ZS(w);h0&&h(W)?f>1?Jr(W,f-1,h,w,b):oo(b,W):w||(b[b.length]=W)}return b}o(Jr,"baseFlatten");var Yf=Im(),Br=Im(!0);function ui(s,f){return s&&Yf(s,f,wn)}o(ui,"baseForOwn");function Xf(s,f){return s&&Br(s,f,wn)}o(Xf,"baseForOwnRight");function Mu(s,f){return io(f,function(h){return Tl(s[h])})}o(Mu,"baseFunctions");function Fs(s,f){f=ji(f,s);for(var h=0,w=f.length;s!=null&&hf}o(Qf,"baseGt");function wm(s,f){return s!=null&&Ye.call(s,f)}o(wm,"baseHas");function xm(s,f){return s!=null&&f in ht(s)}o(xm,"baseHasIn");function ha(s,f,h){return s>=Yr(f,h)&&s=120&&le.length>=120)?new Zr(I&&le):e}le=s[0];var fe=-1,ke=W[0];e:for(;++fe-1;)W!==s&&aa.call(W,G,1),aa.call(s,G,1);return s}o(td,"basePullAll");function rd(s,f){for(var h=s?f.length:0,w=h-1;h--;){var b=f[h];if(h==w||b!==N){var N=b;S(b)?aa.call(s,b,1):Iu(s,b)}}return s}o(rd,"basePullAt");function rc(s,f){return s+fa(Ns()*(f-s+1))}o(rc,"baseRandom");function Nm(s,f,h,w){for(var b=-1,N=tr(ua((f-s)/(h||1)),0),I=Z(N);N--;)I[w?N:++b]=s,s+=h;return I}o(Nm,"baseRange");function nd(s,f){var h="";if(!s||f<1||f>ze)return h;do f%2&&(h+=s),f=fa(f/2),f&&(s+=s);while(f);return h}o(nd,"baseRepeat");function rt(s,f){return mn(Re(s,f,Li),s+"")}o(rt,"baseRest");function a0(s){return qf(vc(s))}o(a0,"baseSample");function Hs(s,f){var h=vc(s);return $r(h,yl(f,0,h.length))}o(Hs,"baseSampleSize");function Ko(s,f,h,w){if(!gr(s))return s;f=ji(f,s);for(var b=-1,N=f.length,I=N-1,W=s;W!=null&&++bb?0:b+f),h=h>b?b:h,h<0&&(h+=b),b=f>h?0:h-f>>>0,f>>>=0;for(var N=Z(b);++w>>1,I=s[N];I!==null&&!qi(I)&&(h?I<=f:I=i){var se=f?null:Uu(s);if(se)return If(se);I=!1,b=Gr,G=new Zr}else G=f?[]:W;e:for(;++w=w?s:bi(s,f,h)}o(Ws,"castSlice");var Ca=jy||function(s){return Nt.clearTimeout(s)};function ad(s,f){if(f)return s.slice();var h=s.length,w=lm?lm(h):new s.constructor(h);return s.copy(w),w}o(ad,"cloneBuffer");function sc(s){var f=new s.constructor(s.byteLength);return new pl(f).set(new pl(s)),f}o(sc,"cloneArrayBuffer");function c0(s,f){var h=f?sc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}o(c0,"cloneDataView");function ud(s){var f=new s.constructor(s.source,rl.exec(s));return f.lastIndex=s.lastIndex,f}o(ud,"cloneRegExp");function Pm(s){return rr?ht(rr.call(s)):{}}o(Pm,"cloneSymbol");function Mm(s,f){var h=f?sc(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}o(Mm,"cloneTypedArray");function fd(s,f){if(s!==f){var h=s!==e,w=s===null,b=s===s,N=qi(s),I=f!==e,W=f===null,G=f===f,se=qi(f);if(!W&&!se&&!N&&s>f||N&&I&&G&&!W&&!se||w&&I&&G||!h&&G||!b)return 1;if(!w&&!N&&!se&&s=W)return G;var se=h[w];return G*(se=="desc"?-1:1)}}return s.index-f.index}o(Am,"compareMultiple");function Dm(s,f,h,w){for(var b=-1,N=s.length,I=h.length,W=-1,G=f.length,se=tr(N-I,0),le=Z(G+se),fe=!w;++W1?h[b-1]:e,I=b>2?h[2]:e;for(N=s.length>3&&typeof N=="function"?(b--,N):e,I&&C(h[0],h[1],I)&&(N=b<3?e:N,b=1),f=ht(f);++w-1?b[N?f[I]:I]:e}}o(pd,"createFind");function Bm(s){return Xo(function(f){var h=f.length,w=h,b=Nn.prototype.thru;for(s&&f.reverse();w--;){var N=f[w];if(typeof N!="function")throw new qn(d);if(b&&!I&&$u(N)=="wrapper")var I=new Nn([],!0)}for(w=I?w:h;++w1&&mt.reverse(),le&&GW))return!1;var se=N.get(s),le=N.get(f);if(se&&le)return se==f&&le==s;var fe=-1,ke=!0,Ie=h&X?new Zr:e;for(N.set(s,f),N.set(f,s);++fe1?"& ":"")+f[w],f=f.join(h>2?", ":" "),s.replace(bf,`{ -/* [wrapped with `+f+`] */ -`)}o(m,"insertWrapDetails");function g(s){return tt(s)||ju(s)||!!(dl&&s&&s[dl])}o(g,"isFlattenable");function S(s,f){var h=typeof s;return f=f??ze,!!f&&(h=="number"||h!="symbol"&&jl.test(s))&&s>-1&&s%1==0&&s0){if(++f>=Ve)return arguments[0]}else f=0;return s.apply(e,arguments)}}o(ur,"shortOut");function $r(s,f){var h=-1,w=s.length,b=w-1;for(f=f===e?w:f;++h1?s[f-1]:e;return h=typeof h=="function"?(s.pop(),h):e,RS(s,h)});function IS(s){var f=T(s);return f.__chain__=!0,f}o(IS,"chain");function NN(s,f){return f(s),s}o(NN,"tap");function Km(s,f){return f(s)}o(Km,"thru");var LN=Xo(function(s){var f=s.length,h=f?s[0]:0,w=this.__wrapped__,b=o(function(N){return Qp(N,s)},"interceptor");return f>1||this.__actions__.length||!(w instanceof ft)||!S(h)?this.thru(b):(w=w.slice(h,+h+(f?1:0)),w.__actions__.push({func:Km,args:[b],thisArg:e}),new Nn(w,this.__chain__).thru(function(N){return f&&!N.length&&N.push(e),N}))});function PN(){return IS(this)}o(PN,"wrapperChain");function MN(){return new Nn(this.value(),this.__chain__)}o(MN,"wrapperCommit");function AN(){this.__values__===e&&(this.__values__=QS(this.value()));var s=this.__index__>=this.__values__.length,f=s?e:this.__values__[this.__index__++];return{done:s,value:f}}o(AN,"wrapperNext");function DN(){return this}o(DN,"wrapperToIterator");function FN(s){for(var f,h=this;h instanceof $f;){var w=gn(h);w.__index__=0,w.__values__=e,f?b.__wrapped__=w:f=w;var b=w;h=h.__wrapped__}return b.__wrapped__=s,f}o(FN,"wrapperPlant");function RN(){var s=this.__wrapped__;if(s instanceof ft){var f=s;return this.__actions__.length&&(f=new ft(this)),f=f.reverse(),f.__actions__.push({func:Km,args:[h0],thisArg:e}),new Nn(f,this.__chain__)}return this.thru(h0)}o(RN,"wrapperReverse");function IN(){return Lm(this.__wrapped__,this.__actions__)}o(IN,"wrapperValue");var HN=ac(function(s,f,h){Ye.call(s,h)?++s[h]:vo(s,h,1)});function WN(s,f,h){var w=tt(s)?xu:Gf;return h&&C(s,f,h)&&(f=e),w(s,He(f,3))}o(WN,"every");function BN(s,f){var h=tt(s)?io:Jp;return h(s,He(f,3))}o(BN,"filter");var UN=pd(hc),zN=pd(MS);function $N(s,f){return Jr(Gm(s,f),1)}o($N,"flatMap");function jN(s,f){return Jr(Gm(s,f),ct)}o(jN,"flatMapDeep");function qN(s,f,h){return h=h===e?1:nt(h),Jr(Gm(s,f),h)}o(qN,"flatMapDepth");function HS(s,f){var h=tt(s)?zn:ai;return h(s,He(f,3))}o(HS,"forEach");function WS(s,f){var h=tt(s)?Dp:Kf;return h(s,He(f,3))}o(WS,"forEachRight");var VN=ac(function(s,f,h){Ye.call(s,h)?s[h].push(f):vo(s,h,[f])});function KN(s,f,h,w){s=Oi(s)?s:vc(s),h=h&&!w?nt(h):0;var b=s.length;return h<0&&(h=tr(b+h,0)),Jm(s)?h<=b&&s.indexOf(f,h)>-1:!!b&&jo(s,f,h)>-1}o(KN,"includes");var GN=rt(function(s,f,h){var w=-1,b=typeof f=="function",N=Oi(s)?Z(s.length):[];return ai(s,function(I){N[++w]=b?On(f,I,h):ma(I,f,h)}),N}),YN=ac(function(s,f,h){vo(s,h,f)});function Gm(s,f){var h=tt(s)?Ct:xa;return h(s,He(f,3))}o(Gm,"map");function XN(s,f,h,w){return s==null?[]:(tt(f)||(f=f==null?[]:[f]),h=w?e:h,tt(h)||(h=h==null?[]:[h]),pn(s,f,h))}o(XN,"orderBy");var QN=ac(function(s,f,h){s[h?0:1].push(f)},function(){return[[],[]]});function ZN(s,f,h){var w=tt(s)?ra:U,b=arguments.length<3;return w(s,He(f,4),h,b,ai)}o(ZN,"reduce");function JN(s,f,h){var w=tt(s)?Fp:U,b=arguments.length<3;return w(s,He(f,4),h,b,Kf)}o(JN,"reduceRight");function eL(s,f){var h=tt(s)?io:Jp;return h(s,Qm(He(f,3)))}o(eL,"reject");function tL(s){var f=tt(s)?qf:a0;return f(s)}o(tL,"sample");function rL(s,f,h){(h?C(s,f,h):f===e)?f=1:f=nt(f);var w=tt(s)?Ds:Hs;return w(s,f)}o(rL,"sampleSize");function nL(s){var f=tt(s)?mm:Go;return f(s)}o(nL,"shuffle");function iL(s){if(s==null)return 0;if(Oi(s))return Jm(s)?fl(s):s.length;var f=hn(s);return f==qt||f==Gt?s.size:ec(s).length}o(iL,"size");function oL(s,f,h){var w=tt(s)?so:u0;return h&&C(s,f,h)&&(f=e),w(s,He(f,3))}o(oL,"some");var sL=rt(function(s,f){if(s==null)return[];var h=f.length;return h>1&&C(s,f[0],f[1])?f=[]:h>2&&C(f[0],f[1],f[2])&&(f=[f[0]]),pn(s,Jr(f,1),[])}),Ym=qy||function(){return Nt.Date.now()};function lL(s,f){if(typeof f!="function")throw new qn(d);return s=nt(s),function(){if(--s<1)return f.apply(this,arguments)}}o(lL,"after");function BS(s,f,h){return f=h?e:f,f=s&&f==null?s.length:f,ki(s,ue,e,e,e,e,f)}o(BS,"ary");function US(s,f){var h;if(typeof f!="function")throw new qn(d);return s=nt(s),function(){return--s>0&&(h=f.apply(this,arguments)),s<=1&&(f=e),h}}o(US,"before");var v0=rt(function(s,f,h){var w=te;if(h.length){var b=Cs(h,ka(v0));w|=K}return ki(s,w,f,h,b)}),zS=rt(function(s,f,h){var w=te|Q;if(h.length){var b=Cs(h,ka(zS));w|=K}return ki(f,w,s,h,b)});function $S(s,f,h){f=h?e:f;var w=ki(s,P,e,e,e,e,e,f);return w.placeholder=$S.placeholder,w}o($S,"curry");function jS(s,f,h){f=h?e:f;var w=ki(s,R,e,e,e,e,e,f);return w.placeholder=jS.placeholder,w}o(jS,"curryRight");function qS(s,f,h){var w,b,N,I,W,G,se=0,le=!1,fe=!1,ke=!0;if(typeof s!="function")throw new qn(d);f=wo(f)||0,gr(h)&&(le=!!h.leading,fe="maxWait"in h,N=fe?tr(wo(h.maxWait)||0,f):N,ke="trailing"in h?!!h.trailing:ke);function Ie(Ar){var Jo=w,Ol=b;return w=b=e,se=Ar,I=s.apply(Ol,Jo),I}o(Ie,"invokeFunc");function $e(Ar){return se=Ar,W=Pt(pt,f),le?Ie(Ar):I}o($e,"leadingEdge");function ot(Ar){var Jo=Ar-G,Ol=Ar-se,fC=f-Jo;return fe?Yr(fC,N-Ol):fC}o(ot,"remainingWait");function je(Ar){var Jo=Ar-G,Ol=Ar-se;return G===e||Jo>=f||Jo<0||fe&&Ol>=N}o(je,"shouldInvoke");function pt(){var Ar=Ym();if(je(Ar))return mt(Ar);W=Pt(pt,ot(Ar))}o(pt,"timerExpired");function mt(Ar){return W=e,ke&&w?Ie(Ar):(w=b=e,I)}o(mt,"trailingEdge");function Vi(){W!==e&&Ca(W),se=0,w=G=b=W=e}o(Vi,"cancel");function ci(){return W===e?I:mt(Ym())}o(ci,"flush");function Ki(){var Ar=Ym(),Jo=je(Ar);if(w=arguments,b=this,G=Ar,Jo){if(W===e)return $e(G);if(fe)return Ca(W),W=Pt(pt,f),Ie(G)}return W===e&&(W=Pt(pt,f)),I}return o(Ki,"debounced"),Ki.cancel=Vi,Ki.flush=ci,Ki}o(qS,"debounce");var aL=rt(function(s,f){return ym(s,1,f)}),uL=rt(function(s,f,h){return ym(s,wo(f)||0,h)});function fL(s){return ki(s,he)}o(fL,"flip");function Xm(s,f){if(typeof s!="function"||f!=null&&typeof f!="function")throw new qn(d);var h=o(function(){var w=arguments,b=f?f.apply(this,w):w[0],N=h.cache;if(N.has(b))return N.get(b);var I=s.apply(this,w);return h.cache=N.set(b,I)||N,I},"memoized");return h.cache=new(Xm.Cache||vr),h}o(Xm,"memoize"),Xm.Cache=vr;function Qm(s){if(typeof s!="function")throw new qn(d);return function(){var f=arguments;switch(f.length){case 0:return!s.call(this);case 1:return!s.call(this,f[0]);case 2:return!s.call(this,f[0],f[1]);case 3:return!s.call(this,f[0],f[1],f[2])}return!s.apply(this,f)}}o(Qm,"negate");function cL(s){return US(2,s)}o(cL,"once");var pL=f0(function(s,f){f=f.length==1&&tt(f[0])?Ct(f[0],wr(He())):Ct(Jr(f,1),wr(He()));var h=f.length;return rt(function(w){for(var b=-1,N=Yr(w.length,h);++b=f}),ju=va(function(){return arguments}())?va:function(s){return Sr(s)&&Ye.call(s,"callee")&&!Bf.call(s,"callee")},tt=Z.isArray,kL=Mf?wr(Mf):o0;function Oi(s){return s!=null&&Zm(s.length)&&!Tl(s)}o(Oi,"isArrayLike");function Mr(s){return Sr(s)&&Oi(s)}o(Mr,"isArrayLikeObject");function OL(s){return s===!0||s===!1||Sr(s)&&Ur(s)==zt}o(OL,"isBoolean");var Pa=Eu||O0,NL=Af?wr(Af):ga;function LL(s){return Sr(s)&&s.nodeType===1&&!gd(s)}o(LL,"isElement");function PL(s){if(s==null)return!0;if(Oi(s)&&(tt(s)||typeof s=="string"||typeof s.splice=="function"||Pa(s)||mc(s)||ju(s)))return!s.length;var f=hn(s);if(f==qt||f==Gt)return!s.size;if(ee(s))return!ec(s).length;for(var h in s)if(Ye.call(s,h))return!1;return!0}o(PL,"isEmpty");function ML(s,f){return ya(s,f)}o(ML,"isEqual");function AL(s,f,h){h=typeof h=="function"?h:e;var w=h?h(s,f):e;return w===e?ya(s,f,e,h):!!w}o(AL,"isEqualWith");function y0(s){if(!Sr(s))return!1;var f=Ur(s);return f==Ze||f==ne||typeof s.message=="string"&&typeof s.name=="string"&&!gd(s)}o(y0,"isError");function DL(s){return typeof s=="number"&&am(s)}o(DL,"isFinite");function Tl(s){if(!gr(s))return!1;var f=Ur(s);return f==Tr||f==jt||f==br||f==ii}o(Tl,"isFunction");function KS(s){return typeof s=="number"&&s==nt(s)}o(KS,"isInteger");function Zm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ze}o(Zm,"isLength");function gr(s){var f=typeof s;return s!=null&&(f=="object"||f=="function")}o(gr,"isObject");function Sr(s){return s!=null&&typeof s=="object"}o(Sr,"isObjectLike");var GS=yu?wr(yu):Cm;function FL(s,f){return s===f||xl(s,f,Oa(f))}o(FL,"isMatch");function RL(s,f,h){return h=typeof h=="function"?h:e,xl(s,f,Oa(f),h)}o(RL,"isMatchWith");function IL(s){return YS(s)&&s!=+s}o(IL,"isNaN");function HL(s){if(z(s))throw new Ke(l);return wa(s)}o(HL,"isNative");function WL(s){return s===null}o(WL,"isNull");function BL(s){return s==null}o(BL,"isNil");function YS(s){return typeof s=="number"||Sr(s)&&Ur(s)==we}o(YS,"isNumber");function gd(s){if(!Sr(s)||Ur(s)!=ln)return!1;var f=la(s);if(f===null)return!0;var h=Ye.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&co.call(h)==$y}o(gd,"isPlainObject");var w0=wu?wr(wu):Au;function UL(s){return KS(s)&&s>=-ze&&s<=ze}o(UL,"isSafeInteger");var XS=ea?wr(ea):Du;function Jm(s){return typeof s=="string"||!tt(s)&&Sr(s)&&Ur(s)==dr}o(Jm,"isString");function qi(s){return typeof s=="symbol"||Sr(s)&&Ur(s)==ut}o(qi,"isSymbol");var mc=ta?wr(ta):_m;function zL(s){return s===e}o(zL,"isUndefined");function $L(s){return Sr(s)&&hn(s)==yr}o($L,"isWeakMap");function jL(s){return Sr(s)&&Ur(s)==Ii}o(jL,"isWeakSet");var qL=Lt(Is),VL=Lt(function(s,f){return s<=f});function QS(s){if(!s)return[];if(Oi(s))return Jm(s)?_i(s):zr(s);if(Ts&&s[Ts])return Jh(s[Ts]());var f=hn(s),h=f==qt?Rf:f==Gt?If:vc;return h(s)}o(QS,"toArray");function kl(s){if(!s)return s===0?s:0;if(s=wo(s),s===ct||s===-ct){var f=s<0?-1:1;return f*lt}return s===s?s:0}o(kl,"toFinite");function nt(s){var f=kl(s),h=f%1;return f===f?h?f-h:f:0}o(nt,"toInteger");function ZS(s){return s?yl(nt(s),0,at):0}o(ZS,"toLength");function wo(s){if(typeof s=="number")return s;if(qi(s))return Zt;if(gr(s)){var f=typeof s.valueOf=="function"?s.valueOf():s;s=gr(f)?f+"":f}if(typeof s!="string")return s===0?s:+s;s=jn(s);var h=Ho.test(s);return h||Wo.test(s)?Mp(s.slice(2),h?2:8):uu.test(s)?Zt:+s}o(wo,"toNumber");function JS(s){return Vn(s,Ni(s))}o(JS,"toPlainObject");function KL(s){return s?yl(nt(s),-ze,ze):s===0?s:0}o(KL,"toSafeInteger");function Mt(s){return s==null?"":dn(s)}o(Mt,"toString");var GL=_a(function(s,f){if(ee(f)||Oi(f)){Vn(f,wn(f),s);return}for(var h in f)Ye.call(f,h)&&Lu(s,h,f[h])}),eC=_a(function(s,f){Vn(f,Ni(f),s)}),ev=_a(function(s,f,h,w){Vn(f,Ni(f),s,w)}),YL=_a(function(s,f,h,w){Vn(f,wn(f),s,w)}),XL=Xo(Qp);function QL(s,f){var h=ho(s);return f==null?h:Xp(h,f)}o(QL,"create");var ZL=rt(function(s,f){s=ht(s);var h=-1,w=f.length,b=w>2?f[2]:e;for(b&&C(f[0],f[1],b)&&(w=1);++h1),N}),Vn(s,cc(s),h),w&&(h=Ln(h,O|D|Y,$m));for(var b=f.length;b--;)Iu(h,f[b]);return h});function vP(s,f){return rC(s,Qm(He(f)))}o(vP,"omitBy");var gP=Xo(function(s,f){return s==null?{}:km(s,f)});function rC(s,f){if(s==null)return{};var h=Ct(cc(s),function(w){return[w]});return f=He(f),Om(s,h,function(w,b){return f(w,b[0])})}o(rC,"pickBy");function yP(s,f,h){f=ji(f,s);var w=-1,b=f.length;for(b||(b=1,s=e);++wf){var w=s;s=f,f=w}if(h||s%1||f%1){var b=Ns();return Yr(s+b*(f-s+Pp("1e-"+((b+"").length-1))),f)}return rc(s,f)}o(OP,"random");var NP=Ea(function(s,f,h){return f=f.toLowerCase(),s+(h?oC(f):f)});function oC(s){return C0(Mt(s).toLowerCase())}o(oC,"capitalize");function sC(s){return s=Mt(s),s&&s.replace(kf,ul).replace(Lp,"")}o(sC,"deburr");function LP(s,f,h){s=Mt(s),f=dn(f);var w=s.length;h=h===e?w:yl(nt(h),0,w);var b=h;return h-=f.length,h>=0&&s.slice(h,b)==f}o(LP,"endsWith");function PP(s){return s=Mt(s),s&&fs.test(s)?s.replace(er,Bi):s}o(PP,"escape");function MP(s){return s=Mt(s),s&&Ef.test(s)?s.replace(el,"\\$&"):s}o(MP,"escapeRegExp");var AP=Ea(function(s,f,h){return s+(h?"-":"")+f.toLowerCase()}),DP=Ea(function(s,f,h){return s+(h?" ":"")+f.toLowerCase()}),FP=Wm("toLowerCase");function RP(s,f,h){s=Mt(s),f=nt(f);var w=f?fl(s):0;if(!f||w>=f)return s;var b=(f-w)/2;return uc(fa(b),h)+s+uc(ua(b),h)}o(RP,"pad");function IP(s,f,h){s=Mt(s),f=nt(f);var w=f?fl(s):0;return f&&w>>0,h?(s=Mt(s),s&&(typeof f=="string"||f!=null&&!w0(f))&&(f=dn(f),!f&&Ui(s))?Ws(_i(s),0,h):s.split(f,h)):[]}o($P,"split");var jP=Ea(function(s,f,h){return s+(h?" ":"")+C0(f)});function qP(s,f,h){return s=Mt(s),h=h==null?0:yl(nt(h),0,s.length),f=dn(f),s.slice(h,h+f.length)==f}o(qP,"startsWith");function VP(s,f,h){var w=T.templateSettings;h&&C(s,f,h)&&(f=e),s=Mt(s),f=ev({},f,w,fc);var b=ev({},f.imports,w.imports,fc),N=wn(b),I=Ci(b,N),W,G,se=0,le=f.interpolate||Rt,fe="__p += '",ke=_s((f.escape||Rt).source+"|"+le.source+"|"+(le===Js?Tf:Rt).source+"|"+(f.evaluate||Rt).source+"|$","g"),Ie="//# sourceURL="+(Ye.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zl+"]")+` -`;s.replace(ke,function(je,pt,mt,Vi,ci,Ki){return mt||(mt=Vi),fe+=s.slice(se,Ki).replace(Le,Zh),pt&&(W=!0,fe+=`' + -__e(`+pt+`) + -'`),ci&&(G=!0,fe+=`'; -`+ci+`; -__p += '`),mt&&(fe+=`' + -((__t = (`+mt+`)) == null ? '' : __t) + -'`),se=Ki+je.length,je}),fe+=`'; -`;var $e=Ye.call(f,"variable")&&f.variable;if(!$e)fe=`with (obj) { -`+fe+` -} -`;else if(ps.test($e))throw new Ke(v);fe=(G?fe.replace(Jt,""):fe).replace(zl,"$1").replace(Ft,"$1;"),fe="function("+($e||"obj")+`) { -`+($e?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(W?", __e = _.escape":"")+(G?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+fe+`return __p -}`;var ot=aC(function(){return _t(N,Ie+"return "+fe).apply(e,I)});if(ot.source=fe,y0(ot))throw ot;return ot}o(VP,"template");function KP(s){return Mt(s).toLowerCase()}o(KP,"toLower");function GP(s){return Mt(s).toUpperCase()}o(GP,"toUpper");function YP(s,f,h){if(s=Mt(s),s&&(h||f===e))return jn(s);if(!s||!(f=dn(f)))return s;var w=_i(s),b=_i(f),N=Wi(w,b),I=lo(w,b)+1;return Ws(w,N,I).join("")}o(YP,"trim");function XP(s,f,h){if(s=Mt(s),s&&(h||f===e))return s.slice(0,Hf(s)+1);if(!s||!(f=dn(f)))return s;var w=_i(s),b=lo(w,_i(f))+1;return Ws(w,0,b).join("")}o(XP,"trimEnd");function QP(s,f,h){if(s=Mt(s),s&&(h||f===e))return s.replace(tl,"");if(!s||!(f=dn(f)))return s;var w=_i(s),b=Wi(w,_i(f));return Ws(w,b).join("")}o(QP,"trimStart");function ZP(s,f){var h=me,w=xe;if(gr(f)){var b="separator"in f?f.separator:b;h="length"in f?nt(f.length):h,w="omission"in f?dn(f.omission):w}s=Mt(s);var N=s.length;if(Ui(s)){var I=_i(s);N=I.length}if(h>=N)return s;var W=h-fl(w);if(W<1)return w;var G=I?Ws(I,0,W).join(""):s.slice(0,W);if(b===e)return G+w;if(I&&(W+=G.length-W),w0(b)){if(s.slice(W).search(b)){var se,le=G;for(b.global||(b=_s(b.source,Mt(rl.exec(b))+"g")),b.lastIndex=0;se=b.exec(le);)var fe=se.index;G=G.slice(0,fe===e?W:fe)}}else if(s.indexOf(dn(b),W)!=W){var ke=G.lastIndexOf(b);ke>-1&&(G=G.slice(0,ke))}return G+w}o(ZP,"truncate");function JP(s){return s=Mt(s),s&&oi.test(s)?s.replace(Ir,Wf):s}o(JP,"unescape");var eM=Ea(function(s,f,h){return s+(h?" ":"")+f.toUpperCase()}),C0=Wm("toUpperCase");function lC(s,f,h){return s=Mt(s),f=h?e:f,f===e?ao(s)?zi(s):Ff(s):s.match(f)||[]}o(lC,"words");var aC=rt(function(s,f){try{return On(s,e,f)}catch(h){return y0(h)?h:new Ke(h)}}),tM=Xo(function(s,f){return zn(f,function(h){h=kt(h),vo(s,h,v0(s[h],s))}),s});function rM(s){var f=s==null?0:s.length,h=He();return s=f?Ct(s,function(w){if(typeof w[1]!="function")throw new qn(d);return[h(w[0]),w[1]]}):[],rt(function(w){for(var b=-1;++bze)return[];var h=at,w=Yr(s,at);f=He(f),s-=at;for(var b=hr(w,f);++h0||f<0)?new ft(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),f!==e&&(f=nt(f),h=f<0?h.dropRight(-f):h.take(f-s)),h)},ft.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},ft.prototype.toArray=function(){return this.take(at)},ui(ft.prototype,function(s,f){var h=/^(?:filter|find|map|reject)|While$/.test(f),w=/^(?:head|last)$/.test(f),b=T[w?"take"+(f=="last"?"Right":""):f],N=w||/^find/.test(f);!b||(T.prototype[f]=function(){var I=this.__wrapped__,W=w?[1]:arguments,G=I instanceof ft,se=W[0],le=G||tt(I),fe=o(function(pt){var mt=b.apply(T,oo([pt],W));return w&&ke?mt[0]:mt},"interceptor");le&&h&&typeof se=="function"&&se.length!=1&&(G=le=!1);var ke=this.__chain__,Ie=!!this.__actions__.length,$e=N&&!ke,ot=G&&!Ie;if(!N&&le){I=ot?I:new ft(this);var je=s.apply(I,W);return je.__actions__.push({func:Km,args:[fe],thisArg:e}),new Nn(je,ke)}return $e&&ot?s.apply(this,W):(je=this.thru(fe),$e?w?je.value()[0]:je.value():je)})}),zn(["pop","push","shift","sort","splice","unshift"],function(s){var f=sa[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",w=/^(?:pop|shift)$/.test(s);T.prototype[s]=function(){var b=arguments;if(w&&!this.__chain__){var N=this.value();return f.apply(tt(N)?N:[],b)}return this[h](function(I){return f.apply(tt(I)?I:[],b)})}}),ui(ft.prototype,function(s,f){var h=T[f];if(h){var w=h.name+"";Ye.call(pa,w)||(pa[w]=[]),pa[w].push({name:f,func:h})}}),pa[Hu(e,Q).name]=[{name:"wrapper",func:e}],ft.prototype.clone=Zy,ft.prototype.reverse=Jy,ft.prototype.value=Up,T.prototype.at=LN,T.prototype.chain=PN,T.prototype.commit=MN,T.prototype.next=AN,T.prototype.plant=FN,T.prototype.reverse=RN,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=IN,T.prototype.first=T.prototype.head,Ts&&(T.prototype[Ts]=DN),T},"runInContext"),uo=im();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Nt._=uo,define(function(){return uo})):Wr?((Wr.exports=uo)._=uo,gs._=uo):Nt._=uo}).call(Jc)});var xT=fr((fx,cx)=>{(function(e,t){typeof fx=="object"&&typeof cx!="undefined"?cx.exports=t():typeof define=="function"&&define.amd?define(t):e.stable=t()})(fx,function(){"use strict";var e=o(function(l,d){return t(l.slice(),d)},"stable");e.inplace=function(l,d){var v=t(l,d);return v!==l&&i(v,null,l.length,l),l};function t(l,d){typeof d!="function"&&(d=o(function(O,D){return String(O).localeCompare(D)},"comp"));var v=l.length;if(v<=1)return l;for(var p=new Array(v),y=1;yy&&(Y=y),B>y&&(B=y),X=D,te=Y;;)if(X{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var i=[],l=0;l{var HR=typeof Element!="undefined",WR=typeof Map=="function",BR=typeof Set=="function",UR=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function iy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i,l,d;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(l=i;l--!=0;)if(!iy(e[l],t[l]))return!1;return!0}var v;if(WR&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(v=e.entries();!(l=v.next()).done;)if(!t.has(l.value[0]))return!1;for(v=e.entries();!(l=v.next()).done;)if(!iy(l.value[1],t.get(l.value[0])))return!1;return!0}if(BR&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(v=e.entries();!(l=v.next()).done;)if(!t.has(l.value[0]))return!1;return!0}if(UR&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(l=i;l--!=0;)if(e[l]!==t[l])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(d=Object.keys(e),i=d.length,i!==Object.keys(t).length)return!1;for(l=i;l--!=0;)if(!Object.prototype.hasOwnProperty.call(t,d[l]))return!1;if(HR&&e instanceof Element)return!1;for(l=i;l--!=0;)if(!((d[l]==="_owner"||d[l]==="__v"||d[l]==="__o")&&e.$$typeof)&&!iy(e[d[l]],t[d[l]]))return!1;return!0}return e!==e&&t!==t}o(iy,"equal");nk.exports=o(function(t,i){try{return iy(t,i)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},"isEqual")});var jk=fr((tS,rS)=>{(function(e,t){typeof tS=="object"&&typeof rS!="undefined"?rS.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(tS,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,i=/gecko\/\d/i.test(e),l=/MSIE \d/.test(e),d=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),v=/Edge\/(\d+)/.exec(e),p=l||d||v,y=p&&(l?document.documentMode||6:+(v||d)[1]),_=!v&&/WebKit\//.test(e),O=_&&/Qt\/\d+\.\d+/.test(e),D=!v&&/Chrome\//.test(e),Y=/Opera\//.test(e),B=/Apple Computer/.test(navigator.vendor),X=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),te=/PhantomJS/.test(e),Q=B&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),F=/Android/.test(e),P=Q||F||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),R=Q||/Mac/.test(t),K=/\bCrOS\b/.test(e),V=/win/i.test(t),ue=Y&&e.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(Y=!1,_=!0);var ie=R&&(O||Y&&(ue==null||ue<12.11)),he=i||p&&y>=9;function me(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}o(me,"classTest");var xe=o(function(r,n){var u=r.className,a=me(n).exec(u);if(a){var c=u.slice(a.index+a[0].length);r.className=u.slice(0,a.index)+(c?a[1]+c:"")}},"rmClass");function Ve(r){for(var n=r.childNodes.length;n>0;--n)r.removeChild(r.firstChild);return r}o(Ve,"removeChildren");function Qe(r,n){return Ve(r).appendChild(n)}o(Qe,"removeChildrenAndAdd");function Ee(r,n,u,a){var c=document.createElement(r);if(u&&(c.className=u),a&&(c.style.cssText=a),typeof n=="string")c.appendChild(document.createTextNode(n));else if(n)for(var m=0;m=n)return g+(n-m);g+=S-m,g+=u-g%u,m=S+1}}o(Ot,"countColumn");var St=o(function(){this.id=null,this.f=null,this.time=0,this.handler=Rr(this.onTimeout,this)},"Delayed");St.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},St.prototype.set=function(r,n){this.f=n;var u=+new Date+r;(!this.id||u=n)return a+Math.min(g,n-c);if(c+=m-a,c+=u-c%u,a=m+1,c>=n)return a}}o(Tr,"findColumn");var jt=[""];function qt(r){for(;jt.length<=r;)jt.push(we(jt)+" ");return jt[r]}o(qt,"spaceStr");function we(r){return r[r.length-1]}o(we,"lst");function kr(r,n){for(var u=[],a=0;a"\x80"&&(r.toUpperCase()!=r.toLowerCase()||an.test(r))}o(Gt,"isWordCharBasic");function dr(r,n){return n?n.source.indexOf("\\w")>-1&&Gt(r)?!0:n.test(r):Gt(r)}o(dr,"isWordChar");function ut(r){for(var n in r)if(r.hasOwnProperty(n)&&r[n])return!1;return!0}o(ut,"isEmpty");var Io=/[\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 yr(r){return r.charCodeAt(0)>=768&&Io.test(r)}o(yr,"isExtendingChar");function Ii(r,n,u){for(;(u<0?n>0:nu?-1:1;;){if(n==u)return n;var c=(n+u)/2,m=a<0?Math.ceil(c):Math.floor(c);if(m==n)return r(m)?n:u;r(m)?u=m:n=m+a}}o(un,"findFirst");function Hn(r,n,u,a){if(!r)return a(n,u,"ltr",0);for(var c=!1,m=0;mn||n==u&&g.to==n)&&(a(Math.max(g.from,n),Math.min(g.to,u),g.level==1?"rtl":"ltr",m),c=!0)}c||a(n,u,"ltr")}o(Hn,"iterateBidiSections");var vi=null;function gi(r,n,u){var a;vi=null;for(var c=0;cn)return c;m.to==n&&(m.from!=m.to&&u=="before"?a=c:vi=c),m.from==n&&(m.from!=m.to&&u!="before"?a=c:vi=c)}return a??vi}o(gi,"getBidiPartAt");var Wn=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(E){return E<=247?r.charAt(E):1424<=E&&E<=1524?"R":1536<=E&&E<=1785?n.charAt(E-1536):1774<=E&&E<=2220?"r":8192<=E&&E<=8203?"w":E==8204?"b":"L"}o(u,"charType");var a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,c=/[stwN]/,m=/[LRr]/,g=/[Lb1n]/,S=/[1n]/;function C(E,L,A){this.level=E,this.from=L,this.to=A}return o(C,"BidiSpan"),function(E,L){var A=L=="ltr"?"L":"R";if(E.length==0||L=="ltr"&&!a.test(E))return!1;for(var j=E.length,z=[],ee=0;ee-1&&(a[n]=c.slice(0,m).concat(c.slice(m+1)))}}}o(de,"off");function be(r,n){var u=J(r,n);if(!!u.length)for(var a=Array.prototype.slice.call(arguments,2),c=0;c0}o(Ft,"hasHandler");function Ir(r){r.prototype.on=function(n,u){H(this,n,u)},r.prototype.off=function(n,u){de(this,n,u)}}o(Ir,"eventMixin");function er(r){r.preventDefault?r.preventDefault():r.returnValue=!1}o(er,"e_preventDefault");function oi(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}o(oi,"e_stopPropagation");function fs(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}o(fs,"e_defaultPrevented");function no(r){er(r),oi(r)}o(no,"e_stop");function yi(r){return r.target||r.srcElement}o(yi,"e_target");function Js(r){var n=r.which;return n==null&&(r.button&1?n=1:r.button&2?n=3:r.button&4&&(n=2)),R&&r.ctrlKey&&n==1&&(n=3),n}o(Js,"e_button");var cs=function(){if(p&&y<9)return!1;var r=Ee("div");return"draggable"in r||"dragDrop"in r}(),fn;function _p(r){if(fn==null){var n=Ee("span","\u200B");Qe(r,Ee("span",[n,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(fn=n.offsetWidth<=1&&n.offsetHeight>2&&!(p&&y<8))}var u=fn?Ee("span","\u200B"):Ee("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}o(_p,"zeroWidthElement");var el;function Ef(r){if(el!=null)return el;var n=Qe(r,document.createTextNode("A\u062EA")),u=qe(n,0,1).getBoundingClientRect(),a=qe(n,1,2).getBoundingClientRect();return Ve(r),!u||u.left==u.right?!1:el=a.right-u.right<3}o(Ef,"hasBadBidiRects");var tl=` + // node_modules/object-assign/index.js + var require_object_assign = __commonJS({ + "node_modules/object-assign/index.js"(exports, module) { + "use strict"; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === void 0) { + throw new TypeError("Object.assign cannot be called with null or undefined"); + } + return Object(val); + } + __name(toObject, "toObject"); + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + var test1 = new String("abc"); + test1[5] = "de"; + if (Object.getOwnPropertyNames(test1)[0] === "5") { + return false; + } + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2["_" + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join("") !== "0123456789") { + return false; + } + var test3 = {}; + "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { + return false; + } + return true; + } catch (err) { + return false; + } + } + __name(shouldUseNative, "shouldUseNative"); + module.exports = shouldUseNative() ? Object.assign : function(target, source) { + var from; + var to = toObject(target); + var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + return to; + }; + } + }); -b`.split(/\n/).length!=3?function(r){for(var n=0,u=[],a=r.length;n<=a;){var c=r.indexOf(` -`,n);c==-1&&(c=r.length);var m=r.slice(n,r.charAt(c-1)=="\r"?c-1:c),g=m.indexOf("\r");g!=-1?(u.push(m.slice(0,g)),n+=g+1):(u.push(m),n=c+1)}return u}:function(r){return r.split(/\r\n?|\n/)},Ep=window.getSelection?function(r){try{return r.selectionStart!=r.selectionEnd}catch(n){return!1}}:function(r){var n;try{n=r.ownerDocument.selection.createRange()}catch(u){}return!n||n.parentElement()!=r?!1:n.compareEndPoints("StartToEnd",n)!=0},bf=function(){var r=Ee("div");return"oncopy"in r?!0:(r.setAttribute("oncopy","return;"),typeof r.oncopy=="function")}(),au=null;function bp(r){if(au!=null)return au;var n=Qe(r,Ee("span","x")),u=n.getBoundingClientRect(),a=qe(n,0,1).getBoundingClientRect();return au=Math.abs(u.left-a.left)>1}o(bp,"hasBadZoomedRects");var $l={},ps={};function Tp(r,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),$l[r]=n}o(Tp,"defineMode");function Tf(r,n){ps[r]=n}o(Tf,"defineMIME");function rl(r){if(typeof r=="string"&&ps.hasOwnProperty(r))r=ps[r];else if(r&&typeof r.name=="string"&&ps.hasOwnProperty(r.name)){var n=ps[r.name];typeof n=="string"&&(n={name:n}),r=ii(n,r),r.name=n.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return rl("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return rl("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}o(rl,"resolveMode");function uu(r,n){n=rl(n);var u=$l[n.name];if(!u)return uu(r,"text/plain");var a=u(r,n);if(Ho.hasOwnProperty(n.name)){var c=Ho[n.name];for(var m in c)!c.hasOwnProperty(m)||(a.hasOwnProperty(m)&&(a["_"+m]=a[m]),a[m]=c[m])}if(a.name=n.name,n.helperType&&(a.helperType=n.helperType),n.modeProps)for(var g in n.modeProps)a[g]=n.modeProps[g];return a}o(uu,"getMode");var Ho={};function kp(r,n){var u=Ho.hasOwnProperty(r)?Ho[r]:Ho[r]={};Kt(n,u)}o(kp,"extendMode");function Wo(r,n){if(n===!0)return n;if(r.copyState)return r.copyState(n);var u={};for(var a in n){var c=n[a];c instanceof Array&&(c=c.concat([])),u[a]=c}return u}o(Wo,"copyState");function jl(r,n){for(var u;r.innerMode&&(u=r.innerMode(n),!(!u||u.mode==r));)n=u.state,r=u.mode;return u||{mode:r,state:n}}o(jl,"innerMode");function kf(r,n,u){return r.startState?r.startState(n,u):!0}o(kf,"startState");var Rt=o(function(r,n,u){this.pos=this.start=0,this.string=r,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u},"StringStream");Rt.prototype.eol=function(){return this.pos>=this.string.length},Rt.prototype.sol=function(){return this.pos==this.lineStart},Rt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Rt.prototype.next=function(){if(this.posn},Rt.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},Rt.prototype.skipToEnd=function(){this.pos=this.string.length},Rt.prototype.skipTo=function(r){var n=this.string.indexOf(r,this.pos);if(n>-1)return this.pos=n,!0},Rt.prototype.backUp=function(r){this.pos-=r},Rt.prototype.column=function(){return this.lastColumnPos0?null:(m&&n!==!1&&(this.pos+=m[0].length),m)}},Rt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Rt.prototype.hideFirstChars=function(r,n){this.lineStart+=r;try{return n()}finally{this.lineStart-=r}},Rt.prototype.lookAhead=function(r){var n=this.lineOracle;return n&&n.lookAhead(r)},Rt.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Le(r,n){if(n-=r.first,n<0||n>=r.size)throw new Error("There is no line "+(n+r.first)+" in the document.");for(var u=r;!u.lines;)for(var a=0;;++a){var c=u.children[a],m=c.chunkSize();if(n=r.first&&nu?ae(u,Le(r,u).text.length):Op(n,Le(r,n.line).text.length)}o(Be,"clipPos");function Op(r,n){var u=r.ch;return u==null||u>n?ae(r.line,n):u<0?ae(r.line,0):r}o(Op,"clipToLen");function il(r,n){for(var u=[],a=0;athis.maxLookAhead&&(this.maxLookAhead=r),n},Bn.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},Bn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Bn.fromSaved=function(r,n,u){return n instanceof si?new Bn(r,Wo(r.mode,n.state),u,n.lookAhead):new Bn(r,Wo(r.mode,n),u)},Bn.prototype.save=function(r){var n=r!==!1?Wo(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new si(n,this.maxLookAhead):n};function cu(r,n,u,a){var c=[r.state.modeGen],m={};du(r,n.text,r.doc.mode,u,function(E,L){return c.push(E,L)},m,a);for(var g=u.state,S=o(function(E){u.baseTokens=c;var L=r.state.overlays[E],A=1,j=0;u.state=!0,du(r,n.text,L.mode,u,function(z,ee){for(var oe=A;jz&&c.splice(A,1,z,c[A+1],ce),A+=2,j=Math.min(z,ce)}if(!!ee)if(L.opaque)c.splice(oe,A-oe,z,"overlay "+ee),A=oe+2;else for(;oer.options.maxHighlightLength&&Wo(r.doc.mode,a.state),m=cu(r,n,a);c&&(a.state=c),n.stateAfter=a.save(!c),n.styles=m.styles,m.classes?n.styleClasses=m.classes:n.styleClasses&&(n.styleClasses=null),u===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return n.styles}o(pu,"getLineStyles");function hs(r,n,u){var a=r.doc,c=r.display;if(!a.mode.startState)return new Bn(a,!0,n);var m=Nf(r,n,u),g=m>a.first&&Le(a,m-1).stateAfter,S=g?Bn.fromSaved(a,g,m):new Bn(a,kf(a.mode),m);return a.iter(m,n,function(C){ol(r,C.text,S);var E=S.line;C.stateAfter=E==n-1||E%5==0||E>=c.viewFrom&&En.start)return m}throw new Error("Mode "+r.name+" failed to advance stream.")}o(Gl,"readToken");var Yl=o(function(r,n,u){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=n||null,this.state=u},"Token");function Xl(r,n,u,a){var c=r.doc,m=c.mode,g;n=Be(c,n);var S=Le(c,n.line),C=hs(r,n.line,u),E=new Rt(S.text,r.options.tabSize,C),L;for(a&&(L=[]);(a||E.posr.options.maxHighlightLength?(S=!1,g&&ol(r,n,a,L.pos),L.pos=n.length,A=null):A=zo(Gl(u,L,a.state,j),m),j){var z=j[0].name;z&&(A="m-"+(A?z+" "+A:z))}if(!S||E!=A){for(;Cg;--S){if(S<=m.first)return m.first;var C=Le(m,S-1),E=C.stateAfter;if(E&&(!u||S+(E instanceof si?E.lookAhead:0)<=m.modeFrontier))return S;var L=Ot(C.text,null,r.options.tabSize);(c==null||a>L)&&(c=S-1,a=L)}return c}o(Nf,"findStartLine");function Np(r,n){if(r.modeFrontier=Math.min(r.modeFrontier,n),!(r.highlightFrontieru;a--){var c=Le(r,a).stateAfter;if(c&&(!(c instanceof si)||a+c.lookAhead=n:m.to>n);(a||(a=[])).push(new $o(g,m.from,C?null:m.to))}}return a}o(Ql,"markedSpansBefore");function Qh(r,n,u){var a;if(r)for(var c=0;c=n:m.to>n);if(S||m.from==n&&g.type=="bookmark"&&(!u||m.marker.insertLeft)){var C=m.from==null||(g.inclusiveLeft?m.from<=n:m.from0&&S)for(var Te=0;Te0)){var L=[C,1],A=Ue(E.from,S.from),j=Ue(E.to,S.to);(A<0||!g.inclusiveLeft&&!A)&&L.push({from:E.from,to:S.from}),(j>0||!g.inclusiveRight&&!j)&&L.push({from:S.to,to:E.to}),c.splice.apply(c,L),C+=L.length-3}}return c}o(Pf,"removeReadOnlyRanges");function vu(r){var n=r.markedSpans;if(!!n){for(var u=0;un)&&(!a||Zl(a,m.marker)<0)&&(a=m.marker)}return a}o(gu,"collapsedSpanAround");function sl(r,n,u,a,c){var m=Le(r,n),g=Si&&m.markedSpans;if(g)for(var S=0;S=0&&A<=0||L<=0&&A>=0)&&(L<=0&&(C.marker.inclusiveRight&&c.inclusiveLeft?Ue(E.to,u)>=0:Ue(E.to,u)>0)||L>=0&&(C.marker.inclusiveRight&&c.inclusiveLeft?Ue(E.from,a)<=0:Ue(E.from,a)<0)))return!0}}}o(sl,"conflictingCollapsedRange");function kn(r){for(var n;n=Tt(r);)r=n.find(-1,!0).line;return r}o(kn,"visualLine");function Pp(r){for(var n;n=Un(r);)r=n.find(1,!0).line;return r}o(Pp,"visualLineEnd");function Mp(r){for(var n,u;n=Un(r);)r=n.find(1,!0).line,(u||(u=[])).push(r);return u}o(Mp,"visualLineContinued");function Jl(r,n){var u=Le(r,n),a=kn(u);return u==a?n:dt(a)}o(Jl,"visualLineNo");function Hr(r,n){if(n>r.lastLine())return n;var u=Le(r,n),a;if(!Nt(r,u))return n;for(;a=Un(u);)u=a.find(1,!0).line;return dt(u)+1}o(Hr,"visualLineEndNo");function Nt(r,n){var u=Si&&n.markedSpans;if(u){for(var a=void 0,c=0;cn.maxLineLength&&(n.maxLineLength=c,n.maxLine=a)})}o(ll,"findMaxLine");var Or=o(function(r,n,u){this.text=r,ms(this,n),this.height=u?u(this):1},"Line");Or.prototype.lineNo=function(){return dt(this)},Ir(Or);function Mf(r,n,u,a){r.text=n,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),vu(r),ms(r,u);var c=a?a(r):1;c!=r.height&&xi(r,c)}o(Mf,"updateLine");function Af(r){r.parent=null,vu(r)}o(Af,"cleanUpLine");var yu={},wu={};function ea(r,n){if(!r||/^\s*$/.test(r))return null;var u=n.addModeClass?wu:yu;return u[r]||(u[r]=r.replace(/\S+/g,"cm-$&"))}o(ea,"interpretTokenStyle");function ta(r,n){var u=xt("span",null,null,_?"padding-right: .1px":null),a={pre:xt("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};n.measure={};for(var c=0;c<=(n.rest?n.rest.length:0);c++){var m=c?n.rest[c-1]:n.line,g=void 0;a.pos=0,a.addToken=Ap,Ef(r.display.measure)&&(g=Tn(m,r.doc.direction))&&(a.addToken=Dp(a.addToken,g)),a.map=[];var S=n!=r.display.externalMeasured&&dt(m);io(m,a,pu(r,m,S)),m.styleClasses&&(m.styleClasses.bgClass&&(a.bgClass=Zt(m.styleClasses.bgClass,a.bgClass||"")),m.styleClasses.textClass&&(a.textClass=Zt(m.styleClasses.textClass,a.textClass||""))),a.map.length==0&&a.map.push(0,0,a.content.appendChild(_p(r.display.measure))),c==0?(n.measure.map=a.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(a.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(_){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 be(r,"renderLine",r,n.line,a.pre),a.pre.className&&(a.textClass=Zt(a.pre.className,a.textClass||"")),a}o(ta,"buildLineContent");function On(r){var n=Ee("span","\u2022","cm-invalidchar");return n.title="\\u"+r.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}o(On,"defaultSpecialCharPlaceholder");function Ap(r,n,u,a,c,m,g){if(!!n){var S=r.splitSpaces?zn(n,r.trailingSpace):n,C=r.cm.state.specialChars,E=!1,L;if(!C.test(n))r.col+=n.length,L=document.createTextNode(S),r.map.push(r.pos,r.pos+n.length,L),p&&y<9&&(E=!0),r.pos+=n.length;else{L=document.createDocumentFragment();for(var A=0;;){C.lastIndex=A;var j=C.exec(n),z=j?j.index-A:n.length-A;if(z){var ee=document.createTextNode(S.slice(A,A+z));p&&y<9?L.appendChild(Ee("span",[ee])):L.appendChild(ee),r.map.push(r.pos,r.pos+z,ee),r.col+=z,r.pos+=z}if(!j)break;A+=z+1;var oe=void 0;if(j[0]==" "){var ce=r.cm.options.tabSize,ve=ce-r.col%ce;oe=L.appendChild(Ee("span",qt(ve),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),r.col+=ve}else j[0]=="\r"||j[0]==` -`?(oe=L.appendChild(Ee("span",j[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),oe.setAttribute("cm-text",j[0]),r.col+=1):(oe=r.cm.options.specialCharPlaceholder(j[0]),oe.setAttribute("cm-text",j[0]),p&&y<9?L.appendChild(Ee("span",[oe])):L.appendChild(oe),r.col+=1);r.map.push(r.pos,r.pos+1,oe),r.pos++}}if(r.trailingSpace=S.charCodeAt(n.length-1)==32,u||a||c||E||m||g){var Ce=u||"";a&&(Ce+=a),c&&(Ce+=c);var ge=Ee("span",[L],Ce,m);if(g)for(var Te in g)g.hasOwnProperty(Te)&&Te!="style"&&Te!="class"&&ge.setAttribute(Te,g[Te]);return r.content.appendChild(ge)}r.content.appendChild(L)}}o(Ap,"buildToken");function zn(r,n){if(r.length>1&&!/ /.test(r))return r;for(var u=n,a="",c=0;cE&&A.from<=E));j++);if(A.to>=L)return r(u,a,c,m,g,S,C);r(u,a.slice(0,A.to-E),c,m,null,S,C),m=null,a=a.slice(A.to-E),E=A.to}}}o(Dp,"buildTokenBadBidi");function xu(r,n,u,a){var c=!a&&u.widgetNode;c&&r.map.push(r.pos,r.pos+n,c),!a&&r.cm.display.input.needsContentAttribute&&(c||(c=r.content.appendChild(document.createElement("span"))),c.setAttribute("cm-marker",u.id)),c&&(r.cm.display.input.setUneditable(c),r.content.appendChild(c)),r.pos+=n,r.trailingSpace=!1}o(xu,"buildCollapsedSpan");function io(r,n,u){var a=r.markedSpans,c=r.text,m=0;if(!a){for(var g=1;gC||Je.collapsed&&De.to==C&&De.from==C)){if(De.to!=null&&De.to!=C&&z>De.to&&(z=De.to,oe=""),Je.className&&(ee+=" "+Je.className),Je.css&&(j=(j?j+";":"")+Je.css),Je.startStyle&&De.from==C&&(ce+=" "+Je.startStyle),Je.endStyle&&De.to==z&&(Te||(Te=[])).push(Je.endStyle,De.to),Je.title&&((Ce||(Ce={})).title=Je.title),Je.attributes)for(var bt in Je.attributes)(Ce||(Ce={}))[bt]=Je.attributes[bt];Je.collapsed&&(!ve||Zl(ve.marker,Je)<0)&&(ve=De)}else De.from>C&&z>De.from&&(z=De.from)}if(Te)for(var xr=0;xr=S)break;for(var mn=Math.min(S,z);;){if(L){var vn=C+L.length;if(!ve){var ur=vn>mn?L.slice(0,mn-C):L;n.addToken(n,ur,A?A+ee:ee,ce,C+ur.length==z?oe:"",j,Ce)}if(vn>=mn){L=L.slice(mn-C),C=mn;break}C=vn,ce=""}L=c.slice(m,m=u[E++]),A=ea(u[E++],n.cm.options)}}}o(io,"insertLineContent");function ws(r,n,u){this.line=n,this.rest=Mp(n),this.size=this.rest?dt(we(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Nt(r,n)}o(ws,"LineView");function xs(r,n,u){for(var a=[],c,m=n;m2&&m.push((C.bottom+E.top)/2-u.top)}}m.push(u.bottom-u.top)}}o(Ip,"ensureLineHeights");function ul(r,n,u){if(r.line==n)return{map:r.measure.map,cache:r.measure.cache};for(var a=0;au)return{map:r.measure.maps[c],cache:r.measure.caches[c],before:!0}}o(ul,"mapFromLineView");function Bi(r,n){n=kn(n);var u=dt(n),a=r.display.externalMeasured=new ws(r.doc,n,u);a.lineN=u;var c=a.built=ta(r,a);return a.text=c.pre,Qe(r.display.lineMeasure,c.pre),a}o(Bi,"updateExternalMeasurement");function Zh(r,n,u,a){return ao(r,Ui(r,n),u,a)}o(Zh,"measureChar");function Hp(r,n){if(n>=r.display.viewFrom&&n=u.lineN&&nn)&&(m=C-S,c=m-1,n>=C&&(g="right")),c!=null){if(a=r[E+2],S==C&&u==(a.insertLeft?"left":"right")&&(g=u),u=="left"&&c==0)for(;E&&r[E-2]==r[E-3]&&r[E-1].insertLeft;)a=r[(E-=3)+2],g="left";if(u=="right"&&c==C-S)for(;E=0&&(u=r[c]).left==u.right;c--);return u}o(em,"getUsefulRect");function Cs(r,n,u,a){var c=Rf(n.map,u,a),m=c.node,g=c.start,S=c.end,C=c.collapse,E;if(m.nodeType==3){for(var L=0;L<4;L++){for(;g&&yr(n.line.text.charAt(c.coverStart+g));)--g;for(;c.coverStart+S0&&(C=a="right");var A;r.options.lineWrapping&&(A=m.getClientRects()).length>1?E=A[a=="right"?A.length-1:0]:E=m.getBoundingClientRect()}if(p&&y<9&&!g&&(!E||!E.left&&!E.right)){var j=m.parentNode.getClientRects()[0];j?E={left:j.left,right:j.left+oa(r.display),top:j.top,bottom:j.bottom}:E=Jh}for(var z=E.top-n.rect.top,ee=E.bottom-n.rect.top,oe=(z+ee)/2,ce=n.view.measure.heights,ve=0;ve=a.text.length?(C=a.text.length,E="before"):C<=0&&(C=0,E="after"),!S)return g(E=="before"?C-1:C,E=="before");function L(ee,oe,ce){var ve=S[oe],Ce=ve.level==1;return g(ce?ee-1:ee,Ce!=ce)}o(L,"getBidi");var A=gi(S,C,E),j=vi,z=L(C,A,E=="before");return j!=null&&(z.other=L(C,j,E!="before")),z}o(zi,"cursorCoords");function im(r,n){var u=0;n=Be(r.doc,n),r.options.lineWrapping||(u=oa(r.display)*n.ch);var a=Le(r.doc,n.line),c=Wr(a)+jn(r.display);return{left:u,right:u,top:c,bottom:c+a.height}}o(im,"estimateCoords");function uo(r,n,u,a,c){var m=ae(r,n,u);return m.xRel=c,a&&(m.outside=a),m}o(uo,"PosWithInfo");function q(r,n,u){var a=r.doc;if(u+=r.display.viewOffset,u<0)return uo(a.first,0,null,-1,-1);var c=Hi(a,u),m=a.first+a.size-1;if(c>m)return uo(a.first+a.size-1,Le(a,m).text.length,null,1,1);n<0&&(n=0);for(var g=Le(a,c);;){var S=Ke(r,g,c,n,u),C=gu(g,S.ch+(S.xRel>0||S.outside>0?1:0));if(!C)return S;var E=C.find(1);if(E.line==c)return E;g=Le(a,c=E.line)}}o(q,"coordsChar");function re(r,n,u,a){a-=Hf(n);var c=n.text.length,m=un(function(g){return ao(r,u,g-1).bottom<=a},c,0);return c=un(function(g){return ao(r,u,g).top>a},m,c),{begin:m,end:c}}o(re,"wrappedLineExtent");function Z(r,n,u,a){u||(u=Ui(r,n));var c=Wf(r,n,ao(r,u,a),"line").top;return re(r,n,u,c)}o(Z,"wrappedLineExtentChar");function Oe(r,n,u,a){return r.bottom<=u?!1:r.top>u?!0:(a?r.left:r.right)>n}o(Oe,"boxIsAfter");function Ke(r,n,u,a,c){c-=Wr(n);var m=Ui(r,n),g=Hf(n),S=0,C=n.text.length,E=!0,L=Tn(n,r.doc.direction);if(L){var A=(r.options.lineWrapping?Nr:_t)(r,n,u,m,L,a,c);E=A.level!=1,S=E?A.from:A.to-1,C=E?A.to:A.from-1}var j=null,z=null,ee=un(function(Re){var De=ao(r,m,Re);return De.top+=g,De.bottom+=g,Oe(De,a,c,!1)?(De.top<=c&&De.left<=a&&(j=Re,z=De),!0):!1},S,C),oe,ce,ve=!1;if(z){var Ce=a-z.left=Te.bottom?1:0}return ee=Ii(n.text,ee,1),uo(u,ee,ce,ve,a-oe)}o(Ke,"coordsCharInner");function _t(r,n,u,a,c,m,g){var S=un(function(A){var j=c[A],z=j.level!=1;return Oe(zi(r,ae(u,z?j.to:j.from,z?"before":"after"),"line",n,a),m,g,!0)},0,c.length-1),C=c[S];if(S>0){var E=C.level!=1,L=zi(r,ae(u,E?C.from:C.to,E?"after":"before"),"line",n,a);Oe(L,m,g,!0)&&L.top>g&&(C=c[S-1])}return C}o(_t,"coordsBidiPart");function Nr(r,n,u,a,c,m,g){var S=re(r,n,a,g),C=S.begin,E=S.end;/\s/.test(n.text.charAt(E-1))&&E--;for(var L=null,A=null,j=0;j=E||z.to<=C)){var ee=z.level!=1,oe=ao(r,a,ee?Math.min(E,z.to)-1:Math.max(C,z.from)).right,ce=oece)&&(L=z,A=ce)}}return L||(L=c[c.length-1]),L.fromE&&(L={from:L.from,to:E,level:L.level}),L}o(Nr,"coordsBidiPartWrapped");var ht;function _s(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(ht==null){ht=Ee("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ht.appendChild(document.createTextNode("x")),ht.appendChild(Ee("br"));ht.appendChild(document.createTextNode("x"))}Qe(r.measure,ht);var u=ht.offsetHeight/50;return u>3&&(r.cachedTextHeight=u),Ve(r.measure),u||1}o(_s,"textHeight");function oa(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var n=Ee("span","xxxxxxxxxx"),u=Ee("pre",[n],"CodeMirror-line-like");Qe(r.measure,u);var a=n.getBoundingClientRect(),c=(a.right-a.left)/10;return c>2&&(r.cachedCharWidth=c),c||10}o(oa,"charWidth");function qn(r){for(var n=r.display,u={},a={},c=n.gutters.clientLeft,m=n.gutters.firstChild,g=0;m;m=m.nextSibling,++g){var S=r.display.gutterSpecs[g].className;u[S]=m.offsetLeft+m.clientLeft+c,a[S]=m.clientWidth}return{fixedPos:sa(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:u,gutterWidth:a,wrapperWidth:n.wrapper.clientWidth}}o(qn,"getDimensions");function sa(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}o(sa,"compensateForHScroll");function om(r){var n=_s(r.display),u=r.options.lineWrapping,a=u&&Math.max(5,r.display.scroller.clientWidth/oa(r.display)-3);return function(c){if(Nt(r.doc,c))return 0;var m=0;if(c.widgets)for(var g=0;g0&&(E=Le(r.doc,C.line).text).length==C.ch){var L=Ot(E,E.length,r.options.tabSize)-E.length;C=ae(C.line,Math.max(0,Math.round((m-Ci(r.display).left)/oa(r.display))-L))}return C}o(fo,"posFromMouse");function co(r,n){if(n>=r.display.viewTo||(n-=r.display.viewFrom,n<0))return null;for(var u=r.display.view,a=0;an)&&(c.updateLineNumbers=n),r.curOp.viewChanged=!0,n>=c.viewTo)Si&&Jl(r.doc,n)c.viewFrom?qo(r):(c.viewFrom+=a,c.viewTo+=a);else if(n<=c.viewFrom&&u>=c.viewTo)qo(r);else if(n<=c.viewFrom){var m=cl(r,u,u+a,1);m?(c.view=c.view.slice(m.index),c.viewFrom=m.lineN,c.viewTo+=a):qo(r)}else if(u>=c.viewTo){var g=cl(r,n,n,-1);g?(c.view=c.view.slice(0,g.index),c.viewTo=g.lineN):qo(r)}else{var S=cl(r,n,n,-1),C=cl(r,u,u+a,1);S&&C?(c.view=c.view.slice(0,S.index).concat(xs(r,S.lineN,C.lineN)).concat(c.view.slice(C.index)),c.viewTo+=a):qo(r)}var E=c.externalMeasured;E&&(u=c.lineN&&n=a.viewTo)){var m=a.view[co(r,n)];if(m.node!=null){var g=m.changes||(m.changes=[]);it(g,u)==-1&&g.push(u)}}}o(bs,"regLineChange");function qo(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}o(qo,"resetView");function cl(r,n,u,a){var c=co(r,n),m,g=r.display.view;if(!Si||u==r.doc.first+r.doc.size)return{index:c,lineN:u};for(var S=r.display.viewFrom,C=0;C0){if(c==g.length-1)return null;m=S+g[c].size-n,c++}else m=S-n;n+=m,u+=m}for(;Jl(r.doc,u)!=u;){if(c==(a<0?0:g.length-1))return null;u+=a*g[c-(a<0?1:0)].size,c+=a}return{index:c,lineN:u}}o(cl,"viewCuttingPoint");function $y(r,n,u){var a=r.display,c=a.view;c.length==0||n>=a.viewTo||u<=a.viewFrom?(a.view=xs(r,n,u),a.viewFrom=n):(a.viewFrom>n?a.view=xs(r,n,a.viewFrom).concat(a.view):a.viewFromu&&(a.view=a.view.slice(0,co(r,u)))),a.viewTo=u}o($y,"adjustView");function sm(r){for(var n=r.display.view,u=0,a=0;a=r.display.viewTo||S.to().line0?n.blinker=setInterval(function(){r.hasFocus()||dl(r),n.cursorDiv.style.visibility=(u=!u)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}o(la,"restartBlink");function Bp(r){r.hasFocus()||(r.display.input.focus(),r.state.focused||aa(r))}o(Bp,"ensureFocus");function Bf(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,r.state.focused&&dl(r))},100)}o(Bf,"delayBlurEvent");function aa(r,n){r.state.delayingBlurEvent&&!r.state.draggingText&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(be(r,"focus",r,n),r.state.focused=!0,lt(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),_&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),la(r))}o(aa,"onFocus");function dl(r,n){r.state.delayingBlurEvent||(r.state.focused&&(be(r,"blur",r,n),r.state.focused=!1,xe(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}o(dl,"onBlur");function Ts(r){for(var n=r.display,u=n.lineDiv.offsetTop,a=0;a.005||L<-.005)&&(xi(c.line,g),ks(c.line),c.rest))for(var A=0;Ar.display.sizerWidth){var j=Math.ceil(S/oa(r.display));j>r.display.maxLineLength&&(r.display.maxLineLength=j,r.display.maxLine=c.line,r.display.maxLineChanged=!0)}}}}o(Ts,"updateHeightsInViewport");function ks(r){if(r.widgets)for(var n=0;n=g&&(m=Hi(n,Wr(Le(n,C))-r.wrapper.clientHeight),g=C)}return{from:m,to:Math.max(g,m+1)}}o(hl,"visibleLines");function jy(r,n){if(!Jt(r,"scrollCursorIntoView")){var u=r.display,a=u.sizer.getBoundingClientRect(),c=null;if(n.top+a.top<0?c=!0:n.bottom+a.top>(window.innerHeight||document.documentElement.clientHeight)&&(c=!1),c!=null&&!te){var m=Ee("div","\u200B",null,`position: absolute; - top: `+(n.top-u.viewOffset-jn(r.display))+`px; - height: `+(n.bottom-n.top+Gr(r)+u.barHeight)+`px; - left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");r.display.lineSpace.appendChild(m),m.scrollIntoView(c),r.display.lineSpace.removeChild(m)}}}o(jy,"maybeScrollWindow");function qy(r,n,u,a){a==null&&(a=0);var c;!r.options.lineWrapping&&n==u&&(u=n.sticky=="before"?ae(n.line,n.ch+1,"before"):n,n=n.ch?ae(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n);for(var m=0;m<5;m++){var g=!1,S=zi(r,n),C=!u||u==n?S:zi(r,u);c={left:Math.min(S.left,C.left),top:Math.min(S.top,C.top)-a,right:Math.max(S.left,C.left),bottom:Math.max(S.bottom,C.bottom)+a};var E=ua(r,c),L=r.doc.scrollTop,A=r.doc.scrollLeft;if(E.scrollTop!=null&&(tr(r,E.scrollTop),Math.abs(r.doc.scrollTop-L)>1&&(g=!0)),E.scrollLeft!=null&&(ml(r,E.scrollLeft),Math.abs(r.doc.scrollLeft-A)>1&&(g=!0)),!g)break}return c}o(qy,"scrollPosIntoView");function Vy(r,n){var u=ua(r,n);u.scrollTop!=null&&tr(r,u.scrollTop),u.scrollLeft!=null&&ml(r,u.scrollLeft)}o(Vy,"scrollIntoView");function ua(r,n){var u=r.display,a=_s(r.display);n.top<0&&(n.top=0);var c=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:u.scroller.scrollTop,m=lo(r),g={};n.bottom-n.top>m&&(n.bottom=n.top+m);var S=r.doc.height+wr(u),C=n.topS-a;if(n.topc+m){var L=Math.min(n.top,(E?S:n.bottom)-m);L!=c&&(g.scrollTop=L)}var A=r.options.fixedGutter?0:u.gutters.offsetWidth,j=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:u.scroller.scrollLeft-A,z=Wi(r)-u.gutters.offsetWidth,ee=n.right-n.left>z;return ee&&(n.right=n.left+z),n.left<10?g.scrollLeft=0:n.leftz+j-3&&(g.scrollLeft=n.right+(ee?0:10)-z),g}o(ua,"calculateScrollPos");function fa(r,n){n!=null&&(Uf(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+n)}o(fa,"addToScrollTop");function Os(r){Uf(r);var n=r.getCursor();r.curOp.scrollToPos={from:n,to:n,margin:r.options.cursorScrollMargin}}o(Os,"ensureCursorVisible");function Eu(r,n,u){(n!=null||u!=null)&&Uf(r),n!=null&&(r.curOp.scrollLeft=n),u!=null&&(r.curOp.scrollTop=u)}o(Eu,"scrollToCoords");function am(r,n){Uf(r),r.curOp.scrollToPos=n}o(am,"scrollToRange");function Uf(r){var n=r.curOp.scrollToPos;if(n){r.curOp.scrollToPos=null;var u=im(r,n.from),a=im(r,n.to);um(r,u,a,n.margin)}}o(Uf,"resolveScrollToPos");function um(r,n,u,a){var c=ua(r,{left:Math.min(n.left,u.left),top:Math.min(n.top,u.top)-a,right:Math.max(n.right,u.right),bottom:Math.max(n.bottom,u.bottom)+a});Eu(r,c.scrollLeft,c.scrollTop)}o(um,"scrollToCoordsRange");function tr(r,n){Math.abs(r.doc.scrollTop-n)<2||(i||zp(r,{top:n}),Yr(r,n,!0),i&&zp(r),ho(r,100))}o(tr,"updateScrollTop");function Yr(r,n,u){n=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,n)),!(r.display.scroller.scrollTop==n&&!u)&&(r.doc.scrollTop=n,r.display.scrollbars.setScrollTop(n),r.display.scroller.scrollTop!=n&&(r.display.scroller.scrollTop=n))}o(Yr,"setScrollTop");function ml(r,n,u,a){n=Math.max(0,Math.min(n,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((u?n==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-n)<2)&&!a)&&(r.doc.scrollLeft=n,fm(r),r.display.scroller.scrollLeft!=n&&(r.display.scroller.scrollLeft=n),r.display.scrollbars.setScrollLeft(n))}o(ml,"setScrollLeft");function bu(r){var n=r.display,u=n.gutters.offsetWidth,a=Math.round(r.doc.height+wr(r.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:r.options.fixedGutter?u:0,docHeight:a,scrollHeight:a+Gr(r)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:u}}o(bu,"measureForScrollbars");var Ns=o(function(r,n,u){this.cm=u;var a=this.vert=Ee("div",[Ee("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c=this.horiz=Ee("div",[Ee("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a.tabIndex=c.tabIndex=-1,r(a),r(c),H(a,"scroll",function(){a.clientHeight&&n(a.scrollTop,"vertical")}),H(c,"scroll",function(){c.clientWidth&&n(c.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&y<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Ns.prototype.update=function(r){var n=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=n?a+"px":"0";var c=r.viewHeight-(n?a:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+c)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){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:n?a:0}},Ns.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ns.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ns.prototype.zeroWidthHack=function(){var r=R&&!X?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new St,this.disableVert=new St},Ns.prototype.enableZeroWidthBar=function(r,n,u){r.style.pointerEvents="auto";function a(){var c=r.getBoundingClientRect(),m=u=="vert"?document.elementFromPoint(c.right-1,(c.top+c.bottom)/2):document.elementFromPoint((c.right+c.left)/2,c.bottom-1);m!=r?r.style.pointerEvents="none":n.set(1e3,a)}o(a,"maybeDisable"),n.set(1e3,a)},Ns.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var Tu=o(function(){},"NullScrollbars");Tu.prototype.update=function(){return{bottom:0,right:0}},Tu.prototype.setScrollLeft=function(){},Tu.prototype.setScrollTop=function(){},Tu.prototype.clear=function(){};function Ls(r,n){n||(n=bu(r));var u=r.display.barWidth,a=r.display.barHeight;ca(r,n);for(var c=0;c<4&&u!=r.display.barWidth||a!=r.display.barHeight;c++)u!=r.display.barWidth&&r.options.lineWrapping&&Ts(r),ca(r,bu(r)),u=r.display.barWidth,a=r.display.barHeight}o(Ls,"updateScrollbars");function ca(r,n){var u=r.display,a=u.scrollbars.update(n);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=n.gutterWidth+"px"):u.gutterFiller.style.display=""}o(ca,"updateScrollbarsInner");var zf={native:Ns,null:Tu};function vl(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&xe(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new zf[r.options.scrollbarStyle](function(n){r.display.wrapper.insertBefore(n,r.display.scrollbarFiller),H(n,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,u){u=="horizontal"?ml(r,n):tr(r,n)},r),r.display.scrollbars.addClass&<(r.display.wrapper,r.display.scrollbars.addClass)}o(vl,"initScrollbars");var ku=0;function $i(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:++ku,markArrays:null},oo(r.curOp)}o($i,"startOperation");function po(r){var n=r.curOp;n&&Fp(n,function(u){for(var a=0;a=u.viewTo)||u.maxLineChanged&&n.options.lineWrapping,r.update=r.mustUpdate&&new Nn(n,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}o(Ky,"endOperation_R1");function Gy(r){r.updatedDisplay=r.mustUpdate&&Up(r.cm,r.update)}o(Gy,"endOperation_W1");function Yy(r){var n=r.cm,u=n.display;r.updatedDisplay&&Ts(n),r.barMeasure=bu(n),u.maxLineChanged&&!n.options.lineWrapping&&(r.adjustWidthTo=Zh(n,u.maxLine,u.maxLine.text.length).left+3,n.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+r.adjustWidthTo+Gr(n)+n.display.barWidth),r.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+r.adjustWidthTo-Wi(n))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=u.input.prepareSelection())}o(Yy,"endOperation_R2");function Xy(r){var n=r.cm;r.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft=r.display.viewTo)){var u=+new Date+r.options.workTime,a=hs(r,n.highlightFrontier),c=[];n.iter(a.line,Math.min(n.first+n.size,r.display.viewTo+500),function(m){if(a.line>=r.display.viewFrom){var g=m.styles,S=m.text.length>r.options.maxHighlightLength?Wo(n.mode,a.state):null,C=cu(r,m,a,!0);S&&(a.state=S),m.styles=C.styles;var E=m.styleClasses,L=C.classes;L?m.styleClasses=L:E&&(m.styleClasses=null);for(var A=!g||g.length!=m.styles.length||E!=L&&(!E||!L||E.bgClass!=L.bgClass||E.textClass!=L.textClass),j=0;!A&&ju)return ho(r,r.options.workDelay),!0}),n.highlightFrontier=a.line,n.modeFrontier=Math.max(n.modeFrontier,a.line),c.length&&Xr(r,function(){for(var m=0;m=u.viewFrom&&n.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&sm(r)==0)return!1;mo(r)&&(qo(r),n.dims=qn(r));var c=a.first+a.size,m=Math.max(n.visible.from-r.options.viewportMargin,a.first),g=Math.min(c,n.visible.to+r.options.viewportMargin);u.viewFromg&&u.viewTo-g<20&&(g=Math.min(c,u.viewTo)),Si&&(m=Jl(r.doc,m),g=Hr(r.doc,g));var S=m!=u.viewFrom||g!=u.viewTo||u.lastWrapHeight!=n.wrapperHeight||u.lastWrapWidth!=n.wrapperWidth;$y(r,m,g),u.viewOffset=Wr(Le(r.doc,u.viewFrom)),r.display.mover.style.top=u.viewOffset+"px";var C=sm(r);if(!S&&C==0&&!n.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var E=Zy(r);return C>4&&(u.lineDiv.style.display="none"),e0(r,u.updateLineNumbers,n.dims),C>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,Jy(E),Ve(u.cursorDiv),Ve(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,S&&(u.lastWrapHeight=n.wrapperHeight,u.lastWrapWidth=n.wrapperWidth,ho(r,400)),u.updateLineNumbers=null,!0}o(Up,"updateDisplayIfNeeded");function Ps(r,n){for(var u=n.viewport,a=!0;;a=!1){if(!a||!r.options.lineWrapping||n.oldDisplayWidth==Wi(r)){if(u&&u.top!=null&&(u={top:Math.min(r.doc.height+wr(r.display)-lo(r),u.top)}),n.visible=hl(r.display,r.doc,u),n.visible.from>=r.display.viewFrom&&n.visible.to<=r.display.viewTo)break}else a&&(n.visible=hl(r.display,r.doc,u));if(!Up(r,n))break;Ts(r);var c=bu(r);Cu(r),Ls(r,c),jp(r,c),n.force=!1}n.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(n.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}o(Ps,"postUpdateDisplay");function zp(r,n){var u=new Nn(r,n);if(Up(r,u)){Ts(r),Ps(r,u);var a=bu(r);Cu(r),Ls(r,a),jp(r,a),u.finish()}}o(zp,"updateDisplaySimple");function e0(r,n,u){var a=r.display,c=r.options.lineNumbers,m=a.lineDiv,g=m.firstChild;function S(ee){var oe=ee.nextSibling;return _&&R&&r.display.currentWheelTarget==ee?ee.style.display="none":ee.parentNode.removeChild(ee),oe}o(S,"rm");for(var C=a.view,E=a.viewFrom,L=0;L-1&&(z=!1),Ff(r,A,E,u)),z&&(Ve(A.lineNumber),A.lineNumber.appendChild(document.createTextNode(nl(r.options,E)))),g=A.node.nextSibling}E+=A.size}for(;g;)g=S(g)}o(e0,"patchDisplay");function $p(r){var n=r.gutters.offsetWidth;r.sizer.style.marginLeft=n+"px",lr(r,"gutterChanged",r)}o($p,"updateGutterSpace");function jp(r,n){r.display.sizer.style.minHeight=n.docHeight+"px",r.display.heightForcer.style.top=n.docHeight+"px",r.display.gutters.style.height=n.docHeight+r.display.barHeight+Gr(r)+"px"}o(jp,"setDocumentHeight");function fm(r){var n=r.display,u=n.view;if(!(!n.alignWidgets&&(!n.gutters.firstChild||!r.options.fixedGutter))){for(var a=sa(n)-n.scroller.scrollLeft+r.doc.scrollLeft,c=n.gutters.offsetWidth,m=a+"px",g=0;gg.clientWidth,C=g.scrollHeight>g.clientHeight;if(!!(a&&S||c&&C)){if(c&&R&&_){e:for(var E=n.target,L=m.view;E!=g;E=E.parentNode)for(var A=0;A=0&&Ue(r,a.to())<=0)return u}return-1};var vt=o(function(r,n){this.anchor=r,this.head=n},"Range");vt.prototype.from=function(){return ds(this.anchor,this.head)},vt.prototype.to=function(){return Uo(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Zr(r,n,u){var a=r&&r.options.selectionsMayTouch,c=n[u];n.sort(function(j,z){return Ue(j.from(),z.from())}),u=it(n,c);for(var m=1;m0:C>=0){var E=ds(S.from(),g.from()),L=Uo(S.to(),g.to()),A=S.empty()?g.from()==g.head:S.from()==S.head;m<=u&&--u,n.splice(--m,2,new vt(A?L:E,A?E:L))}}return new li(n,u)}o(Zr,"normalizeSelection");function Ms(r,n){return new li([new vt(r,n||r)],0)}o(Ms,"simpleSelection");function As(r){return r.text?ae(r.from.line+r.text.length-1,we(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}o(As,"changeEnd");function Ei(r,n){if(Ue(r,n.from)<0)return r;if(Ue(r,n.to)<=0)return As(n);var u=r.line+n.text.length-(n.to.line-n.from.line)-1,a=r.ch;return r.line==n.to.line&&(a+=As(n).ch-n.to.ch),ae(u,a)}o(Ei,"adjustForChange");function Vp(r,n){for(var u=[],a=0;a1&&r.remove(S.line+1,ee-1),r.insert(S.line+1,ve)}lr(r,"change",r,n)}o(qf,"updateDoc");function Ds(r,n,u){function a(c,m,g){if(c.linked)for(var S=0;S1&&!r.done[r.done.length-2].ranges)return r.done.pop(),we(r.done)}o(i0,"lastChangeEvent");function vo(r,n,u,a){var c=r.history;c.undone.length=0;var m=+new Date,g,S;if((c.lastOp==a||c.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&c.lastModTime>m-(r.cm?r.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(g=i0(c,c.lastOp==a)))S=we(g.changes),Ue(n.from,n.to)==0&&Ue(n.from,S.to)==0?S.to=As(n):g.changes.push(Yp(r,n));else{var C=we(c.done);for((!C||!C.ranges)&&Ln(r.sel,c.done),g={changes:[Yp(r,n)],generation:c.generation},c.done.push(g);c.done.length>c.undoDepth;)c.done.shift(),c.done[0].ranges||c.done.shift()}c.done.push(u),c.generation=++c.maxGeneration,c.lastModTime=c.lastSelTime=m,c.lastOp=c.lastSelOp=a,c.lastOrigin=c.lastSelOrigin=n.origin,S||be(r,"historyAdded")}o(vo,"addChangeToHistory");function Qp(r,n,u,a){var c=n.charAt(0);return c=="*"||c=="+"&&u.ranges.length==a.ranges.length&&u.somethingSelected()==a.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}o(Qp,"selectionEventCanBeMerged");function yl(r,n,u,a){var c=r.history,m=a&&a.origin;u==c.lastSelOp||m&&c.lastSelOrigin==m&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==m||Qp(r,m,we(c.done),n))?c.done[c.done.length-1]=n:Ln(n,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=m,c.lastSelOp=u,a&&a.clearRedo!==!1&&Xp(c.undone)}o(yl,"addSelectionToHistory");function Ln(r,n){var u=we(n);u&&u.ranges&&u.equals(r)||n.push(r)}o(Ln,"pushSelectionToHistory");function vm(r,n,u,a){var c=n["spans_"+r.id],m=0;r.iter(Math.max(r.first,u),Math.min(r.first+r.size,a),function(g){g.markedSpans&&((c||(c=n["spans_"+r.id]={}))[m]=g.markedSpans),++m})}o(vm,"attachLocalSpans");function gm(r){if(!r)return null;for(var n,u=0;u-1&&(we(S)[A]=E[A],delete E[A])}}return a}o(ai,"copyHistoryArray");function Kf(r,n,u,a){if(a){var c=r.anchor;if(u){var m=Ue(n,c)<0;m!=Ue(u,c)<0?(c=n,n=u):m!=Ue(n,u)<0&&(n=u)}return new vt(c,n)}else return new vt(u||n,n)}o(Kf,"extendRange");function Gf(r,n,u,a,c){c==null&&(c=r.cm&&(r.cm.display.shift||r.extend)),Br(r,new li([Kf(r.sel.primary(),n,u,c)],0),a)}o(Gf,"extendSelection");function Pu(r,n,u){for(var a=[],c=r.cm&&(r.cm.display.shift||r.extend),m=0;m=n.ch:S.to>n.ch))){if(c&&(be(C,"beforeCursorEnter"),C.explicitlyCleared))if(m.markedSpans){--g;continue}else break;if(!C.atomic)continue;if(u){var A=C.find(a<0?1:-1),j=void 0;if((a<0?L:E)&&(A=Qf(r,A,-a,A&&A.line==n.line?m:null)),A&&A.line==n.line&&(j=Ue(A,u))&&(a<0?j<0:j>0))return wl(r,A,n,a,c)}var z=C.find(a<0?-1:1);return(a<0?E:L)&&(z=Qf(r,z,a,z.line==n.line?m:null)),z?wl(r,z,n,a,c):null}}return n}o(wl,"skipAtomicInner");function Ur(r,n,u,a,c){var m=a||1,g=wl(r,n,u,m,c)||!c&&wl(r,n,u,m,!0)||wl(r,n,u,-m,c)||!c&&wl(r,n,u,-m,!0);return g||(r.cantEdit=!0,ae(r.first,0))}o(Ur,"skipAtomic");function Qf(r,n,u,a){return u<0&&n.ch==0?n.line>r.first?Be(r,ae(n.line-1)):null:u>0&&n.ch==(a||Le(r,n.line)).text.length?n.line=0;--c)Zf(r,{from:a[c].from,to:a[c].to,text:c?[""]:n.text,origin:n.origin});else Zf(r,n)}}o(ha,"makeChange");function Zf(r,n){if(!(n.text.length==1&&n.text[0]==""&&Ue(n.from,n.to)==0)){var u=Vp(r,n);vo(r,n,u,r.cm?r.cm.curOp.id:NaN),va(r,n,u,Lf(r,n));var a=[];Ds(r,function(c,m){!m&&it(a,c.history)==-1&&(Cm(c.history,n),a.push(c.history)),va(c,n,null,Lf(c,n))})}}o(Zf,"makeChangeInner");function Jf(r,n,u){var a=r.cm&&r.cm.state.suppressEdits;if(!(a&&!u)){for(var c=r.history,m,g=r.sel,S=n=="undo"?c.done:c.undone,C=n=="undo"?c.undone:c.done,E=0;E=0;--z){var ee=j(z);if(ee)return ee.v}}}}o(Jf,"makeChangeFromHistory");function ma(r,n){if(n!=0&&(r.first+=n,r.sel=new li(kr(r.sel.ranges,function(c){return new vt(ae(c.anchor.line+n,c.anchor.ch),ae(c.head.line+n,c.head.ch))}),r.sel.primIndex),r.cm)){Ye(r.cm,r.first,r.first-n,n);for(var u=r.cm.display,a=u.viewFrom;ar.lastLine())){if(n.from.linem&&(n={from:n.from,to:ae(m,Le(r,m).text.length),text:[n.text[0]],origin:n.origin}),n.removed=wi(r,n.from,n.to),u||(u=Vp(r,n)),r.cm?o0(r.cm,n,a):qf(r,n,a),ui(r,u,$t),r.cantEdit&&Ur(r,ae(r.firstLine(),0))&&(r.cantEdit=!1)}}o(va,"makeChangeSingleDoc");function o0(r,n,u){var a=r.doc,c=r.display,m=n.from,g=n.to,S=!1,C=m.line;r.options.lineWrapping||(C=dt(kn(Le(a,m.line))),a.iter(C,g.line+1,function(z){if(z==c.maxLine)return S=!0,!0})),a.sel.contains(n.from,n.to)>-1&&zl(r),qf(a,n,u,om(r)),r.options.lineWrapping||(a.iter(C,m.line+n.text.length,function(z){var ee=ys(z);ee>c.maxLineLength&&(c.maxLine=z,c.maxLineLength=ee,c.maxLineChanged=!0,S=!1)}),S&&(r.curOp.updateMaxLine=!0)),Np(a,m.line),ho(r,400);var E=n.text.length-(g.line-m.line)-1;n.full?Ye(r):m.line==g.line&&n.text.length==1&&!Gp(r.doc,n)?bs(r,m.line,"text"):Ye(r,m.line,g.line+1,E);var L=Ft(r,"changes"),A=Ft(r,"change");if(A||L){var j={from:m,to:g,text:n.text,removed:n.removed,origin:n.origin};A&&lr(r,"change",r,j),L&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(j)}r.display.selForContextMenu=null}o(o0,"makeChangeSingleDocInEditor");function ga(r,n,u,a,c){var m;a||(a=u),Ue(a,u)<0&&(m=[a,u],u=m[0],a=m[1]),typeof n=="string"&&(n=r.splitLines(n)),ha(r,{from:u,to:a,text:n,origin:c})}o(ga,"replaceRange");function ya(r,n,u,a){u1||!(this.children[0]instanceof wa))){var S=[];this.collapse(S),this.children=[new wa(S)],this.children[0].parent=this}},collapse:function(r){for(var n=0;n50){for(var g=c.lines.length%25+25,S=g;S10);r.parent.maybeSpill()}},iterN:function(r,n,u){for(var a=0;ar.display.maxLineLength&&(r.display.maxLine=E,r.display.maxLineLength=L,r.display.maxLineChanged=!0)}a!=null&&r&&this.collapsed&&Ye(r,a,c+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&Mu(r.doc)),r&&lr(r,"markerCleared",r,this,a,c),n&&po(r),this.parent&&this.parent.clear()}},Rs.prototype.find=function(r,n){r==null&&this.type=="bookmark"&&(r=1);for(var u,a,c=0;c0||g==0&&m.clearWhenEmpty!==!1)return m;if(m.replacedWith&&(m.collapsed=!0,m.widgetNode=xt("span",[m.replacedWith],"CodeMirror-widget"),a.handleMouseEvents||m.widgetNode.setAttribute("cm-ignore-events","true"),a.insertLeft&&(m.widgetNode.insertLeft=!0)),m.collapsed){if(sl(r,n.line,n,u,m)||n.line!=u.line&&sl(r,u.line,n,u,m))throw new Error("Inserting collapsed marker partially overlapping an existing one");We()}m.addToHistory&&vo(r,{from:n,to:u,origin:"markText"},r.sel,NaN);var S=n.line,C=r.cm,E;if(r.iter(S,u.line+1,function(A){C&&m.collapsed&&!C.options.lineWrapping&&kn(A)==C.display.maxLine&&(E=!0),m.collapsed&&S!=n.line&&xi(A,0),Se(A,new $o(m,S==n.line?n.ch:null,S==u.line?u.ch:null),r.cm&&r.cm.curOp),++S}),m.collapsed&&r.iter(n.line,u.line+1,function(A){Nt(r,A)&&xi(A,0)}),m.clearOnEnter&&H(m,"beforeCursorEnter",function(){return m.clear()}),m.readOnly&&(M(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),m.collapsed&&(m.id=++ec,m.atomic=!0),C){if(E&&(C.curOp.updateMaxLine=!0),m.collapsed)Ye(C,n.line,u.line+1);else if(m.className||m.startStyle||m.endStyle||m.css||m.attributes||m.title)for(var L=n.line;L<=u.line;L++)bs(C,L,"text");m.atomic&&Mu(C.doc),lr(C,"markerAdded",C,m)}return m}o(Is,"markText");var xa=o(function(r,n){this.markers=r,this.primary=n;for(var u=0;u=0;C--)ha(this,a[C]);S?Yf(this,S):this.cm&&Os(this.cm)}),undo:T(function(){Jf(this,"undo")}),redo:T(function(){Jf(this,"redo")}),undoSelection:T(function(){Jf(this,"undo",!0)}),redoSelection:T(function(){Jf(this,"redo",!0)}),setExtending:function(r){this.extend=r},getExtending:function(){return this.extend},historySize:function(){for(var r=this.history,n=0,u=0,a=0;a=r.ch)&&n.push(c.marker.parent||c.marker)}return n},findMarks:function(r,n,u){r=Be(this,r),n=Be(this,n);var a=[],c=r.line;return this.iter(r.line,n.line+1,function(m){var g=m.markedSpans;if(g)for(var S=0;S=C.to||C.from==null&&c!=r.line||C.from!=null&&c==n.line&&C.from>=n.ch)&&(!u||u(C.marker))&&a.push(C.marker.parent||C.marker)}++c}),a},getAllMarks:function(){var r=[];return this.iter(function(n){var u=n.markedSpans;if(u)for(var a=0;ar)return n=r,!0;r-=m,++u}),Be(this,ae(u,n))},indexFromPos:function(r){r=Be(this,r);var n=r.ch;if(r.linen&&(n=r.from),r.to!=null&&r.to-1){n.state.draggingText(r),setTimeout(function(){return n.display.input.focus()},20);return}try{var L=r.dataTransfer.getData("Text");if(L){var A;if(n.state.draggingText&&!n.state.draggingText.copy&&(A=n.listSelections()),ui(n.doc,Ms(u,u)),A)for(var j=0;j=0;S--)ga(r.doc,"",a[S].from,a[S].to,"+delete");Os(r)})}o(fi,"deleteNearSelection");function Iu(r,n,u){var a=Ii(r.text,n+u,u);return a<0||a>r.text.length?null:a}o(Iu,"moveCharLogically");function ic(r,n,u){var a=Iu(r,n.ch,u);return a==null?null:new ae(n.line,a,u<0?"after":"before")}o(ic,"moveLogically");function Sa(r,n,u,a,c){if(r){n.doc.direction=="rtl"&&(c=-c);var m=Tn(u,n.doc.direction);if(m){var g=c<0?we(m):m[0],S=c<0==(g.level==1),C=S?"after":"before",E;if(g.level>0||n.doc.direction=="rtl"){var L=Ui(n,u);E=c<0?u.text.length-1:0;var A=ao(n,L,E).top;E=un(function(j){return ao(n,L,j).top==A},c<0==(g.level==1)?g.from:g.to-1,E),C=="before"&&(E=Iu(u,E,1))}else E=c<0?g.to:g.from;return new ae(a,E,C)}}return new ae(a,c<0?u.text.length:0,c<0?"before":"after")}o(Sa,"endOfLine");function Lm(r,n,u,a){var c=Tn(n,r.doc.direction);if(!c)return ic(n,u,a);u.ch>=n.text.length?(u.ch=n.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var m=gi(c,u.ch,u.sticky),g=c[m];if(r.doc.direction=="ltr"&&g.level%2==0&&(a>0?g.to>u.ch:g.from=g.from&&j>=L.begin)){var z=A?"before":"after";return new ae(u.line,j,z)}}var ee=o(function(ve,Ce,ge){for(var Te=o(function(bt,xr){return xr?new ae(u.line,S(bt,1),"before"):new ae(u.line,bt,"after")},"getRes");ve>=0&&ve0==(Re.level!=1),Je=De?ge.begin:S(ge.end,-1);if(Re.from<=Je&&Je0?L.end:S(L.begin,-1);return ce!=null&&!(a>0&&ce==n.text.length)&&(oe=ee(a>0?0:c.length-1,a,E(ce)),oe)?oe:null}o(Lm,"moveVisually");var Sl={selectAll:wm,singleSelection:function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),$t)},killLine:function(r){return fi(r,function(n){if(n.empty()){var u=Le(r.doc,n.head.line).text.length;return n.head.ch==u&&n.head.line0)c=new ae(c.line,c.ch+1),r.replaceRange(m.charAt(c.ch-1)+m.charAt(c.ch-2),ae(c.line,c.ch-2),c,"+transpose");else if(c.line>r.doc.first){var g=Le(r.doc,c.line-1).text;g&&(c=new ae(c.line,1),r.replaceRange(m.charAt(0)+r.doc.lineSeparator()+g.charAt(g.length-1),ae(c.line-1,g.length-1),c,"+transpose"))}}u.push(new vt(c,c))}r.setSelections(u)})},newlineAndIndent:function(r){return Xr(r,function(){for(var n=r.listSelections(),u=n.length-1;u>=0;u--)r.replaceRange(r.doc.lineSeparator(),n[u].anchor,n[u].head,"+input");n=r.listSelections();for(var a=0;ar&&Ue(n,this.pos)==0&&u==this.button};var zr,Vn;function p0(r,n){var u=+new Date;return Vn&&Vn.compare(u,r,n)?(zr=Vn=null,"triple"):zr&&zr.compare(u,r,n)?(Vn=new lc(u,r,n),zr=null,"double"):(zr=new lc(u,r,n),Vn=null,"single")}o(p0,"clickRepeat");function Fm(r){var n=this,u=n.display;if(!(Jt(n,r)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=r.shiftKey,mr(u,r)){_||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!cd(n,r)){var a=fo(n,r),c=Js(r),m=a?p0(a,c):"single";window.focus(),c==1&&n.state.selectingText&&n.state.selectingText(r),!(a&&ac(n,c,a,m,r))&&(c==1?a?Rm(n,a,m,r):yi(r)==u.scroller&&er(r):c==2?(a&&Gf(n.doc,a),setTimeout(function(){return u.input.focus()},20)):c==3&&(he?n.display.input.onContextMenu(r):Bf(n)))}}}o(Fm,"onMouseDown");function ac(r,n,u,a,c){var m="Click";return a=="double"?m="Double"+m:a=="triple"&&(m="Triple"+m),m=(n==1?"Left":n==2?"Middle":"Right")+m,Ca(r,id(m,c),c,function(g){if(typeof g=="string"&&(g=Sl[g]),!g)return!1;var S=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),S=g(r,u)!=zt}finally{r.state.suppressEdits=!1}return S})}o(ac,"handleMappedButton");function _a(r,n,u){var a=r.getOption("configureMouse"),c=a?a(r,n,u):{};if(c.unit==null){var m=K?u.shiftKey&&u.metaKey:u.altKey;c.unit=m?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(c.extend==null||r.doc.extend)&&(c.extend=r.doc.extend||u.shiftKey),c.addNew==null&&(c.addNew=R?u.metaKey:u.ctrlKey),c.moveOnDrag==null&&(c.moveOnDrag=!(R?u.altKey:u.ctrlKey)),c}o(_a,"configureMouse");function Rm(r,n,u,a){p?setTimeout(Rr(Bp,r),0):r.curOp.focus=ze();var c=_a(r,u,a),m=r.doc.sel,g;r.options.dragDrop&&cs&&!r.isReadOnly()&&u=="single"&&(g=m.contains(n))>-1&&(Ue((g=m.ranges[g]).from(),n)<0||n.xRel>0)&&(Ue(g.to(),n)>0||n.xRel<0)?Im(r,a,n,c):Wm(r,a,n,c)}o(Rm,"leftButtonDown");function Im(r,n,u,a){var c=r.display,m=!1,g=rr(r,function(E){_&&(c.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:Bf(r)),de(c.wrapper.ownerDocument,"mouseup",g),de(c.wrapper.ownerDocument,"mousemove",S),de(c.scroller,"dragstart",C),de(c.scroller,"drop",g),m||(er(E),a.addNew||Gf(r.doc,u,null,null,a.extend),_&&!B||p&&y==9?setTimeout(function(){c.wrapper.ownerDocument.body.focus({preventScroll:!0}),c.input.focus()},20):c.input.focus())}),S=o(function(E){m=m||Math.abs(n.clientX-E.clientX)+Math.abs(n.clientY-E.clientY)>=10},"mouseMove"),C=o(function(){return m=!0},"dragStart");_&&(c.scroller.draggable=!0),r.state.draggingText=g,g.copy=!a.moveOnDrag,H(c.wrapper.ownerDocument,"mouseup",g),H(c.wrapper.ownerDocument,"mousemove",S),H(c.scroller,"dragstart",C),H(c.scroller,"drop",g),r.state.delayingBlurEvent=!0,setTimeout(function(){return c.input.focus()},20),c.scroller.dragDrop&&c.scroller.dragDrop()}o(Im,"leftButtonStartDrag");function Hm(r,n,u){if(u=="char")return new vt(n,n);if(u=="word")return r.findWordAt(n);if(u=="line")return new vt(ae(n.line,0),Be(r.doc,ae(n.line+1,0)));var a=u(r,n);return new vt(a.from,a.to)}o(Hm,"rangeForUnit");function Wm(r,n,u,a){p&&Bf(r);var c=r.display,m=r.doc;er(n);var g,S,C=m.sel,E=C.ranges;if(a.addNew&&!a.extend?(S=m.sel.contains(u),S>-1?g=E[S]:g=new vt(u,u)):(g=m.sel.primary(),S=m.sel.primIndex),a.unit=="rectangle")a.addNew||(g=new vt(u,u)),u=fo(r,n,!0,!0),S=-1;else{var L=Hm(r,u,a.unit);a.extend?g=Kf(g,L.anchor,L.head,a.extend):g=L}a.addNew?S==-1?(S=E.length,Br(m,Zr(r,E.concat([g]),S),{scroll:!1,origin:"*mouse"})):E.length>1&&E[S].empty()&&a.unit=="char"&&!a.extend?(Br(m,Zr(r,E.slice(0,S).concat(E.slice(S+1)),0),{scroll:!1,origin:"*mouse"}),C=m.sel):Zp(m,S,g,ne):(S=0,Br(m,new li([g],0),ne),C=m.sel);var A=u;function j(ge){if(Ue(A,ge)!=0)if(A=ge,a.unit=="rectangle"){for(var Te=[],Re=r.options.tabSize,De=Ot(Le(m,u.line).text,u.ch,Re),Je=Ot(Le(m,ge.line).text,ge.ch,Re),bt=Math.min(De,Je),xr=Math.max(De,Je),Pt=Math.min(u.line,ge.line),mn=Math.min(r.lastLine(),Math.max(u.line,ge.line));Pt<=mn;Pt++){var vn=Le(m,Pt).text,ur=Tr(vn,bt,Re);bt==xr?Te.push(new vt(ae(Pt,ur),ae(Pt,ur))):vn.length>ur&&Te.push(new vt(ae(Pt,ur),ae(Pt,Tr(vn,xr,Re))))}Te.length||Te.push(new vt(u,u)),Br(m,Zr(r,C.ranges.slice(0,S).concat(Te),S),{origin:"*mouse",scroll:!1}),r.scrollIntoView(ge)}else{var $r=g,Lr=Hm(r,ge,a.unit),kt=$r.anchor,It;Ue(Lr.anchor,kt)>0?(It=Lr.head,kt=ds($r.from(),Lr.anchor)):(It=Lr.anchor,kt=Uo($r.to(),Lr.head));var nr=C.ranges.slice(0);nr[S]=Ea(r,new vt(Be(m,kt),It)),Br(m,Zr(r,nr,S),ne)}}o(j,"extendTo");var z=c.wrapper.getBoundingClientRect(),ee=0;function oe(ge){var Te=++ee,Re=fo(r,ge,!0,a.unit=="rectangle");if(!!Re)if(Ue(Re,A)!=0){r.curOp.focus=ze(),j(Re);var De=hl(c,m);(Re.line>=De.to||Re.linez.bottom?20:0;Je&&setTimeout(rr(r,function(){ee==Te&&(c.scroller.scrollTop+=Je,oe(ge))}),50)}}o(oe,"extend");function ce(ge){r.state.selectingText=!1,ee=Infinity,ge&&(er(ge),c.input.focus()),de(c.wrapper.ownerDocument,"mousemove",ve),de(c.wrapper.ownerDocument,"mouseup",Ce),m.history.lastSelOrigin=null}o(ce,"done");var ve=rr(r,function(ge){ge.buttons===0||!Js(ge)?ce(ge):oe(ge)}),Ce=rr(r,ce);r.state.selectingText=Ce,H(c.wrapper.ownerDocument,"mousemove",ve),H(c.wrapper.ownerDocument,"mouseup",Ce)}o(Wm,"leftButtonSelect");function Ea(r,n){var u=n.anchor,a=n.head,c=Le(r.doc,u.line);if(Ue(u,a)==0&&u.sticky==a.sticky)return n;var m=Tn(c);if(!m)return n;var g=gi(m,u.ch,u.sticky),S=m[g];if(S.from!=u.ch&&S.to!=u.ch)return n;var C=g+(S.from==u.ch==(S.level!=1)?0:1);if(C==0||C==m.length)return n;var E;if(a.line!=u.line)E=(a.line-u.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var L=gi(m,a.ch,a.sticky),A=L-g||(a.ch-u.ch)*(S.level==1?-1:1);L==C-1||L==C?E=A<0:E=A>0}var j=m[C+(E?-1:0)],z=E==(j.level==1),ee=z?j.from:j.to,oe=z?"after":"before";return u.ch==ee&&u.sticky==oe?n:new vt(new ae(u.line,ee,oe),a)}o(Ea,"bidiSimplify");function ba(r,n,u,a){var c,m;if(n.touches)c=n.touches[0].clientX,m=n.touches[0].clientY;else try{c=n.clientX,m=n.clientY}catch(j){return!1}if(c>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;a&&er(n);var g=r.display,S=g.lineDiv.getBoundingClientRect();if(m>S.bottom||!Ft(r,u))return fs(n);m-=S.top-g.viewOffset;for(var C=0;C=c){var L=Hi(r.doc,m),A=r.display.gutterSpecs[C];return be(r,u,r,L,A.className,n),fs(n)}}}o(ba,"gutterEvent");function cd(r,n){return ba(r,n,"gutterClick",!0)}o(cd,"clickInGutter");function pd(r,n){mr(r.display,n)||Bm(r,n)||Jt(r,n,"contextmenu")||he||r.display.input.onContextMenu(n)}o(pd,"onContextMenu");function Bm(r,n){return Ft(r,"gutterContextMenu")?ba(r,n,"gutterContextMenu",!1):!1}o(Bm,"contextMenuInGutter");function Hu(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Su(r)}o(Hu,"themeChanged");var Cl={toString:function(){return"CodeMirror.Init"}},Wu={},Ta={};function uc(r){var n=r.optionHandlers;function u(a,c,m,g){r.defaults[a]=c,m&&(n[a]=g?function(S,C,E){E!=Cl&&m(S,C,E)}:m)}o(u,"option"),r.defineOption=u,r.Init=Cl,u("value","",function(a,c){return a.setValue(c)},!0),u("mode",null,function(a,c){a.doc.modeOption=c,Kp(a)},!0),u("indentUnit",2,Kp,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(a){Nu(a),Su(a),Ye(a)},!0),u("lineSeparator",null,function(a,c){if(a.doc.lineSep=c,!!c){var m=[],g=a.doc.first;a.doc.iter(function(C){for(var E=0;;){var L=C.text.indexOf(c,E);if(L==-1)break;E=L+c.length,m.push(ae(g,L))}g++});for(var S=m.length-1;S>=0;S--)ga(a.doc,c,m[S],ae(m[S].line,m[S].ch+c.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(a,c,m){a.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),m!=Cl&&a.refresh()}),u("specialCharPlaceholder",On,function(a){return a.refresh()},!0),u("electricChars",!0),u("inputStyle",P?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(a,c){return a.getInputField().spellcheck=c},!0),u("autocorrect",!1,function(a,c){return a.getInputField().autocorrect=c},!0),u("autocapitalize",!1,function(a,c){return a.getInputField().autocapitalize=c},!0),u("rtlMoveVisually",!V),u("wholeLineUpdateBefore",!0),u("theme","default",function(a){Hu(a),Ou(a)},!0),u("keyMap","default",function(a,c,m){var g=dn(c),S=m!=Cl&&dn(m);S&&S.detach&&S.detach(a,g),g.attach&&g.attach(a,S||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,Um,!0),u("gutters",[],function(a,c){a.display.gutterSpecs=qp(c,a.options.lineNumbers),Ou(a)},!0),u("fixedGutter",!0,function(a,c){a.display.gutters.style.left=c?sa(a.display)+"px":"0",a.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(a){return Ls(a)},!0),u("scrollbarStyle","native",function(a){vl(a),Ls(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),u("lineNumbers",!1,function(a,c){a.display.gutterSpecs=qp(a.options.gutters,c),Ou(a)},!0),u("firstLineNumber",1,Ou,!0),u("lineNumberFormatter",function(a){return a},Ou,!0),u("showCursorWhenSelecting",!1,Cu,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(a,c){c=="nocursor"&&(dl(a),a.display.input.blur()),a.display.input.readOnlyChanged(c)}),u("screenReaderLabel",null,function(a,c){c=c===""?null:c,a.display.input.screenReaderLabelChanged(c)}),u("disableInput",!1,function(a,c){c||a.display.input.reset()},!0),u("dragDrop",!0,d0),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Cu,!0),u("singleCursorHeightPerLine",!0,Cu,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,Nu,!0),u("addModeClass",!1,Nu,!0),u("pollInterval",100),u("undoDepth",200,function(a,c){return a.doc.history.undoDepth=c}),u("historyEventDelay",1250),u("viewportMargin",10,function(a){return a.refresh()},!0),u("maxHighlightLength",1e4,Nu,!0),u("moveInputWithCursor",!0,function(a,c){c||a.display.input.resetPosition()}),u("tabindex",null,function(a,c){return a.display.input.getField().tabIndex=c||""}),u("autofocus",null),u("direction","ltr",function(a,c){return a.doc.setDirection(c)},!0),u("phrases",null)}o(uc,"defineOptions");function d0(r,n,u){var a=u&&u!=Cl;if(!n!=!a){var c=r.display.dragFunctions,m=n?H:de;m(r.display.scroller,"dragstart",c.start),m(r.display.scroller,"dragenter",c.enter),m(r.display.scroller,"dragover",c.over),m(r.display.scroller,"dragleave",c.leave),m(r.display.scroller,"drop",c.drop)}}o(d0,"dragDropChanged");function Um(r){r.options.lineWrapping?(lt(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(xe(r.display.wrapper,"CodeMirror-wrap"),ll(r)),Es(r),Ye(r),Su(r),setTimeout(function(){return Ls(r)},100)}o(Um,"wrappingChanged");function Lt(r,n){var u=this;if(!(this instanceof Lt))return new Lt(r,n);this.options=n=n?Kt(n):{},Kt(Wu,n,!1);var a=n.value;typeof a=="string"?a=new pn(a,n.mode,null,n.lineSeparator,n.direction):n.mode&&(a.modeOption=n.mode),this.doc=a;var c=new Lt.inputStyles[n.inputStyle](this),m=this.display=new t0(r,a,c,n);m.wrapper.CodeMirror=this,Hu(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vl(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 St,keySeq:null,specialChars:null},n.autofocus&&!P&&m.input.focus(),p&&y<11&&setTimeout(function(){return u.display.input.reset(!0)},20),zm(this),nd(),$i(this),this.curOp.forceUpdate=!0,mm(this,a),n.autofocus&&!P||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&aa(u)},20):dl(this);for(var g in Ta)Ta.hasOwnProperty(g)&&Ta[g](this,n[g],Cl);mo(this),n.finishInit&&n.finishInit(this);for(var S=0;S20*20}o(g,"farAway"),H(n.scroller,"touchstart",function(C){if(!Jt(r,C)&&!m(C)&&!cd(r,C)){n.input.ensurePolled(),clearTimeout(u);var E=+new Date;n.activeTouch={start:E,moved:!1,prev:E-a.end<=300?a:null},C.touches.length==1&&(n.activeTouch.left=C.touches[0].pageX,n.activeTouch.top=C.touches[0].pageY)}}),H(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),H(n.scroller,"touchend",function(C){var E=n.activeTouch;if(E&&!mr(n,C)&&E.left!=null&&!E.moved&&new Date-E.start<300){var L=r.coordsChar(n.activeTouch,"page"),A;!E.prev||g(E,E.prev)?A=new vt(L,L):!E.prev.prev||g(E,E.prev.prev)?A=r.findWordAt(L):A=new vt(ae(L.line,0),Be(r.doc,ae(L.line+1,0))),r.setSelection(A.anchor,A.head),r.focus(),er(C)}c()}),H(n.scroller,"touchcancel",c),H(n.scroller,"scroll",function(){n.scroller.clientHeight&&(tr(r,n.scroller.scrollTop),ml(r,n.scroller.scrollLeft,!0),be(r,"scroll",r))}),H(n.scroller,"mousewheel",function(C){return dm(r,C)}),H(n.scroller,"DOMMouseScroll",function(C){return dm(r,C)}),H(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(C){Jt(r,C)||no(C)},over:function(C){Jt(r,C)||(td(r,C),no(C))},start:function(C){return l0(r,C)},drop:rr(r,Om),leave:function(C){Jt(r,C)||rd(r)}};var S=n.input.getField();H(S,"keyup",function(C){return fd.call(r,C)}),H(S,"keydown",rr(r,Pm)),H(S,"keypress",rr(r,Am)),H(S,"focus",function(C){return aa(r,C)}),H(S,"blur",function(C){return dl(r,C)})}o(zm,"registerEventHandlers");var Bu=[];Lt.defineInitHook=function(r){return Bu.push(r)};function Uu(r,n,u,a){var c=r.doc,m;u==null&&(u="add"),u=="smart"&&(c.mode.indent?m=hs(r,n).state:u="prev");var g=r.options.tabSize,S=Le(c,n),C=Ot(S.text,null,g);S.stateAfter&&(S.stateAfter=null);var E=S.text.match(/^\s*/)[0],L;if(!a&&!/\S/.test(S.text))L=0,u="not";else if(u=="smart"&&(L=c.mode.indent(m,S.text.slice(E.length),S.text),L==zt||L>150)){if(!a)return;u="prev"}u=="prev"?n>c.first?L=Ot(Le(c,n-1).text,null,g):L=0:u=="add"?L=C+r.options.indentUnit:u=="subtract"?L=C-r.options.indentUnit:typeof u=="number"&&(L=C+u),L=Math.max(0,L);var A="",j=0;if(r.options.indentWithTabs)for(var z=Math.floor(L/g);z;--z)j+=g,A+=" ";if(jg,C=tl(n),E=null;if(S&&a.ranges.length>1)if(Ti&&Ti.text.join(` -`)==n){if(a.ranges.length%Ti.text.length==0){E=[];for(var L=0;L=0;j--){var z=a.ranges[j],ee=z.from(),oe=z.to();z.empty()&&(u&&u>0?ee=ae(ee.line,ee.ch-u):r.state.overwrite&&!S?oe=ae(oe.line,Math.min(Le(m,oe.line).text.length,oe.ch+we(C).length)):S&&Ti&&Ti.lineWise&&Ti.text.join(` -`)==C.join(` -`)&&(ee=oe=ae(ee.line,0)));var ce={from:ee,to:oe,text:E?E[j%E.length]:C,origin:c||(S?"paste":r.state.cutIncoming>g?"cut":"+input")};ha(r.doc,ce),lr(r,"inputRead",r,ce)}n&&!S&&$m(r,n),Os(r),r.curOp.updateInput<2&&(r.curOp.updateInput=A),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}o(fc,"applyTextInput");function dd(r,n){var u=r.clipboardData&&r.clipboardData.getData("Text");if(u)return r.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&Xr(n,function(){return fc(n,u,0,null,"paste")}),!0}o(dd,"handlePaste");function $m(r,n){if(!(!r.options.electricChars||!r.options.smartIndent))for(var u=r.doc.sel,a=u.ranges.length-1;a>=0;a--){var c=u.ranges[a];if(!(c.head.ch>100||a&&u.ranges[a-1].head.line==c.head.line)){var m=r.getModeAt(c.head),g=!1;if(m.electricChars){for(var S=0;S-1){g=Uu(r,c.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(Le(r.doc,c.head.line).text.slice(0,c.head.ch))&&(g=Uu(r,c.head.line,"smart"));g&&lr(r,"electricInput",r,c.head.line)}}}o($m,"triggerElectric");function hd(r){for(var n=[],u=[],a=0;am&&(Uu(this,S.head.line,a,!0),m=S.head.line,g==this.doc.sel.primIndex&&Os(this));else{var C=S.from(),E=S.to(),L=Math.max(m,C.line);m=Math.min(this.lastLine(),E.line-(E.ch?0:1))+1;for(var A=L;A0&&Zp(this.doc,g,new vt(C,j[g].to()),$t)}}}),getTokenAt:function(a,c){return Xl(this,a,c)},getLineTokens:function(a,c){return Xl(this,ae(a),c,!0)},getTokenTypeAt:function(a){a=Be(this.doc,a);var c=pu(this,Le(this.doc,a.line)),m=0,g=(c.length-1)/2,S=a.ch,C;if(S==0)C=c[2];else for(;;){var E=m+g>>1;if((E?c[E*2-1]:0)>=S)g=E;else if(c[E*2+1]C&&(a=C,g=!0),S=Le(this.doc,a)}else S=a;return Wf(this,S,{top:0,left:0},c||"page",m||g).top+(g?this.doc.height-Wr(S):0)},defaultTextHeight:function(){return _s(this.display)},defaultCharWidth:function(){return oa(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,c,m,g,S){var C=this.display;a=zi(this,Be(this.doc,a));var E=a.bottom,L=a.left;if(c.style.position="absolute",c.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(c),C.sizer.appendChild(c),g=="over")E=a.top;else if(g=="above"||g=="near"){var A=Math.max(C.wrapper.clientHeight,this.doc.height),j=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(g=="above"||a.bottom+c.offsetHeight>A)&&a.top>c.offsetHeight?E=a.top-c.offsetHeight:a.bottom+c.offsetHeight<=A&&(E=a.bottom),L+c.offsetWidth>j&&(L=j-c.offsetWidth)}c.style.top=E+"px",c.style.left=c.style.right="",S=="right"?(L=C.sizer.clientWidth-c.offsetWidth,c.style.right="0px"):(S=="left"?L=0:S=="middle"&&(L=(C.sizer.clientWidth-c.offsetWidth)/2),c.style.left=L+"px"),m&&Vy(this,{left:L,top:E,right:L+c.offsetWidth,bottom:E+c.offsetHeight})},triggerOnKeyDown:Qr(Pm),triggerOnKeyPress:Qr(Am),triggerOnKeyUp:fd,triggerOnMouseDown:Qr(Fm),execCommand:function(a){if(Sl.hasOwnProperty(a))return Sl[a].call(null,this)},triggerElectric:Qr(function(a){$m(this,a)}),findPosH:function(a,c,m,g){var S=1;c<0&&(S=-1,c=-c);for(var C=Be(this.doc,a),E=0;E0&&L(m.charAt(g-1));)--g;for(;S.5||this.options.lineWrapping)&&Es(this),be(this,"refresh",this)}),swapDoc:Qr(function(a){var c=this.doc;return c.cm=null,this.state.selectingText&&this.state.selectingText(),mm(this,a),Su(this),this.display.input.reset(),Eu(this,a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,lr(this,"swapDoc",this,c),c}),phrase:function(a){var c=this.options.phrases;return c&&Object.prototype.hasOwnProperty.call(c,a)?c[a]:a},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ir(r),r.registerHelper=function(a,c,m){u.hasOwnProperty(a)||(u[a]=r[a]={_global:[]}),u[a][c]=m},r.registerGlobalHelper=function(a,c,m,g){r.registerHelper(a,c,g),u[a]._global.push({pred:m,val:g})}}o(Xo,"addEditorMethods");function zu(r,n,u,a,c){var m=n,g=u,S=Le(r,n.line),C=c&&r.direction=="rtl"?-u:u;function E(){var Ce=n.line+C;return Ce=r.first+r.size?!1:(n=new ae(Ce,n.ch,n.sticky),S=Le(r,Ce))}o(E,"findNextLine");function L(Ce){var ge;if(a=="codepoint"){var Te=S.text.charCodeAt(n.ch+(u>0?0:-1));if(isNaN(Te))ge=null;else{var Re=u>0?Te>=55296&&Te<56320:Te>=56320&&Te<57343;ge=new ae(n.line,Math.max(0,Math.min(S.text.length,n.ch+u*(Re?2:1))),-u)}}else c?ge=Lm(r.cm,S,n,u):ge=ic(S,n,u);if(ge==null)if(!Ce&&E())n=Sa(c,r.cm,S,n.line,C);else return!1;else n=ge;return!0}if(o(L,"moveOnce"),a=="char"||a=="codepoint")L();else if(a=="column")L(!0);else if(a=="word"||a=="group")for(var A=null,j=a=="group",z=r.cm&&r.cm.getHelper(n,"wordChars"),ee=!0;!(u<0&&!L(!ee));ee=!1){var oe=S.text.charAt(n.ch)||` -`,ce=dr(oe,z)?"w":j&&oe==` -`?"n":!j||/\s/.test(oe)?null:"p";if(j&&!ee&&!ce&&(ce="s"),A&&A!=ce){u<0&&(u=1,L(),n.sticky="after");break}if(ce&&(A=ce),u>0&&!L(!ee))break}var ve=Ur(r,n,m,g,!0);return ql(m,ve)&&(ve.hitSide=!0),ve}o(zu,"findPosH");function cc(r,n,u,a){var c=r.doc,m=n.left,g;if(a=="page"){var S=Math.min(r.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),C=Math.max(S-.5*_s(r.display),3);g=(u>0?n.bottom:n.top)+u*C}else a=="line"&&(g=u>0?n.bottom+3:n.top-3);for(var E;E=q(r,m,g),!!E.outside;){if(u<0?g<=0:g>=c.height){E.hitSide=!0;break}g+=u*5}return E}o(cc,"findPosV");var gt=o(function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new St,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");gt.prototype.init=function(r){var n=this,u=this,a=u.cm,c=u.div=r.lineDiv;c.contentEditable=!0,jm(c,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize);function m(S){for(var C=S.target;C;C=C.parentNode){if(C==c)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}o(m,"belongsToInput"),H(c,"paste",function(S){!m(S)||Jt(a,S)||dd(S,a)||y<=11&&setTimeout(rr(a,function(){return n.updateFromDOM()}),20)}),H(c,"compositionstart",function(S){n.composing={data:S.data,done:!1}}),H(c,"compositionupdate",function(S){n.composing||(n.composing={data:S.data,done:!1})}),H(c,"compositionend",function(S){n.composing&&(S.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),H(c,"touchstart",function(){return u.forceCompositionEnd()}),H(c,"input",function(){n.composing||n.readFromDOMSoon()});function g(S){if(!(!m(S)||Jt(a,S))){if(a.somethingSelected())ki({lineWise:!1,text:a.getSelections()}),S.type=="cut"&&a.replaceSelection("",null,"cut");else if(a.options.lineWiseCopyCut){var C=hd(a);ki({lineWise:!0,text:C.text}),S.type=="cut"&&a.operation(function(){a.setSelections(C.ranges,0,$t),a.replaceSelection("",null,"cut")})}else return;if(S.clipboardData){S.clipboardData.clearData();var E=Ti.text.join(` -`);if(S.clipboardData.setData("Text",E),S.clipboardData.getData("Text")==E){S.preventDefault();return}}var L=qm(),A=L.firstChild;a.display.lineSpace.insertBefore(L,a.display.lineSpace.firstChild),A.value=Ti.text.join(` -`);var j=ze();at(A),setTimeout(function(){a.display.lineSpace.removeChild(L),j.focus(),j==c&&u.showPrimarySelection()},50)}}o(g,"onCopyCut"),H(c,"copy",g),H(c,"cut",g)},gt.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},gt.prototype.prepareSelection=function(){var r=_u(this.cm,!1);return r.focus=ze()==this.div,r},gt.prototype.showSelection=function(r,n){!r||!this.cm.display.view.length||((r.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(r))},gt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},gt.prototype.showPrimarySelection=function(){var r=this.getSelection(),n=this.cm,u=n.doc.sel.primary(),a=u.from(),c=u.to();if(n.display.viewTo==n.display.viewFrom||a.line>=n.display.viewTo||c.line=n.display.viewFrom&&$u(n,a)||{node:S[0].measure.map[2],offset:0},E=c.liner.firstLine()&&(a=ae(a.line-1,Le(r.doc,a.line-1).length)),c.ch==Le(r.doc,c.line).text.length&&c.linen.viewTo-1)return!1;var m,g,S;a.line==n.viewFrom||(m=co(r,a.line))==0?(g=dt(n.view[0].line),S=n.view[0].node):(g=dt(n.view[m].line),S=n.view[m-1].node.nextSibling);var C=co(r,c.line),E,L;if(C==n.view.length-1?(E=n.viewTo-1,L=n.lineDiv.lastChild):(E=dt(n.view[C+1].line)-1,L=n.view[C+1].node.previousSibling),!S)return!1;for(var A=r.doc.splitLines(pc(r,S,L,g,E)),j=wi(r.doc,ae(g,0),ae(E,Le(r.doc,E).text.length));A.length>1&&j.length>1;)if(we(A)==we(j))A.pop(),j.pop(),E--;else if(A[0]==j[0])A.shift(),j.shift(),g++;else break;for(var z=0,ee=0,oe=A[0],ce=j[0],ve=Math.min(oe.length,ce.length);za.ch&&Ce.charCodeAt(Ce.length-ee-1)==ge.charCodeAt(ge.length-ee-1);)z--,ee++;A[A.length-1]=Ce.slice(0,Ce.length-ee).replace(/^\u200b+/,""),A[0]=A[0].slice(z).replace(/\u200b+$/,"");var Re=ae(g,z),De=ae(E,j.length?we(j).length-ee:0);if(A.length>1||A[0]||Ue(Re,De))return ga(r.doc,A,Re,De,"+input"),!0},gt.prototype.ensurePolled=function(){this.forceCompositionEnd()},gt.prototype.reset=function(){this.forceCompositionEnd()},gt.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},gt.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))},gt.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&Xr(this.cm,function(){return Ye(r.cm)})},gt.prototype.setUneditable=function(r){r.contentEditable="false"},gt.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||rr(this.cm,fc)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},gt.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},gt.prototype.onContextMenu=function(){},gt.prototype.resetPosition=function(){},gt.prototype.needsContentAttribute=!0;function $u(r,n){var u=Hp(r,n.line);if(!u||u.hidden)return null;var a=Le(r.doc,n.line),c=ul(u,a,n.line),m=Tn(a,r.doc.direction),g="left";if(m){var S=gi(m,n.ch);g=S%2?"right":"left"}var C=Rf(c.map,n.ch,g);return C.offset=C.collapse=="right"?C.end:C.start,C}o($u,"posToDOM");function ka(r){for(var n=r;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}o(ka,"isInGutter");function He(r,n){return n&&(r.bad=!0),r}o(He,"badPos");function pc(r,n,u,a,c){var m="",g=!1,S=r.doc.lineSeparator(),C=!1;function E(z){return function(ee){return ee.id==z}}o(E,"recognizeMarker");function L(){g&&(m+=S,C&&(m+=S),g=C=!1)}o(L,"close");function A(z){z&&(L(),m+=z)}o(A,"addText");function j(z){if(z.nodeType==1){var ee=z.getAttribute("cm-text");if(ee){A(ee);return}var oe=z.getAttribute("cm-marker"),ce;if(oe){var ve=r.findMarks(ae(a,0),ae(c+1,0),E(+oe));ve.length&&(ce=ve[0].find(0))&&A(wi(r.doc,ce.from,ce.to).join(S));return}if(z.getAttribute("contenteditable")=="false")return;var Ce=/^(pre|div|p|li|table|br)$/i.test(z.nodeName);if(!/^br$/i.test(z.nodeName)&&z.textContent.length==0)return;Ce&&L();for(var ge=0;ge=9&&n.hasSelection&&(n.hasSelection=null),u.poll()}),H(c,"paste",function(g){Jt(a,g)||dd(g,a)||(a.state.pasteIncoming=+new Date,u.fastPoll())});function m(g){if(!Jt(a,g)){if(a.somethingSelected())ki({lineWise:!1,text:a.getSelections()});else if(a.options.lineWiseCopyCut){var S=hd(a);ki({lineWise:!0,text:S.text}),g.type=="cut"?a.setSelections(S.ranges,null,$t):(u.prevInput="",c.value=S.text.join(` -`),at(c))}else return;g.type=="cut"&&(a.state.cutIncoming=+new Date)}}o(m,"prepareCopyCut"),H(c,"cut",m),H(c,"copy",m),H(r.scroller,"paste",function(g){if(!(mr(r,g)||Jt(a,g))){if(!c.dispatchEvent){a.state.pasteIncoming=+new Date,u.focus();return}var S=new Event("paste");S.clipboardData=g.clipboardData,c.dispatchEvent(S)}}),H(r.lineSpace,"selectstart",function(g){mr(r,g)||er(g)}),H(c,"compositionstart",function(){var g=a.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:g,range:a.markText(g,a.getCursor("to"),{className:"CodeMirror-composing"})}}),H(c,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},ar.prototype.createField=function(r){this.wrapper=qm(),this.textarea=this.wrapper.firstChild},ar.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},ar.prototype.prepareSelection=function(){var r=this.cm,n=r.display,u=r.doc,a=_u(r);if(r.options.moveInputWithCursor){var c=zi(r,u.sel.primary().head,"div"),m=n.wrapper.getBoundingClientRect(),g=n.lineDiv.getBoundingClientRect();a.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,c.top+g.top-m.top)),a.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,c.left+g.left-m.left))}return a},ar.prototype.showSelection=function(r){var n=this.cm,u=n.display;Qe(u.cursorDiv,r.cursors),Qe(u.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},ar.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing)){var n=this.cm;if(n.somethingSelected()){this.prevInput="";var u=n.getSelection();this.textarea.value=u,n.state.focused&&at(this.textarea),p&&y>=9&&(this.hasSelection=u)}else r||(this.prevInput=this.textarea.value="",p&&y>=9&&(this.hasSelection=null))}},ar.prototype.getField=function(){return this.textarea},ar.prototype.supportsTouch=function(){return!1},ar.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!P||ze()!=this.textarea))try{this.textarea.focus()}catch(r){}},ar.prototype.blur=function(){this.textarea.blur()},ar.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ar.prototype.receivedFocus=function(){this.slowPoll()},ar.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},ar.prototype.fastPoll=function(){var r=!1,n=this;n.pollingFast=!0;function u(){var a=n.poll();!a&&!r?(r=!0,n.polling.set(60,u)):(n.pollingFast=!1,n.slowPoll())}o(u,"p"),n.polling.set(20,u)},ar.prototype.poll=function(){var r=this,n=this.cm,u=this.textarea,a=this.prevInput;if(this.contextMenuPending||!n.state.focused||Ep(u)&&!a&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var c=u.value;if(c==a&&!n.somethingSelected())return!1;if(p&&y>=9&&this.hasSelection===c||R&&/[\uf700-\uf7ff]/.test(c))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var m=c.charCodeAt(0);if(m==8203&&!a&&(a="\u200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var g=0,S=Math.min(a.length,c.length);g1e3||c.indexOf(` -`)>-1?u.value=r.prevInput="":r.prevInput=c,r.composing&&(r.composing.range.clear(),r.composing.range=n.markText(r.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ar.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ar.prototype.onKeyPress=function(){p&&y>=9&&(this.hasSelection=null),this.fastPoll()},ar.prototype.onContextMenu=function(r){var n=this,u=n.cm,a=u.display,c=n.textarea;n.contextMenuPending&&n.contextMenuPending();var m=fo(u,r),g=a.scroller.scrollTop;if(!m||Y)return;var S=u.options.resetSelectionOnContextMenu;S&&u.doc.sel.contains(m)==-1&&rr(u,Br)(u.doc,Ms(m),$t);var C=c.style.cssText,E=n.wrapper.style.cssText,L=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",c.style.cssText=`position: absolute; width: 30px; height: 30px; - top: `+(r.clientY-L.top-5)+"px; left: "+(r.clientX-L.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 A;_&&(A=window.scrollY),a.input.focus(),_&&window.scrollTo(null,A),a.input.reset(),u.somethingSelected()||(c.value=n.prevInput=" "),n.contextMenuPending=z,a.selForContextMenu=u.doc.sel,clearTimeout(a.detectingSelectAll);function j(){if(c.selectionStart!=null){var oe=u.somethingSelected(),ce="\u200B"+(oe?c.value:"");c.value="\u21DA",c.value=ce,n.prevInput=oe?"":"\u200B",c.selectionStart=1,c.selectionEnd=ce.length,a.selForContextMenu=u.doc.sel}}o(j,"prepareSelectAllHack");function z(){if(n.contextMenuPending==z&&(n.contextMenuPending=!1,n.wrapper.style.cssText=E,c.style.cssText=C,p&&y<9&&a.scrollbars.setScrollTop(a.scroller.scrollTop=g),c.selectionStart!=null)){(!p||p&&y<9)&&j();var oe=0,ce=o(function(){a.selForContextMenu==u.doc.sel&&c.selectionStart==0&&c.selectionEnd>0&&n.prevInput=="\u200B"?rr(u,wm)(u):oe++<10?a.detectingSelectAll=setTimeout(ce,500):(a.selForContextMenu=null,a.input.reset())},"poll");a.detectingSelectAll=setTimeout(ce,200)}}if(o(z,"rehide"),p&&y>=9&&j(),he){no(r);var ee=o(function(){de(window,"mouseup",ee),setTimeout(z,20)},"mouseup");H(window,"mouseup",ee)}else setTimeout(z,50)},ar.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},ar.prototype.setUneditable=function(){},ar.prototype.needsContentAttribute=!1;function md(r,n){if(n=n?Kt(n):{},n.value=r.value,!n.tabindex&&r.tabIndex&&(n.tabindex=r.tabIndex),!n.placeholder&&r.placeholder&&(n.placeholder=r.placeholder),n.autofocus==null){var u=ze();n.autofocus=u==r||r.getAttribute("autofocus")!=null&&u==document.body}function a(){r.value=S.getValue()}o(a,"save");var c;if(r.form&&(H(r.form,"submit",a),!n.leaveSubmitMethodAlone)){var m=r.form;c=m.submit;try{var g=m.submit=function(){a(),m.submit=c,m.submit(),m.submit=g}}catch(C){}}n.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&&(de(r.form,"submit",a),!n.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=c))}},r.style.display="none";var S=Lt(function(C){return r.parentNode.insertBefore(C,r.nextSibling)},n);return S}o(md,"fromTextArea");function Vm(r){r.off=de,r.on=H,r.wheelEventPixels=r0,r.Doc=pn,r.splitLines=tl,r.countColumn=Ot,r.findColumn=Tr,r.isWordChar=Gt,r.Pass=zt,r.signal=be,r.Line=Or,r.changeEnd=As,r.scrollbarModel=zf,r.Pos=ae,r.cmpPos=Ue,r.modes=$l,r.mimeModes=ps,r.resolveMode=rl,r.getMode=uu,r.modeExtensions=Ho,r.extendMode=kp,r.copyState=Wo,r.startState=kf,r.innerMode=jl,r.commands=Sl,r.keyMap=Go,r.keyName=od,r.isModifierKey=nc,r.lookupKey=Yo,r.normalizeKeyMap=u0,r.StringStream=Rt,r.SharedTextMarker=xa,r.TextMarker=Rs,r.LineWidget=Du,r.e_preventDefault=er,r.e_stopPropagation=oi,r.e_stop=no,r.addClass=lt,r.contains=ct,r.rmClass=xe,r.keyNames=Hs}o(Vm,"addLegacyProps"),uc(Lt),Xo(Lt);var hn="iter insert remove copy getEditor constructor".split(" ");for(var dc in pn.prototype)pn.prototype.hasOwnProperty(dc)&&it(hn,dc)<0&&(Lt.prototype[dc]=function(r){return function(){return r.apply(this.doc,arguments)}}(pn.prototype[dc]));return Ir(pn),Lt.inputStyles={textarea:ar,contenteditable:gt},Lt.defineMode=function(r){!Lt.defaults.mode&&r!="null"&&(Lt.defaults.mode=r),Tp.apply(this,arguments)},Lt.defineMIME=Tf,Lt.defineMode("null",function(){return{token:function(r){return r.skipToEnd()}}}),Lt.defineMIME("text/plain","null"),Lt.defineExtension=function(r,n){Lt.prototype[r]=n},Lt.defineDocExtension=function(r,n){pn.prototype[r]=n},Lt.fromTextArea=md,Vm(Lt),Lt.version="5.62.0",Lt})});var iO=fr((ez,nO)=>{"use strict";var xI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";nO.exports=xI});var aO=fr((tz,lO)=>{"use strict";var SI=iO();function oO(){}o(oO,"emptyFunction");function sO(){}o(sO,"emptyFunctionWithReset");sO.resetWarningCache=oO;lO.exports=function(){function e(l,d,v,p,y,_){if(_!==SI){var O=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 O.name="Invariant Violation",O}}o(e,"shim"),e.isRequired=e;function t(){return e}o(t,"getShim");var i={array: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:sO,resetWarningCache:oO};return i.PropTypes=i,i}});var zh=fr((iz,uO)=>{uO.exports=aO()();var rz,nz});var aS=fr((oz,fO)=>{fO.exports=o(function(t,i,l,d){var v=l?l.call(d,t,i):void 0;if(v!==void 0)return!!v;if(t===i)return!0;if(typeof t!="object"||!t||typeof i!="object"||!i)return!1;var p=Object.keys(t),y=Object.keys(i);if(p.length!==y.length)return!1;for(var _=Object.prototype.hasOwnProperty.bind(i),O=0;O=0)&&(i[d]=e[d]);return i}o(tu,"_objectWithoutPropertiesLoose");var nx=pe(Jb()),sr=pe(Fe()),iT=pe(nT());var xF=[],SF=[null,null];function CF(e,t){var i=e[1];return[t.payload,i+1]}o(CF,"storeStateUpdatesReducer");function oT(e,t,i){lf(function(){return e.apply(void 0,t)},i)}o(oT,"useIsomorphicLayoutEffectWithArgs");function _F(e,t,i,l,d,v,p){e.current=l,t.current=d,i.current=!1,v.current&&(v.current=null,p())}o(_F,"captureWrapperProps");function EF(e,t,i,l,d,v,p,y,_,O){if(!!e){var D=!1,Y=null,B=o(function(){if(!D){var Q=t.getState(),F,P;try{F=l(Q,d.current)}catch(R){P=R,Y=R}P||(Y=null),F===v.current?p.current||_():(v.current=F,y.current=F,p.current=!0,O({type:"STORE_UPDATED",payload:{error:P}}))}},"checkForUpdates");i.onStateChange=B,i.trySubscribe(),B();var X=o(function(){if(D=!0,i.tryUnsubscribe(),i.onStateChange=null,Y)throw Y},"unsubscribeWrapper");return X}}o(EF,"subscribeUpdates");var bF=o(function(){return[null,0]},"initStateUpdates");function Rg(e,t){t===void 0&&(t={});var i=t,l=i.getDisplayName,d=l===void 0?function(ie){return"ConnectAdvanced("+ie+")"}:l,v=i.methodName,p=v===void 0?"connectAdvanced":v,y=i.renderCountProp,_=y===void 0?void 0:y,O=i.shouldHandleStateChanges,D=O===void 0?!0:O,Y=i.storeKey,B=Y===void 0?"store":Y,X=i.withRef,te=X===void 0?!1:X,Q=i.forwardRef,F=Q===void 0?!1:Q,P=i.context,R=P===void 0?Zn:P,K=tu(i,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);if(!1)var V;var ue=R;return o(function(he){var me=he.displayName||he.name||"Component",xe=d(me),Ve=Oo({},K,{getDisplayName:d,methodName:p,renderCountProp:_,shouldHandleStateChanges:D,storeKey:B,displayName:xe,wrappedComponentName:me,WrappedComponent:he}),Qe=K.pure;function Ee(lt){return e(lt.dispatch,Ve)}o(Ee,"createChildSelector");var xt=Qe?sr.useMemo:function(lt){return lt()};function qe(lt){var Zt=(0,sr.useMemo)(function(){var yr=lt.reactReduxForwardedRef,Ii=tu(lt,["reactReduxForwardedRef"]);return[lt.context,yr,Ii]},[lt]),at=Zt[0],Rr=Zt[1],Kt=Zt[2],Ot=(0,sr.useMemo)(function(){return at&&at.Consumer&&(0,iT.isContextConsumer)(sr.default.createElement(at.Consumer,null))?at:ue},[at,ue]),St=(0,sr.useContext)(Ot),it=Boolean(lt.store)&&Boolean(lt.store.getState)&&Boolean(lt.store.dispatch),br=Boolean(St)&&Boolean(St.store),zt=it?lt.store:St.store,$t=(0,sr.useMemo)(function(){return Ee(zt)},[zt]),ne=(0,sr.useMemo)(function(){if(!D)return SF;var yr=new Qc(zt,it?null:St.subscription),Ii=yr.notifyNestedSubs.bind(yr);return[yr,Ii]},[zt,it,St]),Ze=ne[0],Tr=ne[1],jt=(0,sr.useMemo)(function(){return it?St:Oo({},St,{subscription:Ze})},[it,St,Ze]),qt=(0,sr.useReducer)(CF,xF,bF),we=qt[0],kr=we[0],ln=qt[1];if(kr&&kr.error)throw kr.error;var In=(0,sr.useRef)(),ii=(0,sr.useRef)(Kt),an=(0,sr.useRef)(),Gt=(0,sr.useRef)(!1),dr=xt(function(){return an.current&&Kt===ii.current?an.current:$t(zt.getState(),Kt)},[zt,kr,Kt]);oT(_F,[ii,In,Gt,Kt,dr,an,Tr]),oT(EF,[D,zt,Ze,$t,ii,In,Gt,an,Tr,ln],[zt,Ze,$t]);var ut=(0,sr.useMemo)(function(){return sr.default.createElement(he,Oo({},dr,{ref:Rr}))},[Rr,he,dr]),Io=(0,sr.useMemo)(function(){return D?sr.default.createElement(Ot.Provider,{value:jt},ut):ut},[Ot,ut,jt]);return Io}o(qe,"ConnectFunction");var ct=Qe?sr.default.memo(qe):qe;if(ct.WrappedComponent=he,ct.displayName=qe.displayName=xe,F){var ze=sr.default.forwardRef(o(function(Zt,at){return sr.default.createElement(ct,Oo({},Zt,{reactReduxForwardedRef:at}))},"forwardConnectRef"));return ze.displayName=xe,ze.WrappedComponent=he,(0,nx.default)(ze,he)}return(0,nx.default)(ct,he)},"wrapWithConnect")}o(Rg,"connectAdvanced");function sT(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}o(sT,"is");function Zc(e,t){if(sT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(var d=0;d=0;l--){var d=t[l](e);if(d)return d}return function(v,p){throw new Error("Invalid value of type "+typeof e+" for "+i+" argument when connecting component "+p.wrappedComponentName+".")}}o(sx,"match");function HF(e,t){return e===t}o(HF,"strictEqual");function WF(e){var t=e===void 0?{}:e,i=t.connectHOC,l=i===void 0?Rg:i,d=t.mapStateToPropsFactories,v=d===void 0?uT:d,p=t.mapDispatchToPropsFactories,y=p===void 0?aT:p,_=t.mergePropsFactories,O=_===void 0?fT:_,D=t.selectorFactory,Y=D===void 0?ox:D;return o(function(X,te,Q,F){F===void 0&&(F={});var P=F,R=P.pure,K=R===void 0?!0:R,V=P.areStatesEqual,ue=V===void 0?HF:V,ie=P.areOwnPropsEqual,he=ie===void 0?Zc:ie,me=P.areStatePropsEqual,xe=me===void 0?Zc:me,Ve=P.areMergedPropsEqual,Qe=Ve===void 0?Zc:Ve,Ee=tu(P,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),xt=sx(X,v,"mapStateToProps"),qe=sx(te,y,"mapDispatchToProps"),ct=sx(Q,O,"mergeProps");return l(Y,Oo({methodName:"connect",getDisplayName:o(function(lt){return"Connect("+lt+")"},"getDisplayName"),shouldHandleStateChanges:Boolean(X),initMapStateToProps:xt,initMapDispatchToProps:qe,initMergeProps:ct,pure:K,areStatesEqual:ue,areOwnPropsEqual:he,areStatePropsEqual:xe,areMergedPropsEqual:Qe},Ee))},"connect")}o(WF,"createConnect");var Fi=WF();var pT=pe(Fe());var cT=pe(Fe());function Hg(){var e=(0,cT.useContext)(Zn);return e}o(Hg,"useReduxContext");function Wg(e){e===void 0&&(e=Zn);var t=e===Zn?Hg:function(){return(0,pT.useContext)(e)};return o(function(){var l=t(),d=l.store;return d},"useStore")}o(Wg,"createStoreHook");var lx=Wg();function dT(e){e===void 0&&(e=Zn);var t=e===Zn?lx:Wg(e);return o(function(){var l=t();return l.dispatch},"useDispatch")}o(dT,"createDispatchHook");var Ys=dT();var Zi=pe(Fe());var BF=o(function(t,i){return t===i},"refEquality");function UF(e,t,i,l){var d=(0,Zi.useReducer)(function(te){return te+1},0),v=d[1],p=(0,Zi.useMemo)(function(){return new Qc(i,l)},[i,l]),y=(0,Zi.useRef)(),_=(0,Zi.useRef)(),O=(0,Zi.useRef)(),D=(0,Zi.useRef)(),Y=i.getState(),B;try{if(e!==_.current||Y!==O.current||y.current){var X=e(Y);D.current===void 0||!t(X,D.current)?B=X:B=D.current}else B=D.current}catch(te){throw y.current&&(te.message+=` -The error may be correlated with this previous error: -`+y.current.stack+` + // node_modules/react/cjs/react.development.js + var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var _assign = require_object_assign(); + var ReactVersion = "17.0.2"; + var REACT_ELEMENT_TYPE = 60103; + var REACT_PORTAL_TYPE = 60106; + exports.Fragment = 60107; + exports.StrictMode = 60108; + exports.Profiler = 60114; + var REACT_PROVIDER_TYPE = 60109; + var REACT_CONTEXT_TYPE = 60110; + var REACT_FORWARD_REF_TYPE = 60112; + exports.Suspense = 60113; + var REACT_SUSPENSE_LIST_TYPE = 60120; + var REACT_MEMO_TYPE = 60115; + var REACT_LAZY_TYPE = 60116; + var REACT_BLOCK_TYPE = 60121; + var REACT_SERVER_BLOCK_TYPE = 60122; + var REACT_FUNDAMENTAL_TYPE = 60117; + var REACT_SCOPE_TYPE = 60119; + var REACT_OPAQUE_ID_TYPE = 60128; + var REACT_DEBUG_TRACING_MODE_TYPE = 60129; + var REACT_OFFSCREEN_TYPE = 60130; + var REACT_LEGACY_HIDDEN_TYPE = 60131; + if (typeof Symbol === "function" && Symbol.for) { + var symbolFor = Symbol.for; + REACT_ELEMENT_TYPE = symbolFor("react.element"); + REACT_PORTAL_TYPE = symbolFor("react.portal"); + exports.Fragment = symbolFor("react.fragment"); + exports.StrictMode = symbolFor("react.strict_mode"); + exports.Profiler = symbolFor("react.profiler"); + REACT_PROVIDER_TYPE = symbolFor("react.provider"); + REACT_CONTEXT_TYPE = symbolFor("react.context"); + REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); + exports.Suspense = symbolFor("react.suspense"); + REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); + REACT_MEMO_TYPE = symbolFor("react.memo"); + REACT_LAZY_TYPE = symbolFor("react.lazy"); + REACT_BLOCK_TYPE = symbolFor("react.block"); + REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); + REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); + REACT_SCOPE_TYPE = symbolFor("react.scope"); + REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); + REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); + REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); + REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); + } + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + __name(getIteratorFn, "getIteratorFn"); + var ReactCurrentDispatcher = { + current: null + }; + var ReactCurrentBatchConfig = { + transition: 0 + }; + var ReactCurrentOwner = { + current: null + }; + var ReactDebugCurrentFrame = {}; + var currentExtraStackFrame = null; + function setExtraStackFrame(stack) { + { + currentExtraStackFrame = stack; + } + } + __name(setExtraStackFrame, "setExtraStackFrame"); + { + ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { + { + currentExtraStackFrame = stack; + } + }; + ReactDebugCurrentFrame.getCurrentStack = null; + ReactDebugCurrentFrame.getStackAddendum = function() { + var stack = ""; + if (currentExtraStackFrame) { + stack += currentExtraStackFrame; + } + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ""; + } + return stack; + }; + } + var IsSomeRendererActing = { + current: false + }; + var ReactSharedInternals = { + ReactCurrentDispatcher, + ReactCurrentBatchConfig, + ReactCurrentOwner, + IsSomeRendererActing, + assign: _assign + }; + { + ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; + } + function warn(format2) { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format2, args); + } + } + __name(warn, "warn"); + function error(format2) { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format2, args); + } + } + __name(error, "error"); + function printWarning(level, format2, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format2 += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return "" + item; + }); + argsWithFormat.unshift("Warning: " + format2); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + __name(printWarning, "printWarning"); + var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; + var warningKey = componentName + "." + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + __name(warnNoop, "warnNoop"); + var ReactNoopUpdateQueue = { + isMounted: function(publicInstance) { + return false; + }, + enqueueForceUpdate: function(publicInstance, callback, callerName) { + warnNoop(publicInstance, "forceUpdate"); + }, + enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, "replaceState"); + }, + enqueueSetState: function(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, "setState"); + } + }; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + function Component14(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + __name(Component14, "Component"); + Component14.prototype.isReactComponent = {}; + Component14.prototype.setState = function(partialState, callback) { + if (!(typeof partialState === "object" || typeof partialState === "function" || partialState == 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, partialState, callback, "setState"); + }; + Component14.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + { + var deprecatedAPIs = { + isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], + replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] + }; + var defineDeprecationWarning = /* @__PURE__ */ __name(function(methodName, info) { + Object.defineProperty(Component14.prototype, methodName, { + get: function() { + warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); + return void 0; + } + }); + }, "defineDeprecationWarning"); + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + function ComponentDummy() { + } + __name(ComponentDummy, "ComponentDummy"); + ComponentDummy.prototype = Component14.prototype; + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + __name(PureComponent, "PureComponent"); + var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent; + _assign(pureComponentPrototype, Component14.prototype); + pureComponentPrototype.isPureReactComponent = true; + function createRef2() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + __name(createRef2, "createRef"); + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + __name(getWrappedName, "getWrappedName"); + function getContextName(type) { + return type.displayName || "Context"; + } + __name(getContextName, "getContextName"); + function getComponentName(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case exports.Fragment: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case exports.Profiler: + return "Profiler"; + case exports.StrictMode: + return "StrictMode"; + case exports.Suspense: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_BLOCK_TYPE: + return getComponentName(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentName(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + __name(getComponentName, "getComponentName"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty.call(config, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== void 0; + } + __name(hasValidRef, "hasValidRef"); + function hasValidKey(config) { + { + if (hasOwnProperty.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== void 0; + } + __name(hasValidKey, "hasValidKey"); + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = /* @__PURE__ */ __name(function() { + { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }, "warnAboutAccessingKey"); + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + __name(defineKeyPropWarningGetter, "defineKeyPropWarningGetter"); + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = /* @__PURE__ */ __name(function() { + { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }, "warnAboutAccessingRef"); + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + __name(defineRefPropWarningGetter, "defineRefPropWarningGetter"); + function warnIfStringRefCannotBeAutoConverted(config) { + { + if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { + var componentName = getComponentName(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + __name(warnIfStringRefCannotBeAutoConverted, "warnIfStringRefCannotBeAutoConverted"); + var ReactElement = /* @__PURE__ */ __name(function(type, key, ref, self2, source, owner, props) { + var element = { + $$typeof: REACT_ELEMENT_TYPE, + type, + key, + ref, + props, + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }, "ReactElement"); + function createElement26(type, config, children) { + var propName; + var props = {}; + var key = null; + var ref = null; + var self2 = null; + var source = null; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + { + warnIfStringRefCannotBeAutoConverted(config); + } + } + if (hasValidKey(config)) { + key = "" + config.key; + } + self2 = config.__self === void 0 ? null : config.__self; + source = config.__source === void 0 ? null : config.__source; + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + { + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); + } + __name(createElement26, "createElement"); + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + __name(cloneAndReplaceKey, "cloneAndReplaceKey"); + function cloneElement(element, config, children) { + if (!!(element === null || element === void 0)) { + { + throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); + } + } + var propName; + var props = _assign({}, element.props); + var key = element.key; + var ref = element.ref; + var self2 = element._self; + var source = element._source; + var owner = element._owner; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = "" + config.key; + } + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === void 0 && defaultProps !== void 0) { + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + return ReactElement(element.type, key, ref, self2, source, owner, props); + } + __name(cloneElement, "cloneElement"); + function isValidElement(object) { + return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + __name(isValidElement, "isValidElement"); + var SEPARATOR = "."; + var SUBSEPARATOR = ":"; + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + var escapedString = key.replace(escapeRegex, function(match2) { + return escaperLookup[match2]; + }); + return "$" + escapedString; + } + __name(escape, "escape"); + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return text.replace(userProvidedKeyEscapeRegex, "$&/"); + } + __name(escapeUserProvidedKey, "escapeUserProvidedKey"); + function getElementKey(element, index) { + if (typeof element === "object" && element !== null && element.key != null) { + return escape("" + element.key); + } + return index.toString(36); + } + __name(getElementKey, "getElementKey"); + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if (type === "undefined" || type === "boolean") { + children = null; + } + var invokeCallback = false; + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + if (invokeCallback) { + var _child = children; + var mappedChild = callback(_child); + var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; + if (Array.isArray(mappedChild)) { + var escapedChildKey = ""; + if (childKey != null) { + escapedChildKey = escapeUserProvidedKey(childKey) + "/"; + } + mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey); + } + array.push(mappedChild); + } + return 1; + } + var child; + var nextName; + var subtreeCount = 0; + var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getElementKey(child, i); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else { + var iteratorFn = getIteratorFn(children); + if (typeof iteratorFn === "function") { + var iterableChildren = children; + { + if (iteratorFn === iterableChildren.entries) { + if (!didWarnAboutMaps) { + warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); + } + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(iterableChildren); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getElementKey(child, ii++); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else if (type === "object") { + var childrenString = "" + children; + { + { + throw Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); + } + } + } + } + return subtreeCount; + } + __name(mapIntoArray, "mapIntoArray"); + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + var count = 0; + mapIntoArray(children, result, "", "", function(child) { + return func.call(context, child, count++); + }); + return result; + } + __name(mapChildren, "mapChildren"); + function countChildren(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + } + __name(countChildren, "countChildren"); + function forEachChildren(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + } + __name(forEachChildren, "forEachChildren"); + function toArray(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + } + __name(toArray, "toArray"); + function onlyChild(children) { + if (!isValidElement(children)) { + { + throw Error("React.Children.only expected to receive a single React element child."); + } + } + return children; + } + __name(onlyChild, "onlyChild"); + function createContext(defaultValue, calculateChangedBits) { + if (calculateChangedBits === void 0) { + calculateChangedBits = null; + } else { + { + if (calculateChangedBits !== null && typeof calculateChangedBits !== "function") { + error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits); + } + } + } + var context = { + $$typeof: REACT_CONTEXT_TYPE, + _calculateChangedBits: calculateChangedBits, + _currentValue: defaultValue, + _currentValue2: defaultValue, + _threadCount: 0, + Provider: null, + Consumer: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + var hasWarnedAboutDisplayNameOnConsumer = false; + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context, + _calculateChangedBits: context._calculateChangedBits + }; + Object.defineProperties(Consumer, { + Provider: { + get: function() { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Provider; + }, + set: function(_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function() { + return context._currentValue; + }, + set: function(_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function() { + return context._currentValue2; + }, + set: function(_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function() { + return context._threadCount; + }, + set: function(_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function() { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Consumer; + } + }, + displayName: { + get: function() { + return context.displayName; + }, + set: function(displayName) { + if (!hasWarnedAboutDisplayNameOnConsumer) { + warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); + hasWarnedAboutDisplayNameOnConsumer = true; + } + } + } + }); + context.Consumer = Consumer; + } + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + __name(createContext, "createContext"); + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function lazyInitializer(payload) { + if (payload._status === Uninitialized) { + var ctor = payload._result; + var thenable = ctor(); + var pending = payload; + pending._status = Pending; + pending._result = thenable; + thenable.then(function(moduleObject) { + if (payload._status === Pending) { + var defaultExport = moduleObject.default; + { + if (defaultExport === void 0) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); + } + } + var resolved = payload; + resolved._status = Resolved; + resolved._result = defaultExport; + } + }, function(error2) { + if (payload._status === Pending) { + var rejected = payload; + rejected._status = Rejected; + rejected._result = error2; + } + }); + } + if (payload._status === Resolved) { + return payload._result; + } else { + throw payload._result; + } + } + __name(lazyInitializer, "lazyInitializer"); + function lazy(ctor) { + var payload = { + _status: -1, + _result: ctor + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: payload, + _init: lazyInitializer + }; + { + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function() { + return defaultProps; + }, + set: function(newDefaultProps) { + error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + defaultProps = newDefaultProps; + Object.defineProperty(lazyType, "defaultProps", { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function() { + return propTypes; + }, + set: function(newPropTypes) { + error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + propTypes = newPropTypes; + Object.defineProperty(lazyType, "propTypes", { + enumerable: true + }); + } + } + }); + } + return lazyType; + } + __name(lazy, "lazy"); + function forwardRef(render2) { + { + if (render2 != null && render2.$$typeof === REACT_MEMO_TYPE) { + error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); + } else if (typeof render2 !== "function") { + error("forwardRef requires a render function but was given %s.", render2 === null ? "null" : typeof render2); + } else { + if (render2.length !== 0 && render2.length !== 2) { + error("forwardRef render functions accept exactly two parameters: props and ref. %s", render2.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + } + } + if (render2 != null) { + if (render2.defaultProps != null || render2.propTypes != null) { + error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); + } + } + } + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render: render2 + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (render2.displayName == null) { + render2.displayName = name; + } + } + }); + } + return elementType; + } + __name(forwardRef, "forwardRef"); + var enableScopeAPI = false; + function isValidElementType2(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) { + return true; + } + } + return false; + } + __name(isValidElementType2, "isValidElementType"); + function memo5(type, compare) { + { + if (!isValidElementType2(type)) { + error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); + } + } + var elementType = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: compare === void 0 ? null : compare + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (type.displayName == null) { + type.displayName = name; + } + } + }); + } + return elementType; + } + __name(memo5, "memo"); + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + if (!(dispatcher !== null)) { + { + throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); + } + } + return dispatcher; + } + __name(resolveDispatcher, "resolveDispatcher"); + function useContext5(Context, unstable_observedBits) { + var dispatcher = resolveDispatcher(); + { + if (unstable_observedBits !== void 0) { + error("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s", unstable_observedBits, typeof unstable_observedBits === "number" && Array.isArray(arguments[2]) ? "\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks" : ""); + } + if (Context._context !== void 0) { + var realContext = Context._context; + if (realContext.Consumer === Context) { + error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); + } else if (realContext.Provider === Context) { + error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); + } + } + } + return dispatcher.useContext(Context, unstable_observedBits); + } + __name(useContext5, "useContext"); + function useState10(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + __name(useState10, "useState"); + function useReducer3(reducer9, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer9, initialArg, init); + } + __name(useReducer3, "useReducer"); + function useRef7(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + __name(useRef7, "useRef"); + function useEffect6(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create, deps); + } + __name(useEffect6, "useEffect"); + function useLayoutEffect3(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create, deps); + } + __name(useLayoutEffect3, "useLayoutEffect"); + function useCallback4(callback, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, deps); + } + __name(useCallback4, "useCallback"); + function useMemo7(create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create, deps); + } + __name(useMemo7, "useMemo"); + function useImperativeHandle(ref, create, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create, deps); + } + __name(useImperativeHandle, "useImperativeHandle"); + function useDebugValue2(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + __name(useDebugValue2, "useDebugValue"); + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + __name(disabledLog, "disabledLog"); + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + __name(disableLogs, "disableLogs"); + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: _assign({}, props, { + value: prevLog + }), + info: _assign({}, props, { + value: prevInfo + }), + warn: _assign({}, props, { + value: prevWarn + }), + error: _assign({}, props, { + value: prevError + }), + group: _assign({}, props, { + value: prevGroup + }), + groupCollapsed: _assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: _assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + __name(reenableLogs, "reenableLogs"); + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix = match2 && match2[1] || ""; + } + } + return "\n" + prefix + name; + } + } + __name(describeBuiltInComponentFrame, "describeBuiltInComponentFrame"); + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn2, construct) { + if (!fn2 || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn2); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = /* @__PURE__ */ __name(function() { + throw Error(); + }, "Fake"); + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn2, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn2.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn2(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher$1.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn2 ? fn2.displayName || fn2.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, syntheticFrame); + } + } + return syntheticFrame; + } + __name(describeNativeComponentFrame, "describeNativeComponentFrame"); + function describeFunctionComponentFrame(fn2, source, ownerFn) { + { + return describeNativeComponentFrame(fn2, false); + } + } + __name(describeFunctionComponentFrame, "describeFunctionComponentFrame"); + function shouldConstruct(Component15) { + var prototype = Component15.prototype; + return !!(prototype && prototype.isReactComponent); + } + __name(shouldConstruct, "shouldConstruct"); + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case exports.Suspense: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_BLOCK_TYPE: + return describeFunctionComponentFrame(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + __name(describeUnknownElementTypeFrameInDEV, "describeUnknownElementTypeFrameInDEV"); + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + __name(setCurrentlyValidatingElement, "setCurrentlyValidatingElement"); + function checkPropTypes(typeSpecs, values, location2, componentName, element) { + { + var has = Function.call.bind(Object.prototype.hasOwnProperty); + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location2 + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location2, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location2, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location2, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + __name(checkPropTypes, "checkPropTypes"); + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + setExtraStackFrame(stack); + } else { + setExtraStackFrame(null); + } + } + } + __name(setCurrentlyValidatingElement$1, "setCurrentlyValidatingElement$1"); + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentName(ReactCurrentOwner.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + __name(getDeclarationErrorAddendum, "getDeclarationErrorAddendum"); + function getSourceInfoErrorAddendum(source) { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + __name(getSourceInfoErrorAddendum, "getSourceInfoErrorAddendum"); + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== void 0) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + return ""; + } + __name(getSourceInfoErrorAddendumForProps, "getSourceInfoErrorAddendumForProps"); + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + __name(getCurrentComponentErrorInfo, "getCurrentComponentErrorInfo"); + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; + } + { + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + __name(validateExplicitKey, "validateExplicitKey"); + function validateChildKeys(node, parentType) { + if (typeof node !== "object") { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + __name(validateChildKeys, "validateChildKeys"); + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentName(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentName(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + __name(validatePropTypes, "validatePropTypes"); + function validateFragmentProps(fragment) { + { + var keys = Object.keys(fragment.props); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + __name(validateFragmentProps, "validateFragmentProps"); + function createElementWithValidation(type, props, children) { + var validType = isValidElementType2(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (Array.isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentName(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + { + error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + } + var element = createElement26.apply(this, arguments); + if (element == null) { + return element; + } + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + if (type === exports.Fragment) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + __name(createElementWithValidation, "createElementWithValidation"); + var didWarnAboutDeprecatedCreateFactory = false; + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; + { + if (!didWarnAboutDeprecatedCreateFactory) { + didWarnAboutDeprecatedCreateFactory = true; + warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); + } + Object.defineProperty(validatedFactory, "type", { + enumerable: false, + get: function() { + warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); + Object.defineProperty(this, "type", { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + __name(createFactoryWithValidation, "createFactoryWithValidation"); + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + __name(cloneElementWithValidation, "cloneElementWithValidation"); + { + try { + var frozenObject = Object.freeze({}); + new Map([[frozenObject, null]]); + new Set([frozenObject]); + } catch (e) { + } + } + var createElement$1 = createElementWithValidation; + var cloneElement$1 = cloneElementWithValidation; + var createFactory = createFactoryWithValidation; + var Children = { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray, + only: onlyChild + }; + exports.Children = Children; + exports.Component = Component14; + exports.PureComponent = PureComponent; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; + exports.cloneElement = cloneElement$1; + exports.createContext = createContext; + exports.createElement = createElement$1; + exports.createFactory = createFactory; + exports.createRef = createRef2; + exports.forwardRef = forwardRef; + exports.isValidElement = isValidElement; + exports.lazy = lazy; + exports.memo = memo5; + exports.useCallback = useCallback4; + exports.useContext = useContext5; + exports.useDebugValue = useDebugValue2; + exports.useEffect = useEffect6; + exports.useImperativeHandle = useImperativeHandle; + exports.useLayoutEffect = useLayoutEffect3; + exports.useMemo = useMemo7; + exports.useReducer = useReducer3; + exports.useRef = useRef7; + exports.useState = useState10; + exports.version = ReactVersion; + })(); + } + } + }); -`),te}return lf(function(){_.current=e,O.current=Y,D.current=B,y.current=void 0}),lf(function(){function te(){try{var Q=i.getState(),F=_.current(Q);if(t(F,D.current))return;D.current=F,O.current=Q}catch(P){y.current=P}v()}return o(te,"checkForUpdates"),p.onStateChange=te,p.trySubscribe(),te(),function(){return p.tryUnsubscribe()}},[i,p]),B}o(UF,"useSelectorWithStoreAndSubscription");function hT(e){e===void 0&&(e=Zn);var t=e===Zn?Hg:function(){return(0,Zi.useContext)(e)};return o(function(l,d){d===void 0&&(d=BF);var v=t(),p=v.store,y=v.subscription,_=UF(l,d,p,y);return(0,Zi.useDebugValue)(_),_},"useSelector")}o(hT,"createSelectorHook");var ax=hT();var ux=pe(eu());Bb(ux.unstable_batchedUpdates);var Rn=pe(Fe());var mT=pe(ep()),zF=pe(Fe());window._=mT.default;window.React=zF;var yt={UP:38,DOWN:40,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,LEFT:37,RIGHT:39,ENTER:13,ESC:27,TAB:9,SPACE:32,BACKSPACE:8,SHIFT:16};for(var Bg=65;Bg<=90;Bg++)yt[String.fromCharCode(Bg)]=Bg;var Ug=o(function(e){if(e===0)return"0";for(var t=["b","kb","mb","gb","tb"],i=0;ie);i++);var l;return e%Math.pow(1024,i)==0?l=0:l=1,(e/Math.pow(1024,i)).toFixed(l)+t[i]},"formatSize"),zg=o(function(e){for(var t=e,i=["ms","s","min","h"],l=[1e3,60,60],d=0;Math.abs(t)>=l[d]&&dDt(e,Ne({method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},i));function vT(e,...t){return Ma(this,null,function*(){return yield(yield Dt(`/commands/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:t})})).json()})}o(vT,"runCommand");var gT="UI_FLOWVIEW_SET_TAB",yT="SET_CONTENT_VIEW_FOR",qF={tab:"request",contentViewFor:{}},VF=o((e=qF,t)=>{switch(t.type){case yT:return Ht(Ne({},e),{contentViewFor:Ht(Ne({},e.contentViewFor),{[t.messageId]:t.contentView})});case gT:return Ht(Ne({},e),{tab:t.tab?t.tab:"request"});default:return e}},"reducer"),wT=VF;function af(e){return{type:gT,tab:e}}o(af,"selectTab");function $g(e,t){return{type:yT,messageId:e,contentView:t}}o($g,"setContentViewFor");var Sh={};dC(Sh,{ADD:()=>mx,RECEIVE:()=>yx,REMOVE:()=>gx,SET_FILTER:()=>dx,SET_SORT:()=>hx,UPDATE:()=>vx,add:()=>KF,defaultState:()=>jg,receive:()=>XF,reduce:()=>tp,remove:()=>YF,setFilter:()=>wx,setSort:()=>ST,update:()=>GF});var px=pe(xT()),dx="LIST_SET_FILTER",hx="LIST_SET_SORT",mx="LIST_ADD",vx="LIST_UPDATE",gx="LIST_REMOVE",yx="LIST_RECEIVE",jg={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};function tp(e=jg,t){let{byId:i,list:l,listIndex:d,view:v,viewIndex:p}=e;switch(t.type){case dx:v=(0,px.default)(l.filter(t.filter),t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break;case hx:v=(0,px.default)([...v],t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break;case mx:if(t.item.id in i)break;i=Ht(Ne({},i),{[t.item.id]:t.item}),d=Ht(Ne({},d),{[t.item.id]:l.length}),l=[...l,t.item],t.filter(t.item)&&({view:v,viewIndex:p}=CT(e,t.item,t.sort));break;case vx:i=Ht(Ne({},i),{[t.item.id]:t.item}),l=[...l],l[d[t.item.id]]=t.item;let y=t.item.id in p,_=t.filter(t.item);_&&!y?{view:v,viewIndex:p}=CT(e,t.item,t.sort):!_&&y?{data:v,dataIndex:p}=xx(v,p,t.item.id):_&&y&&({view:v,viewIndex:p}=QF(e,t.item,t.sort));break;case gx:if(!(t.id in i))break;i=Ne({},i),delete i[t.id],{data:l,dataIndex:d}=xx(l,d,t.id),t.id in p&&({data:v,dataIndex:p}=xx(v,p,t.id));break;case yx:l=t.list,d={},i={},l.forEach((O,D)=>{i[O.id]=O,d[O.id]=D}),v=l.filter(t.filter).sort(t.sort),p={},v.forEach((O,D)=>{p[O.id]=D});break}return{byId:i,list:l,listIndex:d,view:v,viewIndex:p}}o(tp,"reduce");function wx(e=qg,t=xh){return{type:dx,filter:e,sort:t}}o(wx,"setFilter");function ST(e=xh){return{type:hx,sort:e}}o(ST,"setSort");function KF(e,t=qg,i=xh){return{type:mx,item:e,filter:t,sort:i}}o(KF,"add");function GF(e,t=qg,i=xh){return{type:vx,item:e,filter:t,sort:i}}o(GF,"update");function YF(e){return{type:gx,id:e}}o(YF,"remove");function XF(e,t=qg,i=xh){return{type:yx,list:e,filter:t,sort:i}}o(XF,"receive");function CT(e,t,i){let l=ZF(e.view,t,i),d=[...e.view],v=Ne({},e.viewIndex);d.splice(l,0,t);for(let p=d.length-1;p>=l;p--)v[d[p].id]=p;return{view:d,viewIndex:v}}o(CT,"sortedInsert");function xx(e,t,i){let l=t[i],d=[...e],v=Ne({},t);delete v[i],d.splice(l,1);for(let p=d.length-1;p>=l;p--)v[d[p].id]=p;return{data:d,dataIndex:v}}o(xx,"removeData");function QF(e,t,i){let l=[...e.view],d=Ne({},e.viewIndex),v=d[t.id];for(l[v]=t;v+10;)l[v]=l[v+1],l[v+1]=t,d[t.id]=v+1,d[l[v].id]=v,++v;for(;v>0&&i(l[v],l[v-1])<0;)l[v]=l[v-1],l[v-1]=t,d[t.id]=v-1,d[l[v].id]=v,--v;return{view:l,viewIndex:d}}o(QF,"sortedUpdate");function ZF(e,t,i){let l=0,d=e.length;for(;l>>1;i(t,e[v])>=0?l=v+1:d=v}return l}o(ZF,"sortedIndex");function qg(){return!0}o(qg,"defaultFilter");function xh(e,t){return 0}o(xh,"defaultSort");var _T={http:80,https:443},jr=class{static getContentType(t){var i=jr.get_first_header(t,/^Content-Type$/i);if(i)return i.split(";")[0].trim()}static get_first_header(t,i){let l=t;l._headerLookups||Object.defineProperty(l,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1});let d=i.toString();if(!(d in l._headerLookups)){let v;for(let p=0;p{if(e.type!=="http")return 0;let t=e.request.contentLength||0;return e.response&&(t+=e.response.contentLength||0),t},"getTotalSize");var uf=function(){"use strict";function e(l,d){function v(){this.constructor=l}o(v,"ctor"),v.prototype=d.prototype,l.prototype=new v}o(e,"peg$subclass");function t(l,d,v,p){this.message=l,this.expected=d,this.found=v,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,"peg$SyntaxError"),e(t,Error);function i(l){var d=arguments.length>1?arguments[1]:{},v=this,p={},y={start:Zl},_=Zl,O={type:"other",description:"filter expression"},D=o(function(x){return x},"peg$c1"),Y={type:"other",description:"whitespace"},B=/^[ \t\n\r]/,X={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},te={type:"other",description:"control character"},Q=/^[|&!()~"]/,F={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},P={type:"other",description:"optional whitespace"},R="|",K={type:"literal",value:"|",description:'"|"'},V=o(function(x,k){return ll(x,k)},"peg$c11"),ue="&",ie={type:"literal",value:"&",description:'"&"'},he=o(function(x,k){return Or(x,k)},"peg$c14"),me="!",xe={type:"literal",value:"!",description:'"!"'},Ve=o(function(x){return Mf(x)},"peg$c17"),Qe="(",Ee={type:"literal",value:"(",description:'"("'},xt=")",qe={type:"literal",value:")",description:'")"'},ct=o(function(x){return Af(x)},"peg$c22"),ze="true",lt={type:"literal",value:"true",description:'"true"'},Zt=o(function(){return yu},"peg$c25"),at="false",Rr={type:"literal",value:"false",description:'"false"'},Kt=o(function(){return wu},"peg$c28"),Ot="~a",St={type:"literal",value:"~a",description:'"~a"'},it=o(function(){return ta},"peg$c31"),br="~b",zt={type:"literal",value:"~b",description:'"~b"'},$t=o(function(x){return Ap(x)},"peg$c34"),ne="~bq",Ze={type:"literal",value:"~bq",description:'"~bq"'},Tr=o(function(x){return zn(x)},"peg$c37"),jt="~bs",qt={type:"literal",value:"~bs",description:'"~bs"'},we=o(function(x){return Dp(x)},"peg$c40"),kr="~c",ln={type:"literal",value:"~c",description:'"~c"'},In=o(function(x){return On(x)},"peg$c43"),ii="~d",an={type:"literal",value:"~d",description:'"~d"'},Gt=o(function(x){return xu(x)},"peg$c46"),dr="~dst",ut={type:"literal",value:"~dst",description:'"~dst"'},Io=o(function(x){return io(x)},"peg$c49"),yr="~e",Ii={type:"literal",value:"~e",description:'"~e"'},un=o(function(){return ws},"peg$c52"),Hn="~h",vi={type:"literal",value:"~h",description:'"~h"'},gi=o(function(x){return xs(x)},"peg$c55"),Wn="~hq",Tn={type:"literal",value:"~hq",description:'"~hq"'},Zs=o(function(x){return Ct(x)},"peg$c58"),H="~hs",J={type:"literal",value:"~hs",description:'"~hs"'},de=o(function(x){return oo(x)},"peg$c61"),be="~http",Jt={type:"literal",value:"~http",description:'"~http"'},zl=o(function(){return ra},"peg$c64"),Ft="~m",Ir={type:"literal",value:"~m",description:'"~m"'},er=o(function(x){return Fp(x)},"peg$c67"),oi="~marked",fs={type:"literal",value:"~marked",description:'"~marked"'},no=o(function(){return so},"peg$c70"),yi="~q",Js={type:"literal",value:"~q",description:'"~q"'},cs=o(function(){return lr},"peg$c73"),fn="~src",_p={type:"literal",value:"~src",description:'"~src"'},el=o(function(x){return Ff(x)},"peg$c76"),Ef="~s",tl={type:"literal",value:"~s",description:'"~s"'},Ep=o(function(){return Df},"peg$c79"),bf="~t",au={type:"literal",value:"~t",description:'"~t"'},bp=o(function(x){return Ss(x)},"peg$c82"),$l="~tcp",ps={type:"literal",value:"~tcp",description:'"~tcp"'},Tp=o(function(){return al},"peg$c85"),Tf="~tq",rl={type:"literal",value:"~tq",description:'"~tq"'},uu=o(function(x){return jo(x)},"peg$c88"),Ho="~ts",kp={type:"literal",value:"~ts",description:'"~ts"'},Wo=o(function(x){return Rp(x)},"peg$c91"),jl="~u",kf={type:"literal",value:"~u",description:'"~u"'},Rt=o(function(x){return na(x)},"peg$c94"),Le="~websocket",wi={type:"literal",value:"~websocket",description:'"~websocket"'},fu=o(function(){return ia},"peg$c97"),xi={type:"other",description:"integer"},dt=/^['"]/,Hi={type:"class",value:`['"]`,description:`['"]`},Bo=/^[0-9]/,nl={type:"class",value:"[0-9]",description:"[0-9]"},ae=o(function(x){return parseInt(x.join(""),10)},"peg$c103"),Ue={type:"other",description:"string"},ql='"',Vl={type:"literal",value:'"',description:'"\\""'},Uo=o(function(x){return x.join("")},"peg$c107"),ds="'",Kl={type:"literal",value:"'",description:`"'"`},Be=/^["\\]/,Op={type:"class",value:'["\\\\]',description:'["\\\\]'},il={type:"any",description:"any character"},si=o(function(x){return x},"peg$c113"),Bn="\\",cu={type:"literal",value:"\\",description:'"\\\\"'},pu=/^['\\]/,hs={type:"class",value:"['\\\\]",description:"['\\\\]"},ol=/^['"\\]/,Of={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Gl="n",Yl={type:"literal",value:"n",description:'"n"'},Xl=o(function(){return` -`},"peg$c122"),zo="r",du={type:"literal",value:"r",description:'"r"'},Nf=o(function(){return"\r"},"peg$c125"),Np="t",hu={type:"literal",value:"t",description:'"t"'},Si=o(function(){return" "},"peg$c128"),M=0,We=0,$o=[{line:1,column:1,seenCR:!1}],cn=0,mu=[],Se=0,Ql;if("startRule"in d){if(!(d.startRule in y))throw new Error(`Can't start parsing from rule "`+d.startRule+'".');_=y[d.startRule]}function Qh(){return l.substring(We,M)}o(Qh,"text");function Lf(){return ms(We,M)}o(Lf,"location");function Lp(x){throw vs(null,[{type:"other",description:x}],l.substring(We,M),ms(We,M))}o(Lp,"expected");function Pf(x){throw vs(x,null,l.substring(We,M),ms(We,M))}o(Pf,"error");function vu(x){var k=$o[x],U,$;if(k)return k;for(U=x-1;!$o[U];)U--;for(k=$o[U],k={line:k.line,column:k.column,seenCR:k.seenCR};Ucn&&(cn=M,mu=[]),mu.push(x))}o(Pe,"peg$fail");function vs(x,k,U,$){function $n(mr){var jn=1;for(mr.sort(function(wr,Ci){return wr.descriptionCi.description?1:0});jn1?Ci.slice(0,-1).join(", ")+" or "+Ci[mr.length-1]:Ci[0],Wi=jn?'"'+wr(jn)+'"':"end of input","Expected "+Gr+" but "+Wi+" found."}return o(hr,"buildMessage"),k!==null&&$n(k),new t(x!==null?x:hr(k,U),k,U,$)}o(vs,"peg$buildException");function Zl(){var x,k,U,$;return Se++,x=M,k=Un(),k!==p?(U=gu(),U!==p?($=Un(),$!==p?(We=x,k=D(U),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),Se--,x===p&&(k=p,Se===0&&Pe(O)),x}o(Zl,"peg$parsestart");function Ae(){var x,k;return Se++,B.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(X)),Se--,x===p&&(k=p,Se===0&&Pe(Y)),x}o(Ae,"peg$parsews");function Tt(){var x,k;return Se++,Q.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(F)),Se--,x===p&&(k=p,Se===0&&Pe(te)),x}o(Tt,"peg$parsecc");function Un(){var x,k;for(Se++,x=[],k=Ae();k!==p;)x.push(k),k=Ae();return Se--,x===p&&(k=p,Se===0&&Pe(P)),x}o(Un,"peg$parse__");function gu(){var x,k,U,$,$n,hr;return x=M,k=sl(),k!==p?(U=Un(),U!==p?(l.charCodeAt(M)===124?($=R,M++):($=p,Se===0&&Pe(K)),$!==p?($n=Un(),$n!==p?(hr=gu(),hr!==p?(We=x,k=V(k,hr),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=sl()),x}o(gu,"peg$parseOrExpr");function sl(){var x,k,U,$,$n,hr;if(x=M,k=kn(),k!==p?(U=Un(),U!==p?(l.charCodeAt(M)===38?($=ue,M++):($=p,Se===0&&Pe(ie)),$!==p?($n=Un(),$n!==p?(hr=sl(),hr!==p?(We=x,k=he(k,hr),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p){if(x=M,k=kn(),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=sl(),$!==p?(We=x,k=he(k,$),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;x===p&&(x=kn())}return x}o(sl,"peg$parseAndExpr");function kn(){var x,k,U,$;return x=M,l.charCodeAt(M)===33?(k=me,M++):(k=p,Se===0&&Pe(xe)),k!==p?(U=Un(),U!==p?($=kn(),$!==p?(We=x,k=Ve($),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=Pp()),x}o(kn,"peg$parseNotExpr");function Pp(){var x,k,U,$,$n,hr;return x=M,l.charCodeAt(M)===40?(k=Qe,M++):(k=p,Se===0&&Pe(Ee)),k!==p?(U=Un(),U!==p?($=gu(),$!==p?($n=Un(),$n!==p?(l.charCodeAt(M)===41?(hr=xt,M++):(hr=p,Se===0&&Pe(qe)),hr!==p?(We=x,k=ct($),x=k):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p)):(M=x,x=p),x===p&&(x=Mp()),x}o(Pp,"peg$parseBindingExpr");function Mp(){var x,k,U,$;if(x=M,l.substr(M,4)===ze?(k=ze,M+=4):(k=p,Se===0&&Pe(lt)),k!==p&&(We=x,k=Zt()),x=k,x===p&&(x=M,l.substr(M,5)===at?(k=at,M+=5):(k=p,Se===0&&Pe(Rr)),k!==p&&(We=x,k=Kt()),x=k,x===p&&(x=M,l.substr(M,2)===Ot?(k=Ot,M+=2):(k=p,Se===0&&Pe(St)),k!==p&&(We=x,k=it()),x=k,x===p))){if(x=M,l.substr(M,2)===br?(k=br,M+=2):(k=p,Se===0&&Pe(zt)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=$t($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===ne?(k=ne,M+=3):(k=p,Se===0&&Pe(Ze)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Tr($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===jt?(k=jt,M+=3):(k=p,Se===0&&Pe(qt)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=we($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===kr?(k=kr,M+=2):(k=p,Se===0&&Pe(ln)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Jl(),$!==p?(We=x,k=In($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===ii?(k=ii,M+=2):(k=p,Se===0&&Pe(an)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Gt($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,4)===dr?(k=dr,M+=4):(k=p,Se===0&&Pe(ut)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Io($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,2)===yr?(k=yr,M+=2):(k=p,Se===0&&Pe(Ii)),k!==p&&(We=x,k=un()),x=k,x===p)){if(x=M,l.substr(M,2)===Hn?(k=Hn,M+=2):(k=p,Se===0&&Pe(vi)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=gi($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===Wn?(k=Wn,M+=3):(k=p,Se===0&&Pe(Tn)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Zs($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===H?(k=H,M+=3):(k=p,Se===0&&Pe(J)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=de($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,5)===be?(k=be,M+=5):(k=p,Se===0&&Pe(Jt)),k!==p&&(We=x,k=zl()),x=k,x===p)){if(x=M,l.substr(M,2)===Ft?(k=Ft,M+=2):(k=p,Se===0&&Pe(Ir)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=er($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,7)===oi?(k=oi,M+=7):(k=p,Se===0&&Pe(fs)),k!==p&&(We=x,k=no()),x=k,x===p&&(x=M,l.substr(M,2)===yi?(k=yi,M+=2):(k=p,Se===0&&Pe(Js)),k!==p&&(We=x,k=cs()),x=k,x===p))){if(x=M,l.substr(M,4)===fn?(k=fn,M+=4):(k=p,Se===0&&Pe(_p)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=el($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,2)===Ef?(k=Ef,M+=2):(k=p,Se===0&&Pe(tl)),k!==p&&(We=x,k=Ep()),x=k,x===p)){if(x=M,l.substr(M,2)===bf?(k=bf,M+=2):(k=p,Se===0&&Pe(au)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=bp($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p&&(x=M,l.substr(M,4)===$l?(k=$l,M+=4):(k=p,Se===0&&Pe(ps)),k!==p&&(We=x,k=Tp()),x=k,x===p)){if(x=M,l.substr(M,3)===Tf?(k=Tf,M+=3):(k=p,Se===0&&Pe(rl)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=uu($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,3)===Ho?(k=Ho,M+=3):(k=p,Se===0&&Pe(kp)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Wo($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.substr(M,2)===jl?(k=jl,M+=2):(k=p,Se===0&&Pe(kf)),k!==p){if(U=[],$=Ae(),$!==p)for(;$!==p;)U.push($),$=Ae();else U=p;U!==p?($=Hr(),$!==p?(We=x,k=Rt($),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;x===p&&(x=M,l.substr(M,10)===Le?(k=Le,M+=10):(k=p,Se===0&&Pe(wi)),k!==p&&(We=x,k=fu()),x=k,x===p&&(x=M,k=Hr(),k!==p&&(We=x,k=Rt(k)),x=k))}}}}}}}}}}}}}}}return x}o(Mp,"peg$parseExpr");function Jl(){var x,k,U,$;if(Se++,x=M,dt.test(l.charAt(M))?(k=l.charAt(M),M++):(k=p,Se===0&&Pe(Hi)),k===p&&(k=null),k!==p){if(U=[],Bo.test(l.charAt(M))?($=l.charAt(M),M++):($=p,Se===0&&Pe(nl)),$!==p)for(;$!==p;)U.push($),Bo.test(l.charAt(M))?($=l.charAt(M),M++):($=p,Se===0&&Pe(nl));else U=p;U!==p?(dt.test(l.charAt(M))?($=l.charAt(M),M++):($=p,Se===0&&Pe(Hi)),$===p&&($=null),$!==p?(We=x,k=ae(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;return Se--,x===p&&(k=p,Se===0&&Pe(xi)),x}o(Jl,"peg$parseIntegerLiteral");function Hr(){var x,k,U,$;if(Se++,x=M,l.charCodeAt(M)===34?(k=ql,M++):(k=p,Se===0&&Pe(Vl)),k!==p){for(U=[],$=Nt();$!==p;)U.push($),$=Nt();U!==p?(l.charCodeAt(M)===34?($=ql,M++):($=p,Se===0&&Pe(Vl)),$!==p?(We=x,k=Uo(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p){if(x=M,l.charCodeAt(M)===39?(k=ds,M++):(k=p,Se===0&&Pe(Kl)),k!==p){for(U=[],$=gs();$!==p;)U.push($),$=gs();U!==p?(l.charCodeAt(M)===39?($=ds,M++):($=p,Se===0&&Pe(Kl)),$!==p?(We=x,k=Uo(U),x=k):(M=x,x=p)):(M=x,x=p)}else M=x,x=p;if(x===p)if(x=M,k=M,Se++,U=Tt(),Se--,U===p?k=void 0:(M=k,k=p),k!==p){if(U=[],$=Wr(),$!==p)for(;$!==p;)U.push($),$=Wr();else U=p;U!==p?(We=x,k=Uo(U),x=k):(M=x,x=p)}else M=x,x=p}return Se--,x===p&&(k=p,Se===0&&Pe(Ue)),x}o(Hr,"peg$parseStringLiteral");function Nt(){var x,k,U;return x=M,k=M,Se++,Be.test(l.charAt(M))?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(Op)),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(il)),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p),x===p&&(x=M,l.charCodeAt(M)===92?(k=Bn,M++):(k=p,Se===0&&Pe(cu)),k!==p?(U=ys(),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p)),x}o(Nt,"peg$parseDoubleStringChar");function gs(){var x,k,U;return x=M,k=M,Se++,pu.test(l.charAt(M))?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(hs)),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(il)),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p),x===p&&(x=M,l.charCodeAt(M)===92?(k=Bn,M++):(k=p,Se===0&&Pe(cu)),k!==p?(U=ys(),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p)),x}o(gs,"peg$parseSingleStringChar");function Wr(){var x,k,U;return x=M,k=M,Se++,U=Ae(),Se--,U===p?k=void 0:(M=k,k=p),k!==p?(l.length>M?(U=l.charAt(M),M++):(U=p,Se===0&&Pe(il)),U!==p?(We=x,k=si(U),x=k):(M=x,x=p)):(M=x,x=p),x}o(Wr,"peg$parseUnquotedStringChar");function ys(){var x,k;return ol.test(l.charAt(M))?(x=l.charAt(M),M++):(x=p,Se===0&&Pe(Of)),x===p&&(x=M,l.charCodeAt(M)===110?(k=Gl,M++):(k=p,Se===0&&Pe(Yl)),k!==p&&(We=x,k=Xl()),x=k,x===p&&(x=M,l.charCodeAt(M)===114?(k=zo,M++):(k=p,Se===0&&Pe(du)),k!==p&&(We=x,k=Nf()),x=k,x===p&&(x=M,l.charCodeAt(M)===116?(k=Np,M++):(k=p,Se===0&&Pe(hu)),k!==p&&(We=x,k=Si()),x=k))),x}o(ys,"peg$parseEscapeSequence");function ll(x,k){function U(){return x.apply(this,arguments)||k.apply(this,arguments)}return o(U,"orFilter"),U.desc=x.desc+" or "+k.desc,U}o(ll,"or");function Or(x,k){function U(){return x.apply(this,arguments)&&k.apply(this,arguments)}return o(U,"andFilter"),U.desc=x.desc+" and "+k.desc,U}o(Or,"and");function Mf(x){function k(){return!x.apply(this,arguments)}return o(k,"notFilter"),k.desc="not "+x.desc,k}o(Mf,"not");function Af(x){function k(){return x.apply(this,arguments)}return o(k,"bindingFilter"),k.desc="("+x.desc+")",k}o(Af,"binding");function yu(x){return!0}o(yu,"trueFilter"),yu.desc="true";function wu(x){return!1}o(wu,"falseFilter"),wu.desc="false";var ea=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("application/x-shockwave-flash")];function ta(x){if(x.response){for(var k=is.getContentType(x.response),U=ea.length;U--;)if(ea[U].test(k))return!0}return!1}o(ta,"assetFilter"),ta.desc="is asset";function On(x){function k(U){return U.response&&U.response.status_code===x}return o(k,"responseCodeFilter"),k.desc="resp. code is "+x,k}o(On,"responseCode");function Ap(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"bodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Ap,"body");function zn(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"requestBodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(zn,"requestBody");function Dp(x){x=new RegExp(x,"i");function k(U){return!0}return o(k,"responseBodyFilter"),k.desc="body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10",k}o(Dp,"responseBody");function xu(x){x=new RegExp(x,"i");function k(U){return U.request&&(x.test(U.request.host)||x.test(U.request.pretty_host))}return o(k,"domainFilter"),k.desc="domain matches "+x,k}o(xu,"domain");function io(x){x=new RegExp(x,"i");function k(U){return!!U.server_conn.address&&x.test(U.server_conn.address[0]+":"+U.server_conn.address[1])}return o(k,"destinationFilter"),k.desc="destination address matches "+x,k}o(io,"destination");function ws(x){return!!x.error}o(ws,"errorFilter"),ws.desc="has error";function xs(x){x=new RegExp(x,"i");function k(U){return U.request&&Ji.match_header(U.request,x)||U.response&&is.match_header(U.response,x)}return o(k,"headerFilter"),k.desc="header matches "+x,k}o(xs,"header");function Ct(x){x=new RegExp(x,"i");function k(U){return U.request&&Ji.match_header(U.request,x)}return o(k,"requestHeaderFilter"),k.desc="req. header matches "+x,k}o(Ct,"requestHeader");function oo(x){x=new RegExp(x,"i");function k(U){return U.response&&is.match_header(U.response,x)}return o(k,"responseHeaderFilter"),k.desc="resp. header matches "+x,k}o(oo,"responseHeader");function ra(x){return x.type==="http"}o(ra,"httpFilter"),ra.desc="is an HTTP Flow";function Fp(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(U.request.method)}return o(k,"methodFilter"),k.desc="method matches "+x,k}o(Fp,"method");function so(x){return x.marked}o(so,"markedFilter"),so.desc="is marked";function lr(x){return x.request&&!x.response}o(lr,"noResponseFilter"),lr.desc="has no response";function Df(x){return!!x.response}o(Df,"responseFilter"),Df.desc="has response";function Ff(x){x=new RegExp(x,"i");function k(U){return!!U.client_conn.peername&&x.test(U.client_conn.peername[0]+":"+U.client_conn.peername[1])}return o(k,"sourceFilter"),k.desc="source address matches "+x,k}o(Ff,"source");function Ss(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(Ji.getContentType(U.request))||U.response&&x.test(is.getContentType(U.response))}return o(k,"contentTypeFilter"),k.desc="content type matches "+x,k}o(Ss,"contentType");function al(x){return x.type==="tcp"}o(al,"tcpFilter"),al.desc="is a TCP Flow";function jo(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(Ji.getContentType(U.request))}return o(k,"requestContentTypeFilter"),k.desc="req. content type matches "+x,k}o(jo,"requestContentType");function Rp(x){x=new RegExp(x,"i");function k(U){return U.response&&x.test(is.getContentType(U.response))}return o(k,"responseContentTypeFilter"),k.desc="resp. content type matches "+x,k}o(Rp,"responseContentType");function na(x){x=new RegExp(x,"i");function k(U){return U.request&&x.test(Ji.pretty_url(U.request))}return o(k,"urlFilter"),k.desc="url matches "+x,k}o(na,"url");function ia(x){return x.type==="websocket"}if(o(ia,"websocketFilter"),ia.desc="is a Websocket Flow",Ql=_(),Ql!==p&&M===l.length)return Ql;throw Ql!==p&&MVx,icon:()=>ay,method:()=>fy,path:()=>uy,quickactions:()=>op,size:()=>py,status:()=>cy,time:()=>dy,timestamp:()=>hy,tls:()=>ly});var et=pe(Fe());var sy=pe(Jn());var Kg="UI_HIDE_MODAL",ET="UI_SET_ACTIVE_MODAL",tR={activeModal:void 0};function bx(e=tR,t){switch(t.type){case ET:return Ht(Ne({},e),{activeModal:t.activeModal});case Kg:return Ht(Ne({},e),{activeModal:void 0});default:return e}}o(bx,"reducer");function bT(e){return{type:ET,activeModal:e}}o(bT,"setActiveModal");function Gg(){return{type:Kg}}o(Gg,"hideModal");var TT="UI_OPTION_UPDATE_START",kT="UI_OPTION_UPDATE_SUCCESS",OT="UI_OPTION_UPDATE_ERROR",rR={};function Tx(e=rR,t){switch(t.type){case TT:return Ht(Ne({},e),{[t.option]:{isUpdating:!0,value:t.value,error:!1}});case kT:return Ht(Ne({},e),{[t.option]:void 0});case OT:let i=e[t.option].value;return typeof i=="boolean"&&(i=!i),Ht(Ne({},e),{[t.option]:{value:i,isUpdating:!1,error:t.error}});case Kg:return{};default:return e}}o(Tx,"reducer");function NT(e,t){return{type:TT,option:e,value:t}}o(NT,"startUpdate");function LT(e){return{type:kT,option:e}}o(LT,"updateSuccess");function PT(e,t){return{type:OT,option:e,error:t}}o(PT,"updateError");var AT=pe(ep());var MT={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:[],command_history:!0,confdir:"~/.mitmproxy",connection_strategy:"eager",console_focus_follow:!1,content_view_lines_cutoff:512,export_preserve_original_ip:!1,http2:!0,ignore_hosts:[],intercept:void 0,intercept_active:!1,keep_host_header:!1,key_size:2048,listen_host:"",listen_port:8080,map_local:[],map_remote:[],mode:"regular",modify_body:[],modify_headers:[],onboarding:!0,onboarding_host:"mitm.it",onboarding_port:80,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_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_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,tcp_hosts:[],termlog_verbosity:"info",tls_version_client_max:"UNBOUNDED",tls_version_client_min:"TLS1_2",tls_version_server_max:"UNBOUNDED",tls_version_server_min:"TLS1_2",upstream_auth:void 0,upstream_cert:!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 kx="OPTIONS_RECEIVE",Ox="OPTIONS_UPDATE";var nR=o((e=MT,t)=>{switch(t.type){case kx:let i={};for(let[d,{value:v}]of Object.entries(t.data))i[d]=v;return i;case Ox:let l=Ne({},e);for(let[d,{value:v}]of Object.entries(t.data))l[d]=v;return l;default:return e}},"reducer"),DT=nR;function iR(e,t,i){return Ma(this,null,function*(){try{let l=yield Dt.put("/options",{[e]:t});if(l.status===200)i(LT(e));else throw yield l.text()}catch(l){i(PT(e,l))}})}o(iR,"pureSendUpdate");var oR=AT.default.throttle(iR,500,{leading:!0,trailing:!0});function ff(e,t){return i=>{i(NT(e,t)),oR(e,t,i)}}o(ff,"update");function FT(){return e=>Dt("/options/save",{method:"POST"})}o(FT,"save");function RT(e){return(t,i)=>{let l=i().options.intercept;l&&l.includes(e)||(l?l=`${l} | ${e}`:l=e,t(ff("intercept",l)))}}o(RT,"addInterceptFilter");var Er=pe(Fe());var Yg=pe(Fe());var Nx=o(function(t){return t.reduce(function(i,l){var d=l[0],v=l[1];return i[d]=v,i},{})},"fromEntries"),Lx=typeof window!="undefined"&&window.document&&window.document.createElement?Yg.useLayoutEffect:Yg.useEffect;var ou=pe(Fe());var qr="top",_n="bottom",nn="right",on="left",Xg="auto",ru=[qr,_n,nn,on],Rl="start",Qg="end",IT="clippingParents",Zg="viewport",rp="popper",HT="reference",Px=ru.reduce(function(e,t){return e.concat([t+"-"+Rl,t+"-"+Qg])},[]),Jg=[].concat(ru,[Xg]).reduce(function(e,t){return e.concat([t,t+"-"+Rl,t+"-"+Qg])},[]),sR="beforeRead",lR="read",aR="afterRead",uR="beforeMain",fR="main",cR="afterMain",pR="beforeWrite",dR="write",hR="afterWrite",WT=[sR,lR,aR,uR,fR,cR,pR,dR,hR];function En(e){return e?(e.nodeName||"").toLowerCase():null}o(En,"getNodeName");function Fr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}o(Fr,"getWindow");function Il(e){var t=Fr(e).Element;return e instanceof t||e instanceof Element}o(Il,"isElement");function Dn(e){var t=Fr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}o(Dn,"isHTMLElement");function ey(e){if(typeof ShadowRoot=="undefined")return!1;var t=Fr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}o(ey,"isShadowRoot");function mR(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var l=t.styles[i]||{},d=t.attributes[i]||{},v=t.elements[i];!Dn(v)||!En(v)||(Object.assign(v.style,l),Object.keys(d).forEach(function(p){var y=d[p];y===!1?v.removeAttribute(p):v.setAttribute(p,y===!0?"":y)}))})}o(mR,"applyStyles");function vR(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(l){var d=t.elements[l],v=t.attributes[l]||{},p=Object.keys(t.styles.hasOwnProperty(l)?t.styles[l]:i[l]),y=p.reduce(function(_,O){return _[O]="",_},{});!Dn(d)||!En(d)||(Object.assign(d.style,y),Object.keys(v).forEach(function(_){d.removeAttribute(_)}))})}}o(vR,"effect");var BT={name:"applyStyles",enabled:!0,phase:"write",fn:mR,effect:vR,requires:["computeStyles"]};function bn(e){return e.split("-")[0]}o(bn,"getBasePlacement");function Lo(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}o(Lo,"getBoundingClientRect");function cf(e){var t=Lo(e),i=e.offsetWidth,l=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-l)<=1&&(l=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:l}}o(cf,"getLayoutRect");function _h(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&ey(i)){var l=t;do{if(l&&e.isSameNode(l))return!0;l=l.parentNode||l.host}while(l)}return!1}o(_h,"contains");function hi(e){return Fr(e).getComputedStyle(e)}o(hi,"getComputedStyle");function Mx(e){return["table","td","th"].indexOf(En(e))>=0}o(Mx,"isTableElement");function Fn(e){return((Il(e)?e.ownerDocument:e.document)||window.document).documentElement}o(Fn,"getDocumentElement");function Hl(e){return En(e)==="html"?e:e.assignedSlot||e.parentNode||(ey(e)?e.host:null)||Fn(e)}o(Hl,"getParentNode");function UT(e){return!Dn(e)||hi(e).position==="fixed"?null:e.offsetParent}o(UT,"getTrueOffsetParent");function gR(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,i=navigator.userAgent.indexOf("Trident")!==-1;if(i&&Dn(e)){var l=hi(e);if(l.position==="fixed")return null}for(var d=Hl(e);Dn(d)&&["html","body"].indexOf(En(d))<0;){var v=hi(d);if(v.transform!=="none"||v.perspective!=="none"||v.contain==="paint"||["transform","perspective"].indexOf(v.willChange)!==-1||t&&v.willChange==="filter"||t&&v.filter&&v.filter!=="none")return d;d=d.parentNode}return null}o(gR,"getContainingBlock");function os(e){for(var t=Fr(e),i=UT(e);i&&Mx(i)&&hi(i).position==="static";)i=UT(i);return i&&(En(i)==="html"||En(i)==="body"&&hi(i).position==="static")?t:i||gR(e)||t}o(os,"getOffsetParent");function pf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}o(pf,"getMainAxisFromPlacement");var Po=Math.max,nu=Math.min,Eh=Math.round;function df(e,t,i){return Po(e,nu(t,i))}o(df,"within");function bh(){return{top:0,right:0,bottom:0,left:0}}o(bh,"getFreshSideObject");function Th(e){return Object.assign({},bh(),e)}o(Th,"mergePaddingObject");function kh(e,t){return t.reduce(function(i,l){return i[l]=e,i},{})}o(kh,"expandToHashMap");var yR=o(function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,Th(typeof t!="number"?t:kh(t,ru))},"toPaddingObject");function wR(e){var t,i=e.state,l=e.name,d=e.options,v=i.elements.arrow,p=i.modifiersData.popperOffsets,y=bn(i.placement),_=pf(y),O=[on,nn].indexOf(y)>=0,D=O?"height":"width";if(!(!v||!p)){var Y=yR(d.padding,i),B=cf(v),X=_==="y"?qr:on,te=_==="y"?_n:nn,Q=i.rects.reference[D]+i.rects.reference[_]-p[_]-i.rects.popper[D],F=p[_]-i.rects.reference[_],P=os(v),R=P?_==="y"?P.clientHeight||0:P.clientWidth||0:0,K=Q/2-F/2,V=Y[X],ue=R-B[D]-Y[te],ie=R/2-B[D]/2+K,he=df(V,ie,ue),me=_;i.modifiersData[l]=(t={},t[me]=he,t.centerOffset=he-ie,t)}}o(wR,"arrow");function xR(e){var t=e.state,i=e.options,l=i.element,d=l===void 0?"[data-popper-arrow]":l;d!=null&&(typeof d=="string"&&(d=t.elements.popper.querySelector(d),!d)||!_h(t.elements.popper,d)||(t.elements.arrow=d))}o(xR,"effect");var zT={name:"arrow",enabled:!0,phase:"main",fn:wR,effect:xR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var SR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CR(e){var t=e.x,i=e.y,l=window,d=l.devicePixelRatio||1;return{x:Eh(Eh(t*d)/d)||0,y:Eh(Eh(i*d)/d)||0}}o(CR,"roundOffsetsByDPR");function $T(e){var t,i=e.popper,l=e.popperRect,d=e.placement,v=e.offsets,p=e.position,y=e.gpuAcceleration,_=e.adaptive,O=e.roundOffsets,D=O===!0?CR(v):typeof O=="function"?O(v):v,Y=D.x,B=Y===void 0?0:Y,X=D.y,te=X===void 0?0:X,Q=v.hasOwnProperty("x"),F=v.hasOwnProperty("y"),P=on,R=qr,K=window;if(_){var V=os(i),ue="clientHeight",ie="clientWidth";V===Fr(i)&&(V=Fn(i),hi(V).position!=="static"&&(ue="scrollHeight",ie="scrollWidth")),V=V,d===qr&&(R=_n,te-=V[ue]-l.height,te*=y?1:-1),d===on&&(P=nn,B-=V[ie]-l.width,B*=y?1:-1)}var he=Object.assign({position:p},_&&SR);if(y){var me;return Object.assign({},he,(me={},me[R]=F?"0":"",me[P]=Q?"0":"",me.transform=(K.devicePixelRatio||1)<2?"translate("+B+"px, "+te+"px)":"translate3d("+B+"px, "+te+"px, 0)",me))}return Object.assign({},he,(t={},t[R]=F?te+"px":"",t[P]=Q?B+"px":"",t.transform="",t))}o($T,"mapToStyles");function _R(e){var t=e.state,i=e.options,l=i.gpuAcceleration,d=l===void 0?!0:l,v=i.adaptive,p=v===void 0?!0:v,y=i.roundOffsets,_=y===void 0?!0:y;if(!1)var O;var D={placement:bn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:d};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$T(Object.assign({},D,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:p,roundOffsets:_})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$T(Object.assign({},D,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:_})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}o(_R,"computeStyles");var jT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_R,data:{}};var ty={passive:!0};function ER(e){var t=e.state,i=e.instance,l=e.options,d=l.scroll,v=d===void 0?!0:d,p=l.resize,y=p===void 0?!0:p,_=Fr(t.elements.popper),O=[].concat(t.scrollParents.reference,t.scrollParents.popper);return v&&O.forEach(function(D){D.addEventListener("scroll",i.update,ty)}),y&&_.addEventListener("resize",i.update,ty),function(){v&&O.forEach(function(D){D.removeEventListener("scroll",i.update,ty)}),y&&_.removeEventListener("resize",i.update,ty)}}o(ER,"effect");var qT={name:"eventListeners",enabled:!0,phase:"write",fn:o(function(){},"fn"),effect:ER,data:{}};var bR={left:"right",right:"left",bottom:"top",top:"bottom"};function np(e){return e.replace(/left|right|bottom|top/g,function(t){return bR[t]})}o(np,"getOppositePlacement");var TR={start:"end",end:"start"};function ry(e){return e.replace(/start|end/g,function(t){return TR[t]})}o(ry,"getOppositeVariationPlacement");function hf(e){var t=Fr(e),i=t.pageXOffset,l=t.pageYOffset;return{scrollLeft:i,scrollTop:l}}o(hf,"getWindowScroll");function mf(e){return Lo(Fn(e)).left+hf(e).scrollLeft}o(mf,"getWindowScrollBarX");function Ax(e){var t=Fr(e),i=Fn(e),l=t.visualViewport,d=i.clientWidth,v=i.clientHeight,p=0,y=0;return l&&(d=l.width,v=l.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=l.offsetLeft,y=l.offsetTop)),{width:d,height:v,x:p+mf(e),y}}o(Ax,"getViewportRect");function Dx(e){var t,i=Fn(e),l=hf(e),d=(t=e.ownerDocument)==null?void 0:t.body,v=Po(i.scrollWidth,i.clientWidth,d?d.scrollWidth:0,d?d.clientWidth:0),p=Po(i.scrollHeight,i.clientHeight,d?d.scrollHeight:0,d?d.clientHeight:0),y=-l.scrollLeft+mf(e),_=-l.scrollTop;return hi(d||i).direction==="rtl"&&(y+=Po(i.clientWidth,d?d.clientWidth:0)-v),{width:v,height:p,x:y,y:_}}o(Dx,"getDocumentRect");function vf(e){var t=hi(e),i=t.overflow,l=t.overflowX,d=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+d+l)}o(vf,"isScrollParent");function ny(e){return["html","body","#document"].indexOf(En(e))>=0?e.ownerDocument.body:Dn(e)&&vf(e)?e:ny(Hl(e))}o(ny,"getScrollParent");function iu(e,t){var i;t===void 0&&(t=[]);var l=ny(e),d=l===((i=e.ownerDocument)==null?void 0:i.body),v=Fr(l),p=d?[v].concat(v.visualViewport||[],vf(l)?l:[]):l,y=t.concat(p);return d?y:y.concat(iu(Hl(p)))}o(iu,"listScrollParents");function ip(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}o(ip,"rectToClientRect");function kR(e){var t=Lo(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}o(kR,"getInnerBoundingClientRect");function VT(e,t){return t===Zg?ip(Ax(e)):Dn(t)?kR(t):ip(Dx(Fn(e)))}o(VT,"getClientRectFromMixedType");function OR(e){var t=iu(Hl(e)),i=["absolute","fixed"].indexOf(hi(e).position)>=0,l=i&&Dn(e)?os(e):e;return Il(l)?t.filter(function(d){return Il(d)&&_h(d,l)&&En(d)!=="body"}):[]}o(OR,"getClippingParents");function Fx(e,t,i){var l=t==="clippingParents"?OR(e):[].concat(t),d=[].concat(l,[i]),v=d[0],p=d.reduce(function(y,_){var O=VT(e,_);return y.top=Po(O.top,y.top),y.right=nu(O.right,y.right),y.bottom=nu(O.bottom,y.bottom),y.left=Po(O.left,y.left),y},VT(e,v));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}o(Fx,"getClippingRect");function Xs(e){return e.split("-")[1]}o(Xs,"getVariation");function Oh(e){var t=e.reference,i=e.element,l=e.placement,d=l?bn(l):null,v=l?Xs(l):null,p=t.x+t.width/2-i.width/2,y=t.y+t.height/2-i.height/2,_;switch(d){case qr:_={x:p,y:t.y-i.height};break;case _n:_={x:p,y:t.y+t.height};break;case nn:_={x:t.x+t.width,y};break;case on:_={x:t.x-i.width,y};break;default:_={x:t.x,y:t.y}}var O=d?pf(d):null;if(O!=null){var D=O==="y"?"height":"width";switch(v){case Rl:_[O]=_[O]-(t[D]/2-i[D]/2);break;case Qg:_[O]=_[O]+(t[D]/2-i[D]/2);break;default:}}return _}o(Oh,"computeOffsets");function ss(e,t){t===void 0&&(t={});var i=t,l=i.placement,d=l===void 0?e.placement:l,v=i.boundary,p=v===void 0?IT:v,y=i.rootBoundary,_=y===void 0?Zg:y,O=i.elementContext,D=O===void 0?rp:O,Y=i.altBoundary,B=Y===void 0?!1:Y,X=i.padding,te=X===void 0?0:X,Q=Th(typeof te!="number"?te:kh(te,ru)),F=D===rp?HT:rp,P=e.elements.reference,R=e.rects.popper,K=e.elements[B?F:D],V=Fx(Il(K)?K:K.contextElement||Fn(e.elements.popper),p,_),ue=Lo(P),ie=Oh({reference:ue,element:R,strategy:"absolute",placement:d}),he=ip(Object.assign({},R,ie)),me=D===rp?he:ue,xe={top:V.top-me.top+Q.top,bottom:me.bottom-V.bottom+Q.bottom,left:V.left-me.left+Q.left,right:me.right-V.right+Q.right},Ve=e.modifiersData.offset;if(D===rp&&Ve){var Qe=Ve[d];Object.keys(xe).forEach(function(Ee){var xt=[nn,_n].indexOf(Ee)>=0?1:-1,qe=[qr,_n].indexOf(Ee)>=0?"y":"x";xe[Ee]+=Qe[qe]*xt})}return xe}o(ss,"detectOverflow");function Rx(e,t){t===void 0&&(t={});var i=t,l=i.placement,d=i.boundary,v=i.rootBoundary,p=i.padding,y=i.flipVariations,_=i.allowedAutoPlacements,O=_===void 0?Jg:_,D=Xs(l),Y=D?y?Px:Px.filter(function(te){return Xs(te)===D}):ru,B=Y.filter(function(te){return O.indexOf(te)>=0});B.length===0&&(B=Y);var X=B.reduce(function(te,Q){return te[Q]=ss(e,{placement:Q,boundary:d,rootBoundary:v,padding:p})[bn(Q)],te},{});return Object.keys(X).sort(function(te,Q){return X[te]-X[Q]})}o(Rx,"computeAutoPlacement");function NR(e){if(bn(e)===Xg)return[];var t=np(e);return[ry(e),t,ry(t)]}o(NR,"getExpandedFallbackPlacements");function LR(e){var t=e.state,i=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var d=i.mainAxis,v=d===void 0?!0:d,p=i.altAxis,y=p===void 0?!0:p,_=i.fallbackPlacements,O=i.padding,D=i.boundary,Y=i.rootBoundary,B=i.altBoundary,X=i.flipVariations,te=X===void 0?!0:X,Q=i.allowedAutoPlacements,F=t.options.placement,P=bn(F),R=P===F,K=_||(R||!te?[np(F)]:NR(F)),V=[F].concat(K).reduce(function(it,br){return it.concat(bn(br)===Xg?Rx(t,{placement:br,boundary:D,rootBoundary:Y,padding:O,flipVariations:te,allowedAutoPlacements:Q}):br)},[]),ue=t.rects.reference,ie=t.rects.popper,he=new Map,me=!0,xe=V[0],Ve=0;Ve=0,ct=qe?"width":"height",ze=ss(t,{placement:Qe,boundary:D,rootBoundary:Y,altBoundary:B,padding:O}),lt=qe?xt?nn:on:xt?_n:qr;ue[ct]>ie[ct]&&(lt=np(lt));var Zt=np(lt),at=[];if(v&&at.push(ze[Ee]<=0),y&&at.push(ze[lt]<=0,ze[Zt]<=0),at.every(function(it){return it})){xe=Qe,me=!1;break}he.set(Qe,at)}if(me)for(var Rr=te?3:1,Kt=o(function(br){var zt=V.find(function($t){var ne=he.get($t);if(ne)return ne.slice(0,br).every(function(Ze){return Ze})});if(zt)return xe=zt,"break"},"_loop"),Ot=Rr;Ot>0;Ot--){var St=Kt(Ot);if(St==="break")break}t.placement!==xe&&(t.modifiersData[l]._skip=!0,t.placement=xe,t.reset=!0)}}o(LR,"flip");var KT={name:"flip",enabled:!0,phase:"main",fn:LR,requiresIfExists:["offset"],data:{_skip:!1}};function GT(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}o(GT,"getSideOffsets");function YT(e){return[qr,nn,_n,on].some(function(t){return e[t]>=0})}o(YT,"isAnySideFullyClipped");function PR(e){var t=e.state,i=e.name,l=t.rects.reference,d=t.rects.popper,v=t.modifiersData.preventOverflow,p=ss(t,{elementContext:"reference"}),y=ss(t,{altBoundary:!0}),_=GT(p,l),O=GT(y,d,v),D=YT(_),Y=YT(O);t.modifiersData[i]={referenceClippingOffsets:_,popperEscapeOffsets:O,isReferenceHidden:D,hasPopperEscaped:Y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":D,"data-popper-escaped":Y})}o(PR,"hide");var XT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PR};function MR(e,t,i){var l=bn(e),d=[on,qr].indexOf(l)>=0?-1:1,v=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,p=v[0],y=v[1];return p=p||0,y=(y||0)*d,[on,nn].indexOf(l)>=0?{x:y,y:p}:{x:p,y}}o(MR,"distanceAndSkiddingToXY");function AR(e){var t=e.state,i=e.options,l=e.name,d=i.offset,v=d===void 0?[0,0]:d,p=Jg.reduce(function(D,Y){return D[Y]=MR(Y,t.rects,v),D},{}),y=p[t.placement],_=y.x,O=y.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=_,t.modifiersData.popperOffsets.y+=O),t.modifiersData[l]=p}o(AR,"offset");var QT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AR};function DR(e){var t=e.state,i=e.name;t.modifiersData[i]=Oh({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}o(DR,"popperOffsets");var ZT={name:"popperOffsets",enabled:!0,phase:"read",fn:DR,data:{}};function Ix(e){return e==="x"?"y":"x"}o(Ix,"getAltAxis");function FR(e){var t=e.state,i=e.options,l=e.name,d=i.mainAxis,v=d===void 0?!0:d,p=i.altAxis,y=p===void 0?!1:p,_=i.boundary,O=i.rootBoundary,D=i.altBoundary,Y=i.padding,B=i.tether,X=B===void 0?!0:B,te=i.tetherOffset,Q=te===void 0?0:te,F=ss(t,{boundary:_,rootBoundary:O,padding:Y,altBoundary:D}),P=bn(t.placement),R=Xs(t.placement),K=!R,V=pf(P),ue=Ix(V),ie=t.modifiersData.popperOffsets,he=t.rects.reference,me=t.rects.popper,xe=typeof Q=="function"?Q(Object.assign({},t.rects,{placement:t.placement})):Q,Ve={x:0,y:0};if(!!ie){if(v||y){var Qe=V==="y"?qr:on,Ee=V==="y"?_n:nn,xt=V==="y"?"height":"width",qe=ie[V],ct=ie[V]+F[Qe],ze=ie[V]-F[Ee],lt=X?-me[xt]/2:0,Zt=R===Rl?he[xt]:me[xt],at=R===Rl?-me[xt]:-he[xt],Rr=t.elements.arrow,Kt=X&&Rr?cf(Rr):{width:0,height:0},Ot=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bh(),St=Ot[Qe],it=Ot[Ee],br=df(0,he[xt],Kt[xt]),zt=K?he[xt]/2-lt-br-St-xe:Zt-br-St-xe,$t=K?-he[xt]/2+lt+br+it+xe:at+br+it+xe,ne=t.elements.arrow&&os(t.elements.arrow),Ze=ne?V==="y"?ne.clientTop||0:ne.clientLeft||0:0,Tr=t.modifiersData.offset?t.modifiersData.offset[t.placement][V]:0,jt=ie[V]+zt-Tr-Ze,qt=ie[V]+$t-Tr;if(v){var we=df(X?nu(ct,jt):ct,qe,X?Po(ze,qt):ze);ie[V]=we,Ve[V]=we-qe}if(y){var kr=V==="x"?qr:on,ln=V==="x"?_n:nn,In=ie[ue],ii=In+F[kr],an=In-F[ln],Gt=df(X?nu(ii,jt):ii,In,X?Po(an,qt):an);ie[ue]=Gt,Ve[ue]=Gt-In}}t.modifiersData[l]=Ve}}o(FR,"preventOverflow");var JT={name:"preventOverflow",enabled:!0,phase:"main",fn:FR,requiresIfExists:["offset"]};function Hx(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}o(Hx,"getHTMLElementScroll");function Wx(e){return e===Fr(e)||!Dn(e)?hf(e):Hx(e)}o(Wx,"getNodeScroll");function Bx(e,t,i){i===void 0&&(i=!1);var l=Fn(t),d=Lo(e),v=Dn(t),p={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(v||!v&&!i)&&((En(t)!=="body"||vf(l))&&(p=Wx(t)),Dn(t)?(y=Lo(t),y.x+=t.clientLeft,y.y+=t.clientTop):l&&(y.x=mf(l))),{x:d.left+p.scrollLeft-y.x,y:d.top+p.scrollTop-y.y,width:d.width,height:d.height}}o(Bx,"getCompositeRect");function RR(e){var t=new Map,i=new Set,l=[];e.forEach(function(v){t.set(v.name,v)});function d(v){i.add(v.name);var p=[].concat(v.requires||[],v.requiresIfExists||[]);p.forEach(function(y){if(!i.has(y)){var _=t.get(y);_&&d(_)}}),l.push(v)}return o(d,"sort"),e.forEach(function(v){i.has(v.name)||d(v)}),l}o(RR,"order");function Ux(e){var t=RR(e);return WT.reduce(function(i,l){return i.concat(t.filter(function(d){return d.phase===l}))},[])}o(Ux,"orderModifiers");function zx(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}o(zx,"debounce");function $x(e){var t=e.reduce(function(i,l){var d=i[l.name];return i[l.name]=d?Object.assign({},d,l,{options:Object.assign({},d.options,l.options),data:Object.assign({},d.data,l.data)}):l,i},{});return Object.keys(t).map(function(i){return t[i]})}o($x,"mergeByName");var ek={placement:"bottom",modifiers:[],strategy:"absolute"};function tk(){for(var e=arguments.length,t=new Array(e),i=0;iEr.default.createElement("li",{role:"separator",className:"divider"}),"Divider");function Vt(l){var d=l,{onClick:e,children:t}=d,i=Us(d,["onClick","children"]);return Er.default.createElement("li",null,Er.default.createElement("a",Ne({href:"#",onClick:o(p=>{p.preventDefault(),e()},"click")},i),t))}o(Vt,"MenuItem");function Nh({title:e,children:t,className:i}){let[l,d]=(0,Er.useState)(!1),[v,p]=(0,Er.useState)(null),[y,_]=(0,Er.useState)(null),{styles:O,attributes:D}=oy(v,y,{placement:"right-start"}),Y=null;return l&&(Y=Er.default.createElement("ul",Ne({className:(0,qx.default)("dropdown-menu show",i),ref:_,style:O.popper},D.popper),t)),Er.default.createElement("li",{ref:p,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)},Er.default.createElement("a",null,Er.default.createElement("i",{className:"fa fa-caret-right pull-right","aria-hidden":"true"})," ",e),Y)}o(Nh,"SubMenu");var Wl=Er.default.memo(o(function(y){var _=y,{text:t,children:i,options:l,className:d,onOpen:v}=_,p=Us(_,["text","children","options","className","onOpen"]);let[O,D]=(0,Er.useState)(null),[Y,B]=(0,Er.useState)(!1),[X,te]=(0,Er.useState)(null),{styles:Q,attributes:F}=oy(O,X,Ne({},l)),P=o(K=>{B(K),v&&v(K)},"setOpen");(0,Er.useEffect)(()=>{!X||document.addEventListener("click",K=>{X.contains(K.target)?document.addEventListener("click",()=>P(!1),{once:!0}):(K.preventDefault(),K.stopPropagation(),P(!1))},{once:!0,capture:!0})},[X]);let R;return Y?R=Er.default.createElement("ul",Ne({className:"dropdown-menu show",ref:te,style:Q.popper},F.popper),i):R=null,Er.default.createElement(Er.default.Fragment,null,Er.default.createElement("a",Ne({href:"#",ref:D,className:(0,qx.default)(d,{open:Y}),onClick:K=>{K.preventDefault(),P(!0)}},p),t),R)},"Dropdown"));var Mo=o((e,t)=>Ma(void 0,null,function*(){let i=yield vT("export",t,`@${e.id}`);yield navigator.clipboard.writeText(i)}),"copy");var ly=o(({flow:e})=>et.default.createElement("td",{className:(0,sy.default)("col-tls",e.client_conn.tls_established?"col-tls-https":"col-tls-http")}),"tls");ly.headerName="";ly.sortKey=e=>e.type==="http"&&e.request.scheme;var ay=o(({flow:e})=>et.default.createElement("td",{className:"col-icon"},et.default.createElement("div",{className:(0,sy.default)("resource-icon",$R(e))})),"icon");ay.headerName="";ay.sortKey=e=>0;var $R=o(e=>{if(e.type!=="http"||!e.response)return"resource-icon-plain";if(e.websocket)return"resource-icon-websocket";var t=is.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"),uy=o(({flow:e})=>{let t;return e.error&&(e.error.msg==="Connection killed."?t=et.default.createElement("i",{className:"fa fa-fw fa-times pull-right"}):t=et.default.createElement("i",{className:"fa fa-fw fa-exclamation pull-right"})),et.default.createElement("td",{className:"col-path"},e.is_replay==="request"&&et.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),e.intercepted&&et.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),t,et.default.createElement("span",{className:"marker pull-right"},e.marked),e.type==="http"?Ji.pretty_url(e.request):null)},"path");uy.headerName="Path";uy.sortKey=e=>e.type==="http"&&Ji.pretty_url(e.request);var fy=o(({flow:e})=>et.default.createElement("td",{className:"col-method"},e.type==="http"?e.request.method:e.type.toLowerCase()),"method");fy.headerName="Method";fy.sortKey=e=>e.type==="http"&&e.request.method;var cy=o(({flow:e})=>{let t="darkred";return e.type!=="http"||!e.response?et.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="lightred"),et.default.createElement("td",{className:"col-status",style:{color:t}},e.response.status_code))},"status");cy.headerName="Status";cy.sortKey=e=>e.type==="http"&&e.response&&e.response.status_code;var py=o(({flow:e})=>et.default.createElement("td",{className:"col-size"},Ug(Ex(e))),"size");py.headerName="Size";py.sortKey=e=>Ex(e);var dy=o(({flow:e})=>{let t=Ch(e),i=_x(e);return et.default.createElement("td",{className:"col-time"},t&&i?zg(1e3*(i-t)):"...")},"time");dy.headerName="Time";dy.sortKey=e=>{let t=Ch(e),i=_x(e);return t&&i&&i-t};var hy=o(({flow:e})=>{let t=Ch(e);return et.default.createElement("td",{className:"col-start"},t?No(t):"...")},"timestamp");hy.headerName="Start time";hy.sortKey=e=>Ch(e);var jR={":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}"},op=o(({flow:e})=>{let t=Ys(),[i,l]=(0,et.useState)(!1),d=null;if(e.intercepted?d=et.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(sp(e))},et.default.createElement("i",{className:"fa fa-fw fa-play text-success"})):d=et.default.createElement("a",{href:"#",className:"quickaction",onClick:()=>t(lp(e))},et.default.createElement("i",{className:"fa fa-fw fa-repeat text-primary"})),e.type!=="http")return et.default.createElement("td",{className:"col-quickactions"});let v=o(y=>t(RT(y)),"filt"),p=e.response&&is.getContentType(e.response);return et.default.createElement("td",{className:(0,sy.default)("col-quickactions",{hover:i}),onClick:()=>0},et.default.createElement("div",null,d,et.default.createElement(Wl,{text:et.default.createElement("i",{className:"fa fa-fw fa-ellipsis-h text-muted"}),className:"quickaction",onOpen:l,options:{placement:"bottom-end"}},et.default.createElement(Nh,{title:"Copy..."},et.default.createElement(Vt,{onClick:()=>Mo(e,"raw_request")},"Copy raw request"),et.default.createElement(Vt,{onClick:()=>Mo(e,"raw_response")},"Copy raw response"),et.default.createElement(Vt,{onClick:()=>Mo(e,"raw")},"Copy raw request and response"),et.default.createElement(Vt,{onClick:()=>Mo(e,"curl")},"Copy as cURL"),et.default.createElement(Vt,{onClick:()=>Mo(e,"httpie")},"Copy as HTTPie")),et.default.createElement(Nh,{title:"Mark...",className:"markers-menu"},et.default.createElement(Vt,{onClick:()=>t(Ri(e,{marked:""}))},"\u26AA (no marker)"),Object.entries(jR).map(([y,_])=>et.default.createElement(Vt,{key:y,onClick:()=>t(Ri(e,{marked:y}))},_," ",y.replace(/[:_]/g," ")))),et.default.createElement(Nh,{title:"Intercept requests like this"},et.default.createElement(Vt,{onClick:()=>v(`~q ${e.request.host}`)},"Requests to ",e.request.host),e.request.path!=="/"&&et.default.createElement(Vt,{onClick:()=>v(`~q ${e.request.host}${e.request.path}`)},"Requests to ",e.request.host+e.request.path),e.request.method!=="GET"&&et.default.createElement(Vt,{onClick:()=>v(`~q ~m ${e.request.method} ${e.request.host}`)},e.request.method," requests to ",e.request.host)),et.default.createElement(Nh,{title:"Intercept responses like this"},et.default.createElement(Vt,{onClick:()=>v(`~s ${e.request.host}`)},"Responses from ",e.request.host),e.request.path!=="/"&&et.default.createElement(Vt,{onClick:()=>v(`~s ${e.request.host}${e.request.path}`)},"Responses from ",e.request.host+e.request.path),!!p&&et.default.createElement(Vt,{onClick:()=>v(`~ts ${p}`)},"Responses with a ",p," content type.")))))},"quickactions");op.headerName="";op.sortKey=e=>0;var Vx={icon:ay,method:fy,path:uy,quickactions:op,size:py,status:cy,time:dy,timestamp:hy,tls:ly};var qR="FLOWS_ADD",VR="FLOWS_UPDATE",lk="FLOWS_REMOVE",KR="FLOWS_RECEIVE",ak="FLOWS_SELECT",uk="FLOWS_SET_FILTER",fk="FLOWS_SET_SORT",ck="FLOWS_SET_HIGHLIGHT",GR="FLOWS_REQUEST_ACTION",YR=Ne({highlight:void 0,filter:void 0,sort:{column:void 0,desc:!1},selected:[]},jg);function Kx(e=YR,t){switch(t.type){case qR:case VR:case lk:case KR:let i=Sh[t.cmd](t.data,pk(e.filter),Gx(e.sort)),l=e.selected;if(t.type===lk&&e.selected.includes(t.data)){if(e.selected.length>1)l=l.filter(d=>d!==t.data);else if(l=[],t.data in e.viewIndex&&e.view.length>1){let d=e.viewIndex[t.data],v;d===e.view.length-1?v=e.view[d-1]:v=e.view[d+1],l.push(v.id)}}return Ne(Ht(Ne({},e),{selected:l}),tp(e,i));case uk:return Ne(Ht(Ne({},e),{filter:t.filter}),tp(e,wx(pk(t.filter),Gx(e.sort))));case ck:return Ht(Ne({},e),{highlight:t.highlight});case fk:return Ne(Ht(Ne({},e),{sort:t.sort}),tp(e,ST(Gx(t.sort))));case ak:return Ht(Ne({},e),{selected:t.flowIds});default:return e}}o(Kx,"reduce");function pk(e){if(!!e)return uf.parse(e)}o(pk,"makeFilter");function Gx({column:e,desc:t}){if(!e)return;let i=Vx[e].sortKey;if(!!i)return(l,d)=>{let v=i(l),p=i(d);return v>p?t?-1:1:vDt(`/flows/${e.id}/resume`,{method:"POST"})}o(sp,"resume");function gy(){return e=>Dt("/flows/resume",{method:"POST"})}o(gy,"resumeAll");function yy(e){return t=>Dt(`/flows/${e.id}/kill`,{method:"POST"})}o(yy,"kill");function hk(){return e=>Dt("/flows/kill",{method:"POST"})}o(hk,"killAll");function wy(e){return t=>Dt(`/flows/${e.id}`,{method:"DELETE"})}o(wy,"remove");function xy(e){return t=>Dt(`/flows/${e.id}/duplicate`,{method:"POST"})}o(xy,"duplicate");function lp(e){return t=>Dt(`/flows/${e.id}/replay`,{method:"POST"})}o(lp,"replay");function Sy(e){return t=>Dt(`/flows/${e.id}/revert`,{method:"POST"})}o(Sy,"revert");function Ri(e,t){return i=>Dt.put(`/flows/${e.id}`,t)}o(Ri,"update");function mk(e,t,i){let l=new FormData;return t=new window.Blob([t],{type:"plain/text"}),l.append("file",t),d=>Dt(`/flows/${e.id}/${i}/content.data`,{method:"POST",body:l})}o(mk,"uploadContent");function Cy(){return e=>Dt("/clear",{method:"POST"})}o(Cy,"clear");function vk(){return window.location.href="/flows/dump",{type:GR}}o(vk,"download");function gk(e){let t=new FormData;return t.append("file",e),i=>Dt("/flows/dump",{method:"POST",body:t})}o(gk,"upload");function yf(e){return{type:ak,flowIds:e?[e]:[]}}o(yf,"select");var Wh=pe(Fe());var Ut=pe(Fe());var up=pe(Fe());var Ph=pe(Fe()),yk=pe(Jn());var wk=(()=>{let e=document.createElement("div");return e.setAttribute("contenteditable","PLAINTEXT-ONLY"),e.contentEditable==="plaintext-only"?"plaintext-only":"true"})(),ap=!1,Qs=class extends Ph.Component{constructor(){super(...arguments);this.input=Ph.default.createRef();this.isEditing=o(()=>{var t;return((t=this.input.current)==null?void 0:t.contentEditable)===wk},"isEditing");this.startEditing=o(()=>{if(!this.input.current)return console.error("unreachable");this.isEditing()||(this.suppress_events=!0,this.input.current.blur(),this.input.current.contentEditable=wk,window.requestAnimationFrame(()=>{var l,d;if(!this.input.current)return;this.input.current.focus(),this.suppress_events=!1;let t=document.createRange();t.selectNodeContents(this.input.current);let i=window.getSelection();i==null||i.removeAllRanges(),i==null||i.addRange(t),(d=(l=this.props).onEditStart)==null||d.call(l)}))},"startEditing");this.resetValue=o(()=>{var t,i;if(!this.input.current)return console.error("unreachable");this.input.current.textContent=this.props.content,(i=(t=this.props).onInput)==null||i.call(t,this.props.content)},"resetValue");this.finishEditing=o(()=>{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=o(t=>{t.preventDefault();let i=t.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,i)},"onPaste");this.suppress_events=!1;this.onMouseDown=o(t=>{ap&&console.debug("onMouseDown",this.suppress_events),this.suppress_events=!0,window.addEventListener("mouseup",this.onMouseUp,{once:!0})},"onMouseDown");this.onMouseUp=o(t=>{var d;let i=t.target===this.input.current,l=!((d=window.getSelection())==null?void 0:d.toString());ap&&console.warn("mouseUp",this.suppress_events,i,l),i&&l&&this.startEditing(),this.suppress_events=!1},"onMouseUp");this.onClick=o(t=>{ap&&console.debug("onClick",this.suppress_events)},"onClick");this.onFocus=o(t=>{if(ap&&console.debug("onFocus",this.props.content,this.suppress_events),!this.input.current)throw"unreachable";this.suppress_events||this.startEditing()},"onFocus");this.onInput=o(t=>{var i,l,d;(d=(l=this.props).onInput)==null||d.call(l,((i=this.input.current)==null?void 0:i.textContent)||"")},"onInput");this.onBlur=o(t=>{ap&&console.debug("onBlur",this.props.content,this.suppress_events),!this.suppress_events&&this.finishEditing()},"onBlur");this.onKeyDown=o(t=>{var i,l;switch(ap&&console.debug("keydown",t),t.stopPropagation(),t.keyCode){case yt.ESC:t.preventDefault(),this.resetValue(),this.finishEditing();break;case yt.ENTER:t.shiftKey||(t.preventDefault(),this.finishEditing());break;default:break}(l=(i=this.props).onKeyDown)==null||l.call(i,t)},"onKeyDown")}render(){let t=(0,yk.default)("inline-input",this.props.className);return Ph.default.createElement("span",{ref:this.input,tabIndex:0,className:t,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(t){var i,l;t.content!==this.props.content&&((l=(i=this.props).onInput)==null||l.call(i,this.props.content))}};o(Qs,"ValueEditor");var xk=pe(Jn());function wf(e){let[t,i]=(0,up.useState)(e.isValid(e.content)),l=(0,up.useRef)(null),d=o(p=>{var y;e.isValid(p)?e.onEditDone(p):(y=l.current)==null||y.resetValue()},"onEditDone"),v=(0,xk.default)(e.className,t?"has-success":"has-warning");return up.default.createElement(Qs,Ht(Ne({},e),{className:v,onInput:p=>i(e.isValid(p)),onEditDone:d,ref:l}))}o(wf,"ValidateEditor");function Yx(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}o(Yx,"_defineProperty");function Sk(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,l)}return i}o(Sk,"ownKeys");function _y(e){for(var t=1;ti[l.level])));case Ek:case ZR:return Ne(Ne({},e),tp(e,Sh[t.cmd](t.data,l=>e.filters[l.level])));default:return e}}o(Jx,"reduce");function kk(e){return{type:Tk,filter:e}}o(kk,"toggleFilter");function fp(){return{type:bk}}o(fp,"toggleVisibility");function Ok(e,t="web"){let i={id:Math.random().toString(),message:e,level:t};return{type:Ek,cmd:"add",data:i}}o(Ok,"add");var Nk=by({flow:wT,modal:bx,optionsEditor:Tx});var ti;(function(v){v.INIT="CONNECTION_INIT",v.FETCHING="CONNECTION_FETCHING",v.ESTABLISHED="CONNECTION_ESTABLISHED",v.ERROR="CONNECTION_ERROR",v.OFFLINE="CONNECTION_OFFLINE"})(ti||(ti={}));var eI={state:ti.INIT,message:void 0},tI=o((e=eI,t)=>{switch(t.type){case ti.ESTABLISHED:case ti.FETCHING:case ti.ERROR:case ti.OFFLINE:return{state:t.type,message:t.message};default:return e}},"reducer"),Lk=tI;function Pk(){return{type:ti.FETCHING}}o(Pk,"startFetching");function Mk(){return{type:ti.ESTABLISHED}}o(Mk,"connectionEstablished");function Ak(e){return{type:ti.ERROR,message:e}}o(Ak,"connectionError");var Dk="COMMANDBAR_TOGGLE_VISIBILITY",rI={visible:!1},nI=o((e=rI,t)=>{switch(t.type){case Dk:return Ht(Ne({},e),{visible:!e.visible});default:return e}},"reducer"),Fk=nI;function Ty(){return{type:Dk}}o(Ty,"toggleVisibility");function Rk(e){return function(t){var i=t.dispatch,l=t.getState;return function(d){return function(v){return typeof v=="function"?v(i,l,e):d(v)}}}}o(Rk,"createThunkMiddleware");var Ik=Rk();Ik.withExtraArgument=Rk;var Hk=Ik;var iI=window.MITMWEB_CONF||{static:!1,version:"1.2.3",contentViews:["Auto","Raw"]},oI=o((e=iI,t)=>e,"reducer"),Wk=oI;var sI={},lI=o((e=sI,t)=>{switch(t.type){case kx:return t.data;case Ox:return Ne(Ne({},e),t.data);default:return e}},"reducer"),Bk=lI;var aI=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Zx,uI=by({commandBar:Fk,eventLog:Jx,flows:Kx,connection:Lk,ui:Nk,options:DT,options_meta:Bk,conf:Wk}),fI=o(e=>Qx(uI,e,aI(_k(Hk))),"createAppStore"),cp=fI(void 0),Xt=o(()=>Ys(),"useAppDispatch"),st=ax;var eo=pe(Fe());var Uk=pe(ep()),zk=pe(Jn()),eS=class extends eo.Component{constructor(){super(...arguments);this.container=eo.default.createRef();this.nameInput=eo.default.createRef();this.valueInput=eo.default.createRef();this.render=o(()=>{let[t,i]=this.props.item;return eo.default.createElement("div",{ref:this.container,className:"kv-row",onClick:this.onClick,onKeyDownCapture:this.onKeyDown},eo.default.createElement(Qs,{ref:this.nameInput,className:"kv-key",content:t,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([l,i])}),":\xA0",eo.default.createElement(Qs,{ref:this.valueInput,className:"kv-value",content:i,onEditStart:this.props.onEditStart,onEditDone:l=>this.props.onEditDone([t,l]),placeholder:"empty"}))},"render");this.onClick=o(t=>{t.target===this.container.current&&this.props.onClickEmptyArea()},"onClick");this.onKeyDown=o(t=>{var i;t.target===((i=this.valueInput.current)==null?void 0:i.input.current)&&t.key==="Tab"&&this.props.onTabNext()},"onKeyDown")}};o(eS,"Row");var pp=class extends eo.Component{constructor(){super(...arguments);this.rowRefs={};this.state={currentList:this.props.data||[],initialList:this.props.data};this.render=o(()=>{this.rowRefs={};let t=this.state.currentList.map((i,l)=>eo.default.createElement(eS,{key:l,item:i,onEditStart:()=>this.currentlyEditing=l,onEditDone:d=>this.onEditDone(l,d),onClickEmptyArea:()=>this.onClickEmptyArea(l),onTabNext:()=>this.onTabNext(l),ref:d=>this.rowRefs[l]=d}));return eo.default.createElement("div",{className:(0,zk.default)("kv-editor",this.props.className),onMouseDown:this.onMouseDown},t,eo.default.createElement("div",{onClick:i=>{i.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=o((t,i)=>{let l=[...this.state.currentList];i[0]?l[t]=i:l.splice(t,1),this.currentlyEditing=void 0,(0,Uk.isEqual)(this.state.currentList,l)||this.props.onChange(l),this.setState({currentList:l})},"onEditDone");this.onClickEmptyArea=o(t=>{if(this.justFinishedEditing)return;let i=[...this.state.currentList];i.splice(t+1,0,["",""]),this.setState({currentList:i},()=>{var l,d;return(d=(l=this.rowRefs[t+1])==null?void 0:l.nameInput.current)==null?void 0:d.startEditing()})},"onClickEmptyArea");this.onTabNext=o(t=>{t==this.state.currentList.length-1&&this.onClickEmptyArea(t)},"onTabNext");this.onMouseDown=o(t=>{this.justFinishedEditing=this.currentlyEditing},"onMouseDown")}static getDerivedStateFromProps(t,i){return t.data!==i.initialList?{currentList:t.data||[],initialList:t.data}:null}};o(pp,"KeyValueListEditor");var Qt=pe(Fe());var Mh=pe(Fe());var ky=80;function Oy(e,t){let[i,l]=(0,Mh.useState)(),[d,v]=(0,Mh.useState)();return(0,Mh.useEffect)(()=>{d&&d.abort();let p=new AbortController;return Dt(e,{signal:p.signal}).then(y=>{if(!y.ok)throw`${y.status} ${y.statusText}`.trim();return y.text()}).then(y=>{l(y)}).catch(y=>{p.signal.aborted||l(`Error getting content: ${y}.`)}),v(p),()=>{p.signal.aborted||p.abort()}},[e,t]),i}o(Oy,"useContent");var Ah=pe(Fe()),Ny=Ah.default.memo(o(function({icon:t,text:i,className:l,title:d,onOpenFile:v,onClick:p}){let y;return Ah.default.createElement("a",{href:"#",onClick:_=>{y.click(),p&&p(_)},className:l,title:d},Ah.default.createElement("i",{className:"fa fa-fw "+t}),i,Ah.default.createElement("input",{ref:_=>y=_,className:"hidden",type:"file",onChange:_=>{_.preventDefault(),_.target.files&&_.target.files.length>0&&v(_.target.files[0]),y.value=""}}))},"FileChooser"));var dp=pe(Fe()),$k=pe(Jn());function Vr({onClick:e,children:t,icon:i,disabled:l,className:d,title:v}){return dp.createElement("button",{className:(0,$k.default)(d,"btn btn-default"),onClick:l?void 0:e,disabled:l,title:v},i&&dp.createElement(dp.Fragment,null,dp.createElement("i",{className:"fa "+i}),"\xA0"),t)}o(Vr,"Button");var Fh=pe(Fe()),Yk=pe(Fe());var Dh=pe(Fe()),qk=pe(Jn()),Vk=pe(jk()),Kk=pe(ep());function Gk(e){return e&&e.replace(/\r\n|\r/g,` -`)}o(Gk,"normalizeLineEndings");var hp=class extends Dh.Component{constructor(t){super(t);this.state={isFocused:!1}}getCodeMirrorInstance(){return this.props.codeMirrorInstance||Vk.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&&Gk(this.codeMirror.getValue())!==Gk(t.value))if(this.props.preserveScrollPosition){var i=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(i.left,i.top)}else this.codeMirror.setValue(t.value);if(typeof t.options=="object")for(let l in t.options)t.options.hasOwnProperty(l)&&this.setOptionIfChanged(l,t.options[l])}setOptionIfChanged(t,i){let l=this.codeMirror.getOption(t);Kk.default.isEqual(l,i)||this.codeMirror.setOption(t,i)}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,i){this.props.onChange&&i.origin!=="setValue"&&this.props.onChange(t.getValue(),i)}render(){let t=(0,qk.default)("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return Dh.createElement("div",{className:t},Dh.createElement("textarea",{ref:i=>this.textareaNode=i,name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}};o(hp,"CodeMirror"),hp.defaultProps={preserveScrollPosition:!1};var Rh=class extends Yk.Component{constructor(){super(...arguments);this.editor=Fh.createRef();this.getContent=o(()=>{var t;return(t=this.editor.current)==null?void 0:t.codeMirror.getValue()},"getContent");this.render=o(()=>{let t={lineNumbers:!0};return Fh.createElement("div",{className:"codeeditor",onKeyDown:i=>i.stopPropagation()},Fh.createElement(hp,{ref:this.editor,value:this.props.initialContent,onChange:()=>0,options:t}))},"render")}};o(Rh,"CodeEditor");var xf=pe(Fe()),cI=xf.default.memo(o(function({lines:t,maxLines:i,showMore:l}){return t.length===0?null:xf.default.createElement("pre",null,t.map((d,v)=>v===i?xf.default.createElement("button",{key:"showmore",onClick:l,className:"btn btn-xs btn-info"},xf.default.createElement("i",{className:"fa fa-angle-double-down","aria-hidden":"true"})," Show more"):xf.default.createElement("div",{key:v},d.map(([p,y],_)=>xf.default.createElement("span",{key:_,className:p},y)))))},"LineRenderer")),Ly=cI;var Sf=pe(Fe());function Ih({value:e,onChange:t}){let i=st(d=>d.conf.contentViews||[]),l=Sf.default.createElement("span",null,Sf.default.createElement("i",{className:"fa fa-fw fa-files-o"}),"\xA0",Sf.default.createElement("b",null,"View:")," ",e.toLowerCase()," ",Sf.default.createElement("span",{className:"caret"}));return Sf.default.createElement(Wl,{text:l,className:"btn btn-default btn-xs",options:{placement:"top-start"}},i.map(d=>Sf.default.createElement(Vt,{key:d,onClick:()=>t(d)},d.toLowerCase().replace("_"," "))))}o(Ih,"ViewSelector");function nS({flow:e,message:t}){let i=Xt(),l=e.request===t?"request":"response",d=st(te=>te.ui.flow.contentViewFor[e.id+l]||"Auto"),v=(0,Qt.useRef)(null),[p,y]=(0,Qt.useState)(ky),_=(0,Qt.useCallback)(()=>y(Math.max(1024,p*2)),[p]),[O,D]=(0,Qt.useState)(!1),Y;O?Y=jr.getContentURL(e,t):Y=jr.getContentURL(e,t,d,p+1);let B=Oy(Y,t.contentHash),X=(0,Qt.useMemo)(()=>{if(B&&!O)try{return JSON.parse(B)}catch(te){return{description:"Network Error",lines:[[["error",`${B}`]]]}}else return},[B]);if(O)return Qt.default.createElement("div",{className:"contentview",key:"edit"},Qt.default.createElement("div",{className:"controls"},Qt.default.createElement("h5",null,"[Editing]"),Qt.default.createElement(Vr,{onClick:o(()=>Ma(this,null,function*(){var F;let Q=(F=v.current)==null?void 0:F.getContent();yield i(Ri(e,{[l]:{content:Q}})),D(!1)}),"save"),icon:"fa-check text-success",className:"btn-xs"},"Done"),"\xA0",Qt.default.createElement(Vr,{onClick:()=>D(!1),icon:"fa-times text-danger",className:"btn-xs"},"Cancel")),Qt.default.createElement(Rh,{ref:v,initialContent:B||""}));{let te=X?X.description:"Loading...";return Qt.default.createElement("div",{className:"contentview",key:"view"},Qt.default.createElement("div",{className:"controls"},Qt.default.createElement("h5",null,te),Qt.default.createElement(Vr,{onClick:()=>D(!0),icon:"fa-edit",className:"btn-xs"},"Edit"),"\xA0",Qt.default.createElement(Ny,{icon:"fa-upload",text:"Replace",title:"Upload a file to replace the content.",onOpenFile:Q=>i(mk(e,Q,l)),className:"btn btn-default btn-xs"}),"\xA0",Qt.default.createElement(Ih,{value:d,onChange:Q=>i($g(e.id+l,Q))})),iS.matches(t)&&Qt.default.createElement(iS,{flow:e,message:t}),Qt.default.createElement(Ly,{lines:(X==null?void 0:X.lines)||[],maxLines:p,showMore:_}))}}o(nS,"HttpMessage");var pI=/^image\/(png|jpe?g|gif|webp|vnc.microsoft.icon|x-icon)$/i;iS.matches=e=>pI.test(jr.getContentType(e)||"");function iS({flow:e,message:t}){return Qt.default.createElement("div",{className:"flowview-image"},Qt.default.createElement("img",{src:jr.getContentURL(e,t),alt:"preview",className:"img-thumbnail"}))}o(iS,"ViewImage");function dI({flow:e}){let t=Xt();return Ut.createElement("div",{className:"first-line request-line"},Ut.createElement("div",null,Ut.createElement(wf,{content:e.request.method,onEditDone:i=>t(Ri(e,{request:{method:i}})),isValid:i=>i.length>0}),"\xA0",Ut.createElement(wf,{content:Ji.pretty_url(e.request),onEditDone:i=>t(Ri(e,{request:Ne({path:""},Sx(i))})),isValid:i=>{var l;return!!((l=Sx(i))==null?void 0:l.host)}}),"\xA0",Ut.createElement(wf,{content:e.request.http_version,onEditDone:i=>t(Ri(e,{request:{http_version:i}})),isValid:Cx})))}o(dI,"RequestLine");function hI({flow:e}){let t=Xt();return Ut.createElement("div",{className:"first-line response-line"},Ut.createElement(wf,{content:e.response.http_version,onEditDone:i=>t(Ri(e,{response:{http_version:i}})),isValid:Cx}),"\xA0",Ut.createElement(wf,{content:e.response.status_code+"",onEditDone:i=>t(Ri(e,{response:{code:parseInt(i)}})),isValid:i=>/^\d+$/.test(i)}),e.response.http_version!=="HTTP/2.0"&&Ut.createElement(Ut.Fragment,null,"\xA0",Ut.createElement(Qs,{content:e.response.reason,onEditDone:i=>t(Ri(e,{response:{msg:i}}))})))}o(hI,"ResponseLine");function mI({flow:e,message:t}){let i=Xt(),l=e.request===t?"request":"response";return Ut.createElement(pp,{className:"headers",data:t.headers,onChange:d=>i(Ri(e,{[l]:{headers:d}}))})}o(mI,"Headers");function vI({flow:e,message:t}){let i=Xt(),l=e.request===t?"request":"response";return!jr.get_first_header(t,/^trailer$/i)?null:Ut.createElement(Ut.Fragment,null,Ut.createElement("hr",null),Ut.createElement("h5",null,"HTTP Trailers"),Ut.createElement(pp,{className:"trailers",data:t.trailers,onChange:v=>i(Ri(e,{[l]:{trailers:v}}))}))}o(vI,"Trailers");var Xk=Ut.memo(o(function({flow:t,message:i}){let l=t.request===i?"request":"response",d=t.request===i?dI:hI;return Ut.createElement("section",{className:l},Ut.createElement(d,{flow:t}),Ut.createElement(mI,{flow:t,message:i}),Ut.createElement("hr",null),Ut.createElement(nS,{key:t.id+l,flow:t,message:i}),Ut.createElement(vI,{flow:t,message:i}))},"Message"));function oS(){let e=st(t=>t.flows.byId[t.flows.selected[0]]);return Ut.createElement(Xk,{flow:e,message:e.request})}o(oS,"Request");oS.displayName="Request";function sS(){let e=st(t=>t.flows.byId[t.flows.selected[0]]);return Ut.createElement(Xk,{flow:e,message:e.response})}o(sS,"Response");sS.displayName="Response";var _e=pe(Fe());function Qk({conn:e}){var i,l,d;let t=null;return"address"in e?t=_e.createElement(_e.Fragment,null,_e.createElement("tr",null,_e.createElement("td",null,"Address:"),_e.createElement("td",null,(i=e.address)==null?void 0:i.join(":"))),e.peername&&_e.createElement("tr",null,_e.createElement("td",null,"Resolved address:"),_e.createElement("td",null,e.peername.join(":"))),e.sockname&&_e.createElement("tr",null,_e.createElement("td",null,"Source address:"),_e.createElement("td",null,e.sockname.join(":")))):((l=e.peername)==null?void 0:l[0])&&(t=_e.createElement(_e.Fragment,null,_e.createElement("tr",null,_e.createElement("td",null,"Address:"),_e.createElement("td",null,(d=e.peername)==null?void 0:d.join(":"))))),_e.createElement("table",{className:"connection-table"},_e.createElement("tbody",null,t,e.sni?_e.createElement("tr",null,_e.createElement("td",null,_e.createElement("abbr",{title:"TLS Server Name Indication"},"SNI"),":"),_e.createElement("td",null,e.sni)):null,e.alpn?_e.createElement("tr",null,_e.createElement("td",null,_e.createElement("abbr",{title:"ALPN protocol negotiated"},"ALPN"),":"),_e.createElement("td",null,e.alpn)):null,e.tls_version?_e.createElement("tr",null,_e.createElement("td",null,"TLS Version:"),_e.createElement("td",null,e.tls_version)):null,e.cipher?_e.createElement("tr",null,_e.createElement("td",null,"TLS Cipher:"),_e.createElement("td",null,e.cipher)):null))}o(Qk,"ConnectionInfo");function Zk(e){return _e.createElement("dl",{className:"cert-attributes"},e.map(([t,i])=>_e.createElement(_e.Fragment,{key:t},_e.createElement("dt",null,t),_e.createElement("dd",null,i))))}o(Zk,"attrList");function gI({flow:e}){var i;let t=(i=e.server_conn)==null?void 0:i.cert;return t?_e.createElement(_e.Fragment,null,_e.createElement("h4",{key:"name"},"Server Certificate"),_e.createElement("table",{className:"certificate-table"},_e.createElement("tbody",null,_e.createElement("tr",null,_e.createElement("td",null,"Type"),_e.createElement("td",null,t.keyinfo[0],", ",t.keyinfo[1]," bits")),_e.createElement("tr",null,_e.createElement("td",null,"SHA256 digest"),_e.createElement("td",null,t.sha256)),_e.createElement("tr",null,_e.createElement("td",null,"Valid from"),_e.createElement("td",null,No(t.notbefore,{milliseconds:!1}))),_e.createElement("tr",null,_e.createElement("td",null,"Valid to"),_e.createElement("td",null,No(t.notafter,{milliseconds:!1}))),_e.createElement("tr",null,_e.createElement("td",null,"Subject Alternative Names"),_e.createElement("td",null,t.altnames.join(", "))),_e.createElement("tr",null,_e.createElement("td",null,"Subject"),_e.createElement("td",null,Zk(t.subject))),_e.createElement("tr",null,_e.createElement("td",null,"Issuer"),_e.createElement("td",null,Zk(t.issuer))),_e.createElement("tr",null,_e.createElement("td",null,"Serial"),_e.createElement("td",null,t.serial))))):_e.createElement(_e.Fragment,null)}o(gI,"CertificateInfo");function Py({flow:e}){var t;return _e.createElement("section",{className:"detail"},_e.createElement("h4",null,"Client Connection"),_e.createElement(Qk,{conn:e.client_conn}),((t=e.server_conn)==null?void 0:t.address)&&_e.createElement(_e.Fragment,null,_e.createElement("h4",null,"Server Connection"),_e.createElement(Qk,{conn:e.server_conn})),_e.createElement(gI,{flow:e}))}o(Py,"Connection");Py.displayName="Connection";var Hh=pe(Fe());function My({flow:e}){return Hh.createElement("section",{className:"error"},Hh.createElement("div",{className:"alert alert-warning"},e.error.msg,Hh.createElement("div",null,Hh.createElement("small",null,No(e.error.timestamp)))))}o(My,"Error");My.displayName="Error";var ls=pe(Fe());function yI({t:e,deltaTo:t,title:i}){return e?ls.createElement("tr",null,ls.createElement("td",null,i,":"),ls.createElement("td",null,No(e),t&&ls.createElement("span",{className:"text-muted"},"(",zg(1e3*(e-t)),")"))):ls.createElement("tr",null)}o(yI,"TimeStamp");function Ay({flow:e}){var l,d,v,p,y;let t;e.type==="http"?t=e.request.timestamp_start:t=e.client_conn.timestamp_start;let i=[{title:"Server conn. initiated",t:(l=e.server_conn)==null?void 0:l.timestamp_start,deltaTo:t},{title:"Server conn. TCP handshake",t:(d=e.server_conn)==null?void 0:d.timestamp_tcp_setup,deltaTo:t},{title:"Server conn. TLS handshake",t:(v=e.server_conn)==null?void 0:v.timestamp_tls_setup,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}];return e.type==="http"&&i.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:(p=e.response)==null?void 0:p.timestamp_start,deltaTo:t},{title:"Response complete",t:(y=e.response)==null?void 0:y.timestamp_end,deltaTo:t}),ls.createElement("section",{className:"timing"},ls.createElement("h4",null,"Timing"),ls.createElement("table",{className:"timing-table"},ls.createElement("tbody",null,i.filter(_=>!!_.t).sort((_,O)=>_.t-O.t).map(_=>ls.createElement(yI,Ne({key:_.title},_))))))}o(Ay,"Timing");Ay.displayName="Timing";var ri=pe(Fe()),mp=pe(Fe());function Dy({flow:e}){let t=Xt(),i=st(_=>_.ui.flow.contentViewFor[e.id+"ws"]||"Auto"),[l,d]=(0,mp.useState)(ky),v=(0,mp.useCallback)(()=>d(Math.max(1024,l*2)),[l]),p=Oy(jr.getContentURL(e,"messages",i,l+1),e.id+e.websocket.messages_meta.count),y=(0,mp.useMemo)(()=>p&&JSON.parse(p),[p])||[];return ri.createElement("section",{className:"websocket"},ri.createElement("h4",null,"WebSocket"),ri.createElement("div",{className:"contentview"},ri.createElement("div",{className:"controls"},ri.createElement("h5",null,e.websocket.messages_meta.count," Messages"),ri.createElement(Ih,{value:i,onChange:_=>t($g(e.id+"ws",_))})),y.map((_,O)=>{let D=`fa fa-fw fa-arrow-${_.from_client?"right text-primary":"left text-danger"}`,Y=ri.createElement("div",{key:O},ri.createElement("small",null,ri.createElement("i",{className:D}),ri.createElement("span",{className:"pull-right"},_.timestamp&&No(_.timestamp))),ri.createElement(Ly,{lines:_.lines,maxLines:l,showMore:v}));return l-=_.lines.length,Y})),ri.createElement(wI,{websocket:e.websocket}))}o(Dy,"WebSocket");Dy.displayName="WebSocket";function wI({websocket:e}){if(!e.timestamp_end)return null;let t=e.close_reason?`(${e.close_reason})`:"";return ri.createElement("div",null,ri.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,".",ri.createElement("small",{className:"pull-right"},No(e.timestamp_end)))}o(wI,"CloseSummary");var Jk=pe(Jn()),eO={request:oS,response:sS,error:My,connection:Py,timing:Ay,websocket:Dy};function Fy(e){let t=["request","response","websocket","error"].filter(i=>e[i]);return t.push("connection"),t.push("timing"),t}o(Fy,"tabsForFlow");function lS(){let e=Xt(),t=st(v=>v.flows.byId[v.flows.selected[0]]),i=Fy(t),l=st(v=>v.ui.flow.tab);i.indexOf(l)<0&&(l==="response"&&t.error?l="error":l==="error"&&"response"in t?l="response":l=i[0]);let d=eO[l];return Wh.createElement("div",{className:"flow-detail"},Wh.createElement("nav",{className:"nav-tabs nav-tabs-sm"},i.map(v=>Wh.createElement("a",{key:v,href:"#",className:(0,Jk.default)({active:l===v}),onClick:p=>{p.preventDefault(),e(af(v))}},eO[v].displayName))),Wh.createElement(d,{flow:t}))}o(lS,"FlowView");function tO(e){if(e.ctrlKey||e.metaKey)return()=>{};let t=e.keyCode,i=e.shiftKey;return e.preventDefault(),(l,d)=>{let v=d().flows,p=v.byId[d().flows.selected[0]];switch(t){case yt.K:case yt.UP:l(gf(v,-1));break;case yt.J:case yt.DOWN:l(gf(v,1));break;case yt.SPACE:case yt.PAGE_DOWN:l(gf(v,10));break;case yt.PAGE_UP:l(gf(v,-10));break;case yt.END:l(gf(v,1e10));break;case yt.HOME:l(gf(v,-1e10));break;case yt.ESC:d().ui.modal.activeModal?l(Gg()):l(yf(null));break;case yt.LEFT:{if(!p)break;let y=Fy(p),_=d().ui.flow.tab,O=y[(y.indexOf(_)-1+y.length)%y.length];l(af(O));break}case yt.TAB:case yt.RIGHT:{if(!p)break;let y=Fy(p),_=d().ui.flow.tab,O=y[(y.indexOf(_)+1)%y.length];l(af(O));break}case yt.D:{if(!p)return;l(i?xy(p):wy(p));break}case yt.A:{i?l(gy()):p&&p.intercepted&&l(sp(p));break}case yt.R:{!i&&p&&l(lp(p));break}case yt.V:{!i&&p&&p.modified&&l(Sy(p));break}case yt.X:{i?l(hk()):p&&p.intercepted&&l(yy(p));break}case yt.Z:{i||l(Cy());break}default:return}}}o(tO,"onKeyDown");var Vh=pe(Fe());var Bh=pe(Fe()),Uh=pe(eu()),rO=pe(Jn()),vp=class extends Bh.Component{constructor(t,i){super(t,i);this.state={applied:!1,startX:0,startY:0},this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onDragEnd=this.onDragEnd.bind(this)}onMouseDown(t){this.setState({startX:t.pageX,startY:t.pageY}),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("dragend",this.onDragEnd)}onDragEnd(){Uh.default.findDOMNode(this).style.transform="",window.removeEventListener("dragend",this.onDragEnd),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}onMouseUp(t){this.onDragEnd();let i=Uh.default.findDOMNode(this),l=i.previousElementSibling,d=l.offsetHeight+t.pageY-this.state.startY;this.props.axis==="x"&&(d=l.offsetWidth+t.pageX-this.state.startX),l.style.flex=`0 0 ${Math.max(0,d)}px`,i.nextElementSibling.style.flex="1 1 auto",this.setState({applied:!0}),this.onResize()}onMouseMove(t){let i=0,l=0;this.props.axis==="x"?i=t.pageX-this.state.startX:l=t.pageY-this.state.startY,Uh.default.findDOMNode(this).style.transform=`translate(${i}px, ${l}px)`}onResize(){window.setTimeout(()=>window.dispatchEvent(new CustomEvent("resize")),1)}reset(t){if(!this.state.applied)return;let i=Uh.default.findDOMNode(this);i.previousElementSibling.style.flex="",i.nextElementSibling.style.flex="",t||this.setState({applied:!1}),this.onResize()}componentWillUnmount(){this.reset(!0)}render(){return Bh.default.createElement("div",{className:(0,rO.default)("splitter",this.props.axis==="x"?"splitter-x":"splitter-y")},Bh.default.createElement("div",{onMouseDown:this.onMouseDown,draggable:"true"}))}};o(vp,"Splitter"),vp.defaultProps={axis:"x"};var as=pe(Fe()),jh=pe(zh()),Iy=pe(eu());var gO=pe(aS());var sz=pe(Fe()),uS=pe(eu()),cO=Symbol("shouldStick"),pO=o(e=>e.scrollTop+e.clientHeight===e.scrollHeight,"isAtBottom"),Ry=o(e=>{var t;return Object.assign((o(t=class extends e{UNSAFE_componentWillUpdate(){let l=uS.default.findDOMNode(this);this[cO]=l.scrollTop&&pO(l),super.UNSAFE_componentWillUpdate&&super.UNSAFE_componentWillUpdate(),super.componentWillUpdate&&super.componentWillUpdate()}componentDidUpdate(){let l=uS.default.findDOMNode(this);this[cO]&&!pO(l)&&(l.scrollTop=l.scrollHeight),super.componentDidUpdate&&super.componentDidUpdate()}},"AutoScrollWrapper"),es(t,"displayName",e.name),t),e)},"default");function gp(e){if(!e)return{start:0,end:0,paddingTop:0,paddingBottom:0};let{itemCount:t,rowHeight:i,viewportTop:l,viewportHeight:d,itemHeights:v}=e,p=l+d,y=0,_=0,O=0,D=0;if(v)for(let Y=0,B=0;Yy.flows.sort.desc),l=st(y=>y.flows.sort.column),d=st(y=>y.options.web_columns),v=i?"sort-desc":"sort-asc",p=d.map(y=>Lh[y]).filter(y=>y).concat(op);return $h.createElement("tr",null,p.map(y=>$h.createElement("th",{className:(0,dO.default)(`col-${y.name}`,l===y.name&&v),key:y.name,onClick:()=>t(dk(y.name,y.name!==l?!1:!i))},y.headerName)))},"FlowTableHead"));var yp=pe(Fe()),mO=pe(Jn());var vO=yp.default.memo(o(function({flow:t,selected:i,highlighted:l}){let d=Xt(),v=st(O=>O.options.web_columns),p=(0,mO.default)({selected:i,highlighted:l,intercepted:t.intercepted,"has-request":t.type==="http"&&t.request,"has-response":t.type==="http"&&t.response}),y=(0,yp.useCallback)(O=>{let D=O.target;for(;D.parentNode;){if(D.classList.contains("col-quickactions"))return;D=D.parentNode}d(yf(t.id))},[t]),_=v.map(O=>Lh[O]).filter(O=>O).concat(op);return yp.default.createElement("tr",{className:p,onClick:y},_.map(O=>yp.default.createElement(O,{key:O.name,flow:t})))},"FlowRow"));var qh=class extends as.Component{constructor(t,i){super(t,i);this.state={vScroll:gp()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}UNSAFE_componentWillMount(){window.addEventListener("resize",this.onViewportUpdate)}UNSAFE_componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}componentDidUpdate(){if(this.onViewportUpdate(),!this.shouldScrollIntoView)return;this.shouldScrollIntoView=!1;let{rowHeight:t,flows:i,selected:l}=this.props,d=Iy.default.findDOMNode(this),v=Iy.default.findDOMNode(this.refs.head),p=v?v.offsetHeight:0,y=i.indexOf(l)*t+p,_=y+t,O=d.scrollTop,D=d.offsetHeight;y-pO+D&&(d.scrollTop=_-D)}UNSAFE_componentWillReceiveProps(t){t.selected&&t.selected!==this.props.selected&&(this.shouldScrollIntoView=!0)}onViewportUpdate(){let t=Iy.default.findDOMNode(this),i=t.scrollTop||0,l=gp({viewportTop:i,viewportHeight:t.offsetHeight||0,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});(this.state.viewportTop!==i||!(0,gO.default)(this.state.vScroll,l))&&this.setState({vScroll:l,viewportTop:i})}render(){let{vScroll:t,viewportTop:i}=this.state,{flows:l,selected:d,highlight:v}=this.props,p=v?uf.parse(v):()=>!1;return as.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate},as.createElement("table",null,as.createElement("thead",{ref:"head",style:{transform:`translateY(${i}px)`}},as.createElement(hO,null)),as.createElement("tbody",null,as.createElement("tr",{style:{height:t.paddingTop}}),l.slice(t.start,t.end).map(y=>as.createElement(vO,{key:y.id,flow:y,selected:y===d,highlighted:p(y)})),as.createElement("tr",{style:{height:t.paddingBottom}}))))}};o(qh,"FlowTable"),es(qh,"propTypes",{flows:jh.default.array.isRequired,rowHeight:jh.default.number,highlight:jh.default.string,selected:jh.default.object}),es(qh,"defaultProps",{rowHeight:32});var CI=Ry(qh),yO=Fi(e=>({flows:e.flows.view,highlight:e.flows.highlight,selected:e.flows.byId[e.flows.selected[0]]}))(CI);function fS(){let e=st(t=>!!t.flows.byId[t.flows.selected[0]]);return Vh.createElement("div",{className:"main-view"},Vh.createElement(yO,null),e&&Vh.createElement(vp,{key:"splitter"}),e&&Vh.createElement(lS,{key:"flowDetails"}))}o(fS,"MainView");var Do=pe(Fe()),EO=pe(Jn());var ni=pe(Fe());var us=pe(Fe()),Hy=pe(eu()),wO=pe(Jn());var to=pe(Fe());var ro=class extends to.Component{constructor(t,i){super(t,i);this.state={doc:ro.doc}}componentDidMount(){ro.xhr||(ro.xhr=Dt("/filter-help").then(t=>t.json()),ro.xhr.catch(()=>{ro.xhr=null})),this.state.doc||ro.xhr.then(t=>{ro.doc=t,this.setState({doc:t})})}render(){let{doc:t}=this.state;return t?to.default.createElement("table",{className:"table table-condensed"},to.default.createElement("tbody",null,t.commands.map(i=>to.default.createElement("tr",{key:i[1],onClick:l=>this.props.selectHandler(i[0].split(" ")[0]+" ")},to.default.createElement("td",null,i[0].replace(" ","\xA0")),to.default.createElement("td",null,i[1]))),to.default.createElement("tr",{key:"docs-link"},to.default.createElement("td",{colSpan:2},to.default.createElement("a",{href:"https://mitmproxy.org/docs/latest/concepts-filters/",target:"_blank"},to.default.createElement("i",{className:"fa fa-external-link"}),"\xA0 mitmproxy docs"))))):to.default.createElement("i",{className:"fa fa-spinner fa-spin"})}};o(ro,"FilterDocs");var Cf=class extends us.Component{constructor(t,i){super(t,i);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)}UNSAFE_componentWillReceiveProps(t){this.setState({value:t.value})}isValid(t){try{return t&&uf.parse(t),!0}catch(i){return!1}}getDesc(){if(!this.state.value)return us.default.createElement(ro,{selectHandler:this.selectFilter});try{return uf.parse(this.state.value).desc}catch(t){return""+t}}onChange(t){let i=t.target.value;this.setState({value:i}),this.isValid(i)&&this.props.onChange(i)}onFocus(){this.setState({focus:!0})}onBlur(){this.setState({focus:!1})}onMouseEnter(){this.setState({mousefocus:!0})}onMouseLeave(){this.setState({mousefocus:!1})}onKeyDown(t){(t.keyCode===yt.ESC||t.keyCode===yt.ENTER)&&(this.blur(),this.setState({mousefocus:!1})),t.stopPropagation()}selectFilter(t){this.setState({value:t}),Hy.default.findDOMNode(this.refs.input).focus()}blur(){Hy.default.findDOMNode(this.refs.input).blur()}select(){Hy.default.findDOMNode(this.refs.input).select()}render(){let{type:t,color:i,placeholder:l}=this.props,{value:d,focus:v,mousefocus:p}=this.state;return us.default.createElement("div",{className:(0,wO.default)("filter-input input-group",{"has-error":!this.isValid(d)})},us.default.createElement("span",{className:"input-group-addon"},us.default.createElement("i",{className:"fa fa-fw fa-"+t,style:{color:i}})),us.default.createElement("input",{type:"text",ref:"input",placeholder:l,className:"form-control",value:d,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(v||p)&&us.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},us.default.createElement("div",{className:"arrow"}),us.default.createElement("div",{className:"popover-content"},this.getDesc())))}};o(Cf,"FilterInput");wp.title="Start";function wp(){return ni.createElement("div",{className:"main-menu"},ni.createElement("div",{className:"menu-group"},ni.createElement("div",{className:"menu-content"},ni.createElement(EI,null),ni.createElement(bI,null)),ni.createElement("div",{className:"menu-legend"},"Find")),ni.createElement("div",{className:"menu-group"},ni.createElement("div",{className:"menu-content"},ni.createElement(_I,null),ni.createElement(TI,null)),ni.createElement("div",{className:"menu-legend"},"Intercept")))}o(wp,"StartMenu");function _I(){let e=Xt(),t=st(i=>i.options.intercept);return ni.createElement(Cf,{value:t||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)",onChange:i=>e(ff("intercept",i))})}o(_I,"InterceptInput");function EI(){let e=Xt(),t=st(i=>i.flows.filter);return ni.createElement(Cf,{value:t||"",placeholder:"Search",type:"search",color:"black",onChange:i=>e(my(i))})}o(EI,"FlowFilterInput");function bI(){let e=Xt(),t=st(i=>i.flows.highlight);return ni.createElement(Cf,{value:t||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)",onChange:i=>e(vy(i))})}o(bI,"HighlightInput");function TI(){let e=Xt();return ni.createElement(Vr,{className:"btn-sm",title:"[a]ccept all",icon:"fa-forward text-success",onClick:()=>e(gy())},"Resume All")}o(TI,"ResumeAll");var Kr=pe(Fe());var _f=pe(Fe());function cS({value:e,onChange:t,children:i}){return _f.createElement("div",{className:"menu-entry"},_f.createElement("label",null,_f.createElement("input",{type:"checkbox",checked:e,onChange:t}),i))}o(cS,"MenuToggle");function Wy({name:e,children:t}){let i=Xt(),l=st(d=>d.options[e]);return _f.createElement(cS,{value:!!l,onChange:()=>i(ff(e,!l))},t)}o(Wy,"OptionsToggle");function xO(){let e=Ys(),t=st(i=>i.eventLog.visible);return _f.createElement(cS,{value:t,onChange:()=>e(fp())},"Display Event Log")}o(xO,"EventlogToggle");function SO(){let e=Ys(),t=st(i=>i.commandBar.visible);return _f.createElement(cS,{value:t,onChange:()=>e(Ty())},"Display Command Bar")}o(SO,"CommandBarToggle");var pS=pe(Fe());function dS({children:e,resource:t}){let i=`https://docs.mitmproxy.org/stable/${t}`;return pS.createElement("a",{target:"_blank",href:i},e||pS.createElement("i",{className:"fa fa-question-circle"}))}o(dS,"DocsLink");var By=pe(Fe());function Ao({children:e}){return window.MITMWEB_CONF&&window.MITMWEB_CONF.static?null:By.createElement(By.Fragment,null,e)}o(Ao,"HideInStatic");Uy.title="Options";function Uy(){let e=Xt(),t=o(()=>bT("OptionModal"),"openOptions");return Kr.createElement("div",null,Kr.createElement(Ao,null,Kr.createElement("div",{className:"menu-group"},Kr.createElement("div",{className:"menu-content"},Kr.createElement(Vr,{title:"Open Options",icon:"fa-cogs text-primary",onClick:()=>e(t())},"Edit Options ",Kr.createElement("sup",null,"alpha"))),Kr.createElement("div",{className:"menu-legend"},"Options Editor")),Kr.createElement("div",{className:"menu-group"},Kr.createElement("div",{className:"menu-content"},Kr.createElement(Wy,{name:"anticache"},"Strip cache headers ",Kr.createElement(dS,{resource:"overview-features/#anticache"})),Kr.createElement(Wy,{name:"showhost"},"Use host header for display"),Kr.createElement(Wy,{name:"ssl_insecure"},"Don't verify server certificates")),Kr.createElement("div",{className:"menu-legend"},"Quick Options"))),Kr.createElement("div",{className:"menu-group"},Kr.createElement("div",{className:"menu-content"},Kr.createElement(xO,null),Kr.createElement(SO,null)),Kr.createElement("div",{className:"menu-legend"},"View Options")))}o(Uy,"OptionMenu");var mi=pe(Fe());var CO=mi.memo(o(function(){let t=Ys();return mi.createElement(Wl,{className:"pull-left special",text:"File",options:{placement:"bottom-start"}},mi.createElement("li",null,mi.createElement(Ny,{icon:"fa-folder-open",text:"\xA0Open...",onClick:i=>i.stopPropagation(),onOpenFile:i=>{t(gk(i)),document.body.click()}})),mi.createElement(Vt,{onClick:()=>t(vk())},mi.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"\xA0Save..."),mi.createElement(Vt,{onClick:()=>confirm("Delete all flows?")&&t(Cy())},mi.createElement("i",{className:"fa fa-fw fa-trash"}),"\xA0Clear All"),mi.createElement(Ao,null,mi.createElement(sk,null),mi.createElement("li",null,mi.createElement("a",{href:"http://mitm.it/",target:"_blank"},mi.createElement("i",{className:"fa fa-fw fa-external-link"}),"\xA0Install Certificates..."))))},"FileMenu"));var wt=pe(Fe());xp.title="Flow";function xp(){let e=Xt(),t=st(i=>i.flows.byId[i.flows.selected[0]]);return t?wt.createElement("div",{className:"flow-menu"},wt.createElement(Ao,null,wt.createElement("div",{className:"menu-group"},wt.createElement("div",{className:"menu-content"},wt.createElement(Vr,{title:"[r]eplay flow",icon:"fa-repeat text-primary",onClick:()=>e(lp(t)),disabled:!(t.type==="http"&&!t.websocket)},"Replay"),wt.createElement(Vr,{title:"[D]uplicate flow",icon:"fa-copy text-info",onClick:()=>e(xy(t))},"Duplicate"),wt.createElement(Vr,{disabled:!t||!t.modified,title:"revert changes to flow [V]",icon:"fa-history text-warning",onClick:()=>e(Sy(t))},"Revert"),wt.createElement(Vr,{title:"[d]elete flow",icon:"fa-trash text-danger",onClick:()=>e(wy(t))},"Delete")),wt.createElement("div",{className:"menu-legend"},"Flow Modification"))),wt.createElement("div",{className:"menu-group"},wt.createElement("div",{className:"menu-content"},wt.createElement(kI,{flow:t}),wt.createElement(Wl,{className:"",text:wt.createElement(Vr,{title:"Export flow.",icon:"fa-clone",onClick:()=>1},"Export\u25BE"),options:{placement:"bottom-start"}},wt.createElement(Vt,{onClick:()=>Mo(t,"raw_request")},"Copy raw request"),wt.createElement(Vt,{onClick:()=>Mo(t,"raw_response")},"Copy raw response"),wt.createElement(Vt,{onClick:()=>Mo(t,"raw")},"Copy raw request and response"),wt.createElement(Vt,{onClick:()=>Mo(t,"curl")},"Copy as cURL"),wt.createElement(Vt,{onClick:()=>Mo(t,"httpie")},"Copy as HTTPie"))),wt.createElement("div",{className:"menu-legend"},"Export")),wt.createElement(Ao,null,wt.createElement("div",{className:"menu-group"},wt.createElement("div",{className:"menu-content"},wt.createElement(Vr,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",icon:"fa-play text-success",onClick:()=>e(sp(t))},"Resume"),wt.createElement(Vr,{disabled:!t||!t.intercepted,title:"kill intercepted flow [x]",icon:"fa-times text-danger",onClick:()=>e(yy(t))},"Abort")),wt.createElement("div",{className:"menu-legend"},"Interception")))):wt.createElement("div",null)}o(xp,"FlowMenu");function kI({flow:e}){var t;if(e.type!=="http")return null;if(e.request.contentLength&&!((t=e.response)==null?void 0:t.contentLength))return wt.createElement(Vr,{icon:"fa-download",onClick:()=>window.location.href=jr.getContentURL(e,e.request)},"Download");if(e.response){let i=e.response;if(!e.request.contentLength&&e.response.contentLength)return wt.createElement(Vr,{icon:"fa-download",onClick:()=>window.location.href=jr.getContentURL(e,i)},"Download");if(e.request.contentLength&&e.response.contentLength)return wt.createElement(Wl,{text:wt.createElement(Vr,{icon:"fa-download",onClick:()=>1},"Download\u25BE"),options:{placement:"bottom-start"}},wt.createElement(Vt,{onClick:()=>window.location.href=jr.getContentURL(e,e.request)},"Download request"),wt.createElement(Vt,{onClick:()=>window.location.href=jr.getContentURL(e,i)},"Download response"))}return null}o(kI,"DownloadButton");var su=pe(Fe());var _O=su.memo(o(function(){let t=st(l=>l.connection.state),i=st(l=>l.connection.message);switch(t){case ti.INIT:return su.createElement("span",{className:"connection-indicator init"},"connecting\u2026");case ti.FETCHING:return su.createElement("span",{className:"connection-indicator fetching"},"fetching data\u2026");case ti.ESTABLISHED:return su.createElement("span",{className:"connection-indicator established"},"connected");case ti.ERROR:return su.createElement("span",{className:"connection-indicator error",title:i},"connection lost");case ti.OFFLINE:return su.createElement("span",{className:"connection-indicator offline"},"offline");default:let l=t;throw"unknown connection state"}},"ConnectionIndicator"));function hS(){let e=st(y=>y.flows.selected.filter(_=>_ in y.flows.byId)),[t,i]=(0,Do.useState)(()=>wp),[l,d]=(0,Do.useState)(!1),v=[wp,Uy];e.length>0?(l||(i(()=>xp),d(!0)),v.push(xp)):(l&&d(!1),t===xp&&i(()=>wp));function p(y,_){_.preventDefault(),i(()=>y)}return o(p,"handleClick"),Do.default.createElement("header",null,Do.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},Do.default.createElement(CO,null),v.map(y=>Do.default.createElement("a",{key:y.title,href:"#",className:(0,EO.default)({active:y===t}),onClick:_=>p(y,_)},y.title)),Do.default.createElement(Ao,null,Do.default.createElement(_O,null))),Do.default.createElement("div",null,Do.default.createElement(t,null)))}o(hS,"Header");var Xe=pe(Fe()),bO=pe(Jn());var mS=function(){"use strict";function e(l,d){function v(){this.constructor=l}o(v,"ctor"),v.prototype=d.prototype,l.prototype=new v}o(e,"peg$subclass");function t(l,d,v,p){this.message=l,this.expected=d,this.found=v,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,"peg$SyntaxError"),e(t,Error);function i(l){var d=arguments.length>1?arguments[1]:{},v=this,p={},y={Expr:yr},_=yr,O=o(function(H,J){return[H,...J]},"peg$c0"),D=o(function(H){return[H]},"peg$c1"),Y=o(function(){return""},"peg$c2"),B={type:"other",description:"string"},X='"',te={type:"literal",value:'"',description:'"\\""'},Q=o(function(H){return H.join("")},"peg$c6"),F="'",P={type:"literal",value:"'",description:`"'"`},R=/^["\\]/,K={type:"class",value:'["\\\\]',description:'["\\\\]'},V={type:"any",description:"any character"},ue=o(function(H){return H},"peg$c12"),ie="\\",he={type:"literal",value:"\\",description:'"\\\\"'},me=/^['\\]/,xe={type:"class",value:"['\\\\]",description:"['\\\\]"},Ve=/^['"\\]/,Qe={type:"class",value:`['"\\\\]`,description:`['"\\\\]`},Ee="n",xt={type:"literal",value:"n",description:'"n"'},qe=o(function(){return` -`},"peg$c21"),ct="r",ze={type:"literal",value:"r",description:'"r"'},lt=o(function(){return"\r"},"peg$c24"),Zt="t",at={type:"literal",value:"t",description:'"t"'},Rr=o(function(){return" "},"peg$c27"),Kt={type:"other",description:"whitespace"},Ot=/^[ \t\n\r]/,St={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},it={type:"other",description:"control character"},br=/^[|&!()~"]/,zt={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},$t={type:"other",description:"optional whitespace"},ne=0,Ze=0,Tr=[{line:1,column:1,seenCR:!1}],jt=0,qt=[],we=0,kr;if("startRule"in d){if(!(d.startRule in y))throw new Error(`Can't start parsing from rule "`+d.startRule+'".');_=y[d.startRule]}function ln(){return l.substring(Ze,ne)}o(ln,"text");function In(){return dr(Ze,ne)}o(In,"location");function ii(H){throw Io(null,[{type:"other",description:H}],l.substring(Ze,ne),dr(Ze,ne))}o(ii,"expected");function an(H){throw Io(H,null,l.substring(Ze,ne),dr(Ze,ne))}o(an,"error");function Gt(H){var J=Tr[H],de,be;if(J)return J;for(de=H-1;!Tr[de];)de--;for(J=Tr[de],J={line:J.line,column:J.column,seenCR:J.seenCR};dejt&&(jt=ne,qt=[]),qt.push(H))}o(ut,"peg$fail");function Io(H,J,de,be){function Jt(Ft){var Ir=1;for(Ft.sort(function(er,oi){return er.descriptionoi.description?1:0});Ir1?oi.slice(0,-1).join(", ")+" or "+oi[Ft.length-1]:oi[0],no=Ir?'"'+er(Ir)+'"':"end of input","Expected "+fs+" but "+no+" found."}return o(zl,"buildMessage"),J!==null&&Jt(J),new t(H!==null?H:zl(J,de),J,de,be)}o(Io,"peg$buildException");function yr(){var H,J,de,be;if(H=ne,J=Ii(),J!==p){if(de=[],be=Wn(),be!==p)for(;be!==p;)de.push(be),be=Wn();else de=p;de!==p?(be=yr(),be!==p?(Ze=H,J=O(J,be),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p&&(H=ne,J=Ii(),J!==p&&(Ze=H,J=D(J)),H=J,H===p)){for(H=ne,J=[],de=Wn();de!==p;)J.push(de),de=Wn();J!==p&&(Ze=H,J=Y()),H=J}return H}o(yr,"peg$parseExpr");function Ii(){var H,J,de,be;if(we++,H=ne,l.charCodeAt(ne)===34?(J=X,ne++):(J=p,we===0&&ut(te)),J!==p){for(de=[],be=un();be!==p;)de.push(be),be=un();de!==p?(l.charCodeAt(ne)===34?(be=X,ne++):(be=p,we===0&&ut(te)),be!==p?(Ze=H,J=Q(de),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,l.charCodeAt(ne)===39?(J=F,ne++):(J=p,we===0&&ut(P)),J!==p){for(de=[],be=Hn();be!==p;)de.push(be),be=Hn();de!==p?(l.charCodeAt(ne)===39?(be=F,ne++):(be=p,we===0&&ut(P)),be!==p?(Ze=H,J=Q(de),H=J):(ne=H,H=p)):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,J=ne,we++,de=Tn(),we--,de===p?J=void 0:(ne=J,J=p),J!==p){if(de=[],be=vi(),be!==p)for(;be!==p;)de.push(be),be=vi();else de=p;de!==p?(Ze=H,J=Q(de),H=J):(ne=H,H=p)}else ne=H,H=p;if(H===p){if(H=ne,l.charCodeAt(ne)===34?(J=X,ne++):(J=p,we===0&&ut(te)),J!==p){for(de=[],be=un();be!==p;)de.push(be),be=un();de!==p?(Ze=H,J=Q(de),H=J):(ne=H,H=p)}else ne=H,H=p;if(H===p)if(H=ne,l.charCodeAt(ne)===39?(J=F,ne++):(J=p,we===0&&ut(P)),J!==p){for(de=[],be=Hn();be!==p;)de.push(be),be=Hn();de!==p?(Ze=H,J=Q(de),H=J):(ne=H,H=p)}else ne=H,H=p}}}return we--,H===p&&(J=p,we===0&&ut(B)),H}o(Ii,"peg$parseStringLiteral");function un(){var H,J,de;return H=ne,J=ne,we++,R.test(l.charAt(ne))?(de=l.charAt(ne),ne++):(de=p,we===0&&ut(K)),we--,de===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(de=l.charAt(ne),ne++):(de=p,we===0&&ut(V)),de!==p?(Ze=H,J=ue(de),H=J):(ne=H,H=p)):(ne=H,H=p),H===p&&(H=ne,l.charCodeAt(ne)===92?(J=ie,ne++):(J=p,we===0&&ut(he)),J!==p?(de=gi(),de!==p?(Ze=H,J=ue(de),H=J):(ne=H,H=p)):(ne=H,H=p)),H}o(un,"peg$parseDoubleStringChar");function Hn(){var H,J,de;return H=ne,J=ne,we++,me.test(l.charAt(ne))?(de=l.charAt(ne),ne++):(de=p,we===0&&ut(xe)),we--,de===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(de=l.charAt(ne),ne++):(de=p,we===0&&ut(V)),de!==p?(Ze=H,J=ue(de),H=J):(ne=H,H=p)):(ne=H,H=p),H===p&&(H=ne,l.charCodeAt(ne)===92?(J=ie,ne++):(J=p,we===0&&ut(he)),J!==p?(de=gi(),de!==p?(Ze=H,J=ue(de),H=J):(ne=H,H=p)):(ne=H,H=p)),H}o(Hn,"peg$parseSingleStringChar");function vi(){var H,J,de;return H=ne,J=ne,we++,de=Wn(),we--,de===p?J=void 0:(ne=J,J=p),J!==p?(l.length>ne?(de=l.charAt(ne),ne++):(de=p,we===0&&ut(V)),de!==p?(Ze=H,J=ue(de),H=J):(ne=H,H=p)):(ne=H,H=p),H}o(vi,"peg$parseUnquotedStringChar");function gi(){var H,J;return Ve.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,we===0&&ut(Qe)),H===p&&(H=ne,l.charCodeAt(ne)===110?(J=Ee,ne++):(J=p,we===0&&ut(xt)),J!==p&&(Ze=H,J=qe()),H=J,H===p&&(H=ne,l.charCodeAt(ne)===114?(J=ct,ne++):(J=p,we===0&&ut(ze)),J!==p&&(Ze=H,J=lt()),H=J,H===p&&(H=ne,l.charCodeAt(ne)===116?(J=Zt,ne++):(J=p,we===0&&ut(at)),J!==p&&(Ze=H,J=Rr()),H=J))),H}o(gi,"peg$parseEscapeSequence");function Wn(){var H,J;return we++,Ot.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,we===0&&ut(St)),we--,H===p&&(J=p,we===0&&ut(Kt)),H}o(Wn,"peg$parsews");function Tn(){var H,J;return we++,br.test(l.charAt(ne))?(H=l.charAt(ne),ne++):(H=p,we===0&&ut(zt)),we--,H===p&&(J=p,we===0&&ut(it)),H}o(Tn,"peg$parsecc");function Zs(){var H,J;for(we++,H=[],J=Wn();J!==p;)H.push(J),J=Wn();return we--,H===p&&(J=p,we===0&&ut($t)),H}if(o(Zs,"peg$parse__"),kr=_(),kr!==p&&ne===l.length)return kr;throw kr!==p&&ne{t&&t.current.addEventListener("DOMNodeInserted",i=>{let l=i.currentTarget;l.scroll({top:l.scrollHeight,behavior:"auto"})})},[]),Xe.default.createElement("div",{className:"command-result",ref:t},e.map(i=>Xe.default.createElement("div",{key:i.id},Xe.default.createElement("div",null,Xe.default.createElement("strong",null,"$ ",i.command)),i.result)))}o(OI,"Results");function NI({nextArgs:e,currentArg:t,help:i,description:l,availableCommands:d}){let v=[];for(let p=0;p0&&Xe.default.createElement("div",null,Xe.default.createElement("strong",null,"Argument suggestion:")," ",v),(i==null?void 0:i.includes("->"))&&Xe.default.createElement("div",null,Xe.default.createElement("strong",null,"Signature help: "),i),l&&Xe.default.createElement("div",null,"# ",l),Xe.default.createElement("div",null,Xe.default.createElement("strong",null,"Available Commands: "),Xe.default.createElement("p",{className:"available-commands"},JSON.stringify(d)))))}o(NI,"CommandHelp");function gS(){let[e,t]=(0,Xe.useState)(""),[i,l]=(0,Xe.useState)(""),[d,v]=(0,Xe.useState)(0),[p,y]=(0,Xe.useState)([]),[_,O]=(0,Xe.useState)([]),[D,Y]=(0,Xe.useState)({}),[B,X]=(0,Xe.useState)([]),[te,Q]=(0,Xe.useState)(0),[F,P]=(0,Xe.useState)(""),[R,K]=(0,Xe.useState)(""),[V,ue]=(0,Xe.useState)([]),[ie,he]=(0,Xe.useState)([]),[me,xe]=(0,Xe.useState)(0);(0,Xe.useEffect)(()=>{Dt("/commands",{method:"GET"}).then(qe=>qe.json()).then(qe=>{Y(qe.commands),y(vS(qe.commands)),O(Object.keys(qe))}).catch(qe=>console.error(qe))},[]);let Ve=o((qe,ct)=>{var at,Rr,Kt;let ze=mS.parse(ct),lt=mS.parse(qe);P((at=D[ze[0]])==null?void 0:at.signature_help),K((Rr=D[ze[0]])==null?void 0:Rr.description),y(vS(D,lt[0])),O(vS(D,ze[0]));let Zt=(Kt=D[ze[0]])==null?void 0:Kt.args;Zt&&(X([ze[0],...Zt]),Q(ze.length-1))},"parseCommand"),Qe=o(qe=>{t(qe.target.value),l(qe.target.value),v(0)},"onChange"),Ee=o(qe=>{if(qe.keyCode===yt.ENTER){let ct={command:e};Dt("/commands",{method:"POST",body:JSON.stringify(ct),headers:{"Content-Type":"application/json"}}).then(ze=>ze.json()).then(ze=>{he(ze.history),xe(me+1),X([]),ue([...V,{id:V.length,command:e,result:JSON.stringify(ze.result)}])}),P(""),K(""),t(""),l(""),v(0),y(_)}qe.keyCode===yt.UP&&me>0&&(t(ie[me-1]),l(ie[me-1]),xe(me-1)),qe.keyCode===yt.DOWN&&(t(ie[me]),l(ie[me]),me{if(!e){O(Object.keys(D));return}Ve(i,e),qe.stopPropagation()},"onKeyUp");return Xe.default.createElement("div",{className:"command"},Xe.default.createElement("div",{className:"command-title"},"Command Result"),Xe.default.createElement(OI,{results:V}),Xe.default.createElement(NI,{nextArgs:B,currentArg:te,help:F,description:R,availableCommands:_}),Xe.default.createElement("div",{className:(0,bO.default)("command-input input-group")},Xe.default.createElement("span",{className:"input-group-addon"},Xe.default.createElement("i",{className:"fa fa-fw fa-terminal"})),Xe.default.createElement("input",{type:"text",placeholder:"Enter command",className:"form-control",value:e,onChange:Qe,onKeyDown:Ee,onKeyUp:xt})))}o(gS,"CommandBar");var Ul=pe(Fe()),Sp=pe(zh());var yS=pe(Fe());function wS({checked:e,onToggle:t,text:i}){return yS.default.createElement("div",{className:"btn btn-toggle "+(e?"btn-primary":"btn-default"),onClick:t},yS.default.createElement("i",{className:"fa fa-fw "+(e?"fa-check-square-o":"fa-square-o")}),"\xA0",i)}o(wS,"ToggleButton");var Bl=pe(Fe()),xS=pe(zh()),TO=pe(eu()),kO=pe(aS());var Kh=class extends Bl.Component{constructor(t){super(t);this.heights={},this.state={vScroll:gp()},this.onViewportUpdate=this.onViewportUpdate.bind(this)}componentDidMount(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}componentWillUnmount(){window.removeEventListener("resize",this.onViewportUpdate)}componentDidUpdate(){this.onViewportUpdate()}onViewportUpdate(){let t=TO.default.findDOMNode(this),i=gp({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:t.scrollTop,viewportHeight:t.offsetHeight,itemHeights:this.props.events.map(l=>this.heights[l.id])});(0,kO.default)(this.state.vScroll,i)||this.setState({vScroll:i})}setHeight(t,i){if(i&&!this.heights[t]){let l=i.offsetHeight;this.heights[t]!==l&&(this.heights[t]=l,this.onViewportUpdate())}}render(){let{vScroll:t}=this.state,{events:i}=this.props;return Bl.default.createElement("pre",{onScroll:this.onViewportUpdate},Bl.default.createElement("div",{style:{height:t.paddingTop}}),i.slice(t.start,t.end).map(l=>Bl.default.createElement("div",{key:l.id,ref:d=>this.setHeight(l.id,d)},Bl.default.createElement(LI,{event:l}),l.message)),Bl.default.createElement("div",{style:{height:t.paddingBottom}}))}};o(Kh,"EventLogList"),es(Kh,"propTypes",{events:xS.default.array.isRequired,rowHeight:xS.default.number}),es(Kh,"defaultProps",{rowHeight:18});function LI({event:e}){let t={web:"html5",debug:"bug",warn:"exclamation-triangle",error:"ban"}[e.level]||"info";return Bl.default.createElement("i",{className:`fa fa-fw fa-${t}`})}o(LI,"LogIcon");var OO=Ry(Kh);var Gh=class extends Ul.Component{constructor(t,i){super(t,i);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:i,events:l,toggleFilter:d,close:v}=this.props;return Ul.default.createElement("div",{className:"eventlog",style:{height:t}},Ul.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",Ul.default.createElement("div",{className:"pull-right"},["debug","info","web","warn","error"].map(p=>Ul.default.createElement(wS,{key:p,text:p,checked:i[p],onToggle:()=>d(p)})),Ul.default.createElement("i",{onClick:v,className:"fa fa-close"}))),Ul.default.createElement(OO,{events:l}))}};o(Gh,"PureEventLog"),es(Gh,"propTypes",{filters:Sp.default.object.isRequired,events:Sp.default.array.isRequired,toggleFilter:Sp.default.func.isRequired,close:Sp.default.func.isRequired,defaultHeight:Sp.default.number}),es(Gh,"defaultProps",{defaultHeight:200});var NO=Fi(e=>({filters:e.eventLog.filters,events:e.eventLog.view}),{close:fp,toggleFilter:kk})(Gh);var sn=pe(Fe());function SS(){let e=st(P=>P.conf.version),{mode:t,intercept:i,showhost:l,upstream_cert:d,rawtcp:v,http2:p,websocket:y,anticache:_,anticomp:O,stickyauth:D,stickycookie:Y,stream_large_bodies:B,listen_host:X,listen_port:te,server:Q,ssl_insecure:F}=st(P=>P.options);return sn.createElement("footer",null,t&&t!=="regular"&&sn.createElement("span",{className:"label label-success"},t," mode"),i&&sn.createElement("span",{className:"label label-success"},"Intercept: ",i),F&&sn.createElement("span",{className:"label label-danger"},"ssl_insecure"),l&&sn.createElement("span",{className:"label label-success"},"showhost"),!d&&sn.createElement("span",{className:"label label-success"},"no-upstream-cert"),!v&&sn.createElement("span",{className:"label label-success"},"no-raw-tcp"),!p&&sn.createElement("span",{className:"label label-success"},"no-http2"),!y&&sn.createElement("span",{className:"label label-success"},"no-websocket"),_&&sn.createElement("span",{className:"label label-success"},"anticache"),O&&sn.createElement("span",{className:"label label-success"},"anticomp"),D&&sn.createElement("span",{className:"label label-success"},"stickyauth: ",D),Y&&sn.createElement("span",{className:"label label-success"},"stickycookie: ",Y),B&&sn.createElement("span",{className:"label label-success"},"stream: ",Ug(B)),sn.createElement("div",{className:"pull-right"},sn.createElement(Ao,null,Q&&sn.createElement("span",{className:"label label-primary",title:"HTTP Proxy Server Address"},X||"*",":",te)),sn.createElement("span",{className:"label label-default",title:"Mitmproxy Version"},"mitmproxy ",e)))}o(SS,"Footer");var kS=pe(Fe());var TS=pe(Fe());var Cp=pe(Fe());function CS({children:e}){return Cp.createElement("div",null,Cp.createElement("div",{className:"modal-backdrop fade in"}),Cp.createElement("div",{className:"modal modal-visible",id:"optionsModal",tabIndex:"-1",role:"dialog","aria-labelledby":"options"},Cp.createElement("div",{className:"modal-dialog modal-lg",role:"document"},Cp.createElement("div",{className:"modal-content"},e))))}o(CS,"ModalLayout");var pr=pe(Fe());var Fo=pe(Fe()),Ro=pe(zh());var LO=pe(Jn()),PI=o(e=>{e.keyCode!==yt.ESC&&e.stopPropagation()},"stopPropagation");_S.propTypes={value:Ro.default.bool.isRequired,onChange:Ro.default.func.isRequired};function _S(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);return Fo.default.createElement("div",{className:"checkbox"},Fo.default.createElement("label",null,Fo.default.createElement("input",Ne({type:"checkbox",checked:e,onChange:v=>t(v.target.checked)},i)),"Enable"))}o(_S,"BooleanOption");ES.propTypes={value:Ro.default.string,onChange:Ro.default.func.isRequired};function ES(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);return Fo.default.createElement("input",Ne({type:"text",value:e||"",onChange:v=>t(v.target.value)},i))}o(ES,"StringOption");function MI(e){return function(l){var d=l,{onChange:t}=d,i=Us(d,["onChange"]);return Fo.default.createElement(e,Ne({onChange:v=>t(v||null)},i))}}o(MI,"Optional");PO.propTypes={value:Ro.default.number.isRequired,onChange:Ro.default.func.isRequired};function PO(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);return Fo.default.createElement("input",Ne({type:"number",value:e,onChange:v=>t(parseInt(v.target.value))},i))}o(PO,"NumberOption");MO.propTypes={value:Ro.default.string.isRequired,onChange:Ro.default.func.isRequired};function MO(d){var v=d,{value:e,onChange:t,choices:i}=v,l=Us(v,["value","onChange","choices"]);return Fo.default.createElement("select",Ne({onChange:p=>t(p.target.value),value:e},l),i.map(p=>Fo.default.createElement("option",{key:p,value:p},p)))}o(MO,"ChoicesOption");AO.propTypes={value:Ro.default.arrayOf(Ro.default.string).isRequired,onChange:Ro.default.func.isRequired};function AO(l){var d=l,{value:e,onChange:t}=d,i=Us(d,["value","onChange"]);let v=Math.max(e.length,1);return Fo.default.createElement("textarea",Ne({rows:v,value:e.join(` -`),onChange:p=>t(p.target.value.split(` -`))},i))}o(AO,"StringSequenceOption");var AI={bool:_S,str:ES,int:PO,"optional str":MI(ES),"sequence of str":AO};function DI({choices:e,type:t,value:i,onChange:l,name:d,error:v}){let p,y={};if(e)p=MO,y.choices=e;else if(p=AI[t],!p)throw`unknown option type ${t}`;return p!==_S&&(y.className="form-control"),Fo.default.createElement("div",{className:(0,LO.default)({"has-error":v})},Fo.default.createElement(p,Ne({name:d,value:i,onChange:l,onKeyDown:PI},y)))}o(DI,"PureOption");var DO=Fi((e,{name:t})=>Ne(Ne({},e.options_meta[t]),e.ui.optionsEditor[t]),(e,{name:t})=>({onChange:i=>e(ff(t,i))}))(DI);var zy=pe(ep());function FI({help:e}){return pr.default.createElement("div",{className:"help-block small"},e)}o(FI,"PureOptionHelp");var RI=Fi((e,{name:t})=>({help:e.options_meta[t].help}))(FI);function II({error:e}){return e?pr.default.createElement("div",{className:"small text-danger"},e):null}o(II,"PureOptionError");var HI=Fi((e,{name:t})=>({error:e.ui.optionsEditor[t]&&e.ui.optionsEditor[t].error}))(II);function WI({value:e,defaultVal:t}){if(e===t)return null;if(typeof t=="boolean")t=t?"true":"false";else if(Array.isArray(t)){if(zy.default.isEmpty(zy.default.compact(e))&&zy.default.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," ")," ")}o(WI,"PureOptionDefault");var BI=Fi((e,{name:t})=>({value:e.options[t],defaultVal:e.options_meta[t].default}))(WI),bS=class extends pr.Component{constructor(t,i){super(t,i);this.state={title:"Options"}}componentWillUnmount(){}render(){let{hideModal:t,options:i}=this.props,{title:l}=this.state;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:()=>{t()}},pr.default.createElement("i",{className:"fa fa-fw fa-times"})),pr.default.createElement("div",{className:"modal-title"},pr.default.createElement("h4",null,l))),pr.default.createElement("div",{className:"modal-body"},pr.default.createElement("div",{className:"form-horizontal"},i.map(d=>pr.default.createElement("div",{key:d,className:"form-group"},pr.default.createElement("div",{className:"col-xs-6"},pr.default.createElement("label",{htmlFor:d},d),pr.default.createElement(RI,{name:d})),pr.default.createElement("div",{className:"col-xs-6"},pr.default.createElement(DO,{name:d}),pr.default.createElement(HI,{name:d}),pr.default.createElement(BI,{name:d})))))),pr.default.createElement("div",{className:"modal-footer"}))}};o(bS,"PureOptionModal");var FO=Fi(e=>({options:Object.keys(e.options_meta).sort()}),{hideModal:Gg,save:FT})(bS);function UI(){return TS.createElement(CS,null,TS.createElement(FO,null))}o(UI,"OptionModal");var RO=[UI];function OS(){let e=st(i=>i.ui.modal.activeModal),t=RO.find(i=>i.name===e);return e?kS.createElement(t,null):kS.createElement("div",null)}o(OS,"PureModal");var NS=class extends Rn.Component{constructor(){super(...arguments);this.state={};this.render=o(()=>{var l;let{showEventLog:t,showCommandBar:i}=this.props;return this.state.error?(console.log("ERR",this.state),Rn.default.createElement("div",{className:"container"},Rn.default.createElement("h1",null,"mitmproxy has crashed."),Rn.default.createElement("pre",null,this.state.error.stack,Rn.default.createElement("br",null),Rn.default.createElement("br",null),"Component Stack:",(l=this.state.errorInfo)==null?void 0:l.componentStack),Rn.default.createElement("p",null,"Please lodge a bug report at ",Rn.default.createElement("a",{href:"https://github.com/mitmproxy/mitmproxy/issues"},"https://github.com/mitmproxy/mitmproxy/issues"),"."))):Rn.default.createElement("div",{id:"container",tabIndex:0},Rn.default.createElement(hS,null),Rn.default.createElement(fS,null),i&&Rn.default.createElement(gS,{key:"commandbar"}),t&&Rn.default.createElement(NO,{key:"eventlog"}),Rn.default.createElement(SS,null),Rn.default.createElement(OS,null))},"render")}componentDidMount(){window.addEventListener("keydown",this.props.onKeyDown)}componentWillUnmount(){window.removeEventListener("keydown",this.props.onKeyDown)}componentDidCatch(t,i){this.setState({error:t,errorInfo:i})}};o(NS,"ProxyAppMain");var IO=Fi(e=>({showEventLog:e.eventLog.visible,showCommandBar:e.commandBar.visible}),{onKeyDown:tO})(NS);var lu={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e",SHOW_COMMANDBAR:"c"};function zI(e){let[t,i]=window.location.hash.substr(1).split("?",2),l=t.substr(1).split("/");if(l[0]==="flows"&&l.length==3){let[d,v]=l.slice(1);e.dispatch(yf(d)),e.dispatch(af(v))}i&&i.split("&").forEach(d=>{let[v,p]=d.split("=",2);switch(v){case lu.SEARCH:e.dispatch(my(p));break;case lu.HIGHLIGHT:e.dispatch(vy(p));break;case lu.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch(fp());break;case lu.SHOW_COMMANDBAR:e.getState().commandBar.visible||e.dispatch(Ty());break;default:console.error(`unimplemented query arg: ${d}`)}})}o(zI,"updateStoreFromUrl");function $I(e){let t=e.getState(),i={[lu.SEARCH]:t.flows.filter,[lu.HIGHLIGHT]:t.flows.highlight,[lu.SHOW_EVENTLOG]:t.eventLog.visible,[lu.SHOW_COMMANDBAR]:t.commandBar.visible},l=Object.keys(i).filter(p=>i[p]).map(p=>`${p}=${i[p]}`).join("&"),d;t.flows.selected.length>0?d=`/flows/${t.flows.selected[0]}/${t.ui.flow.tab}`:d="/flows",l&&(d+="?"+l);let v=window.location.pathname;v==="blank"&&(v="/"),window.location.hash.substr(1)!==d&&history.replaceState(void 0,"",`${v}#${d}`)}o($I,"updateUrlFromStore");function LS(e){zI(e),e.subscribe(()=>$I(e))}o(LS,"initialize");var jI="reset",Yh=class{constructor(t){this.activeFetches={},this.store=t,this.connect()}connect(){this.socket=new WebSocket(location.origin.replace("http","ws")+"/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("flows"),this.fetchData("events"),this.fetchData("options"),this.store.dispatch(Pk())}fetchData(t){let i=[];this.activeFetches[t]=i,Dt(`./${t}`).then(l=>l.json()).then(l=>{this.activeFetches[t]===i&&this.receive(t,l)})}onMessage(t){if(t.cmd===jI)return this.fetchData(t.resource);if(t.resource in this.activeFetches)this.activeFetches[t.resource].push(t);else{let i=`${t.resource}_${t.cmd}`.toUpperCase();this.store.dispatch(Ne({type:i},t))}}receive(t,i){let l=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:l,cmd:"receive",resource:t,data:i});let d=this.activeFetches[t];delete this.activeFetches[t],d.forEach(v=>this.onMessage(v)),Object.keys(this.activeFetches).length===0&&this.store.dispatch(Mk())}onClose(t){this.store.dispatch(Ak(`Connection closed at ${new Date().toUTCString()} with error code ${t.code}.`)),console.error("websocket connection closed",t)}onError(){console.error("websocket connection errored",arguments)}};o(Yh,"WebsocketBackend");var Xh=class{constructor(t){this.store=t,this.onOpen()}onOpen(){this.fetchData("flows"),this.fetchData("options")}fetchData(t){Dt(`./${t}`).then(i=>i.json()).then(i=>{this.receive(t,i)})}receive(t,i){let l=`${t}_RECEIVE`.toUpperCase();this.store.dispatch({type:l,cmd:"receive",resource:t,data:i})}};o(Xh,"StaticBackend");LS(cp);window.MITMWEB_STATIC?window.backend=new Xh(cp):window.backend=new Yh(cp);window.addEventListener("error",e=>{cp.dispatch(Ok(`${e.message} -${e.error.stack}`))});document.addEventListener("DOMContentLoaded",()=>{(0,HO.render)(PS.createElement(G1,{store:cp},PS.createElement(IO,null)),document.getElementById("mitmproxy"))});})(); + // node_modules/react/index.js + var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module) { + "use strict"; + if (false) { + module.exports = null; + } else { + module.exports = require_react_development(); + } + } + }); + + // node_modules/scheduler/cjs/scheduler.development.js + var require_scheduler_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var enableSchedulerDebugging = false; + var enableProfiling = false; + var requestHostCallback; + var requestHostTimeout; + var cancelHostTimeout; + var requestPaint; + var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; + if (hasPerformanceNow) { + var localPerformance = performance; + exports.unstable_now = function() { + return localPerformance.now(); + }; + } else { + var localDate = Date; + var initialTime = localDate.now(); + exports.unstable_now = function() { + return localDate.now() - initialTime; + }; + } + if (typeof window === "undefined" || typeof MessageChannel !== "function") { + var _callback = null; + var _timeoutID = null; + var _flushCallback = /* @__PURE__ */ __name(function() { + if (_callback !== null) { + try { + var currentTime = exports.unstable_now(); + var hasRemainingTime = true; + _callback(hasRemainingTime, currentTime); + _callback = null; + } catch (e) { + setTimeout(_flushCallback, 0); + throw e; + } + } + }, "_flushCallback"); + requestHostCallback = /* @__PURE__ */ __name(function(cb) { + if (_callback !== null) { + setTimeout(requestHostCallback, 0, cb); + } else { + _callback = cb; + setTimeout(_flushCallback, 0); + } + }, "requestHostCallback"); + requestHostTimeout = /* @__PURE__ */ __name(function(cb, ms) { + _timeoutID = setTimeout(cb, ms); + }, "requestHostTimeout"); + cancelHostTimeout = /* @__PURE__ */ __name(function() { + clearTimeout(_timeoutID); + }, "cancelHostTimeout"); + exports.unstable_shouldYield = function() { + return false; + }; + requestPaint = exports.unstable_forceFrameRate = function() { + }; + } else { + var _setTimeout = window.setTimeout; + var _clearTimeout = window.clearTimeout; + if (typeof console !== "undefined") { + var requestAnimationFrame = window.requestAnimationFrame; + var cancelAnimationFrame = window.cancelAnimationFrame; + if (typeof requestAnimationFrame !== "function") { + console["error"]("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); + } + if (typeof cancelAnimationFrame !== "function") { + console["error"]("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); + } + } + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; + var yieldInterval = 5; + var deadline = 0; + { + exports.unstable_shouldYield = function() { + return exports.unstable_now() >= deadline; + }; + requestPaint = /* @__PURE__ */ __name(function() { + }, "requestPaint"); + } + exports.unstable_forceFrameRate = function(fps) { + if (fps < 0 || fps > 125) { + console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); + return; + } + if (fps > 0) { + yieldInterval = Math.floor(1e3 / fps); + } else { + yieldInterval = 5; + } + }; + var performWorkUntilDeadline = /* @__PURE__ */ __name(function() { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); + deadline = currentTime + yieldInterval; + var hasTimeRemaining = true; + try { + var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + if (!hasMoreWork) { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } else { + port.postMessage(null); + } + } catch (error) { + port.postMessage(null); + throw error; + } + } else { + isMessageLoopRunning = false; + } + }, "performWorkUntilDeadline"); + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + requestHostCallback = /* @__PURE__ */ __name(function(callback) { + scheduledHostCallback = callback; + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + port.postMessage(null); + } + }, "requestHostCallback"); + requestHostTimeout = /* @__PURE__ */ __name(function(callback, ms) { + taskTimeoutID = _setTimeout(function() { + callback(exports.unstable_now()); + }, ms); + }, "requestHostTimeout"); + cancelHostTimeout = /* @__PURE__ */ __name(function() { + _clearTimeout(taskTimeoutID); + taskTimeoutID = -1; + }, "cancelHostTimeout"); + } + function push(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + __name(push, "push"); + function peek(heap) { + var first = heap[0]; + return first === void 0 ? null : first; + } + __name(peek, "peek"); + function pop(heap) { + var first = heap[0]; + if (first !== void 0) { + var last = heap.pop(); + if (last !== first) { + heap[0] = last; + siftDown(heap, last, 0); + } + return first; + } else { + return null; + } + } + __name(pop, "pop"); + function siftUp(heap, node, i) { + var index = i; + while (true) { + var parentIndex = index - 1 >>> 1; + var parent = heap[parentIndex]; + if (parent !== void 0 && compare(parent, node) > 0) { + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + return; + } + } + } + __name(siftUp, "siftUp"); + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + while (index < length) { + var leftIndex = (index + 1) * 2 - 1; + var left2 = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right2 = heap[rightIndex]; + if (left2 !== void 0 && compare(left2, node) < 0) { + if (right2 !== void 0 && compare(right2, left2) < 0) { + heap[index] = right2; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left2; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (right2 !== void 0 && compare(right2, node) < 0) { + heap[index] = right2; + heap[rightIndex] = node; + index = rightIndex; + } else { + return; + } + } + } + __name(siftDown, "siftDown"); + function compare(a, b) { + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + __name(compare, "compare"); + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + function markTaskErrored(task, ms) { + } + __name(markTaskErrored, "markTaskErrored"); + var maxSigned31BitInt = 1073741823; + var IMMEDIATE_PRIORITY_TIMEOUT = -1; + var USER_BLOCKING_PRIORITY_TIMEOUT = 250; + var NORMAL_PRIORITY_TIMEOUT = 5e3; + var LOW_PRIORITY_TIMEOUT = 1e4; + var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; + var taskQueue = []; + var timerQueue = []; + var taskIdCounter = 1; + var currentTask = null; + var currentPriorityLevel = NormalPriority; + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + function advanceTimers(currentTime) { + var timer = peek(timerQueue); + while (timer !== null) { + if (timer.callback === null) { + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push(taskQueue, timer); + } else { + return; + } + timer = peek(timerQueue); + } + } + __name(advanceTimers, "advanceTimers"); + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + __name(handleTimeout, "handleTimeout"); + function flushWork(hasTimeRemaining, initialTime2) { + isHostCallbackScheduled = false; + if (isHostTimeoutScheduled) { + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime2); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + throw error; + } + } else { + return workLoop(hasTimeRemaining, initialTime2); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + } + } + __name(flushWork, "flushWork"); + function workLoop(hasTimeRemaining, initialTime2) { + var currentTime = initialTime2; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + while (currentTask !== null && !enableSchedulerDebugging) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) { + break; + } + var callback = currentTask.callback; + if (typeof callback === "function") { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + if (typeof continuationCallback === "function") { + currentTask.callback = continuationCallback; + } else { + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + currentTask = peek(taskQueue); + } + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + return false; + } + } + __name(workLoop, "workLoop"); + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + default: + priorityLevel = NormalPriority; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + __name(unstable_runWithPriority, "unstable_runWithPriority"); + function unstable_next(eventHandler) { + var priorityLevel; + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + priorityLevel = NormalPriority; + break; + default: + priorityLevel = currentPriorityLevel; + break; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + __name(unstable_next, "unstable_next"); + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function() { + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + __name(unstable_wrapCallback, "unstable_wrapCallback"); + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime2; + if (typeof options === "object" && options !== null) { + var delay = options.delay; + if (typeof delay === "number" && delay > 0) { + startTime2 = currentTime + delay; + } else { + startTime2 = currentTime; + } + } else { + startTime2 = currentTime; + } + var timeout; + switch (priorityLevel) { + case ImmediatePriority: + timeout = IMMEDIATE_PRIORITY_TIMEOUT; + break; + case UserBlockingPriority: + timeout = USER_BLOCKING_PRIORITY_TIMEOUT; + break; + case IdlePriority: + timeout = IDLE_PRIORITY_TIMEOUT; + break; + case LowPriority: + timeout = LOW_PRIORITY_TIMEOUT; + break; + case NormalPriority: + default: + timeout = NORMAL_PRIORITY_TIMEOUT; + break; + } + var expirationTime = startTime2 + timeout; + var newTask = { + id: taskIdCounter++, + callback, + priorityLevel, + startTime: startTime2, + expirationTime, + sortIndex: -1 + }; + if (startTime2 > currentTime) { + newTask.sortIndex = startTime2; + push(timerQueue, newTask); + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + if (isHostTimeoutScheduled) { + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } + requestHostTimeout(handleTimeout, startTime2 - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push(taskQueue, newTask); + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + return newTask; + } + __name(unstable_scheduleCallback, "unstable_scheduleCallback"); + function unstable_pauseExecution() { + } + __name(unstable_pauseExecution, "unstable_pauseExecution"); + function unstable_continueExecution() { + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + __name(unstable_continueExecution, "unstable_continueExecution"); + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + __name(unstable_getFirstCallbackNode, "unstable_getFirstCallbackNode"); + function unstable_cancelCallback(task) { + task.callback = null; + } + __name(unstable_cancelCallback, "unstable_cancelCallback"); + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + __name(unstable_getCurrentPriorityLevel, "unstable_getCurrentPriorityLevel"); + var unstable_requestPaint = requestPaint; + var unstable_Profiling = null; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_Profiling = unstable_Profiling; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_next = unstable_next; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_wrapCallback = unstable_wrapCallback; + })(); + } + } + }); + + // node_modules/scheduler/index.js + var require_scheduler = __commonJS({ + "node_modules/scheduler/index.js"(exports, module) { + "use strict"; + if (false) { + module.exports = null; + } else { + module.exports = require_scheduler_development(); + } + } + }); + + // node_modules/scheduler/cjs/scheduler-tracing.development.js + var require_scheduler_tracing_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler-tracing.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var DEFAULT_THREAD_ID = 0; + var interactionIDCounter = 0; + var threadIDCounter = 0; + exports.__interactionsRef = null; + exports.__subscriberRef = null; + { + exports.__interactionsRef = { + current: new Set() + }; + exports.__subscriberRef = { + current: null + }; + } + function unstable_clear(callback) { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = new Set(); + try { + return callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + } + } + __name(unstable_clear, "unstable_clear"); + function unstable_getCurrent() { + { + return exports.__interactionsRef.current; + } + } + __name(unstable_getCurrent, "unstable_getCurrent"); + function unstable_getThreadID() { + return ++threadIDCounter; + } + __name(unstable_getThreadID, "unstable_getThreadID"); + function unstable_trace(name, timestamp2, callback) { + var threadID = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : DEFAULT_THREAD_ID; + var interaction = { + __count: 1, + id: interactionIDCounter++, + name, + timestamp: timestamp2 + }; + var prevInteractions = exports.__interactionsRef.current; + var interactions = new Set(prevInteractions); + interactions.add(interaction); + exports.__interactionsRef.current = interactions; + var subscriber = exports.__subscriberRef.current; + var returnValue; + try { + if (subscriber !== null) { + subscriber.onInteractionTraced(interaction); + } + } finally { + try { + if (subscriber !== null) { + subscriber.onWorkStarted(interactions, threadID); + } + } finally { + try { + returnValue = callback(); + } finally { + exports.__interactionsRef.current = prevInteractions; + try { + if (subscriber !== null) { + subscriber.onWorkStopped(interactions, threadID); + } + } finally { + interaction.__count--; + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + } + } + } + } + return returnValue; + } + __name(unstable_trace, "unstable_trace"); + function unstable_wrap(callback) { + var threadID = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_THREAD_ID; + var wrappedInteractions = exports.__interactionsRef.current; + var subscriber = exports.__subscriberRef.current; + if (subscriber !== null) { + subscriber.onWorkScheduled(wrappedInteractions, threadID); + } + wrappedInteractions.forEach(function(interaction) { + interaction.__count++; + }); + var hasRun = false; + function wrapped() { + var prevInteractions = exports.__interactionsRef.current; + exports.__interactionsRef.current = wrappedInteractions; + subscriber = exports.__subscriberRef.current; + try { + var returnValue; + try { + if (subscriber !== null) { + subscriber.onWorkStarted(wrappedInteractions, threadID); + } + } finally { + try { + returnValue = callback.apply(void 0, arguments); + } finally { + exports.__interactionsRef.current = prevInteractions; + if (subscriber !== null) { + subscriber.onWorkStopped(wrappedInteractions, threadID); + } + } + } + return returnValue; + } finally { + if (!hasRun) { + hasRun = true; + wrappedInteractions.forEach(function(interaction) { + interaction.__count--; + if (subscriber !== null && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + } + } + __name(wrapped, "wrapped"); + wrapped.cancel = /* @__PURE__ */ __name(function cancel() { + subscriber = exports.__subscriberRef.current; + try { + if (subscriber !== null) { + subscriber.onWorkCanceled(wrappedInteractions, threadID); + } + } finally { + wrappedInteractions.forEach(function(interaction) { + interaction.__count--; + if (subscriber && interaction.__count === 0) { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } + }); + } + }, "cancel"); + return wrapped; + } + __name(unstable_wrap, "unstable_wrap"); + var subscribers = null; + { + subscribers = new Set(); + } + function unstable_subscribe(subscriber) { + { + subscribers.add(subscriber); + if (subscribers.size === 1) { + exports.__subscriberRef.current = { + onInteractionScheduledWorkCompleted, + onInteractionTraced, + onWorkCanceled, + onWorkScheduled, + onWorkStarted, + onWorkStopped + }; + } + } + } + __name(unstable_subscribe, "unstable_subscribe"); + function unstable_unsubscribe(subscriber) { + { + subscribers.delete(subscriber); + if (subscribers.size === 0) { + exports.__subscriberRef.current = null; + } + } + } + __name(unstable_unsubscribe, "unstable_unsubscribe"); + function onInteractionTraced(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onInteractionTraced(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + __name(onInteractionTraced, "onInteractionTraced"); + function onInteractionScheduledWorkCompleted(interaction) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onInteractionScheduledWorkCompleted(interaction); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + __name(onInteractionScheduledWorkCompleted, "onInteractionScheduledWorkCompleted"); + function onWorkScheduled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkScheduled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + __name(onWorkScheduled, "onWorkScheduled"); + function onWorkStarted(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkStarted(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + __name(onWorkStarted, "onWorkStarted"); + function onWorkStopped(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkStopped(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + __name(onWorkStopped, "onWorkStopped"); + function onWorkCanceled(interactions, threadID) { + var didCatchError = false; + var caughtError = null; + subscribers.forEach(function(subscriber) { + try { + subscriber.onWorkCanceled(interactions, threadID); + } catch (error) { + if (!didCatchError) { + didCatchError = true; + caughtError = error; + } + } + }); + if (didCatchError) { + throw caughtError; + } + } + __name(onWorkCanceled, "onWorkCanceled"); + exports.unstable_clear = unstable_clear; + exports.unstable_getCurrent = unstable_getCurrent; + exports.unstable_getThreadID = unstable_getThreadID; + exports.unstable_subscribe = unstable_subscribe; + exports.unstable_trace = unstable_trace; + exports.unstable_unsubscribe = unstable_unsubscribe; + exports.unstable_wrap = unstable_wrap; + })(); + } + } + }); + + // node_modules/scheduler/tracing.js + var require_tracing = __commonJS({ + "node_modules/scheduler/tracing.js"(exports, module) { + "use strict"; + if (false) { + module.exports = null; + } else { + module.exports = require_scheduler_tracing_development(); + } + } + }); + + // node_modules/react-dom/cjs/react-dom.development.js + var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var React54 = require_react(); + var _assign = require_object_assign(); + var Scheduler = require_scheduler(); + var tracing = require_tracing(); + var ReactSharedInternals = React54.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function warn(format2) { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format2, args); + } + } + __name(warn, "warn"); + function error(format2) { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format2, args); + } + } + __name(error, "error"); + function printWarning(level, format2, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format2 += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return "" + item; + }); + argsWithFormat.unshift("Warning: " + format2); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + __name(printWarning, "printWarning"); + if (!React54) { + { + throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM."); + } + } + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; + var HostRoot = 3; + var HostPortal = 4; + var HostComponent = 5; + var HostText = 6; + var Fragment5 = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var FundamentalComponent = 20; + var ScopeComponent = 21; + var Block = 22; + var OffscreenComponent = 23; + var LegacyHiddenComponent = 24; + var enableProfilerTimer = true; + var enableFundamentalAPI = false; + var enableNewReconciler = false; + var warnAboutStringRefs = false; + var allNativeEvents = new Set(); + var registrationNameDependencies = {}; + var possibleRegistrationNames = {}; + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + __name(registerTwoPhaseEvent, "registerTwoPhaseEvent"); + function registerDirectEvent(registrationName, dependencies) { + { + if (registrationNameDependencies[registrationName]) { + error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); + } + } + registrationNameDependencies[registrationName] = dependencies; + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + if (registrationName === "onDoubleClick") { + possibleRegistrationNames.ondblclick = registrationName; + } + } + for (var i = 0; i < dependencies.length; i++) { + allNativeEvents.add(dependencies[i]); + } + } + __name(registerDirectEvent, "registerDirectEvent"); + var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); + var RESERVED = 0; + var STRING = 1; + var BOOLEANISH_STRING = 2; + var BOOLEAN = 3; + var OVERLOADED_BOOLEAN = 4; + var NUMERIC = 5; + var POSITIVE_NUMERIC = 6; + var ATTRIBUTE_NAME_START_CHAR = ":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"; + var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var ROOT_ATTRIBUTE_NAME = "data-reactroot"; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { + return true; + } + if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + { + error("Invalid attribute name: `%s`", attributeName); + } + return false; + } + __name(isAttributeNameSafe, "isAttributeNameSafe"); + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + if (isCustomComponentTag) { + return false; + } + if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { + return true; + } + return false; + } + __name(shouldIgnoreAttribute, "shouldIgnoreAttribute"); + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + switch (typeof value) { + case "function": + case "symbol": + return true; + case "boolean": { + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix2 = name.toLowerCase().slice(0, 5); + return prefix2 !== "data-" && prefix2 !== "aria-"; + } + } + default: + return false; + } + } + __name(shouldRemoveAttributeWithWarning, "shouldRemoveAttributeWithWarning"); + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === "undefined") { + return true; + } + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + case OVERLOADED_BOOLEAN: + return value === false; + case NUMERIC: + return isNaN(value); + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + return false; + } + __name(shouldRemoveAttribute, "shouldRemoveAttribute"); + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + __name(getPropertyInfo, "getPropertyInfo"); + function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { + this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL2; + this.removeEmptyString = removeEmptyString; + } + __name(PropertyInfoRecord, "PropertyInfoRecord"); + var properties = {}; + var reservedProps = [ + "children", + "dangerouslySetInnerHTML", + "defaultValue", + "defaultChecked", + "innerHTML", + "suppressContentEditableWarning", + "suppressHydrationWarning", + "style" + ]; + reservedProps.forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false); + }); + [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { + var name = _ref[0], attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false); + }); + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false); + }); + [ + "allowFullScreen", + "async", + "autoFocus", + "autoPlay", + "controls", + "default", + "defer", + "disabled", + "disablePictureInPicture", + "disableRemotePlayback", + "formNoValidate", + "hidden", + "loop", + "noModule", + "noValidate", + "open", + "playsInline", + "readOnly", + "required", + "reversed", + "scoped", + "seamless", + "itemScope" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false); + }); + [ + "checked", + "multiple", + "muted", + "selected" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false); + }); + [ + "capture", + "download" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false); + }); + [ + "cols", + "rows", + "size", + "span" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false); + }); + ["rowSpan", "start"].forEach(function(name) { + properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + var capitalize = /* @__PURE__ */ __name(function(token) { + return token[1].toUpperCase(); + }, "capitalize"); + [ + "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" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); + }); + [ + "xlink:actuate", + "xlink:arcrole", + "xlink:role", + "xlink:show", + "xlink:title", + "xlink:type" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/1999/xlink", false, false); + }); + [ + "xml:base", + "xml:lang", + "xml:space" + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/XML/1998/namespace", false, false); + }); + ["tabIndex", "crossOrigin"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false); + }); + var xlinkHref = "xlinkHref"; + properties[xlinkHref] = new PropertyInfoRecord("xlinkHref", STRING, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false); + ["src", "href", "action", "formAction"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true); + }); + var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + function sanitizeURL(url) { + { + if (!didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); + } + } + } + __name(sanitizeURL, "sanitizeURL"); + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + if (propertyInfo.sanitizeURL) { + sanitizeURL("" + expected); + } + var attributeName = propertyInfo.attributeName; + var stringValue = null; + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + if (value === "") { + return true; + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + if (value === "" + expected) { + return expected; + } + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return node.getAttribute(attributeName); + } + if (propertyInfo.type === BOOLEAN) { + return expected; + } + stringValue = node.getAttribute(attributeName); + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === "" + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + __name(getValueForProperty, "getValueForProperty"); + function getValueForAttribute(node, name, expected) { + { + if (!isAttributeNameSafe(name)) { + return; + } + if (isOpaqueHydratingObject(expected)) { + return expected; + } + if (!node.hasAttribute(name)) { + return expected === void 0 ? void 0 : null; + } + var value = node.getAttribute(name); + if (value === "" + expected) { + return expected; + } + return value; + } + } + __name(getValueForAttribute, "getValueForAttribute"); + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + if (value === null) { + node.removeAttribute(_attributeName); + } else { + node.setAttribute(_attributeName, "" + value); + } + } + return; + } + var mustUseProperty = propertyInfo.mustUseProperty; + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ""; + } else { + node[propertyName] = value; + } + return; + } + var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { + attributeValue = ""; + } else { + { + attributeValue = "" + value; + } + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + if (attributeNamespace) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } else { + node.setAttribute(attributeName, attributeValue); + } + } + } + __name(setValueForProperty, "setValueForProperty"); + var REACT_ELEMENT_TYPE = 60103; + var REACT_PORTAL_TYPE = 60106; + var REACT_FRAGMENT_TYPE = 60107; + var REACT_STRICT_MODE_TYPE = 60108; + var REACT_PROFILER_TYPE = 60114; + var REACT_PROVIDER_TYPE = 60109; + var REACT_CONTEXT_TYPE = 60110; + var REACT_FORWARD_REF_TYPE = 60112; + var REACT_SUSPENSE_TYPE = 60113; + var REACT_SUSPENSE_LIST_TYPE = 60120; + var REACT_MEMO_TYPE = 60115; + var REACT_LAZY_TYPE = 60116; + var REACT_BLOCK_TYPE = 60121; + var REACT_SERVER_BLOCK_TYPE = 60122; + var REACT_FUNDAMENTAL_TYPE = 60117; + var REACT_SCOPE_TYPE = 60119; + var REACT_OPAQUE_ID_TYPE = 60128; + var REACT_DEBUG_TRACING_MODE_TYPE = 60129; + var REACT_OFFSCREEN_TYPE = 60130; + var REACT_LEGACY_HIDDEN_TYPE = 60131; + if (typeof Symbol === "function" && Symbol.for) { + var symbolFor = Symbol.for; + REACT_ELEMENT_TYPE = symbolFor("react.element"); + REACT_PORTAL_TYPE = symbolFor("react.portal"); + REACT_FRAGMENT_TYPE = symbolFor("react.fragment"); + REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode"); + REACT_PROFILER_TYPE = symbolFor("react.profiler"); + REACT_PROVIDER_TYPE = symbolFor("react.provider"); + REACT_CONTEXT_TYPE = symbolFor("react.context"); + REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); + REACT_SUSPENSE_TYPE = symbolFor("react.suspense"); + REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); + REACT_MEMO_TYPE = symbolFor("react.memo"); + REACT_LAZY_TYPE = symbolFor("react.lazy"); + REACT_BLOCK_TYPE = symbolFor("react.block"); + REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); + REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); + REACT_SCOPE_TYPE = symbolFor("react.scope"); + REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); + REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); + REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); + REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); + } + var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + __name(getIteratorFn, "getIteratorFn"); + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + __name(disabledLog, "disabledLog"); + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + __name(disableLogs, "disableLogs"); + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: _assign({}, props, { + value: prevLog + }), + info: _assign({}, props, { + value: prevInfo + }), + warn: _assign({}, props, { + value: prevWarn + }), + error: _assign({}, props, { + value: prevError + }), + group: _assign({}, props, { + value: prevGroup + }), + groupCollapsed: _assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: _assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + __name(reenableLogs, "reenableLogs"); + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match2 = x.stack.trim().match(/\n( *(at )?)/); + prefix = match2 && match2[1] || ""; + } + } + return "\n" + prefix + name; + } + } + __name(describeBuiltInComponentFrame, "describeBuiltInComponentFrame"); + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn2, construct) { + if (!fn2 || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn2); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = /* @__PURE__ */ __name(function() { + throw Error(); + }, "Fake"); + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn2, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn2.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn2(); + } + } catch (sample) { + if (sample && control && typeof sample.stack === "string") { + var sampleLines = sample.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn2 ? fn2.displayName || fn2.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn2 === "function") { + componentFrameCache.set(fn2, syntheticFrame); + } + } + return syntheticFrame; + } + __name(describeNativeComponentFrame, "describeNativeComponentFrame"); + function describeClassComponentFrame(ctor, source, ownerFn) { + { + return describeNativeComponentFrame(ctor, true); + } + } + __name(describeClassComponentFrame, "describeClassComponentFrame"); + function describeFunctionComponentFrame(fn2, source, ownerFn) { + { + return describeNativeComponentFrame(fn2, false); + } + } + __name(describeFunctionComponentFrame, "describeFunctionComponentFrame"); + function shouldConstruct(Component14) { + var prototype = Component14.prototype; + return !!(prototype && prototype.isReactComponent); + } + __name(shouldConstruct, "shouldConstruct"); + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_BLOCK_TYPE: + return describeFunctionComponentFrame(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + __name(describeUnknownElementTypeFrameInDEV, "describeUnknownElementTypeFrameInDEV"); + function describeFiber(fiber) { + var owner = fiber._debugOwner ? fiber._debugOwner.type : null; + var source = fiber._debugSource; + switch (fiber.tag) { + case HostComponent: + return describeBuiltInComponentFrame(fiber.type); + case LazyComponent: + return describeBuiltInComponentFrame("Lazy"); + case SuspenseComponent: + return describeBuiltInComponentFrame("Suspense"); + case SuspenseListComponent: + return describeBuiltInComponentFrame("SuspenseList"); + case FunctionComponent: + case IndeterminateComponent: + case SimpleMemoComponent: + return describeFunctionComponentFrame(fiber.type); + case ForwardRef: + return describeFunctionComponentFrame(fiber.type.render); + case Block: + return describeFunctionComponentFrame(fiber.type._render); + case ClassComponent: + return describeClassComponentFrame(fiber.type); + default: + return ""; + } + } + __name(describeFiber, "describeFiber"); + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = ""; + var node = workInProgress2; + do { + info += describeFiber(node); + node = node.return; + } while (node); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + __name(getStackByFiberInDevAndProd, "getStackByFiberInDevAndProd"); + function getWrappedName(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + __name(getWrappedName, "getWrappedName"); + function getContextName(type) { + return type.displayName || "Context"; + } + __name(getContextName, "getContextName"); + function getComponentName(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + return getComponentName(type.type); + case REACT_BLOCK_TYPE: + return getComponentName(type._render); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentName(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + __name(getComponentName, "getComponentName"); + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var current = null; + var isRendering = false; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + var owner = current._debugOwner; + if (owner !== null && typeof owner !== "undefined") { + return getComponentName(owner.type); + } + } + return null; + } + __name(getCurrentFiberOwnerNameInDevOrNull, "getCurrentFiberOwnerNameInDevOrNull"); + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ""; + } + return getStackByFiberInDevAndProd(current); + } + } + __name(getCurrentFiberStackInDev, "getCurrentFiberStackInDev"); + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + isRendering = false; + } + } + __name(resetCurrentFiber, "resetCurrentFiber"); + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; + current = fiber; + isRendering = false; + } + } + __name(setCurrentFiber, "setCurrentFiber"); + function setIsRendering(rendering) { + { + isRendering = rendering; + } + } + __name(setIsRendering, "setIsRendering"); + function getIsRendering() { + { + return isRendering; + } + } + __name(getIsRendering, "getIsRendering"); + function toString(value) { + return "" + value; + } + __name(toString, "toString"); + function getToStringValue(value) { + switch (typeof value) { + case "boolean": + case "number": + case "object": + case "string": + case "undefined": + return value; + default: + return ""; + } + } + __name(getToStringValue, "getToStringValue"); + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true + }; + function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); + } + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); + } + } + } + __name(checkControlledValueProps, "checkControlledValueProps"); + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); + } + __name(isCheckable, "isCheckable"); + function getTracker(node) { + return node._valueTracker; + } + __name(getTracker, "getTracker"); + function detachTracker(node) { + node._valueTracker = null; + } + __name(detachTracker, "detachTracker"); + function getValueFromNode(node) { + var value = ""; + if (!node) { + return value; + } + if (isCheckable(node)) { + value = node.checked ? "true" : "false"; + } else { + value = node.value; + } + return value; + } + __name(getValueFromNode, "getValueFromNode"); + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? "checked" : "value"; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + var currentValue = "" + node[valueField]; + if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { + return; + } + var get2 = descriptor.get, set2 = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function() { + return get2.call(this); + }, + set: function(value) { + currentValue = "" + value; + set2.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + var tracker = { + getValue: function() { + return currentValue; + }, + setValue: function(value) { + currentValue = "" + value; + }, + stopTracking: function() { + detachTracker(node); + delete node[valueField]; + } + }; + return tracker; + } + __name(trackValueOnNode, "trackValueOnNode"); + function track(node) { + if (getTracker(node)) { + return; + } + node._valueTracker = trackValueOnNode(node); + } + __name(track, "track"); + function updateValueIfChanged(node) { + if (!node) { + return false; + } + var tracker = getTracker(node); + if (!tracker) { + return true; + } + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + return false; + } + __name(updateValueIfChanged, "updateValueIfChanged"); + function getActiveElement(doc) { + doc = doc || (typeof document !== "undefined" ? document : void 0); + if (typeof doc === "undefined") { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + __name(getActiveElement, "getActiveElement"); + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + function isControlled(props) { + var usesChecked = props.type === "checkbox" || props.type === "radio"; + return usesChecked ? props.checked != null : props.value != null; + } + __name(isControlled, "isControlled"); + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + var hostProps = _assign({}, props, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: checked != null ? checked : node._wrapperState.initialChecked + }); + return hostProps; + } + __name(getHostProps, "getHostProps"); + function initWrapperState(element, props) { + { + checkControlledValueProps("input", props); + if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { + error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnCheckedDefaultChecked = true; + } + if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { + error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnValueDefaultValue = true; + } + } + var node = element; + var defaultValue = props.defaultValue == null ? "" : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props) + }; + } + __name(initWrapperState, "initWrapperState"); + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + if (checked != null) { + setValueForProperty(node, "checked", checked, false); + } + } + __name(updateChecked, "updateChecked"); + function updateWrapper(element, props) { + var node = element; + { + var controlled = isControlled(props); + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnUncontrolledToControlled = true; + } + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnControlledToUncontrolled = true; + } + } + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + if (value != null) { + if (type === "number") { + if (value === 0 && node.value === "" || node.value != value) { + node.value = toString(value); + } + } else if (node.value !== toString(value)) { + node.value = toString(value); + } + } else if (type === "submit" || type === "reset") { + node.removeAttribute("value"); + return; + } + { + if (props.hasOwnProperty("value")) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty("defaultValue")) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + { + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + __name(updateWrapper, "updateWrapper"); + function postMountWrapper(element, props, isHydrating2) { + var node = element; + if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { + var type = props.type; + var isButton = type === "submit" || type === "reset"; + if (isButton && (props.value === void 0 || props.value === null)) { + return; + } + var initialValue = toString(node._wrapperState.initialValue); + if (!isHydrating2) { + { + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + { + node.defaultValue = initialValue; + } + } + var name = node.name; + if (name !== "") { + node.name = ""; + } + { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + if (name !== "") { + node.name = name; + } + } + __name(postMountWrapper, "postMountWrapper"); + function restoreControlledState(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + __name(restoreControlledState, "restoreControlledState"); + function updateNamedCousins(rootNode, props) { + var name = props.name; + if (props.type === "radio" && name != null) { + var queryRoot = rootNode; + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + var otherProps = getFiberCurrentPropsFromNode(otherNode); + if (!otherProps) { + { + throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); + } + } + updateValueIfChanged(otherNode); + updateWrapper(otherNode, otherProps); + } + } + } + __name(updateNamedCousins, "updateNamedCousins"); + function setDefaultValue(node, type, value) { + if (type !== "number" || getActiveElement(node.ownerDocument) !== node) { + if (value == null) { + node.defaultValue = toString(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString(value)) { + node.defaultValue = toString(value); + } + } + } + __name(setDefaultValue, "setDefaultValue"); + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + function flattenChildren(children) { + var content = ""; + React54.Children.forEach(children, function(child) { + if (child == null) { + return; + } + content += child; + }); + return content; + } + __name(flattenChildren, "flattenChildren"); + function validateProps(element, props) { + { + if (typeof props.children === "object" && props.children !== null) { + React54.Children.forEach(props.children, function(child) { + if (child == null) { + return; + } + if (typeof child === "string" || typeof child === "number") { + return; + } + if (typeof child.type !== "string") { + return; + } + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + error("Only strings and numbers are supported as