@redocly/openapi-docs 3.0.0-alpha.57.patch.1 → 3.0.0-alpha.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/console.redocly-openapi-docs.min.js +217 -158
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-openapi-docs.min.js +5003 -5873
- package/lib/components/Callbacks/CallbackSummary.js +1 -1
- package/lib/components/Download/DownloadButtonWithLabel.js +14 -6
- package/lib/components/DropdownOrLabel/DropdownOrLabel.js +3 -3
- package/lib/components/Endpoint/Summary.js +1 -1
- package/lib/components/Endpoint/styled.js +4 -4
- package/lib/components/Fields/FieldDetails.js +1 -1
- package/lib/components/NextSectionButton/NextSectionButton.js +1 -1
- package/lib/components/Panel/CodeHeader.js +2 -5
- package/lib/components/Panel/CodePanel.js +5 -1
- package/lib/components/Parameters/ParametersGroup.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +2 -2
- package/lib/components/Search/styled.js +1 -3
- package/lib/components/SecurityRequirement/RequirementElement.js +1 -1
- package/lib/components/SecurityRequirement/SecurityRequirement.js +1 -1
- package/lib/components/SideMenu/MenuItem.js +1 -1
- package/lib/components/SideMenu/MenuOperationItemContent.js +1 -1
- package/lib/components/SourceCodeWithFile/SourceCodeWithFile.js +1 -1
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabList.js +2 -10
- package/lib/components/Tabs/Tab.js +12 -8
- package/lib/components/common/CheckboxList.js +3 -3
- package/lib/components/common/Dropdown/Dropdown.js +3 -3
- package/lib/components/common/Dropdown/styled.js +23 -11
- package/lib/components/common/Dropdown/types.d.ts +1 -0
- package/lib/components/common/Fields/fields-layout.js +3 -3
- package/lib/components/common/Fields/fields.d.ts +0 -1
- package/lib/components/common/Fields/fields.js +7 -11
- package/lib/components/common/form.js +4 -4
- package/lib/components/common/headers.js +1 -1
- package/lib/components/common/panels.js +1 -1
- package/lib/components/icons/LinkIcon.js +1 -1
- package/lib/components/pluggable/styled.components.js +0 -1
- package/lib/components/rightPanel/ActionPanel.js +1 -1
- package/lib/components/rightPanel/CodemirrorInput/styled.js +10 -14
- package/lib/components/rightPanel/ConsoleTabs/styled.js +16 -6
- package/lib/components/rightPanel/OAuth2Flow/OAuth2Flow.js +1 -1
- package/lib/components/rightPanel/ParameterArray.js +1 -1
- package/lib/components/rightPanel/ResponsePanel.js +1 -1
- package/lib/components/rightPanel/TryItPanel.js +3 -3
- package/lib/components/rightPanel/styled.d.ts +1 -0
- package/lib/components/rightPanel/styled.js +26 -6
- package/lib/components/shared/HttpVerb.d.ts +6 -2
- package/lib/components/shared/HttpVerb.js +3 -2
- package/lib/components/shared/MimeLabel.js +5 -4
- package/lib/components/shared/NoSampleLabel.js +1 -1
- package/lib/services/OAuth2.js +1 -1
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/index.js +1 -1
- package/lib/services/history/helpers.js +1 -1
- package/lib-esm/components/Callbacks/CallbackSummary.js +1 -1
- package/lib-esm/components/Download/DownloadButtonWithLabel.js +14 -6
- package/lib-esm/components/DropdownOrLabel/DropdownOrLabel.js +1 -1
- package/lib-esm/components/Endpoint/Summary.js +1 -1
- package/lib-esm/components/Endpoint/styled.js +4 -4
- package/lib-esm/components/Fields/FieldDetails.js +1 -1
- package/lib-esm/components/NextSectionButton/NextSectionButton.js +1 -1
- package/lib-esm/components/Panel/CodeHeader.js +2 -5
- package/lib-esm/components/Panel/CodePanel.js +5 -1
- package/lib-esm/components/Parameters/ParametersGroup.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +2 -2
- package/lib-esm/components/Search/styled.js +1 -3
- package/lib-esm/components/SecurityRequirement/RequirementElement.js +1 -1
- package/lib-esm/components/SecurityRequirement/SecurityRequirement.js +1 -1
- package/lib-esm/components/SideMenu/MenuItem.js +1 -1
- package/lib-esm/components/SideMenu/MenuOperationItemContent.js +2 -2
- package/lib-esm/components/SourceCodeWithFile/SourceCodeWithFile.js +1 -1
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +3 -3
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabList.js +1 -9
- package/lib-esm/components/Tabs/Tab.js +11 -7
- package/lib-esm/components/common/CheckboxList.js +3 -3
- package/lib-esm/components/common/Dropdown/Dropdown.js +2 -2
- package/lib-esm/components/common/Dropdown/styled.js +22 -10
- package/lib-esm/components/common/Dropdown/types.d.ts +1 -0
- package/lib-esm/components/common/Fields/fields-layout.js +2 -2
- package/lib-esm/components/common/Fields/fields.d.ts +0 -1
- package/lib-esm/components/common/Fields/fields.js +4 -8
- package/lib-esm/components/common/form.js +4 -4
- package/lib-esm/components/common/headers.js +1 -1
- package/lib-esm/components/common/panels.js +1 -1
- package/lib-esm/components/icons/LinkIcon.js +1 -1
- package/lib-esm/components/pluggable/styled.components.js +0 -1
- package/lib-esm/components/rightPanel/ActionPanel.js +1 -1
- package/lib-esm/components/rightPanel/CodemirrorInput/styled.js +10 -14
- package/lib-esm/components/rightPanel/ConsoleTabs/styled.js +15 -5
- package/lib-esm/components/rightPanel/OAuth2Flow/OAuth2Flow.js +1 -1
- package/lib-esm/components/rightPanel/ParameterArray.js +1 -1
- package/lib-esm/components/rightPanel/ResponsePanel.js +2 -2
- package/lib-esm/components/rightPanel/TryItPanel.js +3 -3
- package/lib-esm/components/rightPanel/styled.d.ts +1 -0
- package/lib-esm/components/rightPanel/styled.js +22 -2
- package/lib-esm/components/shared/HttpVerb.d.ts +6 -2
- package/lib-esm/components/shared/HttpVerb.js +3 -2
- package/lib-esm/components/shared/MimeLabel.js +4 -3
- package/lib-esm/components/shared/NoSampleLabel.js +1 -1
- package/lib-esm/services/OAuth2.js +1 -1
- package/lib-esm/services/code-samples/generator.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/index.js +1 -1
- package/lib-esm/services/history/helpers.js +1 -1
- package/package.json +4 -5
|
@@ -2,113 +2,113 @@
|
|
|
2
2
|
* Redocly OpenAPI Docs
|
|
3
3
|
* (c) Copyright 2018 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: "3.0.0-alpha.
|
|
6
|
-
*/(this.webpackChunkRedoclyOpenAPIDocs=this.webpackChunkRedoclyOpenAPIDocs||[]).push([[290],{29641:(
|
|
7
|
-
`;M.replaceSelection(j+j,null),re(M,-1),F=M.listSelections();for(var ie=0;ie<F.length;ie++){var U=F[ie].head.line;M.indentLine(U,null,!0),M.indentLine(U+1,null,!0)}})}function re(M,S){for(var L=[],F=M.listSelections(),K=0,te=0;te<F.length;te++){var j=F[te];j.head==M.getCursor()&&(K=te);var ie=j.head.ch||S>0?{line:j.head.line,ch:j.head.ch+S}:{line:j.head.line-1};L.push({anchor:ie,head:ie})}M.setSelections(L,K)}function se(M){var S=v.cmpPos(M.anchor,M.head)>0;return{anchor:new O(M.anchor.line,M.anchor.ch+(S?-1:1)),head:new O(M.head.line,M.head.ch+(S?1:-1))}}function V(M,S){var L=Z(M);if(!L||M.getOption("disableInput"))return v.Pass;var F=P(L,"pairs"),K=F.indexOf(S);if(K==-1)return v.Pass;for(var te=P(L,"closeBefore"),j=P(L,"triples"),ie=F.charAt(K+1)==S,U=M.listSelections(),Y=K%2==0,ce,ge=0;ge<U.length;ge++){var G=U[ge],ve=G.head,ee,He=M.getRange(ve,O(ve.line,ve.ch+1));if(Y&&!G.empty())ee="surround";else if((ie||!Y)&&He==S)ie&&J(M,ve)?ee="both":j.indexOf(S)>=0&&M.getRange(ve,O(ve.line,ve.ch+3))==S+S+S?ee="skipThree":ee="skip";else if(ie&&ve.ch>1&&j.indexOf(S)>=0&&M.getRange(O(ve.line,ve.ch-2),ve)==S+S){if(ve.ch>2&&/\bstring/.test(M.getTokenTypeAt(O(ve.line,ve.ch-2))))return v.Pass;ee="addFour"}else if(ie){var Ve=ve.ch==0?" ":M.getRange(O(ve.line,ve.ch-1),ve);if(!v.isWordChar(He)&&Ve!=S&&!v.isWordChar(Ve))ee="both";else return v.Pass}else if(Y&&(He.length===0||/\s/.test(He)||te.indexOf(He)>-1))ee="both";else return v.Pass;if(!ce)ce=ee;else if(ce!=ee)return v.Pass}var ze=K%2?F.charAt(K-1):S,ct=K%2?S:F.charAt(K+1);M.operation(function(){if(ce=="skip")re(M,1);else if(ce=="skipThree")re(M,3);else if(ce=="surround"){for(var ut=M.getSelections(),ot=0;ot<ut.length;ot++)ut[ot]=ze+ut[ot]+ct;M.replaceSelections(ut,"around"),ut=M.listSelections().slice();for(var ot=0;ot<ut.length;ot++)ut[ot]=se(ut[ot]);M.setSelections(ut)}else ce=="both"?(M.replaceSelection(ze+ct,null),M.triggerElectric(ze+ct),re(M,-1)):ce=="addFour"&&(M.replaceSelection(ze+ze+ze+ze,"before"),re(M,1))})}function T(M,S){var L=M.getRange(O(S.line,S.ch-1),O(S.line,S.ch+1));return L.length==2?L:null}function J(M,S){var L=M.getTokenAt(O(S.line,S.ch+1));return/\bstring/.test(L.type)&&L.start==S.ch&&(S.ch==0||!/\bstring/.test(M.getTokenTypeAt(S)))}})},82518:(x,N,f)=>{(function(v){v(f(46944))})(function(v){var C=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),O=v.Pos,P={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function D(re){return re&&re.bracketRegex||/[(){}[\]]/}function R(re,se,V){var T=re.getLineHandle(se.line),J=se.ch-1,M=V&&V.afterCursor;M==null&&(M=/(^| )cm-fat-cursor($| )/.test(re.getWrapperElement().className));var S=D(V),L=!M&&J>=0&&S.test(T.text.charAt(J))&&P[T.text.charAt(J)]||S.test(T.text.charAt(J+1))&&P[T.text.charAt(++J)];if(!L)return null;var F=L.charAt(1)==">"?1:-1;if(V&&V.strict&&F>0!=(J==se.ch))return null;var K=re.getTokenTypeAt(O(se.line,J+1)),te=_(re,O(se.line,J+(F>0?1:0)),F,K,V);return te==null?null:{from:O(se.line,J),to:te&&te.pos,match:te&&te.ch==L.charAt(0),forward:F>0}}function _(re,se,V,T,J){for(var M=J&&J.maxScanLineLength||1e4,S=J&&J.maxScanLines||1e3,L=[],F=D(J),K=V>0?Math.min(se.line+S,re.lastLine()+1):Math.max(re.firstLine()-1,se.line-S),te=se.line;te!=K;te+=V){var j=re.getLine(te);if(j){var ie=V>0?0:j.length-1,U=V>0?j.length:-1;if(!(j.length>M))for(te==se.line&&(ie=se.ch-(V<0?1:0));ie!=U;ie+=V){var Y=j.charAt(ie);if(F.test(Y)&&(T===void 0||(re.getTokenTypeAt(O(te,ie+1))||"")==(T||""))){var ce=P[Y];if(ce&&ce.charAt(1)==">"==V>0)L.push(Y);else if(L.length)L.pop();else return{pos:O(te,ie),ch:Y}}}}}return te-V==(V>0?re.lastLine():re.firstLine())?!1:null}function Z(re,se,V){for(var T=re.state.matchBrackets.maxHighlightLineLength||1e3,J=V&&V.highlightNonMatching,M=[],S=re.listSelections(),L=0;L<S.length;L++){var F=S[L].empty()&&R(re,S[L].head,V);if(F&&(F.match||J!==!1)&&re.getLine(F.from.line).length<=T){var K=F.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";M.push(re.markText(F.from,O(F.from.line,F.from.ch+1),{className:K})),F.to&&re.getLine(F.to.line).length<=T&&M.push(re.markText(F.to,O(F.to.line,F.to.ch+1),{className:K}))}}if(M.length){C&&re.state.focused&&re.focus();var te=function(){re.operation(function(){for(var j=0;j<M.length;j++)M[j].clear()})};if(se)setTimeout(te,800);else return te}}function q(re){re.operation(function(){re.state.matchBrackets.currentlyHighlighted&&(re.state.matchBrackets.currentlyHighlighted(),re.state.matchBrackets.currentlyHighlighted=null),re.state.matchBrackets.currentlyHighlighted=Z(re,!1,re.state.matchBrackets)})}function he(re){re.state.matchBrackets&&re.state.matchBrackets.currentlyHighlighted&&(re.state.matchBrackets.currentlyHighlighted(),re.state.matchBrackets.currentlyHighlighted=null)}v.defineOption("matchBrackets",!1,function(re,se,V){V&&V!=v.Init&&(re.off("cursorActivity",q),re.off("focus",q),re.off("blur",he),he(re)),se&&(re.state.matchBrackets=typeof se=="object"?se:{},re.on("cursorActivity",q),re.on("focus",q),re.on("blur",he))}),v.defineExtension("matchBrackets",function(){Z(this,!0)}),v.defineExtension("findMatchingBracket",function(re,se,V){return(V||typeof se=="boolean")&&(V?(V.strict=se,se=V):se=se?{strict:!0}:null),R(this,re,se)}),v.defineExtension("scanForBracket",function(re,se,V,T){return _(this,re,se,V,T)})})},77436:(x,N,f)=>{(function(v){v(f(46944))})(function(v){"use strict";var C="CodeMirror-hint",O="CodeMirror-hint-active";v.showHint=function(M,S,L){if(!S)return M.showHint(L);L&&L.async&&(S.async=!0);var F={hint:S};if(L)for(var K in L)F[K]=L[K];return M.showHint(F)},v.defineExtension("showHint",function(M){M=_(this,this.getCursor("start"),M);var S=this.listSelections();if(!(S.length>1)){if(this.somethingSelected()){if(!M.hint.supportsSelection)return;for(var L=0;L<S.length;L++)if(S[L].head.line!=S[L].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var F=this.state.completionActive=new P(this,M);F.options.hint&&(v.signal(this,"startCompletion",this),F.update(!0))}}),v.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function P(M,S){if(this.cm=M,this.options=S,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var L=this;M.on("cursorActivity",this.activityFunc=function(){L.cursorActivity()})}}var D=window.requestAnimationFrame||function(M){return setTimeout(M,1e3/60)},R=window.cancelAnimationFrame||clearTimeout;P.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&v.signal(this.data,"close"),this.widget&&this.widget.close(),v.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(M,S){var L=M.list[S],F=this;this.cm.operation(function(){L.hint?L.hint(F.cm,M,L):F.cm.replaceRange(Z(L),L.from||M.from,L.to||M.to,"complete"),v.signal(M,"pick",L),F.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(R(this.debounce),this.debounce=0);var M=this.startPos;this.data&&(M=this.data.from);var S=this.cm.getCursor(),L=this.cm.getLine(S.line);if(S.line!=this.startPos.line||L.length-S.ch!=this.startLen-this.startPos.ch||S.ch<M.ch||this.cm.somethingSelected()||!S.ch||this.options.closeCharacters.test(L.charAt(S.ch-1)))this.close();else{var F=this;this.debounce=D(function(){F.update()}),this.widget&&this.widget.disable()}},update:function(M){if(this.tick!=null){var S=this,L=++this.tick;V(this.options.hint,this.cm,this.options,function(F){S.tick==L&&S.finishUpdate(F,M)})}},finishUpdate:function(M,S){this.data&&v.signal(this.data,"update");var L=this.widget&&this.widget.picked||S&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=M,M&&M.list.length&&(L&&M.list.length==1?this.pick(M,0):(this.widget=new re(this,M),v.signal(M,"shown")))}};function _(M,S,L){var F=M.options.hintOptions,K={};for(var te in J)K[te]=J[te];if(F)for(var te in F)F[te]!==void 0&&(K[te]=F[te]);if(L)for(var te in L)L[te]!==void 0&&(K[te]=L[te]);return K.hint.resolve&&(K.hint=K.hint.resolve(M,S)),K}function Z(M){return typeof M=="string"?M:M.text}function q(M,S){var L={Up:function(){S.moveFocus(-1)},Down:function(){S.moveFocus(1)},PageUp:function(){S.moveFocus(-S.menuSize()+1,!0)},PageDown:function(){S.moveFocus(S.menuSize()-1,!0)},Home:function(){S.setFocus(0)},End:function(){S.setFocus(S.length-1)},Enter:S.pick,Tab:S.pick,Esc:S.close},F=/Mac/.test(navigator.platform);F&&(L["Ctrl-P"]=function(){S.moveFocus(-1)},L["Ctrl-N"]=function(){S.moveFocus(1)});var K=M.options.customKeys,te=K?{}:L;function j(Y,ce){var ge;typeof ce!="string"?ge=function(G){return ce(G,S)}:L.hasOwnProperty(ce)?ge=L[ce]:ge=ce,te[Y]=ge}if(K)for(var ie in K)K.hasOwnProperty(ie)&&j(ie,K[ie]);var U=M.options.extraKeys;if(U)for(var ie in U)U.hasOwnProperty(ie)&&j(ie,U[ie]);return te}function he(M,S){for(;S&&S!=M;){if(S.nodeName.toUpperCase()==="LI"&&S.parentNode==M)return S;S=S.parentNode}}function re(M,S){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=M,this.data=S,this.picked=!1;var L=this,F=M.cm,K=F.getInputField().ownerDocument,te=K.defaultView||K.parentWindow,j=this.hints=K.createElement("ul");j.setAttribute("role","listbox"),j.setAttribute("aria-expanded","true"),j.id=this.id;var ie=M.cm.options.theme;j.className="CodeMirror-hints "+ie,this.selectedHint=S.selectedHint||0;for(var U=S.list,Y=0;Y<U.length;++Y){var ce=j.appendChild(K.createElement("li")),ge=U[Y],G=C+(Y!=this.selectedHint?"":" "+O);ge.className!=null&&(G=ge.className+" "+G),ce.className=G,Y==this.selectedHint&&ce.setAttribute("aria-selected","true"),ce.id=this.id+"-"+Y,ce.setAttribute("role","option"),ge.render?ge.render(ce,S,ge):ce.appendChild(K.createTextNode(ge.displayText||Z(ge))),ce.hintId=Y}var ve=M.options.container||K.body,ee=F.cursorCoords(M.options.alignWithWord?S.from:null),He=ee.left,Ve=ee.bottom,ze=!0,ct=0,ut=0;if(ve!==K.body){var ot=["absolute","relative","fixed"].indexOf(te.getComputedStyle(ve).position)!==-1,Xt=ot?ve:ve.offsetParent,dt=Xt.getBoundingClientRect(),At=K.body.getBoundingClientRect();ct=dt.left-At.left-Xt.scrollLeft,ut=dt.top-At.top-Xt.scrollTop}j.style.left=He-ct+"px",j.style.top=Ve-ut+"px";var nt=te.innerWidth||Math.max(K.body.offsetWidth,K.documentElement.offsetWidth),Ue=te.innerHeight||Math.max(K.body.offsetHeight,K.documentElement.offsetHeight);ve.appendChild(j),F.getInputField().setAttribute("aria-autocomplete","list"),F.getInputField().setAttribute("aria-owns",this.id),F.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var Fe=M.options.moveOnOverlap?j.getBoundingClientRect():new DOMRect,Be=M.options.paddingForScrollbar?j.scrollHeight>j.clientHeight+1:!1,it;setTimeout(function(){it=F.getScrollInfo()});var Dt=Fe.bottom-Ue;if(Dt>0){var qe=Fe.bottom-Fe.top,xt=Fe.top-(ee.bottom-ee.top)-2;Ue-Fe.top<xt?(qe>xt&&(j.style.height=(qe=xt)+"px"),j.style.top=(Ve=ee.top-qe)+ut+"px",ze=!1):j.style.height=Ue-Fe.top-2+"px"}var Jt=Fe.right-nt;if(Be&&(Jt+=F.display.nativeBarWidth),Jt>0&&(Fe.right-Fe.left>nt&&(j.style.width=nt-5+"px",Jt-=Fe.right-Fe.left-nt),j.style.left=(He=Math.max(ee.left-Jt-ct,0))+"px"),Be)for(var er=j.firstChild;er;er=er.nextSibling)er.style.paddingRight=F.display.nativeBarWidth+"px";if(F.addKeyMap(this.keyMap=q(M,{moveFocus:function(bt,Lt){L.changeActive(L.selectedHint+bt,Lt)},setFocus:function(bt){L.changeActive(bt)},menuSize:function(){return L.screenAmount()},length:U.length,close:function(){M.close()},pick:function(){L.pick()},data:S})),M.options.closeOnUnfocus){var dr;F.on("blur",this.onBlur=function(){dr=setTimeout(function(){M.close()},100)}),F.on("focus",this.onFocus=function(){clearTimeout(dr)})}F.on("scroll",this.onScroll=function(){var bt=F.getScrollInfo(),Lt=F.getWrapperElement().getBoundingClientRect();it||(it=F.getScrollInfo());var Ar=Ve+it.top-bt.top,Ft=Ar-(te.pageYOffset||(K.documentElement||K.body).scrollTop);if(ze||(Ft+=j.offsetHeight),Ft<=Lt.top||Ft>=Lt.bottom)return M.close();j.style.top=Ar+"px",j.style.left=He+it.left-bt.left+"px"}),v.on(j,"dblclick",function(bt){var Lt=he(j,bt.target||bt.srcElement);Lt&&Lt.hintId!=null&&(L.changeActive(Lt.hintId),L.pick())}),v.on(j,"click",function(bt){var Lt=he(j,bt.target||bt.srcElement);Lt&&Lt.hintId!=null&&(L.changeActive(Lt.hintId),M.options.completeOnSingleClick&&L.pick())}),v.on(j,"mousedown",function(){setTimeout(function(){F.focus()},20)});var Qe=this.getSelectedHintRange();return(Qe.from!==0||Qe.to!==0)&&this.scrollToActive(),v.signal(S,"select",U[this.selectedHint],j.childNodes[this.selectedHint]),!0}re.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var M=this.completion.cm.getInputField();M.removeAttribute("aria-activedescendant"),M.removeAttribute("aria-owns");var S=this.completion.cm;this.completion.options.closeOnUnfocus&&(S.off("blur",this.onBlur),S.off("focus",this.onFocus)),S.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var M=this;this.keyMap={Enter:function(){M.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(M,S){if(M>=this.data.list.length?M=S?this.data.list.length-1:0:M<0&&(M=S?0:this.data.list.length-1),this.selectedHint!=M){var L=this.hints.childNodes[this.selectedHint];L&&(L.className=L.className.replace(" "+O,""),L.removeAttribute("aria-selected")),L=this.hints.childNodes[this.selectedHint=M],L.className+=" "+O,L.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",L.id),this.scrollToActive(),v.signal(this.data,"select",this.data.list[this.selectedHint],L)}},scrollToActive:function(){var M=this.getSelectedHintRange(),S=this.hints.childNodes[M.from],L=this.hints.childNodes[M.to],F=this.hints.firstChild;S.offsetTop<this.hints.scrollTop?this.hints.scrollTop=S.offsetTop-F.offsetTop:L.offsetTop+L.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=L.offsetTop+L.offsetHeight-this.hints.clientHeight+F.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var M=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-M),to:Math.min(this.data.list.length-1,this.selectedHint+M)}}};function se(M,S){if(!M.somethingSelected())return S;for(var L=[],F=0;F<S.length;F++)S[F].supportsSelection&&L.push(S[F]);return L}function V(M,S,L,F){if(M.async)M(S,F,L);else{var K=M(S,L);K&&K.then?K.then(F):F(K)}}function T(M,S){var L=M.getHelpers(S,"hint"),F;if(L.length){var K=function(te,j,ie){var U=se(te,L);function Y(ce){if(ce==U.length)return j(null);V(U[ce],te,ie,function(ge){ge&&ge.list.length>0?j(ge):Y(ce+1)})}Y(0)};return K.async=!0,K.supportsSelection=!0,K}else return(F=M.getHelper(M.getCursor(),"hintWords"))?function(te){return v.hint.fromList(te,{words:F})}:v.hint.anyword?function(te,j){return v.hint.anyword(te,j)}:function(){}}v.registerHelper("hint","auto",{resolve:T}),v.registerHelper("hint","fromList",function(M,S){var L=M.getCursor(),F=M.getTokenAt(L),K,te=v.Pos(L.line,F.start),j=L;F.start<L.ch&&/\w/.test(F.string.charAt(L.ch-F.start-1))?K=F.string.substr(0,L.ch-F.start):(K="",te=L);for(var ie=[],U=0;U<S.words.length;U++){var Y=S.words[U];Y.slice(0,K.length)==K&&ie.push(Y)}if(ie.length)return{list:ie,from:te,to:j}}),v.commands.autocomplete=v.showHint;var J={hint:v.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};v.defineOption("hintOptions",null)})},33201:(x,N,f)=>{(function(v){v(f(46944))})(function(v){"use strict";var C="CodeMirror-lint-markers",O="CodeMirror-lint-line-";function P(j,ie,U){var Y=document.createElement("div");Y.className="CodeMirror-lint-tooltip cm-s-"+j.options.theme,Y.appendChild(U.cloneNode(!0)),j.state.lint.options.selfContain?j.getWrapperElement().appendChild(Y):document.body.appendChild(Y);function ce(ge){if(!Y.parentNode)return v.off(document,"mousemove",ce);Y.style.top=Math.max(0,ge.clientY-Y.offsetHeight-5)+"px",Y.style.left=ge.clientX+5+"px"}return v.on(document,"mousemove",ce),ce(ie),Y.style.opacity!=null&&(Y.style.opacity=1),Y}function D(j){j.parentNode&&j.parentNode.removeChild(j)}function R(j){j.parentNode&&(j.style.opacity==null&&D(j),j.style.opacity=0,setTimeout(function(){D(j)},600))}function _(j,ie,U,Y){var ce=P(j,ie,U);function ge(){v.off(Y,"mouseout",ge),ce&&(R(ce),ce=null)}var G=setInterval(function(){if(ce)for(var ve=Y;;ve=ve.parentNode){if(ve&&ve.nodeType==11&&(ve=ve.host),ve==document.body)return;if(!ve){ge();break}}if(!ce)return clearInterval(G)},400);v.on(Y,"mouseout",ge)}function Z(j,ie,U){this.marked=[],ie instanceof Function&&(ie={getAnnotations:ie}),(!ie||ie===!0)&&(ie={}),this.options={},this.linterOptions=ie.options||{};for(var Y in q)this.options[Y]=q[Y];for(var Y in ie)q.hasOwnProperty(Y)?ie[Y]!=null&&(this.options[Y]=ie[Y]):ie.options||(this.linterOptions[Y]=ie[Y]);this.timeout=null,this.hasGutter=U,this.onMouseOver=function(ce){te(j,ce)},this.waitingFor=0}var q={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function he(j){var ie=j.state.lint;ie.hasGutter&&j.clearGutter(C),ie.options.highlightLines&&re(j);for(var U=0;U<ie.marked.length;++U)ie.marked[U].clear();ie.marked.length=0}function re(j){j.eachLine(function(ie){var U=ie.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(ie.wrapClass);U&&j.removeLineClass(ie,"wrap",U[0])})}function se(j,ie,U,Y,ce){var ge=document.createElement("div"),G=ge;return ge.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+U,Y&&(G=ge.appendChild(document.createElement("div")),G.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),ce!=!1&&v.on(G,"mouseover",function(ve){_(j,ve,ie,G)}),ge}function V(j,ie){return j=="error"?j:ie}function T(j){for(var ie=[],U=0;U<j.length;++U){var Y=j[U],ce=Y.from.line;(ie[ce]||(ie[ce]=[])).push(Y)}return ie}function J(j){var ie=j.severity;ie||(ie="error");var U=document.createElement("div");return U.className="CodeMirror-lint-message CodeMirror-lint-message-"+ie,typeof j.messageHTML<"u"?U.innerHTML=j.messageHTML:U.appendChild(document.createTextNode(j.message)),U}function M(j,ie){var U=j.state.lint,Y=++U.waitingFor;function ce(){Y=-1,j.off("change",ce)}j.on("change",ce),ie(j.getValue(),function(ge,G){j.off("change",ce),U.waitingFor==Y&&(G&&ge instanceof v&&(ge=G),j.operation(function(){L(j,ge)}))},U.linterOptions,j)}function S(j){var ie=j.state.lint;if(ie){var U=ie.options,Y=U.getAnnotations||j.getHelper(v.Pos(0,0),"lint");if(Y)if(U.async||Y.async)M(j,Y);else{var ce=Y(j.getValue(),ie.linterOptions,j);if(!ce)return;ce.then?ce.then(function(ge){j.operation(function(){L(j,ge)})}):j.operation(function(){L(j,ce)})}}}function L(j,ie){var U=j.state.lint;if(U){var Y=U.options;he(j);for(var ce=T(ie),ge=0;ge<ce.length;++ge){var G=ce[ge];if(G){var ve=[];G=G.filter(function(ut){return ve.indexOf(ut.message)>-1?!1:ve.push(ut.message)});for(var ee=null,He=U.hasGutter&&document.createDocumentFragment(),Ve=0;Ve<G.length;++Ve){var ze=G[Ve],ct=ze.severity;ct||(ct="error"),ee=V(ee,ct),Y.formatAnnotation&&(ze=Y.formatAnnotation(ze)),U.hasGutter&&He.appendChild(J(ze)),ze.to&&U.marked.push(j.markText(ze.from,ze.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+ct,__annotation:ze}))}U.hasGutter&&j.setGutterMarker(ge,C,se(j,He,ee,ce[ge].length>1,Y.tooltips)),Y.highlightLines&&j.addLineClass(ge,"wrap",O+ee)}}Y.onUpdateLinting&&Y.onUpdateLinting(ie,ce,j)}}function F(j){var ie=j.state.lint;ie&&(clearTimeout(ie.timeout),ie.timeout=setTimeout(function(){S(j)},ie.options.delay))}function K(j,ie,U){for(var Y=U.target||U.srcElement,ce=document.createDocumentFragment(),ge=0;ge<ie.length;ge++){var G=ie[ge];ce.appendChild(J(G))}_(j,U,ce,Y)}function te(j,ie){var U=ie.target||ie.srcElement;if(/\bCodeMirror-lint-mark-/.test(U.className)){for(var Y=U.getBoundingClientRect(),ce=(Y.left+Y.right)/2,ge=(Y.top+Y.bottom)/2,G=j.findMarksAt(j.coordsChar({left:ce,top:ge},"client")),ve=[],ee=0;ee<G.length;++ee){var He=G[ee].__annotation;He&&ve.push(He)}ve.length&&K(j,ve,ie)}}v.defineOption("lint",!1,function(j,ie,U){if(U&&U!=v.Init&&(he(j),j.state.lint.options.lintOnChange!==!1&&j.off("change",F),v.off(j.getWrapperElement(),"mouseover",j.state.lint.onMouseOver),clearTimeout(j.state.lint.timeout),delete j.state.lint),ie){for(var Y=j.getOption("gutters"),ce=!1,ge=0;ge<Y.length;++ge)Y[ge]==C&&(ce=!0);var G=j.state.lint=new Z(j,ie,ce);G.options.lintOnChange&&j.on("change",F),G.options.tooltips!=!1&&G.options.tooltips!="gutter"&&v.on(j.getWrapperElement(),"mouseover",G.onMouseOver),S(j)}}),v.defineExtension("performLint",function(){S(this)})})},71628:(x,N,f)=>{(function(v){v(f(46944))})(function(v){"use strict";var C=v.Pos;function O(S){var L=S.flags;return L??(S.ignoreCase?"i":"")+(S.global?"g":"")+(S.multiline?"m":"")}function P(S,L){for(var F=O(S),K=F,te=0;te<L.length;te++)K.indexOf(L.charAt(te))==-1&&(K+=L.charAt(te));return F==K?S:new RegExp(S.source,K)}function D(S){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(S.source)}function R(S,L,F){L=P(L,"g");for(var K=F.line,te=F.ch,j=S.lastLine();K<=j;K++,te=0){L.lastIndex=te;var ie=S.getLine(K),U=L.exec(ie);if(U)return{from:C(K,U.index),to:C(K,U.index+U[0].length),match:U}}}function _(S,L,F){if(!D(L))return R(S,L,F);L=P(L,"gm");for(var K,te=1,j=F.line,ie=S.lastLine();j<=ie;){for(var U=0;U<te&&!(j>ie);U++){var Y=S.getLine(j++);K=K==null?Y:K+`
|
|
8
|
-
`+
|
|
9
|
-
`),
|
|
10
|
-
`),
|
|
11
|
-
`+
|
|
12
|
-
`),
|
|
13
|
-
`),ee=ie+G.length,He=G[G.length-1].length;return{from:C(ee,He),to:C(ee+ve.length-1,ve.length==1?He+ve[0].length:ve[ve.length-1].length),match:ge}}}}var re,se;String.prototype.normalize?(re=function(S){return S.normalize("NFD").toLowerCase()},se=function(S){return S.normalize("NFD")}):(re=function(S){return S.toLowerCase()},se=function(S){return S});function V(S,L,F,K){if(S.length==L.length)return F;for(var te=0,j=F+Math.max(0,S.length-L.length);;){if(te==j)return te;var ie=te+j>>1,U=K(S.slice(0,ie)).length;if(U==F)return ie;U>F?j=ie:te=ie+1}}function T(S,L,F,K){if(!L.length)return null;var te=K?re:se,j=te(L).split(/\r|\n\r?/);e:for(var ie=F.line,U=F.ch,Y=S.lastLine()+1-j.length;ie<=Y;ie++,U=0){var ce=S.getLine(ie).slice(U),ge=te(ce);if(j.length==1){var G=ge.indexOf(j[0]);if(G==-1)continue e;var F=V(ce,ge,G,te)+U;return{from:C(ie,V(ce,ge,G,te)+U),to:C(ie,V(ce,ge,G+j[0].length,te)+U)}}else{var ve=ge.length-j[0].length;if(ge.slice(ve)!=j[0])continue e;for(var ee=1;ee<j.length-1;ee++)if(te(S.getLine(ie+ee))!=j[ee])continue e;var He=S.getLine(ie+j.length-1),Ve=te(He),ze=j[j.length-1];if(Ve.slice(0,ze.length)!=ze)continue e;return{from:C(ie,V(ce,ge,ve,te)+U),to:C(ie+j.length-1,V(He,Ve,ze.length,te))}}}}function J(S,L,F,K){if(!L.length)return null;var te=K?re:se,j=te(L).split(/\r|\n\r?/);e:for(var ie=F.line,U=F.ch,Y=S.firstLine()-1+j.length;ie>=Y;ie--,U=-1){var ce=S.getLine(ie);U>-1&&(ce=ce.slice(0,U));var ge=te(ce);if(j.length==1){var G=ge.lastIndexOf(j[0]);if(G==-1)continue e;return{from:C(ie,V(ce,ge,G,te)),to:C(ie,V(ce,ge,G+j[0].length,te))}}else{var ve=j[j.length-1];if(ge.slice(0,ve.length)!=ve)continue e;for(var ee=1,F=ie-j.length+1;ee<j.length-1;ee++)if(te(S.getLine(F+ee))!=j[ee])continue e;var He=S.getLine(ie+1-j.length),Ve=te(He);if(Ve.slice(Ve.length-j[0].length)!=j[0])continue e;return{from:C(ie+1-j.length,V(He,Ve,He.length-j[0].length,te)),to:C(ie,V(ce,ge,ve.length,te))}}}}function M(S,L,F,K){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=S,F=F?S.clipPos(F):C(0,0),this.pos={from:F,to:F};var te;typeof K=="object"?te=K.caseFold:(te=K,K=null),typeof L=="string"?(te==null&&(te=!1),this.matches=function(j,ie){return(j?J:T)(S,L,ie,te)}):(L=P(L,"gm"),!K||K.multiline!==!1?this.matches=function(j,ie){return(j?he:_)(S,L,ie)}:this.matches=function(j,ie){return(j?q:R)(S,L,ie)})}M.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(S){var L=this.doc.clipPos(S?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(L=C(L.line,L.ch),S?(L.ch--,L.ch<0&&(L.line--,L.ch=(this.doc.getLine(L.line)||"").length)):(L.ch++,L.ch>(this.doc.getLine(L.line)||"").length&&(L.ch=0,L.line++)),v.cmpPos(L,this.doc.clipPos(L))!=0))return this.atOccurrence=!1;var F=this.matches(S,L);if(this.afterEmptyMatch=F&&v.cmpPos(F.from,F.to)==0,F)return this.pos=F,this.atOccurrence=!0,this.pos.match||!0;var K=C(S?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:K,to:K},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(S,L){if(this.atOccurrence){var F=v.splitLines(S);this.doc.replaceRange(F,this.pos.from,this.pos.to,L),this.pos.to=C(this.pos.from.line+F.length-1,F[F.length-1].length+(F.length==1?this.pos.from.ch:0))}}},v.defineExtension("getSearchCursor",function(S,L,F){return new M(this.doc,S,L,F)}),v.defineDocExtension("getSearchCursor",function(S,L,F){return new M(this,S,L,F)}),v.defineExtension("selectMatches",function(S,L){for(var F=[],K=this.getSearchCursor(S,this.getCursor("from"),L);K.findNext()&&!(v.cmpPos(K.to(),this.getCursor("to"))>0);)F.push({anchor:K.from(),head:K.to()});F.length&&this.setSelections(F,0)})})},46944:function(x){(function(N,f){x.exports=f()})(this,function(){"use strict";var N=navigator.userAgent,f=navigator.platform,v=/gecko\/\d/i.test(N),C=/MSIE \d/.test(N),O=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),P=/Edge\/(\d+)/.exec(N),D=C||O||P,R=D&&(C?document.documentMode||6:+(P||O)[1]),_=!P&&/WebKit\//.test(N),Z=_&&/Qt\/\d+\.\d+/.test(N),q=!P&&/Chrome\/(\d+)/.exec(N),he=q&&+q[1],re=/Opera\//.test(N),se=/Apple Computer/.test(navigator.vendor),V=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),T=/PhantomJS/.test(N),J=se&&(/Mobile\/\w+/.test(N)||navigator.maxTouchPoints>2),M=/Android/.test(N),S=J||M||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),L=J||/Mac/.test(f),F=/\bCrOS\b/.test(N),K=/win/i.test(f),te=re&&N.match(/Version\/(\d*\.\d*)/);te&&(te=Number(te[1])),te&&te>=15&&(re=!1,_=!0);var j=L&&(Z||re&&(te==null||te<12.11)),ie=v||D&&R>=9;function U(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Y=function(e,r){var a=e.className,o=U(r).exec(a);if(o){var l=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(l?o[1]+l:"")}};function ce(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function ge(e,r){return ce(e).appendChild(r)}function G(e,r,a,o){var l=document.createElement(e);if(a&&(l.className=a),o&&(l.style.cssText=o),typeof r=="string")l.appendChild(document.createTextNode(r));else if(r)for(var d=0;d<r.length;++d)l.appendChild(r[d]);return l}function ve(e,r,a,o){var l=G(e,r,a,o);return l.setAttribute("role","presentation"),l}var ee;document.createRange?ee=function(e,r,a,o){var l=document.createRange();return l.setEnd(o||e,a),l.setStart(e,r),l}:ee=function(e,r,a){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch{return o}return o.collapse(!0),o.moveEnd("character",a),o.moveStart("character",r),o};function He(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function Ve(e){var r;try{r=e.activeElement}catch{r=e.body||null}for(;r&&r.shadowRoot&&r.shadowRoot.activeElement;)r=r.shadowRoot.activeElement;return r}function ze(e,r){var a=e.className;U(r).test(a)||(e.className+=(a?" ":"")+r)}function ct(e,r){for(var a=e.split(" "),o=0;o<a.length;o++)a[o]&&!U(a[o]).test(r)&&(r+=" "+a[o]);return r}var ut=function(e){e.select()};J?ut=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:D&&(ut=function(e){try{e.select()}catch{}});function ot(e){return e.display.wrapper.ownerDocument}function Xt(e){return ot(e).defaultView}function dt(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function At(e,r,a){r||(r={});for(var o in e)e.hasOwnProperty(o)&&(a!==!1||!r.hasOwnProperty(o))&&(r[o]=e[o]);return r}function nt(e,r,a,o,l){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var d=o||0,g=l||0;;){var b=e.indexOf(" ",d);if(b<0||b>=r)return g+(r-d);g+=b-d,g+=a-g%a,d=b+1}}var Ue=function(){this.id=null,this.f=null,this.time=0,this.handler=dt(this.onTimeout,this)};Ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ue.prototype.set=function(e,r){this.f=r;var a=+new Date+e;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=a)};function Fe(e,r){for(var a=0;a<e.length;++a)if(e[a]==r)return a;return-1}var Be=50,it={toString:function(){return"CodeMirror.Pass"}},Dt={scroll:!1},qe={origin:"*mouse"},xt={origin:"+move"};function Jt(e,r,a){for(var o=0,l=0;;){var d=e.indexOf(" ",o);d==-1&&(d=e.length);var g=d-o;if(d==e.length||l+g>=r)return o+Math.min(g,r-l);if(l+=d-o,l+=a-l%a,o=d+1,l>=r)return o}}var er=[""];function dr(e){for(;er.length<=e;)er.push(Qe(er)+" ");return er[e]}function Qe(e){return e[e.length-1]}function bt(e,r){for(var a=[],o=0;o<e.length;o++)a[o]=r(e[o],o);return a}function Lt(e,r,a){for(var o=0,l=a(r);o<e.length&&a(e[o])<=l;)o++;e.splice(o,0,r)}function Ar(){}function Ft(e,r){var a;return Object.create?a=Object.create(e):(Ar.prototype=e,a=new Ar),r&&At(r,a),a}var hn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pn(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||hn.test(e))}function Wr(e,r){return r?r.source.indexOf("\\w")>-1&&pn(e)?!0:r.test(e):pn(e)}function tn(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var kn=/[\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 vn(e){return e.charCodeAt(0)>=768&&kn.test(e)}function Hr(e,r,a){for(;(a<0?r>0:r<e.length)&&vn(e.charAt(r));)r+=a;return r}function vr(e,r,a){for(var o=r>a?-1:1;;){if(r==a)return r;var l=(r+a)/2,d=o<0?Math.ceil(l):Math.floor(l);if(d==r)return e(d)?r:a;e(d)?a=d:r=d+o}}function Or(e,r,a,o){if(!e)return o(r,a,"ltr",0);for(var l=!1,d=0;d<e.length;++d){var g=e[d];(g.from<a&&g.to>r||r==a&&g.to==r)&&(o(Math.max(g.from,r),Math.min(g.to,a),g.level==1?"rtl":"ltr",d),l=!0)}l||o(r,a,"ltr")}var Rt=null;function mt(e,r,a){var o;Rt=null;for(var l=0;l<e.length;++l){var d=e[l];if(d.from<r&&d.to>r)return l;d.to==r&&(d.from!=d.to&&a=="before"?o=l:Rt=l),d.from==r&&(d.from!=d.to&&a!="before"?o=l:Rt=l)}return o??Rt}var at=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(k){return k<=247?e.charAt(k):1424<=k&&k<=1524?"R":1536<=k&&k<=1785?r.charAt(k-1536):1774<=k&&k<=2220?"r":8192<=k&&k<=8203?"w":k==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,l=/[stwN]/,d=/[LRr]/,g=/[Lb1n]/,b=/[1n]/;function w(k,H,X){this.level=k,this.from=H,this.to=X}return function(k,H){var X=H=="ltr"?"L":"R";if(k.length==0||H=="ltr"&&!o.test(k))return!1;for(var de=k.length,ue=[],xe=0;xe<de;++xe)ue.push(a(k.charCodeAt(xe)));for(var Ce=0,Ie=X;Ce<de;++Ce){var De=ue[Ce];De=="m"?ue[Ce]=Ie:Ie=De}for(var Ne=0,Oe=X;Ne<de;++Ne){var Re=ue[Ne];Re=="1"&&Oe=="r"?ue[Ne]="n":d.test(Re)&&(Oe=Re,Re=="r"&&(ue[Ne]="R"))}for(var Ye=1,Ke=ue[0];Ye<de-1;++Ye){var pt=ue[Ye];pt=="+"&&Ke=="1"&&ue[Ye+1]=="1"?ue[Ye]="1":pt==","&&Ke==ue[Ye+1]&&(Ke=="1"||Ke=="n")&&(ue[Ye]=Ke),Ke=pt}for(var Bt=0;Bt<de;++Bt){var Zt=ue[Bt];if(Zt==",")ue[Bt]="N";else if(Zt=="%"){var Gt=void 0;for(Gt=Bt+1;Gt<de&&ue[Gt]=="%";++Gt);for(var Tr=Bt&&ue[Bt-1]=="!"||Gt<de&&ue[Gt]=="1"?"1":"N",Je=Bt;Je<Gt;++Je)ue[Je]=Tr;Bt=Gt-1}}for(var tr=0,Pr=X;tr<de;++tr){var zt=ue[tr];Pr=="L"&&zt=="1"?ue[tr]="L":d.test(zt)&&(Pr=zt)}for(var Kt=0;Kt<de;++Kt)if(l.test(ue[Kt])){var kt=void 0;for(kt=Kt+1;kt<de&&l.test(ue[kt]);++kt);for(var jt=(Kt?ue[Kt-1]:X)=="L",Mt=(kt<de?ue[kt]:X)=="L",Zr=jt==Mt?jt?"L":"R":X,An=Kt;An<kt;++An)ue[An]=Zr;Kt=kt-1}for(var or=[],Vr,qt=0;qt<de;)if(g.test(ue[qt])){var ta=qt;for(++qt;qt<de&&g.test(ue[qt]);++qt);or.push(new w(0,ta,qt))}else{var fn=qt,ci=or.length,wo=H=="rtl"?1:0;for(++qt;qt<de&&ue[qt]!="L";++qt);for(var Sr=fn;Sr<qt;)if(b.test(ue[Sr])){fn<Sr&&(or.splice(ci,0,new w(1,fn,Sr)),ci+=wo);var Hi=Sr;for(++Sr;Sr<qt&&b.test(ue[Sr]);++Sr);or.splice(ci,0,new w(2,Hi,Sr)),ci+=wo,fn=Sr}else++Sr;fn<qt&&or.splice(ci,0,new w(1,fn,qt))}return H=="ltr"&&(or[0].level==1&&(Vr=k.match(/^\s+/))&&(or[0].from=Vr[0].length,or.unshift(new w(0,0,Vr[0].length))),Qe(or).level==1&&(Vr=k.match(/\s+$/))&&(Qe(or).to-=Vr[0].length,or.push(new w(0,de-Vr[0].length,de)))),H=="rtl"?or.reverse():or}}();function Ze(e,r){var a=e.order;return a==null&&(a=e.order=at(e.text,r)),a}var ht=[],ne=function(e,r,a){if(e.addEventListener)e.addEventListener(r,a,!1);else if(e.attachEvent)e.attachEvent("on"+r,a);else{var o=e._handlers||(e._handlers={});o[r]=(o[r]||ht).concat(a)}};function be(e,r){return e._handlers&&e._handlers[r]||ht}function We(e,r,a){if(e.removeEventListener)e.removeEventListener(r,a,!1);else if(e.detachEvent)e.detachEvent("on"+r,a);else{var o=e._handlers,l=o&&o[r];if(l){var d=Fe(l,a);d>-1&&(o[r]=l.slice(0,d).concat(l.slice(d+1)))}}}function et(e,r){var a=be(e,r);if(a.length)for(var o=Array.prototype.slice.call(arguments,2),l=0;l<a.length;++l)a[l].apply(null,o)}function ft(e,r,a){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),et(e,a||r.type,e,r),Bn(r)||r.codemirrorIgnore}function st(e){var r=e._handlers&&e._handlers.cursorActivity;if(r)for(var a=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),o=0;o<r.length;++o)Fe(a,r[o])==-1&&a.push(r[o])}function _t(e,r){return be(e,r).length>0}function Er(e){e.prototype.on=function(r,a){ne(this,r,a)},e.prototype.off=function(r,a){We(this,r,a)}}function St(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function rr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Bn(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function gr(e){St(e),rr(e)}function mr(e){return e.target||e.srcElement}function jn(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),L&&e.ctrlKey&&r==1&&(r=3),r}var kr=function(){if(D&&R<9)return!1;var e=G("div");return"draggable"in e||"dragDrop"in e}(),Tn;function Pn(e){if(Tn==null){var r=G("span","\u200B");ge(e,G("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Tn=r.offsetWidth<=1&&r.offsetHeight>2&&!(D&&R<8))}var a=Tn?G("span","\u200B"):G("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var yr;function Wn(e){if(yr!=null)return yr;var r=ge(e,document.createTextNode("A\u062EA")),a=ee(r,0,1).getBoundingClientRect(),o=ee(r,1,2).getBoundingClientRect();return ce(e),!a||a.left==a.right?!1:yr=o.right-a.right<3}var gn=`
|
|
5
|
+
* Version: "3.0.0-alpha.59"
|
|
6
|
+
*/(this.webpackChunkRedoclyOpenAPIDocs=this.webpackChunkRedoclyOpenAPIDocs||[]).push([[290],{29641:(S,R,c)=>{(function(m){m(c(46944))})(function(m){var O={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},k=m.Pos;m.defineOption("autoCloseBrackets",!1,function(N,w,M){M&&M!=m.Init&&(N.removeKeyMap(D),N.state.closeBrackets=null),w&&(j(L(w,"pairs")),N.state.closeBrackets=w,N.addKeyMap(D))});function L(N,w){return w=="pairs"&&typeof N=="string"?N:typeof N=="object"&&N[w]!=null?N[w]:O[w]}var D={Backspace:re,Enter:he};function j(N){for(var w=0;w<N.length;w++){var M=N.charAt(w),B="'"+M+"'";D[B]||(D[B]=X(M))}}j(O.pairs+"`");function X(N){return function(w){return J(w,N)}}function te(N){var w=N.state.closeBrackets;if(!w||w.override)return w;var M=N.getModeAt(N.getCursor());return M.closeBrackets||w}function re(N){var w=te(N);if(!w||N.getOption("disableInput"))return m.Pass;for(var M=L(w,"pairs"),B=N.listSelections(),Z=0;Z<B.length;Z++){if(!B[Z].empty())return m.Pass;var ae=F(N,B[Z].head);if(!ae||M.indexOf(ae)%2!=0)return m.Pass}for(var Z=B.length-1;Z>=0;Z--){var H=B[Z].head;N.replaceRange("",k(H.line,H.ch-1),k(H.line,H.ch+1),"+delete")}}function he(N){var w=te(N),M=w&&L(w,"explode");if(!M||N.getOption("disableInput"))return m.Pass;for(var B=N.listSelections(),Z=0;Z<B.length;Z++){if(!B[Z].empty())return m.Pass;var ae=F(N,B[Z].head);if(!ae||M.indexOf(ae)%2!=0)return m.Pass}N.operation(function(){var H=N.lineSeparator()||`
|
|
7
|
+
`;N.replaceSelection(H+H,null),oe(N,-1),B=N.listSelections();for(var le=0;le<B.length;le++){var z=B[le].head.line;N.indentLine(z,null,!0),N.indentLine(z+1,null,!0)}})}function oe(N,w){for(var M=[],B=N.listSelections(),Z=0,ae=0;ae<B.length;ae++){var H=B[ae];H.head==N.getCursor()&&(Z=ae);var le=H.head.ch||w>0?{line:H.head.line,ch:H.head.ch+w}:{line:H.head.line-1};M.push({anchor:le,head:le})}N.setSelections(M,Z)}function fe(N){var w=m.cmpPos(N.anchor,N.head)>0;return{anchor:new k(N.anchor.line,N.anchor.ch+(w?-1:1)),head:new k(N.head.line,N.head.ch+(w?1:-1))}}function J(N,w){var M=te(N);if(!M||N.getOption("disableInput"))return m.Pass;var B=L(M,"pairs"),Z=B.indexOf(w);if(Z==-1)return m.Pass;for(var ae=L(M,"closeBefore"),H=L(M,"triples"),le=B.charAt(Z+1)==w,z=N.listSelections(),q=Z%2==0,pe,xe=0;xe<z.length;xe++){var Q=z[xe],ye=Q.head,ie,je=N.getRange(ye,k(ye.line,ye.ch+1));if(q&&!Q.empty())ie="surround";else if((le||!q)&&je==w)le&&ee(N,ye)?ie="both":H.indexOf(w)>=0&&N.getRange(ye,k(ye.line,ye.ch+3))==w+w+w?ie="skipThree":ie="skip";else if(le&&ye.ch>1&&H.indexOf(w)>=0&&N.getRange(k(ye.line,ye.ch-2),ye)==w+w){if(ye.ch>2&&/\bstring/.test(N.getTokenTypeAt(k(ye.line,ye.ch-2))))return m.Pass;ie="addFour"}else if(le){var ze=ye.ch==0?" ":N.getRange(k(ye.line,ye.ch-1),ye);if(!m.isWordChar(je)&&ze!=w&&!m.isWordChar(ze))ie="both";else return m.Pass}else if(q&&(je.length===0||/\s/.test(je)||ae.indexOf(je)>-1))ie="both";else return m.Pass;if(!pe)pe=ie;else if(pe!=ie)return m.Pass}var Ue=Z%2?B.charAt(Z-1):w,vt=Z%2?w:B.charAt(Z+1);N.operation(function(){if(pe=="skip")oe(N,1);else if(pe=="skipThree")oe(N,3);else if(pe=="surround"){for(var pt=N.getSelections(),ut=0;ut<pt.length;ut++)pt[ut]=Ue+pt[ut]+vt;N.replaceSelections(pt,"around"),pt=N.listSelections().slice();for(var ut=0;ut<pt.length;ut++)pt[ut]=fe(pt[ut]);N.setSelections(pt)}else pe=="both"?(N.replaceSelection(Ue+vt,null),N.triggerElectric(Ue+vt),oe(N,-1)):pe=="addFour"&&(N.replaceSelection(Ue+Ue+Ue+Ue,"before"),oe(N,1))})}function F(N,w){var M=N.getRange(k(w.line,w.ch-1),k(w.line,w.ch+1));return M.length==2?M:null}function ee(N,w){var M=N.getTokenAt(k(w.line,w.ch+1));return/\bstring/.test(M.type)&&M.start==w.ch&&(w.ch==0||!/\bstring/.test(N.getTokenTypeAt(w)))}})},82518:(S,R,c)=>{(function(m){m(c(46944))})(function(m){var O=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),k=m.Pos,L={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function D(oe){return oe&&oe.bracketRegex||/[(){}[\]]/}function j(oe,fe,J){var F=oe.getLineHandle(fe.line),ee=fe.ch-1,N=J&&J.afterCursor;N==null&&(N=/(^| )cm-fat-cursor($| )/.test(oe.getWrapperElement().className));var w=D(J),M=!N&&ee>=0&&w.test(F.text.charAt(ee))&&L[F.text.charAt(ee)]||w.test(F.text.charAt(ee+1))&&L[F.text.charAt(++ee)];if(!M)return null;var B=M.charAt(1)==">"?1:-1;if(J&&J.strict&&B>0!=(ee==fe.ch))return null;var Z=oe.getTokenTypeAt(k(fe.line,ee+1)),ae=X(oe,k(fe.line,ee+(B>0?1:0)),B,Z,J);return ae==null?null:{from:k(fe.line,ee),to:ae&&ae.pos,match:ae&&ae.ch==M.charAt(0),forward:B>0}}function X(oe,fe,J,F,ee){for(var N=ee&&ee.maxScanLineLength||1e4,w=ee&&ee.maxScanLines||1e3,M=[],B=D(ee),Z=J>0?Math.min(fe.line+w,oe.lastLine()+1):Math.max(oe.firstLine()-1,fe.line-w),ae=fe.line;ae!=Z;ae+=J){var H=oe.getLine(ae);if(H){var le=J>0?0:H.length-1,z=J>0?H.length:-1;if(!(H.length>N))for(ae==fe.line&&(le=fe.ch-(J<0?1:0));le!=z;le+=J){var q=H.charAt(le);if(B.test(q)&&(F===void 0||(oe.getTokenTypeAt(k(ae,le+1))||"")==(F||""))){var pe=L[q];if(pe&&pe.charAt(1)==">"==J>0)M.push(q);else if(M.length)M.pop();else return{pos:k(ae,le),ch:q}}}}}return ae-J==(J>0?oe.lastLine():oe.firstLine())?!1:null}function te(oe,fe,J){for(var F=oe.state.matchBrackets.maxHighlightLineLength||1e3,ee=J&&J.highlightNonMatching,N=[],w=oe.listSelections(),M=0;M<w.length;M++){var B=w[M].empty()&&j(oe,w[M].head,J);if(B&&(B.match||ee!==!1)&&oe.getLine(B.from.line).length<=F){var Z=B.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";N.push(oe.markText(B.from,k(B.from.line,B.from.ch+1),{className:Z})),B.to&&oe.getLine(B.to.line).length<=F&&N.push(oe.markText(B.to,k(B.to.line,B.to.ch+1),{className:Z}))}}if(N.length){O&&oe.state.focused&&oe.focus();var ae=function(){oe.operation(function(){for(var H=0;H<N.length;H++)N[H].clear()})};if(fe)setTimeout(ae,800);else return ae}}function re(oe){oe.operation(function(){oe.state.matchBrackets.currentlyHighlighted&&(oe.state.matchBrackets.currentlyHighlighted(),oe.state.matchBrackets.currentlyHighlighted=null),oe.state.matchBrackets.currentlyHighlighted=te(oe,!1,oe.state.matchBrackets)})}function he(oe){oe.state.matchBrackets&&oe.state.matchBrackets.currentlyHighlighted&&(oe.state.matchBrackets.currentlyHighlighted(),oe.state.matchBrackets.currentlyHighlighted=null)}m.defineOption("matchBrackets",!1,function(oe,fe,J){J&&J!=m.Init&&(oe.off("cursorActivity",re),oe.off("focus",re),oe.off("blur",he),he(oe)),fe&&(oe.state.matchBrackets=typeof fe=="object"?fe:{},oe.on("cursorActivity",re),oe.on("focus",re),oe.on("blur",he))}),m.defineExtension("matchBrackets",function(){te(this,!0)}),m.defineExtension("findMatchingBracket",function(oe,fe,J){return(J||typeof fe=="boolean")&&(J?(J.strict=fe,fe=J):fe=fe?{strict:!0}:null),j(this,oe,fe)}),m.defineExtension("scanForBracket",function(oe,fe,J,F){return X(this,oe,fe,J,F)})})},77436:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O="CodeMirror-hint",k="CodeMirror-hint-active";m.showHint=function(N,w,M){if(!w)return N.showHint(M);M&&M.async&&(w.async=!0);var B={hint:w};if(M)for(var Z in M)B[Z]=M[Z];return N.showHint(B)},m.defineExtension("showHint",function(N){N=X(this,this.getCursor("start"),N);var w=this.listSelections();if(!(w.length>1)){if(this.somethingSelected()){if(!N.hint.supportsSelection)return;for(var M=0;M<w.length;M++)if(w[M].head.line!=w[M].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var B=this.state.completionActive=new L(this,N);B.options.hint&&(m.signal(this,"startCompletion",this),B.update(!0))}}),m.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function L(N,w){if(this.cm=N,this.options=w,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var M=this;N.on("cursorActivity",this.activityFunc=function(){M.cursorActivity()})}}var D=window.requestAnimationFrame||function(N){return setTimeout(N,1e3/60)},j=window.cancelAnimationFrame||clearTimeout;L.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&m.signal(this.data,"close"),this.widget&&this.widget.close(),m.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(N,w){var M=N.list[w],B=this;this.cm.operation(function(){M.hint?M.hint(B.cm,N,M):B.cm.replaceRange(te(M),M.from||N.from,M.to||N.to,"complete"),m.signal(N,"pick",M),B.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(j(this.debounce),this.debounce=0);var N=this.startPos;this.data&&(N=this.data.from);var w=this.cm.getCursor(),M=this.cm.getLine(w.line);if(w.line!=this.startPos.line||M.length-w.ch!=this.startLen-this.startPos.ch||w.ch<N.ch||this.cm.somethingSelected()||!w.ch||this.options.closeCharacters.test(M.charAt(w.ch-1)))this.close();else{var B=this;this.debounce=D(function(){B.update()}),this.widget&&this.widget.disable()}},update:function(N){if(this.tick!=null){var w=this,M=++this.tick;J(this.options.hint,this.cm,this.options,function(B){w.tick==M&&w.finishUpdate(B,N)})}},finishUpdate:function(N,w){this.data&&m.signal(this.data,"update");var M=this.widget&&this.widget.picked||w&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=N,N&&N.list.length&&(M&&N.list.length==1?this.pick(N,0):(this.widget=new oe(this,N),m.signal(N,"shown")))}};function X(N,w,M){var B=N.options.hintOptions,Z={};for(var ae in ee)Z[ae]=ee[ae];if(B)for(var ae in B)B[ae]!==void 0&&(Z[ae]=B[ae]);if(M)for(var ae in M)M[ae]!==void 0&&(Z[ae]=M[ae]);return Z.hint.resolve&&(Z.hint=Z.hint.resolve(N,w)),Z}function te(N){return typeof N=="string"?N:N.text}function re(N,w){var M={Up:function(){w.moveFocus(-1)},Down:function(){w.moveFocus(1)},PageUp:function(){w.moveFocus(-w.menuSize()+1,!0)},PageDown:function(){w.moveFocus(w.menuSize()-1,!0)},Home:function(){w.setFocus(0)},End:function(){w.setFocus(w.length-1)},Enter:w.pick,Tab:w.pick,Esc:w.close},B=/Mac/.test(navigator.platform);B&&(M["Ctrl-P"]=function(){w.moveFocus(-1)},M["Ctrl-N"]=function(){w.moveFocus(1)});var Z=N.options.customKeys,ae=Z?{}:M;function H(q,pe){var xe;typeof pe!="string"?xe=function(Q){return pe(Q,w)}:M.hasOwnProperty(pe)?xe=M[pe]:xe=pe,ae[q]=xe}if(Z)for(var le in Z)Z.hasOwnProperty(le)&&H(le,Z[le]);var z=N.options.extraKeys;if(z)for(var le in z)z.hasOwnProperty(le)&&H(le,z[le]);return ae}function he(N,w){for(;w&&w!=N;){if(w.nodeName.toUpperCase()==="LI"&&w.parentNode==N)return w;w=w.parentNode}}function oe(N,w){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=N,this.data=w,this.picked=!1;var M=this,B=N.cm,Z=B.getInputField().ownerDocument,ae=Z.defaultView||Z.parentWindow,H=this.hints=Z.createElement("ul");H.setAttribute("role","listbox"),H.setAttribute("aria-expanded","true"),H.id=this.id;var le=N.cm.options.theme;H.className="CodeMirror-hints "+le,this.selectedHint=w.selectedHint||0;for(var z=w.list,q=0;q<z.length;++q){var pe=H.appendChild(Z.createElement("li")),xe=z[q],Q=O+(q!=this.selectedHint?"":" "+k);xe.className!=null&&(Q=xe.className+" "+Q),pe.className=Q,q==this.selectedHint&&pe.setAttribute("aria-selected","true"),pe.id=this.id+"-"+q,pe.setAttribute("role","option"),xe.render?xe.render(pe,w,xe):pe.appendChild(Z.createTextNode(xe.displayText||te(xe))),pe.hintId=q}var ye=N.options.container||Z.body,ie=B.cursorCoords(N.options.alignWithWord?w.from:null),je=ie.left,ze=ie.bottom,Ue=!0,vt=0,pt=0;if(ye!==Z.body){var ut=["absolute","relative","fixed"].indexOf(ae.getComputedStyle(ye).position)!==-1,er=ut?ye:ye.offsetParent,gt=er.getBoundingClientRect(),Rt=Z.body.getBoundingClientRect();vt=gt.left-Rt.left-er.scrollLeft,pt=gt.top-Rt.top-er.scrollTop}H.style.left=je-vt+"px",H.style.top=ze-pt+"px";var st=ae.innerWidth||Math.max(Z.body.offsetWidth,Z.documentElement.offsetWidth),He=ae.innerHeight||Math.max(Z.body.offsetHeight,Z.documentElement.offsetHeight);ye.appendChild(H),B.getInputField().setAttribute("aria-autocomplete","list"),B.getInputField().setAttribute("aria-owns",this.id),B.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var Re=N.options.moveOnOverlap?H.getBoundingClientRect():new DOMRect,Be=N.options.paddingForScrollbar?H.scrollHeight>H.clientHeight+1:!1,lt;setTimeout(function(){lt=B.getScrollInfo()});var _t=Re.bottom-He;if(_t>0){var rt=Re.bottom-Re.top,Pt=Re.top-(ie.bottom-ie.top)-2;He-Re.top<Pt?(rt>Pt&&(H.style.height=(rt=Pt)+"px"),H.style.top=(ze=ie.top-rt)+pt+"px",Ue=!1):H.style.height=He-Re.top-2+"px"}var tr=Re.right-st;if(Be&&(tr+=B.display.nativeBarWidth),tr>0&&(Re.right-Re.left>st&&(H.style.width=st-5+"px",tr-=Re.right-Re.left-st),H.style.left=(je=Math.max(ie.left-tr-vt,0))+"px"),Be)for(var or=H.firstChild;or;or=or.nextSibling)or.style.paddingRight=B.display.nativeBarWidth+"px";if(B.addKeyMap(this.keyMap=re(N,{moveFocus:function(Et,jt){M.changeActive(M.selectedHint+Et,jt)},setFocus:function(Et){M.changeActive(Et)},menuSize:function(){return M.screenAmount()},length:z.length,close:function(){N.close()},pick:function(){M.pick()},data:w})),N.options.closeOnUnfocus){var kr;B.on("blur",this.onBlur=function(){kr=setTimeout(function(){N.close()},100)}),B.on("focus",this.onFocus=function(){clearTimeout(kr)})}B.on("scroll",this.onScroll=function(){var Et=B.getScrollInfo(),jt=B.getWrapperElement().getBoundingClientRect();lt||(lt=B.getScrollInfo());var _r=ze+lt.top-Et.top,zt=_r-(ae.pageYOffset||(Z.documentElement||Z.body).scrollTop);if(Ue||(zt+=H.offsetHeight),zt<=jt.top||zt>=jt.bottom)return N.close();H.style.top=_r+"px",H.style.left=je+lt.left-Et.left+"px"}),m.on(H,"dblclick",function(Et){var jt=he(H,Et.target||Et.srcElement);jt&&jt.hintId!=null&&(M.changeActive(jt.hintId),M.pick())}),m.on(H,"click",function(Et){var jt=he(H,Et.target||Et.srcElement);jt&&jt.hintId!=null&&(M.changeActive(jt.hintId),N.options.completeOnSingleClick&&M.pick())}),m.on(H,"mousedown",function(){setTimeout(function(){B.focus()},20)});var et=this.getSelectedHintRange();return(et.from!==0||et.to!==0)&&this.scrollToActive(),m.signal(w,"select",z[this.selectedHint],H.childNodes[this.selectedHint]),!0}oe.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var N=this.completion.cm.getInputField();N.removeAttribute("aria-activedescendant"),N.removeAttribute("aria-owns");var w=this.completion.cm;this.completion.options.closeOnUnfocus&&(w.off("blur",this.onBlur),w.off("focus",this.onFocus)),w.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var N=this;this.keyMap={Enter:function(){N.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(N,w){if(N>=this.data.list.length?N=w?this.data.list.length-1:0:N<0&&(N=w?0:this.data.list.length-1),this.selectedHint!=N){var M=this.hints.childNodes[this.selectedHint];M&&(M.className=M.className.replace(" "+k,""),M.removeAttribute("aria-selected")),M=this.hints.childNodes[this.selectedHint=N],M.className+=" "+k,M.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",M.id),this.scrollToActive(),m.signal(this.data,"select",this.data.list[this.selectedHint],M)}},scrollToActive:function(){var N=this.getSelectedHintRange(),w=this.hints.childNodes[N.from],M=this.hints.childNodes[N.to],B=this.hints.firstChild;w.offsetTop<this.hints.scrollTop?this.hints.scrollTop=w.offsetTop-B.offsetTop:M.offsetTop+M.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=M.offsetTop+M.offsetHeight-this.hints.clientHeight+B.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var N=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-N),to:Math.min(this.data.list.length-1,this.selectedHint+N)}}};function fe(N,w){if(!N.somethingSelected())return w;for(var M=[],B=0;B<w.length;B++)w[B].supportsSelection&&M.push(w[B]);return M}function J(N,w,M,B){if(N.async)N(w,B,M);else{var Z=N(w,M);Z&&Z.then?Z.then(B):B(Z)}}function F(N,w){var M=N.getHelpers(w,"hint"),B;if(M.length){var Z=function(ae,H,le){var z=fe(ae,M);function q(pe){if(pe==z.length)return H(null);J(z[pe],ae,le,function(xe){xe&&xe.list.length>0?H(xe):q(pe+1)})}q(0)};return Z.async=!0,Z.supportsSelection=!0,Z}else return(B=N.getHelper(N.getCursor(),"hintWords"))?function(ae){return m.hint.fromList(ae,{words:B})}:m.hint.anyword?function(ae,H){return m.hint.anyword(ae,H)}:function(){}}m.registerHelper("hint","auto",{resolve:F}),m.registerHelper("hint","fromList",function(N,w){var M=N.getCursor(),B=N.getTokenAt(M),Z,ae=m.Pos(M.line,B.start),H=M;B.start<M.ch&&/\w/.test(B.string.charAt(M.ch-B.start-1))?Z=B.string.substr(0,M.ch-B.start):(Z="",ae=M);for(var le=[],z=0;z<w.words.length;z++){var q=w.words[z];q.slice(0,Z.length)==Z&&le.push(q)}if(le.length)return{list:le,from:ae,to:H}}),m.commands.autocomplete=m.showHint;var ee={hint:m.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};m.defineOption("hintOptions",null)})},33201:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O="CodeMirror-lint-markers",k="CodeMirror-lint-line-";function L(H,le,z){var q=document.createElement("div");q.className="CodeMirror-lint-tooltip cm-s-"+H.options.theme,q.appendChild(z.cloneNode(!0)),H.state.lint.options.selfContain?H.getWrapperElement().appendChild(q):document.body.appendChild(q);function pe(xe){if(!q.parentNode)return m.off(document,"mousemove",pe);q.style.top=Math.max(0,xe.clientY-q.offsetHeight-5)+"px",q.style.left=xe.clientX+5+"px"}return m.on(document,"mousemove",pe),pe(le),q.style.opacity!=null&&(q.style.opacity=1),q}function D(H){H.parentNode&&H.parentNode.removeChild(H)}function j(H){H.parentNode&&(H.style.opacity==null&&D(H),H.style.opacity=0,setTimeout(function(){D(H)},600))}function X(H,le,z,q){var pe=L(H,le,z);function xe(){m.off(q,"mouseout",xe),pe&&(j(pe),pe=null)}var Q=setInterval(function(){if(pe)for(var ye=q;;ye=ye.parentNode){if(ye&&ye.nodeType==11&&(ye=ye.host),ye==document.body)return;if(!ye){xe();break}}if(!pe)return clearInterval(Q)},400);m.on(q,"mouseout",xe)}function te(H,le,z){this.marked=[],le instanceof Function&&(le={getAnnotations:le}),(!le||le===!0)&&(le={}),this.options={},this.linterOptions=le.options||{};for(var q in re)this.options[q]=re[q];for(var q in le)re.hasOwnProperty(q)?le[q]!=null&&(this.options[q]=le[q]):le.options||(this.linterOptions[q]=le[q]);this.timeout=null,this.hasGutter=z,this.onMouseOver=function(pe){ae(H,pe)},this.waitingFor=0}var re={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function he(H){var le=H.state.lint;le.hasGutter&&H.clearGutter(O),le.options.highlightLines&&oe(H);for(var z=0;z<le.marked.length;++z)le.marked[z].clear();le.marked.length=0}function oe(H){H.eachLine(function(le){var z=le.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(le.wrapClass);z&&H.removeLineClass(le,"wrap",z[0])})}function fe(H,le,z,q,pe){var xe=document.createElement("div"),Q=xe;return xe.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+z,q&&(Q=xe.appendChild(document.createElement("div")),Q.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),pe!=!1&&m.on(Q,"mouseover",function(ye){X(H,ye,le,Q)}),xe}function J(H,le){return H=="error"?H:le}function F(H){for(var le=[],z=0;z<H.length;++z){var q=H[z],pe=q.from.line;(le[pe]||(le[pe]=[])).push(q)}return le}function ee(H){var le=H.severity;le||(le="error");var z=document.createElement("div");return z.className="CodeMirror-lint-message CodeMirror-lint-message-"+le,typeof H.messageHTML<"u"?z.innerHTML=H.messageHTML:z.appendChild(document.createTextNode(H.message)),z}function N(H,le){var z=H.state.lint,q=++z.waitingFor;function pe(){q=-1,H.off("change",pe)}H.on("change",pe),le(H.getValue(),function(xe,Q){H.off("change",pe),z.waitingFor==q&&(Q&&xe instanceof m&&(xe=Q),H.operation(function(){M(H,xe)}))},z.linterOptions,H)}function w(H){var le=H.state.lint;if(le){var z=le.options,q=z.getAnnotations||H.getHelper(m.Pos(0,0),"lint");if(q)if(z.async||q.async)N(H,q);else{var pe=q(H.getValue(),le.linterOptions,H);if(!pe)return;pe.then?pe.then(function(xe){H.operation(function(){M(H,xe)})}):H.operation(function(){M(H,pe)})}}}function M(H,le){var z=H.state.lint;if(z){var q=z.options;he(H);for(var pe=F(le),xe=0;xe<pe.length;++xe){var Q=pe[xe];if(Q){var ye=[];Q=Q.filter(function(pt){return ye.indexOf(pt.message)>-1?!1:ye.push(pt.message)});for(var ie=null,je=z.hasGutter&&document.createDocumentFragment(),ze=0;ze<Q.length;++ze){var Ue=Q[ze],vt=Ue.severity;vt||(vt="error"),ie=J(ie,vt),q.formatAnnotation&&(Ue=q.formatAnnotation(Ue)),z.hasGutter&&je.appendChild(ee(Ue)),Ue.to&&z.marked.push(H.markText(Ue.from,Ue.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+vt,__annotation:Ue}))}z.hasGutter&&H.setGutterMarker(xe,O,fe(H,je,ie,pe[xe].length>1,q.tooltips)),q.highlightLines&&H.addLineClass(xe,"wrap",k+ie)}}q.onUpdateLinting&&q.onUpdateLinting(le,pe,H)}}function B(H){var le=H.state.lint;le&&(clearTimeout(le.timeout),le.timeout=setTimeout(function(){w(H)},le.options.delay))}function Z(H,le,z){for(var q=z.target||z.srcElement,pe=document.createDocumentFragment(),xe=0;xe<le.length;xe++){var Q=le[xe];pe.appendChild(ee(Q))}X(H,z,pe,q)}function ae(H,le){var z=le.target||le.srcElement;if(/\bCodeMirror-lint-mark-/.test(z.className)){for(var q=z.getBoundingClientRect(),pe=(q.left+q.right)/2,xe=(q.top+q.bottom)/2,Q=H.findMarksAt(H.coordsChar({left:pe,top:xe},"client")),ye=[],ie=0;ie<Q.length;++ie){var je=Q[ie].__annotation;je&&ye.push(je)}ye.length&&Z(H,ye,le)}}m.defineOption("lint",!1,function(H,le,z){if(z&&z!=m.Init&&(he(H),H.state.lint.options.lintOnChange!==!1&&H.off("change",B),m.off(H.getWrapperElement(),"mouseover",H.state.lint.onMouseOver),clearTimeout(H.state.lint.timeout),delete H.state.lint),le){for(var q=H.getOption("gutters"),pe=!1,xe=0;xe<q.length;++xe)q[xe]==O&&(pe=!0);var Q=H.state.lint=new te(H,le,pe);Q.options.lintOnChange&&H.on("change",B),Q.options.tooltips!=!1&&Q.options.tooltips!="gutter"&&m.on(H.getWrapperElement(),"mouseover",Q.onMouseOver),w(H)}}),m.defineExtension("performLint",function(){w(this)})})},71628:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";var O=m.Pos;function k(w){var M=w.flags;return M??(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function L(w,M){for(var B=k(w),Z=B,ae=0;ae<M.length;ae++)Z.indexOf(M.charAt(ae))==-1&&(Z+=M.charAt(ae));return B==Z?w:new RegExp(w.source,Z)}function D(w){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(w.source)}function j(w,M,B){M=L(M,"g");for(var Z=B.line,ae=B.ch,H=w.lastLine();Z<=H;Z++,ae=0){M.lastIndex=ae;var le=w.getLine(Z),z=M.exec(le);if(z)return{from:O(Z,z.index),to:O(Z,z.index+z[0].length),match:z}}}function X(w,M,B){if(!D(M))return j(w,M,B);M=L(M,"gm");for(var Z,ae=1,H=B.line,le=w.lastLine();H<=le;){for(var z=0;z<ae&&!(H>le);z++){var q=w.getLine(H++);Z=Z==null?q:Z+`
|
|
8
|
+
`+q}ae=ae*2,M.lastIndex=B.ch;var pe=M.exec(Z);if(pe){var xe=Z.slice(0,pe.index).split(`
|
|
9
|
+
`),Q=pe[0].split(`
|
|
10
|
+
`),ye=B.line+xe.length-1,ie=xe[xe.length-1].length;return{from:O(ye,ie),to:O(ye+Q.length-1,Q.length==1?ie+Q[0].length:Q[Q.length-1].length),match:pe}}}}function te(w,M,B){for(var Z,ae=0;ae<=w.length;){M.lastIndex=ae;var H=M.exec(w);if(!H)break;var le=H.index+H[0].length;if(le>w.length-B)break;(!Z||le>Z.index+Z[0].length)&&(Z=H),ae=H.index+1}return Z}function re(w,M,B){M=L(M,"g");for(var Z=B.line,ae=B.ch,H=w.firstLine();Z>=H;Z--,ae=-1){var le=w.getLine(Z),z=te(le,M,ae<0?0:le.length-ae);if(z)return{from:O(Z,z.index),to:O(Z,z.index+z[0].length),match:z}}}function he(w,M,B){if(!D(M))return re(w,M,B);M=L(M,"gm");for(var Z,ae=1,H=w.getLine(B.line).length-B.ch,le=B.line,z=w.firstLine();le>=z;){for(var q=0;q<ae&&le>=z;q++){var pe=w.getLine(le--);Z=Z==null?pe:pe+`
|
|
11
|
+
`+Z}ae*=2;var xe=te(Z,M,H);if(xe){var Q=Z.slice(0,xe.index).split(`
|
|
12
|
+
`),ye=xe[0].split(`
|
|
13
|
+
`),ie=le+Q.length,je=Q[Q.length-1].length;return{from:O(ie,je),to:O(ie+ye.length-1,ye.length==1?je+ye[0].length:ye[ye.length-1].length),match:xe}}}}var oe,fe;String.prototype.normalize?(oe=function(w){return w.normalize("NFD").toLowerCase()},fe=function(w){return w.normalize("NFD")}):(oe=function(w){return w.toLowerCase()},fe=function(w){return w});function J(w,M,B,Z){if(w.length==M.length)return B;for(var ae=0,H=B+Math.max(0,w.length-M.length);;){if(ae==H)return ae;var le=ae+H>>1,z=Z(w.slice(0,le)).length;if(z==B)return le;z>B?H=le:ae=le+1}}function F(w,M,B,Z){if(!M.length)return null;var ae=Z?oe:fe,H=ae(M).split(/\r|\n\r?/);e:for(var le=B.line,z=B.ch,q=w.lastLine()+1-H.length;le<=q;le++,z=0){var pe=w.getLine(le).slice(z),xe=ae(pe);if(H.length==1){var Q=xe.indexOf(H[0]);if(Q==-1)continue e;var B=J(pe,xe,Q,ae)+z;return{from:O(le,J(pe,xe,Q,ae)+z),to:O(le,J(pe,xe,Q+H[0].length,ae)+z)}}else{var ye=xe.length-H[0].length;if(xe.slice(ye)!=H[0])continue e;for(var ie=1;ie<H.length-1;ie++)if(ae(w.getLine(le+ie))!=H[ie])continue e;var je=w.getLine(le+H.length-1),ze=ae(je),Ue=H[H.length-1];if(ze.slice(0,Ue.length)!=Ue)continue e;return{from:O(le,J(pe,xe,ye,ae)+z),to:O(le+H.length-1,J(je,ze,Ue.length,ae))}}}}function ee(w,M,B,Z){if(!M.length)return null;var ae=Z?oe:fe,H=ae(M).split(/\r|\n\r?/);e:for(var le=B.line,z=B.ch,q=w.firstLine()-1+H.length;le>=q;le--,z=-1){var pe=w.getLine(le);z>-1&&(pe=pe.slice(0,z));var xe=ae(pe);if(H.length==1){var Q=xe.lastIndexOf(H[0]);if(Q==-1)continue e;return{from:O(le,J(pe,xe,Q,ae)),to:O(le,J(pe,xe,Q+H[0].length,ae))}}else{var ye=H[H.length-1];if(xe.slice(0,ye.length)!=ye)continue e;for(var ie=1,B=le-H.length+1;ie<H.length-1;ie++)if(ae(w.getLine(B+ie))!=H[ie])continue e;var je=w.getLine(le+1-H.length),ze=ae(je);if(ze.slice(ze.length-H[0].length)!=H[0])continue e;return{from:O(le+1-H.length,J(je,ze,je.length-H[0].length,ae)),to:O(le,J(pe,xe,ye.length,ae))}}}}function N(w,M,B,Z){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=w,B=B?w.clipPos(B):O(0,0),this.pos={from:B,to:B};var ae;typeof Z=="object"?ae=Z.caseFold:(ae=Z,Z=null),typeof M=="string"?(ae==null&&(ae=!1),this.matches=function(H,le){return(H?ee:F)(w,M,le,ae)}):(M=L(M,"gm"),!Z||Z.multiline!==!1?this.matches=function(H,le){return(H?he:X)(w,M,le)}:this.matches=function(H,le){return(H?re:j)(w,M,le)})}N.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(w){var M=this.doc.clipPos(w?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(M=O(M.line,M.ch),w?(M.ch--,M.ch<0&&(M.line--,M.ch=(this.doc.getLine(M.line)||"").length)):(M.ch++,M.ch>(this.doc.getLine(M.line)||"").length&&(M.ch=0,M.line++)),m.cmpPos(M,this.doc.clipPos(M))!=0))return this.atOccurrence=!1;var B=this.matches(w,M);if(this.afterEmptyMatch=B&&m.cmpPos(B.from,B.to)==0,B)return this.pos=B,this.atOccurrence=!0,this.pos.match||!0;var Z=O(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:Z,to:Z},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,M){if(this.atOccurrence){var B=m.splitLines(w);this.doc.replaceRange(B,this.pos.from,this.pos.to,M),this.pos.to=O(this.pos.from.line+B.length-1,B[B.length-1].length+(B.length==1?this.pos.from.ch:0))}}},m.defineExtension("getSearchCursor",function(w,M,B){return new N(this.doc,w,M,B)}),m.defineDocExtension("getSearchCursor",function(w,M,B){return new N(this,w,M,B)}),m.defineExtension("selectMatches",function(w,M){for(var B=[],Z=this.getSearchCursor(w,this.getCursor("from"),M);Z.findNext()&&!(m.cmpPos(Z.to(),this.getCursor("to"))>0);)B.push({anchor:Z.from(),head:Z.to()});B.length&&this.setSelections(B,0)})})},46944:function(S){(function(R,c){S.exports=c()})(this,function(){"use strict";var R=navigator.userAgent,c=navigator.platform,m=/gecko\/\d/i.test(R),O=/MSIE \d/.test(R),k=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(R),L=/Edge\/(\d+)/.exec(R),D=O||k||L,j=D&&(O?document.documentMode||6:+(L||k)[1]),X=!L&&/WebKit\//.test(R),te=X&&/Qt\/\d+\.\d+/.test(R),re=!L&&/Chrome\/(\d+)/.exec(R),he=re&&+re[1],oe=/Opera\//.test(R),fe=/Apple Computer/.test(navigator.vendor),J=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(R),F=/PhantomJS/.test(R),ee=fe&&(/Mobile\/\w+/.test(R)||navigator.maxTouchPoints>2),N=/Android/.test(R),w=ee||N||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(R),M=ee||/Mac/.test(c),B=/\bCrOS\b/.test(R),Z=/win/i.test(c),ae=oe&&R.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(oe=!1,X=!0);var H=M&&(te||oe&&(ae==null||ae<12.11)),le=m||D&&j>=9;function z(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var q=function(t,n){var l=t.className,s=z(n).exec(l);if(s){var u=l.slice(s.index+s[0].length);t.className=l.slice(0,s.index)+(u?s[1]+u:"")}};function pe(t){for(var n=t.childNodes.length;n>0;--n)t.removeChild(t.firstChild);return t}function xe(t,n){return pe(t).appendChild(n)}function Q(t,n,l,s){var u=document.createElement(t);if(l&&(u.className=l),s&&(u.style.cssText=s),typeof n=="string")u.appendChild(document.createTextNode(n));else if(n)for(var p=0;p<n.length;++p)u.appendChild(n[p]);return u}function ye(t,n,l,s){var u=Q(t,n,l,s);return u.setAttribute("role","presentation"),u}var ie;document.createRange?ie=function(t,n,l,s){var u=document.createRange();return u.setEnd(s||t,l),u.setStart(t,n),u}:ie=function(t,n,l){var s=document.body.createTextRange();try{s.moveToElementText(t.parentNode)}catch{return s}return s.collapse(!0),s.moveEnd("character",l),s.moveStart("character",n),s};function je(t,n){if(n.nodeType==3&&(n=n.parentNode),t.contains)return t.contains(n);do if(n.nodeType==11&&(n=n.host),n==t)return!0;while(n=n.parentNode)}function ze(t){var n;try{n=t.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function Ue(t,n){var l=t.className;z(n).test(l)||(t.className+=(l?" ":"")+n)}function vt(t,n){for(var l=t.split(" "),s=0;s<l.length;s++)l[s]&&!z(l[s]).test(n)&&(n+=" "+l[s]);return n}var pt=function(t){t.select()};ee?pt=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:D&&(pt=function(t){try{t.select()}catch{}});function ut(t){return t.display.wrapper.ownerDocument}function er(t){return ut(t).defaultView}function gt(t){var n=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,n)}}function Rt(t,n,l){n||(n={});for(var s in t)t.hasOwnProperty(s)&&(l!==!1||!n.hasOwnProperty(s))&&(n[s]=t[s]);return n}function st(t,n,l,s,u){n==null&&(n=t.search(/[^\s\u00a0]/),n==-1&&(n=t.length));for(var p=s||0,y=u||0;;){var x=t.indexOf(" ",p);if(x<0||x>=n)return y+(n-p);y+=x-p,y+=l-y%l,p=x+1}}var He=function(){this.id=null,this.f=null,this.time=0,this.handler=gt(this.onTimeout,this)};He.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},He.prototype.set=function(t,n){this.f=n;var l=+new Date+t;(!this.id||l<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=l)};function Re(t,n){for(var l=0;l<t.length;++l)if(t[l]==n)return l;return-1}var Be=50,lt={toString:function(){return"CodeMirror.Pass"}},_t={scroll:!1},rt={origin:"*mouse"},Pt={origin:"+move"};function tr(t,n,l){for(var s=0,u=0;;){var p=t.indexOf(" ",s);p==-1&&(p=t.length);var y=p-s;if(p==t.length||u+y>=n)return s+Math.min(y,n-u);if(u+=p-s,u+=l-u%l,s=p+1,u>=n)return s}}var or=[""];function kr(t){for(;or.length<=t;)or.push(et(or)+" ");return or[t]}function et(t){return t[t.length-1]}function Et(t,n){for(var l=[],s=0;s<t.length;s++)l[s]=n(t[s],s);return l}function jt(t,n,l){for(var s=0,u=l(n);s<t.length&&l(t[s])<=u;)s++;t.splice(s,0,n)}function _r(){}function zt(t,n){var l;return Object.create?l=Object.create(t):(_r.prototype=t,l=new _r),n&&Rt(n,l),l}var Bn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Vn(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||Bn.test(t))}function nn(t,n){return n?n.source.indexOf("\\w")>-1&&Vn(t)?!0:n.test(t):Vn(t)}function Cn(t){for(var n in t)if(t.hasOwnProperty(n)&&t[n])return!1;return!0}var ri=/[\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 jn(t){return t.charCodeAt(0)>=768&&ri.test(t)}function an(t,n,l){for(;(l<0?n>0:n<t.length)&&jn(t.charAt(n));)n+=l;return n}function Mr(t,n,l){for(var s=n>l?-1:1;;){if(n==l)return n;var u=(n+l)/2,p=s<0?Math.ceil(u):Math.floor(u);if(p==n)return t(p)?n:l;t(p)?l=p:n=p+s}}function zr(t,n,l,s){if(!t)return s(n,l,"ltr",0);for(var u=!1,p=0;p<t.length;++p){var y=t[p];(y.from<l&&y.to>n||n==l&&y.to==n)&&(s(Math.max(y.from,n),Math.min(y.to,l),y.level==1?"rtl":"ltr",p),u=!0)}u||s(n,l,"ltr")}var Gt=null;function St(t,n,l){var s;Gt=null;for(var u=0;u<t.length;++u){var p=t[u];if(p.from<n&&p.to>n)return u;p.to==n&&(p.from!=p.to&&l=="before"?s=u:Gt=u),p.from==n&&(p.from!=p.to&&l!="before"?s=u:Gt=u)}return s??Gt}var ft=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function l(P){return P<=247?t.charAt(P):1424<=P&&P<=1524?"R":1536<=P&&P<=1785?n.charAt(P-1536):1774<=P&&P<=2220?"r":8192<=P&&P<=8203?"w":P==8204?"b":"L"}var s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,y=/[Lb1n]/,x=/[1n]/;function C(P,K,ne){this.level=P,this.from=K,this.to=ne}return function(P,K){var ne=K=="ltr"?"L":"R";if(P.length==0||K=="ltr"&&!s.test(P))return!1;for(var ve=P.length,de=[],Ee=0;Ee<ve;++Ee)de.push(l(P.charCodeAt(Ee)));for(var Ae=0,Ie=ne;Ae<ve;++Ae){var Le=de[Ae];Le=="m"?de[Ae]=Ie:Ie=Le}for(var De=0,Ne=ne;De<ve;++De){var We=de[De];We=="1"&&Ne=="r"?de[De]="n":p.test(We)&&(Ne=We,We=="r"&&(de[De]="R"))}for(var Qe=1,Ke=de[0];Qe<ve-1;++Qe){var bt=de[Qe];bt=="+"&&Ke=="1"&&de[Qe+1]=="1"?de[Qe]="1":bt==","&&Ke==de[Qe+1]&&(Ke=="1"||Ke=="n")&&(de[Qe]=Ke),Ke=bt}for(var $t=0;$t<ve;++$t){var wr=de[$t];if(wr==",")de[$t]="N";else if(wr=="%"){var rr=void 0;for(rr=$t+1;rr<ve&&de[rr]=="%";++rr);for(var Sn=$t&&de[$t-1]=="!"||rr<ve&&de[rr]=="1"?"1":"N",fn=$t;fn<rr;++fn)de[fn]=Sn;$t=rr-1}}for(var vr=0,tn=ne;vr<ve;++vr){var Ir=de[vr];tn=="L"&&Ir=="1"?de[vr]="L":p.test(Ir)&&(tn=Ir)}for(var mr=0;mr<ve;++mr)if(u.test(de[mr])){var gr=void 0;for(gr=mr+1;gr<ve&&u.test(de[gr]);++gr);for(var ur=(mr?de[mr-1]:ne)=="L",cn=(gr<ve?de[gr]:ne)=="L",Po=ur==cn?ur?"L":"R":ne,Sa=mr;Sa<gr;++Sa)de[Sa]=Po;mr=gr-1}for(var jr=[],Jn,Cr=0;Cr<ve;)if(y.test(de[Cr])){var Lf=Cr;for(++Cr;Cr<ve&&y.test(de[Cr]);++Cr);jr.push(new C(0,Lf,Cr))}else{var zi=Cr,no=jr.length,io=K=="rtl"?1:0;for(++Cr;Cr<ve&&de[Cr]!="L";++Cr);for(var Wr=zi;Wr<Cr;)if(x.test(de[Wr])){zi<Wr&&(jr.splice(no,0,new C(1,zi,Wr)),no+=io);var Fn=Wr;for(++Wr;Wr<Cr&&x.test(de[Wr]);++Wr);jr.splice(no,0,new C(2,Fn,Wr)),no+=io,zi=Wr}else++Wr;zi<Cr&&jr.splice(no,0,new C(1,zi,Cr))}return K=="ltr"&&(jr[0].level==1&&(Jn=P.match(/^\s+/))&&(jr[0].from=Jn[0].length,jr.unshift(new C(0,0,Jn[0].length))),et(jr).level==1&&(Jn=P.match(/\s+$/))&&(et(jr).to-=Jn[0].length,jr.push(new C(0,ve-Jn[0].length,ve)))),K=="rtl"?jr.reverse():jr}}();function tt(t,n){var l=t.order;return l==null&&(l=t.order=ft(t.text,n)),l}var mt=[],se=function(t,n,l){if(t.addEventListener)t.addEventListener(n,l,!1);else if(t.attachEvent)t.attachEvent("on"+n,l);else{var s=t._handlers||(t._handlers={});s[n]=(s[n]||mt).concat(l)}};function we(t,n){return t._handlers&&t._handlers[n]||mt}function Ve(t,n,l){if(t.removeEventListener)t.removeEventListener(n,l,!1);else if(t.detachEvent)t.detachEvent("on"+n,l);else{var s=t._handlers,u=s&&s[n];if(u){var p=Re(u,l);p>-1&&(s[n]=u.slice(0,p).concat(u.slice(p+1)))}}}function nt(t,n){var l=we(t,n);if(l.length)for(var s=Array.prototype.slice.call(arguments,2),u=0;u<l.length;++u)l[u].apply(null,s)}function ht(t,n,l){return typeof n=="string"&&(n={type:n,preventDefault:function(){this.defaultPrevented=!0}}),nt(t,l||n.type,t,n),vi(n)||n.codemirrorIgnore}function ct(t){var n=t._handlers&&t._handlers.cursorActivity;if(n)for(var l=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),s=0;s<n.length;++s)Re(l,n[s])==-1&&l.push(n[s])}function Qt(t,n){return we(t,n).length>0}function Gr(t){t.prototype.on=function(n,l){se(this,n,l)},t.prototype.off=function(n,l){Ve(this,n,l)}}function Ft(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function dr(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function vi(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function Nr(t){Ft(t),dr(t)}function Rr(t){return t.target||t.srcElement}function gi(t){var n=t.which;return n==null&&(t.button&1?n=1:t.button&2?n=3:t.button&4&&(n=2)),M&&t.ctrlKey&&n==1&&(n=3),n}var $r=function(){if(D&&j<9)return!1;var t=Q("div");return"draggable"in t||"dragDrop"in t}(),ni;function ii(t){if(ni==null){var n=Q("span","\u200B");xe(t,Q("span",[n,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&(ni=n.offsetWidth<=1&&n.offsetHeight>2&&!(D&&j<8))}var l=ni?Q("span","\u200B"):Q("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return l.setAttribute("cm-text",""),l}var Dr;function mi(t){if(Dr!=null)return Dr;var n=xe(t,document.createTextNode("A\u062EA")),l=ie(n,0,1).getBoundingClientRect(),s=ie(n,1,2).getBoundingClientRect();return pe(t),!l||l.left==l.right?!1:Dr=s.right-l.right<3}var Wn=`
|
|
14
14
|
|
|
15
|
-
b`.split(/\n/).length!=3?function(
|
|
16
|
-
`,r);l==-1&&(l=e.length);var d=e.slice(r,e.charAt(l-1)=="\r"?l-1:l),g=d.indexOf("\r");g!=-1?(a.push(d.slice(0,g)),r+=g+1):(a.push(d),r=l+1)}return a}:function(e){return e.split(/\r\n?|\n/)},qn=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch{}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},$i=function(){var e=G("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Kr=null;function Ir(e){if(Kr!=null)return Kr;var r=ge(e,G("span","x")),a=r.getBoundingClientRect(),o=ee(r,0,1).getBoundingClientRect();return Kr=Math.abs(a.left-o.left)>1}var Yr={},Ur={};function zr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),Yr[e]=r}function To(e,r){Ur[e]=r}function mn(e){if(typeof e=="string"&&Ur.hasOwnProperty(e))e=Ur[e];else if(e&&typeof e.name=="string"&&Ur.hasOwnProperty(e.name)){var r=Ur[e.name];typeof r=="string"&&(r={name:r}),e=Ft(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return mn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return mn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Mr(e,r){r=mn(r);var a=Yr[r.name];if(!a)return Mr(e,"text/plain");var o=a(e,r);if(nr.hasOwnProperty(r.name)){var l=nr[r.name];for(var d in l)l.hasOwnProperty(d)&&(o.hasOwnProperty(d)&&(o["_"+d]=o[d]),o[d]=l[d])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var g in r.modeProps)o[g]=r.modeProps[g];return o}var nr={};function Ln(e,r){var a=nr.hasOwnProperty(e)?nr[e]:nr[e]={};At(r,a)}function rn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var a={};for(var o in r){var l=r[o];l instanceof Array&&(l=l.concat([])),a[o]=l}return a}function Gi(e,r){for(var a;e.innerMode&&(a=e.innerMode(r),!(!a||a.mode==e));)r=a.state,e=a.mode;return a||{mode:e,state:r}}function sa(e,r,a){return e.startState?e.startState(r,a):!0}var Ut=function(e,r,a){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};Ut.prototype.eol=function(){return this.pos>=this.string.length},Ut.prototype.sol=function(){return this.pos==this.lineStart},Ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ut.prototype.eat=function(e){var r=this.string.charAt(this.pos),a;if(typeof e=="string"?a=r==e:a=r&&(e.test?e.test(r):e(r)),a)return++this.pos,r},Ut.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},Ut.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ut.prototype.skipToEnd=function(){this.pos=this.string.length},Ut.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},Ut.prototype.backUp=function(e){this.pos-=e},Ut.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=nt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?nt(this.string,this.lineStart,this.tabSize):0)},Ut.prototype.indentation=function(){return nt(this.string,null,this.tabSize)-(this.lineStart?nt(this.string,this.lineStart,this.tabSize):0)},Ut.prototype.match=function(e,r,a){if(typeof e=="string"){var o=function(g){return a?g.toLowerCase():g},l=this.string.substr(this.pos,e.length);if(o(l)==o(e))return r!==!1&&(this.pos+=e.length),!0}else{var d=this.string.slice(this.pos).match(e);return d&&d.index>0?null:(d&&r!==!1&&(this.pos+=d[0].length),d)}},Ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ut.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},Ut.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},Ut.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function $e(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var a=e;!a.lines;)for(var o=0;;++o){var l=a.children[o],d=l.chunkSize();if(r<d){a=l;break}r-=d}return a.lines[r]}function Hn(e,r,a){var o=[],l=r.line;return e.iter(r.line,a.line+1,function(d){var g=d.text;l==a.line&&(g=g.slice(0,a.ch)),l==r.line&&(g=g.slice(r.ch)),o.push(g),++l}),o}function pi(e,r,a){var o=[];return e.iter(r,a,function(l){o.push(l.text)}),o}function nn(e,r){var a=r-e.height;if(a)for(var o=e;o;o=o.parent)o.height+=a}function wt(e){if(e.parent==null)return null;for(var r=e.parent,a=Fe(r.lines,e),o=r.parent;o;r=o,o=o.parent)for(var l=0;o.children[l]!=r;++l)a+=o.children[l].chunkSize();return a+r.first}function Un(e,r){var a=e.first;e:do{for(var o=0;o<e.children.length;++o){var l=e.children[o],d=l.height;if(r<d){e=l;continue e}r-=d,a+=l.chunkSize()}return a}while(!e.lines);for(var g=0;g<e.lines.length;++g){var b=e.lines[g],w=b.height;if(r<w)break;r-=w}return a+g}function vi(e,r){return r>=e.first&&r<e.first+e.size}function Ki(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function A(e,r,a){if(a===void 0&&(a=null),!(this instanceof A))return new A(e,r,a);this.line=e,this.ch=r,this.sticky=a}function z(e,r){return e.line-r.line||e.ch-r.ch}function Se(e,r){return e.sticky==r.sticky&&z(e,r)==0}function Pe(e){return A(e.line,e.ch)}function tt(e,r){return z(e,r)<0?r:e}function yt(e,r){return z(e,r)<0?e:r}function Ct(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function Ge(e,r){if(r.line<e.first)return A(e.first,0);var a=e.first+e.size-1;return r.line>a?A(a,$e(e,a).text.length):on(r,$e(e,r.line).text.length)}function on(e,r){var a=e.ch;return a==null||a>r?A(e.line,r):a<0?A(e.line,0):e}function Po(e,r){for(var a=[],o=0;o<r.length;o++)a[o]=Ge(e,r[o]);return a}var la=function(e,r){this.state=e,this.lookAhead=r},In=function(e,r,a,o){this.state=r,this.doc=e,this.line=a,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};In.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},In.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},In.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},In.fromSaved=function(e,r,a){return r instanceof la?new In(e,rn(e.mode,r.state),a,r.lookAhead):new In(e,rn(e.mode,r),a)},In.prototype.save=function(e){var r=e!==!1?rn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new la(r,this.maxLookAhead):r};function tl(e,r,a,o){var l=[e.state.modeGen],d={};nl(e,r.text,e.doc.mode,a,function(k,H){return l.push(k,H)},d,o);for(var g=a.state,b=function(k){a.baseTokens=l;var H=e.state.overlays[k],X=1,de=0;a.state=!0,nl(e,r.text,H.mode,a,function(ue,xe){for(var Ce=X;de<ue;){var Ie=l[X];Ie>ue&&l.splice(X,1,ue,l[X+1],Ie),X+=2,de=Math.min(ue,Ie)}if(xe)if(H.opaque)l.splice(Ce,X-Ce,ue,"overlay "+xe),X=Ce+2;else for(;Ce<X;Ce+=2){var De=l[Ce+1];l[Ce+1]=(De?De+" ":"")+"overlay "+xe}},d),a.state=g,a.baseTokens=null,a.baseTokenPos=1},w=0;w<e.state.overlays.length;++w)b(w);return{styles:l,classes:d.bgClass||d.textClass?d:null}}function qa(e,r,a){if(!r.styles||r.styles[0]!=e.state.modeGen){var o=Yi(e,wt(r)),l=r.text.length>e.options.maxHighlightLength&&rn(e.doc.mode,o.state),d=tl(e,r,o);l&&(o.state=l),r.stateAfter=o.save(!l),r.styles=d.styles,d.classes?r.styleClasses=d.classes:r.styleClasses&&(r.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function Yi(e,r,a){var o=e.doc,l=e.display;if(!o.mode.startState)return new In(o,!0,r);var d=_u(e,r,a),g=d>o.first&&$e(o,d-1).stateAfter,b=g?In.fromSaved(o,g,d):new In(o,sa(o.mode),d);return o.iter(d,r,function(w){ua(e,w.text,b);var k=b.line;w.stateAfter=k==r-1||k%5==0||k>=l.viewFrom&&k<l.viewTo?b.save():null,b.nextLine()}),a&&(o.modeFrontier=b.line),b}function ua(e,r,a,o){var l=e.doc.mode,d=new Ut(r,e.options.tabSize,a);for(d.start=d.pos=o||0,r==""&&yn(l,a.state);!d.eol();)zn(l,d,a.state),d.start=d.pos}function yn(e,r){if(e.blankLine)return e.blankLine(r);if(e.innerMode){var a=Gi(e,r);if(a.mode.blankLine)return a.mode.blankLine(a.state)}}function zn(e,r,a,o){for(var l=0;l<10;l++){o&&(o[0]=Gi(e,a).mode);var d=e.token(r,a);if(r.pos>r.start)return d}throw new Error("Mode "+e.name+" failed to advance stream.")}var Nr=function(e,r,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=a};function gi(e,r,a,o){var l=e.doc,d=l.mode,g;r=Ge(l,r);var b=$e(l,r.line),w=Yi(e,r.line,a),k=new Ut(b.text,e.options.tabSize,w),H;for(o&&(H=[]);(o||k.pos<r.ch)&&!k.eol();)k.start=k.pos,g=zn(d,k,w.state),o&&H.push(new Nr(k,g,rn(l.mode,w.state)));return o?H:new Nr(k,g,w.state)}function rl(e,r){if(e)for(;;){var a=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!a)break;e=e.slice(0,a.index)+e.slice(a.index+a[0].length);var o=a[1]?"bgClass":"textClass";r[o]==null?r[o]=a[2]:new RegExp("(?:^|\\s)"+a[2]+"(?:$|\\s)").test(r[o])||(r[o]+=" "+a[2])}return e}function nl(e,r,a,o,l,d,g){var b=a.flattenSpans;b==null&&(b=e.options.flattenSpans);var w=0,k=null,H=new Ut(r,e.options.tabSize,o),X,de=e.options.addModeClass&&[null];for(r==""&&rl(yn(a,o.state),d);!H.eol();){if(H.pos>e.options.maxHighlightLength?(b=!1,g&&ua(e,r,o,H.pos),H.pos=r.length,X=null):X=rl(zn(a,H,o.state,de),d),de){var ue=de[0].name;ue&&(X="m-"+(X?ue+" "+X:ue))}if(!b||k!=X){for(;w<H.start;)w=Math.min(H.start,w+5e3),l(w,k);k=X}H.start=H.pos}for(;w<H.pos;){var xe=Math.min(H.pos,w+5e3);l(xe,k),w=xe}}function _u(e,r,a){for(var o,l,d=e.doc,g=a?-1:r-(e.doc.mode.innerMode?1e3:100),b=r;b>g;--b){if(b<=d.first)return d.first;var w=$e(d,b-1),k=w.stateAfter;if(k&&(!a||b+(k instanceof la?k.lookAhead:0)<=d.modeFrontier))return b;var H=nt(w.text,null,e.options.tabSize);(l==null||o>H)&&(l=b-1,o=H)}return l}function il(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),!(e.highlightFrontier<r-10)){for(var a=e.first,o=r-1;o>a;o--){var l=$e(e,o).stateAfter;if(l&&(!(l instanceof la)||o+l.lookAhead<r)){a=o+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,a)}}var ol=!1,Mn=!1;function al(){ol=!0}function Xi(){Mn=!0}function fa(e,r,a){this.marker=e,this.from=r,this.to=a}function Ji(e,r){if(e)for(var a=0;a<e.length;++a){var o=e[a];if(o.marker==r)return o}}function Xe(e,r){for(var a,o=0;o<e.length;++o)e[o]!=r&&(a||(a=[])).push(e[o]);return a}function ca(e,r,a){var o=a&&window.WeakSet&&(a.markedSpans||(a.markedSpans=new WeakSet));o&&e.markedSpans&&o.has(e.markedSpans)?e.markedSpans.push(r):(e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],o&&o.add(e.markedSpans)),r.marker.attachLine(e)}function sl(e,r,a){var o;if(e)for(var l=0;l<e.length;++l){var d=e[l],g=d.marker,b=d.from==null||(g.inclusiveLeft?d.from<=r:d.from<r);if(b||d.from==r&&g.type=="bookmark"&&(!a||!d.marker.insertLeft)){var w=d.to==null||(g.inclusiveRight?d.to>=r:d.to>r);(o||(o=[])).push(new fa(g,d.from,w?null:d.to))}}return o}function ei(e,r,a){var o;if(e)for(var l=0;l<e.length;++l){var d=e[l],g=d.marker,b=d.to==null||(g.inclusiveRight?d.to>=r:d.to>r);if(b||d.from==r&&g.type=="bookmark"&&(!a||d.marker.insertLeft)){var w=d.from==null||(g.inclusiveLeft?d.from<=r:d.from<r);(o||(o=[])).push(new fa(g,w?null:d.from-r,d.to==null?null:d.to-r))}}return o}function da(e,r){if(r.full)return null;var a=vi(e,r.from.line)&&$e(e,r.from.line).markedSpans,o=vi(e,r.to.line)&&$e(e,r.to.line).markedSpans;if(!a&&!o)return null;var l=r.from.ch,d=r.to.ch,g=z(r.from,r.to)==0,b=sl(a,l,g),w=ei(o,d,g),k=r.text.length==1,H=Qe(r.text).length+(k?l:0);if(b)for(var X=0;X<b.length;++X){var de=b[X];if(de.to==null){var ue=Ji(w,de.marker);ue?k&&(de.to=ue.to==null?null:ue.to+H):de.to=l}}if(w)for(var xe=0;xe<w.length;++xe){var Ce=w[xe];if(Ce.to!=null&&(Ce.to+=H),Ce.from==null){var Ie=Ji(b,Ce.marker);Ie||(Ce.from=H,k&&(b||(b=[])).push(Ce))}else Ce.from+=H,k&&(b||(b=[])).push(Ce)}b&&(b=mi(b)),w&&w!=b&&(w=mi(w));var De=[b];if(!k){var Ne=r.text.length-2,Oe;if(Ne>0&&b)for(var Re=0;Re<b.length;++Re)b[Re].to==null&&(Oe||(Oe=[])).push(new fa(b[Re].marker,null,null));for(var Ye=0;Ye<Ne;++Ye)De.push(Oe);De.push(w)}return De}function mi(e){for(var r=0;r<e.length;++r){var a=e[r];a.from!=null&&a.from==a.to&&a.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function es(e,r,a){var o=null;if(e.iter(r.line,a.line+1,function(ue){if(ue.markedSpans)for(var xe=0;xe<ue.markedSpans.length;++xe){var Ce=ue.markedSpans[xe].marker;Ce.readOnly&&(!o||Fe(o,Ce)==-1)&&(o||(o=[])).push(Ce)}}),!o)return null;for(var l=[{from:r,to:a}],d=0;d<o.length;++d)for(var g=o[d],b=g.find(0),w=0;w<l.length;++w){var k=l[w];if(!(z(k.to,b.from)<0||z(k.from,b.to)>0)){var H=[w,1],X=z(k.from,b.from),de=z(k.to,b.to);(X<0||!g.inclusiveLeft&&!X)&&H.push({from:k.from,to:b.from}),(de>0||!g.inclusiveRight&&!de)&&H.push({from:b.to,to:k.to}),l.splice.apply(l,H),w+=H.length-3}}return l}function ir(e){var r=e.markedSpans;if(r){for(var a=0;a<r.length;++a)r[a].marker.detachLine(e);e.markedSpans=null}}function Lo(e,r){if(r){for(var a=0;a<r.length;++a)r[a].marker.attachLine(e);e.markedSpans=r}}function Qi(e){return e.inclusiveLeft?-1:0}function ha(e){return e.inclusiveRight?1:0}function ts(e,r){var a=e.lines.length-r.lines.length;if(a!=0)return a;var o=e.find(),l=r.find(),d=z(o.from,l.from)||Qi(e)-Qi(r);if(d)return-d;var g=z(o.to,l.to)||ha(e)-ha(r);return g||r.id-e.id}function ll(e,r){var a=Mn&&e.markedSpans,o;if(a)for(var l=void 0,d=0;d<a.length;++d)l=a[d],l.marker.collapsed&&(r?l.from:l.to)==null&&(!o||ts(o,l.marker)<0)&&(o=l.marker);return o}function ul(e){return ll(e,!0)}function pa(e){return ll(e,!1)}function fl(e,r){var a=Mn&&e.markedSpans,o;if(a)for(var l=0;l<a.length;++l){var d=a[l];d.marker.collapsed&&(d.from==null||d.from<r)&&(d.to==null||d.to>r)&&(!o||ts(o,d.marker)<0)&&(o=d.marker)}return o}function cl(e,r,a,o,l){var d=$e(e,r),g=Mn&&d.markedSpans;if(g)for(var b=0;b<g.length;++b){var w=g[b];if(w.marker.collapsed){var k=w.marker.find(0),H=z(k.from,a)||Qi(w.marker)-Qi(l),X=z(k.to,o)||ha(w.marker)-ha(l);if(!(H>=0&&X<=0||H<=0&&X>=0)&&(H<=0&&(w.marker.inclusiveRight&&l.inclusiveLeft?z(k.to,a)>=0:z(k.to,a)>0)||H>=0&&(w.marker.inclusiveRight&&l.inclusiveLeft?z(k.from,o)<=0:z(k.from,o)<0)))return!0}}}function bn(e){for(var r;r=ul(e);)e=r.find(-1,!0).line;return e}function Vu(e){for(var r;r=pa(e);)e=r.find(1,!0).line;return e}function $u(e){for(var r,a;r=pa(e);)e=r.find(1,!0).line,(a||(a=[])).push(e);return a}function ti(e,r){var a=$e(e,r),o=bn(a);return a==o?r:wt(o)}function dl(e,r){if(r>e.lastLine())return r;var a=$e(e,r),o;if(!_n(e,a))return r;for(;o=pa(a);)a=o.find(1,!0).line;return wt(a)+1}function _n(e,r){var a=Mn&&r.markedSpans;if(a){for(var o=void 0,l=0;l<a.length;++l)if(o=a[l],!!o.marker.collapsed){if(o.from==null)return!0;if(!o.marker.widgetNode&&o.from==0&&o.marker.inclusiveLeft&&rs(e,r,o))return!0}}}function rs(e,r,a){if(a.to==null){var o=a.marker.find(1,!0);return rs(e,o.line,Ji(o.line.markedSpans,a.marker))}if(a.marker.inclusiveRight&&a.to==r.text.length)return!0;for(var l=void 0,d=0;d<r.markedSpans.length;++d)if(l=r.markedSpans[d],l.marker.collapsed&&!l.marker.widgetNode&&l.from==a.to&&(l.to==null||l.to!=a.from)&&(l.marker.inclusiveLeft||a.marker.inclusiveRight)&&rs(e,r,l))return!0}function Vn(e){e=bn(e);for(var r=0,a=e.parent,o=0;o<a.lines.length;++o){var l=a.lines[o];if(l==e)break;r+=l.height}for(var d=a.parent;d;a=d,d=a.parent)for(var g=0;g<d.children.length;++g){var b=d.children[g];if(b==a)break;r+=b.height}return r}function va(e){if(e.height==0)return 0;for(var r=e.text.length,a,o=e;a=ul(o);){var l=a.find(0,!0);o=l.from.line,r+=l.from.ch-l.to.ch}for(o=e;a=pa(o);){var d=a.find(0,!0);r-=o.text.length-d.from.ch,o=d.to.line,r+=o.text.length-d.to.ch}return r}function ns(e){var r=e.display,a=e.doc;r.maxLine=$e(a,a.first),r.maxLineLength=va(r.maxLine),r.maxLineChanged=!0,a.iter(function(o){var l=va(o);l>r.maxLineLength&&(r.maxLineLength=l,r.maxLine=o)})}var yi=function(e,r,a){this.text=e,Lo(this,r),this.height=a?a(this):1};yi.prototype.lineNo=function(){return wt(this)},Er(yi);function hl(e,r,a,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ir(e),Lo(e,a);var l=o?o(e):1;l!=e.height&&nn(e,l)}function pl(e){e.parent=null,ir(e)}var is={},Gu={};function Zi(e,r){if(!e||/^\s*$/.test(e))return null;var a=r.addModeClass?Gu:is;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function vl(e,r){var a=ve("span",null,null,_?"padding-right: .1px":null),o={pre:ve("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var l=0;l<=(r.rest?r.rest.length:0);l++){var d=l?r.rest[l-1]:r.line,g=void 0;o.pos=0,o.addToken=Yu,Wn(e.display.measure)&&(g=Ze(d,e.doc.direction))&&(o.addToken=os(o.addToken,g)),o.map=[];var b=r!=e.display.externalMeasured&&wt(d);Ju(d,o,qa(e,d,b)),d.styleClasses&&(d.styleClasses.bgClass&&(o.bgClass=ct(d.styleClasses.bgClass,o.bgClass||"")),d.styleClasses.textClass&&(o.textClass=ct(d.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(Pn(e.display.measure))),l==0?(r.measure.map=o.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(o.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(_){var w=o.content.lastChild;(/\bcm-tab\b/.test(w.className)||w.querySelector&&w.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return et(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=ct(o.pre.className,o.textClass||"")),o}function Ku(e){var r=G("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Yu(e,r,a,o,l,d,g){if(r){var b=e.splitSpaces?Xu(r,e.trailingSpace):r,w=e.cm.state.specialChars,k=!1,H;if(!w.test(r))e.col+=r.length,H=document.createTextNode(b),e.map.push(e.pos,e.pos+r.length,H),D&&R<9&&(k=!0),e.pos+=r.length;else{H=document.createDocumentFragment();for(var X=0;;){w.lastIndex=X;var de=w.exec(r),ue=de?de.index-X:r.length-X;if(ue){var xe=document.createTextNode(b.slice(X,X+ue));D&&R<9?H.appendChild(G("span",[xe])):H.appendChild(xe),e.map.push(e.pos,e.pos+ue,xe),e.col+=ue,e.pos+=ue}if(!de)break;X+=ue+1;var Ce=void 0;if(de[0]==" "){var Ie=e.cm.options.tabSize,De=Ie-e.col%Ie;Ce=H.appendChild(G("span",dr(De),"cm-tab")),Ce.setAttribute("role","presentation"),Ce.setAttribute("cm-text"," "),e.col+=De}else de[0]=="\r"||de[0]==`
|
|
17
|
-
`?(Ce=H.appendChild(G("span",de[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ce.setAttribute("cm-text",de[0]),e.col+=1):(Ce=e.cm.options.specialCharPlaceholder(de[0]),Ce.setAttribute("cm-text",de[0]),D&&R<9?H.appendChild(G("span",[Ce])):H.appendChild(Ce),e.col+=1);e.map.push(e.pos,e.pos+1,Ce),e.pos++}}if(e.trailingSpace=b.charCodeAt(r.length-1)==32,a||o||l||k||d||g){var Ne=a||"";o&&(Ne+=o),l&&(Ne+=l);var Oe=G("span",[H],Ne,d);if(g)for(var Re in g)g.hasOwnProperty(Re)&&Re!="style"&&Re!="class"&&Oe.setAttribute(Re,g[Re]);return e.content.appendChild(Oe)}e.content.appendChild(H)}}function Xu(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",l=0;l<e.length;l++){var d=e.charAt(l);d==" "&&a&&(l==e.length-1||e.charCodeAt(l+1)==32)&&(d="\xA0"),o+=d,a=d==" "}return o}function os(e,r){return function(a,o,l,d,g,b,w){l=l?l+" cm-force-border":"cm-force-border";for(var k=a.pos,H=k+o.length;;){for(var X=void 0,de=0;de<r.length&&(X=r[de],!(X.to>k&&X.from<=k));de++);if(X.to>=H)return e(a,o,l,d,g,b,w);e(a,o.slice(0,X.to-k),l,d,null,b,w),d=null,o=o.slice(X.to-k),k=X.to}}}function gl(e,r,a,o){var l=!o&&a.widgetNode;l&&e.map.push(e.pos,e.pos+r,l),!o&&e.cm.display.input.needsContentAttribute&&(l||(l=e.content.appendChild(document.createElement("span"))),l.setAttribute("cm-marker",a.id)),l&&(e.cm.display.input.setUneditable(l),e.content.appendChild(l)),e.pos+=r,e.trailingSpace=!1}function Ju(e,r,a){var o=e.markedSpans,l=e.text,d=0;if(!o){for(var g=1;g<a.length;g+=2)r.addToken(r,l.slice(d,d=a[g]),Zi(a[g+1],r.cm.options));return}for(var b=l.length,w=0,k=1,H="",X,de,ue=0,xe,Ce,Ie,De,Ne;;){if(ue==w){xe=Ce=Ie=de="",Ne=null,De=null,ue=1/0;for(var Oe=[],Re=void 0,Ye=0;Ye<o.length;++Ye){var Ke=o[Ye],pt=Ke.marker;if(pt.type=="bookmark"&&Ke.from==w&&pt.widgetNode)Oe.push(pt);else if(Ke.from<=w&&(Ke.to==null||Ke.to>w||pt.collapsed&&Ke.to==w&&Ke.from==w)){if(Ke.to!=null&&Ke.to!=w&&ue>Ke.to&&(ue=Ke.to,Ce=""),pt.className&&(xe+=" "+pt.className),pt.css&&(de=(de?de+";":"")+pt.css),pt.startStyle&&Ke.from==w&&(Ie+=" "+pt.startStyle),pt.endStyle&&Ke.to==ue&&(Re||(Re=[])).push(pt.endStyle,Ke.to),pt.title&&((Ne||(Ne={})).title=pt.title),pt.attributes)for(var Bt in pt.attributes)(Ne||(Ne={}))[Bt]=pt.attributes[Bt];pt.collapsed&&(!De||ts(De.marker,pt)<0)&&(De=Ke)}else Ke.from>w&&ue>Ke.from&&(ue=Ke.from)}if(Re)for(var Zt=0;Zt<Re.length;Zt+=2)Re[Zt+1]==ue&&(Ce+=" "+Re[Zt]);if(!De||De.from==w)for(var Gt=0;Gt<Oe.length;++Gt)gl(r,0,Oe[Gt]);if(De&&(De.from||0)==w){if(gl(r,(De.to==null?b+1:De.to)-w,De.marker,De.from==null),De.to==null)return;De.to==w&&(De=!1)}}if(w>=b)break;for(var Tr=Math.min(b,ue);;){if(H){var Je=w+H.length;if(!De){var tr=Je>Tr?H.slice(0,Tr-w):H;r.addToken(r,tr,X?X+xe:xe,Ie,w+tr.length==ue?Ce:"",de,Ne)}if(Je>=Tr){H=H.slice(Tr-w),w=Tr;break}w=Je,Ie=""}H=l.slice(d,d=a[k++]),X=Zi(a[k++],r.cm.options)}}}function ml(e,r,a){this.line=r,this.rest=$u(r),this.size=this.rest?wt(Qe(this.rest))-a+1:1,this.node=this.text=null,this.hidden=_n(e,r)}function ga(e,r,a){for(var o=[],l,d=r;d<a;d=l){var g=new ml(e.doc,$e(e.doc,d),d);l=d+g.size,o.push(g)}return o}var bi=null;function Qu(e){bi?bi.ops.push(e):e.ownsGroup=bi={ops:[e],delayedCallbacks:[]}}function ma(e){var r=e.delayedCallbacks,a=0;do{for(;a<r.length;a++)r[a].call(null);for(var o=0;o<e.ops.length;o++){var l=e.ops[o];if(l.cursorActivityHandlers)for(;l.cursorActivityCalled<l.cursorActivityHandlers.length;)l.cursorActivityHandlers[l.cursorActivityCalled++].call(null,l.cm)}}while(a<r.length)}function Zu(e,r){var a=e.ownsGroup;if(a)try{ma(a)}finally{bi=null,r(a)}}var Io=null;function ar(e,r){var a=be(e,r);if(a.length){var o=Array.prototype.slice.call(arguments,2),l;bi?l=bi.delayedCallbacks:Io?l=Io:(l=Io=[],setTimeout(qu,0));for(var d=function(b){l.push(function(){return a[b].apply(null,o)})},g=0;g<a.length;++g)d(g)}}function qu(){var e=Io;Io=null;for(var r=0;r<e.length;++r)e[r]()}function as(e,r,a,o){for(var l=0;l<r.changes.length;l++){var d=r.changes[l];d=="text"?tf(e,r):d=="gutter"?br(e,r,a,o):d=="class"?ya(e,r):d=="widget"&&rf(e,r,o)}r.changes=null}function qi(e){return e.node==e.text&&(e.node=G("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),D&&R<8&&(e.node.style.zIndex=2)),e.node}function ef(e,r){var a=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),r.background)a?r.background.className=a:(r.background.parentNode.removeChild(r.background),r.background=null);else if(a){var o=qi(r);r.background=o.insertBefore(G("div",null,a),o.firstChild),e.display.input.setUneditable(r.background)}}function ss(e,r){var a=e.display.externalMeasured;return a&&a.line==r.line?(e.display.externalMeasured=null,r.measure=a.measure,a.built):vl(e,r)}function tf(e,r){var a=r.text.className,o=ss(e,r);r.text==r.node&&(r.node=o.pre),r.text.parentNode.replaceChild(o.pre,r.text),r.text=o.pre,o.bgClass!=r.bgClass||o.textClass!=r.textClass?(r.bgClass=o.bgClass,r.textClass=o.textClass,ya(e,r)):a&&(r.text.className=a)}function ya(e,r){ef(e,r),r.line.wrapClass?qi(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var a=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=a||""}function br(e,r,a,o){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var l=qi(r);r.gutterBackground=G("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px; width: "+o.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),l.insertBefore(r.gutterBackground,r.text)}var d=r.line.gutterMarkers;if(e.options.lineNumbers||d){var g=qi(r),b=r.gutter=G("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(b.setAttribute("aria-hidden","true"),e.display.input.setUneditable(b),g.insertBefore(b,r.text),r.line.gutterClass&&(b.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!d||!d["CodeMirror-linenumbers"])&&(r.lineNumber=b.appendChild(G("div",Ki(e.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),d)for(var w=0;w<e.display.gutterSpecs.length;++w){var k=e.display.gutterSpecs[w].className,H=d.hasOwnProperty(k)&&d[k];H&&b.appendChild(G("div",[H],"CodeMirror-gutter-elt","left: "+o.gutterLeft[k]+"px; width: "+o.gutterWidth[k]+"px"))}}}function rf(e,r,a){r.alignable&&(r.alignable=null);for(var o=U("CodeMirror-linewidget"),l=r.node.firstChild,d=void 0;l;l=d)d=l.nextSibling,o.test(l.className)&&r.node.removeChild(l);yl(e,r,a)}function nf(e,r,a,o){var l=ss(e,r);return r.text=r.node=l.pre,l.bgClass&&(r.bgClass=l.bgClass),l.textClass&&(r.textClass=l.textClass),ya(e,r),br(e,r,a,o),yl(e,r,o),r.node}function yl(e,r,a){if(bl(e,r.line,r,a,!0),r.rest)for(var o=0;o<r.rest.length;o++)bl(e,r.rest[o],r,a,!1)}function bl(e,r,a,o,l){if(r.widgets)for(var d=qi(a),g=0,b=r.widgets;g<b.length;++g){var w=b[g],k=G("div",[w.node],"CodeMirror-linewidget"+(w.className?" "+w.className:""));w.handleMouseEvents||k.setAttribute("cm-ignore-events","true"),of(w,k,a,o),e.display.input.setUneditable(k),l&&w.above?d.insertBefore(k,a.gutter||a.text):d.appendChild(k),ar(w,"redraw")}}function of(e,r,a,o){if(e.noHScroll){(a.alignable||(a.alignable=[])).push(r);var l=o.wrapperWidth;r.style.left=o.fixedPos+"px",e.coverGutter||(l-=o.gutterTotalWidth,r.style.paddingLeft=o.gutterTotalWidth+"px"),r.style.width=l+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-o.gutterTotalWidth+"px"))}function $n(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!He(document.body,e.node)){var a="position: relative;";e.coverGutter&&(a+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(a+="width: "+r.display.wrapper.clientWidth+"px;"),ge(r.display.measure,G("div",[e.node],null,a))}return e.height=e.node.parentNode.offsetHeight}function Gn(e,r){for(var a=mr(r);a!=e.wrapper;a=a.parentNode)if(!a||a.nodeType==1&&a.getAttribute("cm-ignore-events")=="true"||a.parentNode==e.sizer&&a!=e.mover)return!0}function Mo(e){return e.lineSpace.offsetTop}function No(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function xl(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=ge(e.measure,G("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,o={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return!isNaN(o.left)&&!isNaN(o.right)&&(e.cachedPaddingH=o),o}function Xr(e){return Be-e.display.nativeBarWidth}function xn(e){return e.display.scroller.clientWidth-Xr(e)-e.display.barWidth}function ba(e){return e.display.scroller.clientHeight-Xr(e)-e.display.barHeight}function Sl(e,r,a){var o=e.options.lineWrapping,l=o&&xn(e);if(!r.measure.heights||o&&r.measure.width!=l){var d=r.measure.heights=[];if(o){r.measure.width=l;for(var g=r.text.firstChild.getClientRects(),b=0;b<g.length-1;b++){var w=g[b],k=g[b+1];Math.abs(w.bottom-k.bottom)>2&&d.push((w.bottom+k.top)/2-a.top)}}d.push(a.bottom-a.top)}}function wl(e,r,a){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var o=0;o<e.rest.length;o++)if(e.rest[o]==r)return{map:e.measure.maps[o],cache:e.measure.caches[o]};for(var l=0;l<e.rest.length;l++)if(wt(e.rest[l])>a)return{map:e.measure.maps[l],cache:e.measure.caches[l],before:!0}}}function af(e,r){r=bn(r);var a=wt(r),o=e.display.externalMeasured=new ml(e.doc,r,a);o.lineN=a;var l=o.built=vl(e,o);return o.text=l.pre,ge(e.display.lineMeasure,l.pre),o}function eo(e,r,a,o){return an(e,xi(e,r),a,o)}function xa(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Ci(e,r)];var a=e.display.externalMeasured;if(a&&r>=a.lineN&&r<a.lineN+a.size)return a}function xi(e,r){var a=wt(r),o=xa(e,a);o&&!o.text?o=null:o&&o.changes&&(as(e,o,a,ms(e)),e.curOp.forceUpdate=!0),o||(o=af(e,r));var l=wl(o,r,a);return{line:r,view:o,rect:null,map:l.map,cache:l.cache,before:l.before,hasHeights:!1}}function an(e,r,a,o,l){r.before&&(a=-1);var d=a+(o||""),g;return r.cache.hasOwnProperty(d)?g=r.cache[d]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Sl(e,r.view,r.rect),r.hasHeights=!0),g=sf(e,r,a,o),g.bogus||(r.cache[d]=g)),{left:g.left,right:g.right,top:l?g.rtop:g.top,bottom:l?g.rbottom:g.bottom}}var ls={left:0,right:0,top:0,bottom:0};function us(e,r,a){for(var o,l,d,g,b,w,k=0;k<e.length;k+=3)if(b=e[k],w=e[k+1],r<b?(l=0,d=1,g="left"):r<w?(l=r-b,d=l+1):(k==e.length-3||r==w&&e[k+3]>r)&&(d=w-b,l=d-1,r>=w&&(g="right")),l!=null){if(o=e[k+2],b==w&&a==(o.insertLeft?"left":"right")&&(g=a),a=="left"&&l==0)for(;k&&e[k-2]==e[k-3]&&e[k-1].insertLeft;)o=e[(k-=3)+2],g="left";if(a=="right"&&l==w-b)for(;k<e.length-3&&e[k+3]==e[k+4]&&!e[k+5].insertLeft;)o=e[(k+=3)+2],g="right";break}return{node:o,start:l,end:d,collapse:g,coverStart:b,coverEnd:w}}function to(e,r){var a=ls;if(r=="left")for(var o=0;o<e.length&&(a=e[o]).left==a.right;o++);else for(var l=e.length-1;l>=0&&(a=e[l]).left==a.right;l--);return a}function sf(e,r,a,o){var l=us(r.map,a,o),d=l.node,g=l.start,b=l.end,w=l.collapse,k;if(d.nodeType==3){for(var H=0;H<4;H++){for(;g&&vn(r.line.text.charAt(l.coverStart+g));)--g;for(;l.coverStart+b<l.coverEnd&&vn(r.line.text.charAt(l.coverStart+b));)++b;if(D&&R<9&&g==0&&b==l.coverEnd-l.coverStart?k=d.parentNode.getBoundingClientRect():k=to(ee(d,g,b).getClientRects(),o),k.left||k.right||g==0)break;b=g,g=g-1,w="right"}D&&R<11&&(k=lf(e.display.measure,k))}else{g>0&&(w=o="right");var X;e.options.lineWrapping&&(X=d.getClientRects()).length>1?k=X[o=="right"?X.length-1:0]:k=d.getBoundingClientRect()}if(D&&R<9&&!g&&(!k||!k.left&&!k.right)){var de=d.parentNode.getClientRects()[0];de?k={left:de.left,right:de.left+no(e.display),top:de.top,bottom:de.bottom}:k=ls}for(var ue=k.top-r.rect.top,xe=k.bottom-r.rect.top,Ce=(ue+xe)/2,Ie=r.view.measure.heights,De=0;De<Ie.length-1&&!(Ce<Ie[De]);De++);var Ne=De?Ie[De-1]:0,Oe=Ie[De],Re={left:(w=="right"?k.right:k.left)-r.rect.left,right:(w=="left"?k.left:k.right)-r.rect.left,top:Ne,bottom:Oe};return!k.left&&!k.right&&(Re.bogus=!0),e.options.singleCursorHeightPerLine||(Re.rtop=ue,Re.rbottom=xe),Re}function lf(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ir(e))return r;var a=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*a,right:r.right*a,top:r.top*o,bottom:r.bottom*o}}function fs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function cs(e){e.display.externalMeasure=null,ce(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)fs(e.display.view[r])}function Do(e){cs(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ds(e){return q&&M?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Cl(e){return q&&M?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function hs(e){var r=bn(e),a=r.widgets,o=0;if(a)for(var l=0;l<a.length;++l)a[l].above&&(o+=$n(a[l]));return o}function Fo(e,r,a,o,l){if(!l){var d=hs(r);a.top+=d,a.bottom+=d}if(o=="line")return a;o||(o="local");var g=Vn(r);if(o=="local"?g+=Mo(e.display):g-=e.display.viewOffset,o=="page"||o=="window"){var b=e.display.lineSpace.getBoundingClientRect();g+=b.top+(o=="window"?0:Cl(ot(e)));var w=b.left+(o=="window"?0:ds(ot(e)));a.left+=w,a.right+=w}return a.top+=g,a.bottom+=g,a}function Al(e,r,a){if(a=="div")return r;var o=r.left,l=r.top;if(a=="page")o-=ds(ot(e)),l-=Cl(ot(e));else if(a=="local"||!a){var d=e.display.sizer.getBoundingClientRect();o+=d.left,l+=d.top}var g=e.display.lineSpace.getBoundingClientRect();return{left:o-g.left,top:l-g.top}}function Sa(e,r,a,o,l){return o||(o=$e(e.doc,r.line)),Fo(e,o,eo(e,o,r.ch,l),a)}function sn(e,r,a,o,l,d){o=o||$e(e.doc,r.line),l||(l=xi(e,o));function g(xe,Ce){var Ie=an(e,l,xe,Ce?"right":"left",d);return Ce?Ie.left=Ie.right:Ie.right=Ie.left,Fo(e,o,Ie,a)}var b=Ze(o,e.doc.direction),w=r.ch,k=r.sticky;if(w>=o.text.length?(w=o.text.length,k="before"):w<=0&&(w=0,k="after"),!b)return g(k=="before"?w-1:w,k=="before");function H(xe,Ce,Ie){var De=b[Ce],Ne=De.level==1;return g(Ie?xe-1:xe,Ne!=Ie)}var X=mt(b,w,k),de=Rt,ue=H(w,X,k=="before");return de!=null&&(ue.other=H(w,de,k!="before")),ue}function Nn(e,r){var a=0;r=Ge(e.doc,r),e.options.lineWrapping||(a=no(e.display)*r.ch);var o=$e(e.doc,r.line),l=Vn(o)+Mo(e.display);return{left:a,right:a,top:l,bottom:l+o.height}}function ps(e,r,a,o,l){var d=A(e,r,a);return d.xRel=l,o&&(d.outside=o),d}function Ro(e,r,a){var o=e.doc;if(a+=e.display.viewOffset,a<0)return ps(o.first,0,null,-1,-1);var l=Un(o,a),d=o.first+o.size-1;if(l>d)return ps(o.first+o.size-1,$e(o,d).text.length,null,1,1);r<0&&(r=0);for(var g=$e(o,l);;){var b=gs(e,g,l,r,a),w=fl(g,b.ch+(b.xRel>0||b.outside>0?1:0));if(!w)return b;var k=w.find(1);if(k.line==l)return k;g=$e(o,l=k.line)}}function Ol(e,r,a,o){o-=hs(r);var l=r.text.length,d=vr(function(g){return an(e,a,g-1).bottom<=o},l,0);return l=vr(function(g){return an(e,a,g).top>o},d,l),{begin:d,end:l}}function El(e,r,a,o){a||(a=xi(e,r));var l=Fo(e,r,an(e,a,o),"line").top;return Ol(e,r,a,l)}function vs(e,r,a,o){return e.bottom<=a?!1:e.top>a?!0:(o?e.left:e.right)>r}function gs(e,r,a,o,l){l-=Vn(r);var d=xi(e,r),g=hs(r),b=0,w=r.text.length,k=!0,H=Ze(r,e.doc.direction);if(H){var X=(e.options.lineWrapping?ff:uf)(e,r,a,d,H,o,l);k=X.level!=1,b=k?X.from:X.to-1,w=k?X.to:X.from-1}var de=null,ue=null,xe=vr(function(Ye){var Ke=an(e,d,Ye);return Ke.top+=g,Ke.bottom+=g,vs(Ke,o,l,!1)?(Ke.top<=l&&Ke.left<=o&&(de=Ye,ue=Ke),!0):!1},b,w),Ce,Ie,De=!1;if(ue){var Ne=o-ue.left<ue.right-o,Oe=Ne==k;xe=de+(Oe?0:1),Ie=Oe?"after":"before",Ce=Ne?ue.left:ue.right}else{!k&&(xe==w||xe==b)&&xe++,Ie=xe==0?"after":xe==r.text.length?"before":an(e,d,xe-(k?1:0)).bottom+g<=l==k?"after":"before";var Re=sn(e,A(a,xe,Ie),"line",r,d);Ce=Re.left,De=l<Re.top?-1:l>=Re.bottom?1:0}return xe=Hr(r.text,xe,1),ps(a,xe,Ie,De,o-Ce)}function uf(e,r,a,o,l,d,g){var b=vr(function(X){var de=l[X],ue=de.level!=1;return vs(sn(e,A(a,ue?de.to:de.from,ue?"before":"after"),"line",r,o),d,g,!0)},0,l.length-1),w=l[b];if(b>0){var k=w.level!=1,H=sn(e,A(a,k?w.from:w.to,k?"after":"before"),"line",r,o);vs(H,d,g,!0)&&H.top>g&&(w=l[b-1])}return w}function ff(e,r,a,o,l,d,g){var b=Ol(e,r,o,g),w=b.begin,k=b.end;/\s/.test(r.text.charAt(k-1))&&k--;for(var H=null,X=null,de=0;de<l.length;de++){var ue=l[de];if(!(ue.from>=k||ue.to<=w)){var xe=ue.level!=1,Ce=an(e,o,xe?Math.min(k,ue.to)-1:Math.max(w,ue.from)).right,Ie=Ce<d?d-Ce+1e9:Ce-d;(!H||X>Ie)&&(H=ue,X=Ie)}}return H||(H=l[l.length-1]),H.from<w&&(H={from:w,to:H.to,level:H.level}),H.to>k&&(H={from:H.from,to:k,level:H.level}),H}var Si;function ro(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Si==null){Si=G("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Si.appendChild(document.createTextNode("x")),Si.appendChild(G("br"));Si.appendChild(document.createTextNode("x"))}ge(e.measure,Si);var a=Si.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),ce(e.measure),a||1}function no(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=G("span","xxxxxxxxxx"),a=G("pre",[r],"CodeMirror-line-like");ge(e.measure,a);var o=r.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function ms(e){for(var r=e.display,a={},o={},l=r.gutters.clientLeft,d=r.gutters.firstChild,g=0;d;d=d.nextSibling,++g){var b=e.display.gutterSpecs[g].className;a[b]=d.offsetLeft+d.clientLeft+l,o[b]=d.clientWidth}return{fixedPos:ys(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:a,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function ys(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function kl(e){var r=ro(e.display),a=e.options.lineWrapping,o=a&&Math.max(5,e.display.scroller.clientWidth/no(e.display)-3);return function(l){if(_n(e.doc,l))return 0;var d=0;if(l.widgets)for(var g=0;g<l.widgets.length;g++)l.widgets[g].height&&(d+=l.widgets[g].height);return a?d+(Math.ceil(l.text.length/o)||1)*r:d+r}}function bs(e){var r=e.doc,a=kl(e);r.iter(function(o){var l=a(o);l!=o.height&&nn(o,l)})}function wi(e,r,a,o){var l=e.display;if(!a&&mr(r).getAttribute("cm-not-content")=="true")return null;var d,g,b=l.lineSpace.getBoundingClientRect();try{d=r.clientX-b.left,g=r.clientY-b.top}catch{return null}var w=Ro(e,d,g),k;if(o&&w.xRel>0&&(k=$e(e.doc,w.line).text).length==w.ch){var H=nt(k,k.length,e.options.tabSize)-k.length;w=A(w.line,Math.max(0,Math.round((d-xl(e.display).left)/no(e.display))-H))}return w}function Ci(e,r){if(r>=e.display.viewTo||(r-=e.display.viewFrom,r<0))return null;for(var a=e.display.view,o=0;o<a.length;o++)if(r-=a[o].size,r<0)return o}function Dr(e,r,a,o){r==null&&(r=e.doc.first),a==null&&(a=e.doc.first+e.doc.size),o||(o=0);var l=e.display;if(o&&a<l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>r)&&(l.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=l.viewTo)Mn&&ti(e.doc,r)<l.viewTo&&ni(e);else if(a<=l.viewFrom)Mn&&dl(e.doc,a+o)>l.viewFrom?ni(e):(l.viewFrom+=o,l.viewTo+=o);else if(r<=l.viewFrom&&a>=l.viewTo)ni(e);else if(r<=l.viewFrom){var d=wa(e,a,a+o,1);d?(l.view=l.view.slice(d.index),l.viewFrom=d.lineN,l.viewTo+=o):ni(e)}else if(a>=l.viewTo){var g=wa(e,r,r,-1);g?(l.view=l.view.slice(0,g.index),l.viewTo=g.lineN):ni(e)}else{var b=wa(e,r,r,-1),w=wa(e,a,a+o,1);b&&w?(l.view=l.view.slice(0,b.index).concat(ga(e,b.lineN,w.lineN)).concat(l.view.slice(w.index)),l.viewTo+=o):ni(e)}var k=l.externalMeasured;k&&(a<k.lineN?k.lineN+=o:r<k.lineN+k.size&&(l.externalMeasured=null))}function ri(e,r,a){e.curOp.viewChanged=!0;var o=e.display,l=e.display.externalMeasured;if(l&&r>=l.lineN&&r<l.lineN+l.size&&(o.externalMeasured=null),!(r<o.viewFrom||r>=o.viewTo)){var d=o.view[Ci(e,r)];if(d.node!=null){var g=d.changes||(d.changes=[]);Fe(g,a)==-1&&g.push(a)}}}function ni(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wa(e,r,a,o){var l=Ci(e,r),d,g=e.display.view;if(!Mn||a==e.doc.first+e.doc.size)return{index:l,lineN:a};for(var b=e.display.viewFrom,w=0;w<l;w++)b+=g[w].size;if(b!=r){if(o>0){if(l==g.length-1)return null;d=b+g[l].size-r,l++}else d=b-r;r+=d,a+=d}for(;ti(e.doc,a)!=a;){if(l==(o<0?0:g.length-1))return null;a+=o*g[l-(o<0?1:0)].size,l+=o}return{index:l,lineN:a}}function cf(e,r,a){var o=e.display,l=o.view;l.length==0||r>=o.viewTo||a<=o.viewFrom?(o.view=ga(e,r,a),o.viewFrom=r):(o.viewFrom>r?o.view=ga(e,r,o.viewFrom).concat(o.view):o.viewFrom<r&&(o.view=o.view.slice(Ci(e,r))),o.viewFrom=r,o.viewTo<a?o.view=o.view.concat(ga(e,o.viewTo,a)):o.viewTo>a&&(o.view=o.view.slice(0,Ci(e,a)))),o.viewTo=a}function Tl(e){for(var r=e.display.view,a=0,o=0;o<r.length;o++){var l=r[o];!l.hidden&&(!l.node||l.changes)&&++a}return a}function io(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Bo(e,r){r===void 0&&(r=!0);var a=e.doc,o={},l=o.cursors=document.createDocumentFragment(),d=o.selection=document.createDocumentFragment(),g=e.options.$customCursor;g&&(r=!0);for(var b=0;b<a.sel.ranges.length;b++)if(!(!r&&b==a.sel.primIndex)){var w=a.sel.ranges[b];if(!(w.from().line>=e.display.viewTo||w.to().line<e.display.viewFrom)){var k=w.empty();if(g){var H=g(e,w);H&&Ca(e,H,l)}else(k||e.options.showCursorWhenSelecting)&&Ca(e,w.head,l);k||df(e,w,d)}}return o}function Ca(e,r,a){var o=sn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),l=a.appendChild(G("div","\xA0","CodeMirror-cursor"));if(l.style.left=o.left+"px",l.style.top=o.top+"px",l.style.height=Math.max(0,o.bottom-o.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var d=Sa(e,r,"div",null,null),g=d.right-d.left;l.style.width=(g>0?g:e.defaultCharWidth())+"px"}if(o.other){var b=a.appendChild(G("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));b.style.display="",b.style.left=o.other.left+"px",b.style.top=o.other.top+"px",b.style.height=(o.other.bottom-o.other.top)*.85+"px"}}function Aa(e,r){return e.top-r.top||e.left-r.left}function df(e,r,a){var o=e.display,l=e.doc,d=document.createDocumentFragment(),g=xl(e.display),b=g.left,w=Math.max(o.sizerWidth,xn(e)-o.sizer.offsetLeft)-g.right,k=l.direction=="ltr";function H(Oe,Re,Ye,Ke){Re<0&&(Re=0),Re=Math.round(Re),Ke=Math.round(Ke),d.appendChild(G("div",null,"CodeMirror-selected","position: absolute; left: "+Oe+`px;
|
|
18
|
-
top: `+
|
|
19
|
-
height: `+(Ke-
|
|
20
|
-
top: `+(
|
|
21
|
-
height: `+(
|
|
22
|
-
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(g),g.scrollIntoView(l),e.display.lineSpace.removeChild(g)}}}function pf(e,r,a,o){o==null&&(o=0);var l;!e.options.lineWrapping&&r==a&&(a=r.sticky=="before"?A(r.line,r.ch+1,"before"):r,r=r.ch?A(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r);for(var d=0;d<5;d++){var g=!1,b=sn(e,r),w=!a||a==r?b:sn(e,a);l={left:Math.min(b.left,w.left),top:Math.min(b.top,w.top)-o,right:Math.max(b.left,w.left),bottom:Math.max(b.bottom,w.bottom)+o};var k=Cs(e,l),H=e.doc.scrollTop,X=e.doc.scrollLeft;if(k.scrollTop!=null&&(lo(e,k.scrollTop),Math.abs(e.doc.scrollTop-H)>1&&(g=!0)),k.scrollLeft!=null&&(Oi(e,k.scrollLeft),Math.abs(e.doc.scrollLeft-X)>1&&(g=!0)),!g)break}return l}function vf(e,r){var a=Cs(e,r);a.scrollTop!=null&&lo(e,a.scrollTop),a.scrollLeft!=null&&Oi(e,a.scrollLeft)}function Cs(e,r){var a=e.display,o=ro(e.display);r.top<0&&(r.top=0);var l=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,d=ba(e),g={};r.bottom-r.top>d&&(r.bottom=r.top+d);var b=e.doc.height+No(a),w=r.top<o,k=r.bottom>b-o;if(r.top<l)g.scrollTop=w?0:r.top;else if(r.bottom>l+d){var H=Math.min(r.top,(k?b:r.bottom)-d);H!=l&&(g.scrollTop=H)}var X=e.options.fixedGutter?0:a.gutters.offsetWidth,de=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft-X,ue=xn(e)-a.gutters.offsetWidth,xe=r.right-r.left>ue;return xe&&(r.right=r.left+ue),r.left<10?g.scrollLeft=0:r.left<de?g.scrollLeft=Math.max(0,r.left+X-(xe?0:10)):r.right>ue+de-3&&(g.scrollLeft=r.right+(xe?0:10)-ue),g}function As(e,r){r!=null&&(Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r)}function so(e){Ea(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ai(e,r,a){(r!=null||a!=null)&&Ea(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Ll(e,r){Ea(e),e.curOp.scrollToPos=r}function Ea(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Nn(e,r.from),o=Nn(e,r.to);Il(e,a,o,r.margin)}}function Il(e,r,a,o){var l=Cs(e,{left:Math.min(r.left,a.left),top:Math.min(r.top,a.top)-o,right:Math.max(r.right,a.right),bottom:Math.max(r.bottom,a.bottom)+o});Ai(e,l.scrollLeft,l.scrollTop)}function lo(e,r){Math.abs(e.doc.scrollTop-r)<2||(v||ks(e,{top:r}),Os(e,r,!0),v&&ks(e),jo(e,100))}function Os(e,r,a){r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),!(e.display.scroller.scrollTop==r&&!a)&&(e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r))}function Oi(e,r,a,o){r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((a?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)&&(e.doc.scrollLeft=r,jl(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r))}function uo(e){var r=e.display,a=r.gutters.offsetWidth,o=Math.round(e.doc.height+No(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:o,scrollHeight:o+Xr(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:a}}var oi=function(e,r,a){this.cm=a;var o=this.vert=G("div",[G("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),l=this.horiz=G("div",[G("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=l.tabIndex=-1,e(o),e(l),ne(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),ne(l,"scroll",function(){l.clientWidth&&r(l.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,D&&R<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};oi.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var l=e.viewHeight-(r?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+l)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=a?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var d=e.viewWidth-e.barLeft-(a?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+d)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(o==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?o:0,bottom:r?o:0}},oi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},oi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},oi.prototype.zeroWidthHack=function(){var e=L&&!V?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ue,this.disableVert=new Ue},oi.prototype.enableZeroWidthBar=function(e,r,a){e.style.visibility="";function o(){var l=e.getBoundingClientRect(),d=a=="vert"?document.elementFromPoint(l.right-1,(l.top+l.bottom)/2):document.elementFromPoint((l.right+l.left)/2,l.bottom-1);d!=e?e.style.visibility="hidden":r.set(1e3,o)}r.set(1e3,o)},oi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ka=function(){};ka.prototype.update=function(){return{bottom:0,right:0}},ka.prototype.setScrollLeft=function(){},ka.prototype.setScrollTop=function(){},ka.prototype.clear=function(){};function fo(e,r){r||(r=uo(e));var a=e.display.barWidth,o=e.display.barHeight;Ml(e,r);for(var l=0;l<4&&a!=e.display.barWidth||o!=e.display.barHeight;l++)a!=e.display.barWidth&&e.options.lineWrapping&&ws(e),Ml(e,uo(e)),a=e.display.barWidth,o=e.display.barHeight}function Ml(e,r){var a=e.display,o=a.scrollbars.update(r);a.sizer.style.paddingRight=(a.barWidth=o.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=o.bottom)+"px",a.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=o.bottom+"px",a.scrollbarFiller.style.width=o.right+"px"):a.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=o.bottom+"px",a.gutterFiller.style.width=r.gutterWidth+"px"):a.gutterFiller.style.display=""}var Nl={native:oi,null:ka};function Dl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Nl[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),ne(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,a){a=="horizontal"?Oi(e,r):lo(e,r)},e),e.display.scrollbars.addClass&&ze(e.display.wrapper,e.display.scrollbars.addClass)}var gf=0;function Ei(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++gf,markArrays:null},Qu(e.curOp)}function ki(e){var r=e.curOp;r&&Zu(r,function(a){for(var o=0;o<a.ops.length;o++)a.ops[o].cm.curOp=null;Ta(a)})}function Ta(e){for(var r=e.ops,a=0;a<r.length;a++)mf(r[a]);for(var o=0;o<r.length;o++)yf(r[o]);for(var l=0;l<r.length;l++)bf(r[l]);for(var d=0;d<r.length;d++)xf(r[d]);for(var g=0;g<r.length;g++)Sf(r[g])}function mf(e){var r=e.cm,a=r.display;Fl(r),e.updateMaxLine&&ns(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<a.viewFrom||e.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new Pa(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function yf(e){e.updatedDisplay=e.mustUpdate&&Rl(e.cm,e.update)}function bf(e){var r=e.cm,a=r.display;e.updatedDisplay&&ws(r),e.barMeasure=uo(r),a.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=eo(r,a.maxLine,a.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Xr(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-xn(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function xf(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&Oi(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var a=e.focus&&e.focus==Ve(ot(r));e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,a),(e.updatedDisplay||e.startHeight!=r.doc.height)&&fo(r,e.barMeasure),e.updatedDisplay&&Bl(r,e.barMeasure),e.selectionChanged&&ii(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),a&&Oa(e.cm)}function Sf(e){var r=e.cm,a=r.display,o=r.doc;if(e.updatedDisplay&&Es(r,e.update),a.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(a.wheelStartX=a.wheelStartY=null),e.scrollTop!=null&&Os(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Oi(r,e.scrollLeft,!0,!0),e.scrollToPos){var l=pf(r,Ge(o,e.scrollToPos.from),Ge(o,e.scrollToPos.to),e.scrollToPos.margin);hf(r,l)}var d=e.maybeHiddenMarkers,g=e.maybeUnhiddenMarkers;if(d)for(var b=0;b<d.length;++b)d[b].lines.length||et(d[b],"hide");if(g)for(var w=0;w<g.length;++w)g[w].lines.length&&et(g[w],"unhide");a.wrapper.offsetHeight&&(o.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&et(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function _r(e,r){if(e.curOp)return r();Ei(e);try{return r()}finally{ki(e)}}function sr(e,r){return function(){if(e.curOp)return r.apply(e,arguments);Ei(e);try{return r.apply(e,arguments)}finally{ki(e)}}}function xr(e){return function(){if(this.curOp)return e.apply(this,arguments);Ei(this);try{return e.apply(this,arguments)}finally{ki(this)}}}function lr(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);Ei(r);try{return e.apply(this,arguments)}finally{ki(r)}}}function jo(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,dt(wf,e))}function wf(e){var r=e.doc;if(!(r.highlightFrontier>=e.display.viewTo)){var a=+new Date+e.options.workTime,o=Yi(e,r.highlightFrontier),l=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(d){if(o.line>=e.display.viewFrom){var g=d.styles,b=d.text.length>e.options.maxHighlightLength?rn(r.mode,o.state):null,w=tl(e,d,o,!0);b&&(o.state=b),d.styles=w.styles;var k=d.styleClasses,H=w.classes;H?d.styleClasses=H:k&&(d.styleClasses=null);for(var X=!g||g.length!=d.styles.length||k!=H&&(!k||!H||k.bgClass!=H.bgClass||k.textClass!=H.textClass),de=0;!X&&de<g.length;++de)X=g[de]!=d.styles[de];X&&l.push(o.line),d.stateAfter=o.save(),o.nextLine()}else d.text.length<=e.options.maxHighlightLength&&ua(e,d.text,o),d.stateAfter=o.line%5==0?o.save():null,o.nextLine();if(+new Date>a)return jo(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),l.length&&_r(e,function(){for(var d=0;d<l.length;d++)ri(e,l[d],"text")})}}var Pa=function(e,r,a){var o=e.display;this.viewport=r,this.visible=ao(o,e.doc,r),this.editorIsHidden=!o.wrapper.offsetWidth,this.wrapperHeight=o.wrapper.clientHeight,this.wrapperWidth=o.wrapper.clientWidth,this.oldDisplayWidth=xn(e),this.force=a,this.dims=ms(e),this.events=[]};Pa.prototype.signal=function(e,r){_t(e,r)&&this.events.push(arguments)},Pa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)et.apply(null,this.events[e])};function Fl(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Xr(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Xr(e)+"px",r.scrollbarsClipped=!0)}function Cf(e){if(e.hasFocus())return null;var r=Ve(ot(e));if(!r||!He(e.display.lineDiv,r))return null;var a={activeElt:r};if(window.getSelection){var o=Xt(e).getSelection();o.anchorNode&&o.extend&&He(e.display.lineDiv,o.anchorNode)&&(a.anchorNode=o.anchorNode,a.anchorOffset=o.anchorOffset,a.focusNode=o.focusNode,a.focusOffset=o.focusOffset)}return a}function Af(e){if(!(!e||!e.activeElt||e.activeElt==Ve(e.activeElt.ownerDocument))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&He(document.body,e.anchorNode)&&He(document.body,e.focusNode))){var r=e.activeElt.ownerDocument,a=r.defaultView.getSelection(),o=r.createRange();o.setEnd(e.anchorNode,e.anchorOffset),o.collapse(!1),a.removeAllRanges(),a.addRange(o),a.extend(e.focusNode,e.focusOffset)}}function Rl(e,r){var a=e.display,o=e.doc;if(r.editorIsHidden)return ni(e),!1;if(!r.force&&r.visible.from>=a.viewFrom&&r.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Tl(e)==0)return!1;Wl(e)&&(ni(e),r.dims=ms(e));var l=o.first+o.size,d=Math.max(r.visible.from-e.options.viewportMargin,o.first),g=Math.min(l,r.visible.to+e.options.viewportMargin);a.viewFrom<d&&d-a.viewFrom<20&&(d=Math.max(o.first,a.viewFrom)),a.viewTo>g&&a.viewTo-g<20&&(g=Math.min(l,a.viewTo)),Mn&&(d=ti(e.doc,d),g=dl(e.doc,g));var b=d!=a.viewFrom||g!=a.viewTo||a.lastWrapHeight!=r.wrapperHeight||a.lastWrapWidth!=r.wrapperWidth;cf(e,d,g),a.viewOffset=Vn($e(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var w=Tl(e);if(!b&&w==0&&!r.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var k=Cf(e);return w>4&&(a.lineDiv.style.display="none"),Of(e,a.updateLineNumbers,r.dims),w>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Af(k),ce(a.cursorDiv),ce(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,b&&(a.lastWrapHeight=r.wrapperHeight,a.lastWrapWidth=r.wrapperWidth,jo(e,400)),a.updateLineNumbers=null,!0}function Es(e,r){for(var a=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==xn(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+No(e.display)-ba(e),a.top)}),r.visible=ao(e.display,e.doc,a),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=ao(e.display,e.doc,a));if(!Rl(e,r))break;ws(e);var l=uo(e);io(e),fo(e,l),Bl(e,l),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ks(e,r){var a=new Pa(e,r);if(Rl(e,a)){ws(e),Es(e,a);var o=uo(e);io(e),fo(e,o),Bl(e,o),a.finish()}}function Of(e,r,a){var o=e.display,l=e.options.lineNumbers,d=o.lineDiv,g=d.firstChild;function b(xe){var Ce=xe.nextSibling;return _&&L&&e.display.currentWheelTarget==xe?xe.style.display="none":xe.parentNode.removeChild(xe),Ce}for(var w=o.view,k=o.viewFrom,H=0;H<w.length;H++){var X=w[H];if(!X.hidden)if(!X.node||X.node.parentNode!=d){var de=nf(e,X,k,a);d.insertBefore(de,g)}else{for(;g!=X.node;)g=b(g);var ue=l&&r!=null&&r<=k&&X.lineNumber;X.changes&&(Fe(X.changes,"gutter")>-1&&(ue=!1),as(e,X,k,a)),ue&&(ce(X.lineNumber),X.lineNumber.appendChild(document.createTextNode(Ki(e.options,k)))),g=X.node.nextSibling}k+=X.size}for(;g;)g=b(g)}function Ts(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px",ar(e,"gutterChanged",e)}function Bl(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Xr(e)+"px"}function jl(e){var r=e.display,a=r.view;if(!(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))){for(var o=ys(r)-r.scroller.scrollLeft+e.doc.scrollLeft,l=r.gutters.offsetWidth,d=o+"px",g=0;g<a.length;g++)if(!a[g].hidden){e.options.fixedGutter&&(a[g].gutter&&(a[g].gutter.style.left=d),a[g].gutterBackground&&(a[g].gutterBackground.style.left=d));var b=a[g].alignable;if(b)for(var w=0;w<b.length;w++)b[w].style.left=d}e.options.fixedGutter&&(r.gutters.style.left=o+l+"px")}}function Wl(e){if(!e.options.lineNumbers)return!1;var r=e.doc,a=Ki(e.options,r.first+r.size-1),o=e.display;if(a.length!=o.lineNumChars){var l=o.measure.appendChild(G("div",[G("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),d=l.firstChild.offsetWidth,g=l.offsetWidth-d;return o.lineGutter.style.width="",o.lineNumInnerWidth=Math.max(d,o.lineGutter.offsetWidth-g)+1,o.lineNumWidth=o.lineNumInnerWidth+g,o.lineNumChars=o.lineNumInnerWidth?a.length:-1,o.lineGutter.style.width=o.lineNumWidth+"px",Ts(e.display),!0}return!1}function La(e,r){for(var a=[],o=!1,l=0;l<e.length;l++){var d=e[l],g=null;if(typeof d!="string"&&(g=d.style,d=d.className),d=="CodeMirror-linenumbers")if(r)o=!0;else continue;a.push({className:d,style:g})}return r&&!o&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function Hl(e){var r=e.gutters,a=e.gutterSpecs;ce(r),e.lineGutter=null;for(var o=0;o<a.length;++o){var l=a[o],d=l.className,g=l.style,b=r.appendChild(G("div",null,"CodeMirror-gutter "+d));g&&(b.style.cssText=g),d=="CodeMirror-linenumbers"&&(e.lineGutter=b,b.style.width=(e.lineNumWidth||1)+"px")}r.style.display=a.length?"":"none",Ts(e)}function co(e){Hl(e.display),Dr(e),jl(e)}function Ef(e,r,a,o){var l=this;this.input=a,l.scrollbarFiller=G("div",null,"CodeMirror-scrollbar-filler"),l.scrollbarFiller.setAttribute("cm-not-content","true"),l.gutterFiller=G("div",null,"CodeMirror-gutter-filler"),l.gutterFiller.setAttribute("cm-not-content","true"),l.lineDiv=ve("div",null,"CodeMirror-code"),l.selectionDiv=G("div",null,null,"position: relative; z-index: 1"),l.cursorDiv=G("div",null,"CodeMirror-cursors"),l.measure=G("div",null,"CodeMirror-measure"),l.lineMeasure=G("div",null,"CodeMirror-measure"),l.lineSpace=ve("div",[l.measure,l.lineMeasure,l.selectionDiv,l.cursorDiv,l.lineDiv],null,"position: relative; outline: none");var d=ve("div",[l.lineSpace],"CodeMirror-lines");l.mover=G("div",[d],null,"position: relative"),l.sizer=G("div",[l.mover],"CodeMirror-sizer"),l.sizerWidth=null,l.heightForcer=G("div",null,null,"position: absolute; height: "+Be+"px; width: 1px;"),l.gutters=G("div",null,"CodeMirror-gutters"),l.lineGutter=null,l.scroller=G("div",[l.sizer,l.heightForcer,l.gutters],"CodeMirror-scroll"),l.scroller.setAttribute("tabIndex","-1"),l.wrapper=G("div",[l.scrollbarFiller,l.gutterFiller,l.scroller],"CodeMirror"),q&&he>=105&&(l.wrapper.style.clipPath="inset(0px)"),l.wrapper.setAttribute("translate","no"),D&&R<8&&(l.gutters.style.zIndex=-1,l.scroller.style.paddingRight=0),!_&&!(v&&S)&&(l.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(l.wrapper):e(l.wrapper)),l.viewFrom=l.viewTo=r.first,l.reportedViewFrom=l.reportedViewTo=r.first,l.view=[],l.renderedView=null,l.externalMeasured=null,l.viewOffset=0,l.lastWrapHeight=l.lastWrapWidth=0,l.updateLineNumbers=null,l.nativeBarWidth=l.barHeight=l.barWidth=0,l.scrollbarsClipped=!1,l.lineNumWidth=l.lineNumInnerWidth=l.lineNumChars=null,l.alignWidgets=!1,l.cachedCharWidth=l.cachedTextHeight=l.cachedPaddingH=null,l.maxLine=null,l.maxLineLength=0,l.maxLineChanged=!1,l.wheelDX=l.wheelDY=l.wheelStartX=l.wheelStartY=null,l.shift=!1,l.selForContextMenu=null,l.activeTouch=null,l.gutterSpecs=La(o.gutters,o.lineNumbers),Hl(l),a.init(l)}var Ia=0,Kn=null;D?Kn=-.53:v?Kn=15:q?Kn=-.7:se&&(Kn=-1/3);function Ul(e){var r=e.wheelDeltaX,a=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),a==null&&e.detail&&e.axis==e.VERTICAL_AXIS?a=e.detail:a==null&&(a=e.wheelDelta),{x:r,y:a}}function kf(e){var r=Ul(e);return r.x*=Kn,r.y*=Kn,r}function zl(e,r){q&&he==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var a=Ul(r),o=a.x,l=a.y,d=Kn;r.deltaMode===0&&(o=r.deltaX,l=r.deltaY,d=1);var g=e.display,b=g.scroller,w=b.scrollWidth>b.clientWidth,k=b.scrollHeight>b.clientHeight;if(o&&w||l&&k){if(l&&L&&_){e:for(var H=r.target,X=g.view;H!=b;H=H.parentNode)for(var de=0;de<X.length;de++)if(X[de].node==H){e.display.currentWheelTarget=H;break e}}if(o&&!v&&!re&&d!=null){l&&k&&lo(e,Math.max(0,b.scrollTop+l*d)),Oi(e,Math.max(0,b.scrollLeft+o*d)),(!l||l&&k)&&St(r),g.wheelStartX=null;return}if(l&&d!=null){var ue=l*d,xe=e.doc.scrollTop,Ce=xe+g.wrapper.clientHeight;ue<0?xe=Math.max(0,xe+ue-50):Ce=Math.min(e.doc.height,Ce+ue+50),ks(e,{top:xe,bottom:Ce})}Ia<20&&r.deltaMode!==0&&(g.wheelStartX==null?(g.wheelStartX=b.scrollLeft,g.wheelStartY=b.scrollTop,g.wheelDX=o,g.wheelDY=l,setTimeout(function(){if(g.wheelStartX!=null){var Ie=b.scrollLeft-g.wheelStartX,De=b.scrollTop-g.wheelStartY,Ne=De&&g.wheelDY&&De/g.wheelDY||Ie&&g.wheelDX&&Ie/g.wheelDX;g.wheelStartX=g.wheelStartY=null,Ne&&(Kn=(Kn*Ia+Ne)/(Ia+1),++Ia)}},200)):(g.wheelDX+=o,g.wheelDY+=l))}}var Fr=function(e,r){this.ranges=e,this.primIndex=r};Fr.prototype.primary=function(){return this.ranges[this.primIndex]},Fr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var a=this.ranges[r],o=e.ranges[r];if(!Se(a.anchor,o.anchor)||!Se(a.head,o.head))return!1}return!0},Fr.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Ot(Pe(this.ranges[r].anchor),Pe(this.ranges[r].head));return new Fr(e,this.primIndex)},Fr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Fr.prototype.contains=function(e,r){r||(r=e);for(var a=0;a<this.ranges.length;a++){var o=this.ranges[a];if(z(r,o.from())>=0&&z(e,o.to())<=0)return a}return-1};var Ot=function(e,r){this.anchor=e,this.head=r};Ot.prototype.from=function(){return yt(this.anchor,this.head)},Ot.prototype.to=function(){return tt(this.anchor,this.head)},Ot.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Sn(e,r,a){var o=e&&e.options.selectionsMayTouch,l=r[a];r.sort(function(de,ue){return z(de.from(),ue.from())}),a=Fe(r,l);for(var d=1;d<r.length;d++){var g=r[d],b=r[d-1],w=z(b.to(),g.from());if(o&&!g.empty()?w>0:w>=0){var k=yt(b.from(),g.from()),H=tt(b.to(),g.to()),X=b.empty()?g.from()==g.head:b.from()==b.head;d<=a&&--a,r.splice(--d,2,new Ot(X?H:k,X?k:H))}}return new Fr(r,a)}function ai(e,r){return new Fr([new Ot(e,r||e)],0)}function si(e){return e.text?A(e.from.line+e.text.length-1,Qe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function _l(e,r){if(z(e,r.from)<0)return e;if(z(e,r.to)<=0)return si(r);var a=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=si(r).ch-r.to.ch),A(a,o)}function B(e,r){for(var a=[],o=0;o<e.sel.ranges.length;o++){var l=e.sel.ranges[o];a.push(new Ot(_l(l.anchor,r),_l(l.head,r)))}return Sn(e.cm,a,e.sel.primIndex)}function Vt(e,r,a){return e.line==r.line?A(a.line,e.ch-r.ch+a.ch):A(a.line+(e.line-r.line),e.ch)}function Dn(e,r,a){for(var o=[],l=A(e.first,0),d=l,g=0;g<r.length;g++){var b=r[g],w=Vt(b.from,l,d),k=Vt(si(b),l,d);if(l=b.to,d=k,a=="around"){var H=e.sel.ranges[g],X=z(H.head,H.anchor)<0;o[g]=new Ot(X?k:w,X?w:k)}else o[g]=new Ot(w,w)}return new Fr(o,e.sel.primIndex)}function Ps(e){e.doc.mode=Mr(e.options,e.doc.modeOption),Wo(e)}function Wo(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,jo(e,100),e.state.modeGen++,e.curOp&&Dr(e)}function Vl(e,r){return r.from.ch==0&&r.to.ch==0&&Qe(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ls(e,r,a,o){function l(Ne){return a?a[Ne]:null}function d(Ne,Oe,Re){hl(Ne,Oe,Re,o),ar(Ne,"change",Ne,r)}function g(Ne,Oe){for(var Re=[],Ye=Ne;Ye<Oe;++Ye)Re.push(new yi(k[Ye],l(Ye),o));return Re}var b=r.from,w=r.to,k=r.text,H=$e(e,b.line),X=$e(e,w.line),de=Qe(k),ue=l(k.length-1),xe=w.line-b.line;if(r.full)e.insert(0,g(0,k.length)),e.remove(k.length,e.size-k.length);else if(Vl(e,r)){var Ce=g(0,k.length-1);d(X,X.text,ue),xe&&e.remove(b.line,xe),Ce.length&&e.insert(b.line,Ce)}else if(H==X)if(k.length==1)d(H,H.text.slice(0,b.ch)+de+H.text.slice(w.ch),ue);else{var Ie=g(1,k.length-1);Ie.push(new yi(de+H.text.slice(w.ch),ue,o)),d(H,H.text.slice(0,b.ch)+k[0],l(0)),e.insert(b.line+1,Ie)}else if(k.length==1)d(H,H.text.slice(0,b.ch)+k[0]+X.text.slice(w.ch),l(0)),e.remove(b.line+1,xe);else{d(H,H.text.slice(0,b.ch)+k[0],l(0)),d(X,de+X.text.slice(w.ch),ue);var De=g(1,k.length-1);xe>1&&e.remove(b.line+1,xe-1),e.insert(b.line+1,De)}ar(e,"change",e,r)}function li(e,r,a){function o(l,d,g){if(l.linked)for(var b=0;b<l.linked.length;++b){var w=l.linked[b];if(w.doc!=d){var k=g&&w.sharedHist;a&&!k||(r(w.doc,k),o(w.doc,l,k))}}}o(e,null,!0)}function $l(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,bs(e),Ps(e),Is(e),e.options.direction=r.direction,e.options.lineWrapping||ns(e),e.options.mode=r.modeOption,Dr(e)}function Is(e){(e.doc.direction=="rtl"?ze:Y)(e.display.lineDiv,"CodeMirror-rtl")}function Tf(e){_r(e,function(){Is(e),Dr(e)})}function Ma(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Na(e,r){var a={from:Pe(r.from),to:si(r),text:Hn(e,r.from,r.to)};return wn(e,a,r.from.line,r.to.line+1),li(e,function(o){return wn(o,a,r.from.line,r.to.line+1)},!0),a}function Gl(e){for(;e.length;){var r=Qe(e);if(r.ranges)e.pop();else break}}function Pf(e,r){if(r)return Gl(e.done),Qe(e.done);if(e.done.length&&!Qe(e.done).ranges)return Qe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Qe(e.done)}function Kl(e,r,a,o){var l=e.history;l.undone.length=0;var d=+new Date,g,b;if((l.lastOp==o||l.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&l.lastModTime>d-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(g=Pf(l,l.lastOp==o)))b=Qe(g.changes),z(r.from,r.to)==0&&z(r.from,b.to)==0?b.to=si(r):g.changes.push(Na(e,r));else{var w=Qe(l.done);for((!w||!w.ranges)&&Ti(e.sel,l.done),g={changes:[Na(e,r)],generation:l.generation},l.done.push(g);l.done.length>l.undoDepth;)l.done.shift(),l.done[0].ranges||l.done.shift()}l.done.push(a),l.generation=++l.maxGeneration,l.lastModTime=l.lastSelTime=d,l.lastOp=l.lastSelOp=o,l.lastOrigin=l.lastSelOrigin=r.origin,b||et(e,"historyAdded")}function Lf(e,r,a,o){var l=r.charAt(0);return l=="*"||l=="+"&&a.ranges.length==o.ranges.length&&a.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function If(e,r,a,o){var l=e.history,d=o&&o.origin;a==l.lastSelOp||d&&l.lastSelOrigin==d&&(l.lastModTime==l.lastSelTime&&l.lastOrigin==d||Lf(e,d,Qe(l.done),r))?l.done[l.done.length-1]=r:Ti(r,l.done),l.lastSelTime=+new Date,l.lastSelOrigin=d,l.lastSelOp=a,o&&o.clearRedo!==!1&&Gl(l.undone)}function Ti(e,r){var a=Qe(r);a&&a.ranges&&a.equals(e)||r.push(e)}function wn(e,r,a,o){var l=r["spans_"+e.id],d=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,o),function(g){g.markedSpans&&((l||(l=r["spans_"+e.id]={}))[d]=g.markedSpans),++d})}function Yl(e){if(!e)return null;for(var r,a=0;a<e.length;++a)e[a].marker.explicitlyCleared?r||(r=e.slice(0,a)):r&&r.push(e[a]);return r?r.length?r:null:e}function Xl(e,r){var a=r["spans_"+e.id];if(!a)return null;for(var o=[],l=0;l<r.text.length;++l)o.push(Yl(a[l]));return o}function Jl(e,r){var a=Xl(e,r),o=da(e,r);if(!a)return o;if(!o)return a;for(var l=0;l<a.length;++l){var d=a[l],g=o[l];if(d&&g)e:for(var b=0;b<g.length;++b){for(var w=g[b],k=0;k<d.length;++k)if(d[k].marker==w.marker)continue e;d.push(w)}else g&&(a[l]=g)}return a}function Pi(e,r,a){for(var o=[],l=0;l<e.length;++l){var d=e[l];if(d.ranges){o.push(a?Fr.prototype.deepCopy.call(d):d);continue}var g=d.changes,b=[];o.push({changes:b});for(var w=0;w<g.length;++w){var k=g[w],H=void 0;if(b.push({from:k.from,to:k.to,text:k.text}),r)for(var X in k)(H=X.match(/^spans_(\d+)$/))&&Fe(r,Number(H[1]))>-1&&(Qe(b)[X]=k[X],delete k[X])}}return o}function Da(e,r,a,o){if(o){var l=e.anchor;if(a){var d=z(r,l)<0;d!=z(a,l)<0?(l=r,r=a):d!=z(r,a)<0&&(r=a)}return new Ot(l,r)}else return new Ot(a||r,r)}function Li(e,r,a,o,l){l==null&&(l=e.cm&&(e.cm.display.shift||e.extend)),ur(e,new Fr([Da(e.sel.primary(),r,a,l)],0),o)}function Ql(e,r,a){for(var o=[],l=e.cm&&(e.cm.display.shift||e.extend),d=0;d<e.sel.ranges.length;d++)o[d]=Da(e.sel.ranges[d],r[d],null,l);var g=Sn(e.cm,o,e.sel.primIndex);ur(e,g,a)}function Fa(e,r,a,o){var l=e.sel.ranges.slice(0);l[r]=a,ur(e,Sn(e.cm,l,e.sel.primIndex),o)}function Ms(e,r,a,o){ur(e,ai(r,a),o)}function Zl(e,r,a){var o={ranges:r.ranges,update:function(l){this.ranges=[];for(var d=0;d<l.length;d++)this.ranges[d]=new Ot(Ge(e,l[d].anchor),Ge(e,l[d].head))},origin:a&&a.origin};return et(e,"beforeSelectionChange",e,o),e.cm&&et(e.cm,"beforeSelectionChange",e.cm,o),o.ranges!=r.ranges?Sn(e.cm,o.ranges,o.ranges.length-1):r}function ql(e,r,a){var o=e.history.done,l=Qe(o);l&&l.ranges?(o[o.length-1]=r,gt(e,r,a)):ur(e,r,a)}function ur(e,r,a){gt(e,r,a),If(e,e.sel,e.cm?e.cm.curOp.id:NaN,a)}function gt(e,r,a){(_t(e,"beforeSelectionChange")||e.cm&&_t(e.cm,"beforeSelectionChange"))&&(r=Zl(e,r,a));var o=a&&a.bias||(z(r.primary().head,e.sel.primary().head)<0?-1:1);Et(e,Jr(e,r,o,!0)),!(a&&a.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&so(e.cm)}function Et(e,r){r.equals(e.sel)||(e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,st(e.cm)),ar(e,"cursorActivity",e))}function lt(e){Et(e,Jr(e,e.sel,null,!1))}function Jr(e,r,a,o){for(var l,d=0;d<r.ranges.length;d++){var g=r.ranges[d],b=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[d],w=Ra(e,g.anchor,b&&b.anchor,a,o),k=g.head==g.anchor?w:Ra(e,g.head,b&&b.head,a,o);(l||w!=g.anchor||k!=g.head)&&(l||(l=r.ranges.slice(0,d)),l[d]=new Ot(w,k))}return l?Sn(e.cm,l,r.primIndex):r}function ho(e,r,a,o,l){var d=$e(e,r.line);if(d.markedSpans)for(var g=0;g<d.markedSpans.length;++g){var b=d.markedSpans[g],w=b.marker,k="selectLeft"in w?!w.selectLeft:w.inclusiveLeft,H="selectRight"in w?!w.selectRight:w.inclusiveRight;if((b.from==null||(k?b.from<=r.ch:b.from<r.ch))&&(b.to==null||(H?b.to>=r.ch:b.to>r.ch))){if(l&&(et(w,"beforeCursorEnter"),w.explicitlyCleared))if(d.markedSpans){--g;continue}else break;if(!w.atomic)continue;if(a){var X=w.find(o<0?1:-1),de=void 0;if((o<0?H:k)&&(X=eu(e,X,-o,X&&X.line==r.line?d:null)),X&&X.line==r.line&&(de=z(X,a))&&(o<0?de<0:de>0))return ho(e,X,r,o,l)}var ue=w.find(o<0?-1:1);return(o<0?k:H)&&(ue=eu(e,ue,o,ue.line==r.line?d:null)),ue?ho(e,ue,r,o,l):null}}return r}function Ra(e,r,a,o,l){var d=o||1,g=ho(e,r,a,d,l)||!l&&ho(e,r,a,d,!0)||ho(e,r,a,-d,l)||!l&&ho(e,r,a,-d,!0);return g||(e.cantEdit=!0,A(e.first,0))}function eu(e,r,a,o){return a<0&&r.ch==0?r.line>e.first?Ge(e,A(r.line-1)):null:a>0&&r.ch==(o||$e(e,r.line)).text.length?r.line<e.first+e.size-1?A(r.line+1,0):null:new A(r.line,r.ch+a)}function ui(e){e.setSelection(A(e.firstLine(),0),A(e.lastLine()),Dt)}function tu(e,r,a){var o={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return o.canceled=!0}};return a&&(o.update=function(l,d,g,b){l&&(o.from=Ge(e,l)),d&&(o.to=Ge(e,d)),g&&(o.text=g),b!==void 0&&(o.origin=b)}),et(e,"beforeChange",e,o),e.cm&&et(e.cm,"beforeChange",e.cm,o),o.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function Ii(e,r,a){if(e.cm){if(!e.cm.curOp)return sr(e.cm,Ii)(e,r,a);if(e.cm.state.suppressEdits)return}if(!((_t(e,"beforeChange")||e.cm&&_t(e.cm,"beforeChange"))&&(r=tu(e,r,!0),!r))){var o=ol&&!a&&es(e,r.from,r.to);if(o)for(var l=o.length-1;l>=0;--l)Ns(e,{from:o[l].from,to:o[l].to,text:l?[""]:r.text,origin:r.origin});else Ns(e,r)}}function Ns(e,r){if(!(r.text.length==1&&r.text[0]==""&&z(r.from,r.to)==0)){var a=B(e,r);Kl(e,r,a,e.cm?e.cm.curOp.id:NaN),Ho(e,r,a,da(e,r));var o=[];li(e,function(l,d){!d&&Fe(o,l.history)==-1&&(Ds(l.history,r),o.push(l.history)),Ho(l,r,null,da(l,r))})}}function Ba(e,r,a){var o=e.cm&&e.cm.state.suppressEdits;if(!(o&&!a)){for(var l=e.history,d,g=e.sel,b=r=="undo"?l.done:l.undone,w=r=="undo"?l.undone:l.done,k=0;k<b.length&&(d=b[k],!(a?d.ranges&&!d.equals(e.sel):!d.ranges));k++);if(k!=b.length){for(l.lastOrigin=l.lastSelOrigin=null;;)if(d=b.pop(),d.ranges){if(Ti(d,w),a&&!d.equals(e.sel)){ur(e,d,{clearRedo:!1});return}g=d}else if(o){b.push(d);return}else break;var H=[];Ti(g,w),w.push({changes:H,generation:l.generation}),l.generation=d.generation||++l.maxGeneration;for(var X=_t(e,"beforeChange")||e.cm&&_t(e.cm,"beforeChange"),de=function(Ce){var Ie=d.changes[Ce];if(Ie.origin=r,X&&!tu(e,Ie,!1))return b.length=0,{};H.push(Na(e,Ie));var De=Ce?B(e,Ie):Qe(b);Ho(e,Ie,De,Jl(e,Ie)),!Ce&&e.cm&&e.cm.scrollIntoView({from:Ie.from,to:si(Ie)});var Ne=[];li(e,function(Oe,Re){!Re&&Fe(Ne,Oe.history)==-1&&(Ds(Oe.history,Ie),Ne.push(Oe.history)),Ho(Oe,Ie,null,Jl(Oe,Ie))})},ue=d.changes.length-1;ue>=0;--ue){var xe=de(ue);if(xe)return xe.v}}}}function ja(e,r){if(r!=0&&(e.first+=r,e.sel=new Fr(bt(e.sel.ranges,function(l){return new Ot(A(l.anchor.line+r,l.anchor.ch),A(l.head.line+r,l.head.ch))}),e.sel.primIndex),e.cm)){Dr(e.cm,e.first,e.first-r,r);for(var a=e.cm.display,o=a.viewFrom;o<a.viewTo;o++)ri(e.cm,o,"gutter")}}function Ho(e,r,a,o){if(e.cm&&!e.cm.curOp)return sr(e.cm,Ho)(e,r,a,o);if(r.to.line<e.first){ja(e,r.text.length-1-(r.to.line-r.from.line));return}if(!(r.from.line>e.lastLine())){if(r.from.line<e.first){var l=r.text.length-1-(e.first-r.from.line);ja(e,l),r={from:A(e.first,0),to:A(r.to.line+l,r.to.ch),text:[Qe(r.text)],origin:r.origin}}var d=e.lastLine();r.to.line>d&&(r={from:r.from,to:A(d,$e(e,d).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Hn(e,r.from,r.to),a||(a=B(e,r)),e.cm?ru(e.cm,r,o):Ls(e,r,o),gt(e,a,Dt),e.cantEdit&&Ra(e,A(e.firstLine(),0))&&(e.cantEdit=!1)}}function ru(e,r,a){var o=e.doc,l=e.display,d=r.from,g=r.to,b=!1,w=d.line;e.options.lineWrapping||(w=wt(bn($e(o,d.line))),o.iter(w,g.line+1,function(ue){if(ue==l.maxLine)return b=!0,!0})),o.sel.contains(r.from,r.to)>-1&&st(e),Ls(o,r,a,kl(e)),e.options.lineWrapping||(o.iter(w,d.line+r.text.length,function(ue){var xe=va(ue);xe>l.maxLineLength&&(l.maxLine=ue,l.maxLineLength=xe,l.maxLineChanged=!0,b=!1)}),b&&(e.curOp.updateMaxLine=!0)),il(o,d.line),jo(e,400);var k=r.text.length-(g.line-d.line)-1;r.full?Dr(e):d.line==g.line&&r.text.length==1&&!Vl(e.doc,r)?ri(e,d.line,"text"):Dr(e,d.line,g.line+1,k);var H=_t(e,"changes"),X=_t(e,"change");if(X||H){var de={from:d,to:g,text:r.text,removed:r.removed,origin:r.origin};X&&ar(e,"change",e,de),H&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(de)}e.display.selForContextMenu=null}function po(e,r,a,o,l){var d;o||(o=a),z(o,a)<0&&(d=[o,a],a=d[0],o=d[1]),typeof r=="string"&&(r=e.splitLines(r)),Ii(e,{from:a,to:o,text:r,origin:l})}function nu(e,r,a,o){a<e.line?e.line+=o:r<e.line&&(e.line=r,e.ch=0)}function iu(e,r,a,o){for(var l=0;l<e.length;++l){var d=e[l],g=!0;if(d.ranges){d.copied||(d=e[l]=d.deepCopy(),d.copied=!0);for(var b=0;b<d.ranges.length;b++)nu(d.ranges[b].anchor,r,a,o),nu(d.ranges[b].head,r,a,o);continue}for(var w=0;w<d.changes.length;++w){var k=d.changes[w];if(a<k.from.line)k.from=A(k.from.line+o,k.from.ch),k.to=A(k.to.line+o,k.to.ch);else if(r<=k.to.line){g=!1;break}}g||(e.splice(0,l+1),l=0)}}function Ds(e,r){var a=r.from.line,o=r.to.line,l=r.text.length-(o-a)-1;iu(e.done,a,o,l),iu(e.undone,a,o,l)}function Uo(e,r,a,o){var l=r,d=r;return typeof r=="number"?d=$e(e,Ct(e,r)):l=wt(r),l==null?null:(o(d,l)&&e.cm&&ri(e.cm,l,a),d)}function Mi(e){this.lines=e,this.parent=null;for(var r=0,a=0;a<e.length;++a)e[a].parent=this,r+=e[a].height;this.height=r}Mi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var a=e,o=e+r;a<o;++a){var l=this.lines[a];this.height-=l.height,pl(l),ar(l,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,a){this.height+=a,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var o=0;o<r.length;++o)r[o].parent=this},iterN:function(e,r,a){for(var o=e+r;e<o;++e)if(a(this.lines[e]))return!0}};function vo(e){this.children=e;for(var r=0,a=0,o=0;o<e.length;++o){var l=e[o];r+=l.chunkSize(),a+=l.height,l.parent=this}this.size=r,this.height=a,this.parent=null}vo.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var a=0;a<this.children.length;++a){var o=this.children[a],l=o.chunkSize();if(e<l){var d=Math.min(r,l-e),g=o.height;if(o.removeInner(e,d),this.height-=g-o.height,l==d&&(this.children.splice(a--,1),o.parent=null),(r-=d)==0)break;e=0}else e-=l}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Mi))){var b=[];this.collapse(b),this.children=[new Mi(b)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,a){this.size+=r.length,this.height+=a;for(var o=0;o<this.children.length;++o){var l=this.children[o],d=l.chunkSize();if(e<=d){if(l.insertInner(e,r,a),l.lines&&l.lines.length>50){for(var g=l.lines.length%25+25,b=g;b<l.lines.length;){var w=new Mi(l.lines.slice(b,b+=25));l.height-=w.height,this.children.splice(++o,0,w),w.parent=this}l.lines=l.lines.slice(0,g),this.maybeSpill()}break}e-=d}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var r=e.children.splice(e.children.length-5,5),a=new vo(r);if(e.parent){e.size-=a.size,e.height-=a.height;var l=Fe(e.parent.children,e);e.parent.children.splice(l+1,0,a)}else{var o=new vo(e.children);o.parent=e,e.children=[o,a],e=o}a.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,r,a){for(var o=0;o<this.children.length;++o){var l=this.children[o],d=l.chunkSize();if(e<d){var g=Math.min(r,d-e);if(l.iterN(e,g,a))return!0;if((r-=g)==0)break;e=0}else e-=d}}};var zo=function(e,r,a){if(a)for(var o in a)a.hasOwnProperty(o)&&(this[o]=a[o]);this.doc=e,this.node=r};zo.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,a=this.line,o=wt(a);if(!(o==null||!r)){for(var l=0;l<r.length;++l)r[l]==this&&r.splice(l--,1);r.length||(a.widgets=null);var d=$n(this);nn(a,Math.max(0,a.height-d)),e&&(_r(e,function(){ou(e,a,-d),ri(e,o,"widget")}),ar(e,"lineWidgetCleared",e,this,o))}},zo.prototype.changed=function(){var e=this,r=this.height,a=this.doc.cm,o=this.line;this.height=null;var l=$n(this)-r;l&&(_n(this.doc,o)||nn(o,o.height+l),a&&_r(a,function(){a.curOp.forceUpdate=!0,ou(a,o,l),ar(a,"lineWidgetChanged",a,e,wt(o))}))},Er(zo);function ou(e,r,a){Vn(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&As(e,a)}function Mf(e,r,a,o){var l=new zo(e,a,o),d=e.cm;return d&&l.noHScroll&&(d.display.alignWidgets=!0),Uo(e,r,"widget",function(g){var b=g.widgets||(g.widgets=[]);if(l.insertAt==null?b.push(l):b.splice(Math.min(b.length,Math.max(0,l.insertAt)),0,l),l.line=g,d&&!_n(e,g)){var w=Vn(g)<e.scrollTop;nn(g,g.height+$n(l)),w&&As(d,l.height),d.curOp.forceUpdate=!0}return!0}),d&&ar(d,"lineWidgetAdded",d,l,typeof r=="number"?r:wt(r)),l}var au=0,Qr=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++au};Qr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,r=e&&!e.curOp;if(r&&Ei(e),_t(this,"clear")){var a=this.find();a&&ar(this,"clear",a.from,a.to)}for(var o=null,l=null,d=0;d<this.lines.length;++d){var g=this.lines[d],b=Ji(g.markedSpans,this);e&&!this.collapsed?ri(e,wt(g),"text"):e&&(b.to!=null&&(l=wt(g)),b.from!=null&&(o=wt(g))),g.markedSpans=Xe(g.markedSpans,b),b.from==null&&this.collapsed&&!_n(this.doc,g)&&e&&nn(g,ro(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var w=0;w<this.lines.length;++w){var k=bn(this.lines[w]),H=va(k);H>e.display.maxLineLength&&(e.display.maxLine=k,e.display.maxLineLength=H,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&Dr(e,o,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&<(e.doc)),e&&ar(e,"markerCleared",e,this,o,l),r&&ki(e),this.parent&&this.parent.clear()}},Qr.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var a,o,l=0;l<this.lines.length;++l){var d=this.lines[l],g=Ji(d.markedSpans,this);if(g.from!=null&&(a=A(r?d:wt(d),g.from),e==-1))return a;if(g.to!=null&&(o=A(r?d:wt(d),g.to),e==1))return o}return a&&{from:a,to:o}},Qr.prototype.changed=function(){var e=this,r=this.find(-1,!0),a=this,o=this.doc.cm;!r||!o||_r(o,function(){var l=r.line,d=wt(r.line),g=xa(o,d);if(g&&(fs(g),o.curOp.selectionChanged=o.curOp.forceUpdate=!0),o.curOp.updateMaxLine=!0,!_n(a.doc,l)&&a.height!=null){var b=a.height;a.height=null;var w=$n(a)-b;w&&nn(l,l.height+w)}ar(o,"markerChanged",o,e)})},Qr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||Fe(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Qr.prototype.detachLine=function(e){if(this.lines.splice(Fe(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Er(Qr);function Ni(e,r,a,o,l){if(o&&o.shared)return Nf(e,r,a,o,l);if(e.cm&&!e.cm.curOp)return sr(e.cm,Ni)(e,r,a,o,l);var d=new Qr(e,l),g=z(r,a);if(o&&At(o,d,!1),g>0||g==0&&d.clearWhenEmpty!==!1)return d;if(d.replacedWith&&(d.collapsed=!0,d.widgetNode=ve("span",[d.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||d.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(d.widgetNode.insertLeft=!0)),d.collapsed){if(cl(e,r.line,r,a,d)||r.line!=a.line&&cl(e,a.line,r,a,d))throw new Error("Inserting collapsed marker partially overlapping an existing one");Xi()}d.addToHistory&&Kl(e,{from:r,to:a,origin:"markText"},e.sel,NaN);var b=r.line,w=e.cm,k;if(e.iter(b,a.line+1,function(X){w&&d.collapsed&&!w.options.lineWrapping&&bn(X)==w.display.maxLine&&(k=!0),d.collapsed&&b!=r.line&&nn(X,0),ca(X,new fa(d,b==r.line?r.ch:null,b==a.line?a.ch:null),e.cm&&e.cm.curOp),++b}),d.collapsed&&e.iter(r.line,a.line+1,function(X){_n(e,X)&&nn(X,0)}),d.clearOnEnter&&ne(d,"beforeCursorEnter",function(){return d.clear()}),d.readOnly&&(al(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),d.collapsed&&(d.id=++au,d.atomic=!0),w){if(k&&(w.curOp.updateMaxLine=!0),d.collapsed)Dr(w,r.line,a.line+1);else if(d.className||d.startStyle||d.endStyle||d.css||d.attributes||d.title)for(var H=r.line;H<=a.line;H++)ri(w,H,"text");d.atomic&<(w.doc),ar(w,"markerAdded",w,d)}return d}var Cn=function(e,r){this.markers=e,this.primary=r;for(var a=0;a<e.length;++a)e[a].parent=this};Cn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ar(this,"clear")}},Cn.prototype.find=function(e,r){return this.primary.find(e,r)},Er(Cn);function Nf(e,r,a,o,l){o=At(o),o.shared=!1;var d=[Ni(e,r,a,o,l)],g=d[0],b=o.widgetNode;return li(e,function(w){b&&(o.widgetNode=b.cloneNode(!0)),d.push(Ni(w,Ge(w,r),Ge(w,a),o,l));for(var k=0;k<w.linked.length;++k)if(w.linked[k].isParent)return;g=Qe(d)}),new Cn(d,g)}function su(e){return e.findMarks(A(e.first,0),e.clipPos(A(e.lastLine())),function(r){return r.parent})}function Df(e,r){for(var a=0;a<r.length;a++){var o=r[a],l=o.find(),d=e.clipPos(l.from),g=e.clipPos(l.to);if(z(d,g)){var b=Ni(e,d,g,o.primary,o.primary.type);o.markers.push(b),b.parent=o}}}function lu(e){for(var r=function(o){var l=e[o],d=[l.primary.doc];li(l.primary.doc,function(w){return d.push(w)});for(var g=0;g<l.markers.length;g++){var b=l.markers[g];Fe(d,b.doc)==-1&&(b.parent=null,l.markers.splice(g--,1))}},a=0;a<e.length;a++)r(a)}var Ff=0,Rr=function(e,r,a,o,l){if(!(this instanceof Rr))return new Rr(e,r,a,o,l);a==null&&(a=0),vo.call(this,[new Mi([new yi("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var d=A(a,0);this.sel=ai(d),this.history=new Ma(null),this.id=++Ff,this.modeOption=r,this.lineSep=o,this.direction=l=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ls(this,{from:d,to:d,text:e}),ur(this,ai(d),Dt)};Rr.prototype=Ft(vo.prototype,{constructor:Rr,iter:function(e,r,a){a?this.iterN(e-this.first,r-e,a):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var a=0,o=0;o<r.length;++o)a+=r[o].height;this.insertInner(e-this.first,r,a)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=pi(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:lr(function(e){var r=A(this.first,0),a=this.first+this.size-1;Ii(this,{from:r,to:A(a,$e(this,a).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ai(this.cm,0,0),ur(this,ai(r),Dt)}),replaceRange:function(e,r,a,o){r=Ge(this,r),a=a?Ge(this,a):r,po(this,e,r,a,o)},getRange:function(e,r,a){var o=Hn(this,Ge(this,e),Ge(this,r));return a===!1?o:a===""?o.join(""):o.join(a||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(vi(this,e))return $e(this,e)},getLineNumber:function(e){return wt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=$e(this,e)),bn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ge(this,e)},getCursor:function(e){var r=this.sel.primary(),a;return e==null||e=="head"?a=r.head:e=="anchor"?a=r.anchor:e=="end"||e=="to"||e===!1?a=r.to():a=r.from(),a},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:lr(function(e,r,a){Ms(this,Ge(this,typeof e=="number"?A(e,r||0):e),null,a)}),setSelection:lr(function(e,r,a){Ms(this,Ge(this,e),Ge(this,r||e),a)}),extendSelection:lr(function(e,r,a){Li(this,Ge(this,e),r&&Ge(this,r),a)}),extendSelections:lr(function(e,r){Ql(this,Po(this,e),r)}),extendSelectionsBy:lr(function(e,r){var a=bt(this.sel.ranges,e);Ql(this,Po(this,a),r)}),setSelections:lr(function(e,r,a){if(e.length){for(var o=[],l=0;l<e.length;l++)o[l]=new Ot(Ge(this,e[l].anchor),Ge(this,e[l].head||e[l].anchor));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),ur(this,Sn(this.cm,o,r),a)}}),addSelection:lr(function(e,r,a){var o=this.sel.ranges.slice(0);o.push(new Ot(Ge(this,e),Ge(this,r||e))),ur(this,Sn(this.cm,o,o.length-1),a)}),getSelection:function(e){for(var r=this.sel.ranges,a,o=0;o<r.length;o++){var l=Hn(this,r[o].from(),r[o].to());a=a?a.concat(l):l}return e===!1?a:a.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],a=this.sel.ranges,o=0;o<a.length;o++){var l=Hn(this,a[o].from(),a[o].to());e!==!1&&(l=l.join(e||this.lineSeparator())),r[o]=l}return r},replaceSelection:function(e,r,a){for(var o=[],l=0;l<this.sel.ranges.length;l++)o[l]=e;this.replaceSelections(o,r,a||"+input")},replaceSelections:lr(function(e,r,a){for(var o=[],l=this.sel,d=0;d<l.ranges.length;d++){var g=l.ranges[d];o[d]={from:g.from(),to:g.to(),text:this.splitLines(e[d]),origin:a}}for(var b=r&&r!="end"&&Dn(this,o,r),w=o.length-1;w>=0;w--)Ii(this,o[w]);b?ql(this,b):this.cm&&so(this.cm)}),undo:lr(function(){Ba(this,"undo")}),redo:lr(function(){Ba(this,"redo")}),undoSelection:lr(function(){Ba(this,"undo",!0)}),redoSelection:lr(function(){Ba(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,a=0,o=0;o<e.done.length;o++)e.done[o].ranges||++r;for(var l=0;l<e.undone.length;l++)e.undone[l].ranges||++a;return{undo:r,redo:a}},clearHistory:function(){var e=this;this.history=new Ma(this.history),li(this,function(r){return r.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Pi(this.history.done),undone:Pi(this.history.undone)}},setHistory:function(e){var r=this.history=new Ma(this.history);r.done=Pi(e.done.slice(0),null,!0),r.undone=Pi(e.undone.slice(0),null,!0)},setGutterMarker:lr(function(e,r,a){return Uo(this,e,"gutter",function(o){var l=o.gutterMarkers||(o.gutterMarkers={});return l[r]=a,!a&&tn(l)&&(o.gutterMarkers=null),!0})}),clearGutter:lr(function(e){var r=this;this.iter(function(a){a.gutterMarkers&&a.gutterMarkers[e]&&Uo(r,a,"gutter",function(){return a.gutterMarkers[e]=null,tn(a.gutterMarkers)&&(a.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!vi(this,e)||(r=e,e=$e(this,e),!e))return null}else if(r=wt(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:lr(function(e,r,a){return Uo(this,e,r=="gutter"?"gutter":"class",function(o){var l=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!o[l])o[l]=a;else{if(U(a).test(o[l]))return!1;o[l]+=" "+a}return!0})}),removeLineClass:lr(function(e,r,a){return Uo(this,e,r=="gutter"?"gutter":"class",function(o){var l=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",d=o[l];if(d)if(a==null)o[l]=null;else{var g=d.match(U(a));if(!g)return!1;var b=g.index+g[0].length;o[l]=d.slice(0,g.index)+(!g.index||b==d.length?"":" ")+d.slice(b)||null}else return!1;return!0})}),addLineWidget:lr(function(e,r,a){return Mf(this,e,r,a)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,a){return Ni(this,Ge(this,e),Ge(this,r),a,a&&a.type||"range")},setBookmark:function(e,r){var a={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=Ge(this,e),Ni(this,e,e,a,"bookmark")},findMarksAt:function(e){e=Ge(this,e);var r=[],a=$e(this,e.line).markedSpans;if(a)for(var o=0;o<a.length;++o){var l=a[o];(l.from==null||l.from<=e.ch)&&(l.to==null||l.to>=e.ch)&&r.push(l.marker.parent||l.marker)}return r},findMarks:function(e,r,a){e=Ge(this,e),r=Ge(this,r);var o=[],l=e.line;return this.iter(e.line,r.line+1,function(d){var g=d.markedSpans;if(g)for(var b=0;b<g.length;b++){var w=g[b];!(w.to!=null&&l==e.line&&e.ch>=w.to||w.from==null&&l!=e.line||w.from!=null&&l==r.line&&w.from>=r.ch)&&(!a||a(w.marker))&&o.push(w.marker.parent||w.marker)}++l}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var a=r.markedSpans;if(a)for(var o=0;o<a.length;++o)a[o].from!=null&&e.push(a[o].marker)}),e},posFromIndex:function(e){var r,a=this.first,o=this.lineSeparator().length;return this.iter(function(l){var d=l.text.length+o;if(d>e)return r=e,!0;e-=d,++a}),Ge(this,A(a,r))},indexFromPos:function(e){e=Ge(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,e.line,function(o){r+=o.text.length+a}),r},copy:function(e){var r=new Rr(pi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,a=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<a&&(a=e.to);var o=new Rr(pi(this,r,a),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(o.history=this.history),(this.linked||(this.linked=[])).push({doc:o,sharedHist:e.sharedHist}),o.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Df(o,su(this)),o},unlinkDoc:function(e){if(e instanceof $t&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var a=this.linked[r];if(a.doc==e){this.linked.splice(r,1),e.unlinkDoc(this),lu(su(this));break}}if(e.history==this.history){var o=[e.id];li(e,function(l){return o.push(l.id)},!0),e.history=new Ma(null),e.history.done=Pi(this.history.done,o),e.history.undone=Pi(this.history.undone,o)}},iterLinkedDocs:function(e){li(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):gn(e)},lineSeparator:function(){return this.lineSep||`
|
|
23
|
-
`},setDirection:lr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Tf(this.cm))})}),Rr.prototype.eachLine=Rr.prototype.iter;var Fs=0;function _o(e){var r=this;if(Rs(r),!(ft(r,e)||Gn(r.display,e))){St(e),D&&(Fs=+new Date);var a=wi(r,e,!0),o=e.dataTransfer.files;if(!(!a||r.isReadOnly()))if(o&&o.length&&window.FileReader&&window.File)for(var l=o.length,d=Array(l),g=0,b=function(){++g==l&&sr(r,function(){a=Ge(r.doc,a);var ue={from:a,to:a,text:r.doc.splitLines(d.filter(function(xe){return xe!=null}).join(r.doc.lineSeparator())),origin:"paste"};Ii(r.doc,ue),ql(r.doc,ai(Ge(r.doc,a),Ge(r.doc,si(ue))))})()},w=function(ue,xe){if(r.options.allowDropFileTypes&&Fe(r.options.allowDropFileTypes,ue.type)==-1){b();return}var Ce=new FileReader;Ce.onerror=function(){return b()},Ce.onload=function(){var Ie=Ce.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ie)){b();return}d[xe]=Ie,b()},Ce.readAsText(ue)},k=0;k<o.length;k++)w(o[k],k);else{if(r.state.draggingText&&r.doc.sel.contains(a)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var H=e.dataTransfer.getData("Text");if(H){var X;if(r.state.draggingText&&!r.state.draggingText.copy&&(X=r.listSelections()),gt(r.doc,ai(a,a)),X)for(var de=0;de<X.length;++de)po(r.doc,"",X[de].anchor,X[de].head,"drag");r.replaceSelection(H,"around","paste"),r.display.input.focus()}}catch{}}}}function Rf(e,r){if(D&&(!e.state.draggingText||+new Date-Fs<100)){gr(r);return}if(!(ft(e,r)||Gn(e.display,r))&&(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!se)){var a=G("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",re&&(a.width=a.height=1,e.display.wrapper.appendChild(a),a._top=a.offsetTop),r.dataTransfer.setDragImage(a,0,0),re&&a.parentNode.removeChild(a)}}function Wa(e,r){var a=wi(e,r);if(a){var o=document.createDocumentFragment();Ca(e,a,o),e.display.dragCursor||(e.display.dragCursor=G("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ge(e.display.dragCursor,o)}}function Rs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ln(e){if(document.getElementsByClassName){for(var r=document.getElementsByClassName("CodeMirror"),a=[],o=0;o<r.length;o++){var l=r[o].CodeMirror;l&&a.push(l)}a.length&&a[0].operation(function(){for(var d=0;d<a.length;d++)e(a[d])})}}var Bf=!1;function uu(){Bf||(fu(),Bf=!0)}function fu(){var e;ne(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ln(Vo)},100))}),ne(window,"blur",function(){return ln(oo)})}function Vo(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var _e={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},$o=0;$o<10;$o++)_e[$o+48]=_e[$o+96]=String($o);for(var Wt=65;Wt<=90;Wt++)_e[Wt]=String.fromCharCode(Wt);for(var Go=1;Go<=12;Go++)_e[Go+111]=_e[Go+63235]="F"+Go;var Yn={};Yn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Yn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Yn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Yn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Yn.default=L?Yn.macDefault:Yn.pcDefault;function jf(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var a,o,l,d,g=0;g<r.length-1;g++){var b=r[g];if(/^(cmd|meta|m)$/i.test(b))d=!0;else if(/^a(lt)?$/i.test(b))a=!0;else if(/^(c|ctrl|control)$/i.test(b))o=!0;else if(/^s(hift)?$/i.test(b))l=!0;else throw new Error("Unrecognized modifier name: "+b)}return a&&(e="Alt-"+e),o&&(e="Ctrl-"+e),d&&(e="Cmd-"+e),l&&(e="Shift-"+e),e}function Wf(e){var r={};for(var a in e)if(e.hasOwnProperty(a)){var o=e[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if(o=="..."){delete e[a];continue}for(var l=bt(a.split(" "),jf),d=0;d<l.length;d++){var g=void 0,b=void 0;d==l.length-1?(b=l.join(" "),g=o):(b=l.slice(0,d+1).join(" "),g="...");var w=r[b];if(!w)r[b]=g;else if(w!=g)throw new Error("Inconsistent bindings for "+b)}delete e[a]}for(var k in r)e[k]=r[k];return e}function go(e,r,a,o){r=Ko(r);var l=r.call?r.call(e,o):r[e];if(l===!1)return"nothing";if(l==="...")return"multi";if(l!=null&&a(l))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return go(e,r.fallthrough,a,o);for(var d=0;d<r.fallthrough.length;d++){var g=go(e,r.fallthrough[d],a,o);if(g)return g}}}function Bs(e){var r=typeof e=="string"?e:_e[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function cu(e,r,a){var o=e;return r.altKey&&o!="Alt"&&(e="Alt-"+e),(j?r.metaKey:r.ctrlKey)&&o!="Ctrl"&&(e="Ctrl-"+e),(j?r.ctrlKey:r.metaKey)&&o!="Mod"&&(e="Cmd-"+e),!a&&r.shiftKey&&o!="Shift"&&(e="Shift-"+e),e}function du(e,r){if(re&&e.keyCode==34&&e.char)return!1;var a=_e[e.keyCode];return a==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(a=e.code),cu(a,e,r))}function Ko(e){return typeof e=="string"?Yn[e]:e}function Di(e,r){for(var a=e.doc.sel.ranges,o=[],l=0;l<a.length;l++){for(var d=r(a[l]);o.length&&z(d.from,Qe(o).to)<=0;){var g=o.pop();if(z(g.from,d.from)<0){d.from=g.from;break}}o.push(d)}_r(e,function(){for(var b=o.length-1;b>=0;b--)po(e.doc,"",o[b].from,o[b].to,"+delete");so(e)})}function Ha(e,r,a){var o=Hr(e.text,r+a,a);return o<0||o>e.text.length?null:o}function js(e,r,a){var o=Ha(e,r.ch,a);return o==null?null:new A(r.line,o,a<0?"after":"before")}function Ws(e,r,a,o,l){if(e){r.doc.direction=="rtl"&&(l=-l);var d=Ze(a,r.doc.direction);if(d){var g=l<0?Qe(d):d[0],b=l<0==(g.level==1),w=b?"after":"before",k;if(g.level>0||r.doc.direction=="rtl"){var H=xi(r,a);k=l<0?a.text.length-1:0;var X=an(r,H,k).top;k=vr(function(de){return an(r,H,de).top==X},l<0==(g.level==1)?g.from:g.to-1,k),w=="before"&&(k=Ha(a,k,1))}else k=l<0?g.to:g.from;return new A(o,k,w)}}return new A(o,l<0?a.text.length:0,l<0?"before":"after")}function Hf(e,r,a,o){var l=Ze(r,e.doc.direction);if(!l)return js(r,a,o);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var d=mt(l,a.ch,a.sticky),g=l[d];if(e.doc.direction=="ltr"&&g.level%2==0&&(o>0?g.to>a.ch:g.from<a.ch))return js(r,a,o);var b=function(De,Ne){return Ha(r,De instanceof A?De.ch:De,Ne)},w,k=function(De){return e.options.lineWrapping?(w=w||xi(e,r),El(e,r,w,De)):{begin:0,end:r.text.length}},H=k(a.sticky=="before"?b(a,-1):a.ch);if(e.doc.direction=="rtl"||g.level==1){var X=g.level==1==o<0,de=b(a,X?1:-1);if(de!=null&&(X?de<=g.to&&de<=H.end:de>=g.from&&de>=H.begin)){var ue=X?"before":"after";return new A(a.line,de,ue)}}var xe=function(De,Ne,Oe){for(var Re=function(Bt,Zt){return Zt?new A(a.line,b(Bt,1),"before"):new A(a.line,Bt,"after")};De>=0&&De<l.length;De+=Ne){var Ye=l[De],Ke=Ne>0==(Ye.level!=1),pt=Ke?Oe.begin:b(Oe.end,-1);if(Ye.from<=pt&&pt<Ye.to||(pt=Ke?Ye.from:b(Ye.to,-1),Oe.begin<=pt&&pt<Oe.end))return Re(pt,Ke)}},Ce=xe(d+o,o,H);if(Ce)return Ce;var Ie=o>0?H.end:b(H.begin,-1);return Ie!=null&&!(o>0&&Ie==r.text.length)&&(Ce=xe(o>0?0:l.length-1,o,k(Ie)),Ce)?Ce:null}var mo={selectAll:ui,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Dt)},killLine:function(e){return Di(e,function(r){if(r.empty()){var a=$e(e.doc,r.head.line).text.length;return r.head.ch==a&&r.head.line<e.lastLine()?{from:r.head,to:A(r.head.line+1,0)}:{from:r.head,to:A(r.head.line,a)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return Di(e,function(r){return{from:A(r.from().line,0),to:Ge(e.doc,A(r.to().line+1,0))}})},delLineLeft:function(e){return Di(e,function(r){return{from:A(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return Di(e,function(r){var a=e.charCoords(r.head,"div").top+5,o=e.coordsChar({left:0,top:a},"div");return{from:o,to:r.from()}})},delWrappedLineRight:function(e){return Di(e,function(r){var a=e.charCoords(r.head,"div").top+5,o=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:a},"div");return{from:r.from(),to:o}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(A(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(A(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return hu(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return pu(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Uf(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var a=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:a},"div")},xt)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var a=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:a},"div")},xt)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var a=e.cursorCoords(r.head,"div").top+5,o=e.coordsChar({left:0,top:a},"div");return o.ch<e.getLine(o.line).search(/\S/)?pu(e,r.head):o},xt)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],a=e.listSelections(),o=e.options.tabSize,l=0;l<a.length;l++){var d=a[l].from(),g=nt(e.getLine(d.line),d.ch,o);r.push(dr(o-g%o))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return _r(e,function(){for(var r=e.listSelections(),a=[],o=0;o<r.length;o++)if(r[o].empty()){var l=r[o].head,d=$e(e.doc,l.line).text;if(d){if(l.ch==d.length&&(l=new A(l.line,l.ch-1)),l.ch>0)l=new A(l.line,l.ch+1),e.replaceRange(d.charAt(l.ch-1)+d.charAt(l.ch-2),A(l.line,l.ch-2),l,"+transpose");else if(l.line>e.doc.first){var g=$e(e.doc,l.line-1).text;g&&(l=new A(l.line,1),e.replaceRange(d.charAt(0)+e.doc.lineSeparator()+g.charAt(g.length-1),A(l.line-1,g.length-1),l,"+transpose"))}}a.push(new Ot(l,l))}e.setSelections(a)})},newlineAndIndent:function(e){return _r(e,function(){for(var r=e.listSelections(),a=r.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),r[a].anchor,r[a].head,"+input");r=e.listSelections();for(var o=0;o<r.length;o++)e.indentLine(r[o].from().line,null,!0);so(e)})},openLine:function(e){return e.replaceSelection(`
|
|
24
|
-
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function hu(e,r){var a=$e(e.doc,r),o=bn(a);return o!=a&&(r=wt(o)),Ws(!0,e,o,r,1)}function Uf(e,r){var a=$e(e.doc,r),o=Vu(a);return o!=a&&(r=wt(o)),Ws(!0,e,a,r,-1)}function pu(e,r){var a=hu(e,r.line),o=$e(e.doc,a.line),l=Ze(o,e.doc.direction);if(!l||l[0].level==0){var d=Math.max(a.ch,o.text.search(/\S/)),g=r.line==a.line&&r.ch<=d&&r.ch;return A(a.line,g?0:d,a.sticky)}return a}function Fi(e,r,a){if(typeof r=="string"&&(r=mo[r],!r))return!1;e.display.input.ensurePolled();var o=e.display.shift,l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a&&(e.display.shift=!1),l=r(e)!=it}finally{e.display.shift=o,e.state.suppressEdits=!1}return l}function vu(e,r,a){for(var o=0;o<e.state.keyMaps.length;o++){var l=go(r,e.state.keyMaps[o],a,e);if(l)return l}return e.options.extraKeys&&go(r,e.options.extraKeys,a,e)||go(r,e.options.keyMap,a,e)}var gu=new Ue;function yo(e,r,a,o){var l=e.state.keySeq;if(l){if(Bs(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:gu.set(50,function(){e.state.keySeq==l&&(e.state.keySeq=null,e.display.input.reset())}),mu(e,l+" "+r,a,o))return!0}return mu(e,r,a,o)}function mu(e,r,a,o){var l=vu(e,r,o);return l=="multi"&&(e.state.keySeq=r),l=="handled"&&ar(e,"keyHandled",e,r,a),(l=="handled"||l=="multi")&&(St(a),ii(e)),!!l}function yu(e,r){var a=du(r,!0);return a?r.shiftKey&&!e.state.keySeq?yo(e,"Shift-"+a,r,function(o){return Fi(e,o,!0)})||yo(e,a,r,function(o){if(typeof o=="string"?/^go[A-Z]/.test(o):o.motion)return Fi(e,o)}):yo(e,a,r,function(o){return Fi(e,o)}):!1}function zf(e,r,a){return yo(e,"'"+a+"'",r,function(o){return Fi(e,o,!0)})}var Yo=null;function bu(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&(r.curOp.focus=Ve(ot(r)),!ft(r,e))){D&&R<11&&e.keyCode==27&&(e.returnValue=!1);var a=e.keyCode;r.display.shift=a==16||e.shiftKey;var o=yu(r,e);re&&(Yo=o?a:null,!o&&a==88&&!$i&&(L?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),v&&!L&&!o&&a==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),a==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&_f(r)}}function _f(e){var r=e.display.lineDiv;ze(r,"CodeMirror-crosshair");function a(o){(o.keyCode==18||!o.altKey)&&(Y(r,"CodeMirror-crosshair"),We(document,"keyup",a),We(document,"mouseover",a))}ne(document,"keyup",a),ne(document,"mouseover",a)}function xu(e){e.keyCode==16&&(this.doc.sel.shift=!1),ft(this,e)}function Su(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&!(Gn(r.display,e)||ft(r,e)||e.ctrlKey&&!e.altKey||L&&e.metaKey)){var a=e.keyCode,o=e.charCode;if(re&&a==Yo){Yo=null,St(e);return}if(!(re&&(!e.which||e.which<10)&&yu(r,e))){var l=String.fromCharCode(o??a);l!="\b"&&(zf(r,e,l)||r.display.input.onKeyPress(e))}}}var Vf=400,bo=function(e,r,a){this.time=e,this.pos=r,this.button=a};bo.prototype.compare=function(e,r,a){return this.time+Vf>e&&z(r,this.pos)==0&&a==this.button};var Ri,Xo;function $f(e,r){var a=+new Date;return Xo&&Xo.compare(a,e,r)?(Ri=Xo=null,"triple"):Ri&&Ri.compare(a,e,r)?(Xo=new bo(a,e,r),Ri=null,"double"):(Ri=new bo(a,e,r),Xo=null,"single")}function Jo(e){var r=this,a=r.display;if(!(ft(r,e)||a.activeTouch&&a.input.supportsTouch())){if(a.input.ensurePolled(),a.shift=e.shiftKey,Gn(a,e)){_||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(!Us(r,e)){var o=wi(r,e),l=jn(e),d=o?$f(o,l):"single";Xt(r).focus(),l==1&&r.state.selectingText&&r.state.selectingText(e),!(o&&wu(r,l,o,d,e))&&(l==1?o?Au(r,o,d,e):mr(e)==a.scroller&&St(e):l==2?(o&&Li(r.doc,o),setTimeout(function(){return a.input.focus()},20)):l==3&&(ie?r.display.input.onContextMenu(e):xs(r)))}}}function wu(e,r,a,o,l){var d="Click";return o=="double"?d="Double"+d:o=="triple"&&(d="Triple"+d),d=(r==1?"Left":r==2?"Middle":"Right")+d,yo(e,cu(d,l),l,function(g){if(typeof g=="string"&&(g=mo[g]),!g)return!1;var b=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),b=g(e,a)!=it}finally{e.state.suppressEdits=!1}return b})}function Cu(e,r,a){var o=e.getOption("configureMouse"),l=o?o(e,r,a):{};if(l.unit==null){var d=F?a.shiftKey&&a.metaKey:a.altKey;l.unit=d?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(l.extend==null||e.doc.extend)&&(l.extend=e.doc.extend||a.shiftKey),l.addNew==null&&(l.addNew=L?a.metaKey:a.ctrlKey),l.moveOnDrag==null&&(l.moveOnDrag=!(L?a.altKey:a.ctrlKey)),l}function Au(e,r,a,o){D?setTimeout(dt(Oa,e),0):e.curOp.focus=Ve(ot(e));var l=Cu(e,a,o),d=e.doc.sel,g;e.options.dragDrop&&kr&&!e.isReadOnly()&&a=="single"&&(g=d.contains(r))>-1&&(z((g=d.ranges[g]).from(),r)<0||r.xRel>0)&&(z(g.to(),r)>0||r.xRel<0)?Gf(e,o,r,l):Kf(e,o,r,l)}function Gf(e,r,a,o){var l=e.display,d=!1,g=sr(e,function(k){_&&(l.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:xs(e)),We(l.wrapper.ownerDocument,"mouseup",g),We(l.wrapper.ownerDocument,"mousemove",b),We(l.scroller,"dragstart",w),We(l.scroller,"drop",g),d||(St(k),o.addNew||Li(e.doc,a,null,null,o.extend),_&&!se||D&&R==9?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),b=function(k){d=d||Math.abs(r.clientX-k.clientX)+Math.abs(r.clientY-k.clientY)>=10},w=function(){return d=!0};_&&(l.scroller.draggable=!0),e.state.draggingText=g,g.copy=!o.moveOnDrag,ne(l.wrapper.ownerDocument,"mouseup",g),ne(l.wrapper.ownerDocument,"mousemove",b),ne(l.scroller,"dragstart",w),ne(l.scroller,"drop",g),e.state.delayingBlurEvent=!0,setTimeout(function(){return l.input.focus()},20),l.scroller.dragDrop&&l.scroller.dragDrop()}function Hs(e,r,a){if(a=="char")return new Ot(r,r);if(a=="word")return e.findWordAt(r);if(a=="line")return new Ot(A(r.line,0),Ge(e.doc,A(r.line+1,0)));var o=a(e,r);return new Ot(o.from,o.to)}function Kf(e,r,a,o){D&&xs(e);var l=e.display,d=e.doc;St(r);var g,b,w=d.sel,k=w.ranges;if(o.addNew&&!o.extend?(b=d.sel.contains(a),b>-1?g=k[b]:g=new Ot(a,a)):(g=d.sel.primary(),b=d.sel.primIndex),o.unit=="rectangle")o.addNew||(g=new Ot(a,a)),a=wi(e,r,!0,!0),b=-1;else{var H=Hs(e,a,o.unit);o.extend?g=Da(g,H.anchor,H.head,o.extend):g=H}o.addNew?b==-1?(b=k.length,ur(d,Sn(e,k.concat([g]),b),{scroll:!1,origin:"*mouse"})):k.length>1&&k[b].empty()&&o.unit=="char"&&!o.extend?(ur(d,Sn(e,k.slice(0,b).concat(k.slice(b+1)),0),{scroll:!1,origin:"*mouse"}),w=d.sel):Fa(d,b,g,qe):(b=0,ur(d,new Fr([g],0),qe),w=d.sel);var X=a;function de(Oe){if(z(X,Oe)!=0)if(X=Oe,o.unit=="rectangle"){for(var Re=[],Ye=e.options.tabSize,Ke=nt($e(d,a.line).text,a.ch,Ye),pt=nt($e(d,Oe.line).text,Oe.ch,Ye),Bt=Math.min(Ke,pt),Zt=Math.max(Ke,pt),Gt=Math.min(a.line,Oe.line),Tr=Math.min(e.lastLine(),Math.max(a.line,Oe.line));Gt<=Tr;Gt++){var Je=$e(d,Gt).text,tr=Jt(Je,Bt,Ye);Bt==Zt?Re.push(new Ot(A(Gt,tr),A(Gt,tr))):Je.length>tr&&Re.push(new Ot(A(Gt,tr),A(Gt,Jt(Je,Zt,Ye))))}Re.length||Re.push(new Ot(a,a)),ur(d,Sn(e,w.ranges.slice(0,b).concat(Re),b),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Oe)}else{var Pr=g,zt=Hs(e,Oe,o.unit),Kt=Pr.anchor,kt;z(zt.anchor,Kt)>0?(kt=zt.head,Kt=yt(Pr.from(),zt.anchor)):(kt=zt.anchor,Kt=tt(Pr.to(),zt.head));var jt=w.ranges.slice(0);jt[b]=Ou(e,new Ot(Ge(d,Kt),kt)),ur(d,Sn(e,jt,b),qe)}}var ue=l.wrapper.getBoundingClientRect(),xe=0;function Ce(Oe){var Re=++xe,Ye=wi(e,Oe,!0,o.unit=="rectangle");if(Ye)if(z(Ye,X)!=0){e.curOp.focus=Ve(ot(e)),de(Ye);var Ke=ao(l,d);(Ye.line>=Ke.to||Ye.line<Ke.from)&&setTimeout(sr(e,function(){xe==Re&&Ce(Oe)}),150)}else{var pt=Oe.clientY<ue.top?-20:Oe.clientY>ue.bottom?20:0;pt&&setTimeout(sr(e,function(){xe==Re&&(l.scroller.scrollTop+=pt,Ce(Oe))}),50)}}function Ie(Oe){e.state.selectingText=!1,xe=1/0,Oe&&(St(Oe),l.input.focus()),We(l.wrapper.ownerDocument,"mousemove",De),We(l.wrapper.ownerDocument,"mouseup",Ne),d.history.lastSelOrigin=null}var De=sr(e,function(Oe){Oe.buttons===0||!jn(Oe)?Ie(Oe):Ce(Oe)}),Ne=sr(e,Ie);e.state.selectingText=Ne,ne(l.wrapper.ownerDocument,"mousemove",De),ne(l.wrapper.ownerDocument,"mouseup",Ne)}function Ou(e,r){var a=r.anchor,o=r.head,l=$e(e.doc,a.line);if(z(a,o)==0&&a.sticky==o.sticky)return r;var d=Ze(l);if(!d)return r;var g=mt(d,a.ch,a.sticky),b=d[g];if(b.from!=a.ch&&b.to!=a.ch)return r;var w=g+(b.from==a.ch==(b.level!=1)?0:1);if(w==0||w==d.length)return r;var k;if(o.line!=a.line)k=(o.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var H=mt(d,o.ch,o.sticky),X=H-g||(o.ch-a.ch)*(b.level==1?-1:1);H==w-1||H==w?k=X<0:k=X>0}var de=d[w+(k?-1:0)],ue=k==(de.level==1),xe=ue?de.from:de.to,Ce=ue?"after":"before";return a.ch==xe&&a.sticky==Ce?r:new Ot(new A(a.line,xe,Ce),o)}function Ua(e,r,a,o){var l,d;if(r.touches)l=r.touches[0].clientX,d=r.touches[0].clientY;else try{l=r.clientX,d=r.clientY}catch{return!1}if(l>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&St(r);var g=e.display,b=g.lineDiv.getBoundingClientRect();if(d>b.bottom||!_t(e,a))return Bn(r);d-=b.top-g.viewOffset;for(var w=0;w<e.display.gutterSpecs.length;++w){var k=g.gutters.childNodes[w];if(k&&k.getBoundingClientRect().right>=l){var H=Un(e.doc,d),X=e.display.gutterSpecs[w];return et(e,a,e,H,X.className,r),Bn(r)}}}function Us(e,r){return Ua(e,r,"gutterClick",!0)}function Eu(e,r){Gn(e.display,r)||Yf(e,r)||ft(e,r,"contextmenu")||ie||e.display.input.onContextMenu(r)}function Yf(e,r){return _t(e,"gutterContextMenu")?Ua(e,r,"gutterContextMenu",!1):!1}function zs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Do(e)}var Bi={toString:function(){return"CodeMirror.Init"}},ku={},ji={};function _s(e){var r=e.optionHandlers;function a(o,l,d,g){e.defaults[o]=l,d&&(r[o]=g?function(b,w,k){k!=Bi&&d(b,w,k)}:d)}e.defineOption=a,e.Init=Bi,a("value","",function(o,l){return o.setValue(l)},!0),a("mode",null,function(o,l){o.doc.modeOption=l,Ps(o)},!0),a("indentUnit",2,Ps,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(o){Wo(o),Do(o),Dr(o)},!0),a("lineSeparator",null,function(o,l){if(o.doc.lineSep=l,!!l){var d=[],g=o.doc.first;o.doc.iter(function(w){for(var k=0;;){var H=w.text.indexOf(l,k);if(H==-1)break;k=H+l.length,d.push(A(g,H))}g++});for(var b=d.length-1;b>=0;b--)po(o.doc,l,d[b],A(d[b].line,d[b].ch+l.length))}}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(o,l,d){o.state.specialChars=new RegExp(l.source+(l.test(" ")?"":"| "),"g"),d!=Bi&&o.refresh()}),a("specialCharPlaceholder",Ku,function(o){return o.refresh()},!0),a("electricChars",!0),a("inputStyle",S?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(o,l){return o.getInputField().spellcheck=l},!0),a("autocorrect",!1,function(o,l){return o.getInputField().autocorrect=l},!0),a("autocapitalize",!1,function(o,l){return o.getInputField().autocapitalize=l},!0),a("rtlMoveVisually",!K),a("wholeLineUpdateBefore",!0),a("theme","default",function(o){zs(o),co(o)},!0),a("keyMap","default",function(o,l,d){var g=Ko(l),b=d!=Bi&&Ko(d);b&&b.detach&&b.detach(o,g),g.attach&&g.attach(o,b||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,xo,!0),a("gutters",[],function(o,l){o.display.gutterSpecs=La(l,o.options.lineNumbers),co(o)},!0),a("fixedGutter",!0,function(o,l){o.display.gutters.style.left=l?ys(o.display)+"px":"0",o.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(o){return fo(o)},!0),a("scrollbarStyle","native",function(o){Dl(o),fo(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),a("lineNumbers",!1,function(o,l){o.display.gutterSpecs=La(o.options.gutters,l),co(o)},!0),a("firstLineNumber",1,co,!0),a("lineNumberFormatter",function(o){return o},co,!0),a("showCursorWhenSelecting",!1,io,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(o,l){l=="nocursor"&&(oo(o),o.display.input.blur()),o.display.input.readOnlyChanged(l)}),a("screenReaderLabel",null,function(o,l){l=l===""?null:l,o.display.input.screenReaderLabelChanged(l)}),a("disableInput",!1,function(o,l){l||o.display.input.reset()},!0),a("dragDrop",!0,Qo),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,io,!0),a("singleCursorHeightPerLine",!0,io,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,Wo,!0),a("addModeClass",!1,Wo,!0),a("pollInterval",100),a("undoDepth",200,function(o,l){return o.doc.history.undoDepth=l}),a("historyEventDelay",1250),a("viewportMargin",10,function(o){return o.refresh()},!0),a("maxHighlightLength",1e4,Wo,!0),a("moveInputWithCursor",!0,function(o,l){l||o.display.input.resetPosition()}),a("tabindex",null,function(o,l){return o.display.input.getField().tabIndex=l||""}),a("autofocus",null),a("direction","ltr",function(o,l){return o.doc.setDirection(l)},!0),a("phrases",null)}function Qo(e,r,a){var o=a&&a!=Bi;if(!r!=!o){var l=e.display.dragFunctions,d=r?ne:We;d(e.display.scroller,"dragstart",l.start),d(e.display.scroller,"dragenter",l.enter),d(e.display.scroller,"dragover",l.over),d(e.display.scroller,"dragleave",l.leave),d(e.display.scroller,"drop",l.drop)}}function xo(e){e.options.lineWrapping?(ze(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Y(e.display.wrapper,"CodeMirror-wrap"),ns(e)),bs(e),Dr(e),Do(e),setTimeout(function(){return fo(e)},100)}function $t(e,r){var a=this;if(!(this instanceof $t))return new $t(e,r);this.options=r=r?At(r):{},At(ku,r,!1);var o=r.value;typeof o=="string"?o=new Rr(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var l=new $t.inputStyles[r.inputStyle](this),d=this.display=new Ef(e,o,l,r);d.wrapper.CodeMirror=this,zs(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Dl(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 Ue,keySeq:null,specialChars:null},r.autofocus&&!S&&d.input.focus(),D&&R<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Vs(this),uu(),Ei(this),this.curOp.forceUpdate=!0,$l(this,o),r.autofocus&&!S||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&Ss(a)},20):oo(this);for(var g in ji)ji.hasOwnProperty(g)&&ji[g](this,r[g],Bi);Wl(this),r.finishInit&&r.finishInit(this);for(var b=0;b<$s.length;++b)$s[b](this);ki(this),_&&r.lineWrapping&&getComputedStyle(d.lineDiv).textRendering=="optimizelegibility"&&(d.lineDiv.style.textRendering="auto")}$t.defaults=ku,$t.optionHandlers=ji;function Vs(e){var r=e.display;ne(r.scroller,"mousedown",sr(e,Jo)),D&&R<11?ne(r.scroller,"dblclick",sr(e,function(w){if(!ft(e,w)){var k=wi(e,w);if(!(!k||Us(e,w)||Gn(e.display,w))){St(w);var H=e.findWordAt(k);Li(e.doc,H.anchor,H.head)}}})):ne(r.scroller,"dblclick",function(w){return ft(e,w)||St(w)}),ne(r.scroller,"contextmenu",function(w){return Eu(e,w)}),ne(r.input.getField(),"contextmenu",function(w){r.scroller.contains(w.target)||Eu(e,w)});var a,o={end:0};function l(){r.activeTouch&&(a=setTimeout(function(){return r.activeTouch=null},1e3),o=r.activeTouch,o.end=+new Date)}function d(w){if(w.touches.length!=1)return!1;var k=w.touches[0];return k.radiusX<=1&&k.radiusY<=1}function g(w,k){if(k.left==null)return!0;var H=k.left-w.left,X=k.top-w.top;return H*H+X*X>20*20}ne(r.scroller,"touchstart",function(w){if(!ft(e,w)&&!d(w)&&!Us(e,w)){r.input.ensurePolled(),clearTimeout(a);var k=+new Date;r.activeTouch={start:k,moved:!1,prev:k-o.end<=300?o:null},w.touches.length==1&&(r.activeTouch.left=w.touches[0].pageX,r.activeTouch.top=w.touches[0].pageY)}}),ne(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),ne(r.scroller,"touchend",function(w){var k=r.activeTouch;if(k&&!Gn(r,w)&&k.left!=null&&!k.moved&&new Date-k.start<300){var H=e.coordsChar(r.activeTouch,"page"),X;!k.prev||g(k,k.prev)?X=new Ot(H,H):!k.prev.prev||g(k,k.prev.prev)?X=e.findWordAt(H):X=new Ot(A(H.line,0),Ge(e.doc,A(H.line+1,0))),e.setSelection(X.anchor,X.head),e.focus(),St(w)}l()}),ne(r.scroller,"touchcancel",l),ne(r.scroller,"scroll",function(){r.scroller.clientHeight&&(lo(e,r.scroller.scrollTop),Oi(e,r.scroller.scrollLeft,!0),et(e,"scroll",e))}),ne(r.scroller,"mousewheel",function(w){return zl(e,w)}),ne(r.scroller,"DOMMouseScroll",function(w){return zl(e,w)}),ne(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(w){ft(e,w)||gr(w)},over:function(w){ft(e,w)||(Wa(e,w),gr(w))},start:function(w){return Rf(e,w)},drop:sr(e,_o),leave:function(w){ft(e,w)||Rs(e)}};var b=r.input.getField();ne(b,"keyup",function(w){return xu.call(e,w)}),ne(b,"keydown",sr(e,bu)),ne(b,"keypress",sr(e,Su)),ne(b,"focus",function(w){return Ss(e,w)}),ne(b,"blur",function(w){return oo(e,w)})}var $s=[];$t.defineInitHook=function(e){return $s.push(e)};function Zo(e,r,a,o){var l=e.doc,d;a==null&&(a="add"),a=="smart"&&(l.mode.indent?d=Yi(e,r).state:a="prev");var g=e.options.tabSize,b=$e(l,r),w=nt(b.text,null,g);b.stateAfter&&(b.stateAfter=null);var k=b.text.match(/^\s*/)[0],H;if(!o&&!/\S/.test(b.text))H=0,a="not";else if(a=="smart"&&(H=l.mode.indent(d,b.text.slice(k.length),b.text),H==it||H>150)){if(!o)return;a="prev"}a=="prev"?r>l.first?H=nt($e(l,r-1).text,null,g):H=0:a=="add"?H=w+e.options.indentUnit:a=="subtract"?H=w-e.options.indentUnit:typeof a=="number"&&(H=w+a),H=Math.max(0,H);var X="",de=0;if(e.options.indentWithTabs)for(var ue=Math.floor(H/g);ue;--ue)de+=g,X+=" ";if(de<H&&(X+=dr(H-de)),X!=k)return po(l,X,A(r,0),A(r,k.length),"+input"),b.stateAfter=null,!0;for(var xe=0;xe<l.sel.ranges.length;xe++){var Ce=l.sel.ranges[xe];if(Ce.head.line==r&&Ce.head.ch<k.length){var Ie=A(r,k.length);Fa(l,xe,new Ot(Ie,Ie));break}}}var un=null;function fi(e){un=e}function Gs(e,r,a,o,l){var d=e.doc;e.display.shift=!1,o||(o=d.sel);var g=+new Date-200,b=l=="paste"||e.state.pasteIncoming>g,w=gn(r),k=null;if(b&&o.ranges.length>1)if(un&&un.text.join(`
|
|
25
|
-
`)==
|
|
26
|
-
`)==
|
|
27
|
-
`)&&(xe=Ce=A(xe.line,0)));var Ie={from:xe,to:Ce,text:k?k[de%k.length]:w,origin:l||(b?"paste":e.state.cutIncoming>g?"cut":"+input")};Ii(e.doc,Ie),ar(e,"inputRead",e,Ie)}r&&!b&&Pu(e,r),so(e),e.curOp.updateInput<2&&(e.curOp.updateInput=X),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Tu(e,r){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&r.hasFocus()&&_r(r,function(){return Gs(r,a,0,null,"paste")}),!0}function Pu(e,r){if(!(!e.options.electricChars||!e.options.smartIndent))for(var a=e.doc.sel,o=a.ranges.length-1;o>=0;o--){var l=a.ranges[o];if(!(l.head.ch>100||o&&a.ranges[o-1].head.line==l.head.line)){var d=e.getModeAt(l.head),g=!1;if(d.electricChars){for(var b=0;b<d.electricChars.length;b++)if(r.indexOf(d.electricChars.charAt(b))>-1){g=Zo(e,l.head.line,"smart");break}}else d.electricInput&&d.electricInput.test($e(e.doc,l.head.line).text.slice(0,l.head.ch))&&(g=Zo(e,l.head.line,"smart"));g&&ar(e,"electricInput",e,l.head.line)}}}function Lu(e){for(var r=[],a=[],o=0;o<e.doc.sel.ranges.length;o++){var l=e.doc.sel.ranges[o].head.line,d={anchor:A(l,0),head:A(l+1,0)};a.push(d),r.push(e.getRange(d.anchor,d.head))}return{text:r,ranges:a}}function za(e,r,a,o){e.setAttribute("autocorrect",a?"on":"off"),e.setAttribute("autocapitalize",o?"on":"off"),e.setAttribute("spellcheck",!!r)}function _a(){var e=G("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),r=G("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _?e.style.width="1000px":e.setAttribute("wrap","off"),J&&(e.style.border="1px solid black"),r}function Xf(e){var r=e.optionHandlers,a=e.helpers={};e.prototype={constructor:e,focus:function(){Xt(this).focus(),this.display.input.focus()},setOption:function(o,l){var d=this.options,g=d[o];d[o]==l&&o!="mode"||(d[o]=l,r.hasOwnProperty(o)&&sr(this,r[o])(this,l,g),et(this,"optionChange",this,o))},getOption:function(o){return this.options[o]},getDoc:function(){return this.doc},addKeyMap:function(o,l){this.state.keyMaps[l?"push":"unshift"](Ko(o))},removeKeyMap:function(o){for(var l=this.state.keyMaps,d=0;d<l.length;++d)if(l[d]==o||l[d].name==o)return l.splice(d,1),!0},addOverlay:xr(function(o,l){var d=o.token?o:e.getMode(this.options,o);if(d.startState)throw new Error("Overlays may not be stateful.");Lt(this.state.overlays,{mode:d,modeSpec:o,opaque:l&&l.opaque,priority:l&&l.priority||0},function(g){return g.priority}),this.state.modeGen++,Dr(this)}),removeOverlay:xr(function(o){for(var l=this.state.overlays,d=0;d<l.length;++d){var g=l[d].modeSpec;if(g==o||typeof o=="string"&&g.name==o){l.splice(d,1),this.state.modeGen++,Dr(this);return}}}),indentLine:xr(function(o,l,d){typeof l!="string"&&typeof l!="number"&&(l==null?l=this.options.smartIndent?"smart":"prev":l=l?"add":"subtract"),vi(this.doc,o)&&Zo(this,o,l,d)}),indentSelection:xr(function(o){for(var l=this.doc.sel.ranges,d=-1,g=0;g<l.length;g++){var b=l[g];if(b.empty())b.head.line>d&&(Zo(this,b.head.line,o,!0),d=b.head.line,g==this.doc.sel.primIndex&&so(this));else{var w=b.from(),k=b.to(),H=Math.max(d,w.line);d=Math.min(this.lastLine(),k.line-(k.ch?0:1))+1;for(var X=H;X<d;++X)Zo(this,X,o);var de=this.doc.sel.ranges;w.ch==0&&l.length==de.length&&de[g].from().ch>0&&Fa(this.doc,g,new Ot(w,de[g].to()),Dt)}}}),getTokenAt:function(o,l){return gi(this,o,l)},getLineTokens:function(o,l){return gi(this,A(o),l,!0)},getTokenTypeAt:function(o){o=Ge(this.doc,o);var l=qa(this,$e(this.doc,o.line)),d=0,g=(l.length-1)/2,b=o.ch,w;if(b==0)w=l[2];else for(;;){var k=d+g>>1;if((k?l[k*2-1]:0)>=b)g=k;else if(l[k*2+1]<b)d=k+1;else{w=l[k*2+2];break}}var H=w?w.indexOf("overlay "):-1;return H<0?w:H==0?null:w.slice(0,H-1)},getModeAt:function(o){var l=this.doc.mode;return l.innerMode?e.innerMode(l,this.getTokenAt(o).state).mode:l},getHelper:function(o,l){return this.getHelpers(o,l)[0]},getHelpers:function(o,l){var d=[];if(!a.hasOwnProperty(l))return d;var g=a[l],b=this.getModeAt(o);if(typeof b[l]=="string")g[b[l]]&&d.push(g[b[l]]);else if(b[l])for(var w=0;w<b[l].length;w++){var k=g[b[l][w]];k&&d.push(k)}else b.helperType&&g[b.helperType]?d.push(g[b.helperType]):g[b.name]&&d.push(g[b.name]);for(var H=0;H<g._global.length;H++){var X=g._global[H];X.pred(b,this)&&Fe(d,X.val)==-1&&d.push(X.val)}return d},getStateAfter:function(o,l){var d=this.doc;return o=Ct(d,o??d.first+d.size-1),Yi(this,o+1,l).state},cursorCoords:function(o,l){var d,g=this.doc.sel.primary();return o==null?d=g.head:typeof o=="object"?d=Ge(this.doc,o):d=o?g.from():g.to(),sn(this,d,l||"page")},charCoords:function(o,l){return Sa(this,Ge(this.doc,o),l||"page")},coordsChar:function(o,l){return o=Al(this,o,l||"page"),Ro(this,o.left,o.top)},lineAtHeight:function(o,l){return o=Al(this,{top:o,left:0},l||"page").top,Un(this.doc,o+this.display.viewOffset)},heightAtLine:function(o,l,d){var g=!1,b;if(typeof o=="number"){var w=this.doc.first+this.doc.size-1;o<this.doc.first?o=this.doc.first:o>w&&(o=w,g=!0),b=$e(this.doc,o)}else b=o;return Fo(this,b,{top:0,left:0},l||"page",d||g).top+(g?this.doc.height-Vn(b):0)},defaultTextHeight:function(){return ro(this.display)},defaultCharWidth:function(){return no(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,l,d,g,b){var w=this.display;o=sn(this,Ge(this.doc,o));var k=o.bottom,H=o.left;if(l.style.position="absolute",l.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(l),w.sizer.appendChild(l),g=="over")k=o.top;else if(g=="above"||g=="near"){var X=Math.max(w.wrapper.clientHeight,this.doc.height),de=Math.max(w.sizer.clientWidth,w.lineSpace.clientWidth);(g=="above"||o.bottom+l.offsetHeight>X)&&o.top>l.offsetHeight?k=o.top-l.offsetHeight:o.bottom+l.offsetHeight<=X&&(k=o.bottom),H+l.offsetWidth>de&&(H=de-l.offsetWidth)}l.style.top=k+"px",l.style.left=l.style.right="",b=="right"?(H=w.sizer.clientWidth-l.offsetWidth,l.style.right="0px"):(b=="left"?H=0:b=="middle"&&(H=(w.sizer.clientWidth-l.offsetWidth)/2),l.style.left=H+"px"),d&&vf(this,{left:H,top:k,right:H+l.offsetWidth,bottom:k+l.offsetHeight})},triggerOnKeyDown:xr(bu),triggerOnKeyPress:xr(Su),triggerOnKeyUp:xu,triggerOnMouseDown:xr(Jo),execCommand:function(o){if(mo.hasOwnProperty(o))return mo[o].call(null,this)},triggerElectric:xr(function(o){Pu(this,o)}),findPosH:function(o,l,d,g){var b=1;l<0&&(b=-1,l=-l);for(var w=Ge(this.doc,o),k=0;k<l&&(w=Va(this.doc,w,b,d,g),!w.hitSide);++k);return w},moveH:xr(function(o,l){var d=this;this.extendSelectionsBy(function(g){return d.display.shift||d.doc.extend||g.empty()?Va(d.doc,g.head,o,l,d.options.rtlMoveVisually):o<0?g.from():g.to()},xt)}),deleteH:xr(function(o,l){var d=this.doc.sel,g=this.doc;d.somethingSelected()?g.replaceSelection("",null,"+delete"):Di(this,function(b){var w=Va(g,b.head,o,l,!1);return o<0?{from:w,to:b.head}:{from:b.head,to:w}})}),findPosV:function(o,l,d,g){var b=1,w=g;l<0&&(b=-1,l=-l);for(var k=Ge(this.doc,o),H=0;H<l;++H){var X=sn(this,k,"div");if(w==null?w=X.left:X.left=w,k=qo(this,X,b,d),k.hitSide)break}return k},moveV:xr(function(o,l){var d=this,g=this.doc,b=[],w=!this.display.shift&&!g.extend&&g.sel.somethingSelected();if(g.extendSelectionsBy(function(H){if(w)return o<0?H.from():H.to();var X=sn(d,H.head,"div");H.goalColumn!=null&&(X.left=H.goalColumn),b.push(X.left);var de=qo(d,X,o,l);return l=="page"&&H==g.sel.primary()&&As(d,Sa(d,de,"div").top-X.top),de},xt),b.length)for(var k=0;k<g.sel.ranges.length;k++)g.sel.ranges[k].goalColumn=b[k]}),findWordAt:function(o){var l=this.doc,d=$e(l,o.line).text,g=o.ch,b=o.ch;if(d){var w=this.getHelper(o,"wordChars");(o.sticky=="before"||b==d.length)&&g?--g:++b;for(var k=d.charAt(g),H=Wr(k,w)?function(X){return Wr(X,w)}:/\s/.test(k)?function(X){return/\s/.test(X)}:function(X){return!/\s/.test(X)&&!Wr(X)};g>0&&H(d.charAt(g-1));)--g;for(;b<d.length&&H(d.charAt(b));)++b}return new Ot(A(o.line,g),A(o.line,b))},toggleOverwrite:function(o){o!=null&&o==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ze(this.display.cursorDiv,"CodeMirror-overwrite"):Y(this.display.cursorDiv,"CodeMirror-overwrite"),et(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ve(ot(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:xr(function(o,l){Ai(this,o,l)}),getScrollInfo:function(){var o=this.display.scroller;return{left:o.scrollLeft,top:o.scrollTop,height:o.scrollHeight-Xr(this)-this.display.barHeight,width:o.scrollWidth-Xr(this)-this.display.barWidth,clientHeight:ba(this),clientWidth:xn(this)}},scrollIntoView:xr(function(o,l){o==null?(o={from:this.doc.sel.primary().head,to:null},l==null&&(l=this.options.cursorScrollMargin)):typeof o=="number"?o={from:A(o,0),to:null}:o.from==null&&(o={from:o,to:null}),o.to||(o.to=o.from),o.margin=l||0,o.from.line!=null?Ll(this,o):Il(this,o.from,o.to,o.margin)}),setSize:xr(function(o,l){var d=this,g=function(w){return typeof w=="number"||/^\d+$/.test(String(w))?w+"px":w};o!=null&&(this.display.wrapper.style.width=g(o)),l!=null&&(this.display.wrapper.style.height=g(l)),this.options.lineWrapping&&cs(this);var b=this.display.viewFrom;this.doc.iter(b,this.display.viewTo,function(w){if(w.widgets){for(var k=0;k<w.widgets.length;k++)if(w.widgets[k].noHScroll){ri(d,b,"widget");break}}++b}),this.curOp.forceUpdate=!0,et(this,"refresh",this)}),operation:function(o){return _r(this,o)},startOperation:function(){return Ei(this)},endOperation:function(){return ki(this)},refresh:xr(function(){var o=this.display.cachedTextHeight;Dr(this),this.curOp.forceUpdate=!0,Do(this),Ai(this,this.doc.scrollLeft,this.doc.scrollTop),Ts(this.display),(o==null||Math.abs(o-ro(this.display))>.5||this.options.lineWrapping)&&bs(this),et(this,"refresh",this)}),swapDoc:xr(function(o){var l=this.doc;return l.cm=null,this.state.selectingText&&this.state.selectingText(),$l(this,o),Do(this),this.display.input.reset(),Ai(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,l),l}),phrase:function(o){var l=this.options.phrases;return l&&Object.prototype.hasOwnProperty.call(l,o)?l[o]:o},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}},Er(e),e.registerHelper=function(o,l,d){a.hasOwnProperty(o)||(a[o]=e[o]={_global:[]}),a[o][l]=d},e.registerGlobalHelper=function(o,l,d,g){e.registerHelper(o,l,g),a[o]._global.push({pred:d,val:g})}}function Va(e,r,a,o,l){var d=r,g=a,b=$e(e,r.line),w=l&&e.direction=="rtl"?-a:a;function k(){var Ne=r.line+w;return Ne<e.first||Ne>=e.first+e.size?!1:(r=new A(Ne,r.ch,r.sticky),b=$e(e,Ne))}function H(Ne){var Oe;if(o=="codepoint"){var Re=b.text.charCodeAt(r.ch+(a>0?0:-1));if(isNaN(Re))Oe=null;else{var Ye=a>0?Re>=55296&&Re<56320:Re>=56320&&Re<57343;Oe=new A(r.line,Math.max(0,Math.min(b.text.length,r.ch+a*(Ye?2:1))),-a)}}else l?Oe=Hf(e.cm,b,r,a):Oe=js(b,r,a);if(Oe==null)if(!Ne&&k())r=Ws(l,e.cm,b,r.line,w);else return!1;else r=Oe;return!0}if(o=="char"||o=="codepoint")H();else if(o=="column")H(!0);else if(o=="word"||o=="group")for(var X=null,de=o=="group",ue=e.cm&&e.cm.getHelper(r,"wordChars"),xe=!0;!(a<0&&!H(!xe));xe=!1){var Ce=b.text.charAt(r.ch)||`
|
|
28
|
-
`,Ie=
|
|
29
|
-
`?"n":!
|
|
30
|
-
`);if(
|
|
31
|
-
`);var
|
|
32
|
-
`),
|
|
33
|
-
`)>-1?
|
|
34
|
-
top: `+(
|
|
15
|
+
b`.split(/\n/).length!=3?function(t){for(var n=0,l=[],s=t.length;n<=s;){var u=t.indexOf(`
|
|
16
|
+
`,n);u==-1&&(u=t.length);var p=t.slice(n,t.charAt(u-1)=="\r"?u-1:u),y=p.indexOf("\r");y!=-1?(l.push(p.slice(0,y)),n+=y+1):(l.push(p),n=u+1)}return l}:function(t){return t.split(/\r\n?|\n/)},Ii=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch{return!1}}:function(t){var n;try{n=t.ownerDocument.selection.createRange()}catch{}return!n||n.parentElement()!=t?!1:n.compareEndPoints("StartToEnd",n)!=0},Ta=function(){var t=Q("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),hn=null;function Jr(t){if(hn!=null)return hn;var n=xe(t,Q("span","x")),l=n.getBoundingClientRect(),s=ie(n,0,1).getBoundingClientRect();return hn=Math.abs(l.left-s.left)>1}var vn={},on={};function sn(t,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),vn[t]=n}function fo(t,n){on[t]=n}function Hn(t){if(typeof t=="string"&&on.hasOwnProperty(t))t=on[t];else if(t&&typeof t.name=="string"&&on.hasOwnProperty(t.name)){var n=on[t.name];typeof n=="string"&&(n={name:n}),t=zt(n,t),t.name=n.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Hn("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Hn("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function Qr(t,n){n=Hn(n);var l=vn[n.name];if(!l)return Qr(t,"text/plain");var s=l(t,n);if(pr.hasOwnProperty(n.name)){var u=pr[n.name];for(var p in u)u.hasOwnProperty(p)&&(s.hasOwnProperty(p)&&(s["_"+p]=s[p]),s[p]=u[p])}if(s.name=n.name,n.helperType&&(s.helperType=n.helperType),n.modeProps)for(var y in n.modeProps)s[y]=n.modeProps[y];return s}var pr={};function ai(t,n){var l=pr.hasOwnProperty(t)?pr[t]:pr[t]={};Rt(n,l)}function An(t,n){if(n===!0)return n;if(t.copyState)return t.copyState(n);var l={};for(var s in n){var u=n[s];u instanceof Array&&(u=u.concat([])),l[s]=u}return l}function ka(t,n){for(var l;t.innerMode&&(l=t.innerMode(n),!(!l||l.mode==t));)n=l.state,t=l.mode;return l||{mode:t,state:n}}function Vo(t,n,l){return t.startState?t.startState(n,l):!0}var Xt=function(t,n,l){this.pos=this.start=0,this.string=t,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=l};Xt.prototype.eol=function(){return this.pos>=this.string.length},Xt.prototype.sol=function(){return this.pos==this.lineStart},Xt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xt.prototype.eat=function(t){var n=this.string.charAt(this.pos),l;if(typeof t=="string"?l=n==t:l=n&&(t.test?t.test(n):t(n)),l)return++this.pos,n},Xt.prototype.eatWhile=function(t){for(var n=this.pos;this.eat(t););return this.pos>n},Xt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Xt.prototype.skipToEnd=function(){this.pos=this.string.length},Xt.prototype.skipTo=function(t){var n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0},Xt.prototype.backUp=function(t){this.pos-=t},Xt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=st(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.indentation=function(){return st(this.string,null,this.tabSize)-(this.lineStart?st(this.string,this.lineStart,this.tabSize):0)},Xt.prototype.match=function(t,n,l){if(typeof t=="string"){var s=function(y){return l?y.toLowerCase():y},u=this.string.substr(this.pos,t.length);if(s(u)==s(t))return n!==!1&&(this.pos+=t.length),!0}else{var p=this.string.slice(this.pos).match(t);return p&&p.index>0?null:(p&&n!==!1&&(this.pos+=p[0].length),p)}},Xt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xt.prototype.hideFirstChars=function(t,n){this.lineStart+=t;try{return n()}finally{this.lineStart-=t}},Xt.prototype.lookAhead=function(t){var n=this.lineOracle;return n&&n.lookAhead(t)},Xt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function Ge(t,n){if(n-=t.first,n<0||n>=t.size)throw new Error("There is no line "+(n+t.first)+" in the document.");for(var l=t;!l.lines;)for(var s=0;;++s){var u=l.children[s],p=u.chunkSize();if(n<p){l=u;break}n-=p}return l.lines[n]}function yi(t,n,l){var s=[],u=n.line;return t.iter(n.line,l.line+1,function(p){var y=p.text;u==l.line&&(y=y.slice(0,l.ch)),u==n.line&&(y=y.slice(n.ch)),s.push(y),++u}),s}function Qi(t,n,l){var s=[];return t.iter(n,l,function(u){s.push(u.text)}),s}function On(t,n){var l=n-t.height;if(l)for(var s=t;s;s=s.parent)s.height+=l}function It(t){if(t.parent==null)return null;for(var n=t.parent,l=Re(n.lines,t),s=n.parent;s;n=s,s=s.parent)for(var u=0;s.children[u]!=n;++u)l+=s.children[u].chunkSize();return l+n.first}function bi(t,n){var l=t.first;e:do{for(var s=0;s<t.children.length;++s){var u=t.children[s],p=u.height;if(n<p){t=u;continue e}n-=p,l+=u.chunkSize()}return l}while(!t.lines);for(var y=0;y<t.lines.length;++y){var x=t.lines[y],C=x.height;if(n<C)break;n-=C}return l+y}function Zi(t,n){return n>=t.first&&n<t.first+t.size}function Pa(t,n){return String(t.lineNumberFormatter(n+t.firstLineNumber))}function T(t,n,l){if(l===void 0&&(l=null),!(this instanceof T))return new T(t,n,l);this.line=t,this.ch=n,this.sticky=l}function $(t,n){return t.line-n.line||t.ch-n.ch}function Pe(t,n){return t.sticky==n.sticky&&$(t,n)==0}function Fe(t){return T(t.line,t.ch)}function it(t,n){return $(t,n)<0?n:t}function wt(t,n){return $(t,n)<0?t:n}function Lt(t,n){return Math.max(t.first,Math.min(n,t.first+t.size-1))}function $e(t,n){if(n.line<t.first)return T(t.first,0);var l=t.first+t.size-1;return n.line>l?T(l,Ge(t,l).text.length):En(n,Ge(t,n.line).text.length)}function En(t,n){var l=t.ch;return l==null||l>n?T(t.line,n):l<0?T(t.line,0):t}function co(t,n){for(var l=[],s=0;s<n.length;s++)l[s]=$e(t,n[s]);return l}var jo=function(t,n){this.state=t,this.lookAhead=n},oi=function(t,n,l,s){this.state=n,this.doc=t,this.line=l,this.maxLookAhead=s||0,this.baseTokens=null,this.baseTokenPos=1};oi.prototype.lookAhead=function(t){var n=this.doc.getLine(this.line+t);return n!=null&&t>this.maxLookAhead&&(this.maxLookAhead=t),n},oi.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},oi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oi.fromSaved=function(t,n,l){return n instanceof jo?new oi(t,An(t.mode,n.state),l,n.lookAhead):new oi(t,An(t.mode,n),l)},oi.prototype.save=function(t){var n=t!==!1?An(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jo(n,this.maxLookAhead):n};function ru(t,n,l,s){var u=[t.state.modeGen],p={};iu(t,n.text,t.doc.mode,l,function(P,K){return u.push(P,K)},p,s);for(var y=l.state,x=function(P){l.baseTokens=u;var K=t.state.overlays[P],ne=1,ve=0;l.state=!0,iu(t,n.text,K.mode,l,function(de,Ee){for(var Ae=ne;ve<de;){var Ie=u[ne];Ie>de&&u.splice(ne,1,de,u[ne+1],Ie),ne+=2,ve=Math.min(de,Ie)}if(Ee)if(K.opaque)u.splice(Ae,ne-Ae,de,"overlay "+Ee),ne=Ae+2;else for(;Ae<ne;Ae+=2){var Le=u[Ae+1];u[Ae+1]=(Le?Le+" ":"")+"overlay "+Ee}},p),l.state=y,l.baseTokens=null,l.baseTokenPos=1},C=0;C<t.state.overlays.length;++C)x(C);return{styles:u,classes:p.bgClass||p.textClass?p:null}}function Ws(t,n,l){if(!n.styles||n.styles[0]!=t.state.modeGen){var s=Fa(t,It(n)),u=n.text.length>t.options.maxHighlightLength&&An(t.doc.mode,s.state),p=ru(t,n,s);u&&(s.state=u),n.stateAfter=s.save(!u),n.styles=p.styles,p.classes?n.styleClasses=p.classes:n.styleClasses&&(n.styleClasses=null),l===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return n.styles}function Fa(t,n,l){var s=t.doc,u=t.display;if(!s.mode.startState)return new oi(s,!0,n);var p=nc(t,n,l),y=p>s.first&&Ge(s,p-1).stateAfter,x=y?oi.fromSaved(s,y,p):new oi(s,Vo(s.mode),p);return s.iter(p,n,function(C){Wo(t,C.text,x);var P=x.line;C.stateAfter=P==n-1||P%5==0||P>=u.viewFrom&&P<u.viewTo?x.save():null,x.nextLine()}),l&&(s.modeFrontier=x.line),x}function Wo(t,n,l,s){var u=t.doc.mode,p=new Xt(n,t.options.tabSize,l);for(p.start=p.pos=s||0,n==""&&Un(u,l.state);!p.eol();)xi(u,p,l.state),p.start=p.pos}function Un(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var l=ka(t,n);if(l.mode.blankLine)return l.mode.blankLine(l.state)}}function xi(t,n,l,s){for(var u=0;u<10;u++){s&&(s[0]=ka(t,l).mode);var p=t.token(n,l);if(n.pos>n.start)return p}throw new Error("Mode "+t.name+" failed to advance stream.")}var Zr=function(t,n,l){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=n||null,this.state=l};function qi(t,n,l,s){var u=t.doc,p=u.mode,y;n=$e(u,n);var x=Ge(u,n.line),C=Fa(t,n.line,l),P=new Xt(x.text,t.options.tabSize,C),K;for(s&&(K=[]);(s||P.pos<n.ch)&&!P.eol();)P.start=P.pos,y=xi(p,P,C.state),s&&K.push(new Zr(P,y,An(u.mode,C.state)));return s?K:new Zr(P,y,C.state)}function nu(t,n){if(t)for(;;){var l=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!l)break;t=t.slice(0,l.index)+t.slice(l.index+l[0].length);var s=l[1]?"bgClass":"textClass";n[s]==null?n[s]=l[2]:new RegExp("(?:^|\\s)"+l[2]+"(?:$|\\s)").test(n[s])||(n[s]+=" "+l[2])}return t}function iu(t,n,l,s,u,p,y){var x=l.flattenSpans;x==null&&(x=t.options.flattenSpans);var C=0,P=null,K=new Xt(n,t.options.tabSize,s),ne,ve=t.options.addModeClass&&[null];for(n==""&&nu(Un(l,s.state),p);!K.eol();){if(K.pos>t.options.maxHighlightLength?(x=!1,y&&Wo(t,n,s,K.pos),K.pos=n.length,ne=null):ne=nu(xi(l,K,s.state,ve),p),ve){var de=ve[0].name;de&&(ne="m-"+(ne?de+" "+ne:de))}if(!x||P!=ne){for(;C<K.start;)C=Math.min(K.start,C+5e3),u(C,P);P=ne}K.start=K.pos}for(;C<K.pos;){var Ee=Math.min(K.pos,C+5e3);u(Ee,P),C=Ee}}function nc(t,n,l){for(var s,u,p=t.doc,y=l?-1:n-(t.doc.mode.innerMode?1e3:100),x=n;x>y;--x){if(x<=p.first)return p.first;var C=Ge(p,x-1),P=C.stateAfter;if(P&&(!l||x+(P instanceof jo?P.lookAhead:0)<=p.modeFrontier))return x;var K=st(C.text,null,t.options.tabSize);(u==null||s>K)&&(u=x-1,s=K)}return u}function au(t,n){if(t.modeFrontier=Math.min(t.modeFrontier,n),!(t.highlightFrontier<n-10)){for(var l=t.first,s=n-1;s>l;s--){var u=Ge(t,s).stateAfter;if(u&&(!(u instanceof jo)||s+u.lookAhead<n)){l=s+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,l)}}var ou=!1,si=!1;function su(){ou=!0}function Ia(){si=!0}function Ho(t,n,l){this.marker=t,this.from=n,this.to=l}function La(t,n){if(t)for(var l=0;l<t.length;++l){var s=t[l];if(s.marker==n)return s}}function Ze(t,n){for(var l,s=0;s<t.length;++s)t[s]!=n&&(l||(l=[])).push(t[s]);return l}function Uo(t,n,l){var s=l&&window.WeakSet&&(l.markedSpans||(l.markedSpans=new WeakSet));s&&t.markedSpans&&s.has(t.markedSpans)?t.markedSpans.push(n):(t.markedSpans=t.markedSpans?t.markedSpans.concat([n]):[n],s&&s.add(t.markedSpans)),n.marker.attachLine(t)}function lu(t,n,l){var s;if(t)for(var u=0;u<t.length;++u){var p=t[u],y=p.marker,x=p.from==null||(y.inclusiveLeft?p.from<=n:p.from<n);if(x||p.from==n&&y.type=="bookmark"&&(!l||!p.marker.insertLeft)){var C=p.to==null||(y.inclusiveRight?p.to>=n:p.to>n);(s||(s=[])).push(new Ho(y,p.from,C?null:p.to))}}return s}function Li(t,n,l){var s;if(t)for(var u=0;u<t.length;++u){var p=t[u],y=p.marker,x=p.to==null||(y.inclusiveRight?p.to>=n:p.to>n);if(x||p.from==n&&y.type=="bookmark"&&(!l||p.marker.insertLeft)){var C=p.from==null||(y.inclusiveLeft?p.from<=n:p.from<n);(s||(s=[])).push(new Ho(y,C?null:p.from-n,p.to==null?null:p.to-n))}}return s}function _o(t,n){if(n.full)return null;var l=Zi(t,n.from.line)&&Ge(t,n.from.line).markedSpans,s=Zi(t,n.to.line)&&Ge(t,n.to.line).markedSpans;if(!l&&!s)return null;var u=n.from.ch,p=n.to.ch,y=$(n.from,n.to)==0,x=lu(l,u,y),C=Li(s,p,y),P=n.text.length==1,K=et(n.text).length+(P?u:0);if(x)for(var ne=0;ne<x.length;++ne){var ve=x[ne];if(ve.to==null){var de=La(C,ve.marker);de?P&&(ve.to=de.to==null?null:de.to+K):ve.to=u}}if(C)for(var Ee=0;Ee<C.length;++Ee){var Ae=C[Ee];if(Ae.to!=null&&(Ae.to+=K),Ae.from==null){var Ie=La(x,Ae.marker);Ie||(Ae.from=K,P&&(x||(x=[])).push(Ae))}else Ae.from+=K,P&&(x||(x=[])).push(Ae)}x&&(x=ea(x)),C&&C!=x&&(C=ea(C));var Le=[x];if(!P){var De=n.text.length-2,Ne;if(De>0&&x)for(var We=0;We<x.length;++We)x[We].to==null&&(Ne||(Ne=[])).push(new Ho(x[We].marker,null,null));for(var Qe=0;Qe<De;++Qe)Le.push(Ne);Le.push(C)}return Le}function ea(t){for(var n=0;n<t.length;++n){var l=t[n];l.from!=null&&l.from==l.to&&l.marker.clearWhenEmpty!==!1&&t.splice(n--,1)}return t.length?t:null}function Hs(t,n,l){var s=null;if(t.iter(n.line,l.line+1,function(de){if(de.markedSpans)for(var Ee=0;Ee<de.markedSpans.length;++Ee){var Ae=de.markedSpans[Ee].marker;Ae.readOnly&&(!s||Re(s,Ae)==-1)&&(s||(s=[])).push(Ae)}}),!s)return null;for(var u=[{from:n,to:l}],p=0;p<s.length;++p)for(var y=s[p],x=y.find(0),C=0;C<u.length;++C){var P=u[C];if(!($(P.to,x.from)<0||$(P.from,x.to)>0)){var K=[C,1],ne=$(P.from,x.from),ve=$(P.to,x.to);(ne<0||!y.inclusiveLeft&&!ne)&&K.push({from:P.from,to:x.from}),(ve>0||!y.inclusiveRight&&!ve)&&K.push({from:x.to,to:P.to}),u.splice.apply(u,K),C+=K.length-3}}return u}function hr(t){var n=t.markedSpans;if(n){for(var l=0;l<n.length;++l)n[l].marker.detachLine(t);t.markedSpans=null}}function po(t,n){if(n){for(var l=0;l<n.length;++l)n[l].marker.attachLine(t);t.markedSpans=n}}function Ma(t){return t.inclusiveLeft?-1:0}function zo(t){return t.inclusiveRight?1:0}function Us(t,n){var l=t.lines.length-n.lines.length;if(l!=0)return l;var s=t.find(),u=n.find(),p=$(s.from,u.from)||Ma(t)-Ma(n);if(p)return-p;var y=$(s.to,u.to)||zo(t)-zo(n);return y||n.id-t.id}function uu(t,n){var l=si&&t.markedSpans,s;if(l)for(var u=void 0,p=0;p<l.length;++p)u=l[p],u.marker.collapsed&&(n?u.from:u.to)==null&&(!s||Us(s,u.marker)<0)&&(s=u.marker);return s}function fu(t){return uu(t,!0)}function Go(t){return uu(t,!1)}function cu(t,n){var l=si&&t.markedSpans,s;if(l)for(var u=0;u<l.length;++u){var p=l[u];p.marker.collapsed&&(p.from==null||p.from<n)&&(p.to==null||p.to>n)&&(!s||Us(s,p.marker)<0)&&(s=p.marker)}return s}function du(t,n,l,s,u){var p=Ge(t,n),y=si&&p.markedSpans;if(y)for(var x=0;x<y.length;++x){var C=y[x];if(C.marker.collapsed){var P=C.marker.find(0),K=$(P.from,l)||Ma(C.marker)-Ma(u),ne=$(P.to,s)||zo(C.marker)-zo(u);if(!(K>=0&&ne<=0||K<=0&&ne>=0)&&(K<=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?$(P.to,l)>=0:$(P.to,l)>0)||K>=0&&(C.marker.inclusiveRight&&u.inclusiveLeft?$(P.from,s)<=0:$(P.from,s)<0)))return!0}}}function _n(t){for(var n;n=fu(t);)t=n.find(-1,!0).line;return t}function ic(t){for(var n;n=Go(t);)t=n.find(1,!0).line;return t}function ac(t){for(var n,l;n=Go(t);)t=n.find(1,!0).line,(l||(l=[])).push(t);return l}function Mi(t,n){var l=Ge(t,n),s=_n(l);return l==s?n:It(s)}function pu(t,n){if(n>t.lastLine())return n;var l=Ge(t,n),s;if(!Si(t,l))return n;for(;s=Go(l);)l=s.find(1,!0).line;return It(l)+1}function Si(t,n){var l=si&&n.markedSpans;if(l){for(var s=void 0,u=0;u<l.length;++u)if(s=l[u],!!s.marker.collapsed){if(s.from==null)return!0;if(!s.marker.widgetNode&&s.from==0&&s.marker.inclusiveLeft&&_s(t,n,s))return!0}}}function _s(t,n,l){if(l.to==null){var s=l.marker.find(1,!0);return _s(t,s.line,La(s.line.markedSpans,l.marker))}if(l.marker.inclusiveRight&&l.to==n.text.length)return!0;for(var u=void 0,p=0;p<n.markedSpans.length;++p)if(u=n.markedSpans[p],u.marker.collapsed&&!u.marker.widgetNode&&u.from==l.to&&(u.to==null||u.to!=l.from)&&(u.marker.inclusiveLeft||l.marker.inclusiveRight)&&_s(t,n,u))return!0}function wi(t){t=_n(t);for(var n=0,l=t.parent,s=0;s<l.lines.length;++s){var u=l.lines[s];if(u==t)break;n+=u.height}for(var p=l.parent;p;l=p,p=l.parent)for(var y=0;y<p.children.length;++y){var x=p.children[y];if(x==l)break;n+=x.height}return n}function $o(t){if(t.height==0)return 0;for(var n=t.text.length,l,s=t;l=fu(s);){var u=l.find(0,!0);s=u.from.line,n+=u.from.ch-u.to.ch}for(s=t;l=Go(s);){var p=l.find(0,!0);n-=s.text.length-p.from.ch,s=p.to.line,n+=s.text.length-p.to.ch}return n}function zs(t){var n=t.display,l=t.doc;n.maxLine=Ge(l,l.first),n.maxLineLength=$o(n.maxLine),n.maxLineChanged=!0,l.iter(function(s){var u=$o(s);u>n.maxLineLength&&(n.maxLineLength=u,n.maxLine=s)})}var ta=function(t,n,l){this.text=t,po(this,n),this.height=l?l(this):1};ta.prototype.lineNo=function(){return It(this)},Gr(ta);function hu(t,n,l,s){t.text=n,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),hr(t),po(t,l);var u=s?s(t):1;u!=t.height&&On(t,u)}function vu(t){t.parent=null,hr(t)}var Gs={},oc={};function Na(t,n){if(!t||/^\s*$/.test(t))return null;var l=n.addModeClass?oc:Gs;return l[t]||(l[t]=t.replace(/\S+/g,"cm-$&"))}function gu(t,n){var l=ye("span",null,null,X?"padding-right: .1px":null),s={pre:ye("pre",[l],"CodeMirror-line"),content:l,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};n.measure={};for(var u=0;u<=(n.rest?n.rest.length:0);u++){var p=u?n.rest[u-1]:n.line,y=void 0;s.pos=0,s.addToken=lc,mi(t.display.measure)&&(y=tt(p,t.doc.direction))&&(s.addToken=$s(s.addToken,y)),s.map=[];var x=n!=t.display.externalMeasured&&It(p);fc(p,s,Ws(t,p,x)),p.styleClasses&&(p.styleClasses.bgClass&&(s.bgClass=vt(p.styleClasses.bgClass,s.bgClass||"")),p.styleClasses.textClass&&(s.textClass=vt(p.styleClasses.textClass,s.textClass||""))),s.map.length==0&&s.map.push(0,0,s.content.appendChild(ii(t.display.measure))),u==0?(n.measure.map=s.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(s.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(X){var C=s.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(s.content.className="cm-tab-wrap-hack")}return nt(t,"renderLine",t,n.line,s.pre),s.pre.className&&(s.textClass=vt(s.pre.className,s.textClass||"")),s}function sc(t){var n=Q("span","\u2022","cm-invalidchar");return n.title="\\u"+t.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function lc(t,n,l,s,u,p,y){if(n){var x=t.splitSpaces?uc(n,t.trailingSpace):n,C=t.cm.state.specialChars,P=!1,K;if(!C.test(n))t.col+=n.length,K=document.createTextNode(x),t.map.push(t.pos,t.pos+n.length,K),D&&j<9&&(P=!0),t.pos+=n.length;else{K=document.createDocumentFragment();for(var ne=0;;){C.lastIndex=ne;var ve=C.exec(n),de=ve?ve.index-ne:n.length-ne;if(de){var Ee=document.createTextNode(x.slice(ne,ne+de));D&&j<9?K.appendChild(Q("span",[Ee])):K.appendChild(Ee),t.map.push(t.pos,t.pos+de,Ee),t.col+=de,t.pos+=de}if(!ve)break;ne+=de+1;var Ae=void 0;if(ve[0]==" "){var Ie=t.cm.options.tabSize,Le=Ie-t.col%Ie;Ae=K.appendChild(Q("span",kr(Le),"cm-tab")),Ae.setAttribute("role","presentation"),Ae.setAttribute("cm-text"," "),t.col+=Le}else ve[0]=="\r"||ve[0]==`
|
|
17
|
+
`?(Ae=K.appendChild(Q("span",ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ae.setAttribute("cm-text",ve[0]),t.col+=1):(Ae=t.cm.options.specialCharPlaceholder(ve[0]),Ae.setAttribute("cm-text",ve[0]),D&&j<9?K.appendChild(Q("span",[Ae])):K.appendChild(Ae),t.col+=1);t.map.push(t.pos,t.pos+1,Ae),t.pos++}}if(t.trailingSpace=x.charCodeAt(n.length-1)==32,l||s||u||P||p||y){var De=l||"";s&&(De+=s),u&&(De+=u);var Ne=Q("span",[K],De,p);if(y)for(var We in y)y.hasOwnProperty(We)&&We!="style"&&We!="class"&&Ne.setAttribute(We,y[We]);return t.content.appendChild(Ne)}t.content.appendChild(K)}}function uc(t,n){if(t.length>1&&!/ /.test(t))return t;for(var l=n,s="",u=0;u<t.length;u++){var p=t.charAt(u);p==" "&&l&&(u==t.length-1||t.charCodeAt(u+1)==32)&&(p="\xA0"),s+=p,l=p==" "}return s}function $s(t,n){return function(l,s,u,p,y,x,C){u=u?u+" cm-force-border":"cm-force-border";for(var P=l.pos,K=P+s.length;;){for(var ne=void 0,ve=0;ve<n.length&&(ne=n[ve],!(ne.to>P&&ne.from<=P));ve++);if(ne.to>=K)return t(l,s,u,p,y,x,C);t(l,s.slice(0,ne.to-P),u,p,null,x,C),p=null,s=s.slice(ne.to-P),P=ne.to}}}function mu(t,n,l,s){var u=!s&&l.widgetNode;u&&t.map.push(t.pos,t.pos+n,u),!s&&t.cm.display.input.needsContentAttribute&&(u||(u=t.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",l.id)),u&&(t.cm.display.input.setUneditable(u),t.content.appendChild(u)),t.pos+=n,t.trailingSpace=!1}function fc(t,n,l){var s=t.markedSpans,u=t.text,p=0;if(!s){for(var y=1;y<l.length;y+=2)n.addToken(n,u.slice(p,p=l[y]),Na(l[y+1],n.cm.options));return}for(var x=u.length,C=0,P=1,K="",ne,ve,de=0,Ee,Ae,Ie,Le,De;;){if(de==C){Ee=Ae=Ie=ve="",De=null,Le=null,de=1/0;for(var Ne=[],We=void 0,Qe=0;Qe<s.length;++Qe){var Ke=s[Qe],bt=Ke.marker;if(bt.type=="bookmark"&&Ke.from==C&&bt.widgetNode)Ne.push(bt);else if(Ke.from<=C&&(Ke.to==null||Ke.to>C||bt.collapsed&&Ke.to==C&&Ke.from==C)){if(Ke.to!=null&&Ke.to!=C&&de>Ke.to&&(de=Ke.to,Ae=""),bt.className&&(Ee+=" "+bt.className),bt.css&&(ve=(ve?ve+";":"")+bt.css),bt.startStyle&&Ke.from==C&&(Ie+=" "+bt.startStyle),bt.endStyle&&Ke.to==de&&(We||(We=[])).push(bt.endStyle,Ke.to),bt.title&&((De||(De={})).title=bt.title),bt.attributes)for(var $t in bt.attributes)(De||(De={}))[$t]=bt.attributes[$t];bt.collapsed&&(!Le||Us(Le.marker,bt)<0)&&(Le=Ke)}else Ke.from>C&&de>Ke.from&&(de=Ke.from)}if(We)for(var wr=0;wr<We.length;wr+=2)We[wr+1]==de&&(Ae+=" "+We[wr]);if(!Le||Le.from==C)for(var rr=0;rr<Ne.length;++rr)mu(n,0,Ne[rr]);if(Le&&(Le.from||0)==C){if(mu(n,(Le.to==null?x+1:Le.to)-C,Le.marker,Le.from==null),Le.to==null)return;Le.to==C&&(Le=!1)}}if(C>=x)break;for(var Sn=Math.min(x,de);;){if(K){var fn=C+K.length;if(!Le){var vr=fn>Sn?K.slice(0,Sn-C):K;n.addToken(n,vr,ne?ne+Ee:Ee,Ie,C+vr.length==de?Ae:"",ve,De)}if(fn>=Sn){K=K.slice(Sn-C),C=Sn;break}C=fn,Ie=""}K=u.slice(p,p=l[P++]),ne=Na(l[P++],n.cm.options)}}}function yu(t,n,l){this.line=n,this.rest=ac(n),this.size=this.rest?It(et(this.rest))-l+1:1,this.node=this.text=null,this.hidden=Si(t,n)}function Ko(t,n,l){for(var s=[],u,p=n;p<l;p=u){var y=new yu(t.doc,Ge(t.doc,p),p);u=p+y.size,s.push(y)}return s}var ra=null;function cc(t){ra?ra.ops.push(t):t.ownsGroup=ra={ops:[t],delayedCallbacks:[]}}function Yo(t){var n=t.delayedCallbacks,l=0;do{for(;l<n.length;l++)n[l].call(null);for(var s=0;s<t.ops.length;s++){var u=t.ops[s];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(l<n.length)}function dc(t,n){var l=t.ownsGroup;if(l)try{Yo(l)}finally{ra=null,n(l)}}var ho=null;function yr(t,n){var l=we(t,n);if(l.length){var s=Array.prototype.slice.call(arguments,2),u;ra?u=ra.delayedCallbacks:ho?u=ho:(u=ho=[],setTimeout(pc,0));for(var p=function(x){u.push(function(){return l[x].apply(null,s)})},y=0;y<l.length;++y)p(y)}}function pc(){var t=ho;ho=null;for(var n=0;n<t.length;++n)t[n]()}function Ks(t,n,l,s){for(var u=0;u<n.changes.length;u++){var p=n.changes[u];p=="text"?vc(t,n):p=="gutter"?Br(t,n,l,s):p=="class"?Xo(t,n):p=="widget"&&gc(t,n,s)}n.changes=null}function Ra(t){return t.node==t.text&&(t.node=Q("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),D&&j<8&&(t.node.style.zIndex=2)),t.node}function hc(t,n){var l=n.bgClass?n.bgClass+" "+(n.line.bgClass||""):n.line.bgClass;if(l&&(l+=" CodeMirror-linebackground"),n.background)l?n.background.className=l:(n.background.parentNode.removeChild(n.background),n.background=null);else if(l){var s=Ra(n);n.background=s.insertBefore(Q("div",null,l),s.firstChild),t.display.input.setUneditable(n.background)}}function Ys(t,n){var l=t.display.externalMeasured;return l&&l.line==n.line?(t.display.externalMeasured=null,n.measure=l.measure,l.built):gu(t,n)}function vc(t,n){var l=n.text.className,s=Ys(t,n);n.text==n.node&&(n.node=s.pre),n.text.parentNode.replaceChild(s.pre,n.text),n.text=s.pre,s.bgClass!=n.bgClass||s.textClass!=n.textClass?(n.bgClass=s.bgClass,n.textClass=s.textClass,Xo(t,n)):l&&(n.text.className=l)}function Xo(t,n){hc(t,n),n.line.wrapClass?Ra(n).className=n.line.wrapClass:n.node!=n.text&&(n.node.className="");var l=n.textClass?n.textClass+" "+(n.line.textClass||""):n.line.textClass;n.text.className=l||""}function Br(t,n,l,s){if(n.gutter&&(n.node.removeChild(n.gutter),n.gutter=null),n.gutterBackground&&(n.node.removeChild(n.gutterBackground),n.gutterBackground=null),n.line.gutterClass){var u=Ra(n);n.gutterBackground=Q("div",null,"CodeMirror-gutter-background "+n.line.gutterClass,"left: "+(t.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px; width: "+s.gutterTotalWidth+"px"),t.display.input.setUneditable(n.gutterBackground),u.insertBefore(n.gutterBackground,n.text)}var p=n.line.gutterMarkers;if(t.options.lineNumbers||p){var y=Ra(n),x=n.gutter=Q("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px");if(x.setAttribute("aria-hidden","true"),t.display.input.setUneditable(x),y.insertBefore(x,n.text),n.line.gutterClass&&(x.className+=" "+n.line.gutterClass),t.options.lineNumbers&&(!p||!p["CodeMirror-linenumbers"])&&(n.lineNumber=x.appendChild(Q("div",Pa(t.options,l),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+s.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),p)for(var C=0;C<t.display.gutterSpecs.length;++C){var P=t.display.gutterSpecs[C].className,K=p.hasOwnProperty(P)&&p[P];K&&x.appendChild(Q("div",[K],"CodeMirror-gutter-elt","left: "+s.gutterLeft[P]+"px; width: "+s.gutterWidth[P]+"px"))}}}function gc(t,n,l){n.alignable&&(n.alignable=null);for(var s=z("CodeMirror-linewidget"),u=n.node.firstChild,p=void 0;u;u=p)p=u.nextSibling,s.test(u.className)&&n.node.removeChild(u);bu(t,n,l)}function mc(t,n,l,s){var u=Ys(t,n);return n.text=n.node=u.pre,u.bgClass&&(n.bgClass=u.bgClass),u.textClass&&(n.textClass=u.textClass),Xo(t,n),Br(t,n,l,s),bu(t,n,s),n.node}function bu(t,n,l){if(xu(t,n.line,n,l,!0),n.rest)for(var s=0;s<n.rest.length;s++)xu(t,n.rest[s],n,l,!1)}function xu(t,n,l,s,u){if(n.widgets)for(var p=Ra(l),y=0,x=n.widgets;y<x.length;++y){var C=x[y],P=Q("div",[C.node],"CodeMirror-linewidget"+(C.className?" "+C.className:""));C.handleMouseEvents||P.setAttribute("cm-ignore-events","true"),yc(C,P,l,s),t.display.input.setUneditable(P),u&&C.above?p.insertBefore(P,l.gutter||l.text):p.appendChild(P),yr(C,"redraw")}}function yc(t,n,l,s){if(t.noHScroll){(l.alignable||(l.alignable=[])).push(n);var u=s.wrapperWidth;n.style.left=s.fixedPos+"px",t.coverGutter||(u-=s.gutterTotalWidth,n.style.paddingLeft=s.gutterTotalWidth+"px"),n.style.width=u+"px"}t.coverGutter&&(n.style.zIndex=5,n.style.position="relative",t.noHScroll||(n.style.marginLeft=-s.gutterTotalWidth+"px"))}function Ci(t){if(t.height!=null)return t.height;var n=t.doc.cm;if(!n)return 0;if(!je(document.body,t.node)){var l="position: relative;";t.coverGutter&&(l+="margin-left: -"+n.display.gutters.offsetWidth+"px;"),t.noHScroll&&(l+="width: "+n.display.wrapper.clientWidth+"px;"),xe(n.display.measure,Q("div",[t.node],null,l))}return t.height=t.node.parentNode.offsetHeight}function Ai(t,n){for(var l=Rr(n);l!=t.wrapper;l=l.parentNode)if(!l||l.nodeType==1&&l.getAttribute("cm-ignore-events")=="true"||l.parentNode==t.sizer&&l!=t.mover)return!0}function vo(t){return t.lineSpace.offsetTop}function go(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Su(t){if(t.cachedPaddingH)return t.cachedPaddingH;var n=xe(t.measure,Q("pre","x","CodeMirror-line-like")),l=window.getComputedStyle?window.getComputedStyle(n):n.currentStyle,s={left:parseInt(l.paddingLeft),right:parseInt(l.paddingRight)};return!isNaN(s.left)&&!isNaN(s.right)&&(t.cachedPaddingH=s),s}function gn(t){return Be-t.display.nativeBarWidth}function zn(t){return t.display.scroller.clientWidth-gn(t)-t.display.barWidth}function Jo(t){return t.display.scroller.clientHeight-gn(t)-t.display.barHeight}function wu(t,n,l){var s=t.options.lineWrapping,u=s&&zn(t);if(!n.measure.heights||s&&n.measure.width!=u){var p=n.measure.heights=[];if(s){n.measure.width=u;for(var y=n.text.firstChild.getClientRects(),x=0;x<y.length-1;x++){var C=y[x],P=y[x+1];Math.abs(C.bottom-P.bottom)>2&&p.push((C.bottom+P.top)/2-l.top)}}p.push(l.bottom-l.top)}}function Cu(t,n,l){if(t.line==n)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var s=0;s<t.rest.length;s++)if(t.rest[s]==n)return{map:t.measure.maps[s],cache:t.measure.caches[s]};for(var u=0;u<t.rest.length;u++)if(It(t.rest[u])>l)return{map:t.measure.maps[u],cache:t.measure.caches[u],before:!0}}}function bc(t,n){n=_n(n);var l=It(n),s=t.display.externalMeasured=new yu(t.doc,n,l);s.lineN=l;var u=s.built=gu(t,s);return s.text=u.pre,xe(t.display.lineMeasure,u.pre),s}function Da(t,n,l,s){return Tn(t,na(t,n),l,s)}function Qo(t,n){if(n>=t.display.viewFrom&&n<t.display.viewTo)return t.display.view[oa(t,n)];var l=t.display.externalMeasured;if(l&&n>=l.lineN&&n<l.lineN+l.size)return l}function na(t,n){var l=It(n),s=Qo(t,l);s&&!s.text?s=null:s&&s.changes&&(Ks(t,s,l,il(t)),t.curOp.forceUpdate=!0),s||(s=bc(t,n));var u=Cu(s,n,l);return{line:n,view:s,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function Tn(t,n,l,s,u){n.before&&(l=-1);var p=l+(s||""),y;return n.cache.hasOwnProperty(p)?y=n.cache[p]:(n.rect||(n.rect=n.view.text.getBoundingClientRect()),n.hasHeights||(wu(t,n.view,n.rect),n.hasHeights=!0),y=xc(t,n,l,s),y.bogus||(n.cache[p]=y)),{left:y.left,right:y.right,top:u?y.rtop:y.top,bottom:u?y.rbottom:y.bottom}}var Xs={left:0,right:0,top:0,bottom:0};function Js(t,n,l){for(var s,u,p,y,x,C,P=0;P<t.length;P+=3)if(x=t[P],C=t[P+1],n<x?(u=0,p=1,y="left"):n<C?(u=n-x,p=u+1):(P==t.length-3||n==C&&t[P+3]>n)&&(p=C-x,u=p-1,n>=C&&(y="right")),u!=null){if(s=t[P+2],x==C&&l==(s.insertLeft?"left":"right")&&(y=l),l=="left"&&u==0)for(;P&&t[P-2]==t[P-3]&&t[P-1].insertLeft;)s=t[(P-=3)+2],y="left";if(l=="right"&&u==C-x)for(;P<t.length-3&&t[P+3]==t[P+4]&&!t[P+5].insertLeft;)s=t[(P+=3)+2],y="right";break}return{node:s,start:u,end:p,collapse:y,coverStart:x,coverEnd:C}}function Ba(t,n){var l=Xs;if(n=="left")for(var s=0;s<t.length&&(l=t[s]).left==l.right;s++);else for(var u=t.length-1;u>=0&&(l=t[u]).left==l.right;u--);return l}function xc(t,n,l,s){var u=Js(n.map,l,s),p=u.node,y=u.start,x=u.end,C=u.collapse,P;if(p.nodeType==3){for(var K=0;K<4;K++){for(;y&&jn(n.line.text.charAt(u.coverStart+y));)--y;for(;u.coverStart+x<u.coverEnd&&jn(n.line.text.charAt(u.coverStart+x));)++x;if(D&&j<9&&y==0&&x==u.coverEnd-u.coverStart?P=p.parentNode.getBoundingClientRect():P=Ba(ie(p,y,x).getClientRects(),s),P.left||P.right||y==0)break;x=y,y=y-1,C="right"}D&&j<11&&(P=Sc(t.display.measure,P))}else{y>0&&(C=s="right");var ne;t.options.lineWrapping&&(ne=p.getClientRects()).length>1?P=ne[s=="right"?ne.length-1:0]:P=p.getBoundingClientRect()}if(D&&j<9&&!y&&(!P||!P.left&&!P.right)){var ve=p.parentNode.getClientRects()[0];ve?P={left:ve.left,right:ve.left+ja(t.display),top:ve.top,bottom:ve.bottom}:P=Xs}for(var de=P.top-n.rect.top,Ee=P.bottom-n.rect.top,Ae=(de+Ee)/2,Ie=n.view.measure.heights,Le=0;Le<Ie.length-1&&!(Ae<Ie[Le]);Le++);var De=Le?Ie[Le-1]:0,Ne=Ie[Le],We={left:(C=="right"?P.right:P.left)-n.rect.left,right:(C=="left"?P.left:P.right)-n.rect.left,top:De,bottom:Ne};return!P.left&&!P.right&&(We.bogus=!0),t.options.singleCursorHeightPerLine||(We.rtop=de,We.rbottom=Ee),We}function Sc(t,n){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jr(t))return n;var l=screen.logicalXDPI/screen.deviceXDPI,s=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*l,right:n.right*l,top:n.top*s,bottom:n.bottom*s}}function Qs(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var n=0;n<t.rest.length;n++)t.measure.caches[n]={}}function Zs(t){t.display.externalMeasure=null,pe(t.display.lineMeasure);for(var n=0;n<t.display.view.length;n++)Qs(t.display.view[n])}function mo(t){Zs(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function qs(t){return re&&N?-(t.body.getBoundingClientRect().left-parseInt(getComputedStyle(t.body).marginLeft)):t.defaultView.pageXOffset||(t.documentElement||t.body).scrollLeft}function Au(t){return re&&N?-(t.body.getBoundingClientRect().top-parseInt(getComputedStyle(t.body).marginTop)):t.defaultView.pageYOffset||(t.documentElement||t.body).scrollTop}function el(t){var n=_n(t),l=n.widgets,s=0;if(l)for(var u=0;u<l.length;++u)l[u].above&&(s+=Ci(l[u]));return s}function yo(t,n,l,s,u){if(!u){var p=el(n);l.top+=p,l.bottom+=p}if(s=="line")return l;s||(s="local");var y=wi(n);if(s=="local"?y+=vo(t.display):y-=t.display.viewOffset,s=="page"||s=="window"){var x=t.display.lineSpace.getBoundingClientRect();y+=x.top+(s=="window"?0:Au(ut(t)));var C=x.left+(s=="window"?0:qs(ut(t)));l.left+=C,l.right+=C}return l.top+=y,l.bottom+=y,l}function Ou(t,n,l){if(l=="div")return n;var s=n.left,u=n.top;if(l=="page")s-=qs(ut(t)),u-=Au(ut(t));else if(l=="local"||!l){var p=t.display.sizer.getBoundingClientRect();s+=p.left,u+=p.top}var y=t.display.lineSpace.getBoundingClientRect();return{left:s-y.left,top:u-y.top}}function Zo(t,n,l,s,u){return s||(s=Ge(t.doc,n.line)),yo(t,s,Da(t,s,n.ch,u),l)}function kn(t,n,l,s,u,p){s=s||Ge(t.doc,n.line),u||(u=na(t,s));function y(Ee,Ae){var Ie=Tn(t,u,Ee,Ae?"right":"left",p);return Ae?Ie.left=Ie.right:Ie.right=Ie.left,yo(t,s,Ie,l)}var x=tt(s,t.doc.direction),C=n.ch,P=n.sticky;if(C>=s.text.length?(C=s.text.length,P="before"):C<=0&&(C=0,P="after"),!x)return y(P=="before"?C-1:C,P=="before");function K(Ee,Ae,Ie){var Le=x[Ae],De=Le.level==1;return y(Ie?Ee-1:Ee,De!=Ie)}var ne=St(x,C,P),ve=Gt,de=K(C,ne,P=="before");return ve!=null&&(de.other=K(C,ve,P!="before")),de}function li(t,n){var l=0;n=$e(t.doc,n),t.options.lineWrapping||(l=ja(t.display)*n.ch);var s=Ge(t.doc,n.line),u=wi(s)+vo(t.display);return{left:l,right:l,top:u,bottom:u+s.height}}function tl(t,n,l,s,u){var p=T(t,n,l);return p.xRel=u,s&&(p.outside=s),p}function bo(t,n,l){var s=t.doc;if(l+=t.display.viewOffset,l<0)return tl(s.first,0,null,-1,-1);var u=bi(s,l),p=s.first+s.size-1;if(u>p)return tl(s.first+s.size-1,Ge(s,p).text.length,null,1,1);n<0&&(n=0);for(var y=Ge(s,u);;){var x=nl(t,y,u,n,l),C=cu(y,x.ch+(x.xRel>0||x.outside>0?1:0));if(!C)return x;var P=C.find(1);if(P.line==u)return P;y=Ge(s,u=P.line)}}function Eu(t,n,l,s){s-=el(n);var u=n.text.length,p=Mr(function(y){return Tn(t,l,y-1).bottom<=s},u,0);return u=Mr(function(y){return Tn(t,l,y).top>s},p,u),{begin:p,end:u}}function Tu(t,n,l,s){l||(l=na(t,n));var u=yo(t,n,Tn(t,l,s),"line").top;return Eu(t,n,l,u)}function rl(t,n,l,s){return t.bottom<=l?!1:t.top>l?!0:(s?t.left:t.right)>n}function nl(t,n,l,s,u){u-=wi(n);var p=na(t,n),y=el(n),x=0,C=n.text.length,P=!0,K=tt(n,t.doc.direction);if(K){var ne=(t.options.lineWrapping?Cc:wc)(t,n,l,p,K,s,u);P=ne.level!=1,x=P?ne.from:ne.to-1,C=P?ne.to:ne.from-1}var ve=null,de=null,Ee=Mr(function(Qe){var Ke=Tn(t,p,Qe);return Ke.top+=y,Ke.bottom+=y,rl(Ke,s,u,!1)?(Ke.top<=u&&Ke.left<=s&&(ve=Qe,de=Ke),!0):!1},x,C),Ae,Ie,Le=!1;if(de){var De=s-de.left<de.right-s,Ne=De==P;Ee=ve+(Ne?0:1),Ie=Ne?"after":"before",Ae=De?de.left:de.right}else{!P&&(Ee==C||Ee==x)&&Ee++,Ie=Ee==0?"after":Ee==n.text.length?"before":Tn(t,p,Ee-(P?1:0)).bottom+y<=u==P?"after":"before";var We=kn(t,T(l,Ee,Ie),"line",n,p);Ae=We.left,Le=u<We.top?-1:u>=We.bottom?1:0}return Ee=an(n.text,Ee,1),tl(l,Ee,Ie,Le,s-Ae)}function wc(t,n,l,s,u,p,y){var x=Mr(function(ne){var ve=u[ne],de=ve.level!=1;return rl(kn(t,T(l,de?ve.to:ve.from,de?"before":"after"),"line",n,s),p,y,!0)},0,u.length-1),C=u[x];if(x>0){var P=C.level!=1,K=kn(t,T(l,P?C.from:C.to,P?"after":"before"),"line",n,s);rl(K,p,y,!0)&&K.top>y&&(C=u[x-1])}return C}function Cc(t,n,l,s,u,p,y){var x=Eu(t,n,s,y),C=x.begin,P=x.end;/\s/.test(n.text.charAt(P-1))&&P--;for(var K=null,ne=null,ve=0;ve<u.length;ve++){var de=u[ve];if(!(de.from>=P||de.to<=C)){var Ee=de.level!=1,Ae=Tn(t,s,Ee?Math.min(P,de.to)-1:Math.max(C,de.from)).right,Ie=Ae<p?p-Ae+1e9:Ae-p;(!K||ne>Ie)&&(K=de,ne=Ie)}}return K||(K=u[u.length-1]),K.from<C&&(K={from:C,to:K.to,level:K.level}),K.to>P&&(K={from:K.from,to:P,level:K.level}),K}var ia;function Va(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(ia==null){ia=Q("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ia.appendChild(document.createTextNode("x")),ia.appendChild(Q("br"));ia.appendChild(document.createTextNode("x"))}xe(t.measure,ia);var l=ia.offsetHeight/50;return l>3&&(t.cachedTextHeight=l),pe(t.measure),l||1}function ja(t){if(t.cachedCharWidth!=null)return t.cachedCharWidth;var n=Q("span","xxxxxxxxxx"),l=Q("pre",[n],"CodeMirror-line-like");xe(t.measure,l);var s=n.getBoundingClientRect(),u=(s.right-s.left)/10;return u>2&&(t.cachedCharWidth=u),u||10}function il(t){for(var n=t.display,l={},s={},u=n.gutters.clientLeft,p=n.gutters.firstChild,y=0;p;p=p.nextSibling,++y){var x=t.display.gutterSpecs[y].className;l[x]=p.offsetLeft+p.clientLeft+u,s[x]=p.clientWidth}return{fixedPos:al(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:l,gutterWidth:s,wrapperWidth:n.wrapper.clientWidth}}function al(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ku(t){var n=Va(t.display),l=t.options.lineWrapping,s=l&&Math.max(5,t.display.scroller.clientWidth/ja(t.display)-3);return function(u){if(Si(t.doc,u))return 0;var p=0;if(u.widgets)for(var y=0;y<u.widgets.length;y++)u.widgets[y].height&&(p+=u.widgets[y].height);return l?p+(Math.ceil(u.text.length/s)||1)*n:p+n}}function ol(t){var n=t.doc,l=ku(t);n.iter(function(s){var u=l(s);u!=s.height&&On(s,u)})}function aa(t,n,l,s){var u=t.display;if(!l&&Rr(n).getAttribute("cm-not-content")=="true")return null;var p,y,x=u.lineSpace.getBoundingClientRect();try{p=n.clientX-x.left,y=n.clientY-x.top}catch{return null}var C=bo(t,p,y),P;if(s&&C.xRel>0&&(P=Ge(t.doc,C.line).text).length==C.ch){var K=st(P,P.length,t.options.tabSize)-P.length;C=T(C.line,Math.max(0,Math.round((p-Su(t.display).left)/ja(t.display))-K))}return C}function oa(t,n){if(n>=t.display.viewTo||(n-=t.display.viewFrom,n<0))return null;for(var l=t.display.view,s=0;s<l.length;s++)if(n-=l[s].size,n<0)return s}function qr(t,n,l,s){n==null&&(n=t.doc.first),l==null&&(l=t.doc.first+t.doc.size),s||(s=0);var u=t.display;if(s&&l<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>n)&&(u.updateLineNumbers=n),t.curOp.viewChanged=!0,n>=u.viewTo)si&&Mi(t.doc,n)<u.viewTo&&Ri(t);else if(l<=u.viewFrom)si&&pu(t.doc,l+s)>u.viewFrom?Ri(t):(u.viewFrom+=s,u.viewTo+=s);else if(n<=u.viewFrom&&l>=u.viewTo)Ri(t);else if(n<=u.viewFrom){var p=qo(t,l,l+s,1);p?(u.view=u.view.slice(p.index),u.viewFrom=p.lineN,u.viewTo+=s):Ri(t)}else if(l>=u.viewTo){var y=qo(t,n,n,-1);y?(u.view=u.view.slice(0,y.index),u.viewTo=y.lineN):Ri(t)}else{var x=qo(t,n,n,-1),C=qo(t,l,l+s,1);x&&C?(u.view=u.view.slice(0,x.index).concat(Ko(t,x.lineN,C.lineN)).concat(u.view.slice(C.index)),u.viewTo+=s):Ri(t)}var P=u.externalMeasured;P&&(l<P.lineN?P.lineN+=s:n<P.lineN+P.size&&(u.externalMeasured=null))}function Ni(t,n,l){t.curOp.viewChanged=!0;var s=t.display,u=t.display.externalMeasured;if(u&&n>=u.lineN&&n<u.lineN+u.size&&(s.externalMeasured=null),!(n<s.viewFrom||n>=s.viewTo)){var p=s.view[oa(t,n)];if(p.node!=null){var y=p.changes||(p.changes=[]);Re(y,l)==-1&&y.push(l)}}}function Ri(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function qo(t,n,l,s){var u=oa(t,n),p,y=t.display.view;if(!si||l==t.doc.first+t.doc.size)return{index:u,lineN:l};for(var x=t.display.viewFrom,C=0;C<u;C++)x+=y[C].size;if(x!=n){if(s>0){if(u==y.length-1)return null;p=x+y[u].size-n,u++}else p=x-n;n+=p,l+=p}for(;Mi(t.doc,l)!=l;){if(u==(s<0?0:y.length-1))return null;l+=s*y[u-(s<0?1:0)].size,u+=s}return{index:u,lineN:l}}function Ac(t,n,l){var s=t.display,u=s.view;u.length==0||n>=s.viewTo||l<=s.viewFrom?(s.view=Ko(t,n,l),s.viewFrom=n):(s.viewFrom>n?s.view=Ko(t,n,s.viewFrom).concat(s.view):s.viewFrom<n&&(s.view=s.view.slice(oa(t,n))),s.viewFrom=n,s.viewTo<l?s.view=s.view.concat(Ko(t,s.viewTo,l)):s.viewTo>l&&(s.view=s.view.slice(0,oa(t,l)))),s.viewTo=l}function Pu(t){for(var n=t.display.view,l=0,s=0;s<n.length;s++){var u=n[s];!u.hidden&&(!u.node||u.changes)&&++l}return l}function Wa(t){t.display.input.showSelection(t.display.input.prepareSelection())}function xo(t,n){n===void 0&&(n=!0);var l=t.doc,s={},u=s.cursors=document.createDocumentFragment(),p=s.selection=document.createDocumentFragment(),y=t.options.$customCursor;y&&(n=!0);for(var x=0;x<l.sel.ranges.length;x++)if(!(!n&&x==l.sel.primIndex)){var C=l.sel.ranges[x];if(!(C.from().line>=t.display.viewTo||C.to().line<t.display.viewFrom)){var P=C.empty();if(y){var K=y(t,C);K&&es(t,K,u)}else(P||t.options.showCursorWhenSelecting)&&es(t,C.head,u);P||Oc(t,C,p)}}return s}function es(t,n,l){var s=kn(t,n,"div",null,null,!t.options.singleCursorHeightPerLine),u=l.appendChild(Q("div","\xA0","CodeMirror-cursor"));if(u.style.left=s.left+"px",u.style.top=s.top+"px",u.style.height=Math.max(0,s.bottom-s.top)*t.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(t.getWrapperElement().className)){var p=Zo(t,n,"div",null,null),y=p.right-p.left;u.style.width=(y>0?y:t.defaultCharWidth())+"px"}if(s.other){var x=l.appendChild(Q("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));x.style.display="",x.style.left=s.other.left+"px",x.style.top=s.other.top+"px",x.style.height=(s.other.bottom-s.other.top)*.85+"px"}}function ts(t,n){return t.top-n.top||t.left-n.left}function Oc(t,n,l){var s=t.display,u=t.doc,p=document.createDocumentFragment(),y=Su(t.display),x=y.left,C=Math.max(s.sizerWidth,zn(t)-s.sizer.offsetLeft)-y.right,P=u.direction=="ltr";function K(Ne,We,Qe,Ke){We<0&&(We=0),We=Math.round(We),Ke=Math.round(Ke),p.appendChild(Q("div",null,"CodeMirror-selected","position: absolute; left: "+Ne+`px;
|
|
18
|
+
top: `+We+"px; width: "+(Qe??C-Ne)+`px;
|
|
19
|
+
height: `+(Ke-We)+"px"))}function ne(Ne,We,Qe){var Ke=Ge(u,Ne),bt=Ke.text.length,$t,wr;function rr(vr,tn){return Zo(t,T(Ne,vr),"div",Ke,tn)}function Sn(vr,tn,Ir){var mr=Tu(t,Ke,null,vr),gr=tn=="ltr"==(Ir=="after")?"left":"right",ur=Ir=="after"?mr.begin:mr.end-(/\s/.test(Ke.text.charAt(mr.end-1))?2:1);return rr(ur,gr)[gr]}var fn=tt(Ke,u.direction);return zr(fn,We||0,Qe??bt,function(vr,tn,Ir,mr){var gr=Ir=="ltr",ur=rr(vr,gr?"left":"right"),cn=rr(tn-1,gr?"right":"left"),Po=We==null&&vr==0,Sa=Qe==null&&tn==bt,jr=mr==0,Jn=!fn||mr==fn.length-1;if(cn.top-ur.top<=3){var Cr=(P?Po:Sa)&&jr,Lf=(P?Sa:Po)&&Jn,zi=Cr?x:(gr?ur:cn).left,no=Lf?C:(gr?cn:ur).right;K(zi,ur.top,no-zi,ur.bottom)}else{var io,Wr,Fn,Rl;gr?(io=P&&Po&&jr?x:ur.left,Wr=P?C:Sn(vr,Ir,"before"),Fn=P?x:Sn(tn,Ir,"after"),Rl=P&&Sa&&Jn?C:cn.right):(io=P?Sn(vr,Ir,"before"):x,Wr=!P&&Po&&jr?C:ur.right,Fn=!P&&Sa&&Jn?x:cn.left,Rl=P?Sn(tn,Ir,"after"):C),K(io,ur.top,Wr-io,ur.bottom),ur.bottom<cn.top&&K(x,ur.bottom,null,cn.top),K(Fn,cn.top,Rl-Fn,cn.bottom)}(!$t||ts(ur,$t)<0)&&($t=ur),ts(cn,$t)<0&&($t=cn),(!wr||ts(ur,wr)<0)&&(wr=ur),ts(cn,wr)<0&&(wr=cn)}),{start:$t,end:wr}}var ve=n.from(),de=n.to();if(ve.line==de.line)ne(ve.line,ve.ch,de.ch);else{var Ee=Ge(u,ve.line),Ae=Ge(u,de.line),Ie=_n(Ee)==_n(Ae),Le=ne(ve.line,ve.ch,Ie?Ee.text.length+1:null).end,De=ne(de.line,Ie?0:null,de.ch).start;Ie&&(Le.top<De.top-2?(K(Le.right,Le.top,null,Le.bottom),K(x,De.top,De.left,De.bottom)):K(Le.right,Le.top,De.left-Le.right,Le.bottom)),Le.bottom<De.top&&K(x,Le.bottom,null,De.top)}l.appendChild(p)}function Di(t){if(t.state.focused){var n=t.display;clearInterval(n.blinker);var l=!0;n.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?n.blinker=setInterval(function(){t.hasFocus()||Ha(t),n.cursorDiv.style.visibility=(l=!l)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function rs(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||ll(t))}function sl(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Ha(t))},100)}function ll(t,n){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),t.options.readOnly!="nocursor"&&(t.state.focused||(nt(t,"focus",t,n),t.state.focused=!0,Ue(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),X&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Di(t))}function Ha(t,n){t.state.delayingBlurEvent||(t.state.focused&&(nt(t,"blur",t,n),t.state.focused=!1,q(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function ul(t){for(var n=t.display,l=n.lineDiv.offsetTop,s=Math.max(0,n.scroller.getBoundingClientRect().top),u=n.lineDiv.getBoundingClientRect().top,p=0,y=0;y<n.view.length;y++){var x=n.view[y],C=t.options.lineWrapping,P=void 0,K=0;if(!x.hidden){if(u+=x.line.height,D&&j<8){var ne=x.node.offsetTop+x.node.offsetHeight;P=ne-l,l=ne}else{var ve=x.node.getBoundingClientRect();P=ve.bottom-ve.top,!C&&x.text.firstChild&&(K=x.text.firstChild.getBoundingClientRect().right-ve.left-1)}var de=x.line.height-P;if((de>.005||de<-.005)&&(u<s&&(p-=de),On(x.line,P),Fu(x.line),x.rest))for(var Ee=0;Ee<x.rest.length;Ee++)Fu(x.rest[Ee]);if(K>t.display.sizerWidth){var Ae=Math.ceil(K/ja(t.display));Ae>t.display.maxLineLength&&(t.display.maxLineLength=Ae,t.display.maxLine=x.line,t.display.maxLineChanged=!0)}}}Math.abs(p)>2&&(n.scroller.scrollTop+=p)}function Fu(t){if(t.widgets)for(var n=0;n<t.widgets.length;++n){var l=t.widgets[n],s=l.node.parentNode;s&&(l.height=s.offsetHeight)}}function Ua(t,n,l){var s=l&&l.top!=null?Math.max(0,l.top):t.scroller.scrollTop;s=Math.floor(s-vo(t));var u=l&&l.bottom!=null?l.bottom:s+t.wrapper.clientHeight,p=bi(n,s),y=bi(n,u);if(l&&l.ensure){var x=l.ensure.from.line,C=l.ensure.to.line;x<p?(p=x,y=bi(n,wi(Ge(n,x))+t.wrapper.clientHeight)):Math.min(C,n.lastLine())>=y&&(p=bi(n,wi(Ge(n,C))-t.wrapper.clientHeight),y=C)}return{from:p,to:Math.max(y,p+1)}}function Ec(t,n){if(!ht(t,"scrollCursorIntoView")){var l=t.display,s=l.sizer.getBoundingClientRect(),u=null,p=l.wrapper.ownerDocument;if(n.top+s.top<0?u=!0:n.bottom+s.top>(p.defaultView.innerHeight||p.documentElement.clientHeight)&&(u=!1),u!=null&&!F){var y=Q("div","\u200B",null,`position: absolute;
|
|
20
|
+
top: `+(n.top-l.viewOffset-vo(t.display))+`px;
|
|
21
|
+
height: `+(n.bottom-n.top+gn(t)+l.barHeight)+`px;
|
|
22
|
+
left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");t.display.lineSpace.appendChild(y),y.scrollIntoView(u),t.display.lineSpace.removeChild(y)}}}function Tc(t,n,l,s){s==null&&(s=0);var u;!t.options.lineWrapping&&n==l&&(l=n.sticky=="before"?T(n.line,n.ch+1,"before"):n,n=n.ch?T(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n);for(var p=0;p<5;p++){var y=!1,x=kn(t,n),C=!l||l==n?x:kn(t,l);u={left:Math.min(x.left,C.left),top:Math.min(x.top,C.top)-s,right:Math.max(x.left,C.left),bottom:Math.max(x.bottom,C.bottom)+s};var P=fl(t,u),K=t.doc.scrollTop,ne=t.doc.scrollLeft;if(P.scrollTop!=null&&(za(t,P.scrollTop),Math.abs(t.doc.scrollTop-K)>1&&(y=!0)),P.scrollLeft!=null&&(la(t,P.scrollLeft),Math.abs(t.doc.scrollLeft-ne)>1&&(y=!0)),!y)break}return u}function kc(t,n){var l=fl(t,n);l.scrollTop!=null&&za(t,l.scrollTop),l.scrollLeft!=null&&la(t,l.scrollLeft)}function fl(t,n){var l=t.display,s=Va(t.display);n.top<0&&(n.top=0);var u=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:l.scroller.scrollTop,p=Jo(t),y={};n.bottom-n.top>p&&(n.bottom=n.top+p);var x=t.doc.height+go(l),C=n.top<s,P=n.bottom>x-s;if(n.top<u)y.scrollTop=C?0:n.top;else if(n.bottom>u+p){var K=Math.min(n.top,(P?x:n.bottom)-p);K!=u&&(y.scrollTop=K)}var ne=t.options.fixedGutter?0:l.gutters.offsetWidth,ve=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:l.scroller.scrollLeft-ne,de=zn(t)-l.gutters.offsetWidth,Ee=n.right-n.left>de;return Ee&&(n.right=n.left+de),n.left<10?y.scrollLeft=0:n.left<ve?y.scrollLeft=Math.max(0,n.left+ne-(Ee?0:10)):n.right>de+ve-3&&(y.scrollLeft=n.right+(Ee?0:10)-de),y}function cl(t,n){n!=null&&(ns(t),t.curOp.scrollTop=(t.curOp.scrollTop==null?t.doc.scrollTop:t.curOp.scrollTop)+n)}function _a(t){ns(t);var n=t.getCursor();t.curOp.scrollToPos={from:n,to:n,margin:t.options.cursorScrollMargin}}function sa(t,n,l){(n!=null||l!=null)&&ns(t),n!=null&&(t.curOp.scrollLeft=n),l!=null&&(t.curOp.scrollTop=l)}function Iu(t,n){ns(t),t.curOp.scrollToPos=n}function ns(t){var n=t.curOp.scrollToPos;if(n){t.curOp.scrollToPos=null;var l=li(t,n.from),s=li(t,n.to);Lu(t,l,s,n.margin)}}function Lu(t,n,l,s){var u=fl(t,{left:Math.min(n.left,l.left),top:Math.min(n.top,l.top)-s,right:Math.max(n.right,l.right),bottom:Math.max(n.bottom,l.bottom)+s});sa(t,u.scrollLeft,u.scrollTop)}function za(t,n){Math.abs(t.doc.scrollTop-n)<2||(m||hl(t,{top:n}),dl(t,n,!0),m&&hl(t),So(t,100))}function dl(t,n,l){n=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,n)),!(t.display.scroller.scrollTop==n&&!l)&&(t.doc.scrollTop=n,t.display.scrollbars.setScrollTop(n),t.display.scroller.scrollTop!=n&&(t.display.scroller.scrollTop=n))}function la(t,n,l,s){n=Math.max(0,Math.min(n,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),!((l?n==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-n)<2)&&!s)&&(t.doc.scrollLeft=n,ju(t),t.display.scroller.scrollLeft!=n&&(t.display.scroller.scrollLeft=n),t.display.scrollbars.setScrollLeft(n))}function Ga(t){var n=t.display,l=n.gutters.offsetWidth,s=Math.round(t.doc.height+go(t.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:t.options.fixedGutter?l:0,docHeight:s,scrollHeight:s+gn(t)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:l}}var Bi=function(t,n,l){this.cm=l;var s=this.vert=Q("div",[Q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=Q("div",[Q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");s.tabIndex=u.tabIndex=-1,t(s),t(u),se(s,"scroll",function(){s.clientHeight&&n(s.scrollTop,"vertical")}),se(u,"scroll",function(){u.clientWidth&&n(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,D&&j<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bi.prototype.update=function(t){var n=t.scrollWidth>t.clientWidth+1,l=t.scrollHeight>t.clientHeight+1,s=t.nativeBarWidth;if(l){this.vert.style.display="block",this.vert.style.bottom=n?s+"px":"0";var u=t.viewHeight-(n?s:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+u)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=l?s+"px":"0",this.horiz.style.left=t.barLeft+"px";var p=t.viewWidth-t.barLeft-(l?s:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+p)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(s==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:l?s:0,bottom:n?s:0}},Bi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var t=M&&!J?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new He,this.disableVert=new He},Bi.prototype.enableZeroWidthBar=function(t,n,l){t.style.visibility="";function s(){var u=t.getBoundingClientRect(),p=l=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);p!=t?t.style.visibility="hidden":n.set(1e3,s)}n.set(1e3,s)},Bi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var is=function(){};is.prototype.update=function(){return{bottom:0,right:0}},is.prototype.setScrollLeft=function(){},is.prototype.setScrollTop=function(){},is.prototype.clear=function(){};function $a(t,n){n||(n=Ga(t));var l=t.display.barWidth,s=t.display.barHeight;Mu(t,n);for(var u=0;u<4&&l!=t.display.barWidth||s!=t.display.barHeight;u++)l!=t.display.barWidth&&t.options.lineWrapping&&ul(t),Mu(t,Ga(t)),l=t.display.barWidth,s=t.display.barHeight}function Mu(t,n){var l=t.display,s=l.scrollbars.update(n);l.sizer.style.paddingRight=(l.barWidth=s.right)+"px",l.sizer.style.paddingBottom=(l.barHeight=s.bottom)+"px",l.heightForcer.style.borderBottom=s.bottom+"px solid transparent",s.right&&s.bottom?(l.scrollbarFiller.style.display="block",l.scrollbarFiller.style.height=s.bottom+"px",l.scrollbarFiller.style.width=s.right+"px"):l.scrollbarFiller.style.display="",s.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(l.gutterFiller.style.display="block",l.gutterFiller.style.height=s.bottom+"px",l.gutterFiller.style.width=n.gutterWidth+"px"):l.gutterFiller.style.display=""}var Nu={native:Bi,null:is};function Ru(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&q(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Nu[t.options.scrollbarStyle](function(n){t.display.wrapper.insertBefore(n,t.display.scrollbarFiller),se(n,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,l){l=="horizontal"?la(t,n):za(t,n)},t),t.display.scrollbars.addClass&&Ue(t.display.wrapper,t.display.scrollbars.addClass)}var Pc=0;function ua(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++Pc,markArrays:null},cc(t.curOp)}function fa(t){var n=t.curOp;n&&dc(n,function(l){for(var s=0;s<l.ops.length;s++)l.ops[s].cm.curOp=null;as(l)})}function as(t){for(var n=t.ops,l=0;l<n.length;l++)Fc(n[l]);for(var s=0;s<n.length;s++)Ic(n[s]);for(var u=0;u<n.length;u++)Lc(n[u]);for(var p=0;p<n.length;p++)Mc(n[p]);for(var y=0;y<n.length;y++)Nc(n[y])}function Fc(t){var n=t.cm,l=n.display;Du(n),t.updateMaxLine&&zs(n),t.mustUpdate=t.viewChanged||t.forceUpdate||t.scrollTop!=null||t.scrollToPos&&(t.scrollToPos.from.line<l.viewFrom||t.scrollToPos.to.line>=l.viewTo)||l.maxLineChanged&&n.options.lineWrapping,t.update=t.mustUpdate&&new os(n,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ic(t){t.updatedDisplay=t.mustUpdate&&Bu(t.cm,t.update)}function Lc(t){var n=t.cm,l=n.display;t.updatedDisplay&&ul(n),t.barMeasure=Ga(n),l.maxLineChanged&&!n.options.lineWrapping&&(t.adjustWidthTo=Da(n,l.maxLine,l.maxLine.text.length).left+3,n.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(l.scroller.clientWidth,l.sizer.offsetLeft+t.adjustWidthTo+gn(n)+n.display.barWidth),t.maxScrollLeft=Math.max(0,l.sizer.offsetLeft+t.adjustWidthTo-zn(n))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=l.input.prepareSelection())}function Mc(t){var n=t.cm;t.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<n.doc.scrollLeft&&la(n,Math.min(n.display.scroller.scrollLeft,t.maxScrollLeft),!0),n.display.maxLineChanged=!1);var l=t.focus&&t.focus==ze(ut(n));t.preparedSelection&&n.display.input.showSelection(t.preparedSelection,l),(t.updatedDisplay||t.startHeight!=n.doc.height)&&$a(n,t.barMeasure),t.updatedDisplay&&Vu(n,t.barMeasure),t.selectionChanged&&Di(n),n.state.focused&&t.updateInput&&n.display.input.reset(t.typing),l&&rs(t.cm)}function Nc(t){var n=t.cm,l=n.display,s=n.doc;if(t.updatedDisplay&&pl(n,t.update),l.wheelStartX!=null&&(t.scrollTop!=null||t.scrollLeft!=null||t.scrollToPos)&&(l.wheelStartX=l.wheelStartY=null),t.scrollTop!=null&&dl(n,t.scrollTop,t.forceScroll),t.scrollLeft!=null&&la(n,t.scrollLeft,!0,!0),t.scrollToPos){var u=Tc(n,$e(s,t.scrollToPos.from),$e(s,t.scrollToPos.to),t.scrollToPos.margin);Ec(n,u)}var p=t.maybeHiddenMarkers,y=t.maybeUnhiddenMarkers;if(p)for(var x=0;x<p.length;++x)p[x].lines.length||nt(p[x],"hide");if(y)for(var C=0;C<y.length;++C)y[C].lines.length&&nt(y[C],"unhide");l.wrapper.offsetHeight&&(s.scrollTop=n.display.scroller.scrollTop),t.changeObjs&&nt(n,"changes",n,t.changeObjs),t.update&&t.update.finish()}function ln(t,n){if(t.curOp)return n();ua(t);try{return n()}finally{fa(t)}}function br(t,n){return function(){if(t.curOp)return n.apply(t,arguments);ua(t);try{return n.apply(t,arguments)}finally{fa(t)}}}function Vr(t){return function(){if(this.curOp)return t.apply(this,arguments);ua(this);try{return t.apply(this,arguments)}finally{fa(this)}}}function xr(t){return function(){var n=this.cm;if(!n||n.curOp)return t.apply(this,arguments);ua(n);try{return t.apply(this,arguments)}finally{fa(n)}}}function So(t,n){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(n,gt(Rc,t))}function Rc(t){var n=t.doc;if(!(n.highlightFrontier>=t.display.viewTo)){var l=+new Date+t.options.workTime,s=Fa(t,n.highlightFrontier),u=[];n.iter(s.line,Math.min(n.first+n.size,t.display.viewTo+500),function(p){if(s.line>=t.display.viewFrom){var y=p.styles,x=p.text.length>t.options.maxHighlightLength?An(n.mode,s.state):null,C=ru(t,p,s,!0);x&&(s.state=x),p.styles=C.styles;var P=p.styleClasses,K=C.classes;K?p.styleClasses=K:P&&(p.styleClasses=null);for(var ne=!y||y.length!=p.styles.length||P!=K&&(!P||!K||P.bgClass!=K.bgClass||P.textClass!=K.textClass),ve=0;!ne&&ve<y.length;++ve)ne=y[ve]!=p.styles[ve];ne&&u.push(s.line),p.stateAfter=s.save(),s.nextLine()}else p.text.length<=t.options.maxHighlightLength&&Wo(t,p.text,s),p.stateAfter=s.line%5==0?s.save():null,s.nextLine();if(+new Date>l)return So(t,t.options.workDelay),!0}),n.highlightFrontier=s.line,n.modeFrontier=Math.max(n.modeFrontier,s.line),u.length&&ln(t,function(){for(var p=0;p<u.length;p++)Ni(t,u[p],"text")})}}var os=function(t,n,l){var s=t.display;this.viewport=n,this.visible=Ua(s,t.doc,n),this.editorIsHidden=!s.wrapper.offsetWidth,this.wrapperHeight=s.wrapper.clientHeight,this.wrapperWidth=s.wrapper.clientWidth,this.oldDisplayWidth=zn(t),this.force=l,this.dims=il(t),this.events=[]};os.prototype.signal=function(t,n){Qt(t,n)&&this.events.push(arguments)},os.prototype.finish=function(){for(var t=0;t<this.events.length;t++)nt.apply(null,this.events[t])};function Du(t){var n=t.display;!n.scrollbarsClipped&&n.scroller.offsetWidth&&(n.nativeBarWidth=n.scroller.offsetWidth-n.scroller.clientWidth,n.heightForcer.style.height=gn(t)+"px",n.sizer.style.marginBottom=-n.nativeBarWidth+"px",n.sizer.style.borderRightWidth=gn(t)+"px",n.scrollbarsClipped=!0)}function Dc(t){if(t.hasFocus())return null;var n=ze(ut(t));if(!n||!je(t.display.lineDiv,n))return null;var l={activeElt:n};if(window.getSelection){var s=er(t).getSelection();s.anchorNode&&s.extend&&je(t.display.lineDiv,s.anchorNode)&&(l.anchorNode=s.anchorNode,l.anchorOffset=s.anchorOffset,l.focusNode=s.focusNode,l.focusOffset=s.focusOffset)}return l}function Bc(t){if(!(!t||!t.activeElt||t.activeElt==ze(t.activeElt.ownerDocument))&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&je(document.body,t.anchorNode)&&je(document.body,t.focusNode))){var n=t.activeElt.ownerDocument,l=n.defaultView.getSelection(),s=n.createRange();s.setEnd(t.anchorNode,t.anchorOffset),s.collapse(!1),l.removeAllRanges(),l.addRange(s),l.extend(t.focusNode,t.focusOffset)}}function Bu(t,n){var l=t.display,s=t.doc;if(n.editorIsHidden)return Ri(t),!1;if(!n.force&&n.visible.from>=l.viewFrom&&n.visible.to<=l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo)&&l.renderedView==l.view&&Pu(t)==0)return!1;Wu(t)&&(Ri(t),n.dims=il(t));var u=s.first+s.size,p=Math.max(n.visible.from-t.options.viewportMargin,s.first),y=Math.min(u,n.visible.to+t.options.viewportMargin);l.viewFrom<p&&p-l.viewFrom<20&&(p=Math.max(s.first,l.viewFrom)),l.viewTo>y&&l.viewTo-y<20&&(y=Math.min(u,l.viewTo)),si&&(p=Mi(t.doc,p),y=pu(t.doc,y));var x=p!=l.viewFrom||y!=l.viewTo||l.lastWrapHeight!=n.wrapperHeight||l.lastWrapWidth!=n.wrapperWidth;Ac(t,p,y),l.viewOffset=wi(Ge(t.doc,l.viewFrom)),t.display.mover.style.top=l.viewOffset+"px";var C=Pu(t);if(!x&&C==0&&!n.force&&l.renderedView==l.view&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo))return!1;var P=Dc(t);return C>4&&(l.lineDiv.style.display="none"),Vc(t,l.updateLineNumbers,n.dims),C>4&&(l.lineDiv.style.display=""),l.renderedView=l.view,Bc(P),pe(l.cursorDiv),pe(l.selectionDiv),l.gutters.style.height=l.sizer.style.minHeight=0,x&&(l.lastWrapHeight=n.wrapperHeight,l.lastWrapWidth=n.wrapperWidth,So(t,400)),l.updateLineNumbers=null,!0}function pl(t,n){for(var l=n.viewport,s=!0;;s=!1){if(!s||!t.options.lineWrapping||n.oldDisplayWidth==zn(t)){if(l&&l.top!=null&&(l={top:Math.min(t.doc.height+go(t.display)-Jo(t),l.top)}),n.visible=Ua(t.display,t.doc,l),n.visible.from>=t.display.viewFrom&&n.visible.to<=t.display.viewTo)break}else s&&(n.visible=Ua(t.display,t.doc,l));if(!Bu(t,n))break;ul(t);var u=Ga(t);Wa(t),$a(t,u),Vu(t,u),n.force=!1}n.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(n.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function hl(t,n){var l=new os(t,n);if(Bu(t,l)){ul(t),pl(t,l);var s=Ga(t);Wa(t),$a(t,s),Vu(t,s),l.finish()}}function Vc(t,n,l){var s=t.display,u=t.options.lineNumbers,p=s.lineDiv,y=p.firstChild;function x(Ee){var Ae=Ee.nextSibling;return X&&M&&t.display.currentWheelTarget==Ee?Ee.style.display="none":Ee.parentNode.removeChild(Ee),Ae}for(var C=s.view,P=s.viewFrom,K=0;K<C.length;K++){var ne=C[K];if(!ne.hidden)if(!ne.node||ne.node.parentNode!=p){var ve=mc(t,ne,P,l);p.insertBefore(ve,y)}else{for(;y!=ne.node;)y=x(y);var de=u&&n!=null&&n<=P&&ne.lineNumber;ne.changes&&(Re(ne.changes,"gutter")>-1&&(de=!1),Ks(t,ne,P,l)),de&&(pe(ne.lineNumber),ne.lineNumber.appendChild(document.createTextNode(Pa(t.options,P)))),y=ne.node.nextSibling}P+=ne.size}for(;y;)y=x(y)}function vl(t){var n=t.gutters.offsetWidth;t.sizer.style.marginLeft=n+"px",yr(t,"gutterChanged",t)}function Vu(t,n){t.display.sizer.style.minHeight=n.docHeight+"px",t.display.heightForcer.style.top=n.docHeight+"px",t.display.gutters.style.height=n.docHeight+t.display.barHeight+gn(t)+"px"}function ju(t){var n=t.display,l=n.view;if(!(!n.alignWidgets&&(!n.gutters.firstChild||!t.options.fixedGutter))){for(var s=al(n)-n.scroller.scrollLeft+t.doc.scrollLeft,u=n.gutters.offsetWidth,p=s+"px",y=0;y<l.length;y++)if(!l[y].hidden){t.options.fixedGutter&&(l[y].gutter&&(l[y].gutter.style.left=p),l[y].gutterBackground&&(l[y].gutterBackground.style.left=p));var x=l[y].alignable;if(x)for(var C=0;C<x.length;C++)x[C].style.left=p}t.options.fixedGutter&&(n.gutters.style.left=s+u+"px")}}function Wu(t){if(!t.options.lineNumbers)return!1;var n=t.doc,l=Pa(t.options,n.first+n.size-1),s=t.display;if(l.length!=s.lineNumChars){var u=s.measure.appendChild(Q("div",[Q("div",l)],"CodeMirror-linenumber CodeMirror-gutter-elt")),p=u.firstChild.offsetWidth,y=u.offsetWidth-p;return s.lineGutter.style.width="",s.lineNumInnerWidth=Math.max(p,s.lineGutter.offsetWidth-y)+1,s.lineNumWidth=s.lineNumInnerWidth+y,s.lineNumChars=s.lineNumInnerWidth?l.length:-1,s.lineGutter.style.width=s.lineNumWidth+"px",vl(t.display),!0}return!1}function ss(t,n){for(var l=[],s=!1,u=0;u<t.length;u++){var p=t[u],y=null;if(typeof p!="string"&&(y=p.style,p=p.className),p=="CodeMirror-linenumbers")if(n)s=!0;else continue;l.push({className:p,style:y})}return n&&!s&&l.push({className:"CodeMirror-linenumbers",style:null}),l}function Hu(t){var n=t.gutters,l=t.gutterSpecs;pe(n),t.lineGutter=null;for(var s=0;s<l.length;++s){var u=l[s],p=u.className,y=u.style,x=n.appendChild(Q("div",null,"CodeMirror-gutter "+p));y&&(x.style.cssText=y),p=="CodeMirror-linenumbers"&&(t.lineGutter=x,x.style.width=(t.lineNumWidth||1)+"px")}n.style.display=l.length?"":"none",vl(t)}function Ka(t){Hu(t.display),qr(t),ju(t)}function jc(t,n,l,s){var u=this;this.input=l,u.scrollbarFiller=Q("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=Q("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=ye("div",null,"CodeMirror-code"),u.selectionDiv=Q("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=Q("div",null,"CodeMirror-cursors"),u.measure=Q("div",null,"CodeMirror-measure"),u.lineMeasure=Q("div",null,"CodeMirror-measure"),u.lineSpace=ye("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var p=ye("div",[u.lineSpace],"CodeMirror-lines");u.mover=Q("div",[p],null,"position: relative"),u.sizer=Q("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=Q("div",null,null,"position: absolute; height: "+Be+"px; width: 1px;"),u.gutters=Q("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=Q("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=Q("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),re&&he>=105&&(u.wrapper.style.clipPath="inset(0px)"),u.wrapper.setAttribute("translate","no"),D&&j<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!X&&!(m&&w)&&(u.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(u.wrapper):t(u.wrapper)),u.viewFrom=u.viewTo=n.first,u.reportedViewFrom=u.reportedViewTo=n.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=ss(s.gutters,s.lineNumbers),Hu(u),l.init(u)}var ls=0,Oi=null;D?Oi=-.53:m?Oi=15:re?Oi=-.7:fe&&(Oi=-1/3);function Uu(t){var n=t.wheelDeltaX,l=t.wheelDeltaY;return n==null&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(n=t.detail),l==null&&t.detail&&t.axis==t.VERTICAL_AXIS?l=t.detail:l==null&&(l=t.wheelDelta),{x:n,y:l}}function Wc(t){var n=Uu(t);return n.x*=Oi,n.y*=Oi,n}function _u(t,n){re&&he==102&&(t.display.chromeScrollHack==null?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout(function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""},100));var l=Uu(n),s=l.x,u=l.y,p=Oi;n.deltaMode===0&&(s=n.deltaX,u=n.deltaY,p=1);var y=t.display,x=y.scroller,C=x.scrollWidth>x.clientWidth,P=x.scrollHeight>x.clientHeight;if(s&&C||u&&P){if(u&&M&&X){e:for(var K=n.target,ne=y.view;K!=x;K=K.parentNode)for(var ve=0;ve<ne.length;ve++)if(ne[ve].node==K){t.display.currentWheelTarget=K;break e}}if(s&&!m&&!oe&&p!=null){u&&P&&za(t,Math.max(0,x.scrollTop+u*p)),la(t,Math.max(0,x.scrollLeft+s*p)),(!u||u&&P)&&Ft(n),y.wheelStartX=null;return}if(u&&p!=null){var de=u*p,Ee=t.doc.scrollTop,Ae=Ee+y.wrapper.clientHeight;de<0?Ee=Math.max(0,Ee+de-50):Ae=Math.min(t.doc.height,Ae+de+50),hl(t,{top:Ee,bottom:Ae})}ls<20&&n.deltaMode!==0&&(y.wheelStartX==null?(y.wheelStartX=x.scrollLeft,y.wheelStartY=x.scrollTop,y.wheelDX=s,y.wheelDY=u,setTimeout(function(){if(y.wheelStartX!=null){var Ie=x.scrollLeft-y.wheelStartX,Le=x.scrollTop-y.wheelStartY,De=Le&&y.wheelDY&&Le/y.wheelDY||Ie&&y.wheelDX&&Ie/y.wheelDX;y.wheelStartX=y.wheelStartY=null,De&&(Oi=(Oi*ls+De)/(ls+1),++ls)}},200)):(y.wheelDX+=s,y.wheelDY+=u))}}var en=function(t,n){this.ranges=t,this.primIndex=n};en.prototype.primary=function(){return this.ranges[this.primIndex]},en.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var l=this.ranges[n],s=t.ranges[n];if(!Pe(l.anchor,s.anchor)||!Pe(l.head,s.head))return!1}return!0},en.prototype.deepCopy=function(){for(var t=[],n=0;n<this.ranges.length;n++)t[n]=new Dt(Fe(this.ranges[n].anchor),Fe(this.ranges[n].head));return new en(t,this.primIndex)},en.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},en.prototype.contains=function(t,n){n||(n=t);for(var l=0;l<this.ranges.length;l++){var s=this.ranges[l];if($(n,s.from())>=0&&$(t,s.to())<=0)return l}return-1};var Dt=function(t,n){this.anchor=t,this.head=n};Dt.prototype.from=function(){return wt(this.anchor,this.head)},Dt.prototype.to=function(){return it(this.anchor,this.head)},Dt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gn(t,n,l){var s=t&&t.options.selectionsMayTouch,u=n[l];n.sort(function(ve,de){return $(ve.from(),de.from())}),l=Re(n,u);for(var p=1;p<n.length;p++){var y=n[p],x=n[p-1],C=$(x.to(),y.from());if(s&&!y.empty()?C>0:C>=0){var P=wt(x.from(),y.from()),K=it(x.to(),y.to()),ne=x.empty()?y.from()==y.head:x.from()==x.head;p<=l&&--l,n.splice(--p,2,new Dt(ne?K:P,ne?P:K))}}return new en(n,l)}function Vi(t,n){return new en([new Dt(t,n||t)],0)}function ji(t){return t.text?T(t.from.line+t.text.length-1,et(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function zu(t,n){if($(t,n.from)<0)return t;if($(t,n.to)<=0)return ji(n);var l=t.line+n.text.length-(n.to.line-n.from.line)-1,s=t.ch;return t.line==n.to.line&&(s+=ji(n).ch-n.to.ch),T(l,s)}function A(t,n){for(var l=[],s=0;s<t.sel.ranges.length;s++){var u=t.sel.ranges[s];l.push(new Dt(zu(u.anchor,n),zu(u.head,n)))}return Gn(t.cm,l,t.sel.primIndex)}function Jt(t,n,l){return t.line==n.line?T(l.line,t.ch-n.ch+l.ch):T(l.line+(t.line-n.line),t.ch)}function ui(t,n,l){for(var s=[],u=T(t.first,0),p=u,y=0;y<n.length;y++){var x=n[y],C=Jt(x.from,u,p),P=Jt(ji(x),u,p);if(u=x.to,p=P,l=="around"){var K=t.sel.ranges[y],ne=$(K.head,K.anchor)<0;s[y]=new Dt(ne?P:C,ne?C:P)}else s[y]=new Dt(C,C)}return new en(s,t.sel.primIndex)}function gl(t){t.doc.mode=Qr(t.options,t.doc.modeOption),wo(t)}function wo(t){t.doc.iter(function(n){n.stateAfter&&(n.stateAfter=null),n.styles&&(n.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,So(t,100),t.state.modeGen++,t.curOp&&qr(t)}function Gu(t,n){return n.from.ch==0&&n.to.ch==0&&et(n.text)==""&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function ml(t,n,l,s){function u(De){return l?l[De]:null}function p(De,Ne,We){hu(De,Ne,We,s),yr(De,"change",De,n)}function y(De,Ne){for(var We=[],Qe=De;Qe<Ne;++Qe)We.push(new ta(P[Qe],u(Qe),s));return We}var x=n.from,C=n.to,P=n.text,K=Ge(t,x.line),ne=Ge(t,C.line),ve=et(P),de=u(P.length-1),Ee=C.line-x.line;if(n.full)t.insert(0,y(0,P.length)),t.remove(P.length,t.size-P.length);else if(Gu(t,n)){var Ae=y(0,P.length-1);p(ne,ne.text,de),Ee&&t.remove(x.line,Ee),Ae.length&&t.insert(x.line,Ae)}else if(K==ne)if(P.length==1)p(K,K.text.slice(0,x.ch)+ve+K.text.slice(C.ch),de);else{var Ie=y(1,P.length-1);Ie.push(new ta(ve+K.text.slice(C.ch),de,s)),p(K,K.text.slice(0,x.ch)+P[0],u(0)),t.insert(x.line+1,Ie)}else if(P.length==1)p(K,K.text.slice(0,x.ch)+P[0]+ne.text.slice(C.ch),u(0)),t.remove(x.line+1,Ee);else{p(K,K.text.slice(0,x.ch)+P[0],u(0)),p(ne,ve+ne.text.slice(C.ch),de);var Le=y(1,P.length-1);Ee>1&&t.remove(x.line+1,Ee-1),t.insert(x.line+1,Le)}yr(t,"change",t,n)}function Wi(t,n,l){function s(u,p,y){if(u.linked)for(var x=0;x<u.linked.length;++x){var C=u.linked[x];if(C.doc!=p){var P=y&&C.sharedHist;l&&!P||(n(C.doc,P),s(C.doc,u,P))}}}s(t,null,!0)}function $u(t,n){if(n.cm)throw new Error("This document is already in use.");t.doc=n,n.cm=t,ol(t),gl(t),yl(t),t.options.direction=n.direction,t.options.lineWrapping||zs(t),t.options.mode=n.modeOption,qr(t)}function yl(t){(t.doc.direction=="rtl"?Ue:q)(t.display.lineDiv,"CodeMirror-rtl")}function Hc(t){ln(t,function(){yl(t),qr(t)})}function us(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function fs(t,n){var l={from:Fe(n.from),to:ji(n),text:yi(t,n.from,n.to)};return $n(t,l,n.from.line,n.to.line+1),Wi(t,function(s){return $n(s,l,n.from.line,n.to.line+1)},!0),l}function Ku(t){for(;t.length;){var n=et(t);if(n.ranges)t.pop();else break}}function Uc(t,n){if(n)return Ku(t.done),et(t.done);if(t.done.length&&!et(t.done).ranges)return et(t.done);if(t.done.length>1&&!t.done[t.done.length-2].ranges)return t.done.pop(),et(t.done)}function Yu(t,n,l,s){var u=t.history;u.undone.length=0;var p=+new Date,y,x;if((u.lastOp==s||u.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&u.lastModTime>p-(t.cm?t.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(y=Uc(u,u.lastOp==s)))x=et(y.changes),$(n.from,n.to)==0&&$(n.from,x.to)==0?x.to=ji(n):y.changes.push(fs(t,n));else{var C=et(u.done);for((!C||!C.ranges)&&ca(t.sel,u.done),y={changes:[fs(t,n)],generation:u.generation},u.done.push(y);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(l),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=p,u.lastOp=u.lastSelOp=s,u.lastOrigin=u.lastSelOrigin=n.origin,x||nt(t,"historyAdded")}function _c(t,n,l,s){var u=n.charAt(0);return u=="*"||u=="+"&&l.ranges.length==s.ranges.length&&l.somethingSelected()==s.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function zc(t,n,l,s){var u=t.history,p=s&&s.origin;l==u.lastSelOp||p&&u.lastSelOrigin==p&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==p||_c(t,p,et(u.done),n))?u.done[u.done.length-1]=n:ca(n,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=p,u.lastSelOp=l,s&&s.clearRedo!==!1&&Ku(u.undone)}function ca(t,n){var l=et(n);l&&l.ranges&&l.equals(t)||n.push(t)}function $n(t,n,l,s){var u=n["spans_"+t.id],p=0;t.iter(Math.max(t.first,l),Math.min(t.first+t.size,s),function(y){y.markedSpans&&((u||(u=n["spans_"+t.id]={}))[p]=y.markedSpans),++p})}function Xu(t){if(!t)return null;for(var n,l=0;l<t.length;++l)t[l].marker.explicitlyCleared?n||(n=t.slice(0,l)):n&&n.push(t[l]);return n?n.length?n:null:t}function Ju(t,n){var l=n["spans_"+t.id];if(!l)return null;for(var s=[],u=0;u<n.text.length;++u)s.push(Xu(l[u]));return s}function Qu(t,n){var l=Ju(t,n),s=_o(t,n);if(!l)return s;if(!s)return l;for(var u=0;u<l.length;++u){var p=l[u],y=s[u];if(p&&y)e:for(var x=0;x<y.length;++x){for(var C=y[x],P=0;P<p.length;++P)if(p[P].marker==C.marker)continue e;p.push(C)}else y&&(l[u]=y)}return l}function da(t,n,l){for(var s=[],u=0;u<t.length;++u){var p=t[u];if(p.ranges){s.push(l?en.prototype.deepCopy.call(p):p);continue}var y=p.changes,x=[];s.push({changes:x});for(var C=0;C<y.length;++C){var P=y[C],K=void 0;if(x.push({from:P.from,to:P.to,text:P.text}),n)for(var ne in P)(K=ne.match(/^spans_(\d+)$/))&&Re(n,Number(K[1]))>-1&&(et(x)[ne]=P[ne],delete P[ne])}}return s}function cs(t,n,l,s){if(s){var u=t.anchor;if(l){var p=$(n,u)<0;p!=$(l,u)<0?(u=n,n=l):p!=$(n,l)<0&&(n=l)}return new Dt(u,n)}else return new Dt(l||n,n)}function pa(t,n,l,s,u){u==null&&(u=t.cm&&(t.cm.display.shift||t.extend)),Sr(t,new en([cs(t.sel.primary(),n,l,u)],0),s)}function Zu(t,n,l){for(var s=[],u=t.cm&&(t.cm.display.shift||t.extend),p=0;p<t.sel.ranges.length;p++)s[p]=cs(t.sel.ranges[p],n[p],null,u);var y=Gn(t.cm,s,t.sel.primIndex);Sr(t,y,l)}function ds(t,n,l,s){var u=t.sel.ranges.slice(0);u[n]=l,Sr(t,Gn(t.cm,u,t.sel.primIndex),s)}function bl(t,n,l,s){Sr(t,Vi(n,l),s)}function qu(t,n,l){var s={ranges:n.ranges,update:function(u){this.ranges=[];for(var p=0;p<u.length;p++)this.ranges[p]=new Dt($e(t,u[p].anchor),$e(t,u[p].head))},origin:l&&l.origin};return nt(t,"beforeSelectionChange",t,s),t.cm&&nt(t.cm,"beforeSelectionChange",t.cm,s),s.ranges!=n.ranges?Gn(t.cm,s.ranges,s.ranges.length-1):n}function ef(t,n,l){var s=t.history.done,u=et(s);u&&u.ranges?(s[s.length-1]=n,xt(t,n,l)):Sr(t,n,l)}function Sr(t,n,l){xt(t,n,l),zc(t,t.sel,t.cm?t.cm.curOp.id:NaN,l)}function xt(t,n,l){(Qt(t,"beforeSelectionChange")||t.cm&&Qt(t.cm,"beforeSelectionChange"))&&(n=qu(t,n,l));var s=l&&l.bias||($(n.primary().head,t.sel.primary().head)<0?-1:1);At(t,mn(t,n,s,!0)),!(l&&l.scroll===!1)&&t.cm&&t.cm.getOption("readOnly")!="nocursor"&&_a(t.cm)}function At(t,n){n.equals(t.sel)||(t.sel=n,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,ct(t.cm)),yr(t,"cursorActivity",t))}function dt(t){At(t,mn(t,t.sel,null,!1))}function mn(t,n,l,s){for(var u,p=0;p<n.ranges.length;p++){var y=n.ranges[p],x=n.ranges.length==t.sel.ranges.length&&t.sel.ranges[p],C=ps(t,y.anchor,x&&x.anchor,l,s),P=y.head==y.anchor?C:ps(t,y.head,x&&x.head,l,s);(u||C!=y.anchor||P!=y.head)&&(u||(u=n.ranges.slice(0,p)),u[p]=new Dt(C,P))}return u?Gn(t.cm,u,n.primIndex):n}function Ya(t,n,l,s,u){var p=Ge(t,n.line);if(p.markedSpans)for(var y=0;y<p.markedSpans.length;++y){var x=p.markedSpans[y],C=x.marker,P="selectLeft"in C?!C.selectLeft:C.inclusiveLeft,K="selectRight"in C?!C.selectRight:C.inclusiveRight;if((x.from==null||(P?x.from<=n.ch:x.from<n.ch))&&(x.to==null||(K?x.to>=n.ch:x.to>n.ch))){if(u&&(nt(C,"beforeCursorEnter"),C.explicitlyCleared))if(p.markedSpans){--y;continue}else break;if(!C.atomic)continue;if(l){var ne=C.find(s<0?1:-1),ve=void 0;if((s<0?K:P)&&(ne=tf(t,ne,-s,ne&&ne.line==n.line?p:null)),ne&&ne.line==n.line&&(ve=$(ne,l))&&(s<0?ve<0:ve>0))return Ya(t,ne,n,s,u)}var de=C.find(s<0?-1:1);return(s<0?P:K)&&(de=tf(t,de,s,de.line==n.line?p:null)),de?Ya(t,de,n,s,u):null}}return n}function ps(t,n,l,s,u){var p=s||1,y=Ya(t,n,l,p,u)||!u&&Ya(t,n,l,p,!0)||Ya(t,n,l,-p,u)||!u&&Ya(t,n,l,-p,!0);return y||(t.cantEdit=!0,T(t.first,0))}function tf(t,n,l,s){return l<0&&n.ch==0?n.line>t.first?$e(t,T(n.line-1)):null:l>0&&n.ch==(s||Ge(t,n.line)).text.length?n.line<t.first+t.size-1?T(n.line+1,0):null:new T(n.line,n.ch+l)}function Hi(t){t.setSelection(T(t.firstLine(),0),T(t.lastLine()),_t)}function rf(t,n,l){var s={canceled:!1,from:n.from,to:n.to,text:n.text,origin:n.origin,cancel:function(){return s.canceled=!0}};return l&&(s.update=function(u,p,y,x){u&&(s.from=$e(t,u)),p&&(s.to=$e(t,p)),y&&(s.text=y),x!==void 0&&(s.origin=x)}),nt(t,"beforeChange",t,s),t.cm&&nt(t.cm,"beforeChange",t.cm,s),s.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:s.from,to:s.to,text:s.text,origin:s.origin}}function ha(t,n,l){if(t.cm){if(!t.cm.curOp)return br(t.cm,ha)(t,n,l);if(t.cm.state.suppressEdits)return}if(!((Qt(t,"beforeChange")||t.cm&&Qt(t.cm,"beforeChange"))&&(n=rf(t,n,!0),!n))){var s=ou&&!l&&Hs(t,n.from,n.to);if(s)for(var u=s.length-1;u>=0;--u)xl(t,{from:s[u].from,to:s[u].to,text:u?[""]:n.text,origin:n.origin});else xl(t,n)}}function xl(t,n){if(!(n.text.length==1&&n.text[0]==""&&$(n.from,n.to)==0)){var l=A(t,n);Yu(t,n,l,t.cm?t.cm.curOp.id:NaN),Co(t,n,l,_o(t,n));var s=[];Wi(t,function(u,p){!p&&Re(s,u.history)==-1&&(Sl(u.history,n),s.push(u.history)),Co(u,n,null,_o(u,n))})}}function hs(t,n,l){var s=t.cm&&t.cm.state.suppressEdits;if(!(s&&!l)){for(var u=t.history,p,y=t.sel,x=n=="undo"?u.done:u.undone,C=n=="undo"?u.undone:u.done,P=0;P<x.length&&(p=x[P],!(l?p.ranges&&!p.equals(t.sel):!p.ranges));P++);if(P!=x.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(p=x.pop(),p.ranges){if(ca(p,C),l&&!p.equals(t.sel)){Sr(t,p,{clearRedo:!1});return}y=p}else if(s){x.push(p);return}else break;var K=[];ca(y,C),C.push({changes:K,generation:u.generation}),u.generation=p.generation||++u.maxGeneration;for(var ne=Qt(t,"beforeChange")||t.cm&&Qt(t.cm,"beforeChange"),ve=function(Ae){var Ie=p.changes[Ae];if(Ie.origin=n,ne&&!rf(t,Ie,!1))return x.length=0,{};K.push(fs(t,Ie));var Le=Ae?A(t,Ie):et(x);Co(t,Ie,Le,Qu(t,Ie)),!Ae&&t.cm&&t.cm.scrollIntoView({from:Ie.from,to:ji(Ie)});var De=[];Wi(t,function(Ne,We){!We&&Re(De,Ne.history)==-1&&(Sl(Ne.history,Ie),De.push(Ne.history)),Co(Ne,Ie,null,Qu(Ne,Ie))})},de=p.changes.length-1;de>=0;--de){var Ee=ve(de);if(Ee)return Ee.v}}}}function vs(t,n){if(n!=0&&(t.first+=n,t.sel=new en(Et(t.sel.ranges,function(u){return new Dt(T(u.anchor.line+n,u.anchor.ch),T(u.head.line+n,u.head.ch))}),t.sel.primIndex),t.cm)){qr(t.cm,t.first,t.first-n,n);for(var l=t.cm.display,s=l.viewFrom;s<l.viewTo;s++)Ni(t.cm,s,"gutter")}}function Co(t,n,l,s){if(t.cm&&!t.cm.curOp)return br(t.cm,Co)(t,n,l,s);if(n.to.line<t.first){vs(t,n.text.length-1-(n.to.line-n.from.line));return}if(!(n.from.line>t.lastLine())){if(n.from.line<t.first){var u=n.text.length-1-(t.first-n.from.line);vs(t,u),n={from:T(t.first,0),to:T(n.to.line+u,n.to.ch),text:[et(n.text)],origin:n.origin}}var p=t.lastLine();n.to.line>p&&(n={from:n.from,to:T(p,Ge(t,p).text.length),text:[n.text[0]],origin:n.origin}),n.removed=yi(t,n.from,n.to),l||(l=A(t,n)),t.cm?nf(t.cm,n,s):ml(t,n,s),xt(t,l,_t),t.cantEdit&&ps(t,T(t.firstLine(),0))&&(t.cantEdit=!1)}}function nf(t,n,l){var s=t.doc,u=t.display,p=n.from,y=n.to,x=!1,C=p.line;t.options.lineWrapping||(C=It(_n(Ge(s,p.line))),s.iter(C,y.line+1,function(de){if(de==u.maxLine)return x=!0,!0})),s.sel.contains(n.from,n.to)>-1&&ct(t),ml(s,n,l,ku(t)),t.options.lineWrapping||(s.iter(C,p.line+n.text.length,function(de){var Ee=$o(de);Ee>u.maxLineLength&&(u.maxLine=de,u.maxLineLength=Ee,u.maxLineChanged=!0,x=!1)}),x&&(t.curOp.updateMaxLine=!0)),au(s,p.line),So(t,400);var P=n.text.length-(y.line-p.line)-1;n.full?qr(t):p.line==y.line&&n.text.length==1&&!Gu(t.doc,n)?Ni(t,p.line,"text"):qr(t,p.line,y.line+1,P);var K=Qt(t,"changes"),ne=Qt(t,"change");if(ne||K){var ve={from:p,to:y,text:n.text,removed:n.removed,origin:n.origin};ne&&yr(t,"change",t,ve),K&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(ve)}t.display.selForContextMenu=null}function Xa(t,n,l,s,u){var p;s||(s=l),$(s,l)<0&&(p=[s,l],l=p[0],s=p[1]),typeof n=="string"&&(n=t.splitLines(n)),ha(t,{from:l,to:s,text:n,origin:u})}function af(t,n,l,s){l<t.line?t.line+=s:n<t.line&&(t.line=n,t.ch=0)}function of(t,n,l,s){for(var u=0;u<t.length;++u){var p=t[u],y=!0;if(p.ranges){p.copied||(p=t[u]=p.deepCopy(),p.copied=!0);for(var x=0;x<p.ranges.length;x++)af(p.ranges[x].anchor,n,l,s),af(p.ranges[x].head,n,l,s);continue}for(var C=0;C<p.changes.length;++C){var P=p.changes[C];if(l<P.from.line)P.from=T(P.from.line+s,P.from.ch),P.to=T(P.to.line+s,P.to.ch);else if(n<=P.to.line){y=!1;break}}y||(t.splice(0,u+1),u=0)}}function Sl(t,n){var l=n.from.line,s=n.to.line,u=n.text.length-(s-l)-1;of(t.done,l,s,u),of(t.undone,l,s,u)}function Ao(t,n,l,s){var u=n,p=n;return typeof n=="number"?p=Ge(t,Lt(t,n)):u=It(n),u==null?null:(s(p,u)&&t.cm&&Ni(t.cm,u,l),p)}function va(t){this.lines=t,this.parent=null;for(var n=0,l=0;l<t.length;++l)t[l].parent=this,n+=t[l].height;this.height=n}va.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,n){for(var l=t,s=t+n;l<s;++l){var u=this.lines[l];this.height-=u.height,vu(u),yr(u,"delete")}this.lines.splice(t,n)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,n,l){this.height+=l,this.lines=this.lines.slice(0,t).concat(n).concat(this.lines.slice(t));for(var s=0;s<n.length;++s)n[s].parent=this},iterN:function(t,n,l){for(var s=t+n;t<s;++t)if(l(this.lines[t]))return!0}};function Ja(t){this.children=t;for(var n=0,l=0,s=0;s<t.length;++s){var u=t[s];n+=u.chunkSize(),l+=u.height,u.parent=this}this.size=n,this.height=l,this.parent=null}Ja.prototype={chunkSize:function(){return this.size},removeInner:function(t,n){this.size-=n;for(var l=0;l<this.children.length;++l){var s=this.children[l],u=s.chunkSize();if(t<u){var p=Math.min(n,u-t),y=s.height;if(s.removeInner(t,p),this.height-=y-s.height,u==p&&(this.children.splice(l--,1),s.parent=null),(n-=p)==0)break;t=0}else t-=u}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof va))){var x=[];this.collapse(x),this.children=[new va(x)],this.children[0].parent=this}},collapse:function(t){for(var n=0;n<this.children.length;++n)this.children[n].collapse(t)},insertInner:function(t,n,l){this.size+=n.length,this.height+=l;for(var s=0;s<this.children.length;++s){var u=this.children[s],p=u.chunkSize();if(t<=p){if(u.insertInner(t,n,l),u.lines&&u.lines.length>50){for(var y=u.lines.length%25+25,x=y;x<u.lines.length;){var C=new va(u.lines.slice(x,x+=25));u.height-=C.height,this.children.splice(++s,0,C),C.parent=this}u.lines=u.lines.slice(0,y),this.maybeSpill()}break}t-=p}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var n=t.children.splice(t.children.length-5,5),l=new Ja(n);if(t.parent){t.size-=l.size,t.height-=l.height;var u=Re(t.parent.children,t);t.parent.children.splice(u+1,0,l)}else{var s=new Ja(t.children);s.parent=t,t.children=[s,l],t=s}l.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,n,l){for(var s=0;s<this.children.length;++s){var u=this.children[s],p=u.chunkSize();if(t<p){var y=Math.min(n,p-t);if(u.iterN(t,y,l))return!0;if((n-=y)==0)break;t=0}else t-=p}}};var Oo=function(t,n,l){if(l)for(var s in l)l.hasOwnProperty(s)&&(this[s]=l[s]);this.doc=t,this.node=n};Oo.prototype.clear=function(){var t=this.doc.cm,n=this.line.widgets,l=this.line,s=It(l);if(!(s==null||!n)){for(var u=0;u<n.length;++u)n[u]==this&&n.splice(u--,1);n.length||(l.widgets=null);var p=Ci(this);On(l,Math.max(0,l.height-p)),t&&(ln(t,function(){sf(t,l,-p),Ni(t,s,"widget")}),yr(t,"lineWidgetCleared",t,this,s))}},Oo.prototype.changed=function(){var t=this,n=this.height,l=this.doc.cm,s=this.line;this.height=null;var u=Ci(this)-n;u&&(Si(this.doc,s)||On(s,s.height+u),l&&ln(l,function(){l.curOp.forceUpdate=!0,sf(l,s,u),yr(l,"lineWidgetChanged",l,t,It(s))}))},Gr(Oo);function sf(t,n,l){wi(n)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&cl(t,l)}function Gc(t,n,l,s){var u=new Oo(t,l,s),p=t.cm;return p&&u.noHScroll&&(p.display.alignWidgets=!0),Ao(t,n,"widget",function(y){var x=y.widgets||(y.widgets=[]);if(u.insertAt==null?x.push(u):x.splice(Math.min(x.length,Math.max(0,u.insertAt)),0,u),u.line=y,p&&!Si(t,y)){var C=wi(y)<t.scrollTop;On(y,y.height+Ci(u)),C&&cl(p,u.height),p.curOp.forceUpdate=!0}return!0}),p&&yr(p,"lineWidgetAdded",p,u,typeof n=="number"?n:It(n)),u}var lf=0,fi=function(t,n){this.lines=[],this.type=n,this.doc=t,this.id=++lf};fi.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&ua(t),Qt(this,"clear")){var l=this.find();l&&yr(this,"clear",l.from,l.to)}for(var s=null,u=null,p=0;p<this.lines.length;++p){var y=this.lines[p],x=La(y.markedSpans,this);t&&!this.collapsed?Ni(t,It(y),"text"):t&&(x.to!=null&&(u=It(y)),x.from!=null&&(s=It(y))),y.markedSpans=Ze(y.markedSpans,x),x.from==null&&this.collapsed&&!Si(this.doc,y)&&t&&On(y,Va(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var C=0;C<this.lines.length;++C){var P=_n(this.lines[C]),K=$o(P);K>t.display.maxLineLength&&(t.display.maxLine=P,t.display.maxLineLength=K,t.display.maxLineChanged=!0)}s!=null&&t&&this.collapsed&&qr(t,s,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&dt(t.doc)),t&&yr(t,"markerCleared",t,this,s,u),n&&fa(t),this.parent&&this.parent.clear()}},fi.prototype.find=function(t,n){t==null&&this.type=="bookmark"&&(t=1);for(var l,s,u=0;u<this.lines.length;++u){var p=this.lines[u],y=La(p.markedSpans,this);if(y.from!=null&&(l=T(n?p:It(p),y.from),t==-1))return l;if(y.to!=null&&(s=T(n?p:It(p),y.to),t==1))return s}return l&&{from:l,to:s}},fi.prototype.changed=function(){var t=this,n=this.find(-1,!0),l=this,s=this.doc.cm;!n||!s||ln(s,function(){var u=n.line,p=It(n.line),y=Qo(s,p);if(y&&(Qs(y),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!Si(l.doc,u)&&l.height!=null){var x=l.height;l.height=null;var C=Ci(l)-x;C&&On(u,u.height+C)}yr(s,"markerChanged",s,t)})},fi.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(!n.maybeHiddenMarkers||Re(n.maybeHiddenMarkers,this)==-1)&&(n.maybeUnhiddenMarkers||(n.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},fi.prototype.detachLine=function(t){if(this.lines.splice(Re(this.lines,t),1),!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(n.maybeHiddenMarkers||(n.maybeHiddenMarkers=[])).push(this)}},Gr(fi);function ga(t,n,l,s,u){if(s&&s.shared)return $c(t,n,l,s,u);if(t.cm&&!t.cm.curOp)return br(t.cm,ga)(t,n,l,s,u);var p=new fi(t,u),y=$(n,l);if(s&&Rt(s,p,!1),y>0||y==0&&p.clearWhenEmpty!==!1)return p;if(p.replacedWith&&(p.collapsed=!0,p.widgetNode=ye("span",[p.replacedWith],"CodeMirror-widget"),s.handleMouseEvents||p.widgetNode.setAttribute("cm-ignore-events","true"),s.insertLeft&&(p.widgetNode.insertLeft=!0)),p.collapsed){if(du(t,n.line,n,l,p)||n.line!=l.line&&du(t,l.line,n,l,p))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ia()}p.addToHistory&&Yu(t,{from:n,to:l,origin:"markText"},t.sel,NaN);var x=n.line,C=t.cm,P;if(t.iter(x,l.line+1,function(ne){C&&p.collapsed&&!C.options.lineWrapping&&_n(ne)==C.display.maxLine&&(P=!0),p.collapsed&&x!=n.line&&On(ne,0),Uo(ne,new Ho(p,x==n.line?n.ch:null,x==l.line?l.ch:null),t.cm&&t.cm.curOp),++x}),p.collapsed&&t.iter(n.line,l.line+1,function(ne){Si(t,ne)&&On(ne,0)}),p.clearOnEnter&&se(p,"beforeCursorEnter",function(){return p.clear()}),p.readOnly&&(su(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),p.collapsed&&(p.id=++lf,p.atomic=!0),C){if(P&&(C.curOp.updateMaxLine=!0),p.collapsed)qr(C,n.line,l.line+1);else if(p.className||p.startStyle||p.endStyle||p.css||p.attributes||p.title)for(var K=n.line;K<=l.line;K++)Ni(C,K,"text");p.atomic&&dt(C.doc),yr(C,"markerAdded",C,p)}return p}var ma=function(t,n){this.markers=t,this.primary=n;for(var l=0;l<t.length;++l)t[l].parent=this};ma.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();yr(this,"clear")}},ma.prototype.find=function(t,n){return this.primary.find(t,n)},Gr(ma);function $c(t,n,l,s,u){s=Rt(s),s.shared=!1;var p=[ga(t,n,l,s,u)],y=p[0],x=s.widgetNode;return Wi(t,function(C){x&&(s.widgetNode=x.cloneNode(!0)),p.push(ga(C,$e(C,n),$e(C,l),s,u));for(var P=0;P<C.linked.length;++P)if(C.linked[P].isParent)return;y=et(p)}),new ma(p,y)}function ir(t){return t.findMarks(T(t.first,0),t.clipPos(T(t.lastLine())),function(n){return n.parent})}function uf(t,n){for(var l=0;l<n.length;l++){var s=n[l],u=s.find(),p=t.clipPos(u.from),y=t.clipPos(u.to);if($(p,y)){var x=ga(t,p,y,s.primary,s.primary.type);s.markers.push(x),x.parent=s}}}function ot(t){for(var n=function(s){var u=t[s],p=[u.primary.doc];Wi(u.primary.doc,function(C){return p.push(C)});for(var y=0;y<u.markers.length;y++){var x=u.markers[y];Re(p,x.doc)==-1&&(x.parent=null,u.markers.splice(y--,1))}},l=0;l<t.length;l++)n(l)}var Kc=0,Pr=function(t,n,l,s,u){if(!(this instanceof Pr))return new Pr(t,n,l,s,u);l==null&&(l=0),Ja.call(this,[new va([new ta("",null)])]),this.first=l,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=l;var p=T(l,0);this.sel=Vi(p),this.history=new us(null),this.id=++Kc,this.modeOption=n,this.lineSep=s,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof t=="string"&&(t=this.splitLines(t)),ml(this,{from:p,to:p,text:t}),Sr(this,Vi(p),_t)};Pr.prototype=zt(Ja.prototype,{constructor:Pr,iter:function(t,n,l){l?this.iterN(t-this.first,n-t,l):this.iterN(this.first,this.first+this.size,t)},insert:function(t,n){for(var l=0,s=0;s<n.length;++s)l+=n[s].height;this.insertInner(t-this.first,n,l)},remove:function(t,n){this.removeInner(t-this.first,n)},getValue:function(t){var n=Qi(this,this.first,this.first+this.size);return t===!1?n:n.join(t||this.lineSeparator())},setValue:xr(function(t){var n=T(this.first,0),l=this.first+this.size-1;ha(this,{from:n,to:T(l,Ge(this,l).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&sa(this.cm,0,0),Sr(this,Vi(n),_t)}),replaceRange:function(t,n,l,s){n=$e(this,n),l=l?$e(this,l):n,Xa(this,t,n,l,s)},getRange:function(t,n,l){var s=yi(this,$e(this,t),$e(this,n));return l===!1?s:l===""?s.join(""):s.join(l||this.lineSeparator())},getLine:function(t){var n=this.getLineHandle(t);return n&&n.text},getLineHandle:function(t){if(Zi(this,t))return Ge(this,t)},getLineNumber:function(t){return It(t)},getLineHandleVisualStart:function(t){return typeof t=="number"&&(t=Ge(this,t)),_n(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return $e(this,t)},getCursor:function(t){var n=this.sel.primary(),l;return t==null||t=="head"?l=n.head:t=="anchor"?l=n.anchor:t=="end"||t=="to"||t===!1?l=n.to():l=n.from(),l},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:xr(function(t,n,l){bl(this,$e(this,typeof t=="number"?T(t,n||0):t),null,l)}),setSelection:xr(function(t,n,l){bl(this,$e(this,t),$e(this,n||t),l)}),extendSelection:xr(function(t,n,l){pa(this,$e(this,t),n&&$e(this,n),l)}),extendSelections:xr(function(t,n){Zu(this,co(this,t),n)}),extendSelectionsBy:xr(function(t,n){var l=Et(this.sel.ranges,t);Zu(this,co(this,l),n)}),setSelections:xr(function(t,n,l){if(t.length){for(var s=[],u=0;u<t.length;u++)s[u]=new Dt($e(this,t[u].anchor),$e(this,t[u].head||t[u].anchor));n==null&&(n=Math.min(t.length-1,this.sel.primIndex)),Sr(this,Gn(this.cm,s,n),l)}}),addSelection:xr(function(t,n,l){var s=this.sel.ranges.slice(0);s.push(new Dt($e(this,t),$e(this,n||t))),Sr(this,Gn(this.cm,s,s.length-1),l)}),getSelection:function(t){for(var n=this.sel.ranges,l,s=0;s<n.length;s++){var u=yi(this,n[s].from(),n[s].to());l=l?l.concat(u):u}return t===!1?l:l.join(t||this.lineSeparator())},getSelections:function(t){for(var n=[],l=this.sel.ranges,s=0;s<l.length;s++){var u=yi(this,l[s].from(),l[s].to());t!==!1&&(u=u.join(t||this.lineSeparator())),n[s]=u}return n},replaceSelection:function(t,n,l){for(var s=[],u=0;u<this.sel.ranges.length;u++)s[u]=t;this.replaceSelections(s,n,l||"+input")},replaceSelections:xr(function(t,n,l){for(var s=[],u=this.sel,p=0;p<u.ranges.length;p++){var y=u.ranges[p];s[p]={from:y.from(),to:y.to(),text:this.splitLines(t[p]),origin:l}}for(var x=n&&n!="end"&&ui(this,s,n),C=s.length-1;C>=0;C--)ha(this,s[C]);x?ef(this,x):this.cm&&_a(this.cm)}),undo:xr(function(){hs(this,"undo")}),redo:xr(function(){hs(this,"redo")}),undoSelection:xr(function(){hs(this,"undo",!0)}),redoSelection:xr(function(){hs(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,n=0,l=0,s=0;s<t.done.length;s++)t.done[s].ranges||++n;for(var u=0;u<t.undone.length;u++)t.undone[u].ranges||++l;return{undo:n,redo:l}},clearHistory:function(){var t=this;this.history=new us(this.history),Wi(this,function(n){return n.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:da(this.history.done),undone:da(this.history.undone)}},setHistory:function(t){var n=this.history=new us(this.history);n.done=da(t.done.slice(0),null,!0),n.undone=da(t.undone.slice(0),null,!0)},setGutterMarker:xr(function(t,n,l){return Ao(this,t,"gutter",function(s){var u=s.gutterMarkers||(s.gutterMarkers={});return u[n]=l,!l&&Cn(u)&&(s.gutterMarkers=null),!0})}),clearGutter:xr(function(t){var n=this;this.iter(function(l){l.gutterMarkers&&l.gutterMarkers[t]&&Ao(n,l,"gutter",function(){return l.gutterMarkers[t]=null,Cn(l.gutterMarkers)&&(l.gutterMarkers=null),!0})})}),lineInfo:function(t){var n;if(typeof t=="number"){if(!Zi(this,t)||(n=t,t=Ge(this,t),!t))return null}else if(n=It(t),n==null)return null;return{line:n,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:xr(function(t,n,l){return Ao(this,t,n=="gutter"?"gutter":"class",function(s){var u=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass";if(!s[u])s[u]=l;else{if(z(l).test(s[u]))return!1;s[u]+=" "+l}return!0})}),removeLineClass:xr(function(t,n,l){return Ao(this,t,n=="gutter"?"gutter":"class",function(s){var u=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass",p=s[u];if(p)if(l==null)s[u]=null;else{var y=p.match(z(l));if(!y)return!1;var x=y.index+y[0].length;s[u]=p.slice(0,y.index)+(!y.index||x==p.length?"":" ")+p.slice(x)||null}else return!1;return!0})}),addLineWidget:xr(function(t,n,l){return Gc(this,t,n,l)}),removeLineWidget:function(t){t.clear()},markText:function(t,n,l){return ga(this,$e(this,t),$e(this,n),l,l&&l.type||"range")},setBookmark:function(t,n){var l={replacedWith:n&&(n.nodeType==null?n.widget:n),insertLeft:n&&n.insertLeft,clearWhenEmpty:!1,shared:n&&n.shared,handleMouseEvents:n&&n.handleMouseEvents};return t=$e(this,t),ga(this,t,t,l,"bookmark")},findMarksAt:function(t){t=$e(this,t);var n=[],l=Ge(this,t.line).markedSpans;if(l)for(var s=0;s<l.length;++s){var u=l[s];(u.from==null||u.from<=t.ch)&&(u.to==null||u.to>=t.ch)&&n.push(u.marker.parent||u.marker)}return n},findMarks:function(t,n,l){t=$e(this,t),n=$e(this,n);var s=[],u=t.line;return this.iter(t.line,n.line+1,function(p){var y=p.markedSpans;if(y)for(var x=0;x<y.length;x++){var C=y[x];!(C.to!=null&&u==t.line&&t.ch>=C.to||C.from==null&&u!=t.line||C.from!=null&&u==n.line&&C.from>=n.ch)&&(!l||l(C.marker))&&s.push(C.marker.parent||C.marker)}++u}),s},getAllMarks:function(){var t=[];return this.iter(function(n){var l=n.markedSpans;if(l)for(var s=0;s<l.length;++s)l[s].from!=null&&t.push(l[s].marker)}),t},posFromIndex:function(t){var n,l=this.first,s=this.lineSeparator().length;return this.iter(function(u){var p=u.text.length+s;if(p>t)return n=t,!0;t-=p,++l}),$e(this,T(l,n))},indexFromPos:function(t){t=$e(this,t);var n=t.ch;if(t.line<this.first||t.ch<0)return 0;var l=this.lineSeparator().length;return this.iter(this.first,t.line,function(s){n+=s.text.length+l}),n},copy:function(t){var n=new Pr(Qi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return n.scrollTop=this.scrollTop,n.scrollLeft=this.scrollLeft,n.sel=this.sel,n.extend=!1,t&&(n.history.undoDepth=this.history.undoDepth,n.setHistory(this.getHistory())),n},linkedDoc:function(t){t||(t={});var n=this.first,l=this.first+this.size;t.from!=null&&t.from>n&&(n=t.from),t.to!=null&&t.to<l&&(l=t.to);var s=new Pr(Qi(this,n,l),t.mode||this.modeOption,n,this.lineSep,this.direction);return t.sharedHist&&(s.history=this.history),(this.linked||(this.linked=[])).push({doc:s,sharedHist:t.sharedHist}),s.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],uf(s,ir(this)),s},unlinkDoc:function(t){if(t instanceof Zt&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var l=this.linked[n];if(l.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),ot(ir(this));break}}if(t.history==this.history){var s=[t.id];Wi(t,function(u){return s.push(u.id)},!0),t.history=new us(null),t.history.done=da(this.history.done,s),t.history.undone=da(this.history.undone,s)}},iterLinkedDocs:function(t){Wi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Wn(t)},lineSeparator:function(){return this.lineSep||`
|
|
23
|
+
`},setDirection:xr(function(t){t!="rtl"&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(n){return n.order=null}),this.cm&&Hc(this.cm))})}),Pr.prototype.eachLine=Pr.prototype.iter;var gs=0;function Yc(t){var n=this;if(ff(n),!(ht(n,t)||Ai(n.display,t))){Ft(t),D&&(gs=+new Date);var l=aa(n,t,!0),s=t.dataTransfer.files;if(!(!l||n.isReadOnly()))if(s&&s.length&&window.FileReader&&window.File)for(var u=s.length,p=Array(u),y=0,x=function(){++y==u&&br(n,function(){l=$e(n.doc,l);var de={from:l,to:l,text:n.doc.splitLines(p.filter(function(Ee){return Ee!=null}).join(n.doc.lineSeparator())),origin:"paste"};ha(n.doc,de),ef(n.doc,Vi($e(n.doc,l),$e(n.doc,ji(de))))})()},C=function(de,Ee){if(n.options.allowDropFileTypes&&Re(n.options.allowDropFileTypes,de.type)==-1){x();return}var Ae=new FileReader;Ae.onerror=function(){return x()},Ae.onload=function(){var Ie=Ae.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ie)){x();return}p[Ee]=Ie,x()},Ae.readAsText(de)},P=0;P<s.length;P++)C(s[P],P);else{if(n.state.draggingText&&n.doc.sel.contains(l)>-1){n.state.draggingText(t),setTimeout(function(){return n.display.input.focus()},20);return}try{var K=t.dataTransfer.getData("Text");if(K){var ne;if(n.state.draggingText&&!n.state.draggingText.copy&&(ne=n.listSelections()),xt(n.doc,Vi(l,l)),ne)for(var ve=0;ve<ne.length;++ve)Xa(n.doc,"",ne[ve].anchor,ne[ve].head,"drag");n.replaceSelection(K,"around","paste"),n.display.input.focus()}}catch{}}}}function Xc(t,n){if(D&&(!t.state.draggingText||+new Date-gs<100)){Nr(n);return}if(!(ht(t,n)||Ai(t.display,n))&&(n.dataTransfer.setData("Text",t.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!fe)){var l=Q("img",null,null,"position: fixed; left: 0; top: 0;");l.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",oe&&(l.width=l.height=1,t.display.wrapper.appendChild(l),l._top=l.offsetTop),n.dataTransfer.setDragImage(l,0,0),oe&&l.parentNode.removeChild(l)}}function sr(t,n){var l=aa(t,n);if(l){var s=document.createDocumentFragment();es(t,l,s),t.display.dragCursor||(t.display.dragCursor=Q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),xe(t.display.dragCursor,s)}}function ff(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function cf(t){if(document.getElementsByClassName){for(var n=document.getElementsByClassName("CodeMirror"),l=[],s=0;s<n.length;s++){var u=n[s].CodeMirror;u&&l.push(u)}l.length&&l[0].operation(function(){for(var p=0;p<l.length;p++)t(l[p])})}}var df=!1;function ar(){df||(Fr(),df=!0)}function Fr(){var t;se(window,"resize",function(){t==null&&(t=setTimeout(function(){t=null,cf(Jc)},100))}),se(window,"blur",function(){return cf(Ha)})}function Jc(t){var n=t.display;n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.scrollbarsClipped=!1,t.setSize()}for(var Ui={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Eo=0;Eo<10;Eo++)Ui[Eo+48]=Ui[Eo+96]=String(Eo);for(var ms=65;ms<=90;ms++)Ui[ms]=String.fromCharCode(ms);for(var ya=1;ya<=12;ya++)Ui[ya+111]=Ui[ya+63235]="F"+ya;var Kn={};Kn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Kn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Kn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Kn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Kn.default=M?Kn.macDefault:Kn.pcDefault;function Qc(t){var n=t.split(/-(?!$)/);t=n[n.length-1];for(var l,s,u,p,y=0;y<n.length-1;y++){var x=n[y];if(/^(cmd|meta|m)$/i.test(x))p=!0;else if(/^a(lt)?$/i.test(x))l=!0;else if(/^(c|ctrl|control)$/i.test(x))s=!0;else if(/^s(hift)?$/i.test(x))u=!0;else throw new Error("Unrecognized modifier name: "+x)}return l&&(t="Alt-"+t),s&&(t="Ctrl-"+t),p&&(t="Cmd-"+t),u&&(t="Shift-"+t),t}function Zc(t){var n={};for(var l in t)if(t.hasOwnProperty(l)){var s=t[l];if(/^(name|fallthrough|(de|at)tach)$/.test(l))continue;if(s=="..."){delete t[l];continue}for(var u=Et(l.split(" "),Qc),p=0;p<u.length;p++){var y=void 0,x=void 0;p==u.length-1?(x=u.join(" "),y=s):(x=u.slice(0,p+1).join(" "),y="...");var C=n[x];if(!C)n[x]=y;else if(C!=y)throw new Error("Inconsistent bindings for "+x)}delete t[l]}for(var P in n)t[P]=n[P];return t}function Qa(t,n,l,s){n=ba(n);var u=n.call?n.call(t,s):n[t];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&l(u))return"handled";if(n.fallthrough){if(Object.prototype.toString.call(n.fallthrough)!="[object Array]")return Qa(t,n.fallthrough,l,s);for(var p=0;p<n.fallthrough.length;p++){var y=Qa(t,n.fallthrough[p],l,s);if(y)return y}}}function pf(t){var n=typeof t=="string"?t:Ui[t.keyCode];return n=="Ctrl"||n=="Alt"||n=="Shift"||n=="Mod"}function Yn(t,n,l){var s=t;return n.altKey&&s!="Alt"&&(t="Alt-"+t),(H?n.metaKey:n.ctrlKey)&&s!="Ctrl"&&(t="Ctrl-"+t),(H?n.ctrlKey:n.metaKey)&&s!="Mod"&&(t="Cmd-"+t),!l&&n.shiftKey&&s!="Shift"&&(t="Shift-"+t),t}function _i(t,n){if(oe&&t.keyCode==34&&t.char)return!1;var l=Ui[t.keyCode];return l==null||t.altGraphKey?!1:(t.keyCode==3&&t.code&&(l=t.code),Yn(l,t,n))}function ba(t){return typeof t=="string"?Kn[t]:t}function Ei(t,n){for(var l=t.doc.sel.ranges,s=[],u=0;u<l.length;u++){for(var p=n(l[u]);s.length&&$(p.from,et(s).to)<=0;){var y=s.pop();if($(y.from,p.from)<0){p.from=y.from;break}}s.push(p)}ln(t,function(){for(var x=s.length-1;x>=0;x--)Xa(t.doc,"",s[x].from,s[x].to,"+delete");_a(t)})}function ys(t,n,l){var s=an(t.text,n+l,l);return s<0||s>t.text.length?null:s}function wl(t,n,l){var s=ys(t,n.ch,l);return s==null?null:new T(n.line,s,l<0?"after":"before")}function Cl(t,n,l,s,u){if(t){n.doc.direction=="rtl"&&(u=-u);var p=tt(l,n.doc.direction);if(p){var y=u<0?et(p):p[0],x=u<0==(y.level==1),C=x?"after":"before",P;if(y.level>0||n.doc.direction=="rtl"){var K=na(n,l);P=u<0?l.text.length-1:0;var ne=Tn(n,K,P).top;P=Mr(function(ve){return Tn(n,K,ve).top==ne},u<0==(y.level==1)?y.from:y.to-1,P),C=="before"&&(P=ys(l,P,1))}else P=u<0?y.to:y.from;return new T(s,P,C)}}return new T(s,u<0?l.text.length:0,u<0?"before":"after")}function hf(t,n,l,s){var u=tt(n,t.doc.direction);if(!u)return wl(n,l,s);l.ch>=n.text.length?(l.ch=n.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var p=St(u,l.ch,l.sticky),y=u[p];if(t.doc.direction=="ltr"&&y.level%2==0&&(s>0?y.to>l.ch:y.from<l.ch))return wl(n,l,s);var x=function(Le,De){return ys(n,Le instanceof T?Le.ch:Le,De)},C,P=function(Le){return t.options.lineWrapping?(C=C||na(t,n),Tu(t,n,C,Le)):{begin:0,end:n.text.length}},K=P(l.sticky=="before"?x(l,-1):l.ch);if(t.doc.direction=="rtl"||y.level==1){var ne=y.level==1==s<0,ve=x(l,ne?1:-1);if(ve!=null&&(ne?ve<=y.to&&ve<=K.end:ve>=y.from&&ve>=K.begin)){var de=ne?"before":"after";return new T(l.line,ve,de)}}var Ee=function(Le,De,Ne){for(var We=function($t,wr){return wr?new T(l.line,x($t,1),"before"):new T(l.line,$t,"after")};Le>=0&&Le<u.length;Le+=De){var Qe=u[Le],Ke=De>0==(Qe.level!=1),bt=Ke?Ne.begin:x(Ne.end,-1);if(Qe.from<=bt&&bt<Qe.to||(bt=Ke?Qe.from:x(Qe.to,-1),Ne.begin<=bt&&bt<Ne.end))return We(bt,Ke)}},Ae=Ee(p+s,s,K);if(Ae)return Ae;var Ie=s>0?K.end:x(K.begin,-1);return Ie!=null&&!(s>0&&Ie==n.text.length)&&(Ae=Ee(s>0?0:u.length-1,s,P(Ie)),Ae)?Ae:null}var Za={selectAll:Hi,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),_t)},killLine:function(t){return Ei(t,function(n){if(n.empty()){var l=Ge(t.doc,n.head.line).text.length;return n.head.ch==l&&n.head.line<t.lastLine()?{from:n.head,to:T(n.head.line+1,0)}:{from:n.head,to:T(n.head.line,l)}}else return{from:n.from(),to:n.to()}})},deleteLine:function(t){return Ei(t,function(n){return{from:T(n.from().line,0),to:$e(t.doc,T(n.to().line+1,0))}})},delLineLeft:function(t){return Ei(t,function(n){return{from:T(n.from().line,0),to:n.from()}})},delWrappedLineLeft:function(t){return Ei(t,function(n){var l=t.charCoords(n.head,"div").top+5,s=t.coordsChar({left:0,top:l},"div");return{from:s,to:n.from()}})},delWrappedLineRight:function(t){return Ei(t,function(n){var l=t.charCoords(n.head,"div").top+5,s=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:l},"div");return{from:n.from(),to:s}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(T(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(T(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(n){return vf(t,n.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(n){return bs(t,n.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(n){return qc(t,n.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:l},"div")},Pt)},goLineLeft:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5;return t.coordsChar({left:0,top:l},"div")},Pt)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(n){var l=t.cursorCoords(n.head,"div").top+5,s=t.coordsChar({left:0,top:l},"div");return s.ch<t.getLine(s.line).search(/\S/)?bs(t,n.head):s},Pt)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection(" ")},insertSoftTab:function(t){for(var n=[],l=t.listSelections(),s=t.options.tabSize,u=0;u<l.length;u++){var p=l[u].from(),y=st(t.getLine(p.line),p.ch,s);n.push(kr(s-y%s))}t.replaceSelections(n)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return ln(t,function(){for(var n=t.listSelections(),l=[],s=0;s<n.length;s++)if(n[s].empty()){var u=n[s].head,p=Ge(t.doc,u.line).text;if(p){if(u.ch==p.length&&(u=new T(u.line,u.ch-1)),u.ch>0)u=new T(u.line,u.ch+1),t.replaceRange(p.charAt(u.ch-1)+p.charAt(u.ch-2),T(u.line,u.ch-2),u,"+transpose");else if(u.line>t.doc.first){var y=Ge(t.doc,u.line-1).text;y&&(u=new T(u.line,1),t.replaceRange(p.charAt(0)+t.doc.lineSeparator()+y.charAt(y.length-1),T(u.line-1,y.length-1),u,"+transpose"))}}l.push(new Dt(u,u))}t.setSelections(l)})},newlineAndIndent:function(t){return ln(t,function(){for(var n=t.listSelections(),l=n.length-1;l>=0;l--)t.replaceRange(t.doc.lineSeparator(),n[l].anchor,n[l].head,"+input");n=t.listSelections();for(var s=0;s<n.length;s++)t.indentLine(n[s].from().line,null,!0);_a(t)})},openLine:function(t){return t.replaceSelection(`
|
|
24
|
+
`,"start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function vf(t,n){var l=Ge(t.doc,n),s=_n(l);return s!=l&&(n=It(s)),Cl(!0,t,s,n,1)}function qc(t,n){var l=Ge(t.doc,n),s=ic(l);return s!=l&&(n=It(s)),Cl(!0,t,l,n,-1)}function bs(t,n){var l=vf(t,n.line),s=Ge(t.doc,l.line),u=tt(s,t.doc.direction);if(!u||u[0].level==0){var p=Math.max(l.ch,s.text.search(/\S/)),y=n.line==l.line&&n.ch<=p&&n.ch;return T(l.line,y?0:p,l.sticky)}return l}function Je(t,n,l){if(typeof n=="string"&&(n=Za[n],!n))return!1;t.display.input.ensurePolled();var s=t.display.shift,u=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),l&&(t.display.shift=!1),u=n(t)!=lt}finally{t.display.shift=s,t.state.suppressEdits=!1}return u}function xs(t,n,l){for(var s=0;s<t.state.keyMaps.length;s++){var u=Qa(n,t.state.keyMaps[s],l,t);if(u)return u}return t.options.extraKeys&&Qa(n,t.options.extraKeys,l,t)||Qa(n,t.options.keyMap,l,t)}var yn=new He;function Ti(t,n,l,s){var u=t.state.keySeq;if(u){if(pf(n))return"handled";if(/\'$/.test(n)?t.state.keySeq=null:yn.set(50,function(){t.state.keySeq==u&&(t.state.keySeq=null,t.display.input.reset())}),qa(t,u+" "+n,l,s))return!0}return qa(t,n,l,s)}function qa(t,n,l,s){var u=xs(t,n,s);return u=="multi"&&(t.state.keySeq=n),u=="handled"&&yr(t,"keyHandled",t,n,l),(u=="handled"||u=="multi")&&(Ft(l),Di(t)),!!u}function Al(t,n){var l=_i(n,!0);return l?n.shiftKey&&!t.state.keySeq?Ti(t,"Shift-"+l,n,function(s){return Je(t,s,!0)})||Ti(t,l,n,function(s){if(typeof s=="string"?/^go[A-Z]/.test(s):s.motion)return Je(t,s)}):Ti(t,l,n,function(s){return Je(t,s)}):!1}function gf(t,n,l){return Ti(t,"'"+l+"'",n,function(s){return Je(t,s,!0)})}var Ss=null;function ws(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField())&&(n.curOp.focus=ze(ut(n)),!ht(n,t))){D&&j<11&&t.keyCode==27&&(t.returnValue=!1);var l=t.keyCode;n.display.shift=l==16||t.shiftKey;var s=Al(n,t);oe&&(Ss=s?l:null,!s&&l==88&&!Ta&&(M?t.metaKey:t.ctrlKey)&&n.replaceSelection("",null,"cut")),m&&!M&&!s&&l==46&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),l==18&&!/\bCodeMirror-crosshair\b/.test(n.display.lineDiv.className)&&mf(n)}}function mf(t){var n=t.display.lineDiv;Ue(n,"CodeMirror-crosshair");function l(s){(s.keyCode==18||!s.altKey)&&(q(n,"CodeMirror-crosshair"),Ve(document,"keyup",l),Ve(document,"mouseover",l))}se(document,"keyup",l),se(document,"mouseover",l)}function Ol(t){t.keyCode==16&&(this.doc.sel.shift=!1),ht(this,t)}function El(t){var n=this;if(!(t.target&&t.target!=n.display.input.getField())&&!(Ai(n.display,t)||ht(n,t)||t.ctrlKey&&!t.altKey||M&&t.metaKey)){var l=t.keyCode,s=t.charCode;if(oe&&l==Ss){Ss=null,Ft(t);return}if(!(oe&&(!t.which||t.which<10)&&Al(n,t))){var u=String.fromCharCode(s??l);u!="\b"&&(gf(n,t,u)||n.display.input.onKeyPress(t))}}}var yf=400,bn=function(t,n,l){this.time=t,this.pos=n,this.button=l};bn.prototype.compare=function(t,n,l){return this.time+yf>t&&$(n,this.pos)==0&&l==this.button};var xn,eo;function bf(t,n){var l=+new Date;return eo&&eo.compare(l,t,n)?(xn=eo=null,"triple"):xn&&xn.compare(l,t,n)?(eo=new bn(l,t,n),xn=null,"double"):(xn=new bn(l,t,n),eo=null,"single")}function Tl(t){var n=this,l=n.display;if(!(ht(n,t)||l.activeTouch&&l.input.supportsTouch())){if(l.input.ensurePolled(),l.shift=t.shiftKey,Ai(l,t)){X||(l.scroller.draggable=!1,setTimeout(function(){return l.scroller.draggable=!0},100));return}if(!Fl(n,t)){var s=aa(n,t),u=gi(t),p=s?bf(s,u):"single";er(n).focus(),u==1&&n.state.selectingText&&n.state.selectingText(t),!(s&&xf(n,u,s,p,t))&&(u==1?s?wf(n,s,p,t):Rr(t)==l.scroller&&Ft(t):u==2?(s&&pa(n.doc,s),setTimeout(function(){return l.input.focus()},20)):u==3&&(le?n.display.input.onContextMenu(t):sl(n)))}}}function xf(t,n,l,s,u){var p="Click";return s=="double"?p="Double"+p:s=="triple"&&(p="Triple"+p),p=(n==1?"Left":n==2?"Middle":"Right")+p,Ti(t,Yn(p,u),u,function(y){if(typeof y=="string"&&(y=Za[y]),!y)return!1;var x=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),x=y(t,l)!=lt}finally{t.state.suppressEdits=!1}return x})}function Sf(t,n,l){var s=t.getOption("configureMouse"),u=s?s(t,n,l):{};if(u.unit==null){var p=B?l.shiftKey&&l.metaKey:l.altKey;u.unit=p?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(u.extend==null||t.doc.extend)&&(u.extend=t.doc.extend||l.shiftKey),u.addNew==null&&(u.addNew=M?l.metaKey:l.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(M?l.altKey:l.ctrlKey)),u}function wf(t,n,l,s){D?setTimeout(gt(rs,t),0):t.curOp.focus=ze(ut(t));var u=Sf(t,l,s),p=t.doc.sel,y;t.options.dragDrop&&$r&&!t.isReadOnly()&&l=="single"&&(y=p.contains(n))>-1&&($((y=p.ranges[y]).from(),n)<0||n.xRel>0)&&($(y.to(),n)>0||n.xRel<0)?xa(t,s,n,u):kl(t,s,n,u)}function xa(t,n,l,s){var u=t.display,p=!1,y=br(t,function(P){X&&(u.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:sl(t)),Ve(u.wrapper.ownerDocument,"mouseup",y),Ve(u.wrapper.ownerDocument,"mousemove",x),Ve(u.scroller,"dragstart",C),Ve(u.scroller,"drop",y),p||(Ft(P),s.addNew||pa(t.doc,l,null,null,s.extend),X&&!fe||D&&j==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),x=function(P){p=p||Math.abs(n.clientX-P.clientX)+Math.abs(n.clientY-P.clientY)>=10},C=function(){return p=!0};X&&(u.scroller.draggable=!0),t.state.draggingText=y,y.copy=!s.moveOnDrag,se(u.wrapper.ownerDocument,"mouseup",y),se(u.wrapper.ownerDocument,"mousemove",x),se(u.scroller,"dragstart",C),se(u.scroller,"drop",y),t.state.delayingBlurEvent=!0,setTimeout(function(){return u.input.focus()},20),u.scroller.dragDrop&&u.scroller.dragDrop()}function Cf(t,n,l){if(l=="char")return new Dt(n,n);if(l=="word")return t.findWordAt(n);if(l=="line")return new Dt(T(n.line,0),$e(t.doc,T(n.line+1,0)));var s=l(t,n);return new Dt(s.from,s.to)}function kl(t,n,l,s){D&&sl(t);var u=t.display,p=t.doc;Ft(n);var y,x,C=p.sel,P=C.ranges;if(s.addNew&&!s.extend?(x=p.sel.contains(l),x>-1?y=P[x]:y=new Dt(l,l)):(y=p.sel.primary(),x=p.sel.primIndex),s.unit=="rectangle")s.addNew||(y=new Dt(l,l)),l=aa(t,n,!0,!0),x=-1;else{var K=Cf(t,l,s.unit);s.extend?y=cs(y,K.anchor,K.head,s.extend):y=K}s.addNew?x==-1?(x=P.length,Sr(p,Gn(t,P.concat([y]),x),{scroll:!1,origin:"*mouse"})):P.length>1&&P[x].empty()&&s.unit=="char"&&!s.extend?(Sr(p,Gn(t,P.slice(0,x).concat(P.slice(x+1)),0),{scroll:!1,origin:"*mouse"}),C=p.sel):ds(p,x,y,rt):(x=0,Sr(p,new en([y],0),rt),C=p.sel);var ne=l;function ve(Ne){if($(ne,Ne)!=0)if(ne=Ne,s.unit=="rectangle"){for(var We=[],Qe=t.options.tabSize,Ke=st(Ge(p,l.line).text,l.ch,Qe),bt=st(Ge(p,Ne.line).text,Ne.ch,Qe),$t=Math.min(Ke,bt),wr=Math.max(Ke,bt),rr=Math.min(l.line,Ne.line),Sn=Math.min(t.lastLine(),Math.max(l.line,Ne.line));rr<=Sn;rr++){var fn=Ge(p,rr).text,vr=tr(fn,$t,Qe);$t==wr?We.push(new Dt(T(rr,vr),T(rr,vr))):fn.length>vr&&We.push(new Dt(T(rr,vr),T(rr,tr(fn,wr,Qe))))}We.length||We.push(new Dt(l,l)),Sr(p,Gn(t,C.ranges.slice(0,x).concat(We),x),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Ne)}else{var tn=y,Ir=Cf(t,Ne,s.unit),mr=tn.anchor,gr;$(Ir.anchor,mr)>0?(gr=Ir.head,mr=wt(tn.from(),Ir.anchor)):(gr=Ir.anchor,mr=it(tn.to(),Ir.head));var ur=C.ranges.slice(0);ur[x]=Af(t,new Dt($e(p,mr),gr)),Sr(p,Gn(t,ur,x),rt)}}var de=u.wrapper.getBoundingClientRect(),Ee=0;function Ae(Ne){var We=++Ee,Qe=aa(t,Ne,!0,s.unit=="rectangle");if(Qe)if($(Qe,ne)!=0){t.curOp.focus=ze(ut(t)),ve(Qe);var Ke=Ua(u,p);(Qe.line>=Ke.to||Qe.line<Ke.from)&&setTimeout(br(t,function(){Ee==We&&Ae(Ne)}),150)}else{var bt=Ne.clientY<de.top?-20:Ne.clientY>de.bottom?20:0;bt&&setTimeout(br(t,function(){Ee==We&&(u.scroller.scrollTop+=bt,Ae(Ne))}),50)}}function Ie(Ne){t.state.selectingText=!1,Ee=1/0,Ne&&(Ft(Ne),u.input.focus()),Ve(u.wrapper.ownerDocument,"mousemove",Le),Ve(u.wrapper.ownerDocument,"mouseup",De),p.history.lastSelOrigin=null}var Le=br(t,function(Ne){Ne.buttons===0||!gi(Ne)?Ie(Ne):Ae(Ne)}),De=br(t,Ie);t.state.selectingText=De,se(u.wrapper.ownerDocument,"mousemove",Le),se(u.wrapper.ownerDocument,"mouseup",De)}function Af(t,n){var l=n.anchor,s=n.head,u=Ge(t.doc,l.line);if($(l,s)==0&&l.sticky==s.sticky)return n;var p=tt(u);if(!p)return n;var y=St(p,l.ch,l.sticky),x=p[y];if(x.from!=l.ch&&x.to!=l.ch)return n;var C=y+(x.from==l.ch==(x.level!=1)?0:1);if(C==0||C==p.length)return n;var P;if(s.line!=l.line)P=(s.line-l.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var K=St(p,s.ch,s.sticky),ne=K-y||(s.ch-l.ch)*(x.level==1?-1:1);K==C-1||K==C?P=ne<0:P=ne>0}var ve=p[C+(P?-1:0)],de=P==(ve.level==1),Ee=de?ve.from:ve.to,Ae=de?"after":"before";return l.ch==Ee&&l.sticky==Ae?n:new Dt(new T(l.line,Ee,Ae),s)}function Pl(t,n,l,s){var u,p;if(n.touches)u=n.touches[0].clientX,p=n.touches[0].clientY;else try{u=n.clientX,p=n.clientY}catch{return!1}if(u>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;s&&Ft(n);var y=t.display,x=y.lineDiv.getBoundingClientRect();if(p>x.bottom||!Qt(t,l))return vi(n);p-=x.top-y.viewOffset;for(var C=0;C<t.display.gutterSpecs.length;++C){var P=y.gutters.childNodes[C];if(P&&P.getBoundingClientRect().right>=u){var K=bi(t.doc,p),ne=t.display.gutterSpecs[C];return nt(t,l,t,K,ne.className,n),vi(n)}}}function Fl(t,n){return Pl(t,n,"gutterClick",!0)}function Of(t,n){Ai(t.display,n)||Cs(t,n)||ht(t,n,"contextmenu")||le||t.display.input.onContextMenu(n)}function Cs(t,n){return Qt(t,"gutterContextMenu")?Pl(t,n,"gutterContextMenu",!1):!1}function Ef(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mo(t)}var To={toString:function(){return"CodeMirror.Init"}},Pn={},As={};function ed(t){var n=t.optionHandlers;function l(s,u,p,y){t.defaults[s]=u,p&&(n[s]=y?function(x,C,P){P!=To&&p(x,C,P)}:p)}t.defineOption=l,t.Init=To,l("value","",function(s,u){return s.setValue(u)},!0),l("mode",null,function(s,u){s.doc.modeOption=u,gl(s)},!0),l("indentUnit",2,gl,!0),l("indentWithTabs",!1),l("smartIndent",!0),l("tabSize",4,function(s){wo(s),mo(s),qr(s)},!0),l("lineSeparator",null,function(s,u){if(s.doc.lineSep=u,!!u){var p=[],y=s.doc.first;s.doc.iter(function(C){for(var P=0;;){var K=C.text.indexOf(u,P);if(K==-1)break;P=K+u.length,p.push(T(y,K))}y++});for(var x=p.length-1;x>=0;x--)Xa(s.doc,u,p[x],T(p[x].line,p[x].ch+u.length))}}),l("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(s,u,p){s.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),p!=To&&s.refresh()}),l("specialCharPlaceholder",sc,function(s){return s.refresh()},!0),l("electricChars",!0),l("inputStyle",w?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),l("spellcheck",!1,function(s,u){return s.getInputField().spellcheck=u},!0),l("autocorrect",!1,function(s,u){return s.getInputField().autocorrect=u},!0),l("autocapitalize",!1,function(s,u){return s.getInputField().autocapitalize=u},!0),l("rtlMoveVisually",!Z),l("wholeLineUpdateBefore",!0),l("theme","default",function(s){Ef(s),Ka(s)},!0),l("keyMap","default",function(s,u,p){var y=ba(u),x=p!=To&&ba(p);x&&x.detach&&x.detach(s,y),y.attach&&y.attach(s,x||null)}),l("extraKeys",null),l("configureMouse",null),l("lineWrapping",!1,Tf,!0),l("gutters",[],function(s,u){s.display.gutterSpecs=ss(u,s.options.lineNumbers),Ka(s)},!0),l("fixedGutter",!0,function(s,u){s.display.gutters.style.left=u?al(s.display)+"px":"0",s.refresh()},!0),l("coverGutterNextToScrollbar",!1,function(s){return $a(s)},!0),l("scrollbarStyle","native",function(s){Ru(s),$a(s),s.display.scrollbars.setScrollTop(s.doc.scrollTop),s.display.scrollbars.setScrollLeft(s.doc.scrollLeft)},!0),l("lineNumbers",!1,function(s,u){s.display.gutterSpecs=ss(s.options.gutters,u),Ka(s)},!0),l("firstLineNumber",1,Ka,!0),l("lineNumberFormatter",function(s){return s},Ka,!0),l("showCursorWhenSelecting",!1,Wa,!0),l("resetSelectionOnContextMenu",!0),l("lineWiseCopyCut",!0),l("pasteLinesPerSelection",!0),l("selectionsMayTouch",!1),l("readOnly",!1,function(s,u){u=="nocursor"&&(Ha(s),s.display.input.blur()),s.display.input.readOnlyChanged(u)}),l("screenReaderLabel",null,function(s,u){u=u===""?null:u,s.display.input.screenReaderLabelChanged(u)}),l("disableInput",!1,function(s,u){u||s.display.input.reset()},!0),l("dragDrop",!0,un),l("allowDropFileTypes",null),l("cursorBlinkRate",530),l("cursorScrollMargin",0),l("cursorHeight",1,Wa,!0),l("singleCursorHeightPerLine",!0,Wa,!0),l("workTime",100),l("workDelay",100),l("flattenSpans",!0,wo,!0),l("addModeClass",!1,wo,!0),l("pollInterval",100),l("undoDepth",200,function(s,u){return s.doc.history.undoDepth=u}),l("historyEventDelay",1250),l("viewportMargin",10,function(s){return s.refresh()},!0),l("maxHighlightLength",1e4,wo,!0),l("moveInputWithCursor",!0,function(s,u){u||s.display.input.resetPosition()}),l("tabindex",null,function(s,u){return s.display.input.getField().tabIndex=u||""}),l("autofocus",null),l("direction","ltr",function(s,u){return s.doc.setDirection(u)},!0),l("phrases",null)}function un(t,n,l){var s=l&&l!=To;if(!n!=!s){var u=t.display.dragFunctions,p=n?se:Ve;p(t.display.scroller,"dragstart",u.start),p(t.display.scroller,"dragenter",u.enter),p(t.display.scroller,"dragover",u.over),p(t.display.scroller,"dragleave",u.leave),p(t.display.scroller,"drop",u.drop)}}function Tf(t){t.options.lineWrapping?(Ue(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(q(t.display.wrapper,"CodeMirror-wrap"),zs(t)),ol(t),qr(t),mo(t),setTimeout(function(){return $a(t)},100)}function Zt(t,n){var l=this;if(!(this instanceof Zt))return new Zt(t,n);this.options=n=n?Rt(n):{},Rt(Pn,n,!1);var s=n.value;typeof s=="string"?s=new Pr(s,n.mode,null,n.lineSeparator,n.direction):n.mode&&(s.modeOption=n.mode),this.doc=s;var u=new Zt.inputStyles[n.inputStyle](this),p=this.display=new jc(t,s,u,n);p.wrapper.CodeMirror=this,Ef(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ru(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 He,keySeq:null,specialChars:null},n.autofocus&&!w&&p.input.focus(),D&&j<11&&setTimeout(function(){return l.display.input.reset(!0)},20),td(this),ar(),ua(this),this.curOp.forceUpdate=!0,$u(this,s),n.autofocus&&!w||this.hasFocus()?setTimeout(function(){l.hasFocus()&&!l.state.focused&&ll(l)},20):Ha(this);for(var y in As)As.hasOwnProperty(y)&&As[y](this,n[y],To);Wu(this),n.finishInit&&n.finishInit(this);for(var x=0;x<Il.length;++x)Il[x](this);fa(this),X&&n.lineWrapping&&getComputedStyle(p.lineDiv).textRendering=="optimizelegibility"&&(p.lineDiv.style.textRendering="auto")}Zt.defaults=Pn,Zt.optionHandlers=As;function td(t){var n=t.display;se(n.scroller,"mousedown",br(t,Tl)),D&&j<11?se(n.scroller,"dblclick",br(t,function(C){if(!ht(t,C)){var P=aa(t,C);if(!(!P||Fl(t,C)||Ai(t.display,C))){Ft(C);var K=t.findWordAt(P);pa(t.doc,K.anchor,K.head)}}})):se(n.scroller,"dblclick",function(C){return ht(t,C)||Ft(C)}),se(n.scroller,"contextmenu",function(C){return Of(t,C)}),se(n.input.getField(),"contextmenu",function(C){n.scroller.contains(C.target)||Of(t,C)});var l,s={end:0};function u(){n.activeTouch&&(l=setTimeout(function(){return n.activeTouch=null},1e3),s=n.activeTouch,s.end=+new Date)}function p(C){if(C.touches.length!=1)return!1;var P=C.touches[0];return P.radiusX<=1&&P.radiusY<=1}function y(C,P){if(P.left==null)return!0;var K=P.left-C.left,ne=P.top-C.top;return K*K+ne*ne>20*20}se(n.scroller,"touchstart",function(C){if(!ht(t,C)&&!p(C)&&!Fl(t,C)){n.input.ensurePolled(),clearTimeout(l);var P=+new Date;n.activeTouch={start:P,moved:!1,prev:P-s.end<=300?s:null},C.touches.length==1&&(n.activeTouch.left=C.touches[0].pageX,n.activeTouch.top=C.touches[0].pageY)}}),se(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),se(n.scroller,"touchend",function(C){var P=n.activeTouch;if(P&&!Ai(n,C)&&P.left!=null&&!P.moved&&new Date-P.start<300){var K=t.coordsChar(n.activeTouch,"page"),ne;!P.prev||y(P,P.prev)?ne=new Dt(K,K):!P.prev.prev||y(P,P.prev.prev)?ne=t.findWordAt(K):ne=new Dt(T(K.line,0),$e(t.doc,T(K.line+1,0))),t.setSelection(ne.anchor,ne.head),t.focus(),Ft(C)}u()}),se(n.scroller,"touchcancel",u),se(n.scroller,"scroll",function(){n.scroller.clientHeight&&(za(t,n.scroller.scrollTop),la(t,n.scroller.scrollLeft,!0),nt(t,"scroll",t))}),se(n.scroller,"mousewheel",function(C){return _u(t,C)}),se(n.scroller,"DOMMouseScroll",function(C){return _u(t,C)}),se(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(C){ht(t,C)||Nr(C)},over:function(C){ht(t,C)||(sr(t,C),Nr(C))},start:function(C){return Xc(t,C)},drop:br(t,Yc),leave:function(C){ht(t,C)||ff(t)}};var x=n.input.getField();se(x,"keyup",function(C){return Ol.call(t,C)}),se(x,"keydown",br(t,ws)),se(x,"keypress",br(t,El)),se(x,"focus",function(C){return ll(t,C)}),se(x,"blur",function(C){return Ha(t,C)})}var Il=[];Zt.defineInitHook=function(t){return Il.push(t)};function ko(t,n,l,s){var u=t.doc,p;l==null&&(l="add"),l=="smart"&&(u.mode.indent?p=Fa(t,n).state:l="prev");var y=t.options.tabSize,x=Ge(u,n),C=st(x.text,null,y);x.stateAfter&&(x.stateAfter=null);var P=x.text.match(/^\s*/)[0],K;if(!s&&!/\S/.test(x.text))K=0,l="not";else if(l=="smart"&&(K=u.mode.indent(p,x.text.slice(P.length),x.text),K==lt||K>150)){if(!s)return;l="prev"}l=="prev"?n>u.first?K=st(Ge(u,n-1).text,null,y):K=0:l=="add"?K=C+t.options.indentUnit:l=="subtract"?K=C-t.options.indentUnit:typeof l=="number"&&(K=C+l),K=Math.max(0,K);var ne="",ve=0;if(t.options.indentWithTabs)for(var de=Math.floor(K/y);de;--de)ve+=y,ne+=" ";if(ve<K&&(ne+=kr(K-ve)),ne!=P)return Xa(u,ne,T(n,0),T(n,P.length),"+input"),x.stateAfter=null,!0;for(var Ee=0;Ee<u.sel.ranges.length;Ee++){var Ae=u.sel.ranges[Ee];if(Ae.head.line==n&&Ae.head.ch<P.length){var Ie=T(n,P.length);ds(u,Ee,new Dt(Ie,Ie));break}}}var Xn=null;function Os(t){Xn=t}function Ll(t,n,l,s,u){var p=t.doc;t.display.shift=!1,s||(s=p.sel);var y=+new Date-200,x=u=="paste"||t.state.pasteIncoming>y,C=Wn(n),P=null;if(x&&s.ranges.length>1)if(Xn&&Xn.text.join(`
|
|
25
|
+
`)==n){if(s.ranges.length%Xn.text.length==0){P=[];for(var K=0;K<Xn.text.length;K++)P.push(p.splitLines(Xn.text[K]))}}else C.length==s.ranges.length&&t.options.pasteLinesPerSelection&&(P=Et(C,function(Le){return[Le]}));for(var ne=t.curOp.updateInput,ve=s.ranges.length-1;ve>=0;ve--){var de=s.ranges[ve],Ee=de.from(),Ae=de.to();de.empty()&&(l&&l>0?Ee=T(Ee.line,Ee.ch-l):t.state.overwrite&&!x?Ae=T(Ae.line,Math.min(Ge(p,Ae.line).text.length,Ae.ch+et(C).length)):x&&Xn&&Xn.lineWise&&Xn.text.join(`
|
|
26
|
+
`)==C.join(`
|
|
27
|
+
`)&&(Ee=Ae=T(Ee.line,0)));var Ie={from:Ee,to:Ae,text:P?P[ve%P.length]:C,origin:u||(x?"paste":t.state.cutIncoming>y?"cut":"+input")};ha(t.doc,Ie),yr(t,"inputRead",t,Ie)}n&&!x&&ci(t,n),_a(t),t.curOp.updateInput<2&&(t.curOp.updateInput=ne),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function to(t,n){var l=t.clipboardData&&t.clipboardData.getData("Text");if(l)return t.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&n.hasFocus()&&ln(n,function(){return Ll(n,l,0,null,"paste")}),!0}function ci(t,n){if(!(!t.options.electricChars||!t.options.smartIndent))for(var l=t.doc.sel,s=l.ranges.length-1;s>=0;s--){var u=l.ranges[s];if(!(u.head.ch>100||s&&l.ranges[s-1].head.line==u.head.line)){var p=t.getModeAt(u.head),y=!1;if(p.electricChars){for(var x=0;x<p.electricChars.length;x++)if(n.indexOf(p.electricChars.charAt(x))>-1){y=ko(t,u.head.line,"smart");break}}else p.electricInput&&p.electricInput.test(Ge(t.doc,u.head.line).text.slice(0,u.head.ch))&&(y=ko(t,u.head.line,"smart"));y&&yr(t,"electricInput",t,u.head.line)}}}function kf(t){for(var n=[],l=[],s=0;s<t.doc.sel.ranges.length;s++){var u=t.doc.sel.ranges[s].head.line,p={anchor:T(u,0),head:T(u+1,0)};l.push(p),n.push(t.getRange(p.anchor,p.head))}return{text:n,ranges:l}}function Ml(t,n,l,s){t.setAttribute("autocorrect",l?"on":"off"),t.setAttribute("autocapitalize",s?"on":"off"),t.setAttribute("spellcheck",!!n)}function Pf(){var t=Q("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),n=Q("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return X?t.style.width="1000px":t.setAttribute("wrap","off"),ee&&(t.style.border="1px solid black"),n}function rd(t){var n=t.optionHandlers,l=t.helpers={};t.prototype={constructor:t,focus:function(){er(this).focus(),this.display.input.focus()},setOption:function(s,u){var p=this.options,y=p[s];p[s]==u&&s!="mode"||(p[s]=u,n.hasOwnProperty(s)&&br(this,n[s])(this,u,y),nt(this,"optionChange",this,s))},getOption:function(s){return this.options[s]},getDoc:function(){return this.doc},addKeyMap:function(s,u){this.state.keyMaps[u?"push":"unshift"](ba(s))},removeKeyMap:function(s){for(var u=this.state.keyMaps,p=0;p<u.length;++p)if(u[p]==s||u[p].name==s)return u.splice(p,1),!0},addOverlay:Vr(function(s,u){var p=s.token?s:t.getMode(this.options,s);if(p.startState)throw new Error("Overlays may not be stateful.");jt(this.state.overlays,{mode:p,modeSpec:s,opaque:u&&u.opaque,priority:u&&u.priority||0},function(y){return y.priority}),this.state.modeGen++,qr(this)}),removeOverlay:Vr(function(s){for(var u=this.state.overlays,p=0;p<u.length;++p){var y=u[p].modeSpec;if(y==s||typeof s=="string"&&y.name==s){u.splice(p,1),this.state.modeGen++,qr(this);return}}}),indentLine:Vr(function(s,u,p){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),Zi(this.doc,s)&&ko(this,s,u,p)}),indentSelection:Vr(function(s){for(var u=this.doc.sel.ranges,p=-1,y=0;y<u.length;y++){var x=u[y];if(x.empty())x.head.line>p&&(ko(this,x.head.line,s,!0),p=x.head.line,y==this.doc.sel.primIndex&&_a(this));else{var C=x.from(),P=x.to(),K=Math.max(p,C.line);p=Math.min(this.lastLine(),P.line-(P.ch?0:1))+1;for(var ne=K;ne<p;++ne)ko(this,ne,s);var ve=this.doc.sel.ranges;C.ch==0&&u.length==ve.length&&ve[y].from().ch>0&&ds(this.doc,y,new Dt(C,ve[y].to()),_t)}}}),getTokenAt:function(s,u){return qi(this,s,u)},getLineTokens:function(s,u){return qi(this,T(s),u,!0)},getTokenTypeAt:function(s){s=$e(this.doc,s);var u=Ws(this,Ge(this.doc,s.line)),p=0,y=(u.length-1)/2,x=s.ch,C;if(x==0)C=u[2];else for(;;){var P=p+y>>1;if((P?u[P*2-1]:0)>=x)y=P;else if(u[P*2+1]<x)p=P+1;else{C=u[P*2+2];break}}var K=C?C.indexOf("overlay "):-1;return K<0?C:K==0?null:C.slice(0,K-1)},getModeAt:function(s){var u=this.doc.mode;return u.innerMode?t.innerMode(u,this.getTokenAt(s).state).mode:u},getHelper:function(s,u){return this.getHelpers(s,u)[0]},getHelpers:function(s,u){var p=[];if(!l.hasOwnProperty(u))return p;var y=l[u],x=this.getModeAt(s);if(typeof x[u]=="string")y[x[u]]&&p.push(y[x[u]]);else if(x[u])for(var C=0;C<x[u].length;C++){var P=y[x[u][C]];P&&p.push(P)}else x.helperType&&y[x.helperType]?p.push(y[x.helperType]):y[x.name]&&p.push(y[x.name]);for(var K=0;K<y._global.length;K++){var ne=y._global[K];ne.pred(x,this)&&Re(p,ne.val)==-1&&p.push(ne.val)}return p},getStateAfter:function(s,u){var p=this.doc;return s=Lt(p,s??p.first+p.size-1),Fa(this,s+1,u).state},cursorCoords:function(s,u){var p,y=this.doc.sel.primary();return s==null?p=y.head:typeof s=="object"?p=$e(this.doc,s):p=s?y.from():y.to(),kn(this,p,u||"page")},charCoords:function(s,u){return Zo(this,$e(this.doc,s),u||"page")},coordsChar:function(s,u){return s=Ou(this,s,u||"page"),bo(this,s.left,s.top)},lineAtHeight:function(s,u){return s=Ou(this,{top:s,left:0},u||"page").top,bi(this.doc,s+this.display.viewOffset)},heightAtLine:function(s,u,p){var y=!1,x;if(typeof s=="number"){var C=this.doc.first+this.doc.size-1;s<this.doc.first?s=this.doc.first:s>C&&(s=C,y=!0),x=Ge(this.doc,s)}else x=s;return yo(this,x,{top:0,left:0},u||"page",p||y).top+(y?this.doc.height-wi(x):0)},defaultTextHeight:function(){return Va(this.display)},defaultCharWidth:function(){return ja(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(s,u,p,y,x){var C=this.display;s=kn(this,$e(this.doc,s));var P=s.bottom,K=s.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),C.sizer.appendChild(u),y=="over")P=s.top;else if(y=="above"||y=="near"){var ne=Math.max(C.wrapper.clientHeight,this.doc.height),ve=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(y=="above"||s.bottom+u.offsetHeight>ne)&&s.top>u.offsetHeight?P=s.top-u.offsetHeight:s.bottom+u.offsetHeight<=ne&&(P=s.bottom),K+u.offsetWidth>ve&&(K=ve-u.offsetWidth)}u.style.top=P+"px",u.style.left=u.style.right="",x=="right"?(K=C.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(x=="left"?K=0:x=="middle"&&(K=(C.sizer.clientWidth-u.offsetWidth)/2),u.style.left=K+"px"),p&&kc(this,{left:K,top:P,right:K+u.offsetWidth,bottom:P+u.offsetHeight})},triggerOnKeyDown:Vr(ws),triggerOnKeyPress:Vr(El),triggerOnKeyUp:Ol,triggerOnMouseDown:Vr(Tl),execCommand:function(s){if(Za.hasOwnProperty(s))return Za[s].call(null,this)},triggerElectric:Vr(function(s){ci(this,s)}),findPosH:function(s,u,p,y){var x=1;u<0&&(x=-1,u=-u);for(var C=$e(this.doc,s),P=0;P<u&&(C=Nl(this.doc,C,x,p,y),!C.hitSide);++P);return C},moveH:Vr(function(s,u){var p=this;this.extendSelectionsBy(function(y){return p.display.shift||p.doc.extend||y.empty()?Nl(p.doc,y.head,s,u,p.options.rtlMoveVisually):s<0?y.from():y.to()},Pt)}),deleteH:Vr(function(s,u){var p=this.doc.sel,y=this.doc;p.somethingSelected()?y.replaceSelection("",null,"+delete"):Ei(this,function(x){var C=Nl(y,x.head,s,u,!1);return s<0?{from:C,to:x.head}:{from:x.head,to:C}})}),findPosV:function(s,u,p,y){var x=1,C=y;u<0&&(x=-1,u=-u);for(var P=$e(this.doc,s),K=0;K<u;++K){var ne=kn(this,P,"div");if(C==null?C=ne.left:ne.left=C,P=Ff(this,ne,x,p),P.hitSide)break}return P},moveV:Vr(function(s,u){var p=this,y=this.doc,x=[],C=!this.display.shift&&!y.extend&&y.sel.somethingSelected();if(y.extendSelectionsBy(function(K){if(C)return s<0?K.from():K.to();var ne=kn(p,K.head,"div");K.goalColumn!=null&&(ne.left=K.goalColumn),x.push(ne.left);var ve=Ff(p,ne,s,u);return u=="page"&&K==y.sel.primary()&&cl(p,Zo(p,ve,"div").top-ne.top),ve},Pt),x.length)for(var P=0;P<y.sel.ranges.length;P++)y.sel.ranges[P].goalColumn=x[P]}),findWordAt:function(s){var u=this.doc,p=Ge(u,s.line).text,y=s.ch,x=s.ch;if(p){var C=this.getHelper(s,"wordChars");(s.sticky=="before"||x==p.length)&&y?--y:++x;for(var P=p.charAt(y),K=nn(P,C)?function(ne){return nn(ne,C)}:/\s/.test(P)?function(ne){return/\s/.test(ne)}:function(ne){return!/\s/.test(ne)&&!nn(ne)};y>0&&K(p.charAt(y-1));)--y;for(;x<p.length&&K(p.charAt(x));)++x}return new Dt(T(s.line,y),T(s.line,x))},toggleOverwrite:function(s){s!=null&&s==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):q(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ze(ut(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Vr(function(s,u){sa(this,s,u)}),getScrollInfo:function(){var s=this.display.scroller;return{left:s.scrollLeft,top:s.scrollTop,height:s.scrollHeight-gn(this)-this.display.barHeight,width:s.scrollWidth-gn(this)-this.display.barWidth,clientHeight:Jo(this),clientWidth:zn(this)}},scrollIntoView:Vr(function(s,u){s==null?(s={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof s=="number"?s={from:T(s,0),to:null}:s.from==null&&(s={from:s,to:null}),s.to||(s.to=s.from),s.margin=u||0,s.from.line!=null?Iu(this,s):Lu(this,s.from,s.to,s.margin)}),setSize:Vr(function(s,u){var p=this,y=function(C){return typeof C=="number"||/^\d+$/.test(String(C))?C+"px":C};s!=null&&(this.display.wrapper.style.width=y(s)),u!=null&&(this.display.wrapper.style.height=y(u)),this.options.lineWrapping&&Zs(this);var x=this.display.viewFrom;this.doc.iter(x,this.display.viewTo,function(C){if(C.widgets){for(var P=0;P<C.widgets.length;P++)if(C.widgets[P].noHScroll){Ni(p,x,"widget");break}}++x}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(s){return ln(this,s)},startOperation:function(){return ua(this)},endOperation:function(){return fa(this)},refresh:Vr(function(){var s=this.display.cachedTextHeight;qr(this),this.curOp.forceUpdate=!0,mo(this),sa(this,this.doc.scrollLeft,this.doc.scrollTop),vl(this.display),(s==null||Math.abs(s-Va(this.display))>.5||this.options.lineWrapping)&&ol(this),nt(this,"refresh",this)}),swapDoc:Vr(function(s){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),$u(this,s),mo(this),this.display.input.reset(),sa(this,s.scrollLeft,s.scrollTop),this.curOp.forceScroll=!0,yr(this,"swapDoc",this,u),u}),phrase:function(s){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,s)?u[s]:s},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}},Gr(t),t.registerHelper=function(s,u,p){l.hasOwnProperty(s)||(l[s]=t[s]={_global:[]}),l[s][u]=p},t.registerGlobalHelper=function(s,u,p,y){t.registerHelper(s,u,y),l[s]._global.push({pred:p,val:y})}}function Nl(t,n,l,s,u){var p=n,y=l,x=Ge(t,n.line),C=u&&t.direction=="rtl"?-l:l;function P(){var De=n.line+C;return De<t.first||De>=t.first+t.size?!1:(n=new T(De,n.ch,n.sticky),x=Ge(t,De))}function K(De){var Ne;if(s=="codepoint"){var We=x.text.charCodeAt(n.ch+(l>0?0:-1));if(isNaN(We))Ne=null;else{var Qe=l>0?We>=55296&&We<56320:We>=56320&&We<57343;Ne=new T(n.line,Math.max(0,Math.min(x.text.length,n.ch+l*(Qe?2:1))),-l)}}else u?Ne=hf(t.cm,x,n,l):Ne=wl(x,n,l);if(Ne==null)if(!De&&P())n=Cl(u,t.cm,x,n.line,C);else return!1;else n=Ne;return!0}if(s=="char"||s=="codepoint")K();else if(s=="column")K(!0);else if(s=="word"||s=="group")for(var ne=null,ve=s=="group",de=t.cm&&t.cm.getHelper(n,"wordChars"),Ee=!0;!(l<0&&!K(!Ee));Ee=!1){var Ae=x.text.charAt(n.ch)||`
|
|
28
|
+
`,Ie=nn(Ae,de)?"w":ve&&Ae==`
|
|
29
|
+
`?"n":!ve||/\s/.test(Ae)?null:"p";if(ve&&!Ee&&!Ie&&(Ie="s"),ne&&ne!=Ie){l<0&&(l=1,K(),n.sticky="after");break}if(Ie&&(ne=Ie),l>0&&!K(!Ee))break}var Le=ps(t,n,p,y,!0);return Pe(p,Le)&&(Le.hitSide=!0),Le}function Ff(t,n,l,s){var u=t.doc,p=n.left,y;if(s=="page"){var x=Math.min(t.display.wrapper.clientHeight,er(t).innerHeight||u(t).documentElement.clientHeight),C=Math.max(x-.5*Va(t.display),3);y=(l>0?n.bottom:n.top)+l*C}else s=="line"&&(y=l>0?n.bottom+3:n.top-3);for(var P;P=bo(t,p,y),!!P.outside;){if(l<0?y<=0:y>=u.height){P.hitSide=!0;break}y+=l*5}return P}var Ut=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new He,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ut.prototype.init=function(t){var n=this,l=this,s=l.cm,u=l.div=t.lineDiv;u.contentEditable=!0,Ml(u,s.options.spellcheck,s.options.autocorrect,s.options.autocapitalize);function p(x){for(var C=x.target;C;C=C.parentNode){if(C==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}se(u,"paste",function(x){!p(x)||ht(s,x)||to(x,s)||j<=11&&setTimeout(br(s,function(){return n.updateFromDOM()}),20)}),se(u,"compositionstart",function(x){n.composing={data:x.data,done:!1}}),se(u,"compositionupdate",function(x){n.composing||(n.composing={data:x.data,done:!1})}),se(u,"compositionend",function(x){n.composing&&(x.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),se(u,"touchstart",function(){return l.forceCompositionEnd()}),se(u,"input",function(){n.composing||n.readFromDOMSoon()});function y(x){if(!(!p(x)||ht(s,x))){if(s.somethingSelected())Os({lineWise:!1,text:s.getSelections()}),x.type=="cut"&&s.replaceSelection("",null,"cut");else if(s.options.lineWiseCopyCut){var C=kf(s);Os({lineWise:!0,text:C.text}),x.type=="cut"&&s.operation(function(){s.setSelections(C.ranges,0,_t),s.replaceSelection("",null,"cut")})}else return;if(x.clipboardData){x.clipboardData.clearData();var P=Xn.text.join(`
|
|
30
|
+
`);if(x.clipboardData.setData("Text",P),x.clipboardData.getData("Text")==P){x.preventDefault();return}}var K=Pf(),ne=K.firstChild;Ml(ne),s.display.lineSpace.insertBefore(K,s.display.lineSpace.firstChild),ne.value=Xn.text.join(`
|
|
31
|
+
`);var ve=ze(u.ownerDocument);pt(ne),setTimeout(function(){s.display.lineSpace.removeChild(K),ve.focus(),ve==u&&l.showPrimarySelection()},50)}}se(u,"copy",y),se(u,"cut",y)},Ut.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Ut.prototype.prepareSelection=function(){var t=xo(this.cm,!1);return t.focus=ze(this.div.ownerDocument)==this.div,t},Ut.prototype.showSelection=function(t,n){!t||!this.cm.display.view.length||((t.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ut.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ut.prototype.showPrimarySelection=function(){var t=this.getSelection(),n=this.cm,l=n.doc.sel.primary(),s=l.from(),u=l.to();if(n.display.viewTo==n.display.viewFrom||s.line>=n.display.viewTo||u.line<n.display.viewFrom){t.removeAllRanges();return}var p=Es(n,t.anchorNode,t.anchorOffset),y=Es(n,t.focusNode,t.focusOffset);if(!(p&&!p.bad&&y&&!y.bad&&$(wt(p,y),s)==0&&$(it(p,y),u)==0)){var x=n.display.view,C=s.line>=n.display.viewFrom&&If(n,s)||{node:x[0].measure.map[2],offset:0},P=u.line<n.display.viewTo&&If(n,u);if(!P){var K=x[x.length-1].measure,ne=K.maps?K.maps[K.maps.length-1]:K.map;P={node:ne[ne.length-1],offset:ne[ne.length-2]-ne[ne.length-3]}}if(!C||!P){t.removeAllRanges();return}var ve=t.rangeCount&&t.getRangeAt(0),de;try{de=ie(C.node,C.offset,P.offset,P.node)}catch{}de&&(!m&&n.state.focused?(t.collapse(C.node,C.offset),de.collapsed||(t.removeAllRanges(),t.addRange(de))):(t.removeAllRanges(),t.addRange(de)),ve&&t.anchorNode==null?t.addRange(ve):m&&this.startGracePeriod()),this.rememberSelection()}},Ut.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Ut.prototype.showMultipleSelections=function(t){xe(this.cm.display.cursorDiv,t.cursors),xe(this.cm.display.selectionDiv,t.selection)},Ut.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ut.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var n=t.getRangeAt(0).commonAncestorContainer;return je(this.div,n)},Ut.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ze(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ut.prototype.blur=function(){this.div.blur()},Ut.prototype.getField=function(){return this.div},Ut.prototype.supportsTouch=function(){return!0},Ut.prototype.receivedFocus=function(){var t=this,n=this;this.selectionInEditor()?setTimeout(function(){return t.pollSelection()},20):ln(this.cm,function(){return n.cm.curOp.selectionChanged=!0});function l(){n.cm.state.focused&&(n.pollSelection(),n.polling.set(n.cm.options.pollInterval,l))}this.polling.set(this.cm.options.pollInterval,l)},Ut.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ut.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var t=this.getSelection(),n=this.cm;if(N&&re&&this.cm.display.gutterSpecs.length&&nd(t.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var l=Es(n,t.anchorNode,t.anchorOffset),s=Es(n,t.focusNode,t.focusOffset);l&&s&&ln(n,function(){Sr(n.doc,Vi(l,s),_t),(l.bad||s.bad)&&(n.curOp.selectionChanged=!0)})}}},Ut.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,n=t.display,l=t.doc.sel.primary(),s=l.from(),u=l.to();if(s.ch==0&&s.line>t.firstLine()&&(s=T(s.line-1,Ge(t.doc,s.line-1).length)),u.ch==Ge(t.doc,u.line).text.length&&u.line<t.lastLine()&&(u=T(u.line+1,0)),s.line<n.viewFrom||u.line>n.viewTo-1)return!1;var p,y,x;s.line==n.viewFrom||(p=oa(t,s.line))==0?(y=It(n.view[0].line),x=n.view[0].node):(y=It(n.view[p].line),x=n.view[p-1].node.nextSibling);var C=oa(t,u.line),P,K;if(C==n.view.length-1?(P=n.viewTo-1,K=n.lineDiv.lastChild):(P=It(n.view[C+1].line)-1,K=n.view[C+1].node.previousSibling),!x)return!1;for(var ne=t.doc.splitLines(id(t,x,K,y,P)),ve=yi(t.doc,T(y,0),T(P,Ge(t.doc,P).text.length));ne.length>1&&ve.length>1;)if(et(ne)==et(ve))ne.pop(),ve.pop(),P--;else if(ne[0]==ve[0])ne.shift(),ve.shift(),y++;else break;for(var de=0,Ee=0,Ae=ne[0],Ie=ve[0],Le=Math.min(Ae.length,Ie.length);de<Le&&Ae.charCodeAt(de)==Ie.charCodeAt(de);)++de;for(var De=et(ne),Ne=et(ve),We=Math.min(De.length-(ne.length==1?de:0),Ne.length-(ve.length==1?de:0));Ee<We&&De.charCodeAt(De.length-Ee-1)==Ne.charCodeAt(Ne.length-Ee-1);)++Ee;if(ne.length==1&&ve.length==1&&y==s.line)for(;de&&de>s.ch&&De.charCodeAt(De.length-Ee-1)==Ne.charCodeAt(Ne.length-Ee-1);)de--,Ee++;ne[ne.length-1]=De.slice(0,De.length-Ee).replace(/^\u200b+/,""),ne[0]=ne[0].slice(de).replace(/\u200b+$/,"");var Qe=T(y,de),Ke=T(P,ve.length?et(ve).length-Ee:0);if(ne.length>1||ne[0]||$(Qe,Ke))return Xa(t.doc,ne,Qe,Ke,"+input"),!0},Ut.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ut.prototype.reset=function(){this.forceCompositionEnd()},Ut.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ut.prototype.readFromDOMSoon=function(){var t=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(t.composing.done)t.composing=null;else return;t.updateFromDOM()},80))},Ut.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&ln(this.cm,function(){return qr(t.cm)})},Ut.prototype.setUneditable=function(t){t.contentEditable="false"},Ut.prototype.onKeyPress=function(t){t.charCode==0||this.composing||(t.preventDefault(),this.cm.isReadOnly()||br(this.cm,Ll)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0))},Ut.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},Ut.prototype.onContextMenu=function(){},Ut.prototype.resetPosition=function(){},Ut.prototype.needsContentAttribute=!0;function If(t,n){var l=Qo(t,n.line);if(!l||l.hidden)return null;var s=Ge(t.doc,n.line),u=Cu(l,s,n.line),p=tt(s,t.doc.direction),y="left";if(p){var x=St(p,n.ch);y=x%2?"right":"left"}var C=Js(u.map,n.ch,y);return C.offset=C.collapse=="right"?C.end:C.start,C}function nd(t){for(var n=t;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function ro(t,n){return n&&(t.bad=!0),t}function id(t,n,l,s,u){var p="",y=!1,x=t.doc.lineSeparator(),C=!1;function P(de){return function(Ee){return Ee.id==de}}function K(){y&&(p+=x,C&&(p+=x),y=C=!1)}function ne(de){de&&(K(),p+=de)}function ve(de){if(de.nodeType==1){var Ee=de.getAttribute("cm-text");if(Ee){ne(Ee);return}var Ae=de.getAttribute("cm-marker"),Ie;if(Ae){var Le=t.findMarks(T(s,0),T(u+1,0),P(+Ae));Le.length&&(Ie=Le[0].find(0))&&ne(yi(t.doc,Ie.from,Ie.to).join(x));return}if(de.getAttribute("contenteditable")=="false")return;var De=/^(pre|div|p|li|table|br)$/i.test(de.nodeName);if(!/^br$/i.test(de.nodeName)&&de.textContent.length==0)return;De&&K();for(var Ne=0;Ne<de.childNodes.length;Ne++)ve(de.childNodes[Ne]);/^(pre|p)$/i.test(de.nodeName)&&(C=!0),De&&(y=!0)}else de.nodeType==3&&ne(de.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ve(n),n!=l;)n=n.nextSibling,C=!1;return p}function Es(t,n,l){var s;if(n==t.display.lineDiv){if(s=t.display.lineDiv.childNodes[l],!s)return ro(t.clipPos(T(t.display.viewTo-1)),!0);n=null,l=0}else for(s=n;;s=s.parentNode){if(!s||s==t.display.lineDiv)return null;if(s.parentNode&&s.parentNode==t.display.lineDiv)break}for(var u=0;u<t.display.view.length;u++){var p=t.display.view[u];if(p.node==s)return ad(p,n,l)}}function ad(t,n,l){var s=t.text.firstChild,u=!1;if(!n||!je(s,n))return ro(T(It(t.line),0),!0);if(n==s&&(u=!0,n=s.childNodes[l],l=0,!n)){var p=t.rest?et(t.rest):t.line;return ro(T(It(p),p.text.length),u)}var y=n.nodeType==3?n:null,x=n;for(!y&&n.childNodes.length==1&&n.firstChild.nodeType==3&&(y=n.firstChild,l&&(l=y.nodeValue.length));x.parentNode!=s;)x=x.parentNode;var C=t.measure,P=C.maps;function K(Ie,Le,De){for(var Ne=-1;Ne<(P?P.length:0);Ne++)for(var We=Ne<0?C.map:P[Ne],Qe=0;Qe<We.length;Qe+=3){var Ke=We[Qe+2];if(Ke==Ie||Ke==Le){var bt=It(Ne<0?t.line:t.rest[Ne]),$t=We[Qe]+De;return(De<0||Ke!=Ie)&&($t=We[Qe+(De?1:0)]),T(bt,$t)}}}var ne=K(y,x,l);if(ne)return ro(ne,u);for(var ve=x.nextSibling,de=y?y.nodeValue.length-l:0;ve;ve=ve.nextSibling){if(ne=K(ve,ve.firstChild,0),ne)return ro(T(ne.line,ne.ch-de),u);de+=ve.textContent.length}for(var Ee=x.previousSibling,Ae=l;Ee;Ee=Ee.previousSibling){if(ne=K(Ee,Ee.firstChild,-1),ne)return ro(T(ne.line,ne.ch+Ae),u);Ae+=Ee.textContent.length}}var lr=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new He,this.hasSelection=!1,this.composing=null,this.resetting=!1};lr.prototype.init=function(t){var n=this,l=this,s=this.cm;this.createField(t);var u=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),ee&&(u.style.width="0px"),se(u,"input",function(){D&&j>=9&&n.hasSelection&&(n.hasSelection=null),l.poll()}),se(u,"paste",function(y){ht(s,y)||to(y,s)||(s.state.pasteIncoming=+new Date,l.fastPoll())});function p(y){if(!ht(s,y)){if(s.somethingSelected())Os({lineWise:!1,text:s.getSelections()});else if(s.options.lineWiseCopyCut){var x=kf(s);Os({lineWise:!0,text:x.text}),y.type=="cut"?s.setSelections(x.ranges,null,_t):(l.prevInput="",u.value=x.text.join(`
|
|
32
|
+
`),pt(u))}else return;y.type=="cut"&&(s.state.cutIncoming=+new Date)}}se(u,"cut",p),se(u,"copy",p),se(t.scroller,"paste",function(y){if(!(Ai(t,y)||ht(s,y))){if(!u.dispatchEvent){s.state.pasteIncoming=+new Date,l.focus();return}var x=new Event("paste");x.clipboardData=y.clipboardData,u.dispatchEvent(x)}}),se(t.lineSpace,"selectstart",function(y){Ai(t,y)||Ft(y)}),se(u,"compositionstart",function(){var y=s.getCursor("from");l.composing&&l.composing.range.clear(),l.composing={start:y,range:s.markText(y,s.getCursor("to"),{className:"CodeMirror-composing"})}}),se(u,"compositionend",function(){l.composing&&(l.poll(),l.composing.range.clear(),l.composing=null)})},lr.prototype.createField=function(t){this.wrapper=Pf(),this.textarea=this.wrapper.firstChild;var n=this.cm.options;Ml(this.textarea,n.spellcheck,n.autocorrect,n.autocapitalize)},lr.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},lr.prototype.prepareSelection=function(){var t=this.cm,n=t.display,l=t.doc,s=xo(t);if(t.options.moveInputWithCursor){var u=kn(t,l.sel.primary().head,"div"),p=n.wrapper.getBoundingClientRect(),y=n.lineDiv.getBoundingClientRect();s.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,u.top+y.top-p.top)),s.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,u.left+y.left-p.left))}return s},lr.prototype.showSelection=function(t){var n=this.cm,l=n.display;xe(l.cursorDiv,t.cursors),xe(l.selectionDiv,t.selection),t.teTop!=null&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},lr.prototype.reset=function(t){if(!(this.contextMenuPending||this.composing&&t)){var n=this.cm;if(this.resetting=!0,n.somethingSelected()){this.prevInput="";var l=n.getSelection();this.textarea.value=l,n.state.focused&&pt(this.textarea),D&&j>=9&&(this.hasSelection=l)}else t||(this.prevInput=this.textarea.value="",D&&j>=9&&(this.hasSelection=null));this.resetting=!1}},lr.prototype.getField=function(){return this.textarea},lr.prototype.supportsTouch=function(){return!1},lr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!w||ze(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},lr.prototype.blur=function(){this.textarea.blur()},lr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lr.prototype.receivedFocus=function(){this.slowPoll()},lr.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},lr.prototype.fastPoll=function(){var t=!1,n=this;n.pollingFast=!0;function l(){var s=n.poll();!s&&!t?(t=!0,n.polling.set(60,l)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,l)},lr.prototype.poll=function(){var t=this,n=this.cm,l=this.textarea,s=this.prevInput;if(this.contextMenuPending||this.resetting||!n.state.focused||Ii(l)&&!s&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var u=l.value;if(u==s&&!n.somethingSelected())return!1;if(D&&j>=9&&this.hasSelection===u||M&&/[\uf700-\uf7ff]/.test(u))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var p=u.charCodeAt(0);if(p==8203&&!s&&(s="\u200B"),p==8666)return this.reset(),this.cm.execCommand("undo")}for(var y=0,x=Math.min(s.length,u.length);y<x&&s.charCodeAt(y)==u.charCodeAt(y);)++y;return ln(n,function(){Ll(n,u.slice(y),s.length-y,null,t.composing?"*compose":null),u.length>1e3||u.indexOf(`
|
|
33
|
+
`)>-1?l.value=t.prevInput="":t.prevInput=u,t.composing&&(t.composing.range.clear(),t.composing.range=n.markText(t.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},lr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lr.prototype.onKeyPress=function(){D&&j>=9&&(this.hasSelection=null),this.fastPoll()},lr.prototype.onContextMenu=function(t){var n=this,l=n.cm,s=l.display,u=n.textarea;n.contextMenuPending&&n.contextMenuPending();var p=aa(l,t),y=s.scroller.scrollTop;if(!p||oe)return;var x=l.options.resetSelectionOnContextMenu;x&&l.doc.sel.contains(p)==-1&&br(l,Sr)(l.doc,Vi(p),_t);var C=u.style.cssText,P=n.wrapper.style.cssText,K=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
34
|
+
top: `+(t.clientY-K.top-5)+"px; left: "+(t.clientX-K.left-5)+`px;
|
|
35
35
|
z-index: 1000; background: `+(D?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
36
|
-
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var X;_&&(X=l.ownerDocument.defaultView.scrollY),o.input.focus(),_&&l.ownerDocument.defaultView.scrollTo(null,X),o.input.reset(),a.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=ue,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function de(){if(l.selectionStart!=null){var Ce=a.somethingSelected(),Ie="\u200B"+(Ce?l.value:"");l.value="\u21DA",l.value=Ie,r.prevInput=Ce?"":"\u200B",l.selectionStart=1,l.selectionEnd=Ie.length,o.selForContextMenu=a.doc.sel}}function ue(){if(r.contextMenuPending==ue&&(r.contextMenuPending=!1,r.wrapper.style.cssText=k,l.style.cssText=w,D&&R<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=g),l.selectionStart!=null)){(!D||D&&R<9)&&de();var Ce=0,Ie=function(){o.selForContextMenu==a.doc.sel&&l.selectionStart==0&&l.selectionEnd>0&&r.prevInput=="\u200B"?sr(a,ui)(a):Ce++<10?o.detectingSelectAll=setTimeout(Ie,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(Ie,200)}}if(D&&R>=9&&de(),ie){gr(e);var xe=function(){We(window,"mouseup",xe),setTimeout(ue,20)};ne(window,"mouseup",xe)}else setTimeout(ue,50)},Ht.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ht.prototype.setUneditable=function(){},Ht.prototype.needsContentAttribute=!1;function vc(e,r){if(r=r?At(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var a=Ve(e.ownerDocument);r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=b.getValue()}var l;if(e.form&&(ne(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var d=e.form;l=d.submit;try{var g=d.submit=function(){o(),d.submit=l,d.submit(),d.submit=g}}catch{}}r.finishInit=function(w){w.save=o,w.getTextArea=function(){return e},w.toTextArea=function(){w.toTextArea=isNaN,o(),e.parentNode.removeChild(w.getWrapperElement()),e.style.display="",e.form&&(We(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=l))}},e.style.display="none";var b=$t(function(w){return e.parentNode.insertBefore(w,e.nextSibling)},r);return b}function Jf(e){e.off=We,e.on=ne,e.wheelEventPixels=kf,e.Doc=Rr,e.splitLines=gn,e.countColumn=nt,e.findColumn=Jt,e.isWordChar=pn,e.Pass=it,e.signal=et,e.Line=yi,e.changeEnd=si,e.scrollbarModel=Nl,e.Pos=A,e.cmpPos=z,e.modes=Yr,e.mimeModes=Ur,e.resolveMode=mn,e.getMode=Mr,e.modeExtensions=nr,e.extendMode=Ln,e.copyState=rn,e.startState=sa,e.innerMode=Gi,e.commands=mo,e.keyMap=Yn,e.keyName=du,e.isModifierKey=Bs,e.lookupKey=go,e.normalizeKeyMap=Wf,e.StringStream=Ut,e.SharedTextMarker=Cn,e.TextMarker=Qr,e.LineWidget=zo,e.e_preventDefault=St,e.e_stopPropagation=rr,e.e_stop=gr,e.addClass=ze,e.contains=He,e.rmClass=Y,e.keyNames=_e}_s($t),Xf($t);var gc="iter insert remove copy getEditor constructor".split(" ");for(var Ys in Rr.prototype)Rr.prototype.hasOwnProperty(Ys)&&Fe(gc,Ys)<0&&($t.prototype[Ys]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rr.prototype[Ys]));return Er(Rr),$t.inputStyles={textarea:Ht,contenteditable:It},$t.defineMode=function(e){!$t.defaults.mode&&e!="null"&&($t.defaults.mode=e),zr.apply(this,arguments)},$t.defineMIME=To,$t.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),$t.defineMIME("text/plain","null"),$t.defineExtension=function(e,r){$t.prototype[e]=r},$t.defineDocExtension=function(e,r){Rr.prototype[e]=r},$t.fromTextArea=vc,Jf($t),$t.version="5.65.12",$t})},13156:(x,N,f)=>{(function(v){v(f(46944))})(function(v){"use strict";v.defineMode("javascript",function(C,O){var P=C.indentUnit,D=O.statementIndent,R=O.jsonld,_=O.json||R,Z=O.trackScope!==!1,q=O.typescript,he=O.wordCharacters||/[\w$\xa1-\uffff]/,re=function(){function A(Ge){return{type:Ge,style:"keyword"}}var z=A("keyword a"),Se=A("keyword b"),Pe=A("keyword c"),tt=A("keyword d"),yt=A("operator"),Ct={type:"atom",style:"atom"};return{if:A("if"),while:z,with:z,else:Se,do:Se,try:Se,finally:Se,return:tt,break:tt,continue:tt,new:A("new"),delete:Pe,void:Pe,throw:Pe,debugger:A("debugger"),var:A("var"),const:A("var"),let:A("var"),function:A("function"),catch:A("catch"),for:A("for"),switch:A("switch"),case:A("case"),default:A("default"),in:yt,typeof:yt,instanceof:yt,true:Ct,false:Ct,null:Ct,undefined:Ct,NaN:Ct,Infinity:Ct,this:A("this"),class:A("class"),super:A("atom"),yield:Pe,export:A("export"),import:A("import"),extends:Pe,await:Pe}}(),se=/[+\-*&%=<>!?|~^@]/,V=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function T(A){for(var z=!1,Se,Pe=!1;(Se=A.next())!=null;){if(!z){if(Se=="/"&&!Pe)return;Se=="["?Pe=!0:Pe&&Se=="]"&&(Pe=!1)}z=!z&&Se=="\\"}}var J,M;function S(A,z,Se){return J=A,M=Se,z}function L(A,z){var Se=A.next();if(Se=='"'||Se=="'")return z.tokenize=F(Se),z.tokenize(A,z);if(Se=="."&&A.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return S("number","number");if(Se=="."&&A.match(".."))return S("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Se))return S(Se);if(Se=="="&&A.eat(">"))return S("=>","operator");if(Se=="0"&&A.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return S("number","number");if(/\d/.test(Se))return A.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),S("number","number");if(Se=="/")return A.eat("*")?(z.tokenize=K,K(A,z)):A.eat("/")?(A.skipToEnd(),S("comment","comment")):Ki(A,z,1)?(T(A),A.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),S("regexp","string-2")):(A.eat("="),S("operator","operator",A.current()));if(Se=="`")return z.tokenize=te,te(A,z);if(Se=="#"&&A.peek()=="!")return A.skipToEnd(),S("meta","meta");if(Se=="#"&&A.eatWhile(he))return S("variable","property");if(Se=="<"&&A.match("!--")||Se=="-"&&A.match("->")&&!/\S/.test(A.string.slice(0,A.start)))return A.skipToEnd(),S("comment","comment");if(se.test(Se))return(Se!=">"||!z.lexical||z.lexical.type!=">")&&(A.eat("=")?(Se=="!"||Se=="=")&&A.eat("="):/[<>*+\-|&?]/.test(Se)&&(A.eat(Se),Se==">"&&A.eat(Se))),Se=="?"&&A.eat(".")?S("."):S("operator","operator",A.current());if(he.test(Se)){A.eatWhile(he);var Pe=A.current();if(z.lastType!="."){if(re.propertyIsEnumerable(Pe)){var tt=re[Pe];return S(tt.type,tt.style,Pe)}if(Pe=="async"&&A.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return S("async","keyword",Pe)}return S("variable","variable",Pe)}}function F(A){return function(z,Se){var Pe=!1,tt;if(R&&z.peek()=="@"&&z.match(V))return Se.tokenize=L,S("jsonld-keyword","meta");for(;(tt=z.next())!=null&&!(tt==A&&!Pe);)Pe=!Pe&&tt=="\\";return Pe||(Se.tokenize=L),S("string","string")}}function K(A,z){for(var Se=!1,Pe;Pe=A.next();){if(Pe=="/"&&Se){z.tokenize=L;break}Se=Pe=="*"}return S("comment","comment")}function te(A,z){for(var Se=!1,Pe;(Pe=A.next())!=null;){if(!Se&&(Pe=="`"||Pe=="$"&&A.eat("{"))){z.tokenize=L;break}Se=!Se&&Pe=="\\"}return S("quasi","string-2",A.current())}var j="([{}])";function ie(A,z){z.fatArrowAt&&(z.fatArrowAt=null);var Se=A.string.indexOf("=>",A.start);if(!(Se<0)){if(q){var Pe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(A.string.slice(A.start,Se));Pe&&(Se=Pe.index)}for(var tt=0,yt=!1,Ct=Se-1;Ct>=0;--Ct){var Ge=A.string.charAt(Ct),on=j.indexOf(Ge);if(on>=0&&on<3){if(!tt){++Ct;break}if(--tt==0){Ge=="("&&(yt=!0);break}}else if(on>=3&&on<6)++tt;else if(he.test(Ge))yt=!0;else if(/["'\/`]/.test(Ge))for(;;--Ct){if(Ct==0)return;var Po=A.string.charAt(Ct-1);if(Po==Ge&&A.string.charAt(Ct-2)!="\\"){Ct--;break}}else if(yt&&!tt){++Ct;break}}yt&&!tt&&(z.fatArrowAt=Ct)}}var U={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function Y(A,z,Se,Pe,tt,yt){this.indented=A,this.column=z,this.type=Se,this.prev=tt,this.info=yt,Pe!=null&&(this.align=Pe)}function ce(A,z){if(!Z)return!1;for(var Se=A.localVars;Se;Se=Se.next)if(Se.name==z)return!0;for(var Pe=A.context;Pe;Pe=Pe.prev)for(var Se=Pe.vars;Se;Se=Se.next)if(Se.name==z)return!0}function ge(A,z,Se,Pe,tt){var yt=A.cc;for(G.state=A,G.stream=tt,G.marked=null,G.cc=yt,G.style=z,A.lexical.hasOwnProperty("align")||(A.lexical.align=!0);;){var Ct=yt.length?yt.pop():_?qe:it;if(Ct(Se,Pe)){for(;yt.length&&yt[yt.length-1].lex;)yt.pop()();return G.marked?G.marked:Se=="variable"&&ce(A,Pe)?"variable-2":z}}}var G={state:null,column:null,marked:null,cc:null};function ve(){for(var A=arguments.length-1;A>=0;A--)G.cc.push(arguments[A])}function ee(){return ve.apply(null,arguments),!0}function He(A,z){for(var Se=z;Se;Se=Se.next)if(Se.name==A)return!0;return!1}function Ve(A){var z=G.state;if(G.marked="def",!!Z){if(z.context){if(z.lexical.info=="var"&&z.context&&z.context.block){var Se=ze(A,z.context);if(Se!=null){z.context=Se;return}}else if(!He(A,z.localVars)){z.localVars=new ot(A,z.localVars);return}}O.globalVars&&!He(A,z.globalVars)&&(z.globalVars=new ot(A,z.globalVars))}}function ze(A,z){if(z)if(z.block){var Se=ze(A,z.prev);return Se?Se==z.prev?z:new ut(Se,z.vars,!0):null}else return He(A,z.vars)?z:new ut(z.prev,new ot(A,z.vars),!1);else return null}function ct(A){return A=="public"||A=="private"||A=="protected"||A=="abstract"||A=="readonly"}function ut(A,z,Se){this.prev=A,this.vars=z,this.block=Se}function ot(A,z){this.name=A,this.next=z}var Xt=new ot("this",new ot("arguments",null));function dt(){G.state.context=new ut(G.state.context,G.state.localVars,!1),G.state.localVars=Xt}function At(){G.state.context=new ut(G.state.context,G.state.localVars,!0),G.state.localVars=null}dt.lex=At.lex=!0;function nt(){G.state.localVars=G.state.context.vars,G.state.context=G.state.context.prev}nt.lex=!0;function Ue(A,z){var Se=function(){var Pe=G.state,tt=Pe.indented;if(Pe.lexical.type=="stat")tt=Pe.lexical.indented;else for(var yt=Pe.lexical;yt&&yt.type==")"&&yt.align;yt=yt.prev)tt=yt.indented;Pe.lexical=new Y(tt,G.stream.column(),A,null,Pe.lexical,z)};return Se.lex=!0,Se}function Fe(){var A=G.state;A.lexical.prev&&(A.lexical.type==")"&&(A.indented=A.lexical.indented),A.lexical=A.lexical.prev)}Fe.lex=!0;function Be(A){function z(Se){return Se==A?ee():A==";"||Se=="}"||Se==")"||Se=="]"?ve():ee(z)}return z}function it(A,z){return A=="var"?ee(Ue("vardef",z),jn,Be(";"),Fe):A=="keyword a"?ee(Ue("form"),Jt,it,Fe):A=="keyword b"?ee(Ue("form"),it,Fe):A=="keyword d"?G.stream.match(/^\s*$/,!1)?ee():ee(Ue("stat"),dr,Be(";"),Fe):A=="debugger"?ee(Be(";")):A=="{"?ee(Ue("}"),At,at,Fe,nt):A==";"?ee():A=="if"?(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==Fe&&G.state.cc.pop()(),ee(Ue("form"),Jt,it,Fe,gn)):A=="function"?ee(Ir):A=="for"?ee(Ue("form"),At,qn,it,nt,Fe):A=="class"||q&&z=="interface"?(G.marked="keyword",ee(Ue("form",A=="class"?A:z),mn,Fe)):A=="variable"?q&&z=="declare"?(G.marked="keyword",ee(it)):q&&(z=="module"||z=="enum"||z=="type")&&G.stream.match(/^\s*\w/,!1)?(G.marked="keyword",z=="enum"?ee(wt):z=="type"?ee(Ur,Be("operator"),We,Be(";")):ee(Ue("form"),kr,Be("{"),Ue("}"),at,Fe,Fe)):q&&z=="namespace"?(G.marked="keyword",ee(Ue("form"),qe,it,Fe)):q&&z=="abstract"?(G.marked="keyword",ee(it)):ee(Ue("stat"),kn):A=="switch"?ee(Ue("form"),Jt,Be("{"),Ue("}","switch"),At,at,Fe,Fe,nt):A=="case"?ee(qe,Be(":")):A=="default"?ee(Be(":")):A=="catch"?ee(Ue("form"),dt,Dt,it,Fe,nt):A=="export"?ee(Ue("stat"),rn,Fe):A=="import"?ee(Ue("stat"),sa,Fe):A=="async"?ee(it):z=="@"?ee(qe,it):ve(Ue("stat"),qe,Be(";"),Fe)}function Dt(A){if(A=="(")return ee(zr,Be(")"))}function qe(A,z){return er(A,z,!1)}function xt(A,z){return er(A,z,!0)}function Jt(A){return A!="("?ve():ee(Ue(")"),dr,Be(")"),Fe)}function er(A,z,Se){if(G.state.fatArrowAt==G.stream.start){var Pe=Se?hn:Ft;if(A=="(")return ee(dt,Ue(")"),Rt(zr,")"),Fe,Be("=>"),Pe,nt);if(A=="variable")return ve(dt,kr,Be("=>"),Pe,nt)}var tt=Se?bt:Qe;return U.hasOwnProperty(A)?ee(tt):A=="function"?ee(Ir,tt):A=="class"||q&&z=="interface"?(G.marked="keyword",ee(Ue("form"),To,Fe)):A=="keyword c"||A=="async"?ee(Se?xt:qe):A=="("?ee(Ue(")"),dr,Be(")"),Fe,tt):A=="operator"||A=="spread"?ee(Se?xt:qe):A=="["?ee(Ue("]"),nn,Fe,tt):A=="{"?mt(Hr,"}",null,tt):A=="quasi"?ve(Lt,tt):A=="new"?ee(pn(Se)):ee()}function dr(A){return A.match(/[;\}\)\],]/)?ve():ve(qe)}function Qe(A,z){return A==","?ee(dr):bt(A,z,!1)}function bt(A,z,Se){var Pe=Se==!1?Qe:bt,tt=Se==!1?qe:xt;if(A=="=>")return ee(dt,Se?hn:Ft,nt);if(A=="operator")return/\+\+|--/.test(z)||q&&z=="!"?ee(Pe):q&&z=="<"&&G.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ee(Ue(">"),Rt(We,">"),Fe,Pe):z=="?"?ee(qe,Be(":"),tt):ee(tt);if(A=="quasi")return ve(Lt,Pe);if(A!=";"){if(A=="(")return mt(xt,")","call",Pe);if(A==".")return ee(vn,Pe);if(A=="[")return ee(Ue("]"),dr,Be("]"),Fe,Pe);if(q&&z=="as")return G.marked="keyword",ee(We,Pe);if(A=="regexp")return G.state.lastType=G.marked="operator",G.stream.backUp(G.stream.pos-G.stream.start-1),ee(tt)}}function Lt(A,z){return A!="quasi"?ve():z.slice(z.length-2)!="${"?ee(Lt):ee(dr,Ar)}function Ar(A){if(A=="}")return G.marked="string-2",G.state.tokenize=te,ee(Lt)}function Ft(A){return ie(G.stream,G.state),ve(A=="{"?it:qe)}function hn(A){return ie(G.stream,G.state),ve(A=="{"?it:xt)}function pn(A){return function(z){return z=="."?ee(A?tn:Wr):z=="variable"&&q?ee(Bn,A?bt:Qe):ve(A?xt:qe)}}function Wr(A,z){if(z=="target")return G.marked="keyword",ee(Qe)}function tn(A,z){if(z=="target")return G.marked="keyword",ee(bt)}function kn(A){return A==":"?ee(Fe,it):ve(Qe,Be(";"),Fe)}function vn(A){if(A=="variable")return G.marked="property",ee()}function Hr(A,z){if(A=="async")return G.marked="property",ee(Hr);if(A=="variable"||G.style=="keyword"){if(G.marked="property",z=="get"||z=="set")return ee(vr);var Se;return q&&G.state.fatArrowAt==G.stream.start&&(Se=G.stream.match(/^\s*:\s*/,!1))&&(G.state.fatArrowAt=G.stream.pos+Se[0].length),ee(Or)}else{if(A=="number"||A=="string")return G.marked=R?"property":G.style+" property",ee(Or);if(A=="jsonld-keyword")return ee(Or);if(q&&ct(z))return G.marked="keyword",ee(Hr);if(A=="[")return ee(qe,Ze,Be("]"),Or);if(A=="spread")return ee(xt,Or);if(z=="*")return G.marked="keyword",ee(Hr);if(A==":")return ve(Or)}}function vr(A){return A!="variable"?ve(Or):(G.marked="property",ee(Ir))}function Or(A){if(A==":")return ee(xt);if(A=="(")return ve(Ir)}function Rt(A,z,Se){function Pe(tt,yt){if(Se?Se.indexOf(tt)>-1:tt==","){var Ct=G.state.lexical;return Ct.info=="call"&&(Ct.pos=(Ct.pos||0)+1),ee(function(Ge,on){return Ge==z||on==z?ve():ve(A)},Pe)}return tt==z||yt==z?ee():Se&&Se.indexOf(";")>-1?ve(A):ee(Be(z))}return function(tt,yt){return tt==z||yt==z?ee():ve(A,Pe)}}function mt(A,z,Se){for(var Pe=3;Pe<arguments.length;Pe++)G.cc.push(arguments[Pe]);return ee(Ue(z,Se),Rt(A,z),Fe)}function at(A){return A=="}"?ee():ve(it,at)}function Ze(A,z){if(q){if(A==":")return ee(We);if(z=="?")return ee(Ze)}}function ht(A,z){if(q&&(A==":"||z=="in"))return ee(We)}function ne(A){if(q&&A==":")return G.stream.match(/^\s*\w+\s+is\b/,!1)?ee(qe,be,We):ee(We)}function be(A,z){if(z=="is")return G.marked="keyword",ee()}function We(A,z){if(z=="keyof"||z=="typeof"||z=="infer"||z=="readonly")return G.marked="keyword",ee(z=="typeof"?xt:We);if(A=="variable"||z=="void")return G.marked="type",ee(rr);if(z=="|"||z=="&")return ee(We);if(A=="string"||A=="number"||A=="atom")return ee(rr);if(A=="[")return ee(Ue("]"),Rt(We,"]",","),Fe,rr);if(A=="{")return ee(Ue("}"),ft,Fe,rr);if(A=="(")return ee(Rt(St,")"),et,rr);if(A=="<")return ee(Rt(We,">"),We);if(A=="quasi")return ve(_t,rr)}function et(A){if(A=="=>")return ee(We)}function ft(A){return A.match(/[\}\)\]]/)?ee():A==","||A==";"?ee(ft):ve(st,ft)}function st(A,z){if(A=="variable"||G.style=="keyword")return G.marked="property",ee(st);if(z=="?"||A=="number"||A=="string")return ee(st);if(A==":")return ee(We);if(A=="[")return ee(Be("variable"),ht,Be("]"),st);if(A=="(")return ve(Yr,st);if(!A.match(/[;\}\)\],]/))return ee()}function _t(A,z){return A!="quasi"?ve():z.slice(z.length-2)!="${"?ee(_t):ee(We,Er)}function Er(A){if(A=="}")return G.marked="string-2",G.state.tokenize=te,ee(_t)}function St(A,z){return A=="variable"&&G.stream.match(/^\s*[?:]/,!1)||z=="?"?ee(St):A==":"?ee(We):A=="spread"?ee(St):ve(We)}function rr(A,z){if(z=="<")return ee(Ue(">"),Rt(We,">"),Fe,rr);if(z=="|"||A=="."||z=="&")return ee(We);if(A=="[")return ee(We,Be("]"),rr);if(z=="extends"||z=="implements")return G.marked="keyword",ee(We);if(z=="?")return ee(We,Be(":"),We)}function Bn(A,z){if(z=="<")return ee(Ue(">"),Rt(We,">"),Fe,rr)}function gr(){return ve(We,mr)}function mr(A,z){if(z=="=")return ee(We)}function jn(A,z){return z=="enum"?(G.marked="keyword",ee(wt)):ve(kr,Ze,yr,Wn)}function kr(A,z){if(q&&ct(z))return G.marked="keyword",ee(kr);if(A=="variable")return Ve(z),ee();if(A=="spread")return ee(kr);if(A=="[")return mt(Pn,"]");if(A=="{")return mt(Tn,"}")}function Tn(A,z){return A=="variable"&&!G.stream.match(/^\s*:/,!1)?(Ve(z),ee(yr)):(A=="variable"&&(G.marked="property"),A=="spread"?ee(kr):A=="}"?ve():A=="["?ee(qe,Be("]"),Be(":"),Tn):ee(Be(":"),kr,yr))}function Pn(){return ve(kr,yr)}function yr(A,z){if(z=="=")return ee(xt)}function Wn(A){if(A==",")return ee(jn)}function gn(A,z){if(A=="keyword b"&&z=="else")return ee(Ue("form","else"),it,Fe)}function qn(A,z){if(z=="await")return ee(qn);if(A=="(")return ee(Ue(")"),$i,Fe)}function $i(A){return A=="var"?ee(jn,Kr):A=="variable"?ee(Kr):ve(Kr)}function Kr(A,z){return A==")"?ee():A==";"?ee(Kr):z=="in"||z=="of"?(G.marked="keyword",ee(qe,Kr)):ve(qe,Kr)}function Ir(A,z){if(z=="*")return G.marked="keyword",ee(Ir);if(A=="variable")return Ve(z),ee(Ir);if(A=="(")return ee(dt,Ue(")"),Rt(zr,")"),Fe,ne,it,nt);if(q&&z=="<")return ee(Ue(">"),Rt(gr,">"),Fe,Ir)}function Yr(A,z){if(z=="*")return G.marked="keyword",ee(Yr);if(A=="variable")return Ve(z),ee(Yr);if(A=="(")return ee(dt,Ue(")"),Rt(zr,")"),Fe,ne,nt);if(q&&z=="<")return ee(Ue(">"),Rt(gr,">"),Fe,Yr)}function Ur(A,z){if(A=="keyword"||A=="variable")return G.marked="type",ee(Ur);if(z=="<")return ee(Ue(">"),Rt(gr,">"),Fe)}function zr(A,z){return z=="@"&&ee(qe,zr),A=="spread"?ee(zr):q&&ct(z)?(G.marked="keyword",ee(zr)):q&&A=="this"?ee(Ze,yr):ve(kr,Ze,yr)}function To(A,z){return A=="variable"?mn(A,z):Mr(A,z)}function mn(A,z){if(A=="variable")return Ve(z),ee(Mr)}function Mr(A,z){if(z=="<")return ee(Ue(">"),Rt(gr,">"),Fe,Mr);if(z=="extends"||z=="implements"||q&&A==",")return z=="implements"&&(G.marked="keyword"),ee(q?We:qe,Mr);if(A=="{")return ee(Ue("}"),nr,Fe)}function nr(A,z){if(A=="async"||A=="variable"&&(z=="static"||z=="get"||z=="set"||q&&ct(z))&&G.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return G.marked="keyword",ee(nr);if(A=="variable"||G.style=="keyword")return G.marked="property",ee(Ln,nr);if(A=="number"||A=="string")return ee(Ln,nr);if(A=="[")return ee(qe,Ze,Be("]"),Ln,nr);if(z=="*")return G.marked="keyword",ee(nr);if(q&&A=="(")return ve(Yr,nr);if(A==";"||A==",")return ee(nr);if(A=="}")return ee();if(z=="@")return ee(qe,nr)}function Ln(A,z){if(z=="!"||z=="?")return ee(Ln);if(A==":")return ee(We,yr);if(z=="=")return ee(xt);var Se=G.state.lexical.prev,Pe=Se&&Se.info=="interface";return ve(Pe?Yr:Ir)}function rn(A,z){return z=="*"?(G.marked="keyword",ee(pi,Be(";"))):z=="default"?(G.marked="keyword",ee(qe,Be(";"))):A=="{"?ee(Rt(Gi,"}"),pi,Be(";")):ve(it)}function Gi(A,z){if(z=="as")return G.marked="keyword",ee(Be("variable"));if(A=="variable")return ve(xt,Gi)}function sa(A){return A=="string"?ee():A=="("?ve(qe):A=="."?ve(Qe):ve(Ut,$e,pi)}function Ut(A,z){return A=="{"?mt(Ut,"}"):(A=="variable"&&Ve(z),z=="*"&&(G.marked="keyword"),ee(Hn))}function $e(A){if(A==",")return ee(Ut,$e)}function Hn(A,z){if(z=="as")return G.marked="keyword",ee(Ut)}function pi(A,z){if(z=="from")return G.marked="keyword",ee(qe)}function nn(A){return A=="]"?ee():ve(Rt(xt,"]"))}function wt(){return ve(Ue("form"),kr,Be("{"),Ue("}"),Rt(Un,"}"),Fe,Fe)}function Un(){return ve(kr,yr)}function vi(A,z){return A.lastType=="operator"||A.lastType==","||se.test(z.charAt(0))||/[,.]/.test(z.charAt(0))}function Ki(A,z,Se){return z.tokenize==L&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(z.lastType)||z.lastType=="quasi"&&/\{\s*$/.test(A.string.slice(0,A.pos-(Se||0)))}return{startState:function(A){var z={tokenize:L,lastType:"sof",cc:[],lexical:new Y((A||0)-P,0,"block",!1),localVars:O.localVars,context:O.localVars&&new ut(null,null,!1),indented:A||0};return O.globalVars&&typeof O.globalVars=="object"&&(z.globalVars=O.globalVars),z},token:function(A,z){if(A.sol()&&(z.lexical.hasOwnProperty("align")||(z.lexical.align=!1),z.indented=A.indentation(),ie(A,z)),z.tokenize!=K&&A.eatSpace())return null;var Se=z.tokenize(A,z);return J=="comment"?Se:(z.lastType=J=="operator"&&(M=="++"||M=="--")?"incdec":J,ge(z,Se,J,M,A))},indent:function(A,z){if(A.tokenize==K||A.tokenize==te)return v.Pass;if(A.tokenize!=L)return 0;var Se=z&&z.charAt(0),Pe=A.lexical,tt;if(!/^\s*else\b/.test(z))for(var yt=A.cc.length-1;yt>=0;--yt){var Ct=A.cc[yt];if(Ct==Fe)Pe=Pe.prev;else if(Ct!=gn&&Ct!=nt)break}for(;(Pe.type=="stat"||Pe.type=="form")&&(Se=="}"||(tt=A.cc[A.cc.length-1])&&(tt==Qe||tt==bt)&&!/^[,\.=+\-*:?[\(]/.test(z));)Pe=Pe.prev;D&&Pe.type==")"&&Pe.prev.type=="stat"&&(Pe=Pe.prev);var Ge=Pe.type,on=Se==Ge;return Ge=="vardef"?Pe.indented+(A.lastType=="operator"||A.lastType==","?Pe.info.length+1:0):Ge=="form"&&Se=="{"?Pe.indented:Ge=="form"?Pe.indented+P:Ge=="stat"?Pe.indented+(vi(A,z)?D||P:0):Pe.info=="switch"&&!on&&O.doubleIndentSwitch!=!1?Pe.indented+(/^(?:case|default)\b/.test(z)?P:2*P):Pe.align?Pe.column+(on?0:1):Pe.indented+(on?0:P)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:_?null:"/*",blockCommentEnd:_?null:"*/",blockCommentContinue:_?null:" * ",lineComment:_?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:_?"json":"javascript",jsonldMode:R,jsonMode:_,expressionAllowed:Ki,skipExpression:function(A){ge(A,"atom","atom","true",new v.StringStream("",2,null))}}}),v.registerHelper("wordChars","javascript",/[\w$]/),v.defineMIME("text/javascript","javascript"),v.defineMIME("text/ecmascript","javascript"),v.defineMIME("application/javascript","javascript"),v.defineMIME("application/x-javascript","javascript"),v.defineMIME("application/ecmascript","javascript"),v.defineMIME("application/json",{name:"javascript",json:!0}),v.defineMIME("application/x-json",{name:"javascript",json:!0}),v.defineMIME("application/manifest+json",{name:"javascript",json:!0}),v.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),v.defineMIME("text/typescript",{name:"javascript",typescript:!0}),v.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},26179:(x,N)=>{"use strict";/*!
|
|
36
|
+
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ne;X&&(ne=u.ownerDocument.defaultView.scrollY),s.input.focus(),X&&u.ownerDocument.defaultView.scrollTo(null,ne),s.input.reset(),l.somethingSelected()||(u.value=n.prevInput=" "),n.contextMenuPending=de,s.selForContextMenu=l.doc.sel,clearTimeout(s.detectingSelectAll);function ve(){if(u.selectionStart!=null){var Ae=l.somethingSelected(),Ie="\u200B"+(Ae?u.value:"");u.value="\u21DA",u.value=Ie,n.prevInput=Ae?"":"\u200B",u.selectionStart=1,u.selectionEnd=Ie.length,s.selForContextMenu=l.doc.sel}}function de(){if(n.contextMenuPending==de&&(n.contextMenuPending=!1,n.wrapper.style.cssText=P,u.style.cssText=C,D&&j<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=y),u.selectionStart!=null)){(!D||D&&j<9)&&ve();var Ae=0,Ie=function(){s.selForContextMenu==l.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&n.prevInput=="\u200B"?br(l,Hi)(l):Ae++<10?s.detectingSelectAll=setTimeout(Ie,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(Ie,200)}}if(D&&j>=9&&ve(),le){Nr(t);var Ee=function(){Ve(window,"mouseup",Ee),setTimeout(de,20)};se(window,"mouseup",Ee)}else setTimeout(de,50)},lr.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},lr.prototype.setUneditable=function(){},lr.prototype.needsContentAttribute=!1;function od(t,n){if(n=n?Rt(n):{},n.value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),n.autofocus==null){var l=ze(t.ownerDocument);n.autofocus=l==t||t.getAttribute("autofocus")!=null&&l==document.body}function s(){t.value=x.getValue()}var u;if(t.form&&(se(t.form,"submit",s),!n.leaveSubmitMethodAlone)){var p=t.form;u=p.submit;try{var y=p.submit=function(){s(),p.submit=u,p.submit(),p.submit=y}}catch{}}n.finishInit=function(C){C.save=s,C.getTextArea=function(){return t},C.toTextArea=function(){C.toTextArea=isNaN,s(),t.parentNode.removeChild(C.getWrapperElement()),t.style.display="",t.form&&(Ve(t.form,"submit",s),!n.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=u))}},t.style.display="none";var x=Zt(function(C){return t.parentNode.insertBefore(C,t.nextSibling)},n);return x}function sd(t){t.off=Ve,t.on=se,t.wheelEventPixels=Wc,t.Doc=Pr,t.splitLines=Wn,t.countColumn=st,t.findColumn=tr,t.isWordChar=Vn,t.Pass=lt,t.signal=nt,t.Line=ta,t.changeEnd=ji,t.scrollbarModel=Nu,t.Pos=T,t.cmpPos=$,t.modes=vn,t.mimeModes=on,t.resolveMode=Hn,t.getMode=Qr,t.modeExtensions=pr,t.extendMode=ai,t.copyState=An,t.startState=Vo,t.innerMode=ka,t.commands=Za,t.keyMap=Kn,t.keyName=_i,t.isModifierKey=pf,t.lookupKey=Qa,t.normalizeKeyMap=Zc,t.StringStream=Xt,t.SharedTextMarker=ma,t.TextMarker=fi,t.LineWidget=Oo,t.e_preventDefault=Ft,t.e_stopPropagation=dr,t.e_stop=Nr,t.addClass=Ue,t.contains=je,t.rmClass=q,t.keyNames=Ui}ed(Zt),rd(Zt);var ld="iter insert remove copy getEditor constructor".split(" ");for(var Ts in Pr.prototype)Pr.prototype.hasOwnProperty(Ts)&&Re(ld,Ts)<0&&(Zt.prototype[Ts]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pr.prototype[Ts]));return Gr(Pr),Zt.inputStyles={textarea:lr,contenteditable:Ut},Zt.defineMode=function(t){!Zt.defaults.mode&&t!="null"&&(Zt.defaults.mode=t),sn.apply(this,arguments)},Zt.defineMIME=fo,Zt.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Zt.defineMIME("text/plain","null"),Zt.defineExtension=function(t,n){Zt.prototype[t]=n},Zt.defineDocExtension=function(t,n){Pr.prototype[t]=n},Zt.fromTextArea=od,sd(Zt),Zt.version="5.65.12",Zt})},13156:(S,R,c)=>{(function(m){m(c(46944))})(function(m){"use strict";m.defineMode("javascript",function(O,k){var L=O.indentUnit,D=k.statementIndent,j=k.jsonld,X=k.json||j,te=k.trackScope!==!1,re=k.typescript,he=k.wordCharacters||/[\w$\xa1-\uffff]/,oe=function(){function T($e){return{type:$e,style:"keyword"}}var $=T("keyword a"),Pe=T("keyword b"),Fe=T("keyword c"),it=T("keyword d"),wt=T("operator"),Lt={type:"atom",style:"atom"};return{if:T("if"),while:$,with:$,else:Pe,do:Pe,try:Pe,finally:Pe,return:it,break:it,continue:it,new:T("new"),delete:Fe,void:Fe,throw:Fe,debugger:T("debugger"),var:T("var"),const:T("var"),let:T("var"),function:T("function"),catch:T("catch"),for:T("for"),switch:T("switch"),case:T("case"),default:T("default"),in:wt,typeof:wt,instanceof:wt,true:Lt,false:Lt,null:Lt,undefined:Lt,NaN:Lt,Infinity:Lt,this:T("this"),class:T("class"),super:T("atom"),yield:Fe,export:T("export"),import:T("import"),extends:Fe,await:Fe}}(),fe=/[+\-*&%=<>!?|~^@]/,J=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function F(T){for(var $=!1,Pe,Fe=!1;(Pe=T.next())!=null;){if(!$){if(Pe=="/"&&!Fe)return;Pe=="["?Fe=!0:Fe&&Pe=="]"&&(Fe=!1)}$=!$&&Pe=="\\"}}var ee,N;function w(T,$,Pe){return ee=T,N=Pe,$}function M(T,$){var Pe=T.next();if(Pe=='"'||Pe=="'")return $.tokenize=B(Pe),$.tokenize(T,$);if(Pe=="."&&T.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(Pe=="."&&T.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Pe))return w(Pe);if(Pe=="="&&T.eat(">"))return w("=>","operator");if(Pe=="0"&&T.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(Pe))return T.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(Pe=="/")return T.eat("*")?($.tokenize=Z,Z(T,$)):T.eat("/")?(T.skipToEnd(),w("comment","comment")):Pa(T,$,1)?(F(T),T.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(T.eat("="),w("operator","operator",T.current()));if(Pe=="`")return $.tokenize=ae,ae(T,$);if(Pe=="#"&&T.peek()=="!")return T.skipToEnd(),w("meta","meta");if(Pe=="#"&&T.eatWhile(he))return w("variable","property");if(Pe=="<"&&T.match("!--")||Pe=="-"&&T.match("->")&&!/\S/.test(T.string.slice(0,T.start)))return T.skipToEnd(),w("comment","comment");if(fe.test(Pe))return(Pe!=">"||!$.lexical||$.lexical.type!=">")&&(T.eat("=")?(Pe=="!"||Pe=="=")&&T.eat("="):/[<>*+\-|&?]/.test(Pe)&&(T.eat(Pe),Pe==">"&&T.eat(Pe))),Pe=="?"&&T.eat(".")?w("."):w("operator","operator",T.current());if(he.test(Pe)){T.eatWhile(he);var Fe=T.current();if($.lastType!="."){if(oe.propertyIsEnumerable(Fe)){var it=oe[Fe];return w(it.type,it.style,Fe)}if(Fe=="async"&&T.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",Fe)}return w("variable","variable",Fe)}}function B(T){return function($,Pe){var Fe=!1,it;if(j&&$.peek()=="@"&&$.match(J))return Pe.tokenize=M,w("jsonld-keyword","meta");for(;(it=$.next())!=null&&!(it==T&&!Fe);)Fe=!Fe&&it=="\\";return Fe||(Pe.tokenize=M),w("string","string")}}function Z(T,$){for(var Pe=!1,Fe;Fe=T.next();){if(Fe=="/"&&Pe){$.tokenize=M;break}Pe=Fe=="*"}return w("comment","comment")}function ae(T,$){for(var Pe=!1,Fe;(Fe=T.next())!=null;){if(!Pe&&(Fe=="`"||Fe=="$"&&T.eat("{"))){$.tokenize=M;break}Pe=!Pe&&Fe=="\\"}return w("quasi","string-2",T.current())}var H="([{}])";function le(T,$){$.fatArrowAt&&($.fatArrowAt=null);var Pe=T.string.indexOf("=>",T.start);if(!(Pe<0)){if(re){var Fe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(T.string.slice(T.start,Pe));Fe&&(Pe=Fe.index)}for(var it=0,wt=!1,Lt=Pe-1;Lt>=0;--Lt){var $e=T.string.charAt(Lt),En=H.indexOf($e);if(En>=0&&En<3){if(!it){++Lt;break}if(--it==0){$e=="("&&(wt=!0);break}}else if(En>=3&&En<6)++it;else if(he.test($e))wt=!0;else if(/["'\/`]/.test($e))for(;;--Lt){if(Lt==0)return;var co=T.string.charAt(Lt-1);if(co==$e&&T.string.charAt(Lt-2)!="\\"){Lt--;break}}else if(wt&&!it){++Lt;break}}wt&&!it&&($.fatArrowAt=Lt)}}var z={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function q(T,$,Pe,Fe,it,wt){this.indented=T,this.column=$,this.type=Pe,this.prev=it,this.info=wt,Fe!=null&&(this.align=Fe)}function pe(T,$){if(!te)return!1;for(var Pe=T.localVars;Pe;Pe=Pe.next)if(Pe.name==$)return!0;for(var Fe=T.context;Fe;Fe=Fe.prev)for(var Pe=Fe.vars;Pe;Pe=Pe.next)if(Pe.name==$)return!0}function xe(T,$,Pe,Fe,it){var wt=T.cc;for(Q.state=T,Q.stream=it,Q.marked=null,Q.cc=wt,Q.style=$,T.lexical.hasOwnProperty("align")||(T.lexical.align=!0);;){var Lt=wt.length?wt.pop():X?rt:lt;if(Lt(Pe,Fe)){for(;wt.length&&wt[wt.length-1].lex;)wt.pop()();return Q.marked?Q.marked:Pe=="variable"&&pe(T,Fe)?"variable-2":$}}}var Q={state:null,column:null,marked:null,cc:null};function ye(){for(var T=arguments.length-1;T>=0;T--)Q.cc.push(arguments[T])}function ie(){return ye.apply(null,arguments),!0}function je(T,$){for(var Pe=$;Pe;Pe=Pe.next)if(Pe.name==T)return!0;return!1}function ze(T){var $=Q.state;if(Q.marked="def",!!te){if($.context){if($.lexical.info=="var"&&$.context&&$.context.block){var Pe=Ue(T,$.context);if(Pe!=null){$.context=Pe;return}}else if(!je(T,$.localVars)){$.localVars=new ut(T,$.localVars);return}}k.globalVars&&!je(T,$.globalVars)&&($.globalVars=new ut(T,$.globalVars))}}function Ue(T,$){if($)if($.block){var Pe=Ue(T,$.prev);return Pe?Pe==$.prev?$:new pt(Pe,$.vars,!0):null}else return je(T,$.vars)?$:new pt($.prev,new ut(T,$.vars),!1);else return null}function vt(T){return T=="public"||T=="private"||T=="protected"||T=="abstract"||T=="readonly"}function pt(T,$,Pe){this.prev=T,this.vars=$,this.block=Pe}function ut(T,$){this.name=T,this.next=$}var er=new ut("this",new ut("arguments",null));function gt(){Q.state.context=new pt(Q.state.context,Q.state.localVars,!1),Q.state.localVars=er}function Rt(){Q.state.context=new pt(Q.state.context,Q.state.localVars,!0),Q.state.localVars=null}gt.lex=Rt.lex=!0;function st(){Q.state.localVars=Q.state.context.vars,Q.state.context=Q.state.context.prev}st.lex=!0;function He(T,$){var Pe=function(){var Fe=Q.state,it=Fe.indented;if(Fe.lexical.type=="stat")it=Fe.lexical.indented;else for(var wt=Fe.lexical;wt&&wt.type==")"&&wt.align;wt=wt.prev)it=wt.indented;Fe.lexical=new q(it,Q.stream.column(),T,null,Fe.lexical,$)};return Pe.lex=!0,Pe}function Re(){var T=Q.state;T.lexical.prev&&(T.lexical.type==")"&&(T.indented=T.lexical.indented),T.lexical=T.lexical.prev)}Re.lex=!0;function Be(T){function $(Pe){return Pe==T?ie():T==";"||Pe=="}"||Pe==")"||Pe=="]"?ye():ie($)}return $}function lt(T,$){return T=="var"?ie(He("vardef",$),gi,Be(";"),Re):T=="keyword a"?ie(He("form"),tr,lt,Re):T=="keyword b"?ie(He("form"),lt,Re):T=="keyword d"?Q.stream.match(/^\s*$/,!1)?ie():ie(He("stat"),kr,Be(";"),Re):T=="debugger"?ie(Be(";")):T=="{"?ie(He("}"),Rt,ft,Re,st):T==";"?ie():T=="if"?(Q.state.lexical.info=="else"&&Q.state.cc[Q.state.cc.length-1]==Re&&Q.state.cc.pop()(),ie(He("form"),tr,lt,Re,Wn)):T=="function"?ie(Jr):T=="for"?ie(He("form"),Rt,Ii,lt,st,Re):T=="class"||re&&$=="interface"?(Q.marked="keyword",ie(He("form",T=="class"?T:$),Hn,Re)):T=="variable"?re&&$=="declare"?(Q.marked="keyword",ie(lt)):re&&($=="module"||$=="enum"||$=="type")&&Q.stream.match(/^\s*\w/,!1)?(Q.marked="keyword",$=="enum"?ie(It):$=="type"?ie(on,Be("operator"),Ve,Be(";")):ie(He("form"),$r,Be("{"),He("}"),ft,Re,Re)):re&&$=="namespace"?(Q.marked="keyword",ie(He("form"),rt,lt,Re)):re&&$=="abstract"?(Q.marked="keyword",ie(lt)):ie(He("stat"),ri):T=="switch"?ie(He("form"),tr,Be("{"),He("}","switch"),Rt,ft,Re,Re,st):T=="case"?ie(rt,Be(":")):T=="default"?ie(Be(":")):T=="catch"?ie(He("form"),gt,_t,lt,Re,st):T=="export"?ie(He("stat"),An,Re):T=="import"?ie(He("stat"),Vo,Re):T=="async"?ie(lt):$=="@"?ie(rt,lt):ye(He("stat"),rt,Be(";"),Re)}function _t(T){if(T=="(")return ie(sn,Be(")"))}function rt(T,$){return or(T,$,!1)}function Pt(T,$){return or(T,$,!0)}function tr(T){return T!="("?ye():ie(He(")"),kr,Be(")"),Re)}function or(T,$,Pe){if(Q.state.fatArrowAt==Q.stream.start){var Fe=Pe?Bn:zt;if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,Be("=>"),Fe,st);if(T=="variable")return ye(gt,$r,Be("=>"),Fe,st)}var it=Pe?Et:et;return z.hasOwnProperty(T)?ie(it):T=="function"?ie(Jr,it):T=="class"||re&&$=="interface"?(Q.marked="keyword",ie(He("form"),fo,Re)):T=="keyword c"||T=="async"?ie(Pe?Pt:rt):T=="("?ie(He(")"),kr,Be(")"),Re,it):T=="operator"||T=="spread"?ie(Pe?Pt:rt):T=="["?ie(He("]"),On,Re,it):T=="{"?St(an,"}",null,it):T=="quasi"?ye(jt,it):T=="new"?ie(Vn(Pe)):ie()}function kr(T){return T.match(/[;\}\)\],]/)?ye():ye(rt)}function et(T,$){return T==","?ie(kr):Et(T,$,!1)}function Et(T,$,Pe){var Fe=Pe==!1?et:Et,it=Pe==!1?rt:Pt;if(T=="=>")return ie(gt,Pe?Bn:zt,st);if(T=="operator")return/\+\+|--/.test($)||re&&$=="!"?ie(Fe):re&&$=="<"&&Q.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?ie(He(">"),Gt(Ve,">"),Re,Fe):$=="?"?ie(rt,Be(":"),it):ie(it);if(T=="quasi")return ye(jt,Fe);if(T!=";"){if(T=="(")return St(Pt,")","call",Fe);if(T==".")return ie(jn,Fe);if(T=="[")return ie(He("]"),kr,Be("]"),Re,Fe);if(re&&$=="as")return Q.marked="keyword",ie(Ve,Fe);if(T=="regexp")return Q.state.lastType=Q.marked="operator",Q.stream.backUp(Q.stream.pos-Q.stream.start-1),ie(it)}}function jt(T,$){return T!="quasi"?ye():$.slice($.length-2)!="${"?ie(jt):ie(kr,_r)}function _r(T){if(T=="}")return Q.marked="string-2",Q.state.tokenize=ae,ie(jt)}function zt(T){return le(Q.stream,Q.state),ye(T=="{"?lt:rt)}function Bn(T){return le(Q.stream,Q.state),ye(T=="{"?lt:Pt)}function Vn(T){return function($){return $=="."?ie(T?Cn:nn):$=="variable"&&re?ie(vi,T?Et:et):ye(T?Pt:rt)}}function nn(T,$){if($=="target")return Q.marked="keyword",ie(et)}function Cn(T,$){if($=="target")return Q.marked="keyword",ie(Et)}function ri(T){return T==":"?ie(Re,lt):ye(et,Be(";"),Re)}function jn(T){if(T=="variable")return Q.marked="property",ie()}function an(T,$){if(T=="async")return Q.marked="property",ie(an);if(T=="variable"||Q.style=="keyword"){if(Q.marked="property",$=="get"||$=="set")return ie(Mr);var Pe;return re&&Q.state.fatArrowAt==Q.stream.start&&(Pe=Q.stream.match(/^\s*:\s*/,!1))&&(Q.state.fatArrowAt=Q.stream.pos+Pe[0].length),ie(zr)}else{if(T=="number"||T=="string")return Q.marked=j?"property":Q.style+" property",ie(zr);if(T=="jsonld-keyword")return ie(zr);if(re&&vt($))return Q.marked="keyword",ie(an);if(T=="[")return ie(rt,tt,Be("]"),zr);if(T=="spread")return ie(Pt,zr);if($=="*")return Q.marked="keyword",ie(an);if(T==":")return ye(zr)}}function Mr(T){return T!="variable"?ye(zr):(Q.marked="property",ie(Jr))}function zr(T){if(T==":")return ie(Pt);if(T=="(")return ye(Jr)}function Gt(T,$,Pe){function Fe(it,wt){if(Pe?Pe.indexOf(it)>-1:it==","){var Lt=Q.state.lexical;return Lt.info=="call"&&(Lt.pos=(Lt.pos||0)+1),ie(function($e,En){return $e==$||En==$?ye():ye(T)},Fe)}return it==$||wt==$?ie():Pe&&Pe.indexOf(";")>-1?ye(T):ie(Be($))}return function(it,wt){return it==$||wt==$?ie():ye(T,Fe)}}function St(T,$,Pe){for(var Fe=3;Fe<arguments.length;Fe++)Q.cc.push(arguments[Fe]);return ie(He($,Pe),Gt(T,$),Re)}function ft(T){return T=="}"?ie():ye(lt,ft)}function tt(T,$){if(re){if(T==":")return ie(Ve);if($=="?")return ie(tt)}}function mt(T,$){if(re&&(T==":"||$=="in"))return ie(Ve)}function se(T){if(re&&T==":")return Q.stream.match(/^\s*\w+\s+is\b/,!1)?ie(rt,we,Ve):ie(Ve)}function we(T,$){if($=="is")return Q.marked="keyword",ie()}function Ve(T,$){if($=="keyof"||$=="typeof"||$=="infer"||$=="readonly")return Q.marked="keyword",ie($=="typeof"?Pt:Ve);if(T=="variable"||$=="void")return Q.marked="type",ie(dr);if($=="|"||$=="&")return ie(Ve);if(T=="string"||T=="number"||T=="atom")return ie(dr);if(T=="[")return ie(He("]"),Gt(Ve,"]",","),Re,dr);if(T=="{")return ie(He("}"),ht,Re,dr);if(T=="(")return ie(Gt(Ft,")"),nt,dr);if(T=="<")return ie(Gt(Ve,">"),Ve);if(T=="quasi")return ye(Qt,dr)}function nt(T){if(T=="=>")return ie(Ve)}function ht(T){return T.match(/[\}\)\]]/)?ie():T==","||T==";"?ie(ht):ye(ct,ht)}function ct(T,$){if(T=="variable"||Q.style=="keyword")return Q.marked="property",ie(ct);if($=="?"||T=="number"||T=="string")return ie(ct);if(T==":")return ie(Ve);if(T=="[")return ie(Be("variable"),mt,Be("]"),ct);if(T=="(")return ye(vn,ct);if(!T.match(/[;\}\)\],]/))return ie()}function Qt(T,$){return T!="quasi"?ye():$.slice($.length-2)!="${"?ie(Qt):ie(Ve,Gr)}function Gr(T){if(T=="}")return Q.marked="string-2",Q.state.tokenize=ae,ie(Qt)}function Ft(T,$){return T=="variable"&&Q.stream.match(/^\s*[?:]/,!1)||$=="?"?ie(Ft):T==":"?ie(Ve):T=="spread"?ie(Ft):ye(Ve)}function dr(T,$){if($=="<")return ie(He(">"),Gt(Ve,">"),Re,dr);if($=="|"||T=="."||$=="&")return ie(Ve);if(T=="[")return ie(Ve,Be("]"),dr);if($=="extends"||$=="implements")return Q.marked="keyword",ie(Ve);if($=="?")return ie(Ve,Be(":"),Ve)}function vi(T,$){if($=="<")return ie(He(">"),Gt(Ve,">"),Re,dr)}function Nr(){return ye(Ve,Rr)}function Rr(T,$){if($=="=")return ie(Ve)}function gi(T,$){return $=="enum"?(Q.marked="keyword",ie(It)):ye($r,tt,Dr,mi)}function $r(T,$){if(re&&vt($))return Q.marked="keyword",ie($r);if(T=="variable")return ze($),ie();if(T=="spread")return ie($r);if(T=="[")return St(ii,"]");if(T=="{")return St(ni,"}")}function ni(T,$){return T=="variable"&&!Q.stream.match(/^\s*:/,!1)?(ze($),ie(Dr)):(T=="variable"&&(Q.marked="property"),T=="spread"?ie($r):T=="}"?ye():T=="["?ie(rt,Be("]"),Be(":"),ni):ie(Be(":"),$r,Dr))}function ii(){return ye($r,Dr)}function Dr(T,$){if($=="=")return ie(Pt)}function mi(T){if(T==",")return ie(gi)}function Wn(T,$){if(T=="keyword b"&&$=="else")return ie(He("form","else"),lt,Re)}function Ii(T,$){if($=="await")return ie(Ii);if(T=="(")return ie(He(")"),Ta,Re)}function Ta(T){return T=="var"?ie(gi,hn):T=="variable"?ie(hn):ye(hn)}function hn(T,$){return T==")"?ie():T==";"?ie(hn):$=="in"||$=="of"?(Q.marked="keyword",ie(rt,hn)):ye(rt,hn)}function Jr(T,$){if($=="*")return Q.marked="keyword",ie(Jr);if(T=="variable")return ze($),ie(Jr);if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,se,lt,st);if(re&&$=="<")return ie(He(">"),Gt(Nr,">"),Re,Jr)}function vn(T,$){if($=="*")return Q.marked="keyword",ie(vn);if(T=="variable")return ze($),ie(vn);if(T=="(")return ie(gt,He(")"),Gt(sn,")"),Re,se,st);if(re&&$=="<")return ie(He(">"),Gt(Nr,">"),Re,vn)}function on(T,$){if(T=="keyword"||T=="variable")return Q.marked="type",ie(on);if($=="<")return ie(He(">"),Gt(Nr,">"),Re)}function sn(T,$){return $=="@"&&ie(rt,sn),T=="spread"?ie(sn):re&&vt($)?(Q.marked="keyword",ie(sn)):re&&T=="this"?ie(tt,Dr):ye($r,tt,Dr)}function fo(T,$){return T=="variable"?Hn(T,$):Qr(T,$)}function Hn(T,$){if(T=="variable")return ze($),ie(Qr)}function Qr(T,$){if($=="<")return ie(He(">"),Gt(Nr,">"),Re,Qr);if($=="extends"||$=="implements"||re&&T==",")return $=="implements"&&(Q.marked="keyword"),ie(re?Ve:rt,Qr);if(T=="{")return ie(He("}"),pr,Re)}function pr(T,$){if(T=="async"||T=="variable"&&($=="static"||$=="get"||$=="set"||re&&vt($))&&Q.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Q.marked="keyword",ie(pr);if(T=="variable"||Q.style=="keyword")return Q.marked="property",ie(ai,pr);if(T=="number"||T=="string")return ie(ai,pr);if(T=="[")return ie(rt,tt,Be("]"),ai,pr);if($=="*")return Q.marked="keyword",ie(pr);if(re&&T=="(")return ye(vn,pr);if(T==";"||T==",")return ie(pr);if(T=="}")return ie();if($=="@")return ie(rt,pr)}function ai(T,$){if($=="!"||$=="?")return ie(ai);if(T==":")return ie(Ve,Dr);if($=="=")return ie(Pt);var Pe=Q.state.lexical.prev,Fe=Pe&&Pe.info=="interface";return ye(Fe?vn:Jr)}function An(T,$){return $=="*"?(Q.marked="keyword",ie(Qi,Be(";"))):$=="default"?(Q.marked="keyword",ie(rt,Be(";"))):T=="{"?ie(Gt(ka,"}"),Qi,Be(";")):ye(lt)}function ka(T,$){if($=="as")return Q.marked="keyword",ie(Be("variable"));if(T=="variable")return ye(Pt,ka)}function Vo(T){return T=="string"?ie():T=="("?ye(rt):T=="."?ye(et):ye(Xt,Ge,Qi)}function Xt(T,$){return T=="{"?St(Xt,"}"):(T=="variable"&&ze($),$=="*"&&(Q.marked="keyword"),ie(yi))}function Ge(T){if(T==",")return ie(Xt,Ge)}function yi(T,$){if($=="as")return Q.marked="keyword",ie(Xt)}function Qi(T,$){if($=="from")return Q.marked="keyword",ie(rt)}function On(T){return T=="]"?ie():ye(Gt(Pt,"]"))}function It(){return ye(He("form"),$r,Be("{"),He("}"),Gt(bi,"}"),Re,Re)}function bi(){return ye($r,Dr)}function Zi(T,$){return T.lastType=="operator"||T.lastType==","||fe.test($.charAt(0))||/[,.]/.test($.charAt(0))}function Pa(T,$,Pe){return $.tokenize==M&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test($.lastType)||$.lastType=="quasi"&&/\{\s*$/.test(T.string.slice(0,T.pos-(Pe||0)))}return{startState:function(T){var $={tokenize:M,lastType:"sof",cc:[],lexical:new q((T||0)-L,0,"block",!1),localVars:k.localVars,context:k.localVars&&new pt(null,null,!1),indented:T||0};return k.globalVars&&typeof k.globalVars=="object"&&($.globalVars=k.globalVars),$},token:function(T,$){if(T.sol()&&($.lexical.hasOwnProperty("align")||($.lexical.align=!1),$.indented=T.indentation(),le(T,$)),$.tokenize!=Z&&T.eatSpace())return null;var Pe=$.tokenize(T,$);return ee=="comment"?Pe:($.lastType=ee=="operator"&&(N=="++"||N=="--")?"incdec":ee,xe($,Pe,ee,N,T))},indent:function(T,$){if(T.tokenize==Z||T.tokenize==ae)return m.Pass;if(T.tokenize!=M)return 0;var Pe=$&&$.charAt(0),Fe=T.lexical,it;if(!/^\s*else\b/.test($))for(var wt=T.cc.length-1;wt>=0;--wt){var Lt=T.cc[wt];if(Lt==Re)Fe=Fe.prev;else if(Lt!=Wn&&Lt!=st)break}for(;(Fe.type=="stat"||Fe.type=="form")&&(Pe=="}"||(it=T.cc[T.cc.length-1])&&(it==et||it==Et)&&!/^[,\.=+\-*:?[\(]/.test($));)Fe=Fe.prev;D&&Fe.type==")"&&Fe.prev.type=="stat"&&(Fe=Fe.prev);var $e=Fe.type,En=Pe==$e;return $e=="vardef"?Fe.indented+(T.lastType=="operator"||T.lastType==","?Fe.info.length+1:0):$e=="form"&&Pe=="{"?Fe.indented:$e=="form"?Fe.indented+L:$e=="stat"?Fe.indented+(Zi(T,$)?D||L:0):Fe.info=="switch"&&!En&&k.doubleIndentSwitch!=!1?Fe.indented+(/^(?:case|default)\b/.test($)?L:2*L):Fe.align?Fe.column+(En?0:1):Fe.indented+(En?0:L)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:X?null:"/*",blockCommentEnd:X?null:"*/",blockCommentContinue:X?null:" * ",lineComment:X?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:X?"json":"javascript",jsonldMode:j,jsonMode:X,expressionAllowed:Pa,skipExpression:function(T){xe(T,"atom","atom","true",new m.StringStream("",2,null))}}}),m.registerHelper("wordChars","javascript",/[\w$]/),m.defineMIME("text/javascript","javascript"),m.defineMIME("text/ecmascript","javascript"),m.defineMIME("application/javascript","javascript"),m.defineMIME("application/x-javascript","javascript"),m.defineMIME("application/ecmascript","javascript"),m.defineMIME("application/json",{name:"javascript",json:!0}),m.defineMIME("application/x-json",{name:"javascript",json:!0}),m.defineMIME("application/manifest+json",{name:"javascript",json:!0}),m.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),m.defineMIME("text/typescript",{name:"javascript",typescript:!0}),m.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},26179:(S,R)=>{"use strict";/*!
|
|
37
37
|
* cookie
|
|
38
38
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|
39
39
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
40
40
|
* MIT Licensed
|
|
41
|
-
*/N.parse=C,N.serialize=O;var f=Object.prototype.toString,v=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function C(Z,q){if(typeof Z!="string")throw new TypeError("argument str must be a string");for(var he={},re=q||{},se=re.decode||P,V=0;V<Z.length;){var T=Z.indexOf("=",V);if(T===-1)break;var J=Z.indexOf(";",V);if(J===-1)J=Z.length;else if(J<T){V=Z.lastIndexOf(";",T-1)+1;continue}var M=Z.slice(V,T).trim();if(he[M]===void 0){var S=Z.slice(T+1,J).trim();S.charCodeAt(0)===34&&(S=S.slice(1,-1)),he[M]=_(S,se)}V=J+1}return he}function O(Z,q,he){var re=he||{},se=re.encode||D;if(typeof se!="function")throw new TypeError("option encode is invalid");if(!v.test(Z))throw new TypeError("argument name is invalid");var V=se(q);if(V&&!v.test(V))throw new TypeError("argument val is invalid");var T=Z+"="+V;if(re.maxAge!=null){var J=re.maxAge-0;if(isNaN(J)||!isFinite(J))throw new TypeError("option maxAge is invalid");T+="; Max-Age="+Math.floor(J)}if(re.domain){if(!v.test(re.domain))throw new TypeError("option domain is invalid");T+="; Domain="+re.domain}if(re.path){if(!v.test(re.path))throw new TypeError("option path is invalid");T+="; Path="+re.path}if(re.expires){var M=re.expires;if(!R(M)||isNaN(M.valueOf()))throw new TypeError("option expires is invalid");T+="; Expires="+M.toUTCString()}if(re.httpOnly&&(T+="; HttpOnly"),re.secure&&(T+="; Secure"),re.priority){var S=typeof re.priority=="string"?re.priority.toLowerCase():re.priority;switch(S){case"low":T+="; Priority=Low";break;case"medium":T+="; Priority=Medium";break;case"high":T+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(re.sameSite){var L=typeof re.sameSite=="string"?re.sameSite.toLowerCase():re.sameSite;switch(L){case!0:T+="; SameSite=Strict";break;case"lax":T+="; SameSite=Lax";break;case"strict":T+="; SameSite=Strict";break;case"none":T+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return T}function P(Z){return Z.indexOf("%")!==-1?decodeURIComponent(Z):Z}function D(Z){return encodeURIComponent(Z)}function R(Z){return f.call(Z)==="[object Date]"||Z instanceof Date}function _(Z,q){try{return q(Z)}catch{return Z}}},97529:(x,N,f)=>{var v=f(44928);x.exports=v},75342:(x,N,f)=>{var v=f(26087);x.exports=v},64218:(x,N,f)=>{var v=f(11783);x.exports=v},95050:(x,N,f)=>{var v=f(88462);x.exports=v},84779:(x,N,f)=>{var v=f(83531);x.exports=v},17190:(x,N,f)=>{var v=f(19941);x.exports=v},96589:(x,N,f)=>{var v=f(25081);x.exports=v},32276:(x,N,f)=>{var v=f(22145);x.exports=v},15064:(x,N,f)=>{var v=f(93690);x.exports=v},31986:(x,N,f)=>{var v=f(8429);f(42319),x.exports=v},69635:(x,N,f)=>{var v=f(13099);x.exports=v},3529:(x,N,f)=>{var v=f(44931);x.exports=v},85373:(x,N,f)=>{f(17802);var v=f(70291);x.exports=v("Array").filter},94537:(x,N,f)=>{f(64009);var v=f(70291);x.exports=v("Array").forEach},27794:(x,N,f)=>{f(32449);var v=f(70291);x.exports=v("Array").indexOf},55794:(x,N,f)=>{var v=f(15166),C=f(85373),O=Array.prototype;x.exports=function(P){var D=P.filter;return P===O||v(O,P)&&D===O.filter?C:D}},85838:(x,N,f)=>{var v=f(15166),C=f(27794),O=Array.prototype;x.exports=function(P){var D=P.indexOf;return P===O||v(O,P)&&D===O.indexOf?C:D}},95617:(x,N,f)=>{f(28135);var v=f(59921),C=v.Object,O=x.exports=function(D,R){return C.defineProperties(D,R)};C.defineProperties.sham&&(O.sham=!0)},11906:(x,N,f)=>{f(70829);var v=f(59921),C=v.Object,O=x.exports=function(D,R,_){return C.defineProperty(D,R,_)};C.defineProperty.sham&&(O.sham=!0)},59123:(x,N,f)=>{f(51964);var v=f(59921),C=v.Object,O=x.exports=function(D,R){return C.getOwnPropertyDescriptor(D,R)};C.getOwnPropertyDescriptor.sham&&(O.sham=!0)},63332:(x,N,f)=>{f(723);var v=f(59921);x.exports=v.Object.getOwnPropertyDescriptors},83606:(x,N,f)=>{f(68030);var v=f(59921);x.exports=v.Object.getOwnPropertySymbols},90660:(x,N,f)=>{f(38339);var v=f(59921);x.exports=v.Object.keys},49198:(x,N,f)=>{f(69825),f(97829),f(68030),f(95353),f(63906),f(39542),f(47882),f(84911),f(88725),f(47954),f(67703),f(2220),f(48990),f(50240),f(99921),f(3502),f(80220),f(23870),f(5828),f(5708);var v=f(59921);x.exports=v.Symbol},15413:(x,N,f)=>{f(44390),f(97829),f(27626),f(84911);var v=f(39378);x.exports=v.f("iterator")},4793:(x,N,f)=>{f(91667),f(99921);var v=f(39378);x.exports=v.f("toPrimitive")},24018:(x,N,f)=>{x.exports=f(11226)},27411:(x,N,f)=>{x.exports=f(39743)},79155:(x,N,f)=>{x.exports=f(17018)},13375:(x,N,f)=>{x.exports=f(45057)},95442:(x,N,f)=>{x.exports=f(97947)},55334:(x,N,f)=>{x.exports=f(26452)},48261:(x,N,f)=>{x.exports=f(4477)},92864:(x,N,f)=>{x.exports=f(74013)},27923:(x,N,f)=>{x.exports=f(17685)},89225:(x,N,f)=>{x.exports=f(2371)},95281:(x,N,f)=>{x.exports=f(89061)},55468:(x,N,f)=>{x.exports=f(51553)},11226:(x,N,f)=>{var v=f(97529);x.exports=v},39743:(x,N,f)=>{var v=f(75342);x.exports=v},17018:(x,N,f)=>{var v=f(64218);x.exports=v},45057:(x,N,f)=>{var v=f(95050);x.exports=v},97947:(x,N,f)=>{var v=f(84779);x.exports=v},26452:(x,N,f)=>{var v=f(17190);x.exports=v},4477:(x,N,f)=>{var v=f(96589);x.exports=v},74013:(x,N,f)=>{var v=f(32276);x.exports=v},17685:(x,N,f)=>{var v=f(15064);x.exports=v},2371:(x,N,f)=>{var v=f(31986);f(45987),f(58052),f(90181),f(25129),f(90397),f(18097),f(82793),f(52100),f(99742),x.exports=v},89061:(x,N,f)=>{var v=f(69635);x.exports=v},51553:(x,N,f)=>{var v=f(3529);x.exports=v},81970:(x,N,f)=>{var v=f(43152),C=f(18342),O=TypeError;x.exports=function(P){if(v(P))return P;throw O(C(P)+" is not a function")}},72185:(x,N,f)=>{var v=f(43152),C=String,O=TypeError;x.exports=function(P){if(typeof P=="object"||v(P))return P;throw O("Can't set "+C(P)+" as a prototype")}},20844:x=>{x.exports=function(){}},35970:(x,N,f)=>{var v=f(92548),C=String,O=TypeError;x.exports=function(P){if(v(P))return P;throw O(C(P)+" is not an object")}},24782:(x,N,f)=>{"use strict";var v=f(93935).forEach,C=f(10454),O=C("forEach");x.exports=O?[].forEach:function(D){return v(this,D,arguments.length>1?arguments[1]:void 0)}},66322:(x,N,f)=>{var v=f(88966),C=f(13249),O=f(53387),P=function(D){return function(R,_,Z){var q=v(R),he=O(q),re=C(Z,he),se;if(D&&_!=_){for(;he>re;)if(se=q[re++],se!=se)return!0}else for(;he>re;re++)if((D||re in q)&&q[re]===_)return D||re||0;return!D&&-1}};x.exports={includes:P(!0),indexOf:P(!1)}},93935:(x,N,f)=>{var v=f(7416),C=f(90406),O=f(38622),P=f(53254),D=f(53387),R=f(69573),_=C([].push),Z=function(q){var he=q==1,re=q==2,se=q==3,V=q==4,T=q==6,J=q==7,M=q==5||T;return function(S,L,F,K){for(var te=P(S),j=O(te),ie=v(L,F),U=D(j),Y=0,ce=K||R,ge=he?ce(S,U):re||J?ce(S,0):void 0,G,ve;U>Y;Y++)if((M||Y in j)&&(G=j[Y],ve=ie(G,Y,te),q))if(he)ge[Y]=ve;else if(ve)switch(q){case 3:return!0;case 5:return G;case 6:return Y;case 2:_(ge,G)}else switch(q){case 4:return!1;case 7:_(ge,G)}return T?-1:se||V?V:ge}};x.exports={forEach:Z(0),map:Z(1),filter:Z(2),some:Z(3),every:Z(4),find:Z(5),findIndex:Z(6),filterReject:Z(7)}},36844:(x,N,f)=>{var v=f(31982),C=f(33538),O=f(32438),P=C("species");x.exports=function(D){return O>=51||!v(function(){var R=[],_=R.constructor={};return _[P]=function(){return{foo:1}},R[D](Boolean).foo!==1})}},10454:(x,N,f)=>{"use strict";var v=f(31982);x.exports=function(C,O){var P=[][C];return!!P&&v(function(){P.call(null,O||function(){return 1},1)})}},67932:(x,N,f)=>{var v=f(13249),C=f(53387),O=f(53437),P=Array,D=Math.max;x.exports=function(R,_,Z){for(var q=C(R),he=v(_,q),re=v(Z===void 0?q:Z,q),se=P(D(re-he,0)),V=0;he<re;he++,V++)O(se,V,R[he]);return se.length=V,se}},53160:(x,N,f)=>{var v=f(90406);x.exports=v([].slice)},76562:(x,N,f)=>{var v=f(93053),C=f(43455),O=f(92548),P=f(33538),D=P("species"),R=Array;x.exports=function(_){var Z;return v(_)&&(Z=_.constructor,C(Z)&&(Z===R||v(Z.prototype))?Z=void 0:O(Z)&&(Z=Z[D],Z===null&&(Z=void 0))),Z===void 0?R:Z}},69573:(x,N,f)=>{var v=f(76562);x.exports=function(C,O){return new(v(C))(O===0?0:O)}},58310:(x,N,f)=>{var v=f(90406),C=v({}.toString),O=v("".slice);x.exports=function(P){return O(C(P),8,-1)}},82059:(x,N,f)=>{var v=f(48448),C=f(43152),O=f(58310),P=f(33538),D=P("toStringTag"),R=Object,_=O(function(){return arguments}())=="Arguments",Z=function(q,he){try{return q[he]}catch{}};x.exports=v?O:function(q){var he,re,se;return q===void 0?"Undefined":q===null?"Null":typeof(re=Z(he=R(q),D))=="string"?re:_?O(he):(se=O(he))=="Object"&&C(he.callee)?"Arguments":se}},74838:(x,N,f)=>{var v=f(31982);x.exports=!v(function(){function C(){}return C.prototype.constructor=null,Object.getPrototypeOf(new C)!==C.prototype})},10248:x=>{x.exports=function(N,f){return{value:N,done:f}}},20410:(x,N,f)=>{var v=f(56049),C=f(36133),O=f(54686);x.exports=v?function(P,D,R){return C.f(P,D,O(1,R))}:function(P,D,R){return P[D]=R,P}},54686:x=>{x.exports=function(N,f){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:f}}},53437:(x,N,f)=>{"use strict";var v=f(5135),C=f(36133),O=f(54686);x.exports=function(P,D,R){var _=v(D);_ in P?C.f(P,_,O(0,R)):P[_]=R}},37912:(x,N,f)=>{var v=f(36133);x.exports=function(C,O,P){return v.f(C,O,P)}},27519:(x,N,f)=>{var v=f(20410);x.exports=function(C,O,P,D){return D&&D.enumerable?C[O]=P:v(C,O,P),C}},9267:(x,N,f)=>{var v=f(62447),C=Object.defineProperty;x.exports=function(O,P){try{C(v,O,{value:P,configurable:!0,writable:!0})}catch{v[O]=P}return P}},56049:(x,N,f)=>{var v=f(31982);x.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},51647:x=>{var N=typeof document=="object"&&document.all,f=typeof N>"u"&&N!==void 0;x.exports={all:N,IS_HTMLDDA:f}},45511:(x,N,f)=>{var v=f(62447),C=f(92548),O=v.document,P=C(O)&&C(O.createElement);x.exports=function(D){return P?O.createElement(D):{}}},11452:x=>{var N=TypeError,f=9007199254740991;x.exports=function(v){if(v>f)throw N("Maximum allowed index exceeded");return v}},81595:x=>{x.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},90740:x=>{x.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},32438:(x,N,f)=>{var v=f(62447),C=f(90740),O=v.process,P=v.Deno,D=O&&O.versions||P&&P.version,R=D&&D.v8,_,Z;R&&(_=R.split("."),Z=_[0]>0&&_[0]<4?1:+(_[0]+_[1])),!Z&&C&&(_=C.match(/Edge\/(\d+)/),(!_||_[1]>=74)&&(_=C.match(/Chrome\/(\d+)/),_&&(Z=+_[1]))),x.exports=Z},70291:(x,N,f)=>{var v=f(59921);x.exports=function(C){return v[C+"Prototype"]}},11792:x=>{x.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},30080:(x,N,f)=>{"use strict";var v=f(62447),C=f(82768),O=f(57953),P=f(43152),D=f(80016).f,R=f(51585),_=f(59921),Z=f(7416),q=f(20410),he=f(18768),re=function(se){var V=function(T,J,M){if(this instanceof V){switch(arguments.length){case 0:return new se;case 1:return new se(T);case 2:return new se(T,J)}return new se(T,J,M)}return C(se,this,arguments)};return V.prototype=se.prototype,V};x.exports=function(se,V){var T=se.target,J=se.global,M=se.stat,S=se.proto,L=J?v:M?v[T]:(v[T]||{}).prototype,F=J?_:_[T]||q(_,T,{})[T],K=F.prototype,te,j,ie,U,Y,ce,ge,G,ve;for(U in V)te=R(J?U:T+(M?".":"#")+U,se.forced),j=!te&&L&&he(L,U),ce=F[U],j&&(se.dontCallGetSet?(ve=D(L,U),ge=ve&&ve.value):ge=L[U]),Y=j&&ge?ge:V[U],!(j&&typeof ce==typeof Y)&&(se.bind&&j?G=Z(Y,v):se.wrap&&j?G=re(Y):S&&P(Y)?G=O(Y):G=Y,(se.sham||Y&&Y.sham||ce&&ce.sham)&&q(G,"sham",!0),q(F,U,G),S&&(ie=T+"Prototype",he(_,ie)||q(_,ie,{}),q(_[ie],U,Y),se.real&&K&&(te||!K[U])&&q(K,U,Y)))}},31982:x=>{x.exports=function(N){try{return!!N()}catch{return!0}}},82768:(x,N,f)=>{var v=f(97966),C=Function.prototype,O=C.apply,P=C.call;x.exports=typeof Reflect=="object"&&Reflect.apply||(v?P.bind(O):function(){return P.apply(O,arguments)})},7416:(x,N,f)=>{var v=f(57953),C=f(81970),O=f(97966),P=v(v.bind);x.exports=function(D,R){return C(D),R===void 0?D:O?P(D,R):function(){return D.apply(R,arguments)}}},97966:(x,N,f)=>{var v=f(31982);x.exports=!v(function(){var C=function(){}.bind();return typeof C!="function"||C.hasOwnProperty("prototype")})},12461:(x,N,f)=>{var v=f(97966),C=Function.prototype.call;x.exports=v?C.bind(C):function(){return C.apply(C,arguments)}},58100:(x,N,f)=>{var v=f(56049),C=f(18768),O=Function.prototype,P=v&&Object.getOwnPropertyDescriptor,D=C(O,"name"),R=D&&function(){}.name==="something",_=D&&(!v||v&&P(O,"name").configurable);x.exports={EXISTS:D,PROPER:R,CONFIGURABLE:_}},54518:(x,N,f)=>{var v=f(90406),C=f(81970);x.exports=function(O,P,D){try{return v(C(Object.getOwnPropertyDescriptor(O,P)[D]))}catch{}}},57953:(x,N,f)=>{var v=f(58310),C=f(90406);x.exports=function(O){if(v(O)==="Function")return C(O)}},90406:(x,N,f)=>{var v=f(97966),C=Function.prototype,O=C.call,P=v&&C.bind.bind(O,O);x.exports=v?P:function(D){return function(){return O.apply(D,arguments)}}},97080:(x,N,f)=>{var v=f(59921),C=f(62447),O=f(43152),P=function(D){return O(D)?D:void 0};x.exports=function(D,R){return arguments.length<2?P(v[D])||P(C[D]):v[D]&&v[D][R]||C[D]&&C[D][R]}},82850:(x,N,f)=>{var v=f(90406),C=f(93053),O=f(43152),P=f(58310),D=f(46025),R=v([].push);x.exports=function(_){if(O(_))return _;if(C(_)){for(var Z=_.length,q=[],he=0;he<Z;he++){var re=_[he];typeof re=="string"?R(q,re):(typeof re=="number"||P(re)=="Number"||P(re)=="String")&&R(q,D(re))}var se=q.length,V=!0;return function(T,J){if(V)return V=!1,J;if(C(this))return J;for(var M=0;M<se;M++)if(q[M]===T)return J}}}},27529:(x,N,f)=>{var v=f(81970),C=f(71365);x.exports=function(O,P){var D=O[P];return C(D)?void 0:v(D)}},62447:(x,N,f)=>{var v=function(C){return C&&C.Math==Math&&C};x.exports=v(typeof globalThis=="object"&&globalThis)||v(typeof window=="object"&&window)||v(typeof self=="object"&&self)||v(typeof f.g=="object"&&f.g)||function(){return this}()||Function("return this")()},18768:(x,N,f)=>{var v=f(90406),C=f(53254),O=v({}.hasOwnProperty);x.exports=Object.hasOwn||function(D,R){return O(C(D),R)}},13477:x=>{x.exports={}},19552:(x,N,f)=>{var v=f(97080);x.exports=v("document","documentElement")},11314:(x,N,f)=>{var v=f(56049),C=f(31982),O=f(45511);x.exports=!v&&!C(function(){return Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a!=7})},38622:(x,N,f)=>{var v=f(90406),C=f(31982),O=f(58310),P=Object,D=v("".split);x.exports=C(function(){return!P("z").propertyIsEnumerable(0)})?function(R){return O(R)=="String"?D(R,""):P(R)}:P},41524:(x,N,f)=>{var v=f(90406),C=f(43152),O=f(70716),P=v(Function.toString);C(O.inspectSource)||(O.inspectSource=function(D){return P(D)}),x.exports=O.inspectSource},44083:(x,N,f)=>{var v=f(57761),C=f(62447),O=f(92548),P=f(20410),D=f(18768),R=f(70716),_=f(4580),Z=f(13477),q="Object already initialized",he=C.TypeError,re=C.WeakMap,se,V,T,J=function(F){return T(F)?V(F):se(F,{})},M=function(F){return function(K){var te;if(!O(K)||(te=V(K)).type!==F)throw he("Incompatible receiver, "+F+" required");return te}};if(v||R.state){var S=R.state||(R.state=new re);S.get=S.get,S.has=S.has,S.set=S.set,se=function(F,K){if(S.has(F))throw he(q);return K.facade=F,S.set(F,K),K},V=function(F){return S.get(F)||{}},T=function(F){return S.has(F)}}else{var L=_("state");Z[L]=!0,se=function(F,K){if(D(F,L))throw he(q);return K.facade=F,P(F,L,K),K},V=function(F){return D(F,L)?F[L]:{}},T=function(F){return D(F,L)}}x.exports={set:se,get:V,has:T,enforce:J,getterFor:M}},93053:(x,N,f)=>{var v=f(58310);x.exports=Array.isArray||function(O){return v(O)=="Array"}},43152:(x,N,f)=>{var v=f(51647),C=v.all;x.exports=v.IS_HTMLDDA?function(O){return typeof O=="function"||O===C}:function(O){return typeof O=="function"}},43455:(x,N,f)=>{var v=f(90406),C=f(31982),O=f(43152),P=f(82059),D=f(97080),R=f(41524),_=function(){},Z=[],q=D("Reflect","construct"),he=/^\s*(?:class|function)\b/,re=v(he.exec),se=!he.exec(_),V=function(M){if(!O(M))return!1;try{return q(_,Z,M),!0}catch{return!1}},T=function(M){if(!O(M))return!1;switch(P(M)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return se||!!re(he,R(M))}catch{return!0}};T.sham=!0,x.exports=!q||C(function(){var J;return V(V.call)||!V(Object)||!V(function(){J=!0})||J})?T:V},51585:(x,N,f)=>{var v=f(31982),C=f(43152),O=/#|\.prototype\./,P=function(q,he){var re=R[D(q)];return re==Z?!0:re==_?!1:C(he)?v(he):!!he},D=P.normalize=function(q){return String(q).replace(O,".").toLowerCase()},R=P.data={},_=P.NATIVE="N",Z=P.POLYFILL="P";x.exports=P},71365:x=>{x.exports=function(N){return N==null}},92548:(x,N,f)=>{var v=f(43152),C=f(51647),O=C.all;x.exports=C.IS_HTMLDDA?function(P){return typeof P=="object"?P!==null:v(P)||P===O}:function(P){return typeof P=="object"?P!==null:v(P)}},39839:x=>{x.exports=!0},28609:(x,N,f)=>{var v=f(97080),C=f(43152),O=f(15166),P=f(27237),D=Object;x.exports=P?function(R){return typeof R=="symbol"}:function(R){var _=v("Symbol");return C(_)&&O(_.prototype,D(R))}},41709:(x,N,f)=>{"use strict";var v=f(98488).IteratorPrototype,C=f(73270),O=f(54686),P=f(98889),D=f(94609),R=function(){return this};x.exports=function(_,Z,q,he){var re=Z+" Iterator";return _.prototype=C(v,{next:O(+!he,q)}),P(_,re,!1,!0),D[re]=R,_}},78107:(x,N,f)=>{"use strict";var v=f(30080),C=f(12461),O=f(39839),P=f(58100),D=f(43152),R=f(41709),_=f(90851),Z=f(70738),q=f(98889),he=f(20410),re=f(27519),se=f(33538),V=f(94609),T=f(98488),J=P.PROPER,M=P.CONFIGURABLE,S=T.IteratorPrototype,L=T.BUGGY_SAFARI_ITERATORS,F=se("iterator"),K="keys",te="values",j="entries",ie=function(){return this};x.exports=function(U,Y,ce,ge,G,ve,ee){R(ce,Y,ge);var He=function(Ue){if(Ue===G&&ot)return ot;if(!L&&Ue in ct)return ct[Ue];switch(Ue){case K:return function(){return new ce(this,Ue)};case te:return function(){return new ce(this,Ue)};case j:return function(){return new ce(this,Ue)}}return function(){return new ce(this)}},Ve=Y+" Iterator",ze=!1,ct=U.prototype,ut=ct[F]||ct["@@iterator"]||G&&ct[G],ot=!L&&ut||He(G),Xt=Y=="Array"&&ct.entries||ut,dt,At,nt;if(Xt&&(dt=_(Xt.call(new U)),dt!==Object.prototype&&dt.next&&(!O&&_(dt)!==S&&(Z?Z(dt,S):D(dt[F])||re(dt,F,ie)),q(dt,Ve,!0,!0),O&&(V[Ve]=ie))),J&&G==te&&ut&&ut.name!==te&&(!O&&M?he(ct,"name",te):(ze=!0,ot=function(){return C(ut,this)})),G)if(At={values:He(te),keys:ve?ot:He(K),entries:He(j)},ee)for(nt in At)(L||ze||!(nt in ct))&&re(ct,nt,At[nt]);else v({target:Y,proto:!0,forced:L||ze},At);return(!O||ee)&&ct[F]!==ot&&re(ct,F,ot,{name:G}),V[Y]=ot,At}},98488:(x,N,f)=>{"use strict";var v=f(31982),C=f(43152),O=f(92548),P=f(73270),D=f(90851),R=f(27519),_=f(33538),Z=f(39839),q=_("iterator"),he=!1,re,se,V;[].keys&&(V=[].keys(),"next"in V?(se=D(D(V)),se!==Object.prototype&&(re=se)):he=!0);var T=!O(re)||v(function(){var J={};return re[q].call(J)!==J});T?re={}:Z&&(re=P(re)),C(re[q])||R(re,q,function(){return this}),x.exports={IteratorPrototype:re,BUGGY_SAFARI_ITERATORS:he}},94609:x=>{x.exports={}},53387:(x,N,f)=>{var v=f(62567);x.exports=function(C){return v(C.length)}},99295:x=>{var N=Math.ceil,f=Math.floor;x.exports=Math.trunc||function(C){var O=+C;return(O>0?f:N)(O)}},73270:(x,N,f)=>{var v=f(35970),C=f(98911),O=f(11792),P=f(13477),D=f(19552),R=f(45511),_=f(4580),Z=">",q="<",he="prototype",re="script",se=_("IE_PROTO"),V=function(){},T=function(F){return q+re+Z+F+q+"/"+re+Z},J=function(F){F.write(T("")),F.close();var K=F.parentWindow.Object;return F=null,K},M=function(){var F=R("iframe"),K="java"+re+":",te;return F.style.display="none",D.appendChild(F),F.src=String(K),te=F.contentWindow.document,te.open(),te.write(T("document.F=Object")),te.close(),te.F},S,L=function(){try{S=new ActiveXObject("htmlfile")}catch{}L=typeof document<"u"?document.domain&&S?J(S):M():J(S);for(var F=O.length;F--;)delete L[he][O[F]];return L()};P[se]=!0,x.exports=Object.create||function(K,te){var j;return K!==null?(V[he]=v(K),j=new V,V[he]=null,j[se]=K):j=L(),te===void 0?j:C.f(j,te)}},98911:(x,N,f)=>{var v=f(56049),C=f(98715),O=f(36133),P=f(35970),D=f(88966),R=f(16619);N.f=v&&!C?Object.defineProperties:function(Z,q){P(Z);for(var he=D(q),re=R(q),se=re.length,V=0,T;se>V;)O.f(Z,T=re[V++],he[T]);return Z}},36133:(x,N,f)=>{var v=f(56049),C=f(11314),O=f(98715),P=f(35970),D=f(5135),R=TypeError,_=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,q="enumerable",he="configurable",re="writable";N.f=v?O?function(V,T,J){if(P(V),T=D(T),P(J),typeof V=="function"&&T==="prototype"&&"value"in J&&re in J&&!J[re]){var M=Z(V,T);M&&M[re]&&(V[T]=J.value,J={configurable:he in J?J[he]:M[he],enumerable:q in J?J[q]:M[q],writable:!1})}return _(V,T,J)}:_:function(V,T,J){if(P(V),T=D(T),P(J),C)try{return _(V,T,J)}catch{}if("get"in J||"set"in J)throw R("Accessors not supported");return"value"in J&&(V[T]=J.value),V}},80016:(x,N,f)=>{var v=f(56049),C=f(12461),O=f(16457),P=f(54686),D=f(88966),R=f(5135),_=f(18768),Z=f(11314),q=Object.getOwnPropertyDescriptor;N.f=v?q:function(re,se){if(re=D(re),se=R(se),Z)try{return q(re,se)}catch{}if(_(re,se))return P(!C(O.f,re,se),re[se])}},53515:(x,N,f)=>{var v=f(58310),C=f(88966),O=f(51203).f,P=f(67932),D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],R=function(_){try{return O(_)}catch{return P(D)}};x.exports.f=function(Z){return D&&v(Z)=="Window"?R(Z):O(C(Z))}},51203:(x,N,f)=>{var v=f(4541),C=f(11792),O=C.concat("length","prototype");N.f=Object.getOwnPropertyNames||function(D){return v(D,O)}},97620:(x,N)=>{N.f=Object.getOwnPropertySymbols},90851:(x,N,f)=>{var v=f(18768),C=f(43152),O=f(53254),P=f(4580),D=f(74838),R=P("IE_PROTO"),_=Object,Z=_.prototype;x.exports=D?_.getPrototypeOf:function(q){var he=O(q);if(v(he,R))return he[R];var re=he.constructor;return C(re)&&he instanceof re?re.prototype:he instanceof _?Z:null}},15166:(x,N,f)=>{var v=f(90406);x.exports=v({}.isPrototypeOf)},4541:(x,N,f)=>{var v=f(90406),C=f(18768),O=f(88966),P=f(66322).indexOf,D=f(13477),R=v([].push);x.exports=function(_,Z){var q=O(_),he=0,re=[],se;for(se in q)!C(D,se)&&C(q,se)&&R(re,se);for(;Z.length>he;)C(q,se=Z[he++])&&(~P(re,se)||R(re,se));return re}},16619:(x,N,f)=>{var v=f(4541),C=f(11792);x.exports=Object.keys||function(P){return v(P,C)}},16457:(x,N)=>{"use strict";var f={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,C=v&&!f.call({1:2},1);N.f=C?function(P){var D=v(this,P);return!!D&&D.enumerable}:f},70738:(x,N,f)=>{var v=f(54518),C=f(35970),O=f(72185);x.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var P=!1,D={},R;try{R=v(Object.prototype,"__proto__","set"),R(D,[]),P=D instanceof Array}catch{}return function(Z,q){return C(Z),O(q),P?R(Z,q):Z.__proto__=q,Z}}():void 0)},68399:(x,N,f)=>{"use strict";var v=f(48448),C=f(82059);x.exports=v?{}.toString:function(){return"[object "+C(this)+"]"}},96380:(x,N,f)=>{var v=f(12461),C=f(43152),O=f(92548),P=TypeError;x.exports=function(D,R){var _,Z;if(R==="string"&&C(_=D.toString)&&!O(Z=v(_,D))||C(_=D.valueOf)&&!O(Z=v(_,D))||R!=="string"&&C(_=D.toString)&&!O(Z=v(_,D)))return Z;throw P("Can't convert object to primitive value")}},47813:(x,N,f)=>{var v=f(97080),C=f(90406),O=f(51203),P=f(97620),D=f(35970),R=C([].concat);x.exports=v("Reflect","ownKeys")||function(Z){var q=O.f(D(Z)),he=P.f;return he?R(q,he(Z)):q}},59921:x=>{x.exports={}},31251:(x,N,f)=>{var v=f(71365),C=TypeError;x.exports=function(O){if(v(O))throw C("Can't call method on "+O);return O}},98889:(x,N,f)=>{var v=f(48448),C=f(36133).f,O=f(20410),P=f(18768),D=f(68399),R=f(33538),_=R("toStringTag");x.exports=function(Z,q,he,re){if(Z){var se=he?Z:Z.prototype;P(se,_)||C(se,_,{configurable:!0,value:q}),re&&!v&&O(se,"toString",D)}}},4580:(x,N,f)=>{var v=f(95976),C=f(91248),O=v("keys");x.exports=function(P){return O[P]||(O[P]=C(P))}},70716:(x,N,f)=>{var v=f(62447),C=f(9267),O="__core-js_shared__",P=v[O]||C(O,{});x.exports=P},95976:(x,N,f)=>{var v=f(39839),C=f(70716);(x.exports=function(O,P){return C[O]||(C[O]=P!==void 0?P:{})})("versions",[]).push({version:"3.29.1",mode:v?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},18143:(x,N,f)=>{var v=f(90406),C=f(32041),O=f(46025),P=f(31251),D=v("".charAt),R=v("".charCodeAt),_=v("".slice),Z=function(q){return function(he,re){var se=O(P(he)),V=C(re),T=se.length,J,M;return V<0||V>=T?q?"":void 0:(J=R(se,V),J<55296||J>56319||V+1===T||(M=R(se,V+1))<56320||M>57343?q?D(se,V):J:q?_(se,V,V+2):(J-55296<<10)+(M-56320)+65536)}};x.exports={codeAt:Z(!1),charAt:Z(!0)}},71775:(x,N,f)=>{var v=f(32438),C=f(31982);x.exports=!!Object.getOwnPropertySymbols&&!C(function(){var O=Symbol();return!String(O)||!(Object(O)instanceof Symbol)||!Symbol.sham&&v&&v<41})},95679:(x,N,f)=>{var v=f(12461),C=f(97080),O=f(33538),P=f(27519);x.exports=function(){var D=C("Symbol"),R=D&&D.prototype,_=R&&R.valueOf,Z=O("toPrimitive");R&&!R[Z]&&P(R,Z,function(q){return v(_,this)},{arity:1})}},82294:(x,N,f)=>{var v=f(71775);x.exports=v&&!!Symbol.for&&!!Symbol.keyFor},13249:(x,N,f)=>{var v=f(32041),C=Math.max,O=Math.min;x.exports=function(P,D){var R=v(P);return R<0?C(R+D,0):O(R,D)}},88966:(x,N,f)=>{var v=f(38622),C=f(31251);x.exports=function(O){return v(C(O))}},32041:(x,N,f)=>{var v=f(99295);x.exports=function(C){var O=+C;return O!==O||O===0?0:v(O)}},62567:(x,N,f)=>{var v=f(32041),C=Math.min;x.exports=function(O){return O>0?C(v(O),9007199254740991):0}},53254:(x,N,f)=>{var v=f(31251),C=Object;x.exports=function(O){return C(v(O))}},37505:(x,N,f)=>{var v=f(12461),C=f(92548),O=f(28609),P=f(27529),D=f(96380),R=f(33538),_=TypeError,Z=R("toPrimitive");x.exports=function(q,he){if(!C(q)||O(q))return q;var re=P(q,Z),se;if(re){if(he===void 0&&(he="default"),se=v(re,q,he),!C(se)||O(se))return se;throw _("Can't convert object to primitive value")}return he===void 0&&(he="number"),D(q,he)}},5135:(x,N,f)=>{var v=f(37505),C=f(28609);x.exports=function(O){var P=v(O,"string");return C(P)?P:P+""}},48448:(x,N,f)=>{var v=f(33538),C=v("toStringTag"),O={};O[C]="z",x.exports=String(O)==="[object z]"},46025:(x,N,f)=>{var v=f(82059),C=String;x.exports=function(O){if(v(O)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return C(O)}},18342:x=>{var N=String;x.exports=function(f){try{return N(f)}catch{return"Object"}}},91248:(x,N,f)=>{var v=f(90406),C=0,O=Math.random(),P=v(1 .toString);x.exports=function(D){return"Symbol("+(D===void 0?"":D)+")_"+P(++C+O,36)}},27237:(x,N,f)=>{var v=f(71775);x.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},98715:(x,N,f)=>{var v=f(56049),C=f(31982);x.exports=v&&C(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},57761:(x,N,f)=>{var v=f(62447),C=f(43152),O=v.WeakMap;x.exports=C(O)&&/native code/.test(String(O))},64832:(x,N,f)=>{var v=f(59921),C=f(18768),O=f(39378),P=f(36133).f;x.exports=function(D){var R=v.Symbol||(v.Symbol={});C(R,D)||P(R,D,{value:O.f(D)})}},39378:(x,N,f)=>{var v=f(33538);N.f=v},33538:(x,N,f)=>{var v=f(62447),C=f(95976),O=f(18768),P=f(91248),D=f(71775),R=f(27237),_=v.Symbol,Z=C("wks"),q=R?_.for||_:_&&_.withoutSetter||P;x.exports=function(he){return O(Z,he)||(Z[he]=D&&O(_,he)?_[he]:q("Symbol."+he)),Z[he]}},69825:(x,N,f)=>{"use strict";var v=f(30080),C=f(31982),O=f(93053),P=f(92548),D=f(53254),R=f(53387),_=f(11452),Z=f(53437),q=f(69573),he=f(36844),re=f(33538),se=f(32438),V=re("isConcatSpreadable"),T=se>=51||!C(function(){var S=[];return S[V]=!1,S.concat()[0]!==S}),J=function(S){if(!P(S))return!1;var L=S[V];return L!==void 0?!!L:O(S)},M=!T||!he("concat");v({target:"Array",proto:!0,arity:1,forced:M},{concat:function(L){var F=D(this),K=q(F,0),te=0,j,ie,U,Y,ce;for(j=-1,U=arguments.length;j<U;j++)if(ce=j===-1?F:arguments[j],J(ce))for(Y=R(ce),_(te+Y),ie=0;ie<Y;ie++,te++)ie in ce&&Z(K,te,ce[ie]);else _(te+1),Z(K,te++,ce);return K.length=te,K}})},17802:(x,N,f)=>{"use strict";var v=f(30080),C=f(93935).filter,O=f(36844),P=O("filter");v({target:"Array",proto:!0,forced:!P},{filter:function(R){return C(this,R,arguments.length>1?arguments[1]:void 0)}})},64009:(x,N,f)=>{"use strict";var v=f(30080),C=f(24782);v({target:"Array",proto:!0,forced:[].forEach!=C},{forEach:C})},32449:(x,N,f)=>{"use strict";var v=f(30080),C=f(57953),O=f(66322).indexOf,P=f(10454),D=C([].indexOf),R=!!D&&1/D([1],1,-0)<0,_=R||!P("indexOf");v({target:"Array",proto:!0,forced:_},{indexOf:function(q){var he=arguments.length>1?arguments[1]:void 0;return R?D(this,q,he)||0:O(this,q,he)}})},44390:(x,N,f)=>{"use strict";var v=f(88966),C=f(20844),O=f(94609),P=f(44083),D=f(36133).f,R=f(78107),_=f(10248),Z=f(39839),q=f(56049),he="Array Iterator",re=P.set,se=P.getterFor(he);x.exports=R(Array,"Array",function(T,J){re(this,{type:he,target:v(T),index:0,kind:J})},function(){var T=se(this),J=T.target,M=T.kind,S=T.index++;return!J||S>=J.length?(T.target=void 0,_(void 0,!0)):M=="keys"?_(S,!1):M=="values"?_(J[S],!1):_([S,J[S]],!1)},"values");var V=O.Arguments=O.Array;if(C("keys"),C("values"),C("entries"),!Z&&q&&V.name!=="values")try{D(V,"name",{value:"values"})}catch{}},91667:()=>{},39306:(x,N,f)=>{var v=f(30080),C=f(97080),O=f(82768),P=f(12461),D=f(90406),R=f(31982),_=f(43152),Z=f(28609),q=f(53160),he=f(82850),re=f(71775),se=String,V=C("JSON","stringify"),T=D(/./.exec),J=D("".charAt),M=D("".charCodeAt),S=D("".replace),L=D(1 .toString),F=/[\uD800-\uDFFF]/g,K=/^[\uD800-\uDBFF]$/,te=/^[\uDC00-\uDFFF]$/,j=!re||R(function(){var ce=C("Symbol")();return V([ce])!="[null]"||V({a:ce})!="{}"||V(Object(ce))!="{}"}),ie=R(function(){return V("\uDF06\uD834")!=='"\\udf06\\ud834"'||V("\uDEAD")!=='"\\udead"'}),U=function(ce,ge){var G=q(arguments),ve=he(ge);if(!(!_(ve)&&(ce===void 0||Z(ce))))return G[1]=function(ee,He){if(_(ve)&&(He=P(ve,this,se(ee),He)),!Z(He))return He},O(V,null,G)},Y=function(ce,ge,G){var ve=J(G,ge-1),ee=J(G,ge+1);return T(K,ce)&&!T(te,ee)||T(te,ce)&&!T(K,ve)?"\\u"+L(M(ce,0),16):ce};V&&v({target:"JSON",stat:!0,arity:3,forced:j||ie},{stringify:function(ge,G,ve){var ee=q(arguments),He=O(j?U:V,null,ee);return ie&&typeof He=="string"?S(He,F,Y):He}})},23870:(x,N,f)=>{var v=f(62447),C=f(98889);C(v.JSON,"JSON",!0)},5828:()=>{},28135:(x,N,f)=>{var v=f(30080),C=f(56049),O=f(98911).f;v({target:"Object",stat:!0,forced:Object.defineProperties!==O,sham:!C},{defineProperties:O})},70829:(x,N,f)=>{var v=f(30080),C=f(56049),O=f(36133).f;v({target:"Object",stat:!0,forced:Object.defineProperty!==O,sham:!C},{defineProperty:O})},51964:(x,N,f)=>{var v=f(30080),C=f(31982),O=f(88966),P=f(80016).f,D=f(56049),R=!D||C(function(){P(1)});v({target:"Object",stat:!0,forced:R,sham:!D},{getOwnPropertyDescriptor:function(Z,q){return P(O(Z),q)}})},723:(x,N,f)=>{var v=f(30080),C=f(56049),O=f(47813),P=f(88966),D=f(80016),R=f(53437);v({target:"Object",stat:!0,sham:!C},{getOwnPropertyDescriptors:function(Z){for(var q=P(Z),he=D.f,re=O(q),se={},V=0,T,J;re.length>V;)J=he(q,T=re[V++]),J!==void 0&&R(se,T,J);return se}})},86884:(x,N,f)=>{var v=f(30080),C=f(71775),O=f(31982),P=f(97620),D=f(53254),R=!C||O(function(){P.f(1)});v({target:"Object",stat:!0,forced:R},{getOwnPropertySymbols:function(Z){var q=P.f;return q?q(D(Z)):[]}})},38339:(x,N,f)=>{var v=f(30080),C=f(53254),O=f(16619),P=f(31982),D=P(function(){O(1)});v({target:"Object",stat:!0,forced:D},{keys:function(_){return O(C(_))}})},97829:()=>{},5708:()=>{},27626:(x,N,f)=>{"use strict";var v=f(18143).charAt,C=f(46025),O=f(44083),P=f(78107),D=f(10248),R="String Iterator",_=O.set,Z=O.getterFor(R);P(String,"String",function(q){_(this,{type:R,string:C(q),index:0})},function(){var he=Z(this),re=he.string,se=he.index,V;return se>=re.length?D(void 0,!0):(V=v(re,se),he.index+=V.length,D(V,!1))})},95353:(x,N,f)=>{var v=f(64832);v("asyncIterator")},16212:(x,N,f)=>{"use strict";var v=f(30080),C=f(62447),O=f(12461),P=f(90406),D=f(39839),R=f(56049),_=f(71775),Z=f(31982),q=f(18768),he=f(15166),re=f(35970),se=f(88966),V=f(5135),T=f(46025),J=f(54686),M=f(73270),S=f(16619),L=f(51203),F=f(53515),K=f(97620),te=f(80016),j=f(36133),ie=f(98911),U=f(16457),Y=f(27519),ce=f(37912),ge=f(95976),G=f(4580),ve=f(13477),ee=f(91248),He=f(33538),Ve=f(39378),ze=f(64832),ct=f(95679),ut=f(98889),ot=f(44083),Xt=f(93935).forEach,dt=G("hidden"),At="Symbol",nt="prototype",Ue=ot.set,Fe=ot.getterFor(At),Be=Object[nt],it=C.Symbol,Dt=it&&it[nt],qe=C.TypeError,xt=C.QObject,Jt=te.f,er=j.f,dr=F.f,Qe=U.f,bt=P([].push),Lt=ge("symbols"),Ar=ge("op-symbols"),Ft=ge("wks"),hn=!xt||!xt[nt]||!xt[nt].findChild,pn=R&&Z(function(){return M(er({},"a",{get:function(){return er(this,"a",{value:7}).a}})).a!=7})?function(mt,at,Ze){var ht=Jt(Be,at);ht&&delete Be[at],er(mt,at,Ze),ht&&mt!==Be&&er(Be,at,ht)}:er,Wr=function(mt,at){var Ze=Lt[mt]=M(Dt);return Ue(Ze,{type:At,tag:mt,description:at}),R||(Ze.description=at),Ze},tn=function(at,Ze,ht){at===Be&&tn(Ar,Ze,ht),re(at);var ne=V(Ze);return re(ht),q(Lt,ne)?(ht.enumerable?(q(at,dt)&&at[dt][ne]&&(at[dt][ne]=!1),ht=M(ht,{enumerable:J(0,!1)})):(q(at,dt)||er(at,dt,J(1,{})),at[dt][ne]=!0),pn(at,ne,ht)):er(at,ne,ht)},kn=function(at,Ze){re(at);var ht=se(Ze),ne=S(ht).concat(Rt(ht));return Xt(ne,function(be){(!R||O(Hr,ht,be))&&tn(at,be,ht[be])}),at},vn=function(at,Ze){return Ze===void 0?M(at):kn(M(at),Ze)},Hr=function(at){var Ze=V(at),ht=O(Qe,this,Ze);return this===Be&&q(Lt,Ze)&&!q(Ar,Ze)?!1:ht||!q(this,Ze)||!q(Lt,Ze)||q(this,dt)&&this[dt][Ze]?ht:!0},vr=function(at,Ze){var ht=se(at),ne=V(Ze);if(!(ht===Be&&q(Lt,ne)&&!q(Ar,ne))){var be=Jt(ht,ne);return be&&q(Lt,ne)&&!(q(ht,dt)&&ht[dt][ne])&&(be.enumerable=!0),be}},Or=function(at){var Ze=dr(se(at)),ht=[];return Xt(Ze,function(ne){!q(Lt,ne)&&!q(ve,ne)&&bt(ht,ne)}),ht},Rt=function(mt){var at=mt===Be,Ze=dr(at?Ar:se(mt)),ht=[];return Xt(Ze,function(ne){q(Lt,ne)&&(!at||q(Be,ne))&&bt(ht,Lt[ne])}),ht};_||(it=function(){if(he(Dt,this))throw qe("Symbol is not a constructor");var at=!arguments.length||arguments[0]===void 0?void 0:T(arguments[0]),Ze=ee(at),ht=function(ne){this===Be&&O(ht,Ar,ne),q(this,dt)&&q(this[dt],Ze)&&(this[dt][Ze]=!1),pn(this,Ze,J(1,ne))};return R&&hn&&pn(Be,Ze,{configurable:!0,set:ht}),Wr(Ze,at)},Dt=it[nt],Y(Dt,"toString",function(){return Fe(this).tag}),Y(it,"withoutSetter",function(mt){return Wr(ee(mt),mt)}),U.f=Hr,j.f=tn,ie.f=kn,te.f=vr,L.f=F.f=Or,K.f=Rt,Ve.f=function(mt){return Wr(He(mt),mt)},R&&(ce(Dt,"description",{configurable:!0,get:function(){return Fe(this).description}}),D||Y(Be,"propertyIsEnumerable",Hr,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!_,sham:!_},{Symbol:it}),Xt(S(Ft),function(mt){ze(mt)}),v({target:At,stat:!0,forced:!_},{useSetter:function(){hn=!0},useSimple:function(){hn=!1}}),v({target:"Object",stat:!0,forced:!_,sham:!R},{create:vn,defineProperty:tn,defineProperties:kn,getOwnPropertyDescriptor:vr}),v({target:"Object",stat:!0,forced:!_},{getOwnPropertyNames:Or}),ct(),ut(it,At),ve[dt]=!0},63906:()=>{},3598:(x,N,f)=>{var v=f(30080),C=f(97080),O=f(18768),P=f(46025),D=f(95976),R=f(82294),_=D("string-to-symbol-registry"),Z=D("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!R},{for:function(q){var he=P(q);if(O(_,he))return _[he];var re=C("Symbol")(he);return _[he]=re,Z[re]=he,re}})},39542:(x,N,f)=>{var v=f(64832);v("hasInstance")},47882:(x,N,f)=>{var v=f(64832);v("isConcatSpreadable")},84911:(x,N,f)=>{var v=f(64832);v("iterator")},68030:(x,N,f)=>{f(16212),f(3598),f(50338),f(39306),f(86884)},50338:(x,N,f)=>{var v=f(30080),C=f(18768),O=f(28609),P=f(18342),D=f(95976),R=f(82294),_=D("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!R},{keyFor:function(q){if(!O(q))throw TypeError(P(q)+" is not a symbol");if(C(_,q))return _[q]}})},47954:(x,N,f)=>{var v=f(64832);v("matchAll")},88725:(x,N,f)=>{var v=f(64832);v("match")},67703:(x,N,f)=>{var v=f(64832);v("replace")},2220:(x,N,f)=>{var v=f(64832);v("search")},48990:(x,N,f)=>{var v=f(64832);v("species")},50240:(x,N,f)=>{var v=f(64832);v("split")},99921:(x,N,f)=>{var v=f(64832),C=f(95679);v("toPrimitive"),C()},3502:(x,N,f)=>{var v=f(97080),C=f(64832),O=f(98889);C("toStringTag"),O(v("Symbol"),"Symbol")},80220:(x,N,f)=>{var v=f(64832);v("unscopables")},45987:(x,N,f)=>{var v=f(64832);v("asyncDispose")},42319:(x,N,f)=>{var v=f(64832);v("dispose")},58052:(x,N,f)=>{var v=f(30080),C=f(97080),O=f(90406),P=C("Symbol"),D=P.keyFor,R=O(P.prototype.valueOf);v({target:"Symbol",stat:!0},{isRegistered:function(Z){try{return D(R(Z))!==void 0}catch{return!1}}})},90181:(x,N,f)=>{for(var v=f(30080),C=f(95976),O=f(97080),P=f(90406),D=f(28609),R=f(33538),_=O("Symbol"),Z=_.isWellKnown,q=O("Object","getOwnPropertyNames"),he=P(_.prototype.valueOf),re=C("wks"),se=0,V=q(_),T=V.length;se<T;se++)try{var J=V[se];D(_[J])&&R(J)}catch{}v({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(S){if(Z&&Z(S))return!0;try{for(var L=he(S),F=0,K=q(re),te=K.length;F<te;F++)if(re[K[F]]==L)return!0}catch{}return!1}})},25129:(x,N,f)=>{var v=f(64832);v("matcher")},90397:(x,N,f)=>{var v=f(64832);v("metadataKey")},82793:(x,N,f)=>{var v=f(64832);v("metadata")},18097:(x,N,f)=>{var v=f(64832);v("observable")},52100:(x,N,f)=>{var v=f(64832);v("patternMatch")},99742:(x,N,f)=>{var v=f(64832);v("replaceAll")},48713:(x,N,f)=>{f(44390);var v=f(81595),C=f(62447),O=f(82059),P=f(20410),D=f(94609),R=f(33538),_=R("toStringTag");for(var Z in v){var q=C[Z],he=q&&q.prototype;he&&O(he)!==_&&P(he,_,Z),D[Z]=D.Array}},41544:(x,N,f)=>{var v=f(94537);x.exports=v},44928:(x,N,f)=>{var v=f(55794);x.exports=v},26087:(x,N,f)=>{f(48713);var v=f(82059),C=f(18768),O=f(15166),P=f(41544),D=Array.prototype,R={DOMTokenList:!0,NodeList:!0};x.exports=function(_){var Z=_.forEach;return _===D||O(D,_)&&Z===D.forEach||C(R,v(_))?P:Z}},11783:(x,N,f)=>{var v=f(85838);x.exports=v},88462:(x,N,f)=>{var v=f(95617);x.exports=v},83531:(x,N,f)=>{var v=f(11906);x.exports=v},19941:(x,N,f)=>{var v=f(59123);x.exports=v},25081:(x,N,f)=>{var v=f(63332);x.exports=v},22145:(x,N,f)=>{var v=f(83606);x.exports=v},93690:(x,N,f)=>{var v=f(90660);x.exports=v},8429:(x,N,f)=>{var v=f(49198);f(48713),x.exports=v},13099:(x,N,f)=>{var v=f(15413);f(48713),x.exports=v},44931:(x,N,f)=>{var v=f(4793);x.exports=v},81933:function(){(function(x){var N=function(f){var v={searchParams:"URLSearchParams"in x,iterable:"Symbol"in x&&"iterator"in Symbol,blob:"FileReader"in x&&"Blob"in x&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in x,arrayBuffer:"ArrayBuffer"in x};function C(U){return U&&DataView.prototype.isPrototypeOf(U)}if(v.arrayBuffer)var O=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],P=ArrayBuffer.isView||function(U){return U&&O.indexOf(Object.prototype.toString.call(U))>-1};function D(U){if(typeof U!="string"&&(U=String(U)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(U))throw new TypeError("Invalid character in header field name");return U.toLowerCase()}function R(U){return typeof U!="string"&&(U=String(U)),U}function _(U){var Y={next:function(){var ce=U.shift();return{done:ce===void 0,value:ce}}};return v.iterable&&(Y[Symbol.iterator]=function(){return Y}),Y}function Z(U){this.map={},U instanceof Z?U.forEach(function(Y,ce){this.append(ce,Y)},this):Array.isArray(U)?U.forEach(function(Y){this.append(Y[0],Y[1])},this):U&&Object.getOwnPropertyNames(U).forEach(function(Y){this.append(Y,U[Y])},this)}Z.prototype.append=function(U,Y){U=D(U),Y=R(Y);var ce=this.map[U];this.map[U]=ce?ce+", "+Y:Y},Z.prototype.delete=function(U){delete this.map[D(U)]},Z.prototype.get=function(U){return U=D(U),this.has(U)?this.map[U]:null},Z.prototype.has=function(U){return this.map.hasOwnProperty(D(U))},Z.prototype.set=function(U,Y){this.map[D(U)]=R(Y)},Z.prototype.forEach=function(U,Y){for(var ce in this.map)this.map.hasOwnProperty(ce)&&U.call(Y,this.map[ce],ce,this)},Z.prototype.keys=function(){var U=[];return this.forEach(function(Y,ce){U.push(ce)}),_(U)},Z.prototype.values=function(){var U=[];return this.forEach(function(Y){U.push(Y)}),_(U)},Z.prototype.entries=function(){var U=[];return this.forEach(function(Y,ce){U.push([ce,Y])}),_(U)},v.iterable&&(Z.prototype[Symbol.iterator]=Z.prototype.entries);function q(U){if(U.bodyUsed)return Promise.reject(new TypeError("Already read"));U.bodyUsed=!0}function he(U){return new Promise(function(Y,ce){U.onload=function(){Y(U.result)},U.onerror=function(){ce(U.error)}})}function re(U){var Y=new FileReader,ce=he(Y);return Y.readAsArrayBuffer(U),ce}function se(U){var Y=new FileReader,ce=he(Y);return Y.readAsText(U),ce}function V(U){for(var Y=new Uint8Array(U),ce=new Array(Y.length),ge=0;ge<Y.length;ge++)ce[ge]=String.fromCharCode(Y[ge]);return ce.join("")}function T(U){if(U.slice)return U.slice(0);var Y=new Uint8Array(U.byteLength);return Y.set(new Uint8Array(U)),Y.buffer}function J(){return this.bodyUsed=!1,this._initBody=function(U){this._bodyInit=U,U?typeof U=="string"?this._bodyText=U:v.blob&&Blob.prototype.isPrototypeOf(U)?this._bodyBlob=U:v.formData&&FormData.prototype.isPrototypeOf(U)?this._bodyFormData=U:v.searchParams&&URLSearchParams.prototype.isPrototypeOf(U)?this._bodyText=U.toString():v.arrayBuffer&&v.blob&&C(U)?(this._bodyArrayBuffer=T(U.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):v.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(U)||P(U))?this._bodyArrayBuffer=T(U):this._bodyText=U=Object.prototype.toString.call(U):this._bodyText="",this.headers.get("content-type")||(typeof U=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(U)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var U=q(this);if(U)return U;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?q(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(re)}),this.text=function(){var U=q(this);if(U)return U;if(this._bodyBlob)return se(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(V(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}var M=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(U){var Y=U.toUpperCase();return M.indexOf(Y)>-1?Y:U}function L(U,Y){Y=Y||{};var ce=Y.body;if(U instanceof L){if(U.bodyUsed)throw new TypeError("Already read");this.url=U.url,this.credentials=U.credentials,Y.headers||(this.headers=new Z(U.headers)),this.method=U.method,this.mode=U.mode,this.signal=U.signal,!ce&&U._bodyInit!=null&&(ce=U._bodyInit,U.bodyUsed=!0)}else this.url=String(U);if(this.credentials=Y.credentials||this.credentials||"same-origin",(Y.headers||!this.headers)&&(this.headers=new Z(Y.headers)),this.method=S(Y.method||this.method||"GET"),this.mode=Y.mode||this.mode||null,this.signal=Y.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ce)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ce)}L.prototype.clone=function(){return new L(this,{body:this._bodyInit})};function F(U){var Y=new FormData;return U.trim().split("&").forEach(function(ce){if(ce){var ge=ce.split("="),G=ge.shift().replace(/\+/g," "),ve=ge.join("=").replace(/\+/g," ");Y.append(decodeURIComponent(G),decodeURIComponent(ve))}}),Y}function K(U){var Y=new Z,ce=U.replace(/\r?\n[\t ]+/g," ");return ce.split(/\r?\n/).forEach(function(ge){var G=ge.split(":"),ve=G.shift().trim();if(ve){var ee=G.join(":").trim();Y.append(ve,ee)}}),Y}J.call(L.prototype);function te(U,Y){Y||(Y={}),this.type="default",this.status=Y.status===void 0?200:Y.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in Y?Y.statusText:"OK",this.headers=new Z(Y.headers),this.url=Y.url||"",this._initBody(U)}J.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Z(this.headers),url:this.url})},te.error=function(){var U=new te(null,{status:0,statusText:""});return U.type="error",U};var j=[301,302,303,307,308];te.redirect=function(U,Y){if(j.indexOf(Y)===-1)throw new RangeError("Invalid status code");return new te(null,{status:Y,headers:{location:U}})},f.DOMException=x.DOMException;try{new f.DOMException}catch{f.DOMException=function(Y,ce){this.message=Y,this.name=ce;var ge=Error(Y);this.stack=ge.stack},f.DOMException.prototype=Object.create(Error.prototype),f.DOMException.prototype.constructor=f.DOMException}function ie(U,Y){return new Promise(function(ce,ge){var G=new L(U,Y);if(G.signal&&G.signal.aborted)return ge(new f.DOMException("Aborted","AbortError"));var ve=new XMLHttpRequest;function ee(){ve.abort()}ve.onload=function(){var He={status:ve.status,statusText:ve.statusText,headers:K(ve.getAllResponseHeaders()||"")};He.url="responseURL"in ve?ve.responseURL:He.headers.get("X-Request-URL");var Ve="response"in ve?ve.response:ve.responseText;ce(new te(Ve,He))},ve.onerror=function(){ge(new TypeError("Network request failed"))},ve.ontimeout=function(){ge(new TypeError("Network request failed"))},ve.onabort=function(){ge(new f.DOMException("Aborted","AbortError"))},ve.open(G.method,G.url,!0),G.credentials==="include"?ve.withCredentials=!0:G.credentials==="omit"&&(ve.withCredentials=!1),"responseType"in ve&&v.blob&&(ve.responseType="blob"),G.headers.forEach(function(He,Ve){ve.setRequestHeader(Ve,He)}),G.signal&&(G.signal.addEventListener("abort",ee),ve.onreadystatechange=function(){ve.readyState===4&&G.signal.removeEventListener("abort",ee)}),ve.send(typeof G._bodyInit>"u"?null:G._bodyInit)})}return ie.polyfill=!0,x.fetch||(x.fetch=ie,x.Headers=Z,x.Request=L,x.Response=te),f.Headers=Z,f.Request=L,f.Response=te,f.fetch=ie,Object.defineProperty(f,"__esModule",{value:!0}),f}({})})(typeof self<"u"?self:this)},20788:(x,N,f)=>{"use strict";f.r(N),f.d(N,{default:()=>R});var v=f(64737),C=f.n(v),O=f(62578),P=f.n(O),D=P()(C());D.push([x.id,`.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
|
|
42
|
-
`,""]);const
|
|
43
|
-
`,""]);const
|
|
44
|
-
`,""]);const
|
|
45
|
-
`,""]);const
|
|
41
|
+
*/R.parse=O,R.serialize=k;var c=Object.prototype.toString,m=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function O(te,re){if(typeof te!="string")throw new TypeError("argument str must be a string");for(var he={},oe=re||{},fe=oe.decode||L,J=0;J<te.length;){var F=te.indexOf("=",J);if(F===-1)break;var ee=te.indexOf(";",J);if(ee===-1)ee=te.length;else if(ee<F){J=te.lastIndexOf(";",F-1)+1;continue}var N=te.slice(J,F).trim();if(he[N]===void 0){var w=te.slice(F+1,ee).trim();w.charCodeAt(0)===34&&(w=w.slice(1,-1)),he[N]=X(w,fe)}J=ee+1}return he}function k(te,re,he){var oe=he||{},fe=oe.encode||D;if(typeof fe!="function")throw new TypeError("option encode is invalid");if(!m.test(te))throw new TypeError("argument name is invalid");var J=fe(re);if(J&&!m.test(J))throw new TypeError("argument val is invalid");var F=te+"="+J;if(oe.maxAge!=null){var ee=oe.maxAge-0;if(isNaN(ee)||!isFinite(ee))throw new TypeError("option maxAge is invalid");F+="; Max-Age="+Math.floor(ee)}if(oe.domain){if(!m.test(oe.domain))throw new TypeError("option domain is invalid");F+="; Domain="+oe.domain}if(oe.path){if(!m.test(oe.path))throw new TypeError("option path is invalid");F+="; Path="+oe.path}if(oe.expires){var N=oe.expires;if(!j(N)||isNaN(N.valueOf()))throw new TypeError("option expires is invalid");F+="; Expires="+N.toUTCString()}if(oe.httpOnly&&(F+="; HttpOnly"),oe.secure&&(F+="; Secure"),oe.priority){var w=typeof oe.priority=="string"?oe.priority.toLowerCase():oe.priority;switch(w){case"low":F+="; Priority=Low";break;case"medium":F+="; Priority=Medium";break;case"high":F+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(oe.sameSite){var M=typeof oe.sameSite=="string"?oe.sameSite.toLowerCase():oe.sameSite;switch(M){case!0:F+="; SameSite=Strict";break;case"lax":F+="; SameSite=Lax";break;case"strict":F+="; SameSite=Strict";break;case"none":F+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return F}function L(te){return te.indexOf("%")!==-1?decodeURIComponent(te):te}function D(te){return encodeURIComponent(te)}function j(te){return c.call(te)==="[object Date]"||te instanceof Date}function X(te,re){try{return re(te)}catch{return te}}},97529:(S,R,c)=>{var m=c(44928);S.exports=m},75342:(S,R,c)=>{var m=c(26087);S.exports=m},64218:(S,R,c)=>{var m=c(11783);S.exports=m},95050:(S,R,c)=>{var m=c(88462);S.exports=m},84779:(S,R,c)=>{var m=c(83531);S.exports=m},17190:(S,R,c)=>{var m=c(19941);S.exports=m},96589:(S,R,c)=>{var m=c(25081);S.exports=m},32276:(S,R,c)=>{var m=c(22145);S.exports=m},15064:(S,R,c)=>{var m=c(93690);S.exports=m},31986:(S,R,c)=>{var m=c(8429);c(42319),S.exports=m},69635:(S,R,c)=>{var m=c(13099);S.exports=m},3529:(S,R,c)=>{var m=c(44931);S.exports=m},85373:(S,R,c)=>{c(17802);var m=c(70291);S.exports=m("Array").filter},94537:(S,R,c)=>{c(64009);var m=c(70291);S.exports=m("Array").forEach},27794:(S,R,c)=>{c(32449);var m=c(70291);S.exports=m("Array").indexOf},55794:(S,R,c)=>{var m=c(15166),O=c(85373),k=Array.prototype;S.exports=function(L){var D=L.filter;return L===k||m(k,L)&&D===k.filter?O:D}},85838:(S,R,c)=>{var m=c(15166),O=c(27794),k=Array.prototype;S.exports=function(L){var D=L.indexOf;return L===k||m(k,L)&&D===k.indexOf?O:D}},95617:(S,R,c)=>{c(28135);var m=c(59921),O=m.Object,k=S.exports=function(D,j){return O.defineProperties(D,j)};O.defineProperties.sham&&(k.sham=!0)},11906:(S,R,c)=>{c(70829);var m=c(59921),O=m.Object,k=S.exports=function(D,j,X){return O.defineProperty(D,j,X)};O.defineProperty.sham&&(k.sham=!0)},59123:(S,R,c)=>{c(51964);var m=c(59921),O=m.Object,k=S.exports=function(D,j){return O.getOwnPropertyDescriptor(D,j)};O.getOwnPropertyDescriptor.sham&&(k.sham=!0)},63332:(S,R,c)=>{c(723);var m=c(59921);S.exports=m.Object.getOwnPropertyDescriptors},83606:(S,R,c)=>{c(68030);var m=c(59921);S.exports=m.Object.getOwnPropertySymbols},90660:(S,R,c)=>{c(38339);var m=c(59921);S.exports=m.Object.keys},49198:(S,R,c)=>{c(69825),c(97829),c(68030),c(95353),c(63906),c(39542),c(47882),c(84911),c(88725),c(47954),c(67703),c(2220),c(48990),c(50240),c(99921),c(3502),c(80220),c(23870),c(5828),c(5708);var m=c(59921);S.exports=m.Symbol},15413:(S,R,c)=>{c(44390),c(97829),c(27626),c(84911);var m=c(39378);S.exports=m.f("iterator")},4793:(S,R,c)=>{c(91667),c(99921);var m=c(39378);S.exports=m.f("toPrimitive")},24018:(S,R,c)=>{S.exports=c(11226)},27411:(S,R,c)=>{S.exports=c(39743)},79155:(S,R,c)=>{S.exports=c(17018)},13375:(S,R,c)=>{S.exports=c(45057)},95442:(S,R,c)=>{S.exports=c(97947)},55334:(S,R,c)=>{S.exports=c(26452)},48261:(S,R,c)=>{S.exports=c(4477)},92864:(S,R,c)=>{S.exports=c(74013)},27923:(S,R,c)=>{S.exports=c(17685)},89225:(S,R,c)=>{S.exports=c(2371)},95281:(S,R,c)=>{S.exports=c(89061)},55468:(S,R,c)=>{S.exports=c(51553)},11226:(S,R,c)=>{var m=c(97529);S.exports=m},39743:(S,R,c)=>{var m=c(75342);S.exports=m},17018:(S,R,c)=>{var m=c(64218);S.exports=m},45057:(S,R,c)=>{var m=c(95050);S.exports=m},97947:(S,R,c)=>{var m=c(84779);S.exports=m},26452:(S,R,c)=>{var m=c(17190);S.exports=m},4477:(S,R,c)=>{var m=c(96589);S.exports=m},74013:(S,R,c)=>{var m=c(32276);S.exports=m},17685:(S,R,c)=>{var m=c(15064);S.exports=m},2371:(S,R,c)=>{var m=c(31986);c(45987),c(58052),c(90181),c(25129),c(90397),c(18097),c(82793),c(52100),c(20122),S.exports=m},89061:(S,R,c)=>{var m=c(69635);S.exports=m},51553:(S,R,c)=>{var m=c(3529);S.exports=m},81970:(S,R,c)=>{var m=c(43152),O=c(18342),k=TypeError;S.exports=function(L){if(m(L))return L;throw k(O(L)+" is not a function")}},72185:(S,R,c)=>{var m=c(43152),O=String,k=TypeError;S.exports=function(L){if(typeof L=="object"||m(L))return L;throw k("Can't set "+O(L)+" as a prototype")}},20844:S=>{S.exports=function(){}},35970:(S,R,c)=>{var m=c(92548),O=String,k=TypeError;S.exports=function(L){if(m(L))return L;throw k(O(L)+" is not an object")}},24782:(S,R,c)=>{"use strict";var m=c(93935).forEach,O=c(10454),k=O("forEach");S.exports=k?[].forEach:function(D){return m(this,D,arguments.length>1?arguments[1]:void 0)}},66322:(S,R,c)=>{var m=c(88966),O=c(13249),k=c(53387),L=function(D){return function(j,X,te){var re=m(j),he=k(re),oe=O(te,he),fe;if(D&&X!=X){for(;he>oe;)if(fe=re[oe++],fe!=fe)return!0}else for(;he>oe;oe++)if((D||oe in re)&&re[oe]===X)return D||oe||0;return!D&&-1}};S.exports={includes:L(!0),indexOf:L(!1)}},93935:(S,R,c)=>{var m=c(7416),O=c(90406),k=c(38622),L=c(53254),D=c(53387),j=c(69573),X=O([].push),te=function(re){var he=re==1,oe=re==2,fe=re==3,J=re==4,F=re==6,ee=re==7,N=re==5||F;return function(w,M,B,Z){for(var ae=L(w),H=k(ae),le=m(M,B),z=D(H),q=0,pe=Z||j,xe=he?pe(w,z):oe||ee?pe(w,0):void 0,Q,ye;z>q;q++)if((N||q in H)&&(Q=H[q],ye=le(Q,q,ae),re))if(he)xe[q]=ye;else if(ye)switch(re){case 3:return!0;case 5:return Q;case 6:return q;case 2:X(xe,Q)}else switch(re){case 4:return!1;case 7:X(xe,Q)}return F?-1:fe||J?J:xe}};S.exports={forEach:te(0),map:te(1),filter:te(2),some:te(3),every:te(4),find:te(5),findIndex:te(6),filterReject:te(7)}},36844:(S,R,c)=>{var m=c(31982),O=c(33538),k=c(32438),L=O("species");S.exports=function(D){return k>=51||!m(function(){var j=[],X=j.constructor={};return X[L]=function(){return{foo:1}},j[D](Boolean).foo!==1})}},10454:(S,R,c)=>{"use strict";var m=c(31982);S.exports=function(O,k){var L=[][O];return!!L&&m(function(){L.call(null,k||function(){return 1},1)})}},67932:(S,R,c)=>{var m=c(13249),O=c(53387),k=c(53437),L=Array,D=Math.max;S.exports=function(j,X,te){for(var re=O(j),he=m(X,re),oe=m(te===void 0?re:te,re),fe=L(D(oe-he,0)),J=0;he<oe;he++,J++)k(fe,J,j[he]);return fe.length=J,fe}},53160:(S,R,c)=>{var m=c(90406);S.exports=m([].slice)},76562:(S,R,c)=>{var m=c(93053),O=c(43455),k=c(92548),L=c(33538),D=L("species"),j=Array;S.exports=function(X){var te;return m(X)&&(te=X.constructor,O(te)&&(te===j||m(te.prototype))?te=void 0:k(te)&&(te=te[D],te===null&&(te=void 0))),te===void 0?j:te}},69573:(S,R,c)=>{var m=c(76562);S.exports=function(O,k){return new(m(O))(k===0?0:k)}},58310:(S,R,c)=>{var m=c(90406),O=m({}.toString),k=m("".slice);S.exports=function(L){return k(O(L),8,-1)}},82059:(S,R,c)=>{var m=c(48448),O=c(43152),k=c(58310),L=c(33538),D=L("toStringTag"),j=Object,X=k(function(){return arguments}())=="Arguments",te=function(re,he){try{return re[he]}catch{}};S.exports=m?k:function(re){var he,oe,fe;return re===void 0?"Undefined":re===null?"Null":typeof(oe=te(he=j(re),D))=="string"?oe:X?k(he):(fe=k(he))=="Object"&&O(he.callee)?"Arguments":fe}},74838:(S,R,c)=>{var m=c(31982);S.exports=!m(function(){function O(){}return O.prototype.constructor=null,Object.getPrototypeOf(new O)!==O.prototype})},10248:S=>{S.exports=function(R,c){return{value:R,done:c}}},20410:(S,R,c)=>{var m=c(56049),O=c(36133),k=c(54686);S.exports=m?function(L,D,j){return O.f(L,D,k(1,j))}:function(L,D,j){return L[D]=j,L}},54686:S=>{S.exports=function(R,c){return{enumerable:!(R&1),configurable:!(R&2),writable:!(R&4),value:c}}},53437:(S,R,c)=>{"use strict";var m=c(5135),O=c(36133),k=c(54686);S.exports=function(L,D,j){var X=m(D);X in L?O.f(L,X,k(0,j)):L[X]=j}},37912:(S,R,c)=>{var m=c(36133);S.exports=function(O,k,L){return m.f(O,k,L)}},27519:(S,R,c)=>{var m=c(20410);S.exports=function(O,k,L,D){return D&&D.enumerable?O[k]=L:m(O,k,L),O}},9267:(S,R,c)=>{var m=c(62447),O=Object.defineProperty;S.exports=function(k,L){try{O(m,k,{value:L,configurable:!0,writable:!0})}catch{m[k]=L}return L}},56049:(S,R,c)=>{var m=c(31982);S.exports=!m(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},51647:S=>{var R=typeof document=="object"&&document.all,c=typeof R>"u"&&R!==void 0;S.exports={all:R,IS_HTMLDDA:c}},45511:(S,R,c)=>{var m=c(62447),O=c(92548),k=m.document,L=O(k)&&O(k.createElement);S.exports=function(D){return L?k.createElement(D):{}}},11452:S=>{var R=TypeError,c=9007199254740991;S.exports=function(m){if(m>c)throw R("Maximum allowed index exceeded");return m}},81595:S=>{S.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},90740:S=>{S.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},32438:(S,R,c)=>{var m=c(62447),O=c(90740),k=m.process,L=m.Deno,D=k&&k.versions||L&&L.version,j=D&&D.v8,X,te;j&&(X=j.split("."),te=X[0]>0&&X[0]<4?1:+(X[0]+X[1])),!te&&O&&(X=O.match(/Edge\/(\d+)/),(!X||X[1]>=74)&&(X=O.match(/Chrome\/(\d+)/),X&&(te=+X[1]))),S.exports=te},70291:(S,R,c)=>{var m=c(59921);S.exports=function(O){return m[O+"Prototype"]}},11792:S=>{S.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},30080:(S,R,c)=>{"use strict";var m=c(62447),O=c(82768),k=c(57953),L=c(43152),D=c(80016).f,j=c(51585),X=c(59921),te=c(7416),re=c(20410),he=c(18768),oe=function(fe){var J=function(F,ee,N){if(this instanceof J){switch(arguments.length){case 0:return new fe;case 1:return new fe(F);case 2:return new fe(F,ee)}return new fe(F,ee,N)}return O(fe,this,arguments)};return J.prototype=fe.prototype,J};S.exports=function(fe,J){var F=fe.target,ee=fe.global,N=fe.stat,w=fe.proto,M=ee?m:N?m[F]:(m[F]||{}).prototype,B=ee?X:X[F]||re(X,F,{})[F],Z=B.prototype,ae,H,le,z,q,pe,xe,Q,ye;for(z in J)ae=j(ee?z:F+(N?".":"#")+z,fe.forced),H=!ae&&M&&he(M,z),pe=B[z],H&&(fe.dontCallGetSet?(ye=D(M,z),xe=ye&&ye.value):xe=M[z]),q=H&&xe?xe:J[z],!(H&&typeof pe==typeof q)&&(fe.bind&&H?Q=te(q,m):fe.wrap&&H?Q=oe(q):w&&L(q)?Q=k(q):Q=q,(fe.sham||q&&q.sham||pe&&pe.sham)&&re(Q,"sham",!0),re(B,z,Q),w&&(le=F+"Prototype",he(X,le)||re(X,le,{}),re(X[le],z,q),fe.real&&Z&&(ae||!Z[z])&&re(Z,z,q)))}},31982:S=>{S.exports=function(R){try{return!!R()}catch{return!0}}},82768:(S,R,c)=>{var m=c(97966),O=Function.prototype,k=O.apply,L=O.call;S.exports=typeof Reflect=="object"&&Reflect.apply||(m?L.bind(k):function(){return L.apply(k,arguments)})},7416:(S,R,c)=>{var m=c(57953),O=c(81970),k=c(97966),L=m(m.bind);S.exports=function(D,j){return O(D),j===void 0?D:k?L(D,j):function(){return D.apply(j,arguments)}}},97966:(S,R,c)=>{var m=c(31982);S.exports=!m(function(){var O=function(){}.bind();return typeof O!="function"||O.hasOwnProperty("prototype")})},12461:(S,R,c)=>{var m=c(97966),O=Function.prototype.call;S.exports=m?O.bind(O):function(){return O.apply(O,arguments)}},58100:(S,R,c)=>{var m=c(56049),O=c(18768),k=Function.prototype,L=m&&Object.getOwnPropertyDescriptor,D=O(k,"name"),j=D&&function(){}.name==="something",X=D&&(!m||m&&L(k,"name").configurable);S.exports={EXISTS:D,PROPER:j,CONFIGURABLE:X}},54518:(S,R,c)=>{var m=c(90406),O=c(81970);S.exports=function(k,L,D){try{return m(O(Object.getOwnPropertyDescriptor(k,L)[D]))}catch{}}},57953:(S,R,c)=>{var m=c(58310),O=c(90406);S.exports=function(k){if(m(k)==="Function")return O(k)}},90406:(S,R,c)=>{var m=c(97966),O=Function.prototype,k=O.call,L=m&&O.bind.bind(k,k);S.exports=m?L:function(D){return function(){return k.apply(D,arguments)}}},97080:(S,R,c)=>{var m=c(59921),O=c(62447),k=c(43152),L=function(D){return k(D)?D:void 0};S.exports=function(D,j){return arguments.length<2?L(m[D])||L(O[D]):m[D]&&m[D][j]||O[D]&&O[D][j]}},82850:(S,R,c)=>{var m=c(90406),O=c(93053),k=c(43152),L=c(58310),D=c(46025),j=m([].push);S.exports=function(X){if(k(X))return X;if(O(X)){for(var te=X.length,re=[],he=0;he<te;he++){var oe=X[he];typeof oe=="string"?j(re,oe):(typeof oe=="number"||L(oe)=="Number"||L(oe)=="String")&&j(re,D(oe))}var fe=re.length,J=!0;return function(F,ee){if(J)return J=!1,ee;if(O(this))return ee;for(var N=0;N<fe;N++)if(re[N]===F)return ee}}}},27529:(S,R,c)=>{var m=c(81970),O=c(71365);S.exports=function(k,L){var D=k[L];return O(D)?void 0:m(D)}},62447:(S,R,c)=>{var m=function(O){return O&&O.Math==Math&&O};S.exports=m(typeof globalThis=="object"&&globalThis)||m(typeof window=="object"&&window)||m(typeof self=="object"&&self)||m(typeof c.g=="object"&&c.g)||function(){return this}()||Function("return this")()},18768:(S,R,c)=>{var m=c(90406),O=c(53254),k=m({}.hasOwnProperty);S.exports=Object.hasOwn||function(D,j){return k(O(D),j)}},13477:S=>{S.exports={}},19552:(S,R,c)=>{var m=c(97080);S.exports=m("document","documentElement")},11314:(S,R,c)=>{var m=c(56049),O=c(31982),k=c(45511);S.exports=!m&&!O(function(){return Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a!=7})},38622:(S,R,c)=>{var m=c(90406),O=c(31982),k=c(58310),L=Object,D=m("".split);S.exports=O(function(){return!L("z").propertyIsEnumerable(0)})?function(j){return k(j)=="String"?D(j,""):L(j)}:L},41524:(S,R,c)=>{var m=c(90406),O=c(43152),k=c(70716),L=m(Function.toString);O(k.inspectSource)||(k.inspectSource=function(D){return L(D)}),S.exports=k.inspectSource},44083:(S,R,c)=>{var m=c(57761),O=c(62447),k=c(92548),L=c(20410),D=c(18768),j=c(70716),X=c(4580),te=c(13477),re="Object already initialized",he=O.TypeError,oe=O.WeakMap,fe,J,F,ee=function(B){return F(B)?J(B):fe(B,{})},N=function(B){return function(Z){var ae;if(!k(Z)||(ae=J(Z)).type!==B)throw he("Incompatible receiver, "+B+" required");return ae}};if(m||j.state){var w=j.state||(j.state=new oe);w.get=w.get,w.has=w.has,w.set=w.set,fe=function(B,Z){if(w.has(B))throw he(re);return Z.facade=B,w.set(B,Z),Z},J=function(B){return w.get(B)||{}},F=function(B){return w.has(B)}}else{var M=X("state");te[M]=!0,fe=function(B,Z){if(D(B,M))throw he(re);return Z.facade=B,L(B,M,Z),Z},J=function(B){return D(B,M)?B[M]:{}},F=function(B){return D(B,M)}}S.exports={set:fe,get:J,has:F,enforce:ee,getterFor:N}},93053:(S,R,c)=>{var m=c(58310);S.exports=Array.isArray||function(k){return m(k)=="Array"}},43152:(S,R,c)=>{var m=c(51647),O=m.all;S.exports=m.IS_HTMLDDA?function(k){return typeof k=="function"||k===O}:function(k){return typeof k=="function"}},43455:(S,R,c)=>{var m=c(90406),O=c(31982),k=c(43152),L=c(82059),D=c(97080),j=c(41524),X=function(){},te=[],re=D("Reflect","construct"),he=/^\s*(?:class|function)\b/,oe=m(he.exec),fe=!he.exec(X),J=function(N){if(!k(N))return!1;try{return re(X,te,N),!0}catch{return!1}},F=function(N){if(!k(N))return!1;switch(L(N)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fe||!!oe(he,j(N))}catch{return!0}};F.sham=!0,S.exports=!re||O(function(){var ee;return J(J.call)||!J(Object)||!J(function(){ee=!0})||ee})?F:J},51585:(S,R,c)=>{var m=c(31982),O=c(43152),k=/#|\.prototype\./,L=function(re,he){var oe=j[D(re)];return oe==te?!0:oe==X?!1:O(he)?m(he):!!he},D=L.normalize=function(re){return String(re).replace(k,".").toLowerCase()},j=L.data={},X=L.NATIVE="N",te=L.POLYFILL="P";S.exports=L},71365:S=>{S.exports=function(R){return R==null}},92548:(S,R,c)=>{var m=c(43152),O=c(51647),k=O.all;S.exports=O.IS_HTMLDDA?function(L){return typeof L=="object"?L!==null:m(L)||L===k}:function(L){return typeof L=="object"?L!==null:m(L)}},39839:S=>{S.exports=!0},28609:(S,R,c)=>{var m=c(97080),O=c(43152),k=c(15166),L=c(27237),D=Object;S.exports=L?function(j){return typeof j=="symbol"}:function(j){var X=m("Symbol");return O(X)&&k(X.prototype,D(j))}},41709:(S,R,c)=>{"use strict";var m=c(98488).IteratorPrototype,O=c(73270),k=c(54686),L=c(98889),D=c(94609),j=function(){return this};S.exports=function(X,te,re,he){var oe=te+" Iterator";return X.prototype=O(m,{next:k(+!he,re)}),L(X,oe,!1,!0),D[oe]=j,X}},78107:(S,R,c)=>{"use strict";var m=c(30080),O=c(12461),k=c(39839),L=c(58100),D=c(43152),j=c(41709),X=c(90851),te=c(70738),re=c(98889),he=c(20410),oe=c(27519),fe=c(33538),J=c(94609),F=c(98488),ee=L.PROPER,N=L.CONFIGURABLE,w=F.IteratorPrototype,M=F.BUGGY_SAFARI_ITERATORS,B=fe("iterator"),Z="keys",ae="values",H="entries",le=function(){return this};S.exports=function(z,q,pe,xe,Q,ye,ie){j(pe,q,xe);var je=function(He){if(He===Q&&ut)return ut;if(!M&&He in vt)return vt[He];switch(He){case Z:return function(){return new pe(this,He)};case ae:return function(){return new pe(this,He)};case H:return function(){return new pe(this,He)}}return function(){return new pe(this)}},ze=q+" Iterator",Ue=!1,vt=z.prototype,pt=vt[B]||vt["@@iterator"]||Q&&vt[Q],ut=!M&&pt||je(Q),er=q=="Array"&&vt.entries||pt,gt,Rt,st;if(er&&(gt=X(er.call(new z)),gt!==Object.prototype&>.next&&(!k&&X(gt)!==w&&(te?te(gt,w):D(gt[B])||oe(gt,B,le)),re(gt,ze,!0,!0),k&&(J[ze]=le))),ee&&Q==ae&&pt&&pt.name!==ae&&(!k&&N?he(vt,"name",ae):(Ue=!0,ut=function(){return O(pt,this)})),Q)if(Rt={values:je(ae),keys:ye?ut:je(Z),entries:je(H)},ie)for(st in Rt)(M||Ue||!(st in vt))&&oe(vt,st,Rt[st]);else m({target:q,proto:!0,forced:M||Ue},Rt);return(!k||ie)&&vt[B]!==ut&&oe(vt,B,ut,{name:Q}),J[q]=ut,Rt}},98488:(S,R,c)=>{"use strict";var m=c(31982),O=c(43152),k=c(92548),L=c(73270),D=c(90851),j=c(27519),X=c(33538),te=c(39839),re=X("iterator"),he=!1,oe,fe,J;[].keys&&(J=[].keys(),"next"in J?(fe=D(D(J)),fe!==Object.prototype&&(oe=fe)):he=!0);var F=!k(oe)||m(function(){var ee={};return oe[re].call(ee)!==ee});F?oe={}:te&&(oe=L(oe)),O(oe[re])||j(oe,re,function(){return this}),S.exports={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:he}},94609:S=>{S.exports={}},53387:(S,R,c)=>{var m=c(62567);S.exports=function(O){return m(O.length)}},99295:S=>{var R=Math.ceil,c=Math.floor;S.exports=Math.trunc||function(O){var k=+O;return(k>0?c:R)(k)}},73270:(S,R,c)=>{var m=c(35970),O=c(98911),k=c(11792),L=c(13477),D=c(19552),j=c(45511),X=c(4580),te=">",re="<",he="prototype",oe="script",fe=X("IE_PROTO"),J=function(){},F=function(B){return re+oe+te+B+re+"/"+oe+te},ee=function(B){B.write(F("")),B.close();var Z=B.parentWindow.Object;return B=null,Z},N=function(){var B=j("iframe"),Z="java"+oe+":",ae;return B.style.display="none",D.appendChild(B),B.src=String(Z),ae=B.contentWindow.document,ae.open(),ae.write(F("document.F=Object")),ae.close(),ae.F},w,M=function(){try{w=new ActiveXObject("htmlfile")}catch{}M=typeof document<"u"?document.domain&&w?ee(w):N():ee(w);for(var B=k.length;B--;)delete M[he][k[B]];return M()};L[fe]=!0,S.exports=Object.create||function(Z,ae){var H;return Z!==null?(J[he]=m(Z),H=new J,J[he]=null,H[fe]=Z):H=M(),ae===void 0?H:O.f(H,ae)}},98911:(S,R,c)=>{var m=c(56049),O=c(98715),k=c(36133),L=c(35970),D=c(88966),j=c(16619);R.f=m&&!O?Object.defineProperties:function(te,re){L(te);for(var he=D(re),oe=j(re),fe=oe.length,J=0,F;fe>J;)k.f(te,F=oe[J++],he[F]);return te}},36133:(S,R,c)=>{var m=c(56049),O=c(11314),k=c(98715),L=c(35970),D=c(5135),j=TypeError,X=Object.defineProperty,te=Object.getOwnPropertyDescriptor,re="enumerable",he="configurable",oe="writable";R.f=m?k?function(J,F,ee){if(L(J),F=D(F),L(ee),typeof J=="function"&&F==="prototype"&&"value"in ee&&oe in ee&&!ee[oe]){var N=te(J,F);N&&N[oe]&&(J[F]=ee.value,ee={configurable:he in ee?ee[he]:N[he],enumerable:re in ee?ee[re]:N[re],writable:!1})}return X(J,F,ee)}:X:function(J,F,ee){if(L(J),F=D(F),L(ee),O)try{return X(J,F,ee)}catch{}if("get"in ee||"set"in ee)throw j("Accessors not supported");return"value"in ee&&(J[F]=ee.value),J}},80016:(S,R,c)=>{var m=c(56049),O=c(12461),k=c(16457),L=c(54686),D=c(88966),j=c(5135),X=c(18768),te=c(11314),re=Object.getOwnPropertyDescriptor;R.f=m?re:function(oe,fe){if(oe=D(oe),fe=j(fe),te)try{return re(oe,fe)}catch{}if(X(oe,fe))return L(!O(k.f,oe,fe),oe[fe])}},53515:(S,R,c)=>{var m=c(58310),O=c(88966),k=c(51203).f,L=c(67932),D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],j=function(X){try{return k(X)}catch{return L(D)}};S.exports.f=function(te){return D&&m(te)=="Window"?j(te):k(O(te))}},51203:(S,R,c)=>{var m=c(4541),O=c(11792),k=O.concat("length","prototype");R.f=Object.getOwnPropertyNames||function(D){return m(D,k)}},97620:(S,R)=>{R.f=Object.getOwnPropertySymbols},90851:(S,R,c)=>{var m=c(18768),O=c(43152),k=c(53254),L=c(4580),D=c(74838),j=L("IE_PROTO"),X=Object,te=X.prototype;S.exports=D?X.getPrototypeOf:function(re){var he=k(re);if(m(he,j))return he[j];var oe=he.constructor;return O(oe)&&he instanceof oe?oe.prototype:he instanceof X?te:null}},15166:(S,R,c)=>{var m=c(90406);S.exports=m({}.isPrototypeOf)},4541:(S,R,c)=>{var m=c(90406),O=c(18768),k=c(88966),L=c(66322).indexOf,D=c(13477),j=m([].push);S.exports=function(X,te){var re=k(X),he=0,oe=[],fe;for(fe in re)!O(D,fe)&&O(re,fe)&&j(oe,fe);for(;te.length>he;)O(re,fe=te[he++])&&(~L(oe,fe)||j(oe,fe));return oe}},16619:(S,R,c)=>{var m=c(4541),O=c(11792);S.exports=Object.keys||function(L){return m(L,O)}},16457:(S,R)=>{"use strict";var c={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,O=m&&!c.call({1:2},1);R.f=O?function(L){var D=m(this,L);return!!D&&D.enumerable}:c},70738:(S,R,c)=>{var m=c(54518),O=c(35970),k=c(72185);S.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var L=!1,D={},j;try{j=m(Object.prototype,"__proto__","set"),j(D,[]),L=D instanceof Array}catch{}return function(te,re){return O(te),k(re),L?j(te,re):te.__proto__=re,te}}():void 0)},68399:(S,R,c)=>{"use strict";var m=c(48448),O=c(82059);S.exports=m?{}.toString:function(){return"[object "+O(this)+"]"}},96380:(S,R,c)=>{var m=c(12461),O=c(43152),k=c(92548),L=TypeError;S.exports=function(D,j){var X,te;if(j==="string"&&O(X=D.toString)&&!k(te=m(X,D))||O(X=D.valueOf)&&!k(te=m(X,D))||j!=="string"&&O(X=D.toString)&&!k(te=m(X,D)))return te;throw L("Can't convert object to primitive value")}},47813:(S,R,c)=>{var m=c(97080),O=c(90406),k=c(51203),L=c(97620),D=c(35970),j=O([].concat);S.exports=m("Reflect","ownKeys")||function(te){var re=k.f(D(te)),he=L.f;return he?j(re,he(te)):re}},59921:S=>{S.exports={}},31251:(S,R,c)=>{var m=c(71365),O=TypeError;S.exports=function(k){if(m(k))throw O("Can't call method on "+k);return k}},98889:(S,R,c)=>{var m=c(48448),O=c(36133).f,k=c(20410),L=c(18768),D=c(68399),j=c(33538),X=j("toStringTag");S.exports=function(te,re,he,oe){if(te){var fe=he?te:te.prototype;L(fe,X)||O(fe,X,{configurable:!0,value:re}),oe&&!m&&k(fe,"toString",D)}}},4580:(S,R,c)=>{var m=c(95976),O=c(91248),k=m("keys");S.exports=function(L){return k[L]||(k[L]=O(L))}},70716:(S,R,c)=>{var m=c(62447),O=c(9267),k="__core-js_shared__",L=m[k]||O(k,{});S.exports=L},95976:(S,R,c)=>{var m=c(39839),O=c(70716);(S.exports=function(k,L){return O[k]||(O[k]=L!==void 0?L:{})})("versions",[]).push({version:"3.29.1",mode:m?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},18143:(S,R,c)=>{var m=c(90406),O=c(32041),k=c(46025),L=c(31251),D=m("".charAt),j=m("".charCodeAt),X=m("".slice),te=function(re){return function(he,oe){var fe=k(L(he)),J=O(oe),F=fe.length,ee,N;return J<0||J>=F?re?"":void 0:(ee=j(fe,J),ee<55296||ee>56319||J+1===F||(N=j(fe,J+1))<56320||N>57343?re?D(fe,J):ee:re?X(fe,J,J+2):(ee-55296<<10)+(N-56320)+65536)}};S.exports={codeAt:te(!1),charAt:te(!0)}},71775:(S,R,c)=>{var m=c(32438),O=c(31982);S.exports=!!Object.getOwnPropertySymbols&&!O(function(){var k=Symbol();return!String(k)||!(Object(k)instanceof Symbol)||!Symbol.sham&&m&&m<41})},95679:(S,R,c)=>{var m=c(12461),O=c(97080),k=c(33538),L=c(27519);S.exports=function(){var D=O("Symbol"),j=D&&D.prototype,X=j&&j.valueOf,te=k("toPrimitive");j&&!j[te]&&L(j,te,function(re){return m(X,this)},{arity:1})}},82294:(S,R,c)=>{var m=c(71775);S.exports=m&&!!Symbol.for&&!!Symbol.keyFor},13249:(S,R,c)=>{var m=c(32041),O=Math.max,k=Math.min;S.exports=function(L,D){var j=m(L);return j<0?O(j+D,0):k(j,D)}},88966:(S,R,c)=>{var m=c(38622),O=c(31251);S.exports=function(k){return m(O(k))}},32041:(S,R,c)=>{var m=c(99295);S.exports=function(O){var k=+O;return k!==k||k===0?0:m(k)}},62567:(S,R,c)=>{var m=c(32041),O=Math.min;S.exports=function(k){return k>0?O(m(k),9007199254740991):0}},53254:(S,R,c)=>{var m=c(31251),O=Object;S.exports=function(k){return O(m(k))}},37505:(S,R,c)=>{var m=c(12461),O=c(92548),k=c(28609),L=c(27529),D=c(96380),j=c(33538),X=TypeError,te=j("toPrimitive");S.exports=function(re,he){if(!O(re)||k(re))return re;var oe=L(re,te),fe;if(oe){if(he===void 0&&(he="default"),fe=m(oe,re,he),!O(fe)||k(fe))return fe;throw X("Can't convert object to primitive value")}return he===void 0&&(he="number"),D(re,he)}},5135:(S,R,c)=>{var m=c(37505),O=c(28609);S.exports=function(k){var L=m(k,"string");return O(L)?L:L+""}},48448:(S,R,c)=>{var m=c(33538),O=m("toStringTag"),k={};k[O]="z",S.exports=String(k)==="[object z]"},46025:(S,R,c)=>{var m=c(82059),O=String;S.exports=function(k){if(m(k)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return O(k)}},18342:S=>{var R=String;S.exports=function(c){try{return R(c)}catch{return"Object"}}},91248:(S,R,c)=>{var m=c(90406),O=0,k=Math.random(),L=m(1 .toString);S.exports=function(D){return"Symbol("+(D===void 0?"":D)+")_"+L(++O+k,36)}},27237:(S,R,c)=>{var m=c(71775);S.exports=m&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},98715:(S,R,c)=>{var m=c(56049),O=c(31982);S.exports=m&&O(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},57761:(S,R,c)=>{var m=c(62447),O=c(43152),k=m.WeakMap;S.exports=O(k)&&/native code/.test(String(k))},64832:(S,R,c)=>{var m=c(59921),O=c(18768),k=c(39378),L=c(36133).f;S.exports=function(D){var j=m.Symbol||(m.Symbol={});O(j,D)||L(j,D,{value:k.f(D)})}},39378:(S,R,c)=>{var m=c(33538);R.f=m},33538:(S,R,c)=>{var m=c(62447),O=c(95976),k=c(18768),L=c(91248),D=c(71775),j=c(27237),X=m.Symbol,te=O("wks"),re=j?X.for||X:X&&X.withoutSetter||L;S.exports=function(he){return k(te,he)||(te[he]=D&&k(X,he)?X[he]:re("Symbol."+he)),te[he]}},69825:(S,R,c)=>{"use strict";var m=c(30080),O=c(31982),k=c(93053),L=c(92548),D=c(53254),j=c(53387),X=c(11452),te=c(53437),re=c(69573),he=c(36844),oe=c(33538),fe=c(32438),J=oe("isConcatSpreadable"),F=fe>=51||!O(function(){var w=[];return w[J]=!1,w.concat()[0]!==w}),ee=function(w){if(!L(w))return!1;var M=w[J];return M!==void 0?!!M:k(w)},N=!F||!he("concat");m({target:"Array",proto:!0,arity:1,forced:N},{concat:function(M){var B=D(this),Z=re(B,0),ae=0,H,le,z,q,pe;for(H=-1,z=arguments.length;H<z;H++)if(pe=H===-1?B:arguments[H],ee(pe))for(q=j(pe),X(ae+q),le=0;le<q;le++,ae++)le in pe&&te(Z,ae,pe[le]);else X(ae+1),te(Z,ae++,pe);return Z.length=ae,Z}})},17802:(S,R,c)=>{"use strict";var m=c(30080),O=c(93935).filter,k=c(36844),L=k("filter");m({target:"Array",proto:!0,forced:!L},{filter:function(j){return O(this,j,arguments.length>1?arguments[1]:void 0)}})},64009:(S,R,c)=>{"use strict";var m=c(30080),O=c(24782);m({target:"Array",proto:!0,forced:[].forEach!=O},{forEach:O})},32449:(S,R,c)=>{"use strict";var m=c(30080),O=c(57953),k=c(66322).indexOf,L=c(10454),D=O([].indexOf),j=!!D&&1/D([1],1,-0)<0,X=j||!L("indexOf");m({target:"Array",proto:!0,forced:X},{indexOf:function(re){var he=arguments.length>1?arguments[1]:void 0;return j?D(this,re,he)||0:k(this,re,he)}})},44390:(S,R,c)=>{"use strict";var m=c(88966),O=c(20844),k=c(94609),L=c(44083),D=c(36133).f,j=c(78107),X=c(10248),te=c(39839),re=c(56049),he="Array Iterator",oe=L.set,fe=L.getterFor(he);S.exports=j(Array,"Array",function(F,ee){oe(this,{type:he,target:m(F),index:0,kind:ee})},function(){var F=fe(this),ee=F.target,N=F.kind,w=F.index++;return!ee||w>=ee.length?(F.target=void 0,X(void 0,!0)):N=="keys"?X(w,!1):N=="values"?X(ee[w],!1):X([w,ee[w]],!1)},"values");var J=k.Arguments=k.Array;if(O("keys"),O("values"),O("entries"),!te&&re&&J.name!=="values")try{D(J,"name",{value:"values"})}catch{}},91667:()=>{},39306:(S,R,c)=>{var m=c(30080),O=c(97080),k=c(82768),L=c(12461),D=c(90406),j=c(31982),X=c(43152),te=c(28609),re=c(53160),he=c(82850),oe=c(71775),fe=String,J=O("JSON","stringify"),F=D(/./.exec),ee=D("".charAt),N=D("".charCodeAt),w=D("".replace),M=D(1 .toString),B=/[\uD800-\uDFFF]/g,Z=/^[\uD800-\uDBFF]$/,ae=/^[\uDC00-\uDFFF]$/,H=!oe||j(function(){var pe=O("Symbol")();return J([pe])!="[null]"||J({a:pe})!="{}"||J(Object(pe))!="{}"}),le=j(function(){return J("\uDF06\uD834")!=='"\\udf06\\ud834"'||J("\uDEAD")!=='"\\udead"'}),z=function(pe,xe){var Q=re(arguments),ye=he(xe);if(!(!X(ye)&&(pe===void 0||te(pe))))return Q[1]=function(ie,je){if(X(ye)&&(je=L(ye,this,fe(ie),je)),!te(je))return je},k(J,null,Q)},q=function(pe,xe,Q){var ye=ee(Q,xe-1),ie=ee(Q,xe+1);return F(Z,pe)&&!F(ae,ie)||F(ae,pe)&&!F(Z,ye)?"\\u"+M(N(pe,0),16):pe};J&&m({target:"JSON",stat:!0,arity:3,forced:H||le},{stringify:function(xe,Q,ye){var ie=re(arguments),je=k(H?z:J,null,ie);return le&&typeof je=="string"?w(je,B,q):je}})},23870:(S,R,c)=>{var m=c(62447),O=c(98889);O(m.JSON,"JSON",!0)},5828:()=>{},28135:(S,R,c)=>{var m=c(30080),O=c(56049),k=c(98911).f;m({target:"Object",stat:!0,forced:Object.defineProperties!==k,sham:!O},{defineProperties:k})},70829:(S,R,c)=>{var m=c(30080),O=c(56049),k=c(36133).f;m({target:"Object",stat:!0,forced:Object.defineProperty!==k,sham:!O},{defineProperty:k})},51964:(S,R,c)=>{var m=c(30080),O=c(31982),k=c(88966),L=c(80016).f,D=c(56049),j=!D||O(function(){L(1)});m({target:"Object",stat:!0,forced:j,sham:!D},{getOwnPropertyDescriptor:function(te,re){return L(k(te),re)}})},723:(S,R,c)=>{var m=c(30080),O=c(56049),k=c(47813),L=c(88966),D=c(80016),j=c(53437);m({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(te){for(var re=L(te),he=D.f,oe=k(re),fe={},J=0,F,ee;oe.length>J;)ee=he(re,F=oe[J++]),ee!==void 0&&j(fe,F,ee);return fe}})},86884:(S,R,c)=>{var m=c(30080),O=c(71775),k=c(31982),L=c(97620),D=c(53254),j=!O||k(function(){L.f(1)});m({target:"Object",stat:!0,forced:j},{getOwnPropertySymbols:function(te){var re=L.f;return re?re(D(te)):[]}})},38339:(S,R,c)=>{var m=c(30080),O=c(53254),k=c(16619),L=c(31982),D=L(function(){k(1)});m({target:"Object",stat:!0,forced:D},{keys:function(X){return k(O(X))}})},97829:()=>{},5708:()=>{},27626:(S,R,c)=>{"use strict";var m=c(18143).charAt,O=c(46025),k=c(44083),L=c(78107),D=c(10248),j="String Iterator",X=k.set,te=k.getterFor(j);L(String,"String",function(re){X(this,{type:j,string:O(re),index:0})},function(){var he=te(this),oe=he.string,fe=he.index,J;return fe>=oe.length?D(void 0,!0):(J=m(oe,fe),he.index+=J.length,D(J,!1))})},95353:(S,R,c)=>{var m=c(64832);m("asyncIterator")},16212:(S,R,c)=>{"use strict";var m=c(30080),O=c(62447),k=c(12461),L=c(90406),D=c(39839),j=c(56049),X=c(71775),te=c(31982),re=c(18768),he=c(15166),oe=c(35970),fe=c(88966),J=c(5135),F=c(46025),ee=c(54686),N=c(73270),w=c(16619),M=c(51203),B=c(53515),Z=c(97620),ae=c(80016),H=c(36133),le=c(98911),z=c(16457),q=c(27519),pe=c(37912),xe=c(95976),Q=c(4580),ye=c(13477),ie=c(91248),je=c(33538),ze=c(39378),Ue=c(64832),vt=c(95679),pt=c(98889),ut=c(44083),er=c(93935).forEach,gt=Q("hidden"),Rt="Symbol",st="prototype",He=ut.set,Re=ut.getterFor(Rt),Be=Object[st],lt=O.Symbol,_t=lt&<[st],rt=O.TypeError,Pt=O.QObject,tr=ae.f,or=H.f,kr=B.f,et=z.f,Et=L([].push),jt=xe("symbols"),_r=xe("op-symbols"),zt=xe("wks"),Bn=!Pt||!Pt[st]||!Pt[st].findChild,Vn=j&&te(function(){return N(or({},"a",{get:function(){return or(this,"a",{value:7}).a}})).a!=7})?function(St,ft,tt){var mt=tr(Be,ft);mt&&delete Be[ft],or(St,ft,tt),mt&&St!==Be&&or(Be,ft,mt)}:or,nn=function(St,ft){var tt=jt[St]=N(_t);return He(tt,{type:Rt,tag:St,description:ft}),j||(tt.description=ft),tt},Cn=function(ft,tt,mt){ft===Be&&Cn(_r,tt,mt),oe(ft);var se=J(tt);return oe(mt),re(jt,se)?(mt.enumerable?(re(ft,gt)&&ft[gt][se]&&(ft[gt][se]=!1),mt=N(mt,{enumerable:ee(0,!1)})):(re(ft,gt)||or(ft,gt,ee(1,{})),ft[gt][se]=!0),Vn(ft,se,mt)):or(ft,se,mt)},ri=function(ft,tt){oe(ft);var mt=fe(tt),se=w(mt).concat(Gt(mt));return er(se,function(we){(!j||k(an,mt,we))&&Cn(ft,we,mt[we])}),ft},jn=function(ft,tt){return tt===void 0?N(ft):ri(N(ft),tt)},an=function(ft){var tt=J(ft),mt=k(et,this,tt);return this===Be&&re(jt,tt)&&!re(_r,tt)?!1:mt||!re(this,tt)||!re(jt,tt)||re(this,gt)&&this[gt][tt]?mt:!0},Mr=function(ft,tt){var mt=fe(ft),se=J(tt);if(!(mt===Be&&re(jt,se)&&!re(_r,se))){var we=tr(mt,se);return we&&re(jt,se)&&!(re(mt,gt)&&mt[gt][se])&&(we.enumerable=!0),we}},zr=function(ft){var tt=kr(fe(ft)),mt=[];return er(tt,function(se){!re(jt,se)&&!re(ye,se)&&Et(mt,se)}),mt},Gt=function(St){var ft=St===Be,tt=kr(ft?_r:fe(St)),mt=[];return er(tt,function(se){re(jt,se)&&(!ft||re(Be,se))&&Et(mt,jt[se])}),mt};X||(lt=function(){if(he(_t,this))throw rt("Symbol is not a constructor");var ft=!arguments.length||arguments[0]===void 0?void 0:F(arguments[0]),tt=ie(ft),mt=function(se){this===Be&&k(mt,_r,se),re(this,gt)&&re(this[gt],tt)&&(this[gt][tt]=!1),Vn(this,tt,ee(1,se))};return j&&Bn&&Vn(Be,tt,{configurable:!0,set:mt}),nn(tt,ft)},_t=lt[st],q(_t,"toString",function(){return Re(this).tag}),q(lt,"withoutSetter",function(St){return nn(ie(St),St)}),z.f=an,H.f=Cn,le.f=ri,ae.f=Mr,M.f=B.f=zr,Z.f=Gt,ze.f=function(St){return nn(je(St),St)},j&&(pe(_t,"description",{configurable:!0,get:function(){return Re(this).description}}),D||q(Be,"propertyIsEnumerable",an,{unsafe:!0}))),m({global:!0,constructor:!0,wrap:!0,forced:!X,sham:!X},{Symbol:lt}),er(w(zt),function(St){Ue(St)}),m({target:Rt,stat:!0,forced:!X},{useSetter:function(){Bn=!0},useSimple:function(){Bn=!1}}),m({target:"Object",stat:!0,forced:!X,sham:!j},{create:jn,defineProperty:Cn,defineProperties:ri,getOwnPropertyDescriptor:Mr}),m({target:"Object",stat:!0,forced:!X},{getOwnPropertyNames:zr}),vt(),pt(lt,Rt),ye[gt]=!0},63906:()=>{},3598:(S,R,c)=>{var m=c(30080),O=c(97080),k=c(18768),L=c(46025),D=c(95976),j=c(82294),X=D("string-to-symbol-registry"),te=D("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!j},{for:function(re){var he=L(re);if(k(X,he))return X[he];var oe=O("Symbol")(he);return X[he]=oe,te[oe]=he,oe}})},39542:(S,R,c)=>{var m=c(64832);m("hasInstance")},47882:(S,R,c)=>{var m=c(64832);m("isConcatSpreadable")},84911:(S,R,c)=>{var m=c(64832);m("iterator")},68030:(S,R,c)=>{c(16212),c(3598),c(50338),c(39306),c(86884)},50338:(S,R,c)=>{var m=c(30080),O=c(18768),k=c(28609),L=c(18342),D=c(95976),j=c(82294),X=D("symbol-to-string-registry");m({target:"Symbol",stat:!0,forced:!j},{keyFor:function(re){if(!k(re))throw TypeError(L(re)+" is not a symbol");if(O(X,re))return X[re]}})},47954:(S,R,c)=>{var m=c(64832);m("matchAll")},88725:(S,R,c)=>{var m=c(64832);m("match")},67703:(S,R,c)=>{var m=c(64832);m("replace")},2220:(S,R,c)=>{var m=c(64832);m("search")},48990:(S,R,c)=>{var m=c(64832);m("species")},50240:(S,R,c)=>{var m=c(64832);m("split")},99921:(S,R,c)=>{var m=c(64832),O=c(95679);m("toPrimitive"),O()},3502:(S,R,c)=>{var m=c(97080),O=c(64832),k=c(98889);O("toStringTag"),k(m("Symbol"),"Symbol")},80220:(S,R,c)=>{var m=c(64832);m("unscopables")},45987:(S,R,c)=>{var m=c(64832);m("asyncDispose")},42319:(S,R,c)=>{var m=c(64832);m("dispose")},58052:(S,R,c)=>{var m=c(30080),O=c(97080),k=c(90406),L=O("Symbol"),D=L.keyFor,j=k(L.prototype.valueOf);m({target:"Symbol",stat:!0},{isRegistered:function(te){try{return D(j(te))!==void 0}catch{return!1}}})},90181:(S,R,c)=>{for(var m=c(30080),O=c(95976),k=c(97080),L=c(90406),D=c(28609),j=c(33538),X=k("Symbol"),te=X.isWellKnown,re=k("Object","getOwnPropertyNames"),he=L(X.prototype.valueOf),oe=O("wks"),fe=0,J=re(X),F=J.length;fe<F;fe++)try{var ee=J[fe];D(X[ee])&&j(ee)}catch{}m({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(w){if(te&&te(w))return!0;try{for(var M=he(w),B=0,Z=re(oe),ae=Z.length;B<ae;B++)if(oe[Z[B]]==M)return!0}catch{}return!1}})},25129:(S,R,c)=>{var m=c(64832);m("matcher")},90397:(S,R,c)=>{var m=c(64832);m("metadataKey")},82793:(S,R,c)=>{var m=c(64832);m("metadata")},18097:(S,R,c)=>{var m=c(64832);m("observable")},52100:(S,R,c)=>{var m=c(64832);m("patternMatch")},20122:(S,R,c)=>{var m=c(64832);m("replaceAll")},48713:(S,R,c)=>{c(44390);var m=c(81595),O=c(62447),k=c(82059),L=c(20410),D=c(94609),j=c(33538),X=j("toStringTag");for(var te in m){var re=O[te],he=re&&re.prototype;he&&k(he)!==X&&L(he,X,te),D[te]=D.Array}},41544:(S,R,c)=>{var m=c(94537);S.exports=m},44928:(S,R,c)=>{var m=c(55794);S.exports=m},26087:(S,R,c)=>{c(48713);var m=c(82059),O=c(18768),k=c(15166),L=c(41544),D=Array.prototype,j={DOMTokenList:!0,NodeList:!0};S.exports=function(X){var te=X.forEach;return X===D||k(D,X)&&te===D.forEach||O(j,m(X))?L:te}},11783:(S,R,c)=>{var m=c(85838);S.exports=m},88462:(S,R,c)=>{var m=c(95617);S.exports=m},83531:(S,R,c)=>{var m=c(11906);S.exports=m},19941:(S,R,c)=>{var m=c(59123);S.exports=m},25081:(S,R,c)=>{var m=c(63332);S.exports=m},22145:(S,R,c)=>{var m=c(83606);S.exports=m},93690:(S,R,c)=>{var m=c(90660);S.exports=m},8429:(S,R,c)=>{var m=c(49198);c(48713),S.exports=m},13099:(S,R,c)=>{var m=c(15413);c(48713),S.exports=m},44931:(S,R,c)=>{var m=c(4793);S.exports=m},81933:function(){(function(S){var R=function(c){var m={searchParams:"URLSearchParams"in S,iterable:"Symbol"in S&&"iterator"in Symbol,blob:"FileReader"in S&&"Blob"in S&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in S,arrayBuffer:"ArrayBuffer"in S};function O(z){return z&&DataView.prototype.isPrototypeOf(z)}if(m.arrayBuffer)var k=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],L=ArrayBuffer.isView||function(z){return z&&k.indexOf(Object.prototype.toString.call(z))>-1};function D(z){if(typeof z!="string"&&(z=String(z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(z))throw new TypeError("Invalid character in header field name");return z.toLowerCase()}function j(z){return typeof z!="string"&&(z=String(z)),z}function X(z){var q={next:function(){var pe=z.shift();return{done:pe===void 0,value:pe}}};return m.iterable&&(q[Symbol.iterator]=function(){return q}),q}function te(z){this.map={},z instanceof te?z.forEach(function(q,pe){this.append(pe,q)},this):Array.isArray(z)?z.forEach(function(q){this.append(q[0],q[1])},this):z&&Object.getOwnPropertyNames(z).forEach(function(q){this.append(q,z[q])},this)}te.prototype.append=function(z,q){z=D(z),q=j(q);var pe=this.map[z];this.map[z]=pe?pe+", "+q:q},te.prototype.delete=function(z){delete this.map[D(z)]},te.prototype.get=function(z){return z=D(z),this.has(z)?this.map[z]:null},te.prototype.has=function(z){return this.map.hasOwnProperty(D(z))},te.prototype.set=function(z,q){this.map[D(z)]=j(q)},te.prototype.forEach=function(z,q){for(var pe in this.map)this.map.hasOwnProperty(pe)&&z.call(q,this.map[pe],pe,this)},te.prototype.keys=function(){var z=[];return this.forEach(function(q,pe){z.push(pe)}),X(z)},te.prototype.values=function(){var z=[];return this.forEach(function(q){z.push(q)}),X(z)},te.prototype.entries=function(){var z=[];return this.forEach(function(q,pe){z.push([pe,q])}),X(z)},m.iterable&&(te.prototype[Symbol.iterator]=te.prototype.entries);function re(z){if(z.bodyUsed)return Promise.reject(new TypeError("Already read"));z.bodyUsed=!0}function he(z){return new Promise(function(q,pe){z.onload=function(){q(z.result)},z.onerror=function(){pe(z.error)}})}function oe(z){var q=new FileReader,pe=he(q);return q.readAsArrayBuffer(z),pe}function fe(z){var q=new FileReader,pe=he(q);return q.readAsText(z),pe}function J(z){for(var q=new Uint8Array(z),pe=new Array(q.length),xe=0;xe<q.length;xe++)pe[xe]=String.fromCharCode(q[xe]);return pe.join("")}function F(z){if(z.slice)return z.slice(0);var q=new Uint8Array(z.byteLength);return q.set(new Uint8Array(z)),q.buffer}function ee(){return this.bodyUsed=!1,this._initBody=function(z){this._bodyInit=z,z?typeof z=="string"?this._bodyText=z:m.blob&&Blob.prototype.isPrototypeOf(z)?this._bodyBlob=z:m.formData&&FormData.prototype.isPrototypeOf(z)?this._bodyFormData=z:m.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)?this._bodyText=z.toString():m.arrayBuffer&&m.blob&&O(z)?(this._bodyArrayBuffer=F(z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):m.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(z)||L(z))?this._bodyArrayBuffer=F(z):this._bodyText=z=Object.prototype.toString.call(z):this._bodyText="",this.headers.get("content-type")||(typeof z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var z=re(this);if(z)return z;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?re(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(oe)}),this.text=function(){var z=re(this);if(z)return z;if(this._bodyBlob)return fe(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(B)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(z){var q=z.toUpperCase();return N.indexOf(q)>-1?q:z}function M(z,q){q=q||{};var pe=q.body;if(z instanceof M){if(z.bodyUsed)throw new TypeError("Already read");this.url=z.url,this.credentials=z.credentials,q.headers||(this.headers=new te(z.headers)),this.method=z.method,this.mode=z.mode,this.signal=z.signal,!pe&&z._bodyInit!=null&&(pe=z._bodyInit,z.bodyUsed=!0)}else this.url=String(z);if(this.credentials=q.credentials||this.credentials||"same-origin",(q.headers||!this.headers)&&(this.headers=new te(q.headers)),this.method=w(q.method||this.method||"GET"),this.mode=q.mode||this.mode||null,this.signal=q.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&pe)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(pe)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})};function B(z){var q=new FormData;return z.trim().split("&").forEach(function(pe){if(pe){var xe=pe.split("="),Q=xe.shift().replace(/\+/g," "),ye=xe.join("=").replace(/\+/g," ");q.append(decodeURIComponent(Q),decodeURIComponent(ye))}}),q}function Z(z){var q=new te,pe=z.replace(/\r?\n[\t ]+/g," ");return pe.split(/\r?\n/).forEach(function(xe){var Q=xe.split(":"),ye=Q.shift().trim();if(ye){var ie=Q.join(":").trim();q.append(ye,ie)}}),q}ee.call(M.prototype);function ae(z,q){q||(q={}),this.type="default",this.status=q.status===void 0?200:q.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in q?q.statusText:"OK",this.headers=new te(q.headers),this.url=q.url||"",this._initBody(z)}ee.call(ae.prototype),ae.prototype.clone=function(){return new ae(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new te(this.headers),url:this.url})},ae.error=function(){var z=new ae(null,{status:0,statusText:""});return z.type="error",z};var H=[301,302,303,307,308];ae.redirect=function(z,q){if(H.indexOf(q)===-1)throw new RangeError("Invalid status code");return new ae(null,{status:q,headers:{location:z}})},c.DOMException=S.DOMException;try{new c.DOMException}catch{c.DOMException=function(q,pe){this.message=q,this.name=pe;var xe=Error(q);this.stack=xe.stack},c.DOMException.prototype=Object.create(Error.prototype),c.DOMException.prototype.constructor=c.DOMException}function le(z,q){return new Promise(function(pe,xe){var Q=new M(z,q);if(Q.signal&&Q.signal.aborted)return xe(new c.DOMException("Aborted","AbortError"));var ye=new XMLHttpRequest;function ie(){ye.abort()}ye.onload=function(){var je={status:ye.status,statusText:ye.statusText,headers:Z(ye.getAllResponseHeaders()||"")};je.url="responseURL"in ye?ye.responseURL:je.headers.get("X-Request-URL");var ze="response"in ye?ye.response:ye.responseText;pe(new ae(ze,je))},ye.onerror=function(){xe(new TypeError("Network request failed"))},ye.ontimeout=function(){xe(new TypeError("Network request failed"))},ye.onabort=function(){xe(new c.DOMException("Aborted","AbortError"))},ye.open(Q.method,Q.url,!0),Q.credentials==="include"?ye.withCredentials=!0:Q.credentials==="omit"&&(ye.withCredentials=!1),"responseType"in ye&&m.blob&&(ye.responseType="blob"),Q.headers.forEach(function(je,ze){ye.setRequestHeader(ze,je)}),Q.signal&&(Q.signal.addEventListener("abort",ie),ye.onreadystatechange=function(){ye.readyState===4&&Q.signal.removeEventListener("abort",ie)}),ye.send(typeof Q._bodyInit>"u"?null:Q._bodyInit)})}return le.polyfill=!0,S.fetch||(S.fetch=le,S.Headers=te,S.Request=M,S.Response=ae),c.Headers=te,c.Request=M,c.Response=ae,c.fetch=le,Object.defineProperty(c,"__esModule",{value:!0}),c}({})})(typeof self<"u"?self:this)},20788:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>j});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=L()(O());D.push([S.id,`.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
|
|
42
|
+
`,""]);const j=D},15218:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>M});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=c(7125),j=c.n(D),X=new URL(c(17735),c.b),te=new URL(c(56089),c.b),re=new URL(c(46050),c.b),he=new URL(c(71090),c.b),oe=new URL(c(96192),c.b),fe=L()(O()),J=j()(X),F=j()(te),ee=j()(re),N=j()(he),w=j()(oe);fe.push([S.id,".CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid black;border-radius:4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url("+J+")}.CodeMirror-lint-mark-error{background-image:url("+F+")}.CodeMirror-lint-marker{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("+ee+")}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("+N+")}.CodeMirror-lint-marker-multiple{background-image:url("+w+`);background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}.CodeMirror-lint-line-error{background-color:#b74c5114}.CodeMirror-lint-line-warning{background-color:#ffd3001a}
|
|
43
|
+
`,""]);const M=fe},80766:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>j});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=L()(O());D.push([S.id,`.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-scrollbar-filler,.CodeMirror-gutter-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 black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;inset:-50px 0 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-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,.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,.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:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.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}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-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;inset:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.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,.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:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}
|
|
44
|
+
`,""]);const j=D},62459:(S,R,c)=>{"use strict";c.r(R),c.d(R,{default:()=>j});var m=c(64737),O=c.n(m),k=c(62578),L=c.n(k),D=L()(O());D.push([S.id,`.cm-s-material.CodeMirror{background-color:#263238;color:#eff}.cm-s-material .CodeMirror-gutters{background:#263238;color:#546e7a;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#546e7a}.cm-s-material .CodeMirror-cursor{border-left:1px solid #FFCC00}.cm-s-material.cm-fat-cursor .CodeMirror-cursor,.cm-s-material .cm-animate-fat-cursor{background-color:#5d6d5c80!important}.cm-s-material div.CodeMirror-selected,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,.5)}.cm-s-material .cm-keyword{color:#c792ea}.cm-s-material .cm-operator{color:#89ddff}.cm-s-material .cm-variable-2{color:#eff}.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#f07178}.cm-s-material .cm-builtin{color:#ffcb6b}.cm-s-material .cm-atom{color:#f78c6c}.cm-s-material .cm-number{color:#ff5370}.cm-s-material .cm-def{color:#82aaff}.cm-s-material .cm-string{color:#c3e88d}.cm-s-material .cm-string-2{color:#f07178}.cm-s-material .cm-comment{color:#546e7a}.cm-s-material .cm-variable{color:#f07178}.cm-s-material .cm-tag{color:#ff5370}.cm-s-material .cm-meta{color:#ffcb6b}.cm-s-material .cm-attribute,.cm-s-material .cm-property{color:#c792ea}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#decb6b}.cm-s-material .cm-error{color:#fff;background-color:#ff5370}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
|
|
45
|
+
`,""]);const j=D},7125:S=>{"use strict";S.exports=function(R,c){return c||(c={}),R&&(R=String(R.__esModule?R.default:R),/^['"].*['"]$/.test(R)&&(R=R.slice(1,-1)),c.hash&&(R+=c.hash),/["'() \t\n]|(%20)/.test(R)||c.needQuotes?'"'.concat(R.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):R)}},5064:(S,R,c)=>{"use strict";c.r(R),c.d(R,{Console:()=>jy});var m={};c.r(m),c.d(m,{cookie:()=>Nc,header:()=>Mc,path:()=>Fc,query:()=>Ic});var O=c(10954),k=c(70762),L=c(93652),D=c(11099),j=c(10017),X=c(86351),te=c(86751),re=c(12953),he=c(55839),oe=c(23422);function fe(e){return fe=typeof he=="function"&&typeof oe=="symbol"?function(r){return typeof r}:function(r){return r&&typeof he=="function"&&r.constructor===he&&r!==he.prototype?"symbol":typeof r},fe(e)}var J=c(47319);function F(e,r){if(fe(e)!=="object"||e===null)return e;var i=e[J];if(i!==void 0){var a=i.call(e,r||"default");if(fe(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function ee(e){var r=F(e,"string");return fe(r)==="symbol"?r:String(r)}function N(e,r,i){return r=ee(r),r in e?re(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function w(e,r){var i=O(e);if(k){var a=k(e);r&&(a=L(a).call(a,function(o){return D(e,o).enumerable})),i.push.apply(i,a)}return i}function M(e){for(var r=1;r<arguments.length;r++){var i,a,o=arguments[r]!=null?arguments[r]:{};r%2?j(i=w(Object(o),!0)).call(i,function(f){N(e,f,o[f])}):X?te(e,X(o)):j(a=w(Object(o))).call(a,function(f){re(e,f,D(o,f))})}return e}var B=c(34961);function Z(e,r){if(e==null)return{};var i={},a=O(e),o,f;for(f=0;f<a.length;f++)o=a[f],!(B(r).call(r,o)>=0)&&(i[o]=e[o]);return i}function ae(e,r){if(e==null)return{};var i=Z(e,r),a,o;if(k){var f=k(e);for(o=0;o<f.length;o++)a=f[o],!(B(r).call(r,a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var H=c(13546),le=c.n(H),z=c(51121),q=c(26179);/*!
|
|
46
46
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
47
47
|
*
|
|
48
48
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
49
49
|
* Released under the MIT License.
|
|
50
|
-
*/function
|
|
50
|
+
*/function pe(e){return Object.prototype.toString.call(e)==="[object Object]"}function xe(e){var r,i;return pe(e)===!1?!1:(r=e.constructor,r===void 0?!0:(i=r.prototype,!(pe(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}var Q=c(81933),ye=c(67905),ie=c.n(ye);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function je(e){return typeof e>"u"||e===null}function ze(e){return typeof e=="object"&&e!==null}function Ue(e){return Array.isArray(e)?e:je(e)?[]:[e]}function vt(e,r){var i,a,o,f;if(r)for(f=Object.keys(r),i=0,a=f.length;i<a;i+=1)o=f[i],e[o]=r[o];return e}function pt(e,r){var i="",a;for(a=0;a<r;a+=1)i+=e;return i}function ut(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var er=je,gt=ze,Rt=Ue,st=pt,He=ut,Re=vt,Be={isNothing:er,isObject:gt,toArray:Rt,repeat:st,isNegativeZero:He,extend:Re};function lt(e,r){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(i+=`
|
|
51
51
|
|
|
52
|
-
`+
|
|
53
|
-
`+
|
|
54
|
-
`,
|
|
55
|
-
`,
|
|
56
|
-
`;return
|
|
57
|
-
\r`;function
|
|
58
|
-
`:
|
|
59
|
-
`,
|
|
60
|
-
`,
|
|
61
|
-
`);break}for(
|
|
62
|
-
`,
|
|
63
|
-
`,
|
|
64
|
-
`,
|
|
65
|
-
`,
|
|
66
|
-
`),
|
|
67
|
-
`,
|
|
68
|
-
`&&(
|
|
69
|
-
`+Be.repeat(" ",
|
|
70
|
-
`,
|
|
71
|
-
`||
|
|
72
|
-
`),
|
|
73
|
-
`}function
|
|
74
|
-
`?
|
|
75
|
-
`);return
|
|
76
|
-
`||
|
|
77
|
-
`:"")+
|
|
78
|
-
`+
|
|
79
|
-
`,
|
|
80
|
-
`+
|
|
81
|
-
`:""}var El=Ol,vs={dump:El};function gs(t,n){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var uf=Ft,ff=tn,Si=vr,ro=Pn,no=yr,ms=z,ys=yi.load,kl=yi.loadAll,bs=vs.dump,wi=qe,Ci={binary:Ln,float:Tn,map:Hr,null:at,pairs:wt,set:A,timestamp:Ir,bool:be,int:St,merge:Ur,omap:$e,seq:vn,str:kn},Dr=gs("safeLoad","load"),ri=gs("safeLoadAll","loadAll"),ni=gs("safeDump","dump"),wa={Type:uf,Schema:ff,FAILSAFE_SCHEMA:Si,JSON_SCHEMA:ro,CORE_SCHEMA:no,DEFAULT_SCHEMA:ms,load:ys,loadAll:kl,dump:bs,YAMLException:wi,types:Ci,safeLoad:Dr,safeLoadAll:ri,safeDump:ni};const cf=wa,Tl=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:window}(),{FormData:io,Blob:Bo,File:Ca}=Tl,Aa=t=>":/?#[]@!$&'()*+,;=".indexOf(t)>-1,df=t=>/^[a-z0-9\-._~]+$/i.test(t);function ii(t){let{escape:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return typeof t=="number"&&(t=t.toString()),typeof t!="string"||!t.length||!n?t:i?JSON.parse(t):[...t].map(s=>{if(df(s)||Aa(s)&&n==="unsafe")return s;const u=new TextEncoder;return Array.from(u.encode(s)).map(h=>`0${h.toString(16).toUpperCase()}`.slice(-2)).map(h=>`%${h}`).join("")}).join("")}function Oa(t){const{value:n}=t;return Array.isArray(n)?xs(t):typeof n=="object"?Ss(t):oo(t)}function xs(t){let{key:n,value:i,style:s,explode:u,escape:c}=t;const h=m=>ii(m,{escape:c});if(s==="simple")return i.map(m=>h(m)).join(",");if(s==="label")return`.${i.map(m=>h(m)).join(".")}`;if(s==="matrix")return i.map(m=>h(m)).reduce((m,p)=>!m||u?`${m||""};${n}=${p}`:`${m},${p}`,"");if(s==="form"){const m=u?`&${n}=`:",";return i.map(p=>h(p)).join(m)}if(s==="spaceDelimited"){const m=u?`${n}=`:"";return i.map(p=>h(p)).join(` ${m}`)}if(s==="pipeDelimited"){const m=u?`${n}=`:"";return i.map(p=>h(p)).join(`|${m}`)}}function Ss(t){let{key:n,value:i,style:s,explode:u,escape:c}=t;const h=p=>ii(p,{escape:c}),m=Object.keys(i);if(s==="simple")return m.reduce((p,y)=>{const E=h(i[y]),I=u?"=":",";return`${p?`${p},`:""}${y}${I}${E}`},"");if(s==="label")return m.reduce((p,y)=>{const E=h(i[y]),I=u?"=":".";return`${p?`${p}.`:"."}${y}${I}${E}`},"");if(s==="matrix"&&u)return m.reduce((p,y)=>{const E=h(i[y]);return`${p?`${p};`:";"}${y}=${E}`},"");if(s==="matrix")return m.reduce((p,y)=>{const E=h(i[y]);return`${p?`${p},`:`;${n}=`}${y},${E}`},"");if(s==="form")return m.reduce((p,y)=>{const E=h(i[y]);return`${p?`${p}${u?"&":","}`:""}${y}${u?"=":","}${E}`},"")}function oo(t){let{key:n,value:i,style:s,escape:u}=t;const c=h=>ii(h,{escape:u});if(s==="simple")return c(i);if(s==="label")return`.${c(i)}`;if(s==="matrix")return`;${n}=${c(i)}`;if(s==="form")return c(i);if(s==="deepObject")return c(i,{},!0)}const Pl=(t,n)=>{n.body=t},ao={serializeRes:Cs,mergeInQueryOrForm:oi};async function hf(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof t=="object"&&(n=t,t=n.url),n.headers=n.headers||{},ao.mergeInQueryOrForm(n),n.headers&&Object.keys(n.headers).forEach(u=>{const c=n.headers[u];typeof c=="string"&&(n.headers[u]=c.replace(/\n+/g," "))}),n.requestInterceptor&&(n=await n.requestInterceptor(n)||n);const i=n.headers["content-type"]||n.headers["Content-Type"];/multipart\/form-data/i.test(i)&&n.body instanceof io&&(delete n.headers["content-type"],delete n.headers["Content-Type"]);let s;try{s=await(n.userFetch||fetch)(n.url,n),s=await ao.serializeRes(s,t,n),n.responseInterceptor&&(s=await n.responseInterceptor(s)||s)}catch(u){if(!s)throw u;const c=new Error(s.statusText||`response status is ${s.status}`);throw c.status=s.status,c.statusCode=s.status,c.responseError=u,c}if(!s.ok){const u=new Error(s.statusText||`response status is ${s.status}`);throw u.status=s.status,u.statusCode=s.status,u.response=s,u}return s}const pf=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(t)};function vf(t,n){return n&&(n.indexOf("application/json")===0||n.indexOf("+json")>0)?JSON.parse(t):cf.load(t)}function Cs(t,n){let{loadSpec:i=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s={ok:t.ok,url:t.url||n,status:t.status,statusText:t.statusText,headers:so(t.headers)},u=s.headers["content-type"],c=i||pf(u);return(c?t.text:t.blob||t.buffer).call(t).then(m=>{if(s.text=m,s.data=m,c)try{const p=vf(m,u);s.body=p,s.obj=p}catch(p){s.parseError=p}return s})}function As(t){return t.includes(", ")?t.split(", "):t}function so(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof t.entries!="function"?{}:Array.from(t.entries()).reduce((n,i)=>{let[s,u]=i;return n[s]=As(u),n},{})}function Ai(t,n){return!n&&typeof navigator<"u"&&(n=navigator),n&&n.product==="ReactNative"?!!(t&&typeof t=="object"&&typeof t.uri=="string"):typeof Ca<"u"&&t instanceof Ca||typeof Bo<"u"&&t instanceof Bo||ArrayBuffer.isView(t)?!0:t!==null&&typeof t=="object"&&typeof t.pipe=="function"}function Ll(t,n){return Array.isArray(t)&&t.some(i=>Ai(i,n))}const Ea={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Il={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function lo(t,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{collectionFormat:s,allowEmptyValue:u,serializationOption:c,encoding:h}=n,m=typeof n=="object"&&!Array.isArray(n)?n.value:n,p=i?E=>E.toString():E=>encodeURIComponent(E),y=p(t);if(typeof m>"u"&&u)return[[y,""]];if(Ai(m)||Ll(m))return[[y,m]];if(c)return Os(t,m,i,c);if(h){if([typeof h.style,typeof h.explode,typeof h.allowReserved].some(E=>E!=="undefined")){const{style:E,explode:I,allowReserved:Q}=h;return Os(t,m,i,{style:E,explode:I,allowReserved:Q})}if(h.contentType){if(h.contentType==="application/json"){const E=typeof m=="string"?m:JSON.stringify(m);return[[y,p(E)]]}return[[y,p(m.toString())]]}return typeof m!="object"?[[y,p(m)]]:Array.isArray(m)&&m.every(E=>typeof E!="object")?[[y,m.map(p).join(",")]]:[[y,p(JSON.stringify(m))]]}return typeof m!="object"?[[y,p(m)]]:Array.isArray(m)?s==="multi"?[[y,m.map(p)]]:[[y,m.map(p).join(Il[s||"csv"])]]:[[y,""]]}function Os(t,n,i,s){const u=s.style||"form",c=typeof s.explode>"u"?u==="form":s.explode,h=i?!1:s&&s.allowReserved?"unsafe":"reserved",m=y=>ii(y,{escape:h}),p=i?y=>y:y=>ii(y,{escape:h});return typeof n!="object"?[[p(t),m(n)]]:Array.isArray(n)?c?[[p(t),n.map(m)]]:[[p(t),n.map(m).join(Ea[u])]]:u==="deepObject"?Object.keys(n).map(y=>[p(`${t}[${y}]`),m(n[y])]):c?Object.keys(n).map(y=>[p(y),m(n[y])]):[[p(t),Object.keys(n).map(y=>[`${p(y)},${m(n[y])}`]).join(",")]]}function Oi(t){return Object.entries(t).reduce((n,i)=>{let[s,u]=i;for(const[c,h]of lo(s,u,!0))if(Array.isArray(h))for(const m of h)if(ArrayBuffer.isView(m)){const p=new Bo([m]);n.append(c,p)}else n.append(c,m);else if(ArrayBuffer.isView(h)){const m=new Bo([h]);n.append(c,m)}else n.append(c,h);return n},new io)}function uo(t){const n=Object.keys(t).reduce((i,s)=>{for(const[u,c]of lo(s,t[s]))i[u]=c;return i},{});return ee().stringify(n,{encode:!1,indices:!1})||""}function oi(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{url:n="",query:i,form:s}=t,u=function(){for(var c=arguments.length,h=new Array(c),m=0;m<c;m++)h[m]=arguments[m];const p=h.filter(y=>y).join("&");return p?`?${p}`:""};if(s){const c=Object.keys(s).some(m=>{const{value:p}=s[m];return Ai(p)||Ll(p)}),h=t.headers["content-type"]||t.headers["Content-Type"];if(c||/multipart\/form-data/i.test(h)){const m=Oi(t.form);Pl(m,t)}else t.body=uo(s);delete t.form}if(i){const[c,h]=n.split("?");let m="";if(h){const y=ee().parse(h);Object.keys(i).forEach(I=>delete y[I]),m=ee().stringify(y,{encode:!0})}const p=u(m,uo(i));t.url=c+p,delete t.query}return t}function ka(t,n,i){return i=i||(s=>s),n=n||(s=>s),s=>(typeof s=="string"&&(s={url:s}),ao.mergeInQueryOrForm(s),s=n(s),i(t(s)))}function fo(t,n){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];[this.message]=u,n&&n.apply(this,u)}return i.prototype=new Error,i.prototype.name=t,i.prototype.constructor=i,i}const Ml={body:Nl,header:gf,query:ki,path:Ei,formData:Dl};function Nl(t){let{req:n,value:i}=t;n.body=i}function Dl(t){let{req:n,value:i,parameter:s}=t;(i||s.allowEmptyValue)&&(n.form=n.form||{},n.form[s.name]={value:i,allowEmptyValue:s.allowEmptyValue,collectionFormat:s.collectionFormat})}function gf(t){let{req:n,parameter:i,value:s}=t;n.headers=n.headers||{},typeof s<"u"&&(n.headers[i.name]=s)}function Ei(t){let{req:n,value:i,parameter:s}=t;n.url=n.url.split(`{${s.name}}`).join(encodeURIComponent(i))}function ki(t){let{req:n,value:i,parameter:s}=t;if(n.query=n.query||{},i===!1&&s.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(s.type)>-1&&(i="0"),i)n.query[s.name]={collectionFormat:s.collectionFormat,value:i};else if(s.allowEmptyValue&&i!==void 0){const u=s.name;n.query[u]=n.query[u]||{},n.query[u].allowEmptyValue=!0}}function Ta(t,n){return n.includes("application/json")?typeof t=="string"?t:JSON.stringify(t):t.toString()}function mf(t){let{req:n,value:i,parameter:s}=t;const{name:u,style:c,explode:h,content:m}=s;if(m){const y=Object.keys(m)[0];n.url=n.url.split(`{${u}}`).join(ii(Ta(i,y),{escape:!0}));return}const p=Oa({key:s.name,value:i,style:c||"simple",explode:h||!1,escape:!0});n.url=n.url.split(`{${u}}`).join(p)}function yf(t){let{req:n,value:i,parameter:s}=t;if(n.query=n.query||{},s.content){const u=Object.keys(s.content)[0],c=Ta(i,u);if(c)n.query[s.name]=c;else if(s.allowEmptyValue&&i!==void 0){const h=s.name;n.query[h]=n.query[h]||{},n.query[h].allowEmptyValue=!0}return}if(i===!1&&(i="false"),i===0&&(i="0"),i){const{style:u,explode:c,allowReserved:h}=s;n.query[s.name]={value:i,serializationOption:{style:u,explode:c,allowReserved:h}}}else if(s.allowEmptyValue&&i!==void 0){const u=s.name;n.query[u]=n.query[u]||{},n.query[u].allowEmptyValue=!0}}const bf=["accept","authorization","content-type"];function xf(t){let{req:n,parameter:i,value:s}=t;if(n.headers=n.headers||{},!(bf.indexOf(i.name.toLowerCase())>-1)){if(i.content){const u=Object.keys(i.content)[0];n.headers[i.name]=Ta(s,u);return}typeof s<"u"&&(n.headers[i.name]=Oa({key:i.name,value:s,style:i.style||"simple",explode:typeof i.explode>"u"?!1:i.explode,escape:!1}))}}function Sf(t){let{req:n,parameter:i,value:s}=t;n.headers=n.headers||{};const u=typeof s;if(i.content){const c=Object.keys(i.content)[0];n.headers.Cookie=`${i.name}=${Ta(s,c)}`;return}if(u!=="undefined"){const c=u==="object"&&!Array.isArray(s)&&i.explode?"":`${i.name}=`;n.headers.Cookie=c+Oa({key:i.name,value:s,escape:!1,style:i.style||"form",explode:typeof i.explode>"u"?!1:i.explode})}}const _r=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:window)(),{btoa:sr}=_r,xr=sr;function lr(t,n){const{operation:i,requestBody:s,securities:u,spec:c,attachContentTypeForEmptyPayload:h}=t;let{requestContentType:m}=t;n=jo({request:n,securities:u,operation:i,spec:c});const p=i.requestBody||{},y=Object.keys(p.content||{}),E=m&&y.indexOf(m)>-1;if(s||h){if(m&&E)n.headers["Content-Type"]=m;else if(!m){const I=y[0];I&&(n.headers["Content-Type"]=I,m=I)}}else m&&E&&(n.headers["Content-Type"]=m);if(!t.responseContentType&&i.responses){const I=Object.entries(i.responses).filter(Q=>{let[W,$]=Q;const ae=parseInt(W,10);return ae>=200&&ae<300&&ge($.content)}).reduce((Q,W)=>{let[,$]=W;return Q.concat(Object.keys($.content))},[]);I.length>0&&(n.headers.accept=I.join(", "))}if(s)if(m){if(y.indexOf(m)>-1)if(m==="application/x-www-form-urlencoded"||m==="multipart/form-data")if(typeof s=="object"){const I=(p.content[m]||{}).encoding||{};n.form={},Object.keys(s).forEach(Q=>{n.form[Q]={value:s[Q],encoding:I[Q]||{}}})}else n.form=s;else n.body=s}else n.body=s;return n}function jo(t){let{request:n,securities:i={},operation:s={},spec:u}=t;const c=L({},n),{authorized:h={}}=i,m=s.security||u.security||[],p=h&&!!Object.keys(h).length,y=ie()(u,["components","securitySchemes"])||{};return c.headers=c.headers||{},c.query=c.query||{},!Object.keys(i).length||!p||!m||Array.isArray(s.security)&&!s.security.length?n:(m.forEach(E=>{Object.keys(E).forEach(I=>{const Q=h[I],W=y[I];if(!Q)return;const $=Q.value||Q,{type:ae}=W;if(Q){if(ae==="apiKey")W.in==="query"&&(c.query[W.name]=$),W.in==="header"&&(c.headers[W.name]=$),W.in==="cookie"&&(c.cookies[W.name]=$);else if(ae==="http"){if(/^basic$/i.test(W.scheme)){const le=$.username||"",oe=$.password||"",fe=xr(`${le}:${oe}`);c.headers.Authorization=`Basic ${fe}`}/^bearer$/i.test(W.scheme)&&(c.headers.Authorization=`Bearer ${$}`)}else if(ae==="oauth2"||ae==="openIdConnect"){const le=Q.token||{},oe=W["x-tokenName"]||"access_token",fe=le[oe];let ye=le.token_type;(!ye||ye.toLowerCase()==="bearer")&&(ye="Bearer"),c.headers.Authorization=`${ye} ${fe}`}}})}),c)}function wf(t,n){const{spec:i,operation:s,securities:u,requestContentType:c,responseContentType:h,attachContentTypeForEmptyPayload:m}=t;if(n=Pa({request:n,securities:u,operation:s,spec:i}),n.body||n.form||m)c?n.headers["Content-Type"]=c:Array.isArray(s.consumes)?[n.headers["Content-Type"]]=s.consumes:Array.isArray(i.consumes)?[n.headers["Content-Type"]]=i.consumes:s.parameters&&s.parameters.filter(p=>p.type==="file").length?n.headers["Content-Type"]="multipart/form-data":s.parameters&&s.parameters.filter(p=>p.in==="formData").length&&(n.headers["Content-Type"]="application/x-www-form-urlencoded");else if(c){const p=s.parameters&&s.parameters.filter(E=>E.in==="body").length>0,y=s.parameters&&s.parameters.filter(E=>E.in==="formData").length>0;(p||y)&&(n.headers["Content-Type"]=c)}return!h&&Array.isArray(s.produces)&&s.produces.length>0&&(n.headers.accept=s.produces.join(", ")),n}function Pa(t){let{request:n,securities:i={},operation:s={},spec:u}=t;const c=L({},n),{authorized:h={},specSecurity:m=[]}=i,p=s.security||m,y=h&&!!Object.keys(h).length,E=u.securityDefinitions;return c.headers=c.headers||{},c.query=c.query||{},!Object.keys(i).length||!y||!p||Array.isArray(s.security)&&!s.security.length?n:(p.forEach(I=>{Object.keys(I).forEach(Q=>{const W=h[Q];if(!W)return;const{token:$}=W,ae=W.value||W,le=E[Q],{type:oe}=le,fe=le["x-tokenName"]||"access_token",ye=$&&$[fe];let Ae=$&&$.token_type;if(W)if(oe==="apiKey"){const we=le.in==="query"?"query":"headers";c[we]=c[we]||{},c[we][le.name]=ae}else if(oe==="basic")if(ae.header)c.headers.authorization=ae.header;else{const we=ae.username||"",Te=ae.password||"";ae.base64=xr(`${we}:${Te}`),c.headers.authorization=`Basic ${ae.base64}`}else oe==="oauth2"&&ye&&(Ae=!Ae||Ae.toLowerCase()==="bearer"?"Bearer":Ae,c.headers.authorization=`${Ae} ${ye}`)})}),c)}function Fl(t,n){return`${n.toLowerCase()}-${t}`}function Cf(t,n,i){if(!t||typeof t!="object"||!t.paths||typeof t.paths!="object")return null;const{paths:s}=t;for(const u in s)for(const c in s[u]){if(c.toUpperCase()==="PARAMETERS")continue;const h=s[u][c];if(!h||typeof h!="object")continue;const m={spec:t,pathName:u,method:c.toUpperCase(),operation:h},p=n(m);if(i&&p)return m}}function Af(t,n){return Cf(t,n,!0)||null}const Es=t=>t.replace(/\W/gi,"_");function ks(t,n){let{v2OperationIdCompatibilityMode:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(i){let s=`${n.toLowerCase()}_${t}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return s=s||`${t.substring(1)}_${n}`,s.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${n.toLowerCase()}${Es(t)}`}function Of(t,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",{v2OperationIdCompatibilityMode:s}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return!t||typeof t!="object"?null:(t.operationId||"").replace(/\s/g,"").length?Es(t.operationId):ks(n,i,{v2OperationIdCompatibilityMode:s})}function Ts(t,n){return!t||!t.paths?null:Af(t,i=>{let{pathName:s,method:u,operation:c}=i;if(!c||typeof c!="object")return!1;const h=c.operationId,m=Of(c,s,u),p=Fl(s,u);return[m,p,h].some(y=>y&&y===n)})}const Bl=t=>{try{const{swagger:n}=t;return n==="2.0"}catch{return!1}},jl=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(n)}catch{return!1}},Wl=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(n)}catch{return!1}},La=t=>jl(t)||Wl(t),Hl=["http","fetch","spec","operationId","pathName","method","parameters","securities"],co=t=>Array.isArray(t)?t:[],Ef=fo("OperationNotFoundError",function(n,i,s){this.originalError=s,Object.assign(this,i||{})}),Ia=(t,n)=>n.filter(i=>i.name===t),Kn=t=>{const n={};t.forEach(s=>{n[s.in]||(n[s.in]={}),n[s.in][s.name]=s});const i=[];return Object.keys(n).forEach(s=>{Object.keys(n[s]).forEach(u=>{i.push(n[s][u])})}),i},Ul={buildRequest:zl};function kf(t){let{http:n,fetch:i,spec:s,operationId:u,pathName:c,method:h,parameters:m,securities:p}=t,y=te(t,Hl);const E=n||i||hf;c&&h&&!u&&(u=Fl(c,h));const I=Ul.buildRequest(L({spec:s,operationId:u,parameters:m,securities:p,http:E},y));return I.body&&(ge(I.body)||Array.isArray(I.body))&&(I.body=JSON.stringify(I.body)),E(I)}function zl(t){const{spec:n,operationId:i,responseContentType:s,scheme:u,requestInterceptor:c,responseInterceptor:h,contextUrl:m,userFetch:p,server:y,serverVariables:E,http:I,signal:Q}=t;let{parameters:W,parameterBuilders:$}=t;const ae=La(n);$||(ae?$=v:$=Ml);let oe={url:"",credentials:I&&I.withCredentials?"include":"same-origin",headers:{},cookies:{}};Q&&(oe.signal=Q),c&&(oe.requestInterceptor=c),h&&(oe.responseInterceptor=h),p&&(oe.userFetch=p);const fe=Ts(n,i);if(!fe)throw new Ef(`Operation ${i} not found`);const{operation:ye={},method:Ae,pathName:we}=fe;if(oe.url+=Ot({spec:n,scheme:u,contextUrl:m,server:y,serverVariables:E,pathName:we,method:Ae}),!i)return delete oe.cookies,oe;oe.url+=we,oe.method=`${Ae}`.toUpperCase(),W=W||{};const Te=n.paths[we]||{};s&&(oe.headers.accept=s);const ke=Kn([].concat(co(ye.parameters)).concat(co(Te.parameters)));ke.forEach(pe=>{const Le=$[pe.in];let Ee;if(pe.in==="body"&&pe.schema&&pe.schema.properties&&(Ee=W),Ee=pe&&pe.name&&W[pe.name],typeof Ee>"u"?Ee=pe&&pe.name&&W[`${pe.in}.${pe.name}`]:Ia(pe.name,ke).length>1&&console.warn(`Parameter '${pe.name}' is ambiguous because the defined spec has more than one parameter with the name: '${pe.name}' and the passed-in parameter values did not define an 'in' value.`),Ee!==null){if(typeof pe.default<"u"&&typeof Ee>"u"&&(Ee=pe.default),typeof Ee>"u"&&pe.required&&!pe.allowEmptyValue)throw new Error(`Required parameter ${pe.name} is not provided`);if(ae&&pe.schema&&pe.schema.type==="object"&&typeof Ee=="string")try{Ee=JSON.parse(Ee)}catch{throw new Error("Could not parse object parameter value string as JSON")}Le&&Le({req:oe,parameter:pe,value:Ee,operation:ye,spec:n})}});const Me=L(L({},t),{},{operation:ye});if(ae?oe=lr(Me,oe):oe=wf(Me,oe),oe.cookies&&Object.keys(oe.cookies).length){const pe=Object.keys(oe.cookies).reduce((Le,Ee)=>{const je=oe.cookies[Ee],rt=Le?"&":"",Pt=Y.serialize(Ee,je);return Le+rt+Pt},"");oe.headers.Cookie=pe}return oe.cookies&&delete oe.cookies,oi(oe),oe}const Fr=t=>t?t.replace(/\W/g,""):null;function Ot(t){return La(t.spec)?Sn(t):_l(t)}function Sn(t){let{spec:n,pathName:i,method:s,server:u,contextUrl:c,serverVariables:h={}}=t;const m=ie()(n,["paths",i,(s||"").toLowerCase(),"servers"])||ie()(n,["paths",i,"servers"])||ie()(n,["servers"]);let p="",y=null;if(u&&m&&m.length){const E=m.map(I=>I.url);E.indexOf(u)>-1&&(p=u,y=m[E.indexOf(u)])}return!p&&m&&m.length&&(p=m[0].url,[y]=m),p.indexOf("{")>-1&&si(p).forEach(I=>{if(y.variables&&y.variables[I]){const Q=y.variables[I],W=h[I]||Q.default,$=new RegExp(`{${I}}`,"g");p=p.replace($,W)}}),ai(p,c)}function ai(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=t&&n?U.parse(U.resolve(n,t)):U.parse(t),s=U.parse(n),u=Fr(i.protocol)||Fr(s.protocol)||"",c=i.host||s.host,h=i.pathname||"";let m;return u&&c?m=`${u}://${c+h}`:m=h,m[m.length-1]==="/"?m.slice(0,-1):m}function si(t){const n=[],i=/{([^}]+)}/g;let s;for(;s=i.exec(t);)n.push(s[1]);return n}function _l(t){let{spec:n,scheme:i,contextUrl:s=""}=t;const u=U.parse(s),c=Array.isArray(n.schemes)?n.schemes[0]:null,h=i||c||Fr(u.protocol)||"http",m=n.host||u.host||"",p=n.basePath||"";let y;return h&&m?y=`${h}://${m+p}`:y=p,y[y.length-1]==="/"?y.slice(0,-1):y}var B=f(29901),Vt=f(20202),Dn=f(21999),Ps=f(37837),Wo=f(96244),Vl=f(2526),Ls=Object.defineProperty,li=Object.defineProperties,$l=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,Tf=Object.prototype.hasOwnProperty,Ma=Object.prototype.propertyIsEnumerable,Na=(t,n,i)=>n in t?Ls(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,Gl=(t,n)=>{for(var i in n||(n={}))Tf.call(n,i)&&Na(t,i,n[i]);if(Is)for(var i of Is(n))Ma.call(n,i)&&Na(t,i,n[i]);return t},Pf=(t,n)=>li(t,$l(n)),Kl=(t,n,i)=>new Promise((s,u)=>{var c=p=>{try{m(i.next(p))}catch(y){u(y)}},h=p=>{try{m(i.throw(p))}catch(y){u(y)}},m=p=>p.done?s(p.value):Promise.resolve(p.value).then(c,h);m((i=i.apply(t,n)).next())});function Lf(t,n){return Kl(this,null,function*(){var i,s,u,c;const h=JSON.parse(JSON.stringify(n)),m=h.openapi?{openapi:h.openapi}:h.swagger?{swagger:h.swagger}:{},p=Pf(Gl({},m),{components:h.components,paths:{[t.path]:{[t.httpVerb]:(s=(i=h.paths)==null?void 0:i[t.path])==null?void 0:s[t.httpVerb],parameters:(c=(u=h.paths)==null?void 0:u[t.path])==null?void 0:c.parameters}}}),y=new Wo.Config({}),E=(0,Vl.I)(p),I={config:y,doc:E,dereference:!0};return yield(0,Ps.bundle)(I),h})}var If=f(98910),Ti=f(84862),wn=f(53134),Yl=(t,n,i)=>new Promise((s,u)=>{var c=p=>{try{m(i.next(p))}catch(y){u(y)}},h=p=>{try{m(i.throw(p))}catch(y){u(y)}},m=p=>p.done?s(p.value):Promise.resolve(p.value).then(c,h);m((i=i.apply(t,n)).next())});const Xl=Object.values(wn.FileUploadFormats),Jl=["application/octet-stream","application/pdf","application/gzip","application/zip"],Pi=["image/","audio/","video/"];function Da(t){if(Pi.some(n=>t.startsWith(n)))return t}function Li(t){return Jl.includes(t)?!0:Pi.some(n=>t.startsWith(n))}function Ql(t){const n=t.type==="array"?t.items:t;if(!n||!n.type||n?.type==="any")return!0;const i=n.contentMediaType||"",s=n.format||n.contentEncoding||(Li(i)?"binary":"");return n.type===wn.DefinitionTypes.STRING&&Xl.includes(s)}function Fa(t,n){if(!t||!t.type||t.type==="any")return Li(n);const i=t.format||t.contentEncoding||"";return t.type===wn.DefinitionTypes.STRING&&Xl.includes(i)}function Ms(t){return new Promise((n,i)=>{const s=new FileReader;s.onload=()=>{const c=s.result.replace(/data:.*\/.*;base64,/g,"");n(c)},s.onerror=()=>i(s.error),s.readAsDataURL(t)})}function Zl({format:t,contentEncoding:n,contentMediaType:i}){return[t,n,i].includes(wn.FileUploadFormats.BASE64)}function ql(t,n){return Yl(this,null,function*(){const i=Object.values(t);let s=i.length===1?i[0]:i;return n.type===wn.DefinitionTypes.STRING&&Zl(n)?s=yield Ms(i[0]):n.type===wn.DefinitionTypes.ARRAY&&n.items&&(Zl(n.items)?s=yield Promise.all(i.map(c=>Yl(this,null,function*(){return yield Ms(c)}))):s=i),s})}var ur=f(84622),gt=f(38612),Et=f(38779),lt=f(68176),Jr=f(71608),ho=f(64393);function Ra({response:t}){return B.createElement(B.Fragment,null,B.createElement(Jr.EE,null," Body: "),eu(t))}function eu(t){return t.body?B.createElement(Vt.JsonViewer,{data:t.body,jsonSampleExpandLevel:1}):t.fileInfo?B.createElement(ho.s,{fileInfo:t.fileInfo}):t.data!==null?t.data?B.createElement(Vt.CodeBlock,{lang:(0,lt.M)(t.headers["Content-Type"]||"text/plain"),source:t.data,header:{controls:{copy:{}}}}):B.createElement(Vt.CodeBlockContainer,{withControls:!0},B.createElement("i",null,"(no content)")):null}var ui=f(79216);function tu({headers:t}){const n=(0,Dn.useRecoilValue)(ui.lk),[i,s]=(0,B.useState)(!0),{maxResponseHeadersToShowInTryIt:u}=n,c=Object.keys(t),h=!!u&&c.length>u,m=h&&i?[...c].splice(0,u):[...c],p=()=>{s(!i)};return B.createElement(B.Fragment,null,B.createElement(Jr.EE,null," Headers: "),B.createElement(Vt.CodeBlockContainer,{withControls:!0},m.map(y=>B.createElement("div",{key:y},B.createElement(Ii,null,y,":"),B.createElement("code",null,t[y]))),h&&B.createElement(Ns,{onClick:p},i?"Show more...":"Hide headers")))}const Ii=Et.ZP.strong`
|
|
52
|
+
`+e.mark.snippet),a+" "+i):a}function _t(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=lt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_t.prototype=Object.create(Error.prototype),_t.prototype.constructor=_t,_t.prototype.toString=function(r){return this.name+": "+lt(this,r)};var rt=_t;function Pt(e,r,i,a,o){var f="",d="",v=Math.floor(o/2)-1;return a-r>v&&(f=" ... ",r=a-v+f.length),i-a>v&&(d=" ...",i=a+v-d.length),{str:f+e.slice(r,i).replace(/\t/g,"\u2192")+d,pos:a-r+f.length}}function tr(e,r){return Be.repeat(" ",r-e.length)+e}function or(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var i=/\r?\n|\r|\0/g,a=[0],o=[],f,d=-1;f=i.exec(e.buffer);)o.push(f.index),a.push(f.index+f[0].length),e.position<=f.index&&d<0&&(d=a.length-2);d<0&&(d=a.length-1);var v="",h,g,b=Math.min(e.line+r.linesAfter,o.length).toString().length,E=r.maxLength-(r.indent+b+3);for(h=1;h<=r.linesBefore&&!(d-h<0);h++)g=Pt(e.buffer,a[d-h],o[d-h],e.position-(a[d]-a[d-h]),E),v=Be.repeat(" ",r.indent)+tr((e.line-h+1).toString(),b)+" | "+g.str+`
|
|
53
|
+
`+v;for(g=Pt(e.buffer,a[d],o[d],e.position,E),v+=Be.repeat(" ",r.indent)+tr((e.line+1).toString(),b)+" | "+g.str+`
|
|
54
|
+
`,v+=Be.repeat("-",r.indent+b+3+g.pos)+`^
|
|
55
|
+
`,h=1;h<=r.linesAfter&&!(d+h>=o.length);h++)g=Pt(e.buffer,a[d+h],o[d+h],e.position-(a[d]-a[d+h]),E),v+=Be.repeat(" ",r.indent)+tr((e.line+h+1).toString(),b)+" | "+g.str+`
|
|
56
|
+
`;return v.replace(/\n$/,"")}var kr=or,et=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Et=["scalar","sequence","mapping"];function jt(e){var r={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){r[String(a)]=i})}),r}function _r(e,r){if(r=r||{},Object.keys(r).forEach(function(i){if(et.indexOf(i)===-1)throw new rt('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(i){return i},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=jt(r.styleAliases||null),Et.indexOf(this.kind)===-1)throw new rt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var zt=_r;function Bn(e,r){var i=[];return e[r].forEach(function(a){var o=i.length;i.forEach(function(f,d){f.tag===a.tag&&f.kind===a.kind&&f.multi===a.multi&&(o=d)}),i[o]=a}),i}function Vn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,i;function a(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(a);return e}function nn(e){return this.extend(e)}nn.prototype.extend=function(r){var i=[],a=[];if(r instanceof zt)a.push(r);else if(Array.isArray(r))a=a.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(i=i.concat(r.implicit)),r.explicit&&(a=a.concat(r.explicit));else throw new rt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(f){if(!(f instanceof zt))throw new rt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new rt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new rt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(f){if(!(f instanceof zt))throw new rt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(nn.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(a),o.compiledImplicit=Bn(o,"implicit"),o.compiledExplicit=Bn(o,"explicit"),o.compiledTypeMap=Vn(o.compiledImplicit,o.compiledExplicit),o};var Cn=nn,ri=new zt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),jn=new zt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),an=new zt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mr=new Cn({explicit:[ri,jn,an]});function zr(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function Gt(){return null}function St(e){return e===null}var ft=new zt("tag:yaml.org,2002:null",{kind:"scalar",resolve:zr,construct:Gt,predicate:St,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function tt(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function mt(e){return e==="true"||e==="True"||e==="TRUE"}function se(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var we=new zt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:tt,construct:mt,predicate:se,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Ve(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function nt(e){return 48<=e&&e<=55}function ht(e){return 48<=e&&e<=57}function ct(e){if(e===null)return!1;var r=e.length,i=0,a=!1,o;if(!r)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===r)return!0;if(o=e[++i],o==="b"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!Ve(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(i++;i<r;i++)if(o=e[i],o!=="_"){if(!nt(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;i<r;i++)if(o=e[i],o!=="_"){if(!ht(e.charCodeAt(i)))return!1;a=!0}return!(!a||o==="_")}function Qt(e){var r=e,i=1,a;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),a=r[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),r=r.slice(1),a=r[0]),r==="0")return 0;if(a==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Gr(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Be.isNegativeZero(e)}var Ft=new zt("tag:yaml.org,2002:int",{kind:"scalar",resolve:ct,construct:Qt,predicate:Gr,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vi(e){return!(e===null||!dr.test(e)||e[e.length-1]==="_")}function Nr(e){var r,i;return r=e.replace(/_/g,"").toLowerCase(),i=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:i*parseFloat(r,10)}var Rr=/^[-+]?[0-9]+e/;function gi(e,r){var i;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Be.isNegativeZero(e))return"-0.0";return i=e.toString(10),Rr.test(i)?i.replace("e",".e"):i}function $r(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Be.isNegativeZero(e))}var ni=new zt("tag:yaml.org,2002:float",{kind:"scalar",resolve:vi,construct:Nr,predicate:$r,represent:gi,defaultStyle:"lowercase"}),ii=Mr.extend({implicit:[ft,we,Ft,ni]}),Dr=ii,mi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Wn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ii(e){return e===null?!1:mi.exec(e)!==null||Wn.exec(e)!==null}function Ta(e){var r,i,a,o,f,d,v,h=0,g=null,b,E,V;if(r=mi.exec(e),r===null&&(r=Wn.exec(e)),r===null)throw new Error("Date resolve error");if(i=+r[1],a=+r[2]-1,o=+r[3],!r[4])return new Date(Date.UTC(i,a,o));if(f=+r[4],d=+r[5],v=+r[6],r[7]){for(h=r[7].slice(0,3);h.length<3;)h+="0";h=+h}return r[9]&&(b=+r[10],E=+(r[11]||0),g=(b*60+E)*6e4,r[9]==="-"&&(g=-g)),V=new Date(Date.UTC(i,a,o,f,d,v,h)),g&&V.setTime(V.getTime()-g),V}function hn(e){return e.toISOString()}var Jr=new zt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ii,construct:Ta,instanceOf:Date,represent:hn});function vn(e){return e==="<<"||e===null}var on=new zt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vn}),sn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
57
|
+
\r`;function fo(e){if(e===null)return!1;var r,i,a=0,o=e.length,f=sn;for(i=0;i<o;i++)if(r=f.indexOf(e.charAt(i)),!(r>64)){if(r<0)return!1;a+=6}return a%8===0}function Hn(e){var r,i,a=e.replace(/[\r\n=]/g,""),o=a.length,f=sn,d=0,v=[];for(r=0;r<o;r++)r%4===0&&r&&(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)),d=d<<6|f.indexOf(a.charAt(r));return i=o%4*6,i===0?(v.push(d>>16&255),v.push(d>>8&255),v.push(d&255)):i===18?(v.push(d>>10&255),v.push(d>>2&255)):i===12&&v.push(d>>4&255),new Uint8Array(v)}function Qr(e){var r="",i=0,a,o,f=e.length,d=sn;for(a=0;a<f;a++)a%3===0&&a&&(r+=d[i>>18&63],r+=d[i>>12&63],r+=d[i>>6&63],r+=d[i&63]),i=(i<<8)+e[a];return o=f%3,o===0?(r+=d[i>>18&63],r+=d[i>>12&63],r+=d[i>>6&63],r+=d[i&63]):o===2?(r+=d[i>>10&63],r+=d[i>>4&63],r+=d[i<<2&63],r+=d[64]):o===1&&(r+=d[i>>2&63],r+=d[i<<4&63],r+=d[64],r+=d[64]),r}function pr(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ai=new zt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:fo,construct:Hn,predicate:pr,represent:Qr}),An=Object.prototype.hasOwnProperty,ka=Object.prototype.toString;function Vo(e){if(e===null)return!0;var r=[],i,a,o,f,d,v=e;for(i=0,a=v.length;i<a;i+=1){if(o=v[i],d=!1,ka.call(o)!=="[object Object]")return!1;for(f in o)if(An.call(o,f))if(!d)d=!0;else return!1;if(!d)return!1;if(r.indexOf(f)===-1)r.push(f);else return!1}return!0}function Xt(e){return e!==null?e:[]}var Ge=new zt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Vo,construct:Xt}),yi=Object.prototype.toString;function Qi(e){if(e===null)return!0;var r,i,a,o,f,d=e;for(f=new Array(d.length),r=0,i=d.length;r<i;r+=1){if(a=d[r],yi.call(a)!=="[object Object]"||(o=Object.keys(a),o.length!==1))return!1;f[r]=[o[0],a[o[0]]]}return!0}function On(e){if(e===null)return[];var r,i,a,o,f,d=e;for(f=new Array(d.length),r=0,i=d.length;r<i;r+=1)a=d[r],o=Object.keys(a),f[r]=[o[0],a[o[0]]];return f}var It=new zt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Qi,construct:On}),bi=Object.prototype.hasOwnProperty;function Zi(e){if(e===null)return!0;var r,i=e;for(r in i)if(bi.call(i,r)&&i[r]!==null)return!1;return!0}function Pa(e){return e!==null?e:{}}var T=new zt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Zi,construct:Pa}),$=Dr.extend({implicit:[Jr,on],explicit:[ai,Ge,It,T]}),Pe=Object.prototype.hasOwnProperty,Fe=1,it=2,wt=3,Lt=4,$e=1,En=2,co=3,jo=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oi=/[\x85\u2028\u2029]/,ru=/[,\[\]\{\}]/,Ws=/^(?:!|!!|![a-z\-]+!)$/i,Fa=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Wo(e){return Object.prototype.toString.call(e)}function Un(e){return e===10||e===13}function xi(e){return e===9||e===32}function Zr(e){return e===9||e===32||e===10||e===13}function qi(e){return e===44||e===91||e===93||e===123||e===125}function nu(e){var r;return 48<=e&&e<=57?e-48:(r=e|32,97<=r&&r<=102?r-97+10:-1)}function iu(e){return e===120?2:e===117?4:e===85?8:0}function nc(e){return 48<=e&&e<=57?e-48:-1}function au(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
58
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ou(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var si=new Array(256),su=new Array(256),Ia=0;Ia<256;Ia++)si[Ia]=au(Ia)?1:0,su[Ia]=au(Ia);function Ho(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||$,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function La(e,r){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=kr(i),new rt(r,i)}function Ze(e,r){throw La(e,r)}function Uo(e,r){e.onWarning&&e.onWarning.call(null,La(e,r))}var lu={YAML:function(r,i,a){var o,f,d;r.version!==null&&Ze(r,"duplication of %YAML directive"),a.length!==1&&Ze(r,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),o===null&&Ze(r,"ill-formed argument of the YAML directive"),f=parseInt(o[1],10),d=parseInt(o[2],10),f!==1&&Ze(r,"unacceptable YAML version of the document"),r.version=a[0],r.checkLineBreaks=d<2,d!==1&&d!==2&&Uo(r,"unsupported YAML version of the document")},TAG:function(r,i,a){var o,f;a.length!==2&&Ze(r,"TAG directive accepts exactly two arguments"),o=a[0],f=a[1],Ws.test(o)||Ze(r,"ill-formed tag handle (first argument) of the TAG directive"),Pe.call(r.tagMap,o)&&Ze(r,'there is a previously declared suffix for "'+o+'" tag handle'),Fa.test(f)||Ze(r,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch{Ze(r,"tag prefix is malformed: "+f)}r.tagMap[o]=f}};function Li(e,r,i,a){var o,f,d,v;if(r<i){if(v=e.input.slice(r,i),a)for(o=0,f=v.length;o<f;o+=1)d=v.charCodeAt(o),d===9||32<=d&&d<=1114111||Ze(e,"expected valid JSON character");else jo.test(v)&&Ze(e,"the stream contains non-printable characters");e.result+=v}}function _o(e,r,i,a){var o,f,d,v;for(Be.isObject(i)||Ze(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),d=0,v=o.length;d<v;d+=1)f=o[d],Pe.call(r,f)||(r[f]=i[f],a[f]=!0)}function ea(e,r,i,a,o,f,d,v,h){var g,b;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),g=0,b=o.length;g<b;g+=1)Array.isArray(o[g])&&Ze(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Wo(o[g])==="[object Object]"&&(o[g]="[object Object]");if(typeof o=="object"&&Wo(o)==="[object Object]"&&(o="[object Object]"),o=String(o),r===null&&(r={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(f))for(g=0,b=f.length;g<b;g+=1)_o(e,r,f[g],i);else _o(e,r,f,i);else!e.json&&!Pe.call(i,o)&&Pe.call(r,o)&&(e.line=d||e.line,e.lineStart=v||e.lineStart,e.position=h||e.position,Ze(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:f}):r[o]=f,delete i[o];return r}function Hs(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ze(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function hr(e,r,i){for(var a=0,o=e.input.charCodeAt(e.position);o!==0;){for(;xi(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(r&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Un(o))for(Hs(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&Uo(e,"deficient indentation"),a}function po(e){var r=e.position,i;return i=e.input.charCodeAt(r),!!((i===45||i===46)&&i===e.input.charCodeAt(r+1)&&i===e.input.charCodeAt(r+2)&&(r+=3,i=e.input.charCodeAt(r),i===0||Zr(i)))}function Ma(e,r){r===1?e.result+=" ":r>1&&(e.result+=Be.repeat(`
|
|
59
|
+
`,r-1))}function zo(e,r,i){var a,o,f,d,v,h,g,b,E=e.kind,V=e.result,I;if(I=e.input.charCodeAt(e.position),Zr(I)||qi(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96||(I===63||I===45)&&(o=e.input.charCodeAt(e.position+1),Zr(o)||i&&qi(o)))return!1;for(e.kind="scalar",e.result="",f=d=e.position,v=!1;I!==0;){if(I===58){if(o=e.input.charCodeAt(e.position+1),Zr(o)||i&&qi(o))break}else if(I===35){if(a=e.input.charCodeAt(e.position-1),Zr(a))break}else{if(e.position===e.lineStart&&po(e)||i&&qi(I))break;if(Un(I))if(h=e.line,g=e.lineStart,b=e.lineIndent,hr(e,!1,-1),e.lineIndent>=r){v=!0,I=e.input.charCodeAt(e.position);continue}else{e.position=d,e.line=h,e.lineStart=g,e.lineIndent=b;break}}v&&(Li(e,f,d,!1),Ma(e,e.line-h),f=d=e.position,v=!1),xi(I)||(d=e.position+1),I=e.input.charCodeAt(++e.position)}return Li(e,f,d,!1),e.result?!0:(e.kind=E,e.result=V,!1)}function Us(e,r){var i,a,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Li(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,o=e.position;else return!0;else Un(i)?(Li(e,a,o,!0),Ma(e,hr(e,!1,r)),a=o=e.position):e.position===e.lineStart&&po(e)?Ze(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);Ze(e,"unexpected end of the stream within a single quoted scalar")}function uu(e,r){var i,a,o,f,d,v;if(v=e.input.charCodeAt(e.position),v!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(v=e.input.charCodeAt(e.position))!==0;){if(v===34)return Li(e,i,e.position,!0),e.position++,!0;if(v===92){if(Li(e,i,e.position,!0),v=e.input.charCodeAt(++e.position),Un(v))hr(e,!1,r);else if(v<256&&si[v])e.result+=su[v],e.position++;else if((d=iu(v))>0){for(o=d,f=0;o>0;o--)v=e.input.charCodeAt(++e.position),(d=nu(v))>=0?f=(f<<4)+d:Ze(e,"expected hexadecimal character");e.result+=ou(f),e.position++}else Ze(e,"unknown escape sequence");i=a=e.position}else Un(v)?(Li(e,i,a,!0),Ma(e,hr(e,!1,r)),i=a=e.position):e.position===e.lineStart&&po(e)?Ze(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}Ze(e,"unexpected end of the stream within a double quoted scalar")}function fu(e,r){var i=!0,a,o,f,d=e.tag,v,h=e.anchor,g,b,E,V,I,W=Object.create(null),Y,_,U,G;if(G=e.input.charCodeAt(e.position),G===91)b=93,I=!1,v=[];else if(G===123)b=125,I=!0,v={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=v),G=e.input.charCodeAt(++e.position);G!==0;){if(hr(e,!0,r),G=e.input.charCodeAt(e.position),G===b)return e.position++,e.tag=d,e.anchor=h,e.kind=I?"mapping":"sequence",e.result=v,!0;i?G===44&&Ze(e,"expected the node content, but found ','"):Ze(e,"missed comma between flow collection entries"),_=Y=U=null,E=V=!1,G===63&&(g=e.input.charCodeAt(e.position+1),Zr(g)&&(E=V=!0,e.position++,hr(e,!0,r))),a=e.line,o=e.lineStart,f=e.position,Mi(e,r,Fe,!1,!0),_=e.tag,Y=e.result,hr(e,!0,r),G=e.input.charCodeAt(e.position),(V||e.line===a)&&G===58&&(E=!0,G=e.input.charCodeAt(++e.position),hr(e,!0,r),Mi(e,r,Fe,!1,!0),U=e.result),I?ea(e,v,W,_,Y,U,a,o,f):E?v.push(ea(e,null,W,_,Y,U,a,o,f)):v.push(Y),hr(e,!0,r),G=e.input.charCodeAt(e.position),G===44?(i=!0,G=e.input.charCodeAt(++e.position)):i=!1}Ze(e,"unexpected end of the stream within a flow collection")}function Go(e,r){var i,a,o=$e,f=!1,d=!1,v=r,h=0,g=!1,b,E;if(E=e.input.charCodeAt(e.position),E===124)a=!1;else if(E===62)a=!0;else return!1;for(e.kind="scalar",e.result="";E!==0;)if(E=e.input.charCodeAt(++e.position),E===43||E===45)$e===o?o=E===43?co:En:Ze(e,"repeat of a chomping mode identifier");else if((b=nc(E))>=0)b===0?Ze(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?Ze(e,"repeat of an indentation width identifier"):(v=r+b-1,d=!0);else break;if(xi(E)){do E=e.input.charCodeAt(++e.position);while(xi(E));if(E===35)do E=e.input.charCodeAt(++e.position);while(!Un(E)&&E!==0)}for(;E!==0;){for(Hs(e),e.lineIndent=0,E=e.input.charCodeAt(e.position);(!d||e.lineIndent<v)&&E===32;)e.lineIndent++,E=e.input.charCodeAt(++e.position);if(!d&&e.lineIndent>v&&(v=e.lineIndent),Un(E)){h++;continue}if(e.lineIndent<v){o===co?e.result+=Be.repeat(`
|
|
60
|
+
`,f?1+h:h):o===$e&&f&&(e.result+=`
|
|
61
|
+
`);break}for(a?xi(E)?(g=!0,e.result+=Be.repeat(`
|
|
62
|
+
`,f?1+h:h)):g?(g=!1,e.result+=Be.repeat(`
|
|
63
|
+
`,h+1)):h===0?f&&(e.result+=" "):e.result+=Be.repeat(`
|
|
64
|
+
`,h):e.result+=Be.repeat(`
|
|
65
|
+
`,f?1+h:h),f=!0,d=!0,h=0,i=e.position;!Un(E)&&E!==0;)E=e.input.charCodeAt(++e.position);Li(e,i,e.position,!1)}return!0}function cu(e,r){var i,a=e.tag,o=e.anchor,f=[],d,v=!1,h;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),h=e.input.charCodeAt(e.position);h!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ze(e,"tab characters must not be used in indentation")),!(h!==45||(d=e.input.charCodeAt(e.position+1),!Zr(d))));){if(v=!0,e.position++,hr(e,!0,-1)&&e.lineIndent<=r){f.push(null),h=e.input.charCodeAt(e.position);continue}if(i=e.line,Mi(e,r,wt,!1,!0),f.push(e.result),hr(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>r)&&h!==0)Ze(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return v?(e.tag=a,e.anchor=o,e.kind="sequence",e.result=f,!0):!1}function du(e,r,i){var a,o,f,d,v,h,g=e.tag,b=e.anchor,E={},V=Object.create(null),I=null,W=null,Y=null,_=!1,U=!1,G;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),G=e.input.charCodeAt(e.position);G!==0;){if(!_&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ze(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),f=e.line,(G===63||G===58)&&Zr(a))G===63?(_&&(ea(e,E,V,I,W,null,d,v,h),I=W=Y=null),U=!0,_=!0,o=!0):_?(_=!1,o=!0):Ze(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,G=a;else{if(d=e.line,v=e.lineStart,h=e.position,!Mi(e,i,it,!1,!0))break;if(e.line===f){for(G=e.input.charCodeAt(e.position);xi(G);)G=e.input.charCodeAt(++e.position);if(G===58)G=e.input.charCodeAt(++e.position),Zr(G)||Ze(e,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(ea(e,E,V,I,W,null,d,v,h),I=W=Y=null),U=!0,_=!1,o=!1,I=e.tag,W=e.result;else if(U)Ze(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=b,!0}else if(U)Ze(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=b,!0}if((e.line===f||e.lineIndent>r)&&(_&&(d=e.line,v=e.lineStart,h=e.position),Mi(e,r,Lt,!0,o)&&(_?W=e.result:Y=e.result),_||(ea(e,E,V,I,W,Y,d,v,h),I=W=Y=null),hr(e,!0,-1),G=e.input.charCodeAt(e.position)),(e.line===f||e.lineIndent>r)&&G!==0)Ze(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return _&&ea(e,E,V,I,W,null,d,v,h),U&&(e.tag=g,e.anchor=b,e.kind="mapping",e.result=E),U}function _n(e){var r,i=!1,a=!1,o,f,d;if(d=e.input.charCodeAt(e.position),d!==33)return!1;if(e.tag!==null&&Ze(e,"duplication of a tag property"),d=e.input.charCodeAt(++e.position),d===60?(i=!0,d=e.input.charCodeAt(++e.position)):d===33?(a=!0,o="!!",d=e.input.charCodeAt(++e.position)):o="!",r=e.position,i){do d=e.input.charCodeAt(++e.position);while(d!==0&&d!==62);e.position<e.length?(f=e.input.slice(r,e.position),d=e.input.charCodeAt(++e.position)):Ze(e,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!Zr(d);)d===33&&(a?Ze(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(r-1,e.position+1),Ws.test(o)||Ze(e,"named tag handle cannot contain such characters"),a=!0,r=e.position+1)),d=e.input.charCodeAt(++e.position);f=e.input.slice(r,e.position),ru.test(f)&&Ze(e,"tag suffix cannot contain flow indicator characters")}f&&!Fa.test(f)&&Ze(e,"tag name cannot contain such characters: "+f);try{f=decodeURIComponent(f)}catch{Ze(e,"tag name is malformed: "+f)}return i?e.tag=f:Pe.call(e.tagMap,o)?e.tag=e.tagMap[o]+f:o==="!"?e.tag="!"+f:o==="!!"?e.tag="tag:yaml.org,2002:"+f:Ze(e,'undeclared tag handle "'+o+'"'),!0}function ic(e){var r,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&Ze(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),r=e.position;i!==0&&!Zr(i)&&!qi(i);)i=e.input.charCodeAt(++e.position);return e.position===r&&Ze(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}function ac(e){var r,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Zr(a)&&!qi(a);)a=e.input.charCodeAt(++e.position);return e.position===r&&Ze(e,"name of an alias node must contain at least one character"),i=e.input.slice(r,e.position),Pe.call(e.anchorMap,i)||Ze(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],hr(e,!0,-1),!0}function Mi(e,r,i,a,o){var f,d,v,h=1,g=!1,b=!1,E,V,I,W,Y,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,f=d=v=Lt===i||wt===i,a&&hr(e,!0,-1)&&(g=!0,e.lineIndent>r?h=1:e.lineIndent===r?h=0:e.lineIndent<r&&(h=-1)),h===1)for(;_n(e)||ic(e);)hr(e,!0,-1)?(g=!0,v=f,e.lineIndent>r?h=1:e.lineIndent===r?h=0:e.lineIndent<r&&(h=-1)):v=!1;if(v&&(v=g||o),(h===1||Lt===i)&&(Fe===i||it===i?Y=r:Y=r+1,_=e.position-e.lineStart,h===1?v&&(cu(e,_)||du(e,_,Y))||fu(e,Y)?b=!0:(d&&Go(e,Y)||Us(e,Y)||uu(e,Y)?b=!0:ac(e)?(b=!0,(e.tag!==null||e.anchor!==null)&&Ze(e,"alias node should not have any properties")):zo(e,Y,Fe===i)&&(b=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(b=v&&cu(e,_))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ze(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),E=0,V=e.implicitTypes.length;E<V;E+=1)if(W=e.implicitTypes[E],W.resolve(e.result)){e.result=W.construct(e.result),e.tag=W.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Pe.call(e.typeMap[e.kind||"fallback"],e.tag))W=e.typeMap[e.kind||"fallback"][e.tag];else for(W=null,I=e.typeMap.multi[e.kind||"fallback"],E=0,V=I.length;E<V;E+=1)if(e.tag.slice(0,I[E].tag.length)===I[E].tag){W=I[E];break}W||Ze(e,"unknown tag !<"+e.tag+">"),e.result!==null&&W.kind!==e.kind&&Ze(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+W.kind+'", not "'+e.kind+'"'),W.resolve(e.result,e.tag)?(e.result=W.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ze(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||b}function pu(e){var r=e.position,i,a,o,f=!1,d;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(d=e.input.charCodeAt(e.position))!==0&&(hr(e,!0,-1),d=e.input.charCodeAt(e.position),!(e.lineIndent>0||d!==37));){for(f=!0,d=e.input.charCodeAt(++e.position),i=e.position;d!==0&&!Zr(d);)d=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),o=[],a.length<1&&Ze(e,"directive name must not be less than one character in length");d!==0;){for(;xi(d);)d=e.input.charCodeAt(++e.position);if(d===35){do d=e.input.charCodeAt(++e.position);while(d!==0&&!Un(d));break}if(Un(d))break;for(i=e.position;d!==0&&!Zr(d);)d=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}d!==0&&Hs(e),Pe.call(lu,a)?lu[a](e,a,o):Uo(e,'unknown document directive "'+a+'"')}if(hr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,hr(e,!0,-1)):f&&Ze(e,"directives end mark is expected"),Mi(e,e.lineIndent-1,Lt,!1,!0),hr(e,!0,-1),e.checkLineBreaks&&oi.test(e.input.slice(r,e.position))&&Uo(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&po(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,hr(e,!0,-1));return}if(e.position<e.length-1)Ze(e,"end of the stream or a document separator is expected");else return}function Si(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
66
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Ho(e,r),a=e.indexOf("\0");for(a!==-1&&(i.position=a,Ze(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)pu(i);return i.documents}function _s(e,r,i){r!==null&&typeof r=="object"&&typeof i>"u"&&(i=r,r=null);var a=Si(e,i);if(typeof r!="function")return a;for(var o=0,f=a.length;o<f;o+=1)r(a[o])}function wi(e,r){var i=Si(e,r);if(i.length!==0){if(i.length===1)return i[0];throw new rt("expected a single document in the stream, but found more")}}var $o=_s,zs=wi,ta={loadAll:$o,load:zs},hu=Object.prototype.toString,vu=Object.prototype.hasOwnProperty,Gs=65279,oc=9,Na=10,gu=13,sc=32,lc=33,uc=34,$s=35,mu=37,fc=38,yu=39,Ko=42,ra=44,cc=45,Yo=58,dc=61,ho=62,yr=63,pc=64,Ks=91,Ra=93,hc=96,Ys=123,vc=124,Xo=125,Br={};Br[0]="\\0",Br[7]="\\a",Br[8]="\\b",Br[9]="\\t",Br[10]="\\n",Br[11]="\\v",Br[12]="\\f",Br[13]="\\r",Br[27]="\\e",Br[34]='\\"',Br[92]="\\\\",Br[133]="\\N",Br[160]="\\_",Br[8232]="\\L",Br[8233]="\\P";var gc=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mc=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function bu(e,r){var i,a,o,f,d,v,h;if(r===null)return{};for(i={},a=Object.keys(r),o=0,f=a.length;o<f;o+=1)d=a[o],v=String(r[d]),d.slice(0,2)==="!!"&&(d="tag:yaml.org,2002:"+d.slice(2)),h=e.compiledTypeMap.fallback[d],h&&vu.call(h.styleAliases,v)&&(v=h.styleAliases[v]),i[d]=v;return i}function xu(e){var r,i,a;if(r=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new rt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Be.repeat("0",a-r.length)+r}var yc=1,Ci=2;function Ai(e){this.schema=e.schema||$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Be.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=bu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ci:yc,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function vo(e,r){for(var i=Be.repeat(" ",r),a=0,o=-1,f="",d,v=e.length;a<v;)o=e.indexOf(`
|
|
67
|
+
`,a),o===-1?(d=e.slice(a),a=v):(d=e.slice(a,o+1),a=o+1),d.length&&d!==`
|
|
68
|
+
`&&(f+=i),f+=d;return f}function go(e,r){return`
|
|
69
|
+
`+Be.repeat(" ",e.indent*r)}function Su(e,r){var i,a,o;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(o=e.implicitTypes[i],o.resolve(r))return!0;return!1}function gn(e){return e===sc||e===oc}function zn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Gs||65536<=e&&e<=1114111}function Jo(e){return zn(e)&&e!==Gs&&e!==gu&&e!==Na}function wu(e,r,i){var a=Jo(e),o=a&&!gn(e);return(i?a:a&&e!==ra&&e!==Ks&&e!==Ra&&e!==Ys&&e!==Xo)&&e!==$s&&!(r===Yo&&!o)||Jo(r)&&!gn(r)&&e===$s||r===Yo&&o}function Cu(e){return zn(e)&&e!==Gs&&!gn(e)&&e!==cc&&e!==yr&&e!==Yo&&e!==ra&&e!==Ks&&e!==Ra&&e!==Ys&&e!==Xo&&e!==$s&&e!==fc&&e!==Ko&&e!==lc&&e!==vc&&e!==dc&&e!==ho&&e!==yu&&e!==uc&&e!==mu&&e!==pc&&e!==hc}function bc(e){return!gn(e)&&e!==Yo}function Da(e,r){var i=e.charCodeAt(r),a;return i>=55296&&i<=56319&&r+1<e.length&&(a=e.charCodeAt(r+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}function Qo(e){var r=/^\n* /;return r.test(e)}var na=1,Tn=2,Xs=3,Js=4,Ba=5;function xc(e,r,i,a,o,f,d,v){var h,g=0,b=null,E=!1,V=!1,I=a!==-1,W=-1,Y=Cu(Da(e,0))&&bc(Da(e,e.length-1));if(r||d)for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Da(e,h),!zn(g))return Ba;Y=Y&&wu(g,b,v),b=g}else{for(h=0;h<e.length;g>=65536?h+=2:h++){if(g=Da(e,h),g===Na)E=!0,I&&(V=V||h-W-1>a&&e[W+1]!==" ",W=h);else if(!zn(g))return Ba;Y=Y&&wu(g,b,v),b=g}V=V||I&&h-W-1>a&&e[W+1]!==" "}return!E&&!V?Y&&!d&&!o(e)?na:f===Ci?Ba:Tn:i>9&&Qo(e)?Ba:d?f===Ci?Ba:Tn:V?Js:Xs}function Sc(e,r,i,a,o){e.dump=function(){if(r.length===0)return e.quotingType===Ci?'""':"''";if(!e.noCompatMode&&(gc.indexOf(r)!==-1||mc.test(r)))return e.quotingType===Ci?'"'+r+'"':"'"+r+"'";var f=e.indent*Math.max(1,i),d=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-f),v=a||e.flowLevel>-1&&i>=e.flowLevel;function h(g){return Su(e,g)}switch(xc(r,v,e.indent,d,h,e.quotingType,e.forceQuotes&&!a,o)){case na:return r;case Tn:return"'"+r.replace(/'/g,"''")+"'";case Xs:return"|"+Qs(r,e.indent)+Zs(vo(r,f));case Js:return">"+Qs(r,e.indent)+Zs(vo(mo(r,d),f));case Ba:return'"'+Au(r)+'"';default:throw new rt("impossible error: invalid scalar style")}}()}function Qs(e,r){var i=Qo(e)?String(r):"",a=e[e.length-1]===`
|
|
70
|
+
`,o=a&&(e[e.length-2]===`
|
|
71
|
+
`||e===`
|
|
72
|
+
`),f=o?"+":a?"":"-";return i+f+`
|
|
73
|
+
`}function Zs(e){return e[e.length-1]===`
|
|
74
|
+
`?e.slice(0,-1):e}function mo(e,r){for(var i=/(\n+)([^\n]*)/g,a=function(){var g=e.indexOf(`
|
|
75
|
+
`);return g=g!==-1?g:e.length,i.lastIndex=g,qs(e.slice(0,g),r)}(),o=e[0]===`
|
|
76
|
+
`||e[0]===" ",f,d;d=i.exec(e);){var v=d[1],h=d[2];f=h[0]===" ",a+=v+(!o&&!f&&h!==""?`
|
|
77
|
+
`:"")+qs(h,r),o=f}return a}function qs(e,r){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,o=0,f,d=0,v=0,h="";a=i.exec(e);)v=a.index,v-o>r&&(f=d>o?d:v,h+=`
|
|
78
|
+
`+e.slice(o,f),o=f+1),d=v;return h+=`
|
|
79
|
+
`,e.length-o>r&&d>o?h+=e.slice(o,d)+`
|
|
80
|
+
`+e.slice(d+1):h+=e.slice(o),h.slice(1)}function Au(e){for(var r="",i=0,a,o=0;o<e.length;i>=65536?o+=2:o++)i=Da(e,o),a=Br[i],!a&&zn(i)?(r+=e[o],i>=65536&&(r+=e[o+1])):r+=a||xu(i);return r}function el(e,r,i){var a="",o=e.tag,f,d,v;for(f=0,d=i.length;f<d;f+=1)v=i[f],e.replacer&&(v=e.replacer.call(i,String(f),v)),(li(e,r,v,!1,!1)||typeof v>"u"&&li(e,r,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function yo(e,r,i,a){var o="",f=e.tag,d,v,h;for(d=0,v=i.length;d<v;d+=1)h=i[d],e.replacer&&(h=e.replacer.call(i,String(d),h)),(li(e,r+1,h,!0,!0,!1,!0)||typeof h>"u"&&li(e,r+1,null,!0,!0,!1,!0))&&((!a||o!=="")&&(o+=go(e,r)),e.dump&&Na===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=f,e.dump=o||"[]"}function Ou(e,r,i){var a="",o=e.tag,f=Object.keys(i),d,v,h,g,b;for(d=0,v=f.length;d<v;d+=1)b="",a!==""&&(b+=", "),e.condenseFlow&&(b+='"'),h=f[d],g=i[h],e.replacer&&(g=e.replacer.call(i,h,g)),li(e,r,h,!1,!1)&&(e.dump.length>1024&&(b+="? "),b+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),li(e,r,g,!1,!1)&&(b+=e.dump,a+=b));e.tag=o,e.dump="{"+a+"}"}function Zo(e,r,i,a){var o="",f=e.tag,d=Object.keys(i),v,h,g,b,E,V;if(e.sortKeys===!0)d.sort();else if(typeof e.sortKeys=="function")d.sort(e.sortKeys);else if(e.sortKeys)throw new rt("sortKeys must be a boolean or a function");for(v=0,h=d.length;v<h;v+=1)V="",(!a||o!=="")&&(V+=go(e,r)),g=d[v],b=i[g],e.replacer&&(b=e.replacer.call(i,g,b)),li(e,r+1,g,!0,!0,!0)&&(E=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,E&&(e.dump&&Na===e.dump.charCodeAt(0)?V+="?":V+="? "),V+=e.dump,E&&(V+=go(e,r)),li(e,r+1,b,!0,E)&&(e.dump&&Na===e.dump.charCodeAt(0)?V+=":":V+=": ",V+=e.dump,o+=V));e.tag=f,e.dump=o||"{}"}function kn(e,r,i){var a,o,f,d,v,h;for(o=i?e.explicitTypes:e.implicitTypes,f=0,d=o.length;f<d;f+=1)if(v=o[f],(v.instanceOf||v.predicate)&&(!v.instanceOf||typeof r=="object"&&r instanceof v.instanceOf)&&(!v.predicate||v.predicate(r))){if(i?v.multi&&v.representName?e.tag=v.representName(r):e.tag=v.tag:e.tag="?",v.represent){if(h=e.styleMap[v.tag]||v.defaultStyle,hu.call(v.represent)==="[object Function]")a=v.represent(r,h);else if(vu.call(v.represent,h))a=v.represent[h](r,h);else throw new rt("!<"+v.tag+'> tag resolver accepts not "'+h+'" style');e.dump=a}return!0}return!1}function li(e,r,i,a,o,f,d){e.tag=null,e.dump=i,kn(e,i,!1)||kn(e,i,!0);var v=hu.call(e.dump),h=a,g;a&&(a=e.flowLevel<0||e.flowLevel>r);var b=v==="[object Object]"||v==="[object Array]",E,V;if(b&&(E=e.duplicates.indexOf(i),V=E!==-1),(e.tag!==null&&e.tag!=="?"||V||e.indent!==2&&r>0)&&(o=!1),V&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(b&&V&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),v==="[object Object]")a&&Object.keys(e.dump).length!==0?(Zo(e,r,e.dump,o),V&&(e.dump="&ref_"+E+e.dump)):(Ou(e,r,e.dump),V&&(e.dump="&ref_"+E+" "+e.dump));else if(v==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!d&&r>0?yo(e,r-1,e.dump,o):yo(e,r,e.dump,o),V&&(e.dump="&ref_"+E+e.dump)):(el(e,r,e.dump),V&&(e.dump="&ref_"+E+" "+e.dump));else if(v==="[object String]")e.tag!=="?"&&Sc(e,e.dump,r,f,h);else{if(v==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new rt("unacceptable kind of an object to dump "+v)}e.tag!==null&&e.tag!=="?"&&(g=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?g="!"+g:g.slice(0,18)==="tag:yaml.org,2002:"?g="!!"+g.slice(18):g="!<"+g+">",e.dump=g+" "+e.dump)}return!0}function tl(e,r){var i=[],a=[],o,f;for(bo(e,i,a),o=0,f=a.length;o<f;o+=1)r.duplicates.push(i[a[o]]);r.usedDuplicates=new Array(f)}function bo(e,r,i){var a,o,f;if(e!==null&&typeof e=="object")if(o=r.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(r.push(e),Array.isArray(e))for(o=0,f=e.length;o<f;o+=1)bo(e[o],r,i);else for(a=Object.keys(e),o=0,f=a.length;o<f;o+=1)bo(e[a[o]],r,i)}function Eu(e,r){r=r||{};var i=new Ai(r);i.noRefs||tl(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),li(i,0,a,!0,!0)?i.dump+`
|
|
81
|
+
`:""}var Tu=Eu,rl={dump:Tu};function nl(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var wc=zt,Cc=Cn,ia=Mr,Va=ii,ja=Dr,il=$,al=ta.load,ku=ta.loadAll,ol=rl.dump,aa=rt,oa={binary:ai,float:ni,map:an,null:ft,pairs:It,set:T,timestamp:Jr,bool:we,int:Ft,merge:on,omap:Ge,seq:jn,str:ri},qr=nl("safeLoad","load"),Ni=nl("safeLoadAll","loadAll"),Ri=nl("safeDump","dump"),qo={Type:wc,Schema:Cc,FAILSAFE_SCHEMA:ia,JSON_SCHEMA:Va,CORE_SCHEMA:ja,DEFAULT_SCHEMA:il,load:al,loadAll:ku,dump:ol,YAMLException:aa,types:oa,safeLoad:qr,safeLoadAll:Ni,safeDump:Ri};const Ac=qo,Pu=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:window}(),{FormData:Wa,Blob:xo,File:es}=Pu,ts=e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1,Oc=e=>/^[a-z0-9\-._~]+$/i.test(e);function Di(e){let{escape:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return typeof e=="number"&&(e=e.toString()),typeof e!="string"||!e.length||!r?e:i?JSON.parse(e):[...e].map(a=>{if(Oc(a)||ts(a)&&r==="unsafe")return a;const o=new TextEncoder;return Array.from(o.encode(a)).map(d=>`0${d.toString(16).toUpperCase()}`.slice(-2)).map(d=>`%${d}`).join("")}).join("")}function rs(e){const{value:r}=e;return Array.isArray(r)?sl(e):typeof r=="object"?ll(e):Ha(e)}function sl(e){let{key:r,value:i,style:a,explode:o,escape:f}=e;const d=v=>Di(v,{escape:f});if(a==="simple")return i.map(v=>d(v)).join(",");if(a==="label")return`.${i.map(v=>d(v)).join(".")}`;if(a==="matrix")return i.map(v=>d(v)).reduce((v,h)=>!v||o?`${v||""};${r}=${h}`:`${v},${h}`,"");if(a==="form"){const v=o?`&${r}=`:",";return i.map(h=>d(h)).join(v)}if(a==="spaceDelimited"){const v=o?`${r}=`:"";return i.map(h=>d(h)).join(` ${v}`)}if(a==="pipeDelimited"){const v=o?`${r}=`:"";return i.map(h=>d(h)).join(`|${v}`)}}function ll(e){let{key:r,value:i,style:a,explode:o,escape:f}=e;const d=h=>Di(h,{escape:f}),v=Object.keys(i);if(a==="simple")return v.reduce((h,g)=>{const b=d(i[g]),E=o?"=":",";return`${h?`${h},`:""}${g}${E}${b}`},"");if(a==="label")return v.reduce((h,g)=>{const b=d(i[g]),E=o?"=":".";return`${h?`${h}.`:"."}${g}${E}${b}`},"");if(a==="matrix"&&o)return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h};`:";"}${g}=${b}`},"");if(a==="matrix")return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h},`:`;${r}=`}${g},${b}`},"");if(a==="form")return v.reduce((h,g)=>{const b=d(i[g]);return`${h?`${h}${o?"&":","}`:""}${g}${o?"=":","}${b}`},"")}function Ha(e){let{key:r,value:i,style:a,escape:o}=e;const f=d=>Di(d,{escape:o});if(a==="simple")return f(i);if(a==="label")return`.${f(i)}`;if(a==="matrix")return`;${r}=${f(i)}`;if(a==="form")return f(i);if(a==="deepObject")return f(i,{},!0)}const Fu=(e,r)=>{r.body=e},Ua={serializeRes:fl,mergeInQueryOrForm:Bi};async function Ec(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof e=="object"&&(r=e,e=r.url),r.headers=r.headers||{},Ua.mergeInQueryOrForm(r),r.headers&&Object.keys(r.headers).forEach(o=>{const f=r.headers[o];typeof f=="string"&&(r.headers[o]=f.replace(/\n+/g," "))}),r.requestInterceptor&&(r=await r.requestInterceptor(r)||r);const i=r.headers["content-type"]||r.headers["Content-Type"];/multipart\/form-data/i.test(i)&&r.body instanceof Wa&&(delete r.headers["content-type"],delete r.headers["Content-Type"]);let a;try{a=await(r.userFetch||fetch)(r.url,r),a=await Ua.serializeRes(a,e,r),r.responseInterceptor&&(a=await r.responseInterceptor(a)||a)}catch(o){if(!a)throw o;const f=new Error(a.statusText||`response status is ${a.status}`);throw f.status=a.status,f.statusCode=a.status,f.responseError=o,f}if(!a.ok){const o=new Error(a.statusText||`response status is ${a.status}`);throw o.status=a.status,o.statusCode=a.status,o.response=a,o}return a}const Tc=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function kc(e,r){return r&&(r.indexOf("application/json")===0||r.indexOf("+json")>0)?JSON.parse(e):Ac.load(e)}function fl(e,r){let{loadSpec:i=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a={ok:e.ok,url:e.url||r,status:e.status,statusText:e.statusText,headers:_a(e.headers)},o=a.headers["content-type"],f=i||Tc(o);return(f?e.text:e.blob||e.buffer).call(e).then(v=>{if(a.text=v,a.data=v,f)try{const h=kc(v,o);a.body=h,a.obj=h}catch(h){a.parseError=h}return a})}function cl(e){return e.includes(", ")?e.split(", "):e}function _a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return typeof e.entries!="function"?{}:Array.from(e.entries()).reduce((r,i)=>{let[a,o]=i;return r[a]=cl(o),r},{})}function sa(e,r){return!r&&typeof navigator<"u"&&(r=navigator),r&&r.product==="ReactNative"?!!(e&&typeof e=="object"&&typeof e.uri=="string"):typeof es<"u"&&e instanceof es||typeof xo<"u"&&e instanceof xo||ArrayBuffer.isView(e)?!0:e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function Iu(e,r){return Array.isArray(e)&&e.some(i=>sa(i,r))}const ns={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Lu={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function za(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{collectionFormat:a,allowEmptyValue:o,serializationOption:f,encoding:d}=r,v=typeof r=="object"&&!Array.isArray(r)?r.value:r,h=i?b=>b.toString():b=>encodeURIComponent(b),g=h(e);if(typeof v>"u"&&o)return[[g,""]];if(sa(v)||Iu(v))return[[g,v]];if(f)return dl(e,v,i,f);if(d){if([typeof d.style,typeof d.explode,typeof d.allowReserved].some(b=>b!=="undefined")){const{style:b,explode:E,allowReserved:V}=d;return dl(e,v,i,{style:b,explode:E,allowReserved:V})}if(d.contentType){if(d.contentType==="application/json"){const b=typeof v=="string"?v:JSON.stringify(v);return[[g,h(b)]]}return[[g,h(v.toString())]]}return typeof v!="object"?[[g,h(v)]]:Array.isArray(v)&&v.every(b=>typeof b!="object")?[[g,v.map(h).join(",")]]:[[g,h(JSON.stringify(v))]]}return typeof v!="object"?[[g,h(v)]]:Array.isArray(v)?a==="multi"?[[g,v.map(h)]]:[[g,v.map(h).join(Lu[a||"csv"])]]:[[g,""]]}function dl(e,r,i,a){const o=a.style||"form",f=typeof a.explode>"u"?o==="form":a.explode,d=i?!1:a&&a.allowReserved?"unsafe":"reserved",v=g=>Di(g,{escape:d}),h=i?g=>g:g=>Di(g,{escape:d});return typeof r!="object"?[[h(e),v(r)]]:Array.isArray(r)?f?[[h(e),r.map(v)]]:[[h(e),r.map(v).join(ns[o])]]:o==="deepObject"?Object.keys(r).map(g=>[h(`${e}[${g}]`),v(r[g])]):f?Object.keys(r).map(g=>[h(g),v(r[g])]):[[h(e),Object.keys(r).map(g=>[`${h(g)},${v(r[g])}`]).join(",")]]}function la(e){return Object.entries(e).reduce((r,i)=>{let[a,o]=i;for(const[f,d]of za(a,o,!0))if(Array.isArray(d))for(const v of d)if(ArrayBuffer.isView(v)){const h=new xo([v]);r.append(f,h)}else r.append(f,v);else if(ArrayBuffer.isView(d)){const v=new xo([d]);r.append(f,v)}else r.append(f,d);return r},new Wa)}function Ga(e){const r=Object.keys(e).reduce((i,a)=>{for(const[o,f]of za(a,e[a]))i[o]=f;return i},{});return ie().stringify(r,{encode:!1,indices:!1})||""}function Bi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{url:r="",query:i,form:a}=e,o=function(){for(var f=arguments.length,d=new Array(f),v=0;v<f;v++)d[v]=arguments[v];const h=d.filter(g=>g).join("&");return h?`?${h}`:""};if(a){const f=Object.keys(a).some(v=>{const{value:h}=a[v];return sa(h)||Iu(h)}),d=e.headers["content-type"]||e.headers["Content-Type"];if(f||/multipart\/form-data/i.test(d)){const v=la(e.form);Fu(v,e)}else e.body=Ga(a);delete e.form}if(i){const[f,d]=r.split("?");let v="";if(d){const g=ie().parse(d);Object.keys(i).forEach(E=>delete g[E]),v=ie().stringify(g,{encode:!0})}const h=o(v,Ga(i));e.url=f+h,delete e.query}return e}function is(e,r,i){return i=i||(a=>a),r=r||(a=>a),a=>(typeof a=="string"&&(a={url:a}),Ua.mergeInQueryOrForm(a),a=r(a),i(e(a)))}function $a(e,r){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var a=arguments.length,o=new Array(a),f=0;f<a;f++)o[f]=arguments[f];[this.message]=o,r&&r.apply(this,o)}return i.prototype=new Error,i.prototype.name=e,i.prototype.constructor=i,i}const Mu={body:Nu,header:Pc,query:fa,path:ua,formData:Ru};function Nu(e){let{req:r,value:i}=e;r.body=i}function Ru(e){let{req:r,value:i,parameter:a}=e;(i||a.allowEmptyValue)&&(r.form=r.form||{},r.form[a.name]={value:i,allowEmptyValue:a.allowEmptyValue,collectionFormat:a.collectionFormat})}function Pc(e){let{req:r,parameter:i,value:a}=e;r.headers=r.headers||{},typeof a<"u"&&(r.headers[i.name]=a)}function ua(e){let{req:r,value:i,parameter:a}=e;r.url=r.url.split(`{${a.name}}`).join(encodeURIComponent(i))}function fa(e){let{req:r,value:i,parameter:a}=e;if(r.query=r.query||{},i===!1&&a.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(a.type)>-1&&(i="0"),i)r.query[a.name]={collectionFormat:a.collectionFormat,value:i};else if(a.allowEmptyValue&&i!==void 0){const o=a.name;r.query[o]=r.query[o]||{},r.query[o].allowEmptyValue=!0}}function as(e,r){return r.includes("application/json")?typeof e=="string"?e:JSON.stringify(e):e.toString()}function Fc(e){let{req:r,value:i,parameter:a}=e;const{name:o,style:f,explode:d,content:v}=a;if(v){const g=Object.keys(v)[0];r.url=r.url.split(`{${o}}`).join(Di(as(i,g),{escape:!0}));return}const h=rs({key:a.name,value:i,style:f||"simple",explode:d||!1,escape:!0});r.url=r.url.split(`{${o}}`).join(h)}function Ic(e){let{req:r,value:i,parameter:a}=e;if(r.query=r.query||{},a.content){const o=Object.keys(a.content)[0],f=as(i,o);if(f)r.query[a.name]=f;else if(a.allowEmptyValue&&i!==void 0){const d=a.name;r.query[d]=r.query[d]||{},r.query[d].allowEmptyValue=!0}return}if(i===!1&&(i="false"),i===0&&(i="0"),i){const{style:o,explode:f,allowReserved:d}=a;r.query[a.name]={value:i,serializationOption:{style:o,explode:f,allowReserved:d}}}else if(a.allowEmptyValue&&i!==void 0){const o=a.name;r.query[o]=r.query[o]||{},r.query[o].allowEmptyValue=!0}}const Lc=["accept","authorization","content-type"];function Mc(e){let{req:r,parameter:i,value:a}=e;if(r.headers=r.headers||{},!(Lc.indexOf(i.name.toLowerCase())>-1)){if(i.content){const o=Object.keys(i.content)[0];r.headers[i.name]=as(a,o);return}typeof a<"u"&&(r.headers[i.name]=rs({key:i.name,value:a,style:i.style||"simple",explode:typeof i.explode>"u"?!1:i.explode,escape:!1}))}}function Nc(e){let{req:r,parameter:i,value:a}=e;r.headers=r.headers||{};const o=typeof a;if(i.content){const f=Object.keys(i.content)[0];r.headers.Cookie=`${i.name}=${as(a,f)}`;return}if(o!=="undefined"){const f=o==="object"&&!Array.isArray(a)&&i.explode?"":`${i.name}=`;r.headers.Cookie=f+rs({key:i.name,value:a,escape:!1,style:i.style||"form",explode:typeof i.explode>"u"?!1:i.explode})}}const ln=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:window)(),{btoa:br}=ln,Vr=br;function xr(e,r){const{operation:i,requestBody:a,securities:o,spec:f,attachContentTypeForEmptyPayload:d}=e;let{requestContentType:v}=e;r=So({request:r,securities:o,operation:i,spec:f});const h=i.requestBody||{},g=Object.keys(h.content||{}),b=v&&g.indexOf(v)>-1;if(a||d){if(v&&b)r.headers["Content-Type"]=v;else if(!v){const E=g[0];E&&(r.headers["Content-Type"]=E,v=E)}}else v&&b&&(r.headers["Content-Type"]=v);if(!e.responseContentType&&i.responses){const E=Object.entries(i.responses).filter(V=>{let[I,W]=V;const Y=parseInt(I,10);return Y>=200&&Y<300&&xe(W.content)}).reduce((V,I)=>{let[,W]=I;return V.concat(Object.keys(W.content))},[]);E.length>0&&(r.headers.accept=E.join(", "))}if(a)if(v){if(g.indexOf(v)>-1)if(v==="application/x-www-form-urlencoded"||v==="multipart/form-data")if(typeof a=="object"){const E=(h.content[v]||{}).encoding||{};r.form={},Object.keys(a).forEach(V=>{r.form[V]={value:a[V],encoding:E[V]||{}}})}else r.form=a;else r.body=a}else r.body=a;return r}function So(e){let{request:r,securities:i={},operation:a={},spec:o}=e;const f=M({},r),{authorized:d={}}=i,v=a.security||o.security||[],h=d&&!!Object.keys(d).length,g=le()(o,["components","securitySchemes"])||{};return f.headers=f.headers||{},f.query=f.query||{},!Object.keys(i).length||!h||!v||Array.isArray(a.security)&&!a.security.length?r:(v.forEach(b=>{Object.keys(b).forEach(E=>{const V=d[E],I=g[E];if(!V)return;const W=V.value||V,{type:Y}=I;if(V){if(Y==="apiKey")I.in==="query"&&(f.query[I.name]=W),I.in==="header"&&(f.headers[I.name]=W),I.in==="cookie"&&(f.cookies[I.name]=W);else if(Y==="http"){if(/^basic$/i.test(I.scheme)){const _=W.username||"",U=W.password||"",G=Vr(`${_}:${U}`);f.headers.Authorization=`Basic ${G}`}/^bearer$/i.test(I.scheme)&&(f.headers.Authorization=`Bearer ${W}`)}else if(Y==="oauth2"||Y==="openIdConnect"){const _=V.token||{},U=I["x-tokenName"]||"access_token",G=_[U];let ce=_.token_type;(!ce||ce.toLowerCase()==="bearer")&&(ce="Bearer"),f.headers.Authorization=`${ce} ${G}`}}})}),f)}function Rc(e,r){const{spec:i,operation:a,securities:o,requestContentType:f,responseContentType:d,attachContentTypeForEmptyPayload:v}=e;if(r=os({request:r,securities:o,operation:a,spec:i}),r.body||r.form||v)f?r.headers["Content-Type"]=f:Array.isArray(a.consumes)?[r.headers["Content-Type"]]=a.consumes:Array.isArray(i.consumes)?[r.headers["Content-Type"]]=i.consumes:a.parameters&&a.parameters.filter(h=>h.type==="file").length?r.headers["Content-Type"]="multipart/form-data":a.parameters&&a.parameters.filter(h=>h.in==="formData").length&&(r.headers["Content-Type"]="application/x-www-form-urlencoded");else if(f){const h=a.parameters&&a.parameters.filter(b=>b.in==="body").length>0,g=a.parameters&&a.parameters.filter(b=>b.in==="formData").length>0;(h||g)&&(r.headers["Content-Type"]=f)}return!d&&Array.isArray(a.produces)&&a.produces.length>0&&(r.headers.accept=a.produces.join(", ")),r}function os(e){let{request:r,securities:i={},operation:a={},spec:o}=e;const f=M({},r),{authorized:d={},specSecurity:v=[]}=i,h=a.security||v,g=d&&!!Object.keys(d).length,b=o.securityDefinitions;return f.headers=f.headers||{},f.query=f.query||{},!Object.keys(i).length||!g||!h||Array.isArray(a.security)&&!a.security.length?r:(h.forEach(E=>{Object.keys(E).forEach(V=>{const I=d[V];if(!I)return;const{token:W}=I,Y=I.value||I,_=b[V],{type:U}=_,G=_["x-tokenName"]||"access_token",ce=W&&W[G];let Ce=W&&W.token_type;if(I)if(U==="apiKey"){const ge=_.in==="query"?"query":"headers";f[ge]=f[ge]||{},f[ge][_.name]=Y}else if(U==="basic")if(Y.header)f.headers.authorization=Y.header;else{const ge=Y.username||"",ke=Y.password||"";Y.base64=Vr(`${ge}:${ke}`),f.headers.authorization=`Basic ${Y.base64}`}else U==="oauth2"&&ce&&(Ce=!Ce||Ce.toLowerCase()==="bearer"?"Bearer":Ce,f.headers.authorization=`${Ce} ${ce}`)})}),f)}function Du(e,r){return`${r.toLowerCase()}-${e}`}function Dc(e,r,i){if(!e||typeof e!="object"||!e.paths||typeof e.paths!="object")return null;const{paths:a}=e;for(const o in a)for(const f in a[o]){if(f.toUpperCase()==="PARAMETERS")continue;const d=a[o][f];if(!d||typeof d!="object")continue;const v={spec:e,pathName:o,method:f.toUpperCase(),operation:d},h=r(v);if(i&&h)return v}}function Bc(e,r){return Dc(e,r,!0)||null}const pl=e=>e.replace(/\W/gi,"_");function hl(e,r){let{v2OperationIdCompatibilityMode:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(i){let a=`${r.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return a=a||`${e.substring(1)}_${r}`,a.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${r.toLowerCase()}${pl(e)}`}function Vc(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",{v2OperationIdCompatibilityMode:a}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return!e||typeof e!="object"?null:(e.operationId||"").replace(/\s/g,"").length?pl(e.operationId):hl(r,i,{v2OperationIdCompatibilityMode:a})}function vl(e,r){return!e||!e.paths?null:Bc(e,i=>{let{pathName:a,method:o,operation:f}=i;if(!f||typeof f!="object")return!1;const d=f.operationId,v=Vc(f,a,o),h=Du(a,o);return[v,h,d].some(g=>g&&g===r)})}const Vu=e=>{try{const{swagger:r}=e;return r==="2.0"}catch{return!1}},ju=e=>{try{const{openapi:r}=e;return typeof r=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(r)}catch{return!1}},Wu=e=>{try{const{openapi:r}=e;return typeof r=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(r)}catch{return!1}},ss=e=>ju(e)||Wu(e),Hu=["http","fetch","spec","operationId","pathName","method","parameters","securities"],Ka=e=>Array.isArray(e)?e:[],jc=$a("OperationNotFoundError",function(r,i,a){this.originalError=a,Object.assign(this,i||{})}),ls=(e,r)=>r.filter(i=>i.name===e),Oi=e=>{const r={};e.forEach(a=>{r[a.in]||(r[a.in]={}),r[a.in][a.name]=a});const i=[];return Object.keys(r).forEach(a=>{Object.keys(r[a]).forEach(o=>{i.push(r[a][o])})}),i},Uu={buildRequest:_u};function Wc(e){let{http:r,fetch:i,spec:a,operationId:o,pathName:f,method:d,parameters:v,securities:h}=e,g=ae(e,Hu);const b=r||i||Ec;f&&d&&!o&&(o=Du(f,d));const E=Uu.buildRequest(M({spec:a,operationId:o,parameters:v,securities:h,http:b},g));return E.body&&(xe(E.body)||Array.isArray(E.body))&&(E.body=JSON.stringify(E.body)),b(E)}function _u(e){const{spec:r,operationId:i,responseContentType:a,scheme:o,requestInterceptor:f,responseInterceptor:d,contextUrl:v,userFetch:h,server:g,serverVariables:b,http:E,signal:V}=e;let{parameters:I,parameterBuilders:W}=e;const Y=ss(r);W||(Y?W=m:W=Mu);let U={url:"",credentials:E&&E.withCredentials?"include":"same-origin",headers:{},cookies:{}};V&&(U.signal=V),f&&(U.requestInterceptor=f),d&&(U.responseInterceptor=d),h&&(U.userFetch=h);const G=vl(r,i);if(!G)throw new jc(`Operation ${i} not found`);const{operation:ce={},method:Ce,pathName:ge}=G;if(U.url+=Dt({spec:r,scheme:o,contextUrl:v,server:g,serverVariables:b,pathName:ge,method:Ce}),!i)return delete U.cookies,U;U.url+=ge,U.method=`${Ce}`.toUpperCase(),I=I||{};const ke=r.paths[ge]||{};a&&(U.headers.accept=a);const be=Oi([].concat(Ka(ce.parameters)).concat(Ka(ke.parameters)));be.forEach(ue=>{const Oe=W[ue.in];let Te;if(ue.in==="body"&&ue.schema&&ue.schema.properties&&(Te=I),Te=ue&&ue.name&&I[ue.name],typeof Te>"u"?Te=ue&&ue.name&&I[`${ue.in}.${ue.name}`]:ls(ue.name,be).length>1&&console.warn(`Parameter '${ue.name}' is ambiguous because the defined spec has more than one parameter with the name: '${ue.name}' and the passed-in parameter values did not define an 'in' value.`),Te!==null){if(typeof ue.default<"u"&&typeof Te>"u"&&(Te=ue.default),typeof Te>"u"&&ue.required&&!ue.allowEmptyValue)throw new Error(`Required parameter ${ue.name} is not provided`);if(Y&&ue.schema&&ue.schema.type==="object"&&typeof Te=="string")try{Te=JSON.parse(Te)}catch{throw new Error("Could not parse object parameter value string as JSON")}Oe&&Oe({req:U,parameter:ue,value:Te,operation:ce,spec:r})}});const me=M(M({},e),{},{operation:ce});if(Y?U=xr(me,U):U=Rc(me,U),U.cookies&&Object.keys(U.cookies).length){const ue=Object.keys(U.cookies).reduce((Oe,Te)=>{const Me=U.cookies[Te],Xe=Oe?"&":"",yt=q.serialize(Te,Me);return Oe+Xe+yt},"");U.headers.Cookie=ue}return U.cookies&&delete U.cookies,Bi(U),U}const en=e=>e?e.replace(/\W/g,""):null;function Dt(e){return ss(e.spec)?Gn(e):zu(e)}function Gn(e){let{spec:r,pathName:i,method:a,server:o,contextUrl:f,serverVariables:d={}}=e;const v=le()(r,["paths",i,(a||"").toLowerCase(),"servers"])||le()(r,["paths",i,"servers"])||le()(r,["servers"]);let h="",g=null;if(o&&v&&v.length){const b=v.map(E=>E.url);b.indexOf(o)>-1&&(h=o,g=v[b.indexOf(o)])}return!h&&v&&v.length&&(h=v[0].url,[g]=v),h.indexOf("{")>-1&&ji(h).forEach(E=>{if(g.variables&&g.variables[E]){const V=g.variables[E],I=d[E]||V.default,W=new RegExp(`{${E}}`,"g");h=h.replace(W,I)}}),Vi(h,f)}function Vi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e&&r?z.parse(z.resolve(r,e)):z.parse(e),a=z.parse(r),o=en(i.protocol)||en(a.protocol)||"",f=i.host||a.host,d=i.pathname||"";let v;return o&&f?v=`${o}://${f+d}`:v=d,v[v.length-1]==="/"?v.slice(0,-1):v}function ji(e){const r=[],i=/{([^}]+)}/g;let a;for(;a=i.exec(e);)r.push(a[1]);return r}function zu(e){let{spec:r,scheme:i,contextUrl:a=""}=e;const o=z.parse(a),f=Array.isArray(r.schemes)?r.schemes[0]:null,d=i||f||en(o.protocol)||"http",v=r.host||o.host||"",h=r.basePath||"";let g;return d&&v?g=`${d}://${v+h}`:g=h,g[g.length-1]==="/"?g.slice(0,-1):g}var A=c(29901),Jt=c(20202),ui=c(21999),gl=c(37837),wo=c(96244),Gu=c(2526),ml=Object.defineProperty,Wi=Object.defineProperties,$u=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertySymbols,Hc=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable,fs=(e,r,i)=>r in e?ml(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Ku=(e,r)=>{for(var i in r||(r={}))Hc.call(r,i)&&fs(e,i,r[i]);if(yl)for(var i of yl(r))us.call(r,i)&&fs(e,i,r[i]);return e},Uc=(e,r)=>Wi(e,$u(r)),Yu=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function _c(e,r){return Yu(this,null,function*(){var i,a,o,f;const d=JSON.parse(JSON.stringify(r)),v=d.openapi?{openapi:d.openapi}:d.swagger?{swagger:d.swagger}:{},h=Uc(Ku({},v),{components:d.components,paths:{[e.path]:{[e.httpVerb]:(a=(i=d.paths)==null?void 0:i[e.path])==null?void 0:a[e.httpVerb],parameters:(f=(o=d.paths)==null?void 0:o[e.path])==null?void 0:f.parameters}}}),g=new wo.Config({}),b=(0,Gu.I)(h),E={config:g,doc:b,dereference:!0};return yield(0,gl.bundle)(E),d})}var zc=c(98910),ca=c(84862),$n=c(53134),Xu=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const Ju=Object.values($n.FileUploadFormats),Qu=["application/octet-stream","application/pdf","application/gzip","application/zip"],da=["image/","audio/","video/"];function cs(e){if(da.some(r=>e.startsWith(r)))return e}function pa(e){return Qu.includes(e)?!0:da.some(r=>e.startsWith(r))}function Zu(e){const r=e.type==="array"?e.items:e;if(!r||!r.type||r?.type==="any")return!0;const i=r.contentMediaType||"",a=r.format||r.contentEncoding||(pa(i)?"binary":"");return r.type===$n.DefinitionTypes.STRING&&Ju.includes(a)}function ds(e,r){if(!e||!e.type||e.type==="any")return pa(r);const i=e.format||e.contentEncoding||"";return e.type===$n.DefinitionTypes.STRING&&Ju.includes(i)}function bl(e){return new Promise((r,i)=>{const a=new FileReader;a.onload=()=>{const f=a.result.replace(/data:.*\/.*;base64,/g,"");r(f)},a.onerror=()=>i(a.error),a.readAsDataURL(e)})}function qu({format:e,contentEncoding:r,contentMediaType:i}){return[e,r,i].includes($n.FileUploadFormats.BASE64)}function ef(e,r){return Xu(this,null,function*(){const i=Object.values(e);let a=i.length===1?i[0]:i;return r.type===$n.DefinitionTypes.STRING&&qu(r)?a=yield bl(i[0]):r.type===$n.DefinitionTypes.ARRAY&&r.items&&(qu(r.items)?a=yield Promise.all(i.map(f=>Xu(this,null,function*(){return yield bl(f)}))):a=i),a})}var Sr=c(84622),xt=c(38612),At=c(38779),dt=c(68176),mn=c(71608),Ya=c(64393);function ps({response:e}){return A.createElement(A.Fragment,null,A.createElement(mn.EE,null," Body: "),tf(e))}function tf(e){return e.body?A.createElement(Jt.JsonViewer,{data:e.body,jsonSampleExpandLevel:1}):e.fileInfo?A.createElement(Ya.s,{fileInfo:e.fileInfo}):e.data!==null?e.data?A.createElement(Jt.CodeBlock,{lang:(0,dt.M)(e.headers["Content-Type"]||"text/plain"),source:e.data,header:{controls:{copy:{}}}}):A.createElement(Jt.CodeBlockContainer,{withControls:!0},A.createElement("i",null,"(no content)")):null}var Hi=c(79216);function rf({headers:e}){const r=(0,ui.useRecoilValue)(Hi.lk),[i,a]=(0,A.useState)(!0),{maxResponseHeadersToShowInTryIt:o}=r,f=Object.keys(e),d=!!o&&f.length>o,v=d&&i?[...f].splice(0,o):[...f],h=()=>{a(!i)};return A.createElement(A.Fragment,null,A.createElement(mn.EE,null," Headers: "),A.createElement(Jt.CodeBlockContainer,{withControls:!0},v.map(g=>A.createElement("div",{key:g},A.createElement(ha,null,g,":"),A.createElement("code",null,e[g]))),d&&A.createElement(xl,{onClick:h},i?"Show more...":"Hide headers")))}const ha=At.ZP.strong`
|
|
82
82
|
text-transform: capitalize;
|
|
83
83
|
display: inline-block;
|
|
84
84
|
padding-right: 5px;
|
|
85
|
-
`,
|
|
85
|
+
`,xl=At.ZP.div`
|
|
86
86
|
cursor: pointer;
|
|
87
87
|
margin-top: 5px;
|
|
88
88
|
font-size: 14px;
|
|
89
|
-
`;
|
|
89
|
+
`;ha.displayName="HeaderName",xl.displayName="StyledShowMoreLabel";const hs=At.ZP.div`
|
|
90
90
|
margin-bottom: 10px;
|
|
91
|
-
`,
|
|
91
|
+
`,vs=At.ZP.div`
|
|
92
92
|
display: inline-block;
|
|
93
93
|
margin-right: 20px;
|
|
94
94
|
padding: 2px 0;
|
|
95
95
|
text-align: center;
|
|
96
|
-
color: var(--text-
|
|
97
|
-
`,
|
|
98
|
-
color: ${({code:
|
|
99
|
-
`,
|
|
96
|
+
color: var(--text-color-inverse);
|
|
97
|
+
`,Co=(0,At.ZP)(vs)`
|
|
98
|
+
color: ${({code:e})=>e>=200&&e<300?"var(--response-success-text-color)":e>=300&&e<400?"var(--response-redirect-text-color)":e>400?"var(--response-error-text-color)":"var(--response-info-text-color)"};
|
|
99
|
+
`,nf=At.ZP.header`
|
|
100
100
|
font-weight: bold;
|
|
101
101
|
margin-bottom: 10px;
|
|
102
|
-
`,
|
|
102
|
+
`,Xa=At.ZP.code`
|
|
103
103
|
border-left: 3px solid #ff4040;
|
|
104
104
|
padding-left: 5px;
|
|
105
|
-
`,
|
|
105
|
+
`,af=({error:e,response:r,time:i})=>{const a=r||e&&e.response,o=a&&a.data&&a.data.length||0;let f;return o>1e6?f=(o/1e6).toFixed(2)+" MB":o>1e3?f=(o/1e3).toFixed(2)+" KB":f=o+" B",e&&!e.response||!a?A.createElement(A.Fragment,null,A.createElement(nf,null," Could not get any response "),A.createElement(Xa,null,e&&e.message||"Unknown error"),A.createElement("br",null),A.createElement(nf,null," Why this might have happened:"),A.createElement("div",null," - CORS is misconfigured on the server"),A.createElement("div",null," - The server couldn't send a response"),A.createElement("div",null," - No internet access"),A.createElement("div",null," - Documentation issue - contact API owner"),A.createElement("div",null," - Misconfigured security definition")):a?A.createElement(A.Fragment,null,A.createElement(hs,null,A.createElement(Co,{code:a.status},A.createElement("span",null," Status: "),a.status," ",a.statusText),A.createElement(vs,null,A.createElement("span",null," Time: "),i,"ms"),A.createElement(vs,null,A.createElement("span",null," Size: "),f)),A.createElement("div",null,A.createElement(rf,{headers:a.headers}),A.createElement(ps,{response:a}))):A.createElement(A.Fragment,null,"Something went wrong")},of=At.ZP.div`
|
|
106
106
|
display: flex;
|
|
107
107
|
font-size: 12px;
|
|
108
108
|
button {
|
|
109
109
|
margin: 0;
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`,Sl=At.ZP.button`
|
|
112
112
|
outline: none;
|
|
113
113
|
border: none;
|
|
114
114
|
background-color: var(--panel-try-it-tabs-background-color);
|
|
@@ -117,99 +117,159 @@ b`.split(/\n/).length!=3?function(e){for(var r=0,a=[],o=e.length;r<=o;){var l=e.
|
|
|
117
117
|
color: var(--panel-try-it-tabs-text-color);
|
|
118
118
|
min-width: 80px;
|
|
119
119
|
min-height: 30px;
|
|
120
|
-
border-radius: var(--border-radius
|
|
120
|
+
border-radius: var(--border-radius);
|
|
121
121
|
font-size: var(--panel-try-it-tabs-font-size);
|
|
122
122
|
font-family: var(--panel-try-it-tabs-font-family);
|
|
123
123
|
font-weight: var(--panel-try-it-tabs-font-weight);
|
|
124
124
|
padding: 0 10px;
|
|
125
|
+
border-bottom: 4px solid var(--panel-try-it-tabs-border-color);
|
|
126
|
+
|
|
127
|
+
&:first-child {
|
|
128
|
+
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:last-child {
|
|
132
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
133
|
+
}
|
|
125
134
|
|
|
126
135
|
&:hover:not(:disabled) {
|
|
136
|
+
border-color: var(--panel-try-it-tabs-hover-border-color);
|
|
127
137
|
background-color: var(--panel-try-it-tabs-hover-background-color);
|
|
128
|
-
color: var(--panel-try-it-tabs-hover-text-color);
|
|
129
138
|
}
|
|
130
139
|
|
|
131
|
-
${({active:
|
|
140
|
+
${({active:e})=>e&&(0,At.iv)`
|
|
141
|
+
border-color: var(--panel-try-it-tabs-active-border-color);
|
|
132
142
|
background-color: var(--panel-try-it-tabs-active-background-color);
|
|
133
|
-
color: var(--panel-try-it-tabs-active-text-color);
|
|
134
143
|
`||""}
|
|
135
144
|
|
|
136
|
-
${({disabled:
|
|
145
|
+
${({disabled:e})=>e&&(0,At.iv)`
|
|
137
146
|
cursor: default;
|
|
147
|
+
border-color: var(--panel-try-it-tabs-disables-border-color)
|
|
138
148
|
background-color: var(--panel-try-it-tabs-disabled-background-color);
|
|
139
149
|
color: var(--panel-try-it-tabs-disabled-text-color);
|
|
140
150
|
`||""}
|
|
141
|
-
`;function
|
|
151
|
+
`;function Ao({onChange:e,active:r,hasResponse:i}){return A.createElement(of,null,A.createElement(Sl,{onClick:()=>e(0),active:r===0},i?"Edit Request":"Request"),A.createElement(Sl,{onClick:()=>i&&e(1),active:r===1,disabled:!i}," ","Response"," "))}var va=c(82155),Ja=c(79198);function Oo(e,r,i){const a=r.path||{},o=r.query||{},f=Object.keys(o);let d=(0,xt.v5)(e,a);const v=h=>i.find(g=>g.name===h&&g.in==="query");return f.length&&(d+="?"+f.map(h=>{if(!o[h])return"";const g=v(h);return g?(0,dt.d$)(g,o[h]):`${h}=${encodeURIComponent(o[h])}`}).filter(Boolean).join("&")),d}const sf=({loading:e,operation:r,hasResponse:i,execute:a,params:o={}})=>A.createElement(ca.k1,null,A.createElement(va.__,null,A.createElement(Ja.FH,{type:r.httpVerb},r.httpVerb),A.createElement(va.y$,{wrap:"true"},Oo(r.path,o,r.parameters))),A.createElement(Gc,{"data-cy":"send-button",color:"primary",blinking:e,onClick:()=>!e&&a()},e?"Sending...":i?"Resend":"Send")),Gc=(0,At.ZP)(va.ev)`
|
|
142
152
|
width: var(--panel-try-it-action-button-width);
|
|
143
|
-
`,
|
|
153
|
+
`,lf=(0,A.memo)(sf);function fi(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ga(e,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ma(e,r,i){return r&&ga(e.prototype,r),i&&ga(e,i),e}function $c(e,r,i){return r in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function ir(){return ir=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},ir.apply(this,arguments)}function uf(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),i.push.apply(i,a)}return i}function ot(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?uf(Object(i),!0).forEach(function(a){$c(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):uf(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function Kc(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&gs(e,r)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},Pr(e)}function gs(e,r){return gs=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},gs(e,r)}function Yc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Xc(e,r){if(e==null)return{};var i={},a=Object.keys(e),o,f;for(f=0;f<a.length;f++)o=a[f],!(r.indexOf(o)>=0)&&(i[o]=e[o]);return i}function sr(e,r){if(e==null)return{};var i=Xc(e,r),a,o;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(o=0;o<f.length;o++)a=f[o],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}function ff(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cf(e,r){return r&&(typeof r=="object"||typeof r=="function")?r:ff(e)}function df(e){var r=Yc();return function(){var a=Pr(e),o;if(r){var f=Pr(this).constructor;o=Reflect.construct(a,arguments,f)}else o=a.apply(this,arguments);return cf(this,o)}}function ar(e,r){return Ui(e)||ms(e,r)||ya(e,r)||Zc()}function Fr(e){return Jc(e)||Eo(e)||ya(e)||Qc()}function Jc(e){if(Array.isArray(e))return Kn(e)}function Ui(e){if(Array.isArray(e))return e}function Eo(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ms(e,r){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var i=[],a=!0,o=!1,f=void 0;try{for(var d=e[Symbol.iterator](),v;!(a=(v=d.next()).done)&&(i.push(v.value),!(r&&i.length===r));a=!0);}catch(h){o=!0,f=h}finally{try{!a&&d.return!=null&&d.return()}finally{if(o)throw f}}return i}}function ya(e,r){if(e){if(typeof e=="string")return Kn(e,r);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Kn(e,r)}}function Kn(e,r){(r==null||r>e.length)&&(r=e.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=e[i];return a}function Qc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
154
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
155
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qa(e,r){var i;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(i=ya(e))||r&&e&&typeof e.length=="number"){i&&(e=i);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(h){throw h},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
156
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,d=!1,v;return{s:function(){i=e[Symbol.iterator]()},n:function(){var h=i.next();return f=h.done,h},e:function(h){d=!0,v=h},f:function(){try{!f&&i.return!=null&&i.return()}finally{if(d)throw v}}}}function pf(e,r){return r={exports:{}},e(r,r.exports),r.exports}var Yn=pf(function(e){function r(b,E){for(var V=0,I=0;I<b.length;I++)V=(V<<5)-V+b.charCodeAt(I),V|=0;return E[Math.abs(V)%E.length]}function i(b,E){var V=E.namespace;if(E.useColors){var I=E.color,W="\x1B[3"+(I<8?I:"8;5;"+I),Y=" ".concat(W,";1m").concat(V," \x1B[0m");b[0]=Y+b[0].split(`
|
|
157
|
+
`).join(`
|
|
158
|
+
`+Y)}else b[0]=V+" "+b[0]}function a(b,E){if(b[0]=(E.useColors?"%c":"")+E.namespace,!!E.useColors){var V="color: "+E.color,I=0,W=0;b[0].replace(/%[a-zA-Z%]/g,function(Y){Y!=="%%"&&(I++,Y==="%c"&&(W=I))}),b.splice(W,0,V)}}var o=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function f(){var b;try{b=localStorage.getItem("debug")}catch{}return!b&&typeof process<"u"&&"env"in process&&(b={}.DEBUG),{namespaces:b||"",colors:o,useColors:!0,formatArgs:a}}function d(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:i}}function v(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,E=arguments.length>1?arguments[1]:void 0;return function(){for(var V=arguments.length,I=new Array(V),W=0;W<V;W++)I[W]=arguments[W];b&&I.unshift(b);var Y=E.namespaces.split(",").map(function(ce){return ce[ce.length-1]==="*"?new RegExp("^"+ce.slice(0,ce.length-1)+".*$"):new RegExp("^"+ce+"$")}),_=Y.some(function(ce){return ce.test(b)}),U={color:r(b,E.colors),namespace:b,useColors:E.useColors};if(!1)var G}}function h(b){return v(b,d())}function g(b){return v(b,f())}typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?e.exports=g:e.exports=h}),_i=Yn("informed:ObjMap "),ba=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Ei=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0,o=String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(f,d){return f!=null?f[d]:f},r);return o===void 0||o===r?a:o},ys=function(r){return".".concat(r).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},wl=function(r){return r.replace(ys(r),"").replace(/\./,"")},Cl=function(r,i){var a=ys(i),o=wl(i),f=a?Ei(r,a):r;return!!(f&&Object.hasOwnProperty.call(f,o.replace(/\[(.*)\]/,"$1")))},hf=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return d===v.length-1?(o[f]=a,o[f]):o[f]===void 0?(Number.isInteger(+v[d+1])?o[f]=[]:o[f]={},o[f]):(Number.isInteger(+v[d+1])&&!Array.isArray(o[f])&&(o[f]=[]),o[f])},r)},Za=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=!1;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return o===void 0?o:(d===v.length-1&&(delete o[f],a=!0),o[f])},r),a},vf=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(o,f,d,v){return o===void 0?o:(d===v.length-1&&Array.isArray(o)&&(a=o.splice(f,1)),o[f])},r),a},qc=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Object.keys(r);return i.map(function(a){return r[a]})},bs=function(r){var i=ba(r);return Number.isInteger(+i[i.length-1])},Je=function(){function e(){fi(this,e)}return ma(e,null,[{key:"empty",value:function(i){return qc(i).length===0}},{key:"get",value:function(i,a){var o=Ei(i,a);return o}},{key:"has",value:function(i,a){return Cl(i,a)}},{key:"set",value:function(i,a,o){if(o!==void 0)_i("SETTING",a,o),hf(i,a,o);else if(bs(a)&&e.get(i,a)!==void 0){_i("Special case SETTING",a,"to undefined"),hf(i,a,void 0);var f=ba(a);f=f.slice(0,f.length-1),xs(i,f)}else!bs(a)&&e.get(i,a)!==void 0&&(_i("Special case REMOVING",a,"from object completley"),e.delete(i,a))}},{key:"delete",value:function(i,a){_i("DELETE",a),bs(a)?(_i("ARRAY",a),this.pullOut(i,a)):Za(i,a);var o=ba(a);o=o.slice(0,o.length-1),xs(i,o)}},{key:"pullOut",value:function(i,a){var o=ba(a),f=o[o.length-1];o=o.slice(0,o.length-1),_i("Pulling out:",o,"index",f);var d=Ei(i,o);_i("Array",d),Array.isArray(d)&&vf(d,f),xs(i,o)}}]),e}();function xs(e,r){if(r.length!==0){var i=Ei(e,r);(Array.isArray(i)?i.every(function(a){return a==null}):JSON.stringify(i)==="{}")&&Za(e,r),xs(e,r.slice(0,r.length-1))}}var yn=A.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Ti=A.createContext({}),qa=A.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),Al=A.createContext(),gf=A.createContext(),Ss=A.createContext(),ws=A.createContext(),mf=A.createContext(),Ol=A.createContext(),El=A.createContext(),yf=A.createContext();function bn(){var e=(0,A.useContext)(qa);return e}function xn(e){var r=(0,A.useRef)(),i=(0,A.useRef)(!0),a=(0,A.useState)(e),o=ar(a,2),f=o[0],d=o[1];r.current=f;var v=function(b){r.current=b,i.current&&d(b)},h=function(){return r.current};return(0,A.useEffect)(function(){return function(){i.current=!1}},[]),[f,v,h]}var eo=function(r){return r.type&&r.type.name?r.type.name:r.displayName||r.name||"Component"},bf=function(r){var i={};if(r.inner){if(r.inner.length===0){Je.set(i,r.path,r.message);return}var a=Qa(r.inner),o;try{for(a.s();!(o=a.n()).done;){var f=o.value;Je.get(i,f.path)||Je.set(i,f.path,f.message)}}catch(d){a.e(d)}finally{a.f()}}return i},Tl=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(o){var a=bf(o);return a}},xf=function(r){if(r.inner){if(r.inner.length===0)return;var i=r.inner[0];return i.message}},Sf=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(a){return xf(a)}},wf=function(r,i){r(i);var a={};return r.errors&&r.errors.forEach(function(o){var f=o.message,d=o.dataPath,v=o.keyword,h=o.params,g=d;v==="required"&&(g="".concat(g,".").concat(h.missingProperty)),g=g.replace(".",""),Je.set(a,g,f)}),a},xa=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var i=Math.random()*16|0,a=r=="x"?i:i&3|8;return a.toString(16)})},Cf=function(r,i){var a;return function(){for(var f=arguments.length,d=new Array(f),v=0;v<f;v++)d[v]=arguments[v];var h=function(){clearTimeout(a),r.apply(void 0,d)};clearTimeout(a),a=setTimeout(h,i)}},kl=function(r,i,a){var o=i["ui:control"],f=i["informed:props"],d=i["input:props"],v=i["ui:before"],h=i["ui:after"],g=i.oneOf,b=i.items,E=i.enum,V=i.title,I=i.minimum,W=i.maximum,Y=i.minLength,_=i.maxLength,U=i.pattern,G=i.type,ce=i.properties,Ce=xa();d&&d.id&&(Ce=d.id);var ge={componentType:o,field:a?"".concat(a,".").concat(r):r,type:G,uiBefore:v,uiAfter:h,properties:G==="object"?ce:void 0,items:G==="array"?b:void 0,props:ot(ot({label:V,id:Ce,min:I,max:W,minLength:Y,maxLength:_,pattern:U},f),d)};if(g){var ke=i.oneOf.map(function(ue){var Oe=ue["input:props"],Te=Oe===void 0?{}:Oe;return ot({value:ue.const,label:ue.title},Te)});ge.props.options=ke}if(E){var be=i.enum.map(function(ue){return{value:ue,label:ue}});ge.props.options=be}if(b&&b.oneOf){var me=b.oneOf.map(function(ue){var Oe=ue["input:props"],Te=Oe===void 0?{}:Oe;return ot({value:ue.const,label:ue.title},Te)});ge.props.options=me}return ge},Af=function(r,i,a){if(!r||i)return[];var o=r.properties,f=o===void 0?{}:o,d=r.allOf,v=r.propertyOrder,h=v===void 0?[]:v;if(Object.keys(f).length>0){var g=Object.keys(f).sort(function(b,E){var V=h.indexOf(b),I=h.indexOf(E);return(V>-1?V:h.length+1)-(I>-1?I:h.length+1)}).map(function(b){var E=f[b],V=kl(b,E,a);return V});return d&&g.push({componentType:"conditionals",allOf:d}),g}return[]},Pl=function(r){var i=r.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return i="properties.".concat(i),i},Fl=function(r,i){if(typeof r=="string")return r.split("").map(function(a){return a==="#"?/\d/:a==="*"?/[\w]/:a});if(typeof r=="function")return r(i);if(Array.isArray(r))return r;throw new Error("Formatter must be string, array, or function")},Of=function(r,i){for(var a=0,o=-1,f=!0;f&&a<r.length;)r[a]==i[a]?o=a:f=!1,a=a+1;return o},Cs=function(r,i){if(!r)return{val:r,offset:0};var a="".concat(r),o=Fl(i,a),f=o.findIndex(function(_){return typeof _!="string"}),d=o.length-Fr(o).reverse().findIndex(function(_){return typeof _!="string"}),v=[],h=a.split(""),g=0,b=0,E=Of(o.slice(0,f),h.slice(0,f));E>-1&&(g=E+1,v=v.concat(o.slice(0,E+1)),b=E+1),E<0&&(v=v.concat(o.slice(0,f)),b=f);for(var V=b;V<o.length;V++){var I=o[V];if(g!=h.length){var W=h[g];if(typeof I=="function")v.push(I(W)),g=g+1;else{var Y=typeof I=="string"?I===W:I.test(W);Y&&typeof I=="string"?(v.push(I),g=g+1):!Y&&typeof I=="string"?g!=h.length&&v.push(I):Y&&typeof I!="string"?(v.push(W),g=g+1):!Y&&typeof I!="string"&&(g=g+1,V=V-1)}}else if(typeof I=="string"&&V>=d)v.push(I);else break}return{value:v.join(""),offset:a?v.length-a.length:0}},Ef=function(r,i){var a,o,f=new Intl.NumberFormat(r,i),d=new Intl.NumberFormat(r),v=(a=(o=d.formatToParts(.1).find(function(_){var U=_.type;return U==="decimal"}))===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:".";function h(_,U){return _ instanceof RegExp&&U instanceof RegExp&&_.source===U.source&&_.global===U.global&&_.ignoreCase===U.ignoreCase&&_.multiline===U.multiline}function g(_,U){for(var G=_.length;G--;)if(U(_[G]))return G;return-1}function b(_,U,G){var ce=Fr(_);return Array.isArray(G)?ce.splice.apply(ce,[U,0].concat(Fr(G))):ce.splice(U,0,G),ce}function E(_){return"".concat(_).replace(/\D/g,"")}function V(_){return"".concat(_).split(v).map(function(U){return E(U)}).join(".")}function I(_){if(typeof _=="number")return _;var U=parseFloat(V(_));return Number.isNaN(U)?void 0:U}function W(_){var U=V(_),G="".concat(U).split(".")[1],ce=f.formatToParts(Number(U));G==="0"&&ce.push({type:"decimal",value:v},{type:"fraction",value:G});var Ce=ce.reduce(function(be,me){var ue=me.type,Oe=me.value;return["decimal","fraction"].includes(ue)&&G==null?be:["integer","fraction"].includes(ue)?[].concat(Fr(be),Fr(Oe.split("").filter(function(Te,Me){return ue==="fraction"?Me<G.length:!0}).map(function(){return/\d/}))):ue==="currency"?[].concat(Fr(be),Fr(Oe.split(""))):[].concat(Fr(be),[Oe])},[]),ge=g(Ce,function(be){return h(be,/\d/)});Ce.indexOf(v)===-1&&"".concat(_).indexOf(v)!==-1&&(Ce=b(Ce,ge+1,[v,"[]"]),ge+=2);var ke=Ce.slice(ge+1).join("");return Ce=[].concat(Fr(Ce.slice(0,ge+1)),[ke]),Ce}var Y=function(U){if(U!=null)return I(U)};return{formatter:W,parser:Y}},To=Object.freeze({__proto__:null,getChildDisplayName:eo,yupToFormErrors:bf,validateYupSchema:Tl,yupToFormError:xf,validateYupField:Sf,validateAjvSchema:wf,uuidv4:xa,debounce:Cf,computeFieldFromProperty:kl,computeFieldsFromSchema:Af,getSchemaPathFromJsonPath:Pl,informedFormat:Cs,createIntlNumberFormatter:Ef}),Pn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect,As=function(r){var i=r.value,a=r.inputRef,o=r.maintainCursor,f=o===void 0?!0:o,d=xn(0),v=ar(d,3),h=v[0],g=v[1],b=v[2],E=xn(0),V=ar(E,3),I=V[0],W=V[1],Y=V[2];return Pn(function(){if(a.current!=null&&b()){var _=b()+Y();Y()!=0&&f?a.current.setSelectionRange(_+1,_+1):f&&a.current.setSelectionRange(_,_)}},[i]),{setCursorOffset:W,setCursor:g,cursor:h,getCursor:b,cursorOffset:I}},ed=function(r,i){var a=(0,A.useRef)(!0),o=a.current;(0,A.useEffect)(function(){if(o)a.current=!1;else return r()},i)},un=Yn("informed:useField "),Tf=function(r,i,a,o,f){if(r!=null){if(f)return f(r);if(i)return i(r);if(a&&!o){var d=Cs(r,a);return d.value}return r}},Zt=function(r,i,a,o){if(i&&a)return i(r);if(o){var f=Cs(r,o);return f.value}return r},td=function(r,i,a){var o=a.required;if(r||i)return function(f,d){if(i)return Sf(i,f);if(r)return r(f,d)};if(o)return function(f){return Ll(f,o)}},Il=function(r){var i=r.fieldType,a=r.setValue,o=r.onChange,f=r.multiple,d=r.ref,v=function(g){return a(g)};return(i==="text"||i==="textArea"||i==="number")&&(v=function(g){return a(g.target.value,g)}),i==="select"&&(v=function(){var g=Array.from(d.current).filter(function(b){return b.selected}).map(function(b){return b.value});a(f?g:g[0]||"")}),i==="checkbox"&&(v=function(g){a(g.target.checked),o&&o(g)}),function(h){v(h)}},ko=function(r){var i=r.setTouched,a=r.onBlur;return function(o){i(!0),a&&a(o)}},Xn=function(r){var i=r.fieldType,a=r.maskedValue,o=r.multiple,f=r.value;switch(i){case"text":case"number":return!a&&a!==0?"":a;case"textArea":return a||"";case"select":return f||(o?[]:"");case"checkbox":return!!f;default:return f}},Os=function(r){switch(r){case"text":return r;case"number":return r;case"checkbox":return r;default:return}},Ll=function(r,i){if(i&&(r==null||r===""))return typeof i=="string"?i:"This field is required"};function to(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=e.field,a=e.validate,o=e.asyncValidate,f=e.validationSchema,d=e.mask,v=e.maskWithCursorOffset,h=e.format,g=e.parse,b=e.formatter,E=e.parser,V=e.initialValue,I=e.validateOnChange,W=e.validateOnBlur,Y=e.validateOnMount,_=e.asyncValidateOnBlur,U=e.maskOnBlur,G=e.allowEmptyString,ce=e.onValueChange,Ce=e.notify,ge=e.keepState,ke=e.maintainCursor,be=e.debug,me=e.shadow,ue=e.step,Oe=e.fieldType,Te=e.multiple,Me=e.onChange,Xe=e.onBlur,yt=e.formController,at=e.relevant,fr=e.required,Er=e.keepStateIfRelevant,cr=e.initialize,Tr=e.formatterDependencies,nr=Tr===void 0?[]:Tr,kt=sr(e,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),Yt=(0,A.useState)(xa()),Ht=ar(Yt,1),_e=Ht[0],qe=(0,A.useContext)(yn),Tt=(0,A.useContext)(yf),Vt=Tt||Er,Ot=bn(),pn=(0,A.useRef)(),Ki=(0,A.useRef)(!0),qn=(0,A.useRef)(),Kr=(0,A.useRef)(!1),uo=function(){return!Kr.current},No=function(){return Kr.current};yt&&(qe=yt.updater,Ot=yt.getFormApi());var Nn=td(a,f,{required:fr}),Aa=(0,A.useState)(function(){return qe.getInitialValue(i)}),tc=ar(Aa,1),Fi=tc[0],Vs=qe.getSavedValue(i),Yi,Oa;(ge||Vt)&&Vs?(un("Setting field ".concat(zd,"'s kept state"),Vs),Yi=Vs.value,Oa=Vs.touched,Ot.removeSavedState(zd)):V!=null?Yi=V:Yi=Fi;var Ld=xn(Tf(Yi,d,b,E,cr)),Xi=ar(Ld,3),Yr=Xi[0],js=Xi[1],Jl=Xi[2],Md=xn(Y?Nn(Yr):void 0),ei=ar(Md,3),Ea=ei[0],Ro=ei[1],Ql=ei[2],Zl=xn(Oa),Mt=ar(Zl,3),ti=Mt[0],Wy=Mt[1],rv=Mt[2],Hy=(0,A.useState)(function(){return Zt(Yr,h,g,b)}),nv=ar(Hy,2),Nd=nv[0],Rd=nv[1],iv=(0,A.useRef)();iv.current=Nd;var av=(0,A.useRef)(V),Do=(0,A.useRef)(i),ov=(0,A.useRef)();av.current=V,Do.current=i;var Uy=(0,A.useRef)(null),Ji=A.useMemo(function(){return r||Uy},[]),Dd=As({value:Yr,inputRef:Ji,maintainCursor:!!ke}),Bd=Dd.getCursor,_y=Dd.setCursor,Vd=Dd.setCursorOffset,zy=function(){return!0},jd=function(Kt){var Xr=at||zy,Rn=Ot.getFullField(Do.current)||Do.current,Nt={path:Rn,parentPath:Rn.replace(/(.*)[.[].*/,"$1"),get:function(Dn,tu){return Je.get(Dn,tu)}};return Tt&&Tt.relevant?Xr(Kt,Nt)&&Tt.relevant(Kt,Nt):Xr(Kt,Nt)},Gy=xn(jd(Ot.getValues())),Wd=ar(Gy,3),rc=Wd[0],$y=Wd[1],sv=Wd[2],Ky=function(Kt){return Tt&&Tt.relevant?Tt.relevant(Kt):!0},Yy=function(){var Kt=jd(Ot.getValues()),Xr=sv();return Kt!=Xr&&$y(Kt),Kt};(0,A.useEffect)(function(){!rc&&!ge&&pn.current.reset()},[rc]);var hi=function(){return me?Ot.getDerrivedValue(i):Jl()},ql=function(Kt){var Xr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rn=Xr.preventUpdate;ue&&Ot.getStep()<ue?(un("Setting ".concat(i,"'s error to undefined as we are not at that step")),Ro(void 0),qe.setError(_e,void 0,!Rn)):(un("Setting ".concat(i,"'s error to ").concat(Kt)),Ro(Kt),qe.setError(_e,Kt,!Rn))},Hd=function(Kt,Xr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nt=Kt;Kr.current=!0,un("Setting ".concat(i," to ").concat(Nt)),cr&&(Nt=cr(Nt));var Bo=Ot.getOptions(),Dn=Nt;if(Nt===""&&!G&&!Rn.allowEmptyString&&!Bo.allowEmptyStrings&&(Nt=void 0),(e.type==="number"||Oe==="number")&&Nt!==void 0&&(Nt=+Nt),Xr&&Xr.target&&Xr.target.selectionStart&&_y(Xr.target.selectionStart),d&&!U&&(Dn=d(Nt,Bd()),Nt=d(Nt,Bd())),v&&!U){var tu=v(Nt,Bd());Dn=tu.value,Nt=tu.value,Vd(tu.offset)}if(h&&g&&(Nt=g(Nt),Dn=h(Nt)),b){var lv=Cs(Nt,b);Vd(lv.offset),Dn=lv.value,Nt=Dn}E&&(Nt=Nt!=null?E(Nt):Nt),Nn&&I&&!Rn.initial&&(un("Validating after change ".concat(i," ").concat(Nt)),ql(Nn(Nt,Ot.getValues()))),js(Nt),Rd(Dn),ce&&ce(Nt),qe.setValue(_e,Nt,!Rn.preventUpdate)};ed(function(){pn.current.setValue(iv.current)},Fr(nr));var Ud=function(Kt,Xr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nt=Rn.preventUpdate;if(un("Field ".concat(i," has been touched")),Nn&&W&&!Xr&&Kt&&(un("Validating after blur ".concat(i," ").concat(hi())),ql(Nn(hi(),Ot.getValues()))),o&&_&&!Xr&&Kt&&(un("Validating async after blur ".concat(i," ").concat(hi())),o(hi(),Ot.getValues())),d&&U){var Bo=d(hi());js(Bo),Rd(Bo),ce&&ce(Bo),qe.setValue(_e,Bo,!Nt)}if(v&&U){var Dn=v(hi());Vd(Dn.offset),js(Dn.value),Rd(Dn.value),ce&&ce(Dn.value),qe.setValue(_e,Dn.value,!Nt)}Wy(Kt),qe.setTouched(_e,Kt,!Nt)},Xy=function(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Xr=Kt.preventUpdate,Rn=Tf(av.current||qe.getInitialValue(Do.current),d,b,E,cr);Hd(Rn,null,{initial:!0,preventUpdate:Xr}),ql(Y?Nn(Rn):void 0,{preventUpdate:Xr}),Ud(void 0,!0,{preventUpdate:Xr}),Kr.current=!1},Jy=function(Kt){Nn&&(un("Field validating ".concat(i," ").concat(hi())),ql(Nn(hi(),Kt||Ot.getValues())))},Qy=function(Kt){o&&(un("Field async validating ".concat(i," ").concat(hi())),o(hi(),Kt||Ot.getValues()))},_d={setValue:Hd,setTouched:Ud,setError:ql,reset:Xy,validate:Jy,asyncValidate:Qy,getValue:hi,getTouched:rv,getError:Ql,getIsRelevant:sv,getDirty:No,getPristine:uo,getFieldState:function(){return{value:hi(),touched:rv(),dirty:No(),pristine:uo()}},relevant:jd,multistepRelevant:Ky,checkRelevant:Yy};pn.current=_d;var eu={value:Yr,error:Ea,touched:ti,maskedValue:Nd,isRelevant:rc,dirty:Kr.current,pristine:!Kr.current};me&&(eu={error:Ea,touched:ti}),un("Render",Ot.getFullField(i),eu),Pn(function(){var Ur=Ot.getFullField(Do.current);return un("Register",_e,Do.current),qn.current={field:Ur,fieldId:_e,fieldApi:_d,fieldState:eu,notify:Ce,keepState:ge,inMultistep:Vt,shadow:me},qe.register(_e,qn.current),function(){var Kt=Ot.getFullField(Do.current);un("Deregister",_e,Kt),qe.deregister(_e)}},[]),(0,A.useEffect)(function(){var Ur=Ot.getFullField(i);return Ki.current?Ki.current=!1:(un("Update",i,Vt),qn.current.field=Ur,qe.update(_e,qn.current,ov.current)),function(){ov.current=Ur}},[i]),Pn(function(){be&&Ji&&(Ji.current.style.border="5px solid orange",setTimeout(function(){Ji.current.style.borderWidth="2px",Ji.current.style.borderStyle="inset",Ji.current.style.borderColor="initial",Ji.current.style.borderImage="initial"},500))});var Zy=[].concat(Fr(Object.values(eu)),Fr(Object.values(e)),Fr(Object.values(kt))),qy=function(Kt){return(0,A.useMemo)(function(){return rc?Kt:null},Fr(Zy))},zd=i,e0=Il({fieldType:Oe,setValue:Hd,onChange:Me,multiple:Te,ref:Ji}),t0=ko({setTouched:Ud,onBlur:Xe}),r0=Xn({fieldType:Oe,maskedValue:Nd,multiple:Te,value:Yr}),n0=Os(Oe);return{fieldState:eu,fieldApi:_d,render:qy,ref:Ji,userProps:ot(ot({},kt),{},{multiple:Te,onChange:Me,onBlur:Xe,id:kt.id||_e}),informed:ot({name:zd,multiple:Te,onChange:e0,onBlur:t0,value:r0,ref:Ji,type:n0,id:kt.id||_e},kt)}}var ci=function(r){var i=A.forwardRef(function(a,o){var f=to(a,o),d=f.fieldState,v=f.fieldApi,h=f.render,g=f.ref,b=f.userProps;return h(A.createElement(r,ir({fieldApi:v,fieldState:d,field:a.field,forwardedRef:g,debug:a.debug,type:a.type},b)))});return i.displayName="asField(".concat(eo(r),")"),i},kf=Yn("informed:Text "),Ml=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.maskedValue,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,V=o.forwardedRef,I=o.debug,W=o.label,Y=o.title,_=o.id,U=sr(o,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return kf("Render",b),Pn(function(){I&&V&&(V.current.style.background="red",setTimeout(function(){V.current.style.background="white"},500))}),A.createElement(A.Fragment,null,W?A.createElement("label",{htmlFor:_}," ",W," "):null,A.createElement("input",ir({},U,{id:_,name:b,ref:V,value:!f&&f!==0?"":f,onChange:function(ce){d(ce.target.value,ce),h&&h(ce)},onBlur:function(ce){v(!0),g&&g(ce)}})))},Pf=ci(Ml),rd=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.maskedValue,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,V=o.forwardedRef,I=o.debug,W=o.label,Y=o.id,_=sr(o,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return Pn(function(){I&&V&&(V.current.style.background="red",setTimeout(function(){V.current.style.background="white"},500))}),A.createElement(A.Fragment,null,W?A.createElement("label",{htmlFor:Y}," ",W," "):null,A.createElement("textarea",ir({},_,{id:Y,name:b,ref:V,value:f||"",onChange:function(G){d(G.target.value,G),h&&h(G)},onBlur:function(G){v(!0),g&&g(G)}})))},Nl=ci(rd),Ff=Yn("informed:Select "),Ut=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.value,d=i.setTouched,v=o.onChange,h=o.onBlur,g=o.field,b=o.initialValue,E=o.options,V=o.children,I=o.forwardedRef,W=o.debug,Y=o.multiple,_=o.label,U=o.id,G=sr(o,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),ce=(0,A.useRef)(),Ce=function(ke){var be=Array.from((I||ce).current).filter(function(me){return me.selected}).map(function(me){return me.value});i.setValue(Y?be:be[0]||""),v&&ke&&v(ke)};return Pn(function(){W&&I&&(I.current.style.background="red",setTimeout(function(){I.current.style.background="white"},500))}),Ff("Render",g,f),A.createElement(A.Fragment,null,_?A.createElement("label",{htmlFor:U}," ",_," "):null,A.createElement("select",ir({},G,{id:U,multiple:Y,name:g,ref:I||ce,value:f||(Y?[]:""),onChange:Ce,onBlur:function(ke){d(!0),h&&h(ke)}}),E?E.map(function(ge){return A.createElement("option",{key:ge.value,value:ge.value,disabled:ge.disabled},ge.label)}):V))},If=ci(Ut),nd=function(r){var i=r.fieldApi,a=r.fieldState,o=sr(r,["fieldApi","fieldState"]),f=a.value,d=i.setValue,v=i.setTouched,h=o.onChange,g=o.onBlur,b=o.field,E=o.initialValue,V=o.debug,I=o.forwardedRef,W=o.id,Y=o.label,_=sr(o,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return A.createElement(A.Fragment,null,Y?A.createElement("label",{htmlFor:W}," ",Y," "):null,A.createElement("input",ir({},_,{id:W,name:b,ref:I,checked:!!f,onChange:function(G){d(G.target.checked),h&&h(G)},onBlur:function(G){v(!0),g&&g(G)},type:"checkbox"})))},ro=ci(nd),id=function(r){return A.forwardRef(function(i,a){return A.createElement(Al.Consumer,null,function(o){var f=o.radioGroupApi,d=o.radioGroupState;return A.createElement(r,ir({radioGroupApi:f,radioGroupState:d,ref:a},i))})})},Es=function(r){var i=r.radioGroupApi,a=r.radioGroupState,o=sr(r,["radioGroupApi","radioGroupState"]),f=a.value,d=i.setValue,v=i.setTouched,h=i.onChange,g=i.onBlur,b=o.value,E=o.onChange,V=o.onBlur,I=o.field,W=o.initialValue,Y=o.forwardedRef,_=sr(o,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return A.createElement("input",ir({},_,{name:I,ref:Y,value:b,checked:f===b,onChange:function(G){G.target.checked&&(d(b),E&&E(G),h&&h(G))},onBlur:function(G){v(!0),V&&V(G),g&&g(G)},type:"radio"}))},ad=id(Es),lr=function(e){Kc(i,e);var r=df(i);function i(){return fi(this,i),r.apply(this,arguments)}return ma(i,[{key:"render",value:function(){var o=this.props,f=o.options,d=o.children;return A.createElement(Al.Provider,{value:this.groupContext},f?f.map(function(v){return A.createElement("label",{key:v.value},v.label," ",A.createElement(ad,{value:v.value}))}):d)}},{key:"groupContext",get:function(){return{radioGroupApi:ot(ot({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),i}(A.Component),od=ci(lr);function sd(){return(0,A.useContext)(Ss)}var ld=function(){var r=sd(),i=r.add;return A.createElement("button",{onClick:function(){i()},type:"button"},"Add")};function Ts(){return(0,A.useContext)(ws)}var t=function(){var r=Ts(),i=r.remove;return A.createElement("button",{onClick:function(){i()},type:"button"},"Remove")},n=Yn("informed:useArrayField "),l=function(r){var i=r.field,a=r.initialValue,o=r.validate,f=r.arrayFieldApiRef,d=sr(r,["field","initialValue","validate","arrayFieldApiRef"]),v=bn(),h=(0,A.useState)(new Map),g=ar(h,1),b=g[0],E=(0,A.useContext)(yn),V=v.getFullField(i),I=E.getInitialValue(i)||a||[],W=v.getSavedValue(V)&&v.getSavedValue(V).value,Y=xn(W||I),_=ar(Y,3),U=_[0],G=_[1],ce=_[2],Ce=U?U.map(function(){return xa()}):[],ge=xn(Ce),ke=ar(ge,3),be=ke[0],me=ke[1],ue=ke[2],Oe=(0,A.useMemo)(function(){return function(Ht,_e){var qe=ue()==null?0:ue().length;return o?o(Ht,qe,_e):void 0}}),Te=to(ot({field:i,validate:o?Oe:void 0,shadow:!0},d)),Me=Te.fieldApi;Pn(function(){var Ht=function(qe){qe!==V&&(n("".concat(V," changed")),RegExp("".concat(V,"\\[[0-9]+\\]")).test(qe)&&Me.validate())};return v.emitter.on("value",Ht),function(){v.emitter.removeListener("value",Ht)}},[i]);var Xe=function(_e){n("EXPECTING REMOVAL OF","".concat(i,"[").concat(_e,"] and ").concat(i,"[").concat(be.length-1,"]")),E.expectRemoval("".concat(i,"[").concat(_e,"]")),E.expectRemoval("".concat(i,"[").concat(be.length-1,"]"));var qe=be.slice(0,_e).concat(be.slice(_e+1,be.length));me(qe);var Tt=ce(),Vt=Tt.slice(0,_e).concat(Tt.slice(_e+1,Tt.length));G(Vt)},yt=function(_e,qe){n("Swapping","".concat(i,"[").concat(_e,"] and ").concat(i,"[").concat(qe,"]"));var Tt=Fr(be);be[_e]&&be[qe]?(Tt[_e]=be[qe],Tt[qe]=be[_e]):console.warn("Attempted to swap ".concat(_e," with ").concat(qe," but one of them does not exist :(")),me(Tt)},at=function(){be.push(xa()),me(Fr(be))},fr=function(_e){be.push(xa()),me(Fr(be));var qe=Fr(ce());qe[be.length-1]=_e,G(qe)},Er=function(){var _e=E.getInitialValue(i)||a||[];G(_e);var qe=_e?_e.map(function(){return xa()}):[];me(qe)},cr=be.map(function(Ht,_e){var qe={remove:function(){return Xe(_e)}},Tt={initialValue:U&&U[_e],key:Ht,field:"".concat(i,"[").concat(_e,"]"),index:_e};return ot(ot({arrayFieldItemApi:qe,arrayFieldItemState:Tt},qe),Tt)}),Tr={add:at,swap:yt,addWithInitialValue:fr,reset:Er};f&&(f.current=Tr);var nr={fields:cr,field:i},kt=ot(ot({},E),{},{register:function(_e,qe){b.set(_e,qe);for(var Tt=arguments.length,Vt=new Array(Tt>2?Tt-2:0),Ot=2;Ot<Tt;Ot++)Vt[Ot-2]=arguments[Ot];E.register.apply(E,[_e,qe].concat(Vt))},deregister:function(_e){b.delete(_e);for(var qe=arguments.length,Tt=new Array(qe>1?qe-1:0),Vt=1;Vt<qe;Vt++)Tt[Vt-1]=arguments[Vt];E.deregister.apply(E,[_e].concat(Tt))},getInitialValue:function(_e){if(RegExp("".concat(V,"\\[[0-9]+\\]")).test(_e)){var qe=_e.replace(i,""),Tt=Je.get(ce(),qe);return n("Resetting ".concat(qe," to ").concat(Tt)),Tt}return E.getInitialValue(_e)}}),Yt=function(_e){return A.createElement(yn.Provider,{value:kt},A.createElement(Ss.Provider,{value:Tr},A.createElement(gf.Provider,{value:nr},_e)))};return{render:Yt,add:at,swap:yt,addWithInitialValue:fr,fields:cr,arrayFieldState:nr,arrayFieldApi:Tr,field:i}},s=function(r,i){return ot(ot({},i),{},{getValue:function(o){return i.getValue("".concat(r,".").concat(o))},getTouched:function(o){return i.getTouched("".concat(r,".").concat(o))},getError:function(o){return i.getError("".concat(r,".").concat(o))},setValue:function(o,f){return i.setValue("".concat(r,".").concat(o),f)},setTouched:function(o,f){return i.setTouched("".concat(r,".").concat(o),f)},setError:function(o,f){return i.setError("".concat(r,".").concat(o),f)},getInitialValue:function(o){return i.getInitialValue("".concat(r,".").concat(o))},getSavedValue:function(o){return i.getSavedValue("".concat(r,".").concat(o))},getFullField:function(o){return"".concat(i.getFullField(r),".").concat(o)}})};function u(e){var r=bn(),i=(0,A.useMemo)(function(){return s(e,r)},[e]);return i}function p(){var e=(0,A.useContext)(Ti);return e}var y=function(r){var i=r.when,a=r.children,o=p(),f=i(o);return f?a:null},x=function(r){var i=r.relevant,a=r.field,o=sr(r,["relevant","field"]),f=bn();if(i){var d=f.getFullField(a),v={path:d,parentPath:d.replace(/(.*)[.[].*/,"$1"),get:function(b,E){return Je.get(b,E)}},h=function(b){var E=b.values;return i(E,v)};return A.createElement(y,{when:h},A.createElement(C,ir({field:a},o)))}else return A.createElement(C,ir({field:a},o))},C=function(r){var i=r.children,a=sr(r,["children"]),o=l(a),f=o.render,d=o.arrayFieldState,v=o.arrayFieldApi,h=o.field;return f(typeof i=="function"?i(ot(ot({field:h,arrayFieldApi:v,arrayFieldState:d},v),d)):i)},P=function(r){var i=r.arrayFieldItemState,a=r.arrayFieldItemApi,o=r.children,f=(0,A.useContext)(yn),d=bn(),v=(0,A.useState)(0),h=ar(v,2),g=h[0],b=h[1],E=(0,A.useState)(new Map),V=ar(E,1),I=V[0],W=i.field,Y=u(W),_=function(){var be=d.getState(),me=be.values,ue=be.errors,Oe=be.touched,Te={values:Je.get(me,W),errors:Je.get(ue,W),touched:Je.get(Oe,W)};return Te};(0,A.useEffect)(function(){var ke=function(me){var ue=me.slice(0,me.lastIndexOf("[")!=-1?me.lastIndexOf("]")+1:me.length);ue===W&&b(Math.random())};return d.emitter.on("value",ke),function(){d.emitter.removeListener("value",ke)}},[W]);var U=function(){I.forEach(function(be){be.fieldApi.reset()})},G=_(),ce=ot(ot({},f),{},{register:function(be,me,ue){I.set(be,me),f.register(be,me,ue)},deregister:function(be){I.delete(be);for(var me=arguments.length,ue=new Array(me>1?me-1:0),Oe=1;Oe<me;Oe++)ue[Oe-1]=arguments[Oe];f.deregister.apply(f,[be].concat(ue))}}),Ce=ot(ot(ot({},a),Y),{},{reset:U}),ge=ot(ot({},i),G);return typeof o=="function"?A.createElement(yn.Provider,{value:ce},A.createElement(ws.Provider,{value:Ce},A.createElement(mf.Provider,{value:ge},o(ot(ot({arrayFieldItemApi:Ce,arrayFieldItemState:ge},Ce),ge))))):A.createElement(yn.Provider,{value:ce},A.createElement(ws.Provider,{value:Ce},A.createElement(mf.Provider,{value:ge},o)))};x.Items=function(e){var r=e.children,i=(0,A.useContext)(gf),a=i.fields;return a.map(function(o){var f=o.arrayFieldItemState,d=o.arrayFieldItemApi,v=f.key;return A.createElement(P,{key:v,arrayFieldItemApi:d,arrayFieldItemState:f},r)})};var K=function(r){var i=r.components,a=(0,A.useContext)(yn),o=a.fieldMap;return i?i.map(function(f,d){var v=f["ui:control"],h=o[v];return A.createElement(h,{key:"ui-comp-".concat(d)})}):null},ne=Yn("informed:FormFields "),ve=function e(r){var i=r.schema,a=r.prefix,o=r.onlyValidateSchema,f=(0,A.useContext)(yn),d=f.fieldMap,v=(0,A.useMemo)(function(){var h=Af(i,o,a),g=h.map(function(b,E){var V=b.field,I=b.props,W=b.type,Y=b.properties,_=b.items,U=b.componentType,G=b.uiBefore,ce=b.uiAfter,Ce=b.allOf,ge=d[U];return ne("Rendering Field",V,b),!ge&&W==="object"&&Y?A.createElement(e,{schema:b,prefix:V,key:"ScheamField-".concat(E)}):!ge&&W==="array"&&_?A.createElement(de,ir({key:"ScheamField-".concat(E),field:V,items:_,uiBefore:G,uiAfter:ce},I)):ge&&U==="array"&&_&&W==="array"?A.createElement(ge,ir({key:"ScheamField-".concat(E),field:V,items:_,uiBefore:G,uiAfter:ce},I)):U==="conditionals"?Ce.map(function(ke){var be=ke.then,me=ke.if.properties,ue=function(Te){var Me=Te.values;return Object.keys(me).every(function(Xe){var yt=me[Xe];return Me[Xe]===yt.const})};return A.createElement(y,{key:"ScheamField-".concat(E),when:ue},A.createElement(e,{schema:be}))}):ge?A.createElement(ge,ir({key:"ScheamField-".concat(E),field:V},I)):null});return g},[i,a]);return v},de=function(r){var i=r.field,a=r.items,o=r.uiBefore,f=r.uiAfter,d=sr(r,["field","items","uiBefore","uiAfter"]);return A.createElement(x,ir({field:i},d),A.createElement(K,{components:o}),A.createElement(x.Items,null,function(v){var h=v.field;return A.createElement(A.Fragment,null,A.createElement(K,{components:a["ui:before"]}),A.createElement(ve,{schema:a,prefix:h}),A.createElement(K,{components:a["ui:after"]}))}),A.createElement(K,{components:f}))},Ee={select:If,input:Pf,textarea:Nl,checkbox:ro,radio:od,add:ld,remove:t,array:de},Ae=Yn("informed:Controller "),Ie=function(r,i){var a=Object.keys(i).find(function(f){return r.includes(f)});if(a){var o=r.slice(0,a.length);return o===a}},Le=function(){},De=function(){function e(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fi(this,e),this.options=i,this.subscriptions=new Map;var a=i.ajv,o=i.schema,f=i.fieldMap;this.ajv=a?new a({allErrors:!0}):null,this.ajvValidate=a?this.ajv.compile(o):null,this.fieldMap=f||Ee,this.fieldsById=new Map,this.fieldsByName={get:function(v){var h;return r.fieldsById.forEach(function(g){g&&g.field===v&&(h=g)}),h}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:Le,setTouched:Le,setError:Le,reset:Le,validate:Le,getValue:Le,getTouched:Le,getError:Le,getFieldState:Le,checkRelevant:Le,getPristine:Le,getDirty:Le}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);b.shadow||Je.set(r.state.values,b.field,b.fieldApi.getValue()),b.fieldApi.relevant(r.state.values)||Je.delete(r.state.values,b.field),r.fieldsById.forEach(function(E){var V=E.fieldApi.checkRelevant();(!E.fieldApi.multistepRelevant(r.state.values)||!V&&!E.keepState)&&(Je.delete(r.state.values,E.field),Je.delete(r.state.touched,E.field),Je.delete(r.state.errors,E.field))}),g&&(r.emit("change"),r.emit("field",b.field),r.emit("value",b.field,h))},setTouched:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);!b.shadow&&b.fieldApi.getIsRelevant()&&Je.set(r.state.touched,b.field,b.fieldApi.getTouched()),b.shadow&&b.fieldApi.getError()!=null&&b.fieldApi.relevant(r.state.values)&&Je.set(r.state.touched,b.field,b.fieldApi.getTouched()),g&&(r.emit("change"),r.emit("field",b.field))},setError:function(v,h){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=r.fieldsById.get(v);!b.shadow&&b.fieldApi.getIsRelevant()&&Je.set(r.state.errors,b.field,b.fieldApi.getError());var E=Je.get(r.state.errors,b.field);(b.shadow&&b.fieldApi.getError()!=null&&b.fieldApi.relevant(r.state.values)||b.shadow&&b.fieldApi.getError()===void 0&&b.fieldApi.relevant(r.state.values)&&typeof E=="string")&&Je.set(r.state.errors,b.field,b.fieldApi.getError()),g&&(r.emit("change"),r.emit("field",b.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",function(d){delete r.state.error,r.notify(d)})}return ma(e,[{key:"emit",value:function(i){for(var a=arguments.length,o=new Array(a>1?a-1:0),f=1;f<a;f++)o[f-1]=arguments[f];var d=this.subscriptions.get(i);d&&d.forEach(function(v){return v.apply(void 0,o)})}},{key:"on",value:function(i,a){this.subscriptions.get(i)||this.subscriptions.set(i,new Set);var o=this.subscriptions.get(i);o.add(a)}},{key:"removeListener",value:function(i,a){var o=this.subscriptions.get(i);o.delete(a)}},{key:"setOptions",value:function(i){this.options=i}},{key:"setValue",value:function(i,a,o){this.getField(i).fieldApi.setValue(a,null,ot({allowEmptyString:this.options.allowEmptyStrings},o))}},{key:"setTouched",value:function(i,a){this.getField(i).fieldApi.setTouched(a)}},{key:"setError",value:function(i,a){this.getField(i).fieldApi.setError(a)}},{key:"setFormError",value:function(i){this.state.error=i,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(i,a){if(this.state.validating=this.state.validating-1,this.getError(i)||this.setError(i,a),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(Ae("Submit",this.state),this.emit("submit")):(Ae("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(i){this.state.step=i,this.emit("change")}},{key:"setCurrent",value:function(i){this.state.Current=i,this.emit("change")}},{key:"back",value:function(i){this.state.step=this.state.step-1,this.state.Current=i,this.emit("change")}},{key:"next",value:function(i){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=i),this.emit("change")}},{key:"setInitialValue",value:function(i,a){Je.set(this.options.initialValues,i,a)}},{key:"getFormState",value:function(){return Ae("Returning form state"),ot(ot({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(i){var a=this.getValues();return Je.get(a,i)}},{key:"getValue",value:function(i){var a=this.getField(i).fieldApi.getValue();return Ae("Getting value for",i,a),a}},{key:"getTouched",value:function(i){var a=this.getField(i).fieldApi.getTouched();return Ae("Getting touched for",i,a),a}},{key:"getError",value:function(i){var a=this.getField(i).fieldApi.getError();return Ae("Getting error for",i,a),a}},{key:"getDirty",value:function(i){var a=this.getField(i).fieldApi.getDirty();return Ae("Getting dirty for",i,a),a}},{key:"getPristine",value:function(i){var a=this.getField(i).fieldApi.getPristine();return Ae("Getting pristine for",i,a),a}},{key:"getValues",value:function(){return Ae("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return Ae("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return Ae("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?Je.get(this.savedValues,"shadow-".concat(i)):Je.get(this.savedValues,i)}},{key:"removeSavedState",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?Je.delete(this.savedValues,"shadow-".concat(i)):Je.delete(this.savedValues,i)}},{key:"getFullField",value:function(i){return i}},{key:"getInitialValue",value:function(i){return Je.get(this.options.initialValues,i)}},{key:"getField",value:function(i){Ae("Getting Field",i);var a=this.fieldsByName.get(i);return a||(console.warn("Attempting to get field ".concat(i," but it does not exist")),this.dummyField)}},{key:"notify",value:function(i){var a=this,o=this.getField(i);o&&o.notify&&o.notify.forEach(function(f){var d=".".concat(i),v="".concat(d.replace(/(.*)[.[].*/,"$1"),".").concat(f).slice(1),h=a.getField(v);h&&(Ae("Notifying",h.field),h.fieldApi.validate(),h.fieldApi.checkRelevant())})}},{key:"validateField",value:function(i){this.getField(i).fieldApi.validate()}},{key:"resetField",value:function(i){this.getField(i).fieldApi.reset()}},{key:"fieldExists",value:function(i){return this.fieldsByName.get(i)!=null}},{key:"valid",value:function(){var i=this.getErrors();return!!(Je.empty(i)&&!this.state.error)}},{key:"screenValid",value:function(){var i=Object.entries(this.onScreen).some(function(a){var o=ar(a,2),f=o[1];return f.fieldApi.getError()});return!i}},{key:"invalid",value:function(){var i=this.getErrors();return!!(!Je.empty(i)||this.state.error)}},{key:"pristine",value:function(){var i=!0;return this.fieldsById.forEach(function(a){a.fieldApi.getPristine()||(i=!1)}),i}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){Ae("Resetting"),this.fieldsById.forEach(function(i){i.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(i){Ae("Setting values"),this.fieldsById.forEach(function(a){var o=Je.get(i,a.field);o!==void 0&&a.fieldApi.setValue(o,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var i=this;Ae("Validating all fields");var a=this.getValues();if(this.options.validationSchema){var o=Tl(this.options.validationSchema,a);this.fieldsById.forEach(function(h){if(Je.has(o,h.field)){var g=Je.get(o,h.field);i.setError(h.field,g)}else i.setError(h.field,void 0)})}if(this.options.schema&&this.options.ajv){var f=wf(this.ajvValidate,a);this.fieldsById.forEach(function(h){if(Je.has(f,h.field)){var g=Je.get(f,h.field);i.setError(h.field,g)}else i.setError(h.field,void 0)})}if(this.fieldsById.forEach(function(h){h.fieldApi.validate(a),h.fieldApi.setTouched(!0,!0)}),this.options.validate){var d=this.options.validate(a);this.setFormError(d)}if(this.options.validateFields){var v=this.options.validateFields(a);this.fieldsById.forEach(function(h){if(Je.has(v,h.field)){var g=Je.get(v,h.field);i.setError(h.field,g)}})}}},{key:"asyncValidate",value:function(){Ae("Async Validating all fields");var i=this.getValues();this.fieldsById.forEach(function(a){a.fieldApi.asyncValidate(i)})}},{key:"keyDown",value:function(i){if(i.keyCode==13&&this.options.preventEnter)return i.preventDefault(i),!1}},{key:"submitForm",value:function(i){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&i&&i.preventDefault(i),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(Ae("Submit",this.state),this.emit("submit")):(Ae("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var i=this;this.fieldsById.forEach(function(a){i.emit("field",a.field)})}},{key:"register",value:function(i,a,o){var f=a.field,d=a.state;Ae("Register ID:",i,"Name:",f,d,"Initial",o);var v=f.slice(0,f.lastIndexOf("[")!=-1?f.lastIndexOf("]")+1:f.length),h;this.fieldsById.forEach(function(g,b){g&&g.field===f&&(h=b)}),h&&(a.keepState||a.inMultistep)?(Ae("Already Registered",f),this.fieldsById.delete(h)):h&&(!a.keepState||!a.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",f),Ae("Fields Registered",this.fieldsById.size),this.onScreen[i]=a,this.fieldsById.set(i,a),Ae("clearing expected removal",v),delete this.expectedRemovals[v],delete this.pulledOut[v],!a.shadow&&(this.updater.setValue(i,a.fieldApi.getValue(),!1),this.updater.setError(i,a.fieldApi.getError(),!1),this.updater.setTouched(i,a.fieldApi.getTouched(),!1),o||this.emit("change"),this.emit("field",f))}},{key:"deregister",value:function(i){var a=this.fieldsById.get(i),o=a.field;Ae("Deregister",i,o),delete this.onScreen[i];var f=Ie(o,this.expectedRemovals),d=o.slice(0,o.lastIndexOf("[")!=-1?o.lastIndexOf("]")+1:o.length);(a.keepState||a.inMultistep)&&!f&&(Ae("Saving field ".concat(o,"'s value"),a.fieldApi.getFieldState()),a.shadow?Je.set(this.savedValues,"shadow-".concat(o),a.fieldApi.getFieldState()):Je.set(this.savedValues,o,a.fieldApi.getFieldState())),(f||!a.keepState&&!a.inMultistep||!a.fieldApi.getIsRelevant()&&!a.keepState)&&(Ae("Removing field",o),this.fieldsById.delete(i),f||(Je.delete(this.state.values,o),Je.delete(this.state.touched,o),Je.delete(this.state.errors,o),a.shadow?Je.delete(this.savedValues,"shadow-".concat(o)):Je.delete(this.savedValues,o)),f&&this.pulledOut[d]&&(Ae("Pulling out",o,"with magic value",d),Je.pullOut(this.state.values,d),Je.pullOut(this.state.touched,d),Je.pullOut(this.state.errors,d),Je.pullOut(this.savedValues,d),delete this.pulledOut[d])),this.emit("change")}},{key:"expectRemoval",value:function(i){Ae("Expecting removal of",i),this.expectedRemovals[i]=!0,this.pulledOut[i]=!0}},{key:"update",value:function(i,a,o){Ae("Update",i,a.field,o,a.fieldState.value);var f=a.fieldApi.getValue(),d=a.fieldApi.getError(),v=a.fieldApi.getTouched(),h=this.fieldsByName.get(o);o&&!h&&(Je.set(this.state.values,o),Je.set(this.state.errors,o),Je.set(this.state.touched,o)),Je.set(this.state.values,a.field,f),Je.set(this.state.errors,a.field,d),Je.set(this.state.touched,a.field,v),this.emit("change")}}]),e}(),Ne=Yn("informed:FormProvider "),We=function(r){var i=r.children,a=r.formApi,o=r.formController,f=r.formState,d=sr(r,["children","formApi","formController","formState"]);if(Ne("Render FormProvider"),a)return Ne("Render FormProvider with given values"),A.createElement(yn.Provider,{value:o.updater},A.createElement(qa.Provider,{value:a},A.createElement(Ti.Provider,{value:f},i)));Ne("Render FormProvider with generated values");var v=Ke(d);return A.createElement(yn.Provider,{value:v.formController.updater},A.createElement(qa.Provider,{value:v.formApi},A.createElement(Ti.Provider,{value:v.formState},i)))},Qe=Yn("informed:useForm "),Ke=function(r){var i=r.dontPreventDefault,a=r.initialValues,o=r.validate,f=r.validateFields,d=r.allowEmptyStrings,v=r.preventEnter,h=r.getApi,g=r.apiRef,b=r.onChange,E=r.onReset,V=r.onSubmit,I=r.onValueChange,W=r.onSubmitFailure,Y=r.validationSchema,_=r.schema,U=r.ajv,G=r.fieldMap,ce=r.onlyValidateSchema,Ce=sr(r,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);Qe("Render useForm");var ge=(0,A.useMemo)(function(){return{dontPreventDefault:i,initialValues:a,validate:o,validateFields:f,allowEmptyStrings:d,preventEnter:v,validationSchema:Y,schema:_,ajv:U,fieldMap:G}},[i,a,o,f,d,v,Y,_,U,G]),ke=(0,A.useState)(function(){return new De(ge)}),be=ar(ke,1),me=be[0];(0,A.useEffect)(function(){me.setOptions(ge)},[ge]),Pn(function(){me.mount()},[]);var ue=(0,A.useState)(function(){return me.getFormState()}),Oe=ar(ue,2),Te=Oe[0],Me=Oe[1];Pn(function(){var Er=function(){return b&&b(me.getFormState())},cr=function(){return E&&E()},Tr=function(){return V&&V(me.getFormState().values)},nr=function(){return I&&I(me.getFormState().values)},kt=function(){return W&&W(me.getFormState().errors)};return me.on("change",Er),me.on("reset",cr),me.on("submit",Tr),me.on("value",nr),me.on("failure",kt),function(){me.removeListener("change",Er),me.removeListener("reset",cr),me.removeListener("submit",Tr),me.removeListener("value",nr),me.removeListener("failure",kt)}},[b,E,V,I,W]),(0,A.useState)(function(){var Er=function(){Qe("Setting form state"),Me(me.getFormState())};me.on("change",Er),h&&h(me.getFormApi()),g&&(g.current=me.getFormApi())});var Xe=(0,A.useState)(function(){return me.getFormApi()}),yt=ar(Xe,1),at=yt[0],fr=function(cr){return A.createElement(We,{formApi:at,formState:Te,formController:me},A.createElement(A.Fragment,null,cr||A.createElement(ve,{schema:_,onlyValidateSchema:ce})))};return{formApi:at,formState:Te,formController:me,render:fr,userProps:Ce}},bt=Yn("informed:Form "),$t=function(r){var i=r.children,a=r.render,o=r.component,f=sr(r,["children","render","component"]);bt("Render FORM");var d=Ke(f),v=d.formApi,h=d.formController,g=d.formState,b=d.render,E=d.userProps,V=function(){var W={formState:g,formApi:v};return o?A.createElement(o,W,i):a?a(W):typeof i=="function"?i(W):i};return b(A.createElement("form",ir({},E,{onReset:h.reset,onSubmit:h.submitForm,onKeyDown:h.keyDown}),V()))},wr=function(r,i){return ot(ot({},i),{},{getValue:function(o){return i.getValue("".concat(r,".").concat(o))},getTouched:function(o){return i.getTouched("".concat(r,".").concat(o))},getError:function(o){return i.getError("".concat(r,".").concat(o))},setValue:function(o,f){return i.setValue("".concat(r,".").concat(o),f)},setTouched:function(o,f){return i.setTouched("".concat(r,".").concat(o),f)},setError:function(o,f){return i.setError("".concat(r,".").concat(o),f)},getInitialValue:function(o){return i.getInitialValue("".concat(r,".").concat(o))},getFullField:function(o){return"".concat(i.getFullField(r),".").concat(o)}})},rr=function(r,i){var a=i.register,o=i.deregister,f=i.setValue,d=i.setTouched,v=i.setError,h=i.update,g=i.getField,b=i.expectRemoval,E=i.getInitialValue,V=i.fieldMap,I=i.getSavedValue;return{register:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return a.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},deregister:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return o.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},update:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return h.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setValue:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return f.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setTouched:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return d.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},setError:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return v.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},getField:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return g.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},expectRemoval:function(Y){for(var _=arguments.length,U=new Array(_>1?_-1:0),G=1;G<_;G++)U[G-1]=arguments[G];return b.apply(void 0,["".concat(r,".").concat(Y)].concat(U))},getInitialValue:function(Y){return E("".concat(r,".").concat(Y))},getSavedValue:function(Y){return I("".concat(r,".").concat(Y))},fieldMap:V}},Sn=function(r){var i=r.scope,a=r.children,o=useContext(yn),f=bn(),d=p(),v=useMemo(function(){return wr(i,f)},[i]),h=useMemo(function(){return rr(i,o)},[i]);return React.createElement(yn.Provider,{value:h},React.createElement(qa.Provider,{value:v},React.createElement(Ti.Provider,{value:d},a)))},fn=function(r){var i=p(),a={};Object.keys(r).length>0?Object.keys(r).forEach(function(I){a[I]=i[I]}):a=i;var o=a,f=o.pristine,d=o.dirty,v=o.invalid,h=o.values,g=o.errors,b=o.touched,E=o.validating,V=o.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:f,dirty:d,invalid:v,values:h,errors:g,touched:b,validating:E,submitting:V},null,2)))},vr=function(r){var i=r.initialStep,a=r.multistepApiRef,o=bn(),f=o.getValues,d=o.validate,v=o.screenValid,h=(0,A.useState)(new Map),g=ar(h,1),b=g[0],E=(0,A.useRef)(0),V=xn({current:i,steps:[],goal:null}),I=ar(V,3),W=I[0],Y=I[1],_=I[2],U=(0,A.useState)(function(){var ge=function(){var me=_(),ue=me.current,Oe=b.get(ue);return Oe},ke={getState:function(){return _()},getCurrentStep:ge,getStep:function(me){return b.get(me)},getNumberOfSteps:function(){return b.size},next:function(){if(d(),v()){var me=ge(),ue=me.getNext,Oe=ue(),Te=typeof Oe=="function"?Oe(f()):Oe;Te&&Y(function(Me){return ot(ot({},Me),{},{current:Te})})}},back:function(){var me=ge(),ue=me.getPrevious,Oe=ue(),Te=typeof Oe=="function"?Oe(f()):Oe;Te&&Y(function(Me){return ot(ot({},Me),{},{current:Te})})},setCurrent:function(me){if(me){var ue=b.get(me).index;ue<ge().index?Y(function(Oe){return ot(ot({},Oe),{},{current:me,goal:null})}):Y(function(Oe){return ot(ot({},Oe),{},{goal:me})})}},register:function(me,ue,Oe){Oe?(E.current=E.current+1,b.set(me,ot(ot({},ue),{},{index:E.current}))):Y(function(Te){return ot(ot({},Te),{},{steps:Array.from(b.keys())})})},deregister:function(me){b.delete(me),E.current=E.current-1,Y(function(ue){return ot(ot({},ue),{},{steps:Array.from(b.keys())})})}};return a&&(a.current=ke),ke}),G=ar(U,1),ce=G[0],Ce=function(ke){return A.createElement(El.Provider,{value:ce},A.createElement(Ol.Provider,{value:W},ke))};return ot(ot(ot({},ce),W),{},{render:Ce})};function tn(){return(0,A.useContext)(Ol)}function Ir(){return(0,A.useContext)(El)}var mr=function(r){var i=r.step,a=r.next,o=r.previous,f=r.relevant,d=p(),v=d.values,h=tn(),g=h.current,b=h.goal,E=Ir(),V=E.register,I=E.deregister,W=E.next,Y=i===g,_=f?f(v):!0,U=(0,A.useRef)(a),G=(0,A.useRef)(o),ce=(0,A.useRef)();U.current=a,G.current=o,ce.current=f,(0,A.useState)(function(){V(i,{name:i,getNext:function(){return U.current},getPrevious:function(){return G.current}},!0)}),(0,A.useEffect)(function(){return V(i,{name:i,getNext:function(){return U.current},getPrevious:function(){return G.current}}),function(){I(i)}},[i]),(0,A.useEffect)(function(){b&&Y&&b!==i&&W()},[b,Y]);var Ce=function(ke){return A.createElement(yf.Provider,{value:{relevant:function(me){return ce.current?ce.current(me):!0},multistep:!0}},Y&&_?ke:null)};return{isCurrent:Y,isRelevant:_,step:i,render:Ce}};function gr(e){var r=e.children,i=sr(e,["children"]),a=vr(i),o=a.render,f=sr(a,["render"]);return o(typeof r=="function"?r(f):r)}gr.Step=function(r){var i=r.children,a=sr(r,["children"]),o=mr(a),f=o.render;return f(i)};var ur=function(r){var i=r.field,a=useContext(yn),o=a.fieldMap,f=bn(),d=f.getFullField,v=f.getOptions,h=d(i),g=v(),b=g.schema,E=Pl(h),V=Je.get(b,E);if(!V)return null;var I=kl(i,V),W=I.props,Y=I.componentType,_=o[Y];return React.createElement(_,ir({field:i},W))},cn=function(){var r=bn(),i=r.getOptions,a=i(),o=a.schema;return React.createElement(ve,{schema:o})},Po=function(r){return React.forwardRef(function(i,a){return React.createElement(qa.Consumer,null,function(o){return React.createElement(r,ir({formApi:o,ref:a},i))})})},Sa=function(r){return React.forwardRef(function(i,a){return React.createElement(Ti.Consumer,null,function(o){return React.createElement(r,ir({formState:o,ref:a},i))})})},jr=function(r,i){return{getValue:function(){return r.getValue(i)},setValue:function(o){return r.setValue(i,o)},getTouched:function(){return r.getTouched(i)},setTouched:function(o){return r.setTouched(i,o)},getError:function(){return r.getError(i)},setError:function(o){return r.setError(i,o)},reset:function(){return r.resetField(i)},validate:function(){return r.validateField(i)},exists:function(){return r.fieldExists(i)},getDirty:function(){return r.getDirty(i)},getPristine:function(){return r.getPristine(i)},getFieldState:function(){return r.getField(i).fieldApi.getFieldState()}}};function Jn(e){var r=bn(),i=useMemo(function(){return jr(r,e)},[e]);return i}function Cr(e){var r=Jn(e),i=bn(),a=React.useState(),o=ar(a,2),f=o[1],d=React.useCallback(function(){return f({})},[]);return Pn(function(){var v=function(g){g===e&&d()};return i.emitter.on("field",v),function(){i.emitter.removeListener("field",v)}},[]),Pn(function(){d()},[]),r.getFieldState()||{}}var Lf=function(r){return function(i){return function(a){var o=Cr(r);return React.createElement(i,ir({fieldState:o},a))}}},zi=function(r){return function(i){return function(a){var o=Jn(r);return React.createElement(i,ir({fieldApi:o},a))}}},no=function(r){var i=r.value,a=r.forwardedRef,o=r.children,f=sr(r,["value","forwardedRef","children"]);return React.createElement("option",ir({ref:a,value:i,key:i},f),o)},io=null,Wr=c(81105),Fn=c(26225),Rl=Object.defineProperty,uv=Object.defineProperties,fv=Object.getOwnPropertyDescriptors,Gd=Object.getOwnPropertySymbols,cv=Object.prototype.hasOwnProperty,dv=Object.prototype.propertyIsEnumerable,$d=(e,r,i)=>r in e?Rl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Dl=(e,r)=>{for(var i in r||(r={}))cv.call(r,i)&&$d(e,i,r[i]);if(Gd)for(var i of Gd(r))dv.call(r,i)&&$d(e,i,r[i]);return e},pv=(e,r)=>uv(e,fv(r)),Mf=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const Kd="/oauth2-redirect.html";class ki{static authorizeImplicit({authorizationUrl:r,clientId:i,scopes:a,extraParams:o={},routingBasePath:f,redirectUri:d,successCallback:v,errorCallback:h}){const g=(0,Fn.p8)({date:new Date().toString()}),b=new URL(r),E=f==="/"?"":f,V=`${window.location.origin}${E}${Kd}`;b.searchParams.set("client_id",i),b.searchParams.set("redirect_uri",d||V),b.searchParams.set("response_type","token"),b.searchParams.set("state",g),Array.isArray(a)&&b.searchParams.set("scope",a.join(" "));for(const I in o)b.searchParams.set(I,o[I]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:r,clientId:i,scopes:a},state:g,successCallback:I=>{v(I),ki.clearRedirectData("implicit")},errorCallback:I=>{h(I),ki.clearRedirectData("implicit")}},window.open(b.toString())}static authorizeAuthorizationCode({authorizationUrl:r,tokenUrl:i,clientId:a,clientSecret:o,codeVerifier:f,codeChallenge:d,scopes:v,extraParams:h={},extraHeaders:g={},routingBasePath:b,redirectUri:E,successCallback:V,errorCallback:I}){const W=new URL(r),Y=b==="/"?"":b,_=`${window.location.origin}${Y}${Kd}`,U=(0,Fn.p8)({date:new Date().toString()});W.searchParams.set("client_id",a),W.searchParams.set("redirect_uri",E||_),W.searchParams.set("response_type","code"),W.searchParams.set("state",U),Array.isArray(v)&&W.searchParams.set("scope",v.join(" ")),d&&(W.searchParams.set("code_challenge",d),W.searchParams.set("code_challenge_method","S256"));for(const G in h)W.searchParams.set(G,h[G]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:a,scopes:v},state:U,successCallback:G=>Mf(this,[G],function*({auth_code:ce}){try{const Ce=yield fetch(i,{method:"POST",headers:Dl({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},g),body:Wr.stringify(Dl(pv(Dl({client_id:a,client_secret:o},f&&{code_verifier:f}),{code:ce,grant_type:"authorization_code",redirect_uri:E||_}),h))});yield Yd(Ce,V,I)}catch(Ce){I(Ce)}ki.clearRedirectData("authorizationCode")}),errorCallback:G=>{I(G),ki.clearRedirectData("authorizationCode")}},window.open(W.toString())}static clearRedirectData(r){window.redirectOAuth2={flow:r,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(r){return Mf(this,arguments,function*({tokenUrl:i,clientId:a,clientSecret:o,scopes:f=[],extraParams:d={},extraHeaders:v={},successCallback:h,errorCallback:g}){try{const b=JSON.parse(JSON.stringify(Dl({client_id:a,client_secret:o,grant_type:"client_credentials",scope:Array.isArray(f)&&f.length?f.join(" "):void 0},d))),E=yield fetch(i,{method:"POST",headers:Dl({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},v),body:Wr.stringify(b)});yield Yd(E,h,g)}catch(b){g(b)}})}}const i0=new ki;function Yd(e,r,i){return Mf(this,null,function*(){if(e.ok){const a=yield e.json();r(a)}else i(new Error((e.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield e.json()):yield e.text()))})}function Xd(e){return Mf(this,null,function*(){return(0,Fn.rS)(yield(0,Fn.JQ)(e))})}var Bl=c(95709),Ye=c(9612),hv=c(39012),vv=c(76951),gv=Object.defineProperty,mv=Object.defineProperties,yv=Object.getOwnPropertyDescriptors,Nf=Object.getOwnPropertySymbols,Jd=Object.prototype.hasOwnProperty,Qd=Object.prototype.propertyIsEnumerable,Zd=(e,r,i)=>r in e?gv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Rf=(e,r)=>{for(var i in r||(r={}))Jd.call(r,i)&&Zd(e,i,r[i]);if(Nf)for(var i of Nf(r))Qd.call(r,i)&&Zd(e,i,r[i]);return e},bv=(e,r)=>mv(e,yv(r)),xv=(e,r)=>{var i={};for(var a in e)Jd.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Nf)for(var a of Nf(e))r.indexOf(a)<0&&Qd.call(e,a)&&(i[a]=e[a]);return i};const qd=e=>(0,At.iv)`
|
|
159
|
+
border: var(--input-border);
|
|
160
|
+
outline: none;
|
|
161
|
+
padding: var(--input-padding);
|
|
162
|
+
border-radius: var(--input-border-radius);
|
|
163
|
+
background-color: var(--panel-${e}-input-background-color);
|
|
164
|
+
color: var(--input-text-color);
|
|
165
|
+
font-family: var(--input-font-family);
|
|
166
|
+
font-size: var(--input-font-size);
|
|
167
|
+
line-height: var(--input-line-height);
|
|
168
|
+
|
|
169
|
+
&::placeholder {
|
|
170
|
+
opacity: 0.6;
|
|
171
|
+
color: var(--input-placeholder-text-color);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&:hover {
|
|
175
|
+
color: var(--input-hover-text-color);
|
|
176
|
+
border: var(--input-hover-border);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:focus {
|
|
180
|
+
color: var(--input-focus-text-color);
|
|
181
|
+
border: var(--input-focus-border);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&:-webkit-autofill {
|
|
185
|
+
background-color: var(--panel-${e}-input-background-color);
|
|
186
|
+
}
|
|
187
|
+
`,ep=At.ZP.div`
|
|
188
|
+
display: ${({type:e})=>e==="hidden"?"none":"inline-block"};
|
|
189
|
+
${({fullWidth:e})=>e?"width: 100%;":""}
|
|
190
|
+
`,Sv=At.ZP.div`
|
|
191
|
+
position: relative;
|
|
192
|
+
`,wv=At.ZP.input`
|
|
193
|
+
${({panel:e})=>qd(e)}
|
|
194
|
+
${({inputType:e,inputActionButton:r})=>e==="password"||r?"padding-right: 40px;":""};
|
|
195
|
+
${({fullWidth:e})=>e?"width: 100%;":""}
|
|
196
|
+
`,tp=At.ZP.span`
|
|
197
|
+
position: absolute;
|
|
198
|
+
right: 0;
|
|
199
|
+
line-height: normal;
|
|
200
|
+
|
|
201
|
+
font-size: 0.8em;
|
|
202
|
+
padding: calc(8px / 0.8);
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
text-align: center;
|
|
205
|
+
color: var(--panel-samples-text-color);
|
|
206
|
+
`;function Cv(e,r){var i=e,{fullWidth:a,errorMessage:o,type:f,inputActionButton:d,panel:v="samples"}=i,h=xv(i,["fullWidth","errorMessage","type","inputActionButton","panel"]);const[g,b]=(0,A.useState)(f==="password"),E=(0,A.useCallback)(()=>{b(!g)},[g]);return A.createElement(ep,{fullWidth:a,type:f},A.createElement(Sv,null,A.createElement(wv,Rf({fullWidth:a,inputActionButton:d,type:g?"password":"text",inputType:f,ref:r,panel:v},h)),d?A.createElement(tp,{onClick:d.onClick},d.label):f==="password"?A.createElement(tp,{onClick:E},g?"show":"hide"):null),o?A.createElement(Ye.Xq,null,o):null)}const Vl=(0,A.forwardRef)(Cv);function In(e){const r=to(Rf({fieldType:"text"},e)),{userProps:i,render:a,fieldState:o}=r,f=r.informed;return a(A.createElement(Vl,bv(Rf(Rf({},i),f),{errorMessage:o.error})))}const jl=ci(({initValue:e,options:r,fieldApi:i,fieldState:a})=>{const o=r.map((g,b)=>({value:g.title||g.value,idx:b,origValue:g.value})),f=o.find(g=>g.origValue===e),[d,v]=(0,A.useState)(f?.value);(0,Jt.useMount)(()=>{e&&i.setValue(e)});const h=(0,A.useCallback)(g=>{i.setValue(o[g.idx].origValue),v(o[g.idx].value)},[i,o]);return A.createElement(ep,{fullWidth:!0},A.createElement(vv.Dropdown,{fullWidth:!0,variant:"dark",value:d,options:o,onChange:h}),a.error?A.createElement(Ye.Xq,null,a.error):null)});function Av({name:e,value:r,description:i,variableEnum:a,onChange:o,defaultValue:f}){const d=(0,A.useCallback)(g=>o(g.target.value),[o]),v=(0,A.useCallback)(g=>o(g.value),[o]),h=a?a.map((g,b)=>({value:g,idx:b})):[];return A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,e,":"),h&&h.length?A.createElement(mn.VD,{fullWidth:!0,variant:"dark",value:r,options:h,onChange:v}):A.createElement(Vl,{fullWidth:!0,value:r,onChange:d,placeholder:f,panel:"try-it"}),i&&A.createElement(Ov,{source:i}))}const Ov=(0,At.ZP)(hv.Markdown)`
|
|
144
207
|
margin-top: 5px;
|
|
145
208
|
color: #d0d0d0;
|
|
146
|
-
`;var
|
|
147
|
-
${(0,
|
|
148
|
-
- ${(0,
|
|
149
|
-
`})),
|
|
209
|
+
`;var Ev=Object.defineProperty,Tv=Object.defineProperties,kv=Object.getOwnPropertyDescriptors,rp=Object.getOwnPropertySymbols,Pv=Object.prototype.hasOwnProperty,Fv=Object.prototype.propertyIsEnumerable,np=(e,r,i)=>r in e?Ev(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,ip=(e,r)=>{for(var i in r||(r={}))Pv.call(r,i)&&np(e,i,r[i]);if(rp)for(var i of rp(r))Fv.call(r,i)&&np(e,i,r[i]);return e},ap=(e,r)=>Tv(e,kv(r));function Iv({operation:e,onChange:r}){const{events:i}=(0,ui.useRecoilValue)(Hi.lk),{servers:a}=e,o=(0,dt.YQ)("serverUrl"),f=a.findIndex(W=>W.url===o),[d,v]=(0,A.useState)(f<0?0:f),[h,g]=(0,A.useState)({});(0,Jt.useMount)(()=>{const W=(0,xt.fz)(a,d);r(W),g(W.variables)});const b=({serverUrl:W=""})=>{var Y;const _=a.find(Ce=>Ce.url===W),U=a.findIndex(Ce=>Ce.url===W),G=(0,xt.mj)(_);r({url:W,variables:G}),(0,dt.WW)("serverUrl",W),v(U),g(G);const ce=(0,Sr.Ze)({operation:e,serverUrl:W});(Y=i.targetServerSwitch)==null||Y.call(i,ce)},E=(W,Y)=>{const _=a[d],U=Y||Y===""?Y:(0,xt.mj)(_)[W],G=ap(ip({},h),{[W]:U});g(G),(0,xt.UY)(W,U),r(ap(ip({},_),{variables:G}))},V=a.map((W,Y)=>({idx:Y,serverUrl:W.url,value:`
|
|
210
|
+
${(0,xt.nq)((0,xt.v5)(W.url,h),W.variables)}
|
|
211
|
+
- ${(0,dt.bG)(W.description)||"Default"}
|
|
212
|
+
`})),I=Object.keys(h);return A.createElement(Mv,{"data-cy":"console-target-server"},A.createElement(Ye.lX,{htmlFor:"server"},"Target server: "),A.createElement(Ye.NI,null,A.createElement(mn.VD,{variant:"dark",value:V[d].value,options:V,fullWidth:!0,onChange:b})),I?.map(W=>{var Y;const _=(Y=a[d].variables)==null?void 0:Y[W];if(_)return A.createElement(Av,{key:W,name:W,value:h[W],defaultValue:_.default,onChange:U=>E(W,U),variableEnum:_.enum,description:_.description})}))}const Lv=(0,A.memo)(Iv),Mv=At.ZP.div`
|
|
150
213
|
margin-bottom: 20px;
|
|
151
|
-
`;var
|
|
152
|
-
${
|
|
214
|
+
`;var op=c(86220),Nv=Object.defineProperty,Rv=Object.defineProperties,Dv=Object.getOwnPropertyDescriptors,Df=Object.getOwnPropertySymbols,sp=Object.prototype.hasOwnProperty,lp=Object.prototype.propertyIsEnumerable,up=(e,r,i)=>r in e?Nv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Bv=(e,r)=>{for(var i in r||(r={}))sp.call(r,i)&&up(e,i,r[i]);if(Df)for(var i of Df(r))lp.call(r,i)&&up(e,i,r[i]);return e},Vv=(e,r)=>Rv(e,Dv(r)),jv=(e,r)=>{var i={};for(var a in e)sp.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Df)for(var a of Df(e))r.indexOf(a)<0&&lp.call(e,a)&&(i[a]=e[a]);return i};function ud(e){var r=e,{header:i,error:a,success:o}=r,f=jv(r,["header","error","success"]);const d=({toggle:v,expanded:h=!1})=>A.createElement(Jt.PanelHeader,{onClick:v,expanded:h,"data-cy":f["data-cy"]},A.createElement(ca.xz,null,A.createElement(Jt.PanelHeaderTitle,null,i),A.createElement(Jt.ShelfIcon,{direction:h?"down":"right"})),a&&A.createElement(op.CrossIcon,{size:"14px",color:"--color-error-500"})||null,o&&A.createElement(op.LockIcon,{size:"14px",color:"--color-success-500"})||null);return A.createElement(Wv,Vv(Bv({className:"panel-try-it-nested"},f),{header:d}))}const Wv=(0,At.ZP)(Jt.Panel)`
|
|
215
|
+
${Jt.PanelHeader} {
|
|
153
216
|
border: 1px solid
|
|
154
|
-
${({error:
|
|
217
|
+
${({error:e})=>e?"var(--color-error-300)":"var(--panel-try-it-nested-heading-border-color)"};
|
|
155
218
|
padding: 10px;
|
|
156
219
|
}
|
|
157
220
|
|
|
158
|
-
${
|
|
221
|
+
${Jt.PanelBody} {
|
|
159
222
|
border: 1px solid
|
|
160
|
-
${({error:
|
|
223
|
+
${({error:e})=>e?"var(--color-error-300)":"var(--panel-try-it-nested-body-border-color)"};
|
|
161
224
|
border-top: 0;
|
|
162
225
|
}
|
|
163
|
-
`;var
|
|
226
|
+
`;var Hv=c(4296),Uv=c(62701),_v=c(18373);const zv=(0,At.ZP)(Ja.A3)`
|
|
164
227
|
border-radius: var(--panel-border-radius);
|
|
165
228
|
margin-bottom: 10px;
|
|
166
|
-
`;var
|
|
229
|
+
`;var Bf=c(42112),fd=c(34716),Gv=c(43507),$v=Object.defineProperty,Vf=Object.getOwnPropertySymbols,fp=Object.prototype.hasOwnProperty,cp=Object.prototype.propertyIsEnumerable,dp=(e,r,i)=>r in e?$v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Kv=(e,r)=>{for(var i in r||(r={}))fp.call(r,i)&&dp(e,i,r[i]);if(Vf)for(var i of Vf(r))cp.call(r,i)&&dp(e,i,r[i]);return e},pp=(e,r)=>{var i={};for(var a in e)fp.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&Vf)for(var a of Vf(e))r.indexOf(a)<0&&cp.call(e,a)&&(i[a]=e[a]);return i},Yv=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});const hp=(0,A.forwardRef)((e,r)=>{var i=pp(e,[]);const a=i,{schema:o,contentName:f,onChange:d,name:v}=a,h=pp(a,["schema","contentName","onChange","name"]),{render:g}=to(Kv({field:v},h)),b=E=>Yv(void 0,null,function*(){const V=yield ef(E.target.files,o);d(f,V)});return g(A.createElement("input",{"data-cy":"file-upload-input",type:"file",id:i.id,className:i.className,name:i.name,onChange:b,multiple:i.multiple,accept:i.accept,ref:r}))});hp.displayName="FileUpload";var cd=c(5489);function Xv({mediaType:e,onChange:r,formApi:i}){var a;const o=e.examples||{},{exampleKey:f}=(0,fd.C6)(e.operation,o),d=(a=o[f])==null?void 0:a.rawValue,v=Qv(e);(0,A.useEffect)(()=>i&&v.forEach(g=>{var b,E;const V=d?.[g.name],I=(E=(b=g.example)!=null?b:V?.example)!=null?E:V,W=typeof I=="object"?JSON.stringify(I):I;I!==void 0&&i.setValue("body."+g.name,`${W}`)}),[f]);const h=e.schema||{};return ds(h,e.name)?A.createElement(vp,null,A.createElement(Ye.NI,null,A.createElement(gp,{fullWidth:!0,id:`body.${e.name}`,name:`body.${e.name}`,accept:cs(e.name),schema:h,contentName:e.name,onChange:r}))):h.type!==$n.DefinitionTypes.OBJECT&&!v?(console.warn(`Invalid schema for request body and mime type: "${e.name}"`,h),null):A.createElement(vp,null,v.map(g=>{const b=g.schema||{contentMediaType:"",type:"",description:""},E=e.name===Bf.Tr.MULTIPART&&Zu(b),V=b.contentMediaType||"",I=E?A.createElement(gp,{fullWidth:!0,id:"body."+g.name,name:"body."+g.name,accept:cs(V),multiple:b.type==="array",schema:b,contentName:g.name,onChange:r}):A.createElement(In,{fullWidth:!0,id:"body."+g.name,field:"body."+g.name,placeholder:(0,dt.bG)(b.description)||g.name,panel:"try-it"});return A.createElement(Ye.NI,{key:g.name},A.createElement(Ye.lX,null,g.name,":"),I)}))}const Jv=(0,A.memo)(Xv);function Qv(e){var r,i,a,o;const{activeOneOf:f}=(0,Gv.$l)((0,cd.N)(e.operation.pointer));return((i=(r=e.schema)==null?void 0:r.oneOf)!=null&&i.length?((a=e.schema)==null?void 0:a.oneOf[f].fields)||[]:((o=e.schema)==null?void 0:o.fields)||[]).filter(d=>!d.schema.readOnly)}const vp=At.ZP.div`
|
|
167
230
|
> div {
|
|
168
231
|
margin-top: 10px;
|
|
169
232
|
}
|
|
170
|
-
`,
|
|
171
|
-
${(
|
|
172
|
-
${({inputType:
|
|
173
|
-
${({fullWidth:
|
|
174
|
-
`;var
|
|
175
|
-
`;break;case 114:
|
|
176
|
-
`),
|
|
233
|
+
`,gp=(0,At.ZP)(hp)`
|
|
234
|
+
${qd("try-it")};
|
|
235
|
+
${({inputType:e})=>e==="password"?"padding-right: 40px;":""};
|
|
236
|
+
${({fullWidth:e})=>e?"width: 100%;":""}
|
|
237
|
+
`;var Zv=c(99913);function jf(e,r){r===void 0&&(r=!1);var i=e.length,a=0,o="",f=0,d=16,v=0,h=0,g=0,b=0,E=0;function V(ce,Ce){for(var ge=0,ke=0;ge<ce||!Ce;){var be=e.charCodeAt(a);if(be>=48&&be<=57)ke=ke*16+be-48;else if(be>=65&&be<=70)ke=ke*16+be-65+10;else if(be>=97&&be<=102)ke=ke*16+be-97+10;else break;a++,ge++}return ge<ce&&(ke=-1),ke}function I(ce){a=ce,o="",f=0,d=16,E=0}function W(){var ce=a;if(e.charCodeAt(a)===48)a++;else for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;if(a<e.length&&e.charCodeAt(a)===46)if(a++,a<e.length&&ks(e.charCodeAt(a)))for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;else return E=3,e.substring(ce,a);var Ce=a;if(a<e.length&&(e.charCodeAt(a)===69||e.charCodeAt(a)===101))if(a++,(a<e.length&&e.charCodeAt(a)===43||e.charCodeAt(a)===45)&&a++,a<e.length&&ks(e.charCodeAt(a))){for(a++;a<e.length&&ks(e.charCodeAt(a));)a++;Ce=a}else E=3;return e.substring(ce,Ce)}function Y(){for(var ce="",Ce=a;;){if(a>=i){ce+=e.substring(Ce,a),E=2;break}var ge=e.charCodeAt(a);if(ge===34){ce+=e.substring(Ce,a),a++;break}if(ge===92){if(ce+=e.substring(Ce,a),a++,a>=i){E=2;break}var ke=e.charCodeAt(a++);switch(ke){case 34:ce+='"';break;case 92:ce+="\\";break;case 47:ce+="/";break;case 98:ce+="\b";break;case 102:ce+="\f";break;case 110:ce+=`
|
|
238
|
+
`;break;case 114:ce+="\r";break;case 116:ce+=" ";break;case 117:var be=V(4,!0);be>=0?ce+=String.fromCharCode(be):E=4;break;default:E=5}Ce=a;continue}if(ge>=0&&ge<=31)if(Wl(ge)){ce+=e.substring(Ce,a),E=2;break}else E=6;a++}return ce}function _(){if(o="",E=0,f=a,h=v,b=g,a>=i)return f=i,d=17;var ce=e.charCodeAt(a);if(dd(ce)){do a++,o+=String.fromCharCode(ce),ce=e.charCodeAt(a);while(dd(ce));return d=15}if(Wl(ce))return a++,o+=String.fromCharCode(ce),ce===13&&e.charCodeAt(a)===10&&(a++,o+=`
|
|
239
|
+
`),v++,g=a,d=14;switch(ce){case 123:return a++,d=1;case 125:return a++,d=2;case 91:return a++,d=3;case 93:return a++,d=4;case 58:return a++,d=6;case 44:return a++,d=5;case 34:return a++,o=Y(),d=10;case 47:var Ce=a-1;if(e.charCodeAt(a+1)===47){for(a+=2;a<i&&!Wl(e.charCodeAt(a));)a++;return o=e.substring(Ce,a),d=12}if(e.charCodeAt(a+1)===42){a+=2;for(var ge=i-1,ke=!1;a<ge;){var be=e.charCodeAt(a);if(be===42&&e.charCodeAt(a+1)===47){a+=2,ke=!0;break}a++,Wl(be)&&(be===13&&e.charCodeAt(a)===10&&a++,v++,g=a)}return ke||(a++,E=1),o=e.substring(Ce,a),d=13}return o+=String.fromCharCode(ce),a++,d=16;case 45:if(o+=String.fromCharCode(ce),a++,a===i||!ks(e.charCodeAt(a)))return d=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=W(),d=11;default:for(;a<i&&U(ce);)a++,ce=e.charCodeAt(a);if(f!==a){switch(o=e.substring(f,a),o){case"true":return d=8;case"false":return d=9;case"null":return d=7}return d=16}return o+=String.fromCharCode(ce),a++,d=16}}function U(ce){if(dd(ce)||Wl(ce))return!1;switch(ce){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function G(){var ce;do ce=_();while(ce>=12&&ce<=15);return ce}return{setPosition:I,getPosition:function(){return a},scan:r?G:_,getToken:function(){return d},getTokenValue:function(){return o},getTokenOffset:function(){return f},getTokenLength:function(){return a-f},getTokenStartLine:function(){return h},getTokenStartCharacter:function(){return f-b},getTokenError:function(){return E}}}function dd(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function Wl(e){return e===10||e===13||e===8232||e===8233}function ks(e){return e>=48&&e<=57}function qv(e,r,i){var a,o,f,d,v;if(r){for(d=r.offset,v=d+r.length,f=d;f>0&&!mp(e,f-1);)f--;for(var h=v;h<e.length&&!mp(e,h);)h++;o=e.substring(f,h),a=eg(o,i)}else o=e,a=0,f=0,d=0,v=e.length;var g=tg(i,e),b=!1,E=0,V;i.insertSpaces?V=pd(" ",i.tabSize||4):V=" ";var I=jf(o,!1),W=!1;function Y(){return g+pd(V,a+E)}function _(){var Te=I.scan();for(b=!1;Te===15||Te===14;)b=b||Te===14,Te=I.scan();return W=Te===16||I.getTokenError()!==0,Te}var U=[];function G(Te,Me,Xe){!W&&Me<v&&Xe>d&&e.substring(Me,Xe)!==Te&&U.push({offset:Me,length:Xe-Me,content:Te})}var ce=_();if(ce!==17){var Ce=I.getTokenOffset()+f,ge=pd(V,a);G(ge,f,Ce)}for(;ce!==17;){for(var ke=I.getTokenOffset()+I.getTokenLength()+f,be=_(),me="";!b&&(be===12||be===13);){var ue=I.getTokenOffset()+f;G(" ",ke,ue),ke=I.getTokenOffset()+I.getTokenLength()+f,me=be===12?Y():"",be=_()}if(be===2)ce!==1&&(E--,me=Y());else if(be===4)ce!==3&&(E--,me=Y());else{switch(ce){case 3:case 1:E++,me=Y();break;case 5:case 12:me=Y();break;case 13:b?me=Y():me=" ";break;case 6:me=" ";break;case 10:if(be===6){me="";break}case 7:case 8:case 9:case 11:case 2:case 4:be===12||be===13?me=" ":be!==5&&be!==17&&(W=!0);break;case 16:W=!0;break}b&&(be===12||be===13)&&(me=Y())}var Oe=I.getTokenOffset()+f;G(me,ke,Oe),ce=be}return U}function pd(e,r){for(var i="",a=0;a<r;a++)i+=e;return i}function eg(e,r){for(var i=0,a=0,o=r.tabSize||4;i<e.length;){var f=e.charAt(i);if(f===" ")a++;else if(f===" ")a+=o;else break;i++}return Math.floor(a/o)}function tg(e,r){for(var i=0;i<r.length;i++){var a=r.charAt(i);if(a==="\r")return i+1<r.length&&r.charAt(i+1)===`
|
|
177
240
|
`?`\r
|
|
178
|
-
`:"\r";if(
|
|
241
|
+
`:"\r";if(a===`
|
|
179
242
|
`)return`
|
|
180
|
-
`}return
|
|
181
|
-
`}function
|
|
182
|
-
`.indexOf(
|
|
183
|
-
`.indexOf(t.charAt(n))!==-1}var Ht=ji,vc=Gs,Jf=Tu,gc=Pu,Ys=Lu,e=Va,r=za,a=_a,o=qo,l=It;function d(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function g(t,n,i){return $t(t,n,i)}function b(t,n,i,s){return edit.setProperty(t,n,i,s)}function w(t,n){for(var i=n.length-1;i>=0;i--)t=edit.applyEdit(t,n[i]);return t}function k(t,n){if(t===n)return!0;if(t==null||n===null||n===void 0||typeof t!=typeof n||typeof t!="object"||Array.isArray(t)!==Array.isArray(n))return!1;var i,s;if(Array.isArray(t)){if(t.length!==n.length)return!1;for(i=0;i<t.length;i++)if(!k(t[i],n[i]))return!1}else{var u=[];for(s in t)u.push(s);u.sort();var c=[];for(s in n)c.push(s);if(c.sort(),!k(u,c))return!1;for(i=0;i<u.length;i++)if(!k(t[u[i]],n[u[i]]))return!1}return!0}function H(t){return typeof t=="number"}function X(t){return typeof t<"u"}function de(t){return typeof t=="boolean"}function ue(t){return typeof t=="string"}var xe;(function(t){function n(i){return typeof i=="string"}t.is=n})(xe||(xe={}));var Ce;(function(t){function n(i){return typeof i=="string"}t.is=n})(Ce||(Ce={}));var Ie;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&t.MIN_VALUE<=i&&i<=t.MAX_VALUE}t.is=n})(Ie||(Ie={}));var De;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&t.MIN_VALUE<=i&&i<=t.MAX_VALUE}t.is=n})(De||(De={}));var Ne;(function(t){function n(s,u){return s===Number.MAX_VALUE&&(s=De.MAX_VALUE),u===Number.MAX_VALUE&&(u=De.MAX_VALUE),{line:s,character:u}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&me.uinteger(u.line)&&me.uinteger(u.character)}t.is=i})(Ne||(Ne={}));var Oe;(function(t){function n(s,u,c,h){if(me.uinteger(s)&&me.uinteger(u)&&me.uinteger(c)&&me.uinteger(h))return{start:Ne.create(s,u),end:Ne.create(c,h)};if(Ne.is(s)&&Ne.is(u))return{start:s,end:u};throw new Error("Range#create called with invalid arguments[".concat(s,", ").concat(u,", ").concat(c,", ").concat(h,"]"))}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&Ne.is(u.start)&&Ne.is(u.end)}t.is=i})(Oe||(Oe={}));var Re;(function(t){function n(s,u){return{uri:s,range:u}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&Oe.is(u.range)&&(me.string(u.uri)||me.undefined(u.uri))}t.is=i})(Re||(Re={}));var Ye;(function(t){function n(s,u,c,h){return{targetUri:s,targetRange:u,targetSelectionRange:c,originSelectionRange:h}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&Oe.is(u.targetRange)&&me.string(u.targetUri)&&Oe.is(u.targetSelectionRange)&&(Oe.is(u.originSelectionRange)||me.undefined(u.originSelectionRange))}t.is=i})(Ye||(Ye={}));var Ke;(function(t){function n(s,u,c,h){return{red:s,green:u,blue:c,alpha:h}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&me.numberRange(u.red,0,1)&&me.numberRange(u.green,0,1)&&me.numberRange(u.blue,0,1)&&me.numberRange(u.alpha,0,1)}t.is=i})(Ke||(Ke={}));var pt;(function(t){function n(s,u){return{range:s,color:u}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&Oe.is(u.range)&&Ke.is(u.color)}t.is=i})(pt||(pt={}));var Bt;(function(t){function n(s,u,c){return{label:s,textEdit:u,additionalTextEdits:c}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&me.string(u.label)&&(me.undefined(u.textEdit)||kt.is(u))&&(me.undefined(u.additionalTextEdits)||me.typedArray(u.additionalTextEdits,kt.is))}t.is=i})(Bt||(Bt={}));var Zt;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Zt||(Zt={}));var Gt;(function(t){function n(s,u,c,h,m,p){var y={startLine:s,endLine:u};return me.defined(c)&&(y.startCharacter=c),me.defined(h)&&(y.endCharacter=h),me.defined(m)&&(y.kind=m),me.defined(p)&&(y.collapsedText=p),y}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&me.uinteger(u.startLine)&&me.uinteger(u.startLine)&&(me.undefined(u.startCharacter)||me.uinteger(u.startCharacter))&&(me.undefined(u.endCharacter)||me.uinteger(u.endCharacter))&&(me.undefined(u.kind)||me.string(u.kind))}t.is=i})(Gt||(Gt={}));var Tr;(function(t){function n(s,u){return{location:s,message:u}}t.create=n;function i(s){var u=s;return me.defined(u)&&Re.is(u.location)&&me.string(u.message)}t.is=i})(Tr||(Tr={}));var Je;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Je||(Je={}));var tr;(function(t){t.Unnecessary=1,t.Deprecated=2})(tr||(tr={}));var Pr;(function(t){function n(i){var s=i;return me.objectLiteral(s)&&me.string(s.href)}t.is=n})(Pr||(Pr={}));var zt;(function(t){function n(s,u,c,h,m,p){var y={range:s,message:u};return me.defined(c)&&(y.severity=c),me.defined(h)&&(y.code=h),me.defined(m)&&(y.source=m),me.defined(p)&&(y.relatedInformation=p),y}t.create=n;function i(s){var u,c=s;return me.defined(c)&&Oe.is(c.range)&&me.string(c.message)&&(me.number(c.severity)||me.undefined(c.severity))&&(me.integer(c.code)||me.string(c.code)||me.undefined(c.code))&&(me.undefined(c.codeDescription)||me.string((u=c.codeDescription)===null||u===void 0?void 0:u.href))&&(me.string(c.source)||me.undefined(c.source))&&(me.undefined(c.relatedInformation)||me.typedArray(c.relatedInformation,Tr.is))}t.is=i})(zt||(zt={}));var Kt;(function(t){function n(s,u){for(var c=[],h=2;h<arguments.length;h++)c[h-2]=arguments[h];var m={title:s,command:u};return me.defined(c)&&c.length>0&&(m.arguments=c),m}t.create=n;function i(s){var u=s;return me.defined(u)&&me.string(u.title)&&me.string(u.command)}t.is=i})(Kt||(Kt={}));var kt;(function(t){function n(c,h){return{range:c,newText:h}}t.replace=n;function i(c,h){return{range:{start:c,end:c},newText:h}}t.insert=i;function s(c){return{range:c,newText:""}}t.del=s;function u(c){var h=c;return me.objectLiteral(h)&&me.string(h.newText)&&Oe.is(h.range)}t.is=u})(kt||(kt={}));var jt;(function(t){function n(s,u,c){var h={label:s};return u!==void 0&&(h.needsConfirmation=u),c!==void 0&&(h.description=c),h}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&me.string(u.label)&&(me.boolean(u.needsConfirmation)||u.needsConfirmation===void 0)&&(me.string(u.description)||u.description===void 0)}t.is=i})(jt||(jt={}));var Mt;(function(t){function n(i){var s=i;return me.string(s)}t.is=n})(Mt||(Mt={}));var Zr;(function(t){function n(c,h,m){return{range:c,newText:h,annotationId:m}}t.replace=n;function i(c,h,m){return{range:{start:c,end:c},newText:h,annotationId:m}}t.insert=i;function s(c,h){return{range:c,newText:"",annotationId:h}}t.del=s;function u(c){var h=c;return kt.is(h)&&(jt.is(h.annotationId)||Mt.is(h.annotationId))}t.is=u})(Zr||(Zr={}));var An;(function(t){function n(s,u){return{textDocument:s,edits:u}}t.create=n;function i(s){var u=s;return me.defined(u)&&Co.is(u.textDocument)&&Array.isArray(u.edits)}t.is=i})(An||(An={}));var or;(function(t){function n(s,u,c){var h={kind:"create",uri:s};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(h.options=u),c!==void 0&&(h.annotationId=c),h}t.create=n;function i(s){var u=s;return u&&u.kind==="create"&&me.string(u.uri)&&(u.options===void 0||(u.options.overwrite===void 0||me.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||me.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||Mt.is(u.annotationId))}t.is=i})(or||(or={}));var Vr;(function(t){function n(s,u,c,h){var m={kind:"rename",oldUri:s,newUri:u};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(m.options=c),h!==void 0&&(m.annotationId=h),m}t.create=n;function i(s){var u=s;return u&&u.kind==="rename"&&me.string(u.oldUri)&&me.string(u.newUri)&&(u.options===void 0||(u.options.overwrite===void 0||me.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||me.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||Mt.is(u.annotationId))}t.is=i})(Vr||(Vr={}));var qt;(function(t){function n(s,u,c){var h={kind:"delete",uri:s};return u!==void 0&&(u.recursive!==void 0||u.ignoreIfNotExists!==void 0)&&(h.options=u),c!==void 0&&(h.annotationId=c),h}t.create=n;function i(s){var u=s;return u&&u.kind==="delete"&&me.string(u.uri)&&(u.options===void 0||(u.options.recursive===void 0||me.boolean(u.options.recursive))&&(u.options.ignoreIfNotExists===void 0||me.boolean(u.options.ignoreIfNotExists)))&&(u.annotationId===void 0||Mt.is(u.annotationId))}t.is=i})(qt||(qt={}));var ta;(function(t){function n(i){var s=i;return s&&(s.changes!==void 0||s.documentChanges!==void 0)&&(s.documentChanges===void 0||s.documentChanges.every(function(u){return me.string(u.kind)?or.is(u)||Vr.is(u)||qt.is(u):An.is(u)}))}t.is=n})(ta||(ta={}));var fn=function(){function t(n,i){this.edits=n,this.changeAnnotations=i}return t.prototype.insert=function(n,i,s){var u,c;if(s===void 0?u=kt.insert(n,i):Mt.is(s)?(c=s,u=Zr.insert(n,i,s)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(s),u=Zr.insert(n,i,c)),this.edits.push(u),c!==void 0)return c},t.prototype.replace=function(n,i,s){var u,c;if(s===void 0?u=kt.replace(n,i):Mt.is(s)?(c=s,u=Zr.replace(n,i,s)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(s),u=Zr.replace(n,i,c)),this.edits.push(u),c!==void 0)return c},t.prototype.delete=function(n,i){var s,u;if(i===void 0?s=kt.del(n):Mt.is(i)?(u=i,s=Zr.del(n,i)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(i),s=Zr.del(n,u)),this.edits.push(s),u!==void 0)return u},t.prototype.add=function(n){this.edits.push(n)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(n){if(n===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),ci=function(){function t(n){this._annotations=n===void 0?Object.create(null):n,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(n,i){var s;if(Mt.is(n)?s=n:(s=this.nextId(),i=n),this._annotations[s]!==void 0)throw new Error("Id ".concat(s," is already in use."));if(i===void 0)throw new Error("No annotation provided for id ".concat(s));return this._annotations[s]=i,this._size++,s},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),wo=function(){function t(n){var i=this;this._textEditChanges=Object.create(null),n!==void 0?(this._workspaceEdit=n,n.documentChanges?(this._changeAnnotations=new ci(n.changeAnnotations),n.changeAnnotations=this._changeAnnotations.all(),n.documentChanges.forEach(function(s){if(An.is(s)){var u=new fn(s.edits,i._changeAnnotations);i._textEditChanges[s.textDocument.uri]=u}})):n.changes&&Object.keys(n.changes).forEach(function(s){var u=new fn(n.changes[s]);i._textEditChanges[s]=u})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(n){if(Co.is(n)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:n.uri,version:n.version},s=this._textEditChanges[i.uri];if(!s){var u=[],c={textDocument:i,edits:u};this._workspaceEdit.documentChanges.push(c),s=new fn(u,this._changeAnnotations),this._textEditChanges[i.uri]=s}return s}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var s=this._textEditChanges[n];if(!s){var u=[];this._workspaceEdit.changes[n]=u,s=new fn(u),this._textEditChanges[n]=s}return s}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ci,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(n,i,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u;jt.is(i)||Mt.is(i)?u=i:s=i;var c,h;if(u===void 0?c=or.create(n,s):(h=Mt.is(u)?u:this._changeAnnotations.manage(u),c=or.create(n,s,h)),this._workspaceEdit.documentChanges.push(c),h!==void 0)return h},t.prototype.renameFile=function(n,i,s,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var c;jt.is(s)||Mt.is(s)?c=s:u=s;var h,m;if(c===void 0?h=Vr.create(n,i,u):(m=Mt.is(c)?c:this._changeAnnotations.manage(c),h=Vr.create(n,i,u,m)),this._workspaceEdit.documentChanges.push(h),m!==void 0)return m},t.prototype.deleteFile=function(n,i,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u;jt.is(i)||Mt.is(i)?u=i:s=i;var c,h;if(u===void 0?c=qt.create(n,s):(h=Mt.is(u)?u:this._changeAnnotations.manage(u),c=qt.create(n,s,h)),this._workspaceEdit.documentChanges.push(c),h!==void 0)return h},t}(),Sr;(function(t){function n(s){return{uri:s}}t.create=n;function i(s){var u=s;return me.defined(u)&&me.string(u.uri)}t.is=i})(Sr||(Sr={}));var Hi;(function(t){function n(s,u){return{uri:s,version:u}}t.create=n;function i(s){var u=s;return me.defined(u)&&me.string(u.uri)&&me.integer(u.version)}t.is=i})(Hi||(Hi={}));var Co;(function(t){function n(s,u){return{uri:s,version:u}}t.create=n;function i(s){var u=s;return me.defined(u)&&me.string(u.uri)&&(u.version===null||me.integer(u.version))}t.is=i})(Co||(Co={}));var mc;(function(t){function n(s,u,c,h){return{uri:s,languageId:u,version:c,text:h}}t.create=n;function i(s){var u=s;return me.defined(u)&&me.string(u.uri)&&me.string(u.languageId)&&me.integer(u.version)&&me.string(u.text)}t.is=i})(mc||(mc={}));var ra;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function n(i){var s=i;return s===t.PlainText||s===t.Markdown}t.is=n})(ra||(ra={}));var Xs;(function(t){function n(i){var s=i;return me.objectLiteral(i)&&ra.is(s.kind)&&me.string(s.value)}t.is=n})(Xs||(Xs={}));var On;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(On||(On={}));var wr;(function(t){t.PlainText=1,t.Snippet=2})(wr||(wr={}));var yc;(function(t){t.Deprecated=1})(yc||(yc={}));var bc;(function(t){function n(s,u,c){return{newText:s,insert:u,replace:c}}t.create=n;function i(s){var u=s;return u&&me.string(u.newText)&&Oe.is(u.insert)&&Oe.is(u.replace)}t.is=i})(bc||(bc={}));var xc;(function(t){t.asIs=1,t.adjustIndentation=2})(xc||(xc={}));var Sc;(function(t){function n(i){var s=i;return s&&(me.string(s.detail)||s.detail===void 0)&&(me.string(s.description)||s.description===void 0)}t.is=n})(Sc||(Sc={}));var Qf;(function(t){function n(i){return{label:i}}t.create=n})(Qf||(Qf={}));var wc;(function(t){function n(i,s){return{items:i||[],isIncomplete:!!s}}t.create=n})(wc||(wc={}));var Iu;(function(t){function n(s){return s.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=n;function i(s){var u=s;return me.string(u)||me.objectLiteral(u)&&me.string(u.language)&&me.string(u.value)}t.is=i})(Iu||(Iu={}));var Cc;(function(t){function n(i){var s=i;return!!s&&me.objectLiteral(s)&&(Xs.is(s.contents)||Iu.is(s.contents)||me.typedArray(s.contents,Iu.is))&&(i.range===void 0||Oe.is(i.range))}t.is=n})(Cc||(Cc={}));var Ac;(function(t){function n(i,s){return s?{label:i,documentation:s}:{label:i}}t.create=n})(Ac||(Ac={}));var Oc;(function(t){function n(i,s){for(var u=[],c=2;c<arguments.length;c++)u[c-2]=arguments[c];var h={label:i};return me.defined(s)&&(h.documentation=s),me.defined(u)?h.parameters=u:h.parameters=[],h}t.create=n})(Oc||(Oc={}));var Ec;(function(t){t.Text=1,t.Read=2,t.Write=3})(Ec||(Ec={}));var kc;(function(t){function n(i,s){var u={range:i};return me.number(s)&&(u.kind=s),u}t.create=n})(kc||(kc={}));var di;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(di||(di={}));var Tc;(function(t){t.Deprecated=1})(Tc||(Tc={}));var Pc;(function(t){function n(i,s,u,c,h){var m={name:i,kind:s,location:{uri:c,range:u}};return h&&(m.containerName=h),m}t.create=n})(Pc||(Pc={}));var Lc;(function(t){function n(i,s,u,c){return c!==void 0?{name:i,kind:s,location:{uri:u,range:c}}:{name:i,kind:s,location:{uri:u}}}t.create=n})(Lc||(Lc={}));var Ic;(function(t){function n(s,u,c,h,m,p){var y={name:s,detail:u,kind:c,range:h,selectionRange:m};return p!==void 0&&(y.children=p),y}t.create=n;function i(s){var u=s;return u&&me.string(u.name)&&me.number(u.kind)&&Oe.is(u.range)&&Oe.is(u.selectionRange)&&(u.detail===void 0||me.string(u.detail))&&(u.deprecated===void 0||me.boolean(u.deprecated))&&(u.children===void 0||Array.isArray(u.children))&&(u.tags===void 0||Array.isArray(u.tags))}t.is=i})(Ic||(Ic={}));var Mc;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Mc||(Mc={}));var Mu;(function(t){t.Invoked=1,t.Automatic=2})(Mu||(Mu={}));var Nc;(function(t){function n(s,u,c){var h={diagnostics:s};return u!=null&&(h.only=u),c!=null&&(h.triggerKind=c),h}t.create=n;function i(s){var u=s;return me.defined(u)&&me.typedArray(u.diagnostics,zt.is)&&(u.only===void 0||me.typedArray(u.only,me.string))&&(u.triggerKind===void 0||u.triggerKind===Mu.Invoked||u.triggerKind===Mu.Automatic)}t.is=i})(Nc||(Nc={}));var Dc;(function(t){function n(s,u,c){var h={title:s},m=!0;return typeof u=="string"?(m=!1,h.kind=u):Kt.is(u)?h.command=u:h.edit=u,m&&c!==void 0&&(h.kind=c),h}t.create=n;function i(s){var u=s;return u&&me.string(u.title)&&(u.diagnostics===void 0||me.typedArray(u.diagnostics,zt.is))&&(u.kind===void 0||me.string(u.kind))&&(u.edit!==void 0||u.command!==void 0)&&(u.command===void 0||Kt.is(u.command))&&(u.isPreferred===void 0||me.boolean(u.isPreferred))&&(u.edit===void 0||ta.is(u.edit))}t.is=i})(Dc||(Dc={}));var Fc;(function(t){function n(s,u){var c={range:s};return me.defined(u)&&(c.data=u),c}t.create=n;function i(s){var u=s;return me.defined(u)&&Oe.is(u.range)&&(me.undefined(u.command)||Kt.is(u.command))}t.is=i})(Fc||(Fc={}));var Rc;(function(t){function n(s,u){return{tabSize:s,insertSpaces:u}}t.create=n;function i(s){var u=s;return me.defined(u)&&me.uinteger(u.tabSize)&&me.boolean(u.insertSpaces)}t.is=i})(Rc||(Rc={}));var Bc;(function(t){function n(s,u,c){return{range:s,target:u,data:c}}t.create=n;function i(s){var u=s;return me.defined(u)&&Oe.is(u.range)&&(me.undefined(u.target)||me.string(u.target))}t.is=i})(Bc||(Bc={}));var Nu;(function(t){function n(s,u){return{range:s,parent:u}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&Oe.is(u.range)&&(u.parent===void 0||t.is(u.parent))}t.is=i})(Nu||(Nu={}));var jc;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(jc||(jc={}));var Wc;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Wc||(Wc={}));var Hc;(function(t){function n(i){var s=i;return me.objectLiteral(s)&&(s.resultId===void 0||typeof s.resultId=="string")&&Array.isArray(s.data)&&(s.data.length===0||typeof s.data[0]=="number")}t.is=n})(Hc||(Hc={}));var Uc;(function(t){function n(s,u){return{range:s,text:u}}t.create=n;function i(s){var u=s;return u!=null&&Oe.is(u.range)&&me.string(u.text)}t.is=i})(Uc||(Uc={}));var zc;(function(t){function n(s,u,c){return{range:s,variableName:u,caseSensitiveLookup:c}}t.create=n;function i(s){var u=s;return u!=null&&Oe.is(u.range)&&me.boolean(u.caseSensitiveLookup)&&(me.string(u.variableName)||u.variableName===void 0)}t.is=i})(zc||(zc={}));var _c;(function(t){function n(s,u){return{range:s,expression:u}}t.create=n;function i(s){var u=s;return u!=null&&Oe.is(u.range)&&(me.string(u.expression)||u.expression===void 0)}t.is=i})(_c||(_c={}));var Vc;(function(t){function n(s,u){return{frameId:s,stoppedLocation:u}}t.create=n;function i(s){var u=s;return me.defined(u)&&Oe.is(s.stoppedLocation)}t.is=i})(Vc||(Vc={}));var Zf;(function(t){t.Type=1,t.Parameter=2;function n(i){return i===1||i===2}t.is=n})(Zf||(Zf={}));var qf;(function(t){function n(s){return{value:s}}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&(u.tooltip===void 0||me.string(u.tooltip)||Xs.is(u.tooltip))&&(u.location===void 0||Re.is(u.location))&&(u.command===void 0||Kt.is(u.command))}t.is=i})(qf||(qf={}));var $c;(function(t){function n(s,u,c){var h={position:s,label:u};return c!==void 0&&(h.kind=c),h}t.create=n;function i(s){var u=s;return me.objectLiteral(u)&&Ne.is(u.position)&&(me.string(u.label)||me.typedArray(u.label,qf.is))&&(u.kind===void 0||Zf.is(u.kind))&&u.textEdits===void 0||me.typedArray(u.textEdits,kt.is)&&(u.tooltip===void 0||me.string(u.tooltip)||Xs.is(u.tooltip))&&(u.paddingLeft===void 0||me.boolean(u.paddingLeft))&&(u.paddingRight===void 0||me.boolean(u.paddingRight))}t.is=i})($c||($c={}));var Gc;(function(t){function n(i){var s=i;return me.objectLiteral(s)&&Ce.is(s.uri)&&me.string(s.name)}t.is=n})(Gc||(Gc={}));var bv=null,Kc;(function(t){function n(c,h,m,p){return new zd(c,h,m,p)}t.create=n;function i(c){var h=c;return!!(me.defined(h)&&me.string(h.uri)&&(me.undefined(h.languageId)||me.string(h.languageId))&&me.uinteger(h.lineCount)&&me.func(h.getText)&&me.func(h.positionAt)&&me.func(h.offsetAt))}t.is=i;function s(c,h){for(var m=c.getText(),p=u(h,function($,ae){var le=$.range.start.line-ae.range.start.line;return le===0?$.range.start.character-ae.range.start.character:le}),y=m.length,E=p.length-1;E>=0;E--){var I=p[E],Q=c.offsetAt(I.range.start),W=c.offsetAt(I.range.end);if(W<=y)m=m.substring(0,Q)+I.newText+m.substring(W,m.length);else throw new Error("Overlapping edit");y=Q}return m}t.applyEdits=s;function u(c,h){if(c.length<=1)return c;var m=c.length/2|0,p=c.slice(0,m),y=c.slice(m);u(p,h),u(y,h);for(var E=0,I=0,Q=0;E<p.length&&I<y.length;){var W=h(p[E],y[I]);W<=0?c[Q++]=p[E++]:c[Q++]=y[I++]}for(;E<p.length;)c[Q++]=p[E++];for(;I<y.length;)c[Q++]=y[I++];return c}})(Kc||(Kc={}));var zd=function(){function t(n,i,s,u){this._uri=n,this._languageId=i,this._version=s,this._content=u,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(n){if(n){var i=this.offsetAt(n.start),s=this.offsetAt(n.end);return this._content.substring(i,s)}return this._content},t.prototype.update=function(n,i){this._content=n.text,this._version=i,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var n=[],i=this._content,s=!0,u=0;u<i.length;u++){s&&(n.push(u),s=!1);var c=i.charAt(u);s=c==="\r"||c===`
|
|
184
|
-
`,
|
|
185
|
-
`&&u++}s&&i.length>0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets},t.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var i=this.getLineOffsets(),s=0,u=i.length;if(u===0)return Ne.create(0,n);for(;s<u;){var c=Math.floor((s+u)/2);i[c]>n?u=c:s=c+1}var h=s-1;return Ne.create(h,n-i[h])},t.prototype.offsetAt=function(n){var i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;var s=i[n.line],u=n.line+1<i.length?i[n.line+1]:this._content.length;return Math.max(Math.min(s+n.character,u),s)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}(),me;(function(t){var n=Object.prototype.toString;function i(W){return typeof W<"u"}t.defined=i;function s(W){return typeof W>"u"}t.undefined=s;function u(W){return W===!0||W===!1}t.boolean=u;function c(W){return n.call(W)==="[object String]"}t.string=c;function h(W){return n.call(W)==="[object Number]"}t.number=h;function m(W,$,ae){return n.call(W)==="[object Number]"&&$<=W&&W<=ae}t.numberRange=m;function p(W){return n.call(W)==="[object Number]"&&-2147483648<=W&&W<=2147483647}t.integer=p;function y(W){return n.call(W)==="[object Number]"&&0<=W&&W<=2147483647}t.uinteger=y;function E(W){return n.call(W)==="[object Function]"}t.func=E;function I(W){return W!==null&&typeof W=="object"}t.objectLiteral=I;function Q(W,$){return Array.isArray(W)&&W.every($)}t.typedArray=Q})(me||(me={}));var _d=function(t,n,i){if(i||arguments.length===2)for(var s=0,u=n.length,c;s<u;s++)(c||!(s in n))&&(c||(c=Array.prototype.slice.call(n,0,s)),c[s]=n[s]);return t.concat(c||Array.prototype.slice.call(n))},Yc=function(){function t(n,i,s,u){this._uri=n,this._languageId=i,this._version=s,this._content=u,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(n){if(n){var i=this.offsetAt(n.start),s=this.offsetAt(n.end);return this._content.substring(i,s)}return this._content},t.prototype.update=function(n,i){for(var s=0,u=n;s<u.length;s++){var c=u[s];if(t.isIncremental(c)){var h=Jc(c.range),m=this.offsetAt(h.start),p=this.offsetAt(h.end);this._content=this._content.substring(0,m)+c.text+this._content.substring(p,this._content.length);var y=Math.max(h.start.line,0),E=Math.max(h.end.line,0),I=this._lineOffsets,Q=Xc(c.text,!1,m);if(E-y===Q.length)for(var W=0,$=Q.length;W<$;W++)I[W+y+1]=Q[W];else Q.length<1e4?I.splice.apply(I,_d([y+1,E-y],Q,!1)):this._lineOffsets=I=I.slice(0,y+1).concat(Q,I.slice(E+1));var ae=c.text.length-(p-m);if(ae!==0)for(var W=y+1+Q.length,$=I.length;W<$;W++)I[W]=I[W]+ae}else if(t.isFull(c))this._content=c.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},t.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Xc(this._content,!0)),this._lineOffsets},t.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var i=this.getLineOffsets(),s=0,u=i.length;if(u===0)return{line:0,character:n};for(;s<u;){var c=Math.floor((s+u)/2);i[c]>n?u=c:s=c+1}var h=s-1;return{line:h,character:n-i[h]}},t.prototype.offsetAt=function(n){var i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;var s=i[n.line],u=n.line+1<i.length?i[n.line+1]:this._content.length;return Math.max(Math.min(s+n.character,u),s)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t.isIncremental=function(n){var i=n;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},t.isFull=function(n){var i=n;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},t}(),Du;(function(t){function n(u,c,h,m){return new Yc(u,c,h,m)}t.create=n;function i(u,c,h){if(u instanceof Yc)return u.update(c,h),u;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=i;function s(u,c){for(var h=u.getText(),m=ec(c.map(Vd),function($,ae){var le=$.range.start.line-ae.range.start.line;return le===0?$.range.start.character-ae.range.start.character:le}),p=0,y=[],E=0,I=m;E<I.length;E++){var Q=I[E],W=u.offsetAt(Q.range.start);if(W<p)throw new Error("Overlapping edit");W>p&&y.push(h.substring(p,W)),Q.newText.length&&y.push(Q.newText),p=u.offsetAt(Q.range.end)}return y.push(h.substr(p)),y.join("")}t.applyEdits=s})(Du||(Du={}));function ec(t,n){if(t.length<=1)return t;var i=t.length/2|0,s=t.slice(0,i),u=t.slice(i);ec(s,n),ec(u,n);for(var c=0,h=0,m=0;c<s.length&&h<u.length;){var p=n(s[c],u[h]);p<=0?t[m++]=s[c++]:t[m++]=u[h++]}for(;c<s.length;)t[m++]=s[c++];for(;h<u.length;)t[m++]=u[h++];return t}function Xc(t,n,i){i===void 0&&(i=0);for(var s=n?[i]:[],u=0;u<t.length;u++){var c=t.charCodeAt(u);(c===13||c===10)&&(c===13&&u+1<t.length&&t.charCodeAt(u+1)===10&&u++,s.push(i+u+1))}return s}function Jc(t){var n=t.start,i=t.end;return n.line>i.line||n.line===i.line&&n.character>i.character?{start:i,end:n}:t}function Vd(t){var n=Jc(t.range);return n!==t.range?{newText:t.newText,range:n}:t}var Tt;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(Tt||(Tt={}));var Qc;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ra.Markdown,ra.PlainText],commitCharactersSupport:!0}}}}})(Qc||(Qc={}));var na=function(){var t=function(n,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var c in u)u.hasOwnProperty(c)&&(s[c]=u[c])},t(n,i)};return function(n,i){t(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),$d={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},ia=function(){function t(n,i,s){this.offset=i,this.length=s,this.parent=n}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}(),Gd=function(t){na(n,t);function n(i,s){var u=t.call(this,i,s)||this;return u.type="null",u.value=null,u}return n}(ia),Zc=function(t){na(n,t);function n(i,s,u){var c=t.call(this,i,u)||this;return c.type="boolean",c.value=s,c}return n}(ia),Kd=function(t){na(n,t);function n(i,s){var u=t.call(this,i,s)||this;return u.type="array",u.items=[],u}return Object.defineProperty(n.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),n}(ia),Yd=function(t){na(n,t);function n(i,s){var u=t.call(this,i,s)||this;return u.type="number",u.isInteger=!0,u.value=Number.NaN,u}return n}(ia),qc=function(t){na(n,t);function n(i,s,u){var c=t.call(this,i,s,u)||this;return c.type="string",c.value="",c}return n}(ia),Xd=function(t){na(n,t);function n(i,s){var u=t.call(this,i,s)||this;return u.type="property",u.colonOffset=-1,u}return Object.defineProperty(n.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),n}(ia),Jd=function(t){na(n,t);function n(i,s){var u=t.call(this,i,s)||this;return u.type="object",u.properties=[],u}return Object.defineProperty(n.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),n}(ia);function cn(t){return de(t)?t?{}:{not:{}}:t}var ed;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(ed||(ed={}));var Qd=function(){function t(n,i){n===void 0&&(n=-1),i===void 0&&(i=null),this.focusOffset=n,this.exclude=i,this.schemas=[]}return t.prototype.add=function(n){this.schemas.push(n)},t.prototype.merge=function(n){var i;(i=this.schemas).push.apply(i,n.schemas)},t.prototype.include=function(n){return(this.focusOffset===-1||td(n,this.focusOffset))&&n!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),tc=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.add=function(n){},t.prototype.merge=function(n){},t.prototype.include=function(n){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),dn=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(n){for(var i=0,s=n;i<s.length;i++){var u=s[i];this.merge(u)}},t.prototype.merge=function(n){this.problems=this.problems.concat(n.problems)},t.prototype.mergeEnumValues=function(n){if(!this.enumValueMatch&&!n.enumValueMatch&&this.enumValues&&n.enumValues){this.enumValues=this.enumValues.concat(n.enumValues);for(var i=0,s=this.problems;i<s.length;i++){var u=s[i];u.code===Tt.EnumValueMismatch&&(u.message="Value is not accepted. Valid values: "+this.enumValues.map(function(c){return JSON.stringify(c)}).join(", ")+".")}}},t.prototype.mergePropertyMatch=function(n){this.merge(n),this.propertiesMatches++,(n.enumValueMatch||!n.hasProblems()&&n.propertiesMatches)&&this.propertiesValueMatches++,n.enumValueMatch&&n.enumValues&&n.enumValues.length===1&&this.primaryValueMatches++},t.prototype.compare=function(n){var i=this.hasProblems();return i!==n.hasProblems()?i?-1:1:this.enumValueMatch!==n.enumValueMatch?n.enumValueMatch?-1:1:this.primaryValueMatches!==n.primaryValueMatches?this.primaryValueMatches-n.primaryValueMatches:this.propertiesValueMatches!==n.propertiesValueMatches?this.propertiesValueMatches-n.propertiesValueMatches:this.propertiesMatches-n.propertiesMatches},t}();function Zd(t,n){return n===void 0&&(n=[]),new rd(t,n,[])}function Ao(t){return a(t)}function rc(t){return r(t)}function td(t,n,i){return i===void 0&&(i=!1),n>=t.offset&&n<t.offset+t.length||i&&n===t.offset+t.length}var rd=function(){function t(n,i,s){i===void 0&&(i=[]),s===void 0&&(s=[]),this.root=n,this.syntaxErrors=i,this.comments=s}return t.prototype.getNodeFromOffset=function(n,i){if(i===void 0&&(i=!1),this.root)return e(this.root,n,i)},t.prototype.visit=function(n){if(this.root){var i=function(s){var u=n(s),c=s.children;if(Array.isArray(c))for(var h=0;h<c.length&&u;h++)u=i(c[h]);return u};i(this.root)}},t.prototype.validate=function(n,i){if(this.root&&i){var s=new dn;return Br(this.root,i,s,tc.instance),s.problems.map(function(u){var c=Oe.create(n.positionAt(u.location.offset),n.positionAt(u.location.offset+u.location.length));return zt.create(c,u.message,u.severity,u.code)})}return null},t.prototype.getMatchingSchemas=function(n,i,s){i===void 0&&(i=-1),s===void 0&&(s=null);var u=new Qd(i,s);return this.root&&n&&Br(this.root,n,new dn,u),u.schemas},t}();function Br(t,n,i,s){if(!t||!s.include(t))return;switch(t.type){case"object":p(t,n,i,s);break;case"array":m(t,n,i,s);break;case"string":h(t,n,i,s);break;case"number":c(t,n,i,s);break;case"property":return Br(t.valueNode,n,i,s)}u(),s.add({node:t,schema:n});function u(){function y(je){return t.type===je||je==="integer"&&t.type==="number"&&t.isInteger||n.nullable&&t.value===null}if(Array.isArray(n.type)?n.type.some(y)||i.problems.push({location:{offset:t.offset,length:t.length},severity:Je.Warning,message:n.errorMessage||"Incorrect type. Expected one of "+n.type.join(", ")+"."}):n.type&&(y(n.type)||i.problems.push({location:{offset:t.offset,length:t.length},severity:Je.Warning,message:n.errorMessage||'Incorrect type. Expected "'+n.type+'".'})),Array.isArray(n.allOf))for(var E=0,I=n.allOf;E<I.length;E++){var Q=I[E];Br(t,cn(Q),i,s)}var W=cn(n.not);if(W){var $=new dn,ae=s.newSub();Br(t,W,$,ae),$.hasProblems()||i.problems.push({location:{offset:t.offset,length:t.length},severity:Je.Warning,message:"Matches a schema that is not allowed."});for(var le=0,oe=ae.schemas;le<oe.length;le++){var fe=oe[le];fe.inverted=!fe.inverted,s.add(fe)}}var ye=function(je,rt){for(var Pt=[],vt=null,jr=0,Jn=je;jr<Jn.length;jr++){var Ui=Jn[jr],Qn=cn(Ui),Lr=new dn,Qt=s.newSub();if(Br(t,Qn,Lr,Qt),Lr.hasProblems()||Pt.push(Qn),!vt)vt={schema:Qn,validationResult:Lr,matchingSchemas:Qt};else if(!rt&&!Lr.hasProblems()&&!vt.validationResult.hasProblems())vt.matchingSchemas.merge(Qt),vt.validationResult.propertiesMatches+=Lr.propertiesMatches,vt.validationResult.propertiesValueMatches+=Lr.propertiesValueMatches;else{var pr=Lr.compare(vt.validationResult);pr>0?vt={schema:Qn,validationResult:Lr,matchingSchemas:Qt}:pr===0&&(vt.matchingSchemas.merge(Qt),vt.validationResult.mergeEnumValues(Lr))}}return Pt.length>1&&rt&&i.problems.push({location:{offset:t.offset,length:1},severity:Je.Warning,message:"Matches multiple schemas when only one must validate."}),vt!==null&&(i.merge(vt.validationResult),i.propertiesMatches+=vt.validationResult.propertiesMatches,i.propertiesValueMatches+=vt.validationResult.propertiesValueMatches,s.merge(vt.matchingSchemas)),Pt.length};Array.isArray(n.anyOf)&&ye(n.anyOf,!1),Array.isArray(n.oneOf)&&ye(n.oneOf,!0);var Ae=function(je){var rt=new dn,Pt=s.newSub();Br(t,cn(je),rt,Pt),i.merge(rt),i.propertiesMatches+=rt.propertiesMatches,i.propertiesValueMatches+=rt.propertiesValueMatches,s.merge(Pt)},we=function(je,rt,Pt){var vt=cn(je),jr=new dn,Jn=s.newSub();Br(t,vt,jr,Jn),s.merge(Jn),jr.hasProblems()?Pt&&Ae(Pt):rt&&Ae(rt)},Te=cn(n.if);if(Te&&we(Te,cn(n.then),cn(n.else)),Array.isArray(n.enum)){for(var ke=Ao(t),Me=!1,pe=0,Le=n.enum;pe<Le.length;pe++){var Ee=Le[pe];if(k(ke,Ee)){Me=!0;break}}i.enumValues=n.enum,i.enumValueMatch=Me,Me||i.problems.push({location:{offset:t.offset,length:t.length},severity:Je.Warning,code:Tt.EnumValueMismatch,message:n.errorMessage||"Value is not accepted. Valid values: "+n.enum.map(function(je){return JSON.stringify(je)}).join(", ")+"."})}if(X(n.const)){var ke=Ao(t);k(ke,n.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:t.offset,length:t.length},severity:Je.Warning,code:Tt.EnumValueMismatch,message:n.errorMessage||"Value must be "+JSON.stringify(n.const)+"."}),i.enumValueMatch=!1),i.enumValues=[n.const]}n.deprecationMessage&&t.parent&&i.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:Je.Warning,message:n.deprecationMessage})}function c(y,E,I,Q){var W=y.value;H(E.multipleOf)&&W%E.multipleOf!==0&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Value is not divisible by "+E.multipleOf+"."});function $(Ae,we){if(H(we))return we;if(de(we)&&we)return Ae}function ae(Ae,we){if(!de(we)||!we)return Ae}var le=$(E.minimum,E.exclusiveMinimum);H(le)&&W<=le&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Value is below the exclusive minimum of "+le+"."});var oe=$(E.maximum,E.exclusiveMaximum);H(oe)&&W>=oe&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Value is above the exclusive maximum of "+oe+"."});var fe=ae(E.minimum,E.exclusiveMinimum);H(fe)&&W<fe&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Value is below the minimum of "+fe+"."});var ye=ae(E.maximum,E.exclusiveMaximum);H(ye)&&W>ye&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Value is above the maximum of "+ye+"."})}function h(y,E,I,Q){if(H(E.minLength)&&y.value.length<E.minLength&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"String is shorter than the minimum length of "+E.minLength+"."}),H(E.maxLength)&&y.value.length>E.maxLength&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"String is longer than the maximum length of "+E.maxLength+"."}),ue(E.pattern)){var W=new RegExp(E.pattern);W.test(y.value)||I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:E.patternErrorMessage||E.errorMessage||'String does not match the pattern of "'+E.pattern+'".'})}if(E.format)switch(E.format){case"uri":case"uri-reference":{var $=void 0;if(!y.value)$="URI expected.";else{var ae=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(y.value);ae?!ae[2]&&E.format==="uri"&&($="URI with a scheme is expected."):$="URI is expected."}$&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:E.patternErrorMessage||E.errorMessage||"String is not a URI: "+$})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var le=$d[E.format];(!y.value||!le.pattern.exec(y.value))&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:E.patternErrorMessage||E.errorMessage||le.errorMessage});break;default:}}function m(y,E,I,Q){if(Array.isArray(E.items)){for(var W=E.items,$=0;$<W.length;$++){var ae=W[$],le=cn(ae),oe=new dn,fe=y.items[$];fe?(Br(fe,le,oe,Q),I.mergePropertyMatch(oe)):y.items.length>=W.length&&I.propertiesValueMatches++}if(y.items.length>W.length)if(typeof E.additionalItems=="object")for(var ye=W.length;ye<y.items.length;ye++){var oe=new dn;Br(y.items[ye],E.additionalItems,oe,Q),I.mergePropertyMatch(oe)}else E.additionalItems===!1&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Array has too many items according to schema. Expected "+W.length+" or fewer."})}else{var Ae=cn(E.items);if(Ae)for(var we=0,Te=y.items;we<Te.length;we++){var fe=Te[we],oe=new dn;Br(fe,Ae,oe,Q),I.mergePropertyMatch(oe)}}var ke=cn(E.contains);if(ke){var Me=y.items.some(function(Ee){var je=new dn;return Br(Ee,ke,je,tc.instance),!je.hasProblems()});Me||I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:E.errorMessage||"Array does not contain required item."})}if(H(E.minItems)&&y.items.length<E.minItems&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Array has too few items. Expected "+E.minItems+" or more."}),H(E.maxItems)&&y.items.length>E.maxItems&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Array has too many items. Expected "+E.maxItems+" or fewer."}),E.uniqueItems===!0){var pe=Ao(y),Le=pe.some(function(Ee,je){return je!==pe.lastIndexOf(Ee)});Le&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Array has duplicate items."})}}function p(y,E,I,Q){for(var W=Object.create(null),$=[],ae=0,le=y.properties;ae<le.length;ae++){var oe=le[ae],fe=oe.keyNode.value;W[fe]=oe.valueNode,$.push(fe)}if(Array.isArray(E.required))for(var ye=0,Ae=E.required;ye<Ae.length;ye++){var we=Ae[ye];if(!W[we]){var Te=y.parent&&y.parent.type==="property"&&y.parent.keyNode,ke=Te?{offset:Te.offset,length:Te.length}:{offset:y.offset,length:1};I.problems.push({location:ke,severity:Je.Warning,message:'Missing property "'+we+'".'})}}var Me=function(qs){for(var aa=$.indexOf(qs);aa>=0;)$.splice(aa,1),aa=$.indexOf(qs)};if(E.properties)for(var pe=0,Le=Object.keys(E.properties);pe<Le.length;pe++){var we=Le[pe];Me(we);var Ee=E.properties[we],je=W[we];if(je)if(de(Ee))if(Ee)I.propertiesMatches++,I.propertiesValueMatches++;else{var oe=je.parent;I.problems.push({location:{offset:oe.keyNode.offset,length:oe.keyNode.length},severity:Je.Warning,message:E.errorMessage||"Property "+we+" is not allowed."})}else{var rt=new dn;Br(je,Ee,rt,Q),I.mergePropertyMatch(rt)}}if(E.patternProperties)for(var Pt=0,vt=Object.keys(E.patternProperties);Pt<vt.length;Pt++)for(var jr=vt[Pt],Jn=new RegExp(jr),Ui=0,Qn=$.slice(0);Ui<Qn.length;Ui++){var we=Qn[Ui];if(Jn.test(we)){Me(we);var je=W[we];if(je){var Ee=E.patternProperties[jr];if(de(Ee))if(Ee)I.propertiesMatches++,I.propertiesValueMatches++;else{var oe=je.parent;I.problems.push({location:{offset:oe.keyNode.offset,length:oe.keyNode.length},severity:Je.Warning,message:E.errorMessage||"Property "+we+" is not allowed."})}else{var rt=new dn;Br(je,Ee,rt,Q),I.mergePropertyMatch(rt)}}}}if(typeof E.additionalProperties=="object")for(var Lr=0,Qt=$;Lr<Qt.length;Lr++){var we=Qt[Lr],je=W[we];if(je){var rt=new dn;Br(je,E.additionalProperties,rt,Q),I.mergePropertyMatch(rt)}}else if(E.additionalProperties===!1&&$.length>0)for(var pr=0,en=$;pr<en.length;pr++){var we=en[pr],je=W[we];if(je){var oe=je.parent;I.problems.push({location:{offset:oe.keyNode.offset,length:oe.keyNode.length},severity:Je.Warning,message:E.errorMessage||"Property "+we+" is not allowed."})}}if(H(E.maxProperties)&&y.properties.length>E.maxProperties&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Object has more properties than limit of "+E.maxProperties+"."}),H(E.minProperties)&&y.properties.length<E.minProperties&&I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Object has fewer properties than the required number of "+E.minProperties}),E.dependencies)for(var $r=0,En=Object.keys(E.dependencies);$r<En.length;$r++){var fe=En[$r],zi=W[fe];if(zi){var Cr=E.dependencies[fe];if(Array.isArray(Cr))for(var Gr=0,Fn=Cr;Gr<Fn.length;Gr++){var oa=Fn[Gr];W[oa]?I.propertiesValueMatches++:I.problems.push({location:{offset:y.offset,length:y.length},severity:Je.Warning,message:"Object is missing property "+oa+" required by property {$key}."})}else{var Ee=cn(Cr);if(Ee){var rt=new dn;Br(y,Ee,rt,Q),I.mergePropertyMatch(rt)}}}}var ko=cn(E.propertyNames);if(ko)for(var Zn=0,Zs=y.properties;Zn<Zs.length;Zn++){var Uu=Zs[Zn],fe=Uu.keyNode;fe&&Br(fe,ko,I,tc.instance)}}}function qd(t,n){var i=[],s=-1,u=t.getText(),c=Ht(u,!1),h=n&&n.collectComments?[]:void 0;function m(){for(;;){var Te=c.scan();switch(I(),Te){case 12:case 13:Array.isArray(h)&&h.push(Oe.create(t.positionAt(c.getTokenOffset()),t.positionAt(c.getTokenOffset()+c.getTokenLength())));break;case 15:case 14:break;default:return Te}}}function p(Te){return c.getToken()===Te?(m(),!0):!1}function y(Te,ke,Me,pe,Le){if(Le===void 0&&(Le=Je.Error),i.length===0||Me!==s){var Ee=Oe.create(t.positionAt(Me),t.positionAt(pe));i.push(zt.create(Ee,Te,Le,ke,t.languageId)),s=Me}}function E(Te,ke,Me,pe,Le){Me===void 0&&(Me=null),pe===void 0&&(pe=[]),Le===void 0&&(Le=[]);var Ee=c.getTokenOffset(),je=c.getTokenOffset()+c.getTokenLength();if(Ee===je&&Ee>0){for(Ee--;Ee>0&&/\s/.test(u.charAt(Ee));)Ee--;je=Ee+1}if(y(Te,ke,Ee,je),Me&&Q(Me,!1),pe.length+Le.length>0)for(var rt=c.getToken();rt!==17;){if(pe.indexOf(rt)!==-1){m();break}else if(Le.indexOf(rt)!==-1)break;rt=m()}return Me}function I(){switch(c.getTokenError()){case 4:return E("Invalid unicode sequence in string.",Tt.InvalidUnicode),!0;case 5:return E("Invalid escape character in string.",Tt.InvalidEscapeCharacter),!0;case 3:return E("Unexpected end of number.",Tt.UnexpectedEndOfNumber),!0;case 1:return E("Unexpected end of comment.",Tt.UnexpectedEndOfComment),!0;case 2:return E("Unexpected end of string.",Tt.UnexpectedEndOfString),!0;case 6:return E("Invalid characters in string. Control characters must be escaped.",Tt.InvalidCharacter),!0}return!1}function Q(Te,ke){return Te.length=c.getTokenOffset()+c.getTokenLength()-Te.offset,ke&&m(),Te}function W(Te){if(c.getToken()!==3)return null;var ke=new Kd(Te,c.getTokenOffset());m();for(var Me=0,pe=!1;c.getToken()!==4&&c.getToken()!==17;){if(c.getToken()===5){pe||E("Value expected",Tt.ValueExpected);var Le=c.getTokenOffset();if(m(),c.getToken()===4){pe&&y("Trailing comma",Tt.TrailingComma,Le,Le+1);continue}}else pe&&E("Expected comma",Tt.CommaExpected);var Ee=ye(ke,Me++);Ee?ke.items.push(Ee):E("Value expected",Tt.ValueExpected,null,[],[4,5]),pe=!0}return c.getToken()!==4?E("Expected comma or closing bracket",Tt.CommaOrCloseBacketExpected,ke):Q(ke,!0)}function $(Te,ke){var Me=new Xd(Te,c.getTokenOffset()),pe=le(Me);if(!pe)if(c.getToken()===16){E("Property keys must be doublequoted",Tt.Undefined);var Le=new qc(Me,c.getTokenOffset(),c.getTokenLength());Le.value=c.getTokenValue(),pe=Le,m()}else return null;Me.keyNode=pe;var Ee=ke[pe.value];if(Ee?(y("Duplicate object key",Tt.DuplicateKey,Me.keyNode.offset,Me.keyNode.offset+Me.keyNode.length,Je.Warning),typeof Ee=="object"&&y("DuplicateKeyWarning",Tt.DuplicateKey,Ee.keyNode.offset,Ee.keyNode.offset+Ee.keyNode.length,Je.Warning),ke[pe.value]=!0):ke[pe.value]=Me,c.getToken()===6)Me.colonOffset=c.getTokenOffset(),m();else if(E("Colon expected",Tt.ColonExpected),c.getToken()===10&&t.positionAt(pe.offset+pe.length).line<t.positionAt(c.getTokenOffset()).line)return Me.length=pe.length,Me;var je=ye(Me,pe.value);return je?(Me.valueNode=je,Me.length=je.offset+je.length-Me.offset,Me):E("Value expected",Tt.ValueExpected,Me,[],[2,5])}function ae(Te){if(c.getToken()!==1)return null;var ke=new Jd(Te,c.getTokenOffset()),Me=Object.create(null);m();for(var pe=!1;c.getToken()!==2&&c.getToken()!==17;){if(c.getToken()===5){pe||E("Property expected",Tt.PropertyExpected);var Le=c.getTokenOffset();if(m(),c.getToken()===2){pe&&y("Trailing comma",Tt.TrailingComma,Le,Le+1);continue}}else pe&&E("Expected comma",Tt.CommaExpected);var Ee=$(ke,Me);Ee?ke.properties.push(Ee):E("Property expected",Tt.PropertyExpected,null,[],[2,5]),pe=!0}return c.getToken()!==2?E("Expected comma or closing brace",Tt.CommaOrCloseBraceExpected,ke):Q(ke,!0)}function le(Te){if(c.getToken()!==10)return null;var ke=new qc(Te,c.getTokenOffset());return ke.value=c.getTokenValue(),Q(ke,!0)}function oe(Te){if(c.getToken()!==11)return null;var ke=new Yd(Te,c.getTokenOffset());if(c.getTokenError()===0){var Me=c.getTokenValue();try{var pe=JSON.parse(Me);if(!H(pe))return E("Invalid number format.",Tt.Undefined,ke);ke.value=pe}catch{return E("Invalid number format.",Tt.Undefined,ke)}ke.isInteger=Me.indexOf(".")===-1}return Q(ke,!0)}function fe(Te){var ke;switch(c.getToken()){case 7:return Q(new Gd(Te,c.getTokenOffset()),!0);case 8:return Q(new Zc(Te,!0,c.getTokenOffset()),!0);case 9:return Q(new Zc(Te,!1,c.getTokenOffset()),!0);default:return null}}function ye(Te,ke){return W(Te)||ae(Te)||le(Te)||oe(Te)||fe(Te)}var Ae=null,we=m();return we!==17&&(Ae=ye(null,null),Ae?c.getToken()!==17&&E("End of file expected.",Tt.Undefined):E("Expected a JSON object, array or literal.",Tt.Undefined)),new rd(Ae,i,h)}function nc(t,n,i){if(t!==null&&typeof t=="object"){var s=n+" ";if(Array.isArray(t)){if(t.length===0)return"[]";for(var u=`[
|
|
186
|
-
`,
|
|
187
|
-
`;return
|
|
188
|
-
`,
|
|
189
|
-
`}return
|
|
190
|
-
`,
|
|
191
|
-
`+
|
|
243
|
+
`}return e&&e.eol||`
|
|
244
|
+
`}function mp(e,r){return`\r
|
|
245
|
+
`.indexOf(e.charAt(r))!==-1}var Hl;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Hl||(Hl={}));function rg(e,r){var i=[],a=new Object,o=void 0,f={value:{},offset:0,length:0,type:"object",parent:void 0},d=!1;function v(h,g,b,E){f.value=h,f.offset=g,f.length=b,f.type=E,f.colonOffset=void 0,o=f}try{Wf(e,{onObjectBegin:function(h,g){if(r<=h)throw a;o=void 0,d=r>h,i.push("")},onObjectProperty:function(h,g,b){if(r<g||(v(h,g,b,"property"),i[i.length-1]=h,r<=g+b))throw a},onObjectEnd:function(h,g){if(r<=h)throw a;o=void 0,i.pop()},onArrayBegin:function(h,g){if(r<=h)throw a;o=void 0,i.push(0)},onArrayEnd:function(h,g){if(r<=h)throw a;o=void 0,i.pop()},onLiteralValue:function(h,g,b){if(r<g||(v(h,g,b,xp(h)),r<=g+b))throw a},onSeparator:function(h,g,b){if(r<=g)throw a;if(h===":"&&o&&o.type==="property")o.colonOffset=g,d=!1,o=void 0;else if(h===","){var E=i[i.length-1];typeof E=="number"?i[i.length-1]=E+1:(d=!0,i[i.length-1]=""),o=void 0}}})}catch(h){if(h!==a)throw h}return{path:i,previousNode:o,isAtPropertyKey:d,matches:function(h){for(var g=0,b=0;g<h.length&&b<i.length;b++)if(h[g]===i[b]||h[g]==="*")g++;else if(h[g]!=="**")return!1;return g===h.length}}}function ng(e,r,i){r===void 0&&(r=[]),i===void 0&&(i=Hl.DEFAULT);var a=null,o=[],f=[];function d(h){Array.isArray(o)?o.push(h):a!==null&&(o[a]=h)}var v={onObjectBegin:function(){var h={};d(h),f.push(o),o=h,a=null},onObjectProperty:function(h){a=h},onObjectEnd:function(){o=f.pop()},onArrayBegin:function(){var h=[];d(h),f.push(o),o=h,a=null},onArrayEnd:function(){o=f.pop()},onLiteralValue:d,onError:function(h,g,b){r.push({error:h,offset:g,length:b})}};return Wf(e,v,i),o[0]}function ig(e,r,i){r===void 0&&(r=[]),i===void 0&&(i=Hl.DEFAULT);var a={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(h){a.type==="property"&&(a.length=h-a.offset,a=a.parent)}function f(h){return a.children.push(h),h}var d={onObjectBegin:function(h){a=f({type:"object",offset:h,length:-1,parent:a,children:[]})},onObjectProperty:function(h,g,b){a=f({type:"property",offset:g,length:-1,parent:a,children:[]}),a.children.push({type:"string",value:h,offset:g,length:b,parent:a})},onObjectEnd:function(h,g){o(h+g),a.length=h+g-a.offset,a=a.parent,o(h+g)},onArrayBegin:function(h,g){a=f({type:"array",offset:h,length:-1,parent:a,children:[]})},onArrayEnd:function(h,g){a.length=h+g-a.offset,a=a.parent,o(h+g)},onLiteralValue:function(h,g,b){f({type:xp(h),offset:g,length:b,parent:a,value:h}),o(g+b)},onSeparator:function(h,g,b){a.type==="property"&&(h===":"?a.colonOffset=g:h===","&&o(g))},onError:function(h,g,b){r.push({error:h,offset:g,length:b})}};Wf(e,d,i);var v=a.children[0];return v&&delete v.parent,v}function ag(e,r){if(e){for(var i=e,a=0,o=r;a<o.length;a++){var f=o[a];if(typeof f=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var d=!1,v=0,h=i.children;v<h.length;v++){var g=h[v];if(Array.isArray(g.children)&&g.children[0].value===f){i=g.children[1],d=!0;break}}if(!d)return}else{var b=f;if(i.type!=="array"||b<0||!Array.isArray(i.children)||b>=i.children.length)return;i=i.children[b]}}return i}}function yp(e){if(!e.parent||!e.parent.children)return[];var r=yp(e.parent);if(e.parent.type==="property"){var i=e.parent.children[0].value;r.push(i)}else if(e.parent.type==="array"){var a=e.parent.children.indexOf(e);a!==-1&&r.push(a)}return r}function hd(e){switch(e.type){case"array":return e.children.map(hd);case"object":for(var r=Object.create(null),i=0,a=e.children;i<a.length;i++){var o=a[i],f=o.children[1];f&&(r[o.children[0].value]=hd(f))}return r;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function og(e,r,i){return i===void 0&&(i=!1),r>=e.offset&&r<e.offset+e.length||i&&r===e.offset+e.length}function bp(e,r,i){if(i===void 0&&(i=!1),og(e,r,i)){var a=e.children;if(Array.isArray(a))for(var o=0;o<a.length&&a[o].offset<=r;o++){var f=bp(a[o],r,i);if(f)return f}return e}}function Wf(e,r,i){i===void 0&&(i=Hl.DEFAULT);var a=jf(e,!1);function o(ue){return ue?function(){return ue(a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}function f(ue){return ue?function(Oe){return ue(Oe,a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}var d=o(r.onObjectBegin),v=f(r.onObjectProperty),h=o(r.onObjectEnd),g=o(r.onArrayBegin),b=o(r.onArrayEnd),E=f(r.onLiteralValue),V=f(r.onSeparator),I=o(r.onComment),W=f(r.onError),Y=i&&i.disallowComments,_=i&&i.allowTrailingComma;function U(){for(;;){var ue=a.scan();switch(a.getTokenError()){case 4:G(14);break;case 5:G(15);break;case 3:G(13);break;case 1:Y||G(11);break;case 2:G(12);break;case 6:G(16);break}switch(ue){case 12:case 13:Y?G(10):I();break;case 16:G(1);break;case 15:case 14:break;default:return ue}}}function G(ue,Oe,Te){if(Oe===void 0&&(Oe=[]),Te===void 0&&(Te=[]),W(ue),Oe.length+Te.length>0)for(var Me=a.getToken();Me!==17;){if(Oe.indexOf(Me)!==-1){U();break}else if(Te.indexOf(Me)!==-1)break;Me=U()}}function ce(ue){var Oe=a.getTokenValue();return ue?E(Oe):v(Oe),U(),!0}function Ce(){switch(a.getToken()){case 11:var ue=a.getTokenValue(),Oe=Number(ue);isNaN(Oe)&&(G(2),Oe=0),E(Oe);break;case 7:E(null);break;case 8:E(!0);break;case 9:E(!1);break;default:return!1}return U(),!0}function ge(){return a.getToken()!==10?(G(3,[],[2,5]),!1):(ce(!1),a.getToken()===6?(V(":"),U(),me()||G(4,[],[2,5])):G(5,[],[2,5]),!0)}function ke(){d(),U();for(var ue=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){if(ue||G(4,[],[]),V(","),U(),a.getToken()===2&&_)break}else ue&&G(6,[],[]);ge()||G(4,[],[2,5]),ue=!0}return h(),a.getToken()!==2?G(7,[2],[]):U(),!0}function be(){g(),U();for(var ue=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){if(ue||G(4,[],[]),V(","),U(),a.getToken()===4&&_)break}else ue&&G(6,[],[]);me()||G(4,[],[4,5]),ue=!0}return b(),a.getToken()!==4?G(8,[4],[]):U(),!0}function me(){switch(a.getToken()){case 3:return be();case 1:return ke();case 10:return ce(!0);default:return Ce()}}return U(),a.getToken()===17?i.allowEmptyContent?!0:(G(4,[],[]),!1):me()?(a.getToken()!==17&&G(9,[],[]),!0):(G(4,[],[]),!1)}function sg(e,r){var i=jf(e),a=[],o,f=0,d;do switch(d=i.getPosition(),o=i.scan(),o){case 12:case 13:case 17:f!==d&&a.push(e.substring(f,d)),r!==void 0&&a.push(i.getTokenValue().replace(/[^\r\n]/g,r)),f=i.getPosition();break}while(o!==17);return a.join("")}function xp(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function o0(e,r,i){return lg(e,r,void 0,i)}function lg(e,r,i,a){for(var o,f=r.slice(),d=[],v=parseTree(e,d),h=void 0,g=void 0;f.length>0&&(g=f.pop(),h=findNodeAtLocation(v,f),h===void 0&&i!==void 0);)typeof g=="string"?i=(o={},o[g]=i,o):i=[i];if(h)if(h.type==="object"&&typeof g=="string"&&Array.isArray(h.children)){var b=findNodeAtLocation(h,[g]);if(b!==void 0)if(i===void 0){if(!b.parent)throw new Error("Malformed AST");var E=h.children.indexOf(b.parent),V=void 0,I=b.parent.offset+b.parent.length;if(E>0){var W=h.children[E-1];V=W.offset+W.length}else if(V=h.offset+1,h.children.length>1){var Y=h.children[1];I=Y.offset}return Fo(e,{offset:V,length:I-V,content:""},a)}else return Fo(e,{offset:b.offset,length:b.length,content:JSON.stringify(i)},a);else{if(i===void 0)return[];var _=JSON.stringify(g)+": "+JSON.stringify(i),U=a.getInsertionIndex?a.getInsertionIndex(h.children.map(function(ue){return ue.children[0].value})):h.children.length,G=void 0;if(U>0){var W=h.children[U-1];G={offset:W.offset+W.length,length:0,content:","+_}}else h.children.length===0?G={offset:h.offset+1,length:0,content:_}:G={offset:h.offset+1,length:0,content:_+","};return Fo(e,G,a)}}else if(h.type==="array"&&typeof g=="number"&&Array.isArray(h.children)){var ce=g;if(ce===-1){var _=""+JSON.stringify(i),G=void 0;if(h.children.length===0)G={offset:h.offset+1,length:0,content:_};else{var W=h.children[h.children.length-1];G={offset:W.offset+W.length,length:0,content:","+_}}return Fo(e,G,a)}else if(i===void 0&&h.children.length>=0){var Ce=g,ge=h.children[Ce],G=void 0;if(h.children.length===1)G={offset:h.offset+1,length:h.length-2,content:""};else if(h.children.length-1===Ce){var W=h.children[Ce-1],ke=W.offset+W.length,be=h.offset+h.length;G={offset:ke,length:be-2-ke,content:""}}else G={offset:ge.offset,length:h.children[Ce+1].offset-ge.offset,content:""};return Fo(e,G,a)}else if(i!==void 0){var G=void 0,_=""+JSON.stringify(i);if(!a.isArrayInsertion&&h.children.length>g){var me=h.children[g];G={offset:me.offset,length:me.length,content:_}}else if(h.children.length===0||g===0)G={offset:h.offset+1,length:0,content:h.children.length===0?_:_+","};else{var U=g>h.children.length?h.children.length:g,W=h.children[U-1];G={offset:W.offset+W.length,length:0,content:","+_}}return Fo(e,G,a)}else throw new Error("Can not "+(i===void 0?"remove":a.isArrayInsertion?"insert":"modify")+" Array index "+ce+" as length is not sufficient")}else throw new Error("Can not add "+(typeof g!="number"?"index":"property")+" to parent of type "+h.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return Fo(e,{offset:v?v.offset:0,length:v?v.length:0,content:JSON.stringify(i)},a)}}function Fo(e,r,i){if(!i.formattingOptions)return[r];var a=Sp(e,r),o=r.offset,f=r.offset+r.content.length;if(r.length===0||r.content.length===0){for(;o>0&&!isEOL(a,o-1);)o--;for(;f<a.length&&!isEOL(a,f);)f++}for(var d=format(a,{offset:o,length:f-o},i.formattingOptions),v=d.length-1;v>=0;v--){var h=d[v];a=Sp(a,h),o=Math.min(o,h.offset),f=Math.max(f,h.offset+h.length),f+=h.content.length-h.length}var g=e.length-(a.length-f)-o;return[{offset:o,length:g,content:a.substring(o,f)}]}function Sp(e,r){return e.substring(0,r.offset)+r.content+e.substring(r.offset+r.length)}function s0(e,r){return`\r
|
|
246
|
+
`.indexOf(e.charAt(r))!==-1}var Ps=jf,l0=rg,ug=ng,u0=ig,f0=ag,fg=bp,cg=yp,dg=hd,c0=Wf,d0=sg;function p0(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function pg(e,r,i){return qv(e,r,i)}function h0(e,r,i,a){return edit.setProperty(e,r,i,a)}function v0(e,r){for(var i=r.length-1;i>=0;i--)e=edit.applyEdit(e,r[i]);return e}function Ul(e,r){if(e===r)return!0;if(e==null||r===null||r===void 0||typeof e!=typeof r||typeof e!="object"||Array.isArray(e)!==Array.isArray(r))return!1;var i,a;if(Array.isArray(e)){if(e.length!==r.length)return!1;for(i=0;i<e.length;i++)if(!Ul(e[i],r[i]))return!1}else{var o=[];for(a in e)o.push(a);o.sort();var f=[];for(a in r)f.push(a);if(f.sort(),!Ul(o,f))return!1;for(i=0;i<o.length;i++)if(!Ul(e[o[i]],r[o[i]]))return!1}return!0}function Qn(e){return typeof e=="number"}function wa(e){return typeof e<"u"}function Gi(e){return typeof e=="boolean"}function hg(e){return typeof e=="string"}var wp;(function(e){function r(i){return typeof i=="string"}e.is=r})(wp||(wp={}));var vd;(function(e){function r(i){return typeof i=="string"}e.is=r})(vd||(vd={}));var Cp;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(Cp||(Cp={}));var Hf;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(Hf||(Hf={}));var di;(function(e){function r(a,o){return a===Number.MAX_VALUE&&(a=Hf.MAX_VALUE),o===Number.MAX_VALUE&&(o=Hf.MAX_VALUE),{line:a,character:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.uinteger(o.line)&&Se.uinteger(o.character)}e.is=i})(di||(di={}));var Wt;(function(e){function r(a,o,f,d){if(Se.uinteger(a)&&Se.uinteger(o)&&Se.uinteger(f)&&Se.uinteger(d))return{start:di.create(a,o),end:di.create(f,d)};if(di.is(a)&&di.is(o))return{start:a,end:o};throw new Error("Range#create called with invalid arguments[".concat(a,", ").concat(o,", ").concat(f,", ").concat(d,"]"))}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&di.is(o.start)&&di.is(o.end)}e.is=i})(Wt||(Wt={}));var Fs;(function(e){function r(a,o){return{uri:a,range:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&(Se.string(o.uri)||Se.undefined(o.uri))}e.is=i})(Fs||(Fs={}));var Ap;(function(e){function r(a,o,f,d){return{targetUri:a,targetRange:o,targetSelectionRange:f,originSelectionRange:d}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.targetRange)&&Se.string(o.targetUri)&&Wt.is(o.targetSelectionRange)&&(Wt.is(o.originSelectionRange)||Se.undefined(o.originSelectionRange))}e.is=i})(Ap||(Ap={}));var gd;(function(e){function r(a,o,f,d){return{red:a,green:o,blue:f,alpha:d}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.numberRange(o.red,0,1)&&Se.numberRange(o.green,0,1)&&Se.numberRange(o.blue,0,1)&&Se.numberRange(o.alpha,0,1)}e.is=i})(gd||(gd={}));var Op;(function(e){function r(a,o){return{range:a,color:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&gd.is(o.color)}e.is=i})(Op||(Op={}));var Ep;(function(e){function r(a,o,f){return{label:a,textEdit:o,additionalTextEdits:f}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.string(o.label)&&(Se.undefined(o.textEdit)||pi.is(o))&&(Se.undefined(o.additionalTextEdits)||Se.typedArray(o.additionalTextEdits,pi.is))}e.is=i})(Ep||(Ep={}));var _l;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_l||(_l={}));var Tp;(function(e){function r(a,o,f,d,v,h){var g={startLine:a,endLine:o};return Se.defined(f)&&(g.startCharacter=f),Se.defined(d)&&(g.endCharacter=d),Se.defined(v)&&(g.kind=v),Se.defined(h)&&(g.collapsedText=h),g}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.uinteger(o.startLine)&&Se.uinteger(o.startLine)&&(Se.undefined(o.startCharacter)||Se.uinteger(o.startCharacter))&&(Se.undefined(o.endCharacter)||Se.uinteger(o.endCharacter))&&(Se.undefined(o.kind)||Se.string(o.kind))}e.is=i})(Tp||(Tp={}));var md;(function(e){function r(a,o){return{location:a,message:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Fs.is(o.location)&&Se.string(o.message)}e.is=i})(md||(md={}));var Ct;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Ct||(Ct={}));var kp;(function(e){e.Unnecessary=1,e.Deprecated=2})(kp||(kp={}));var Pp;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&Se.string(a.href)}e.is=r})(Pp||(Pp={}));var Ca;(function(e){function r(a,o,f,d,v,h){var g={range:a,message:o};return Se.defined(f)&&(g.severity=f),Se.defined(d)&&(g.code=d),Se.defined(v)&&(g.source=v),Se.defined(h)&&(g.relatedInformation=h),g}e.create=r;function i(a){var o,f=a;return Se.defined(f)&&Wt.is(f.range)&&Se.string(f.message)&&(Se.number(f.severity)||Se.undefined(f.severity))&&(Se.integer(f.code)||Se.string(f.code)||Se.undefined(f.code))&&(Se.undefined(f.codeDescription)||Se.string((o=f.codeDescription)===null||o===void 0?void 0:o.href))&&(Se.string(f.source)||Se.undefined(f.source))&&(Se.undefined(f.relatedInformation)||Se.typedArray(f.relatedInformation,md.is))}e.is=i})(Ca||(Ca={}));var Is;(function(e){function r(a,o){for(var f=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];var v={title:a,command:o};return Se.defined(f)&&f.length>0&&(v.arguments=f),v}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.title)&&Se.string(o.command)}e.is=i})(Is||(Is={}));var pi;(function(e){function r(f,d){return{range:f,newText:d}}e.replace=r;function i(f,d){return{range:{start:f,end:f},newText:d}}e.insert=i;function a(f){return{range:f,newText:""}}e.del=a;function o(f){var d=f;return Se.objectLiteral(d)&&Se.string(d.newText)&&Wt.is(d.range)}e.is=o})(pi||(pi={}));var Ls;(function(e){function r(a,o,f){var d={label:a};return o!==void 0&&(d.needsConfirmation=o),f!==void 0&&(d.description=f),d}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Se.string(o.label)&&(Se.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(Se.string(o.description)||o.description===void 0)}e.is=i})(Ls||(Ls={}));var dn;(function(e){function r(i){var a=i;return Se.string(a)}e.is=r})(dn||(dn={}));var ao;(function(e){function r(f,d,v){return{range:f,newText:d,annotationId:v}}e.replace=r;function i(f,d,v){return{range:{start:f,end:f},newText:d,annotationId:v}}e.insert=i;function a(f,d){return{range:f,newText:"",annotationId:d}}e.del=a;function o(f){var d=f;return pi.is(d)&&(Ls.is(d.annotationId)||dn.is(d.annotationId))}e.is=o})(ao||(ao={}));var Uf;(function(e){function r(a,o){return{textDocument:a,edits:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&zf.is(o.textDocument)&&Array.isArray(o.edits)}e.is=i})(Uf||(Uf={}));var zl;(function(e){function r(a,o,f){var d={kind:"create",uri:a};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(d.options=o),f!==void 0&&(d.annotationId=f),d}e.create=r;function i(a){var o=a;return o&&o.kind==="create"&&Se.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||Se.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Se.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})(zl||(zl={}));var Gl;(function(e){function r(a,o,f,d){var v={kind:"rename",oldUri:a,newUri:o};return f!==void 0&&(f.overwrite!==void 0||f.ignoreIfExists!==void 0)&&(v.options=f),d!==void 0&&(v.annotationId=d),v}e.create=r;function i(a){var o=a;return o&&o.kind==="rename"&&Se.string(o.oldUri)&&Se.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||Se.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Se.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})(Gl||(Gl={}));var $l;(function(e){function r(a,o,f){var d={kind:"delete",uri:a};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(d.options=o),f!==void 0&&(d.annotationId=f),d}e.create=r;function i(a){var o=a;return o&&o.kind==="delete"&&Se.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||Se.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||Se.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||dn.is(o.annotationId))}e.is=i})($l||($l={}));var yd;(function(e){function r(i){var a=i;return a&&(a.changes!==void 0||a.documentChanges!==void 0)&&(a.documentChanges===void 0||a.documentChanges.every(function(o){return Se.string(o.kind)?zl.is(o)||Gl.is(o)||$l.is(o):Uf.is(o)}))}e.is=r})(yd||(yd={}));var _f=function(){function e(r,i){this.edits=r,this.changeAnnotations=i}return e.prototype.insert=function(r,i,a){var o,f;if(a===void 0?o=pi.insert(r,i):dn.is(a)?(f=a,o=ao.insert(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),f=this.changeAnnotations.manage(a),o=ao.insert(r,i,f)),this.edits.push(o),f!==void 0)return f},e.prototype.replace=function(r,i,a){var o,f;if(a===void 0?o=pi.replace(r,i):dn.is(a)?(f=a,o=ao.replace(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),f=this.changeAnnotations.manage(a),o=ao.replace(r,i,f)),this.edits.push(o),f!==void 0)return f},e.prototype.delete=function(r,i){var a,o;if(i===void 0?a=pi.del(r):dn.is(i)?(o=i,a=ao.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),a=ao.del(r,o)),this.edits.push(a),o!==void 0)return o},e.prototype.add=function(r){this.edits.push(r)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Fp=function(){function e(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(r,i){var a;if(dn.is(r)?a=r:(a=this.nextId(),i=r),this._annotations[a]!==void 0)throw new Error("Id ".concat(a," is already in use."));if(i===void 0)throw new Error("No annotation provided for id ".concat(a));return this._annotations[a]=i,this._size++,a},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),g0=function(){function e(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new Fp(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(a){if(Uf.is(a)){var o=new _f(a.edits,i._changeAnnotations);i._textEditChanges[a.textDocument.uri]=o}})):r.changes&&Object.keys(r.changes).forEach(function(a){var o=new _f(r.changes[a]);i._textEditChanges[a]=o})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(r){if(zf.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},a=this._textEditChanges[i.uri];if(!a){var o=[],f={textDocument:i,edits:o};this._workspaceEdit.documentChanges.push(f),a=new _f(o,this._changeAnnotations),this._textEditChanges[i.uri]=a}return a}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var a=this._textEditChanges[r];if(!a){var o=[];this._workspaceEdit.changes[r]=o,a=new _f(o),this._textEditChanges[r]=a}return a}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Fp,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Ls.is(i)||dn.is(i)?o=i:a=i;var f,d;if(o===void 0?f=zl.create(r,a):(d=dn.is(o)?o:this._changeAnnotations.manage(o),f=zl.create(r,a,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d},e.prototype.renameFile=function(r,i,a,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var f;Ls.is(a)||dn.is(a)?f=a:o=a;var d,v;if(f===void 0?d=Gl.create(r,i,o):(v=dn.is(f)?f:this._changeAnnotations.manage(f),d=Gl.create(r,i,o,v)),this._workspaceEdit.documentChanges.push(d),v!==void 0)return v},e.prototype.deleteFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Ls.is(i)||dn.is(i)?o=i:a=i;var f,d;if(o===void 0?f=$l.create(r,a):(d=dn.is(o)?o:this._changeAnnotations.manage(o),f=$l.create(r,a,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d},e}(),Ip;(function(e){function r(a){return{uri:a}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)}e.is=i})(Ip||(Ip={}));var Lp;(function(e){function r(a,o){return{uri:a,version:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&Se.integer(o.version)}e.is=i})(Lp||(Lp={}));var zf;(function(e){function r(a,o){return{uri:a,version:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&(o.version===null||Se.integer(o.version))}e.is=i})(zf||(zf={}));var Mp;(function(e){function r(a,o,f,d){return{uri:a,languageId:o,version:f,text:d}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.string(o.uri)&&Se.string(o.languageId)&&Se.integer(o.version)&&Se.string(o.text)}e.is=i})(Mp||(Mp={}));var Io;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){var a=i;return a===e.PlainText||a===e.Markdown}e.is=r})(Io||(Io={}));var Kl;(function(e){function r(i){var a=i;return Se.objectLiteral(i)&&Io.is(a.kind)&&Se.string(a.value)}e.is=r})(Kl||(Kl={}));var Zn;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Zn||(Zn={}));var Hr;(function(e){e.PlainText=1,e.Snippet=2})(Hr||(Hr={}));var Np;(function(e){e.Deprecated=1})(Np||(Np={}));var Rp;(function(e){function r(a,o,f){return{newText:a,insert:o,replace:f}}e.create=r;function i(a){var o=a;return o&&Se.string(o.newText)&&Wt.is(o.insert)&&Wt.is(o.replace)}e.is=i})(Rp||(Rp={}));var Dp;(function(e){e.asIs=1,e.adjustIndentation=2})(Dp||(Dp={}));var Bp;(function(e){function r(i){var a=i;return a&&(Se.string(a.detail)||a.detail===void 0)&&(Se.string(a.description)||a.description===void 0)}e.is=r})(Bp||(Bp={}));var bd;(function(e){function r(i){return{label:i}}e.create=r})(bd||(bd={}));var Vp;(function(e){function r(i,a){return{items:i||[],isIncomplete:!!a}}e.create=r})(Vp||(Vp={}));var Gf;(function(e){function r(a){return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(a){var o=a;return Se.string(o)||Se.objectLiteral(o)&&Se.string(o.language)&&Se.string(o.value)}e.is=i})(Gf||(Gf={}));var jp;(function(e){function r(i){var a=i;return!!a&&Se.objectLiteral(a)&&(Kl.is(a.contents)||Gf.is(a.contents)||Se.typedArray(a.contents,Gf.is))&&(i.range===void 0||Wt.is(i.range))}e.is=r})(jp||(jp={}));var Wp;(function(e){function r(i,a){return a?{label:i,documentation:a}:{label:i}}e.create=r})(Wp||(Wp={}));var Hp;(function(e){function r(i,a){for(var o=[],f=2;f<arguments.length;f++)o[f-2]=arguments[f];var d={label:i};return Se.defined(a)&&(d.documentation=a),Se.defined(o)?d.parameters=o:d.parameters=[],d}e.create=r})(Hp||(Hp={}));var Up;(function(e){e.Text=1,e.Read=2,e.Write=3})(Up||(Up={}));var _p;(function(e){function r(i,a){var o={range:i};return Se.number(a)&&(o.kind=a),o}e.create=r})(_p||(_p={}));var $i;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})($i||($i={}));var zp;(function(e){e.Deprecated=1})(zp||(zp={}));var Gp;(function(e){function r(i,a,o,f,d){var v={name:i,kind:a,location:{uri:f,range:o}};return d&&(v.containerName=d),v}e.create=r})(Gp||(Gp={}));var $p;(function(e){function r(i,a,o,f){return f!==void 0?{name:i,kind:a,location:{uri:o,range:f}}:{name:i,kind:a,location:{uri:o}}}e.create=r})($p||($p={}));var Kp;(function(e){function r(a,o,f,d,v,h){var g={name:a,detail:o,kind:f,range:d,selectionRange:v};return h!==void 0&&(g.children=h),g}e.create=r;function i(a){var o=a;return o&&Se.string(o.name)&&Se.number(o.kind)&&Wt.is(o.range)&&Wt.is(o.selectionRange)&&(o.detail===void 0||Se.string(o.detail))&&(o.deprecated===void 0||Se.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=i})(Kp||(Kp={}));var Yp;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Yp||(Yp={}));var $f;(function(e){e.Invoked=1,e.Automatic=2})($f||($f={}));var Xp;(function(e){function r(a,o,f){var d={diagnostics:a};return o!=null&&(d.only=o),f!=null&&(d.triggerKind=f),d}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.typedArray(o.diagnostics,Ca.is)&&(o.only===void 0||Se.typedArray(o.only,Se.string))&&(o.triggerKind===void 0||o.triggerKind===$f.Invoked||o.triggerKind===$f.Automatic)}e.is=i})(Xp||(Xp={}));var Jp;(function(e){function r(a,o,f){var d={title:a},v=!0;return typeof o=="string"?(v=!1,d.kind=o):Is.is(o)?d.command=o:d.edit=o,v&&f!==void 0&&(d.kind=f),d}e.create=r;function i(a){var o=a;return o&&Se.string(o.title)&&(o.diagnostics===void 0||Se.typedArray(o.diagnostics,Ca.is))&&(o.kind===void 0||Se.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Is.is(o.command))&&(o.isPreferred===void 0||Se.boolean(o.isPreferred))&&(o.edit===void 0||yd.is(o.edit))}e.is=i})(Jp||(Jp={}));var Qp;(function(e){function r(a,o){var f={range:a};return Se.defined(o)&&(f.data=o),f}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(o.range)&&(Se.undefined(o.command)||Is.is(o.command))}e.is=i})(Qp||(Qp={}));var Zp;(function(e){function r(a,o){return{tabSize:a,insertSpaces:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Se.uinteger(o.tabSize)&&Se.boolean(o.insertSpaces)}e.is=i})(Zp||(Zp={}));var qp;(function(e){function r(a,o,f){return{range:a,target:o,data:f}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(o.range)&&(Se.undefined(o.target)||Se.string(o.target))}e.is=i})(qp||(qp={}));var Kf;(function(e){function r(a,o){return{range:a,parent:o}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&Wt.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=i})(Kf||(Kf={}));var eh;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(eh||(eh={}));var th;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(th||(th={}));var rh;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&(a.resultId===void 0||typeof a.resultId=="string")&&Array.isArray(a.data)&&(a.data.length===0||typeof a.data[0]=="number")}e.is=r})(rh||(rh={}));var nh;(function(e){function r(a,o){return{range:a,text:o}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&Se.string(o.text)}e.is=i})(nh||(nh={}));var ih;(function(e){function r(a,o,f){return{range:a,variableName:o,caseSensitiveLookup:f}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&Se.boolean(o.caseSensitiveLookup)&&(Se.string(o.variableName)||o.variableName===void 0)}e.is=i})(ih||(ih={}));var ah;(function(e){function r(a,o){return{range:a,expression:o}}e.create=r;function i(a){var o=a;return o!=null&&Wt.is(o.range)&&(Se.string(o.expression)||o.expression===void 0)}e.is=i})(ah||(ah={}));var oh;(function(e){function r(a,o){return{frameId:a,stoppedLocation:o}}e.create=r;function i(a){var o=a;return Se.defined(o)&&Wt.is(a.stoppedLocation)}e.is=i})(oh||(oh={}));var xd;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(xd||(xd={}));var Sd;(function(e){function r(a){return{value:a}}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&(o.tooltip===void 0||Se.string(o.tooltip)||Kl.is(o.tooltip))&&(o.location===void 0||Fs.is(o.location))&&(o.command===void 0||Is.is(o.command))}e.is=i})(Sd||(Sd={}));var sh;(function(e){function r(a,o,f){var d={position:a,label:o};return f!==void 0&&(d.kind=f),d}e.create=r;function i(a){var o=a;return Se.objectLiteral(o)&&di.is(o.position)&&(Se.string(o.label)||Se.typedArray(o.label,Sd.is))&&(o.kind===void 0||xd.is(o.kind))&&o.textEdits===void 0||Se.typedArray(o.textEdits,pi.is)&&(o.tooltip===void 0||Se.string(o.tooltip)||Kl.is(o.tooltip))&&(o.paddingLeft===void 0||Se.boolean(o.paddingLeft))&&(o.paddingRight===void 0||Se.boolean(o.paddingRight))}e.is=i})(sh||(sh={}));var lh;(function(e){function r(i){var a=i;return Se.objectLiteral(a)&&vd.is(a.uri)&&Se.string(a.name)}e.is=r})(lh||(lh={}));var m0=null,uh;(function(e){function r(f,d,v,h){return new vg(f,d,v,h)}e.create=r;function i(f){var d=f;return!!(Se.defined(d)&&Se.string(d.uri)&&(Se.undefined(d.languageId)||Se.string(d.languageId))&&Se.uinteger(d.lineCount)&&Se.func(d.getText)&&Se.func(d.positionAt)&&Se.func(d.offsetAt))}e.is=i;function a(f,d){for(var v=f.getText(),h=o(d,function(W,Y){var _=W.range.start.line-Y.range.start.line;return _===0?W.range.start.character-Y.range.start.character:_}),g=v.length,b=h.length-1;b>=0;b--){var E=h[b],V=f.offsetAt(E.range.start),I=f.offsetAt(E.range.end);if(I<=g)v=v.substring(0,V)+E.newText+v.substring(I,v.length);else throw new Error("Overlapping edit");g=V}return v}e.applyEdits=a;function o(f,d){if(f.length<=1)return f;var v=f.length/2|0,h=f.slice(0,v),g=f.slice(v);o(h,d),o(g,d);for(var b=0,E=0,V=0;b<h.length&&E<g.length;){var I=d(h[b],g[E]);I<=0?f[V++]=h[b++]:f[V++]=g[E++]}for(;b<h.length;)f[V++]=h[b++];for(;E<g.length;)f[V++]=g[E++];return f}})(uh||(uh={}));var vg=function(){function e(r,i,a,o){this._uri=r,this._languageId=i,this._version=a,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},e.prototype.update=function(r,i){this._content=r.text,this._version=i,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var r=[],i=this._content,a=!0,o=0;o<i.length;o++){a&&(r.push(o),a=!1);var f=i.charAt(o);a=f==="\r"||f===`
|
|
247
|
+
`,f==="\r"&&o+1<i.length&&i.charAt(o+1)===`
|
|
248
|
+
`&&o++}a&&i.length>0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},e.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,o=i.length;if(o===0)return di.create(0,r);for(;a<o;){var f=Math.floor((a+o)/2);i[f]>r?o=f:a=f+1}var d=a-1;return di.create(d,r-i[d])},e.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],o=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,o),a)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),Se;(function(e){var r=Object.prototype.toString;function i(I){return typeof I<"u"}e.defined=i;function a(I){return typeof I>"u"}e.undefined=a;function o(I){return I===!0||I===!1}e.boolean=o;function f(I){return r.call(I)==="[object String]"}e.string=f;function d(I){return r.call(I)==="[object Number]"}e.number=d;function v(I,W,Y){return r.call(I)==="[object Number]"&&W<=I&&I<=Y}e.numberRange=v;function h(I){return r.call(I)==="[object Number]"&&-2147483648<=I&&I<=2147483647}e.integer=h;function g(I){return r.call(I)==="[object Number]"&&0<=I&&I<=2147483647}e.uinteger=g;function b(I){return r.call(I)==="[object Function]"}e.func=b;function E(I){return I!==null&&typeof I=="object"}e.objectLiteral=E;function V(I,W){return Array.isArray(I)&&I.every(W)}e.typedArray=V})(Se||(Se={}));var gg=function(e,r,i){if(i||arguments.length===2)for(var a=0,o=r.length,f;a<o;a++)(f||!(a in r))&&(f||(f=Array.prototype.slice.call(r,0,a)),f[a]=r[a]);return e.concat(f||Array.prototype.slice.call(r))},fh=function(){function e(r,i,a,o){this._uri=r,this._languageId=i,this._version=a,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},e.prototype.update=function(r,i){for(var a=0,o=r;a<o.length;a++){var f=o[a];if(e.isIncremental(f)){var d=dh(f.range),v=this.offsetAt(d.start),h=this.offsetAt(d.end);this._content=this._content.substring(0,v)+f.text+this._content.substring(h,this._content.length);var g=Math.max(d.start.line,0),b=Math.max(d.end.line,0),E=this._lineOffsets,V=ch(f.text,!1,v);if(b-g===V.length)for(var I=0,W=V.length;I<W;I++)E[I+g+1]=V[I];else V.length<1e4?E.splice.apply(E,gg([g+1,b-g],V,!1)):this._lineOffsets=E=E.slice(0,g+1).concat(V,E.slice(b+1));var Y=f.text.length-(h-v);if(Y!==0)for(var I=g+1+V.length,W=E.length;I<W;I++)E[I]=E[I]+Y}else if(e.isFull(f))this._content=f.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=ch(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,o=i.length;if(o===0)return{line:0,character:r};for(;a<o;){var f=Math.floor((a+o)/2);i[f]>r?o=f:a=f+1}var d=a-1;return{line:d,character:r-i[d]}},e.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],o=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,o),a)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},e.isFull=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},e}(),Yf;(function(e){function r(o,f,d,v){return new fh(o,f,d,v)}e.create=r;function i(o,f,d){if(o instanceof fh)return o.update(f,d),o;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=i;function a(o,f){for(var d=o.getText(),v=wd(f.map(mg),function(W,Y){var _=W.range.start.line-Y.range.start.line;return _===0?W.range.start.character-Y.range.start.character:_}),h=0,g=[],b=0,E=v;b<E.length;b++){var V=E[b],I=o.offsetAt(V.range.start);if(I<h)throw new Error("Overlapping edit");I>h&&g.push(d.substring(h,I)),V.newText.length&&g.push(V.newText),h=o.offsetAt(V.range.end)}return g.push(d.substr(h)),g.join("")}e.applyEdits=a})(Yf||(Yf={}));function wd(e,r){if(e.length<=1)return e;var i=e.length/2|0,a=e.slice(0,i),o=e.slice(i);wd(a,r),wd(o,r);for(var f=0,d=0,v=0;f<a.length&&d<o.length;){var h=r(a[f],o[d]);h<=0?e[v++]=a[f++]:e[v++]=o[d++]}for(;f<a.length;)e[v++]=a[f++];for(;d<o.length;)e[v++]=o[d++];return e}function ch(e,r,i){i===void 0&&(i=0);for(var a=r?[i]:[],o=0;o<e.length;o++){var f=e.charCodeAt(o);(f===13||f===10)&&(f===13&&o+1<e.length&&e.charCodeAt(o+1)===10&&o++,a.push(i+o+1))}return a}function dh(e){var r=e.start,i=e.end;return r.line>i.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:e}function mg(e){var r=dh(e.range);return r!==e.range?{newText:e.newText,range:r}:e}var Bt;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(Bt||(Bt={}));var ph;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Io.Markdown,Io.PlainText],commitCharactersSupport:!0}}}}})(ph||(ph={}));var Lo=function(){var e=function(r,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var f in o)o.hasOwnProperty(f)&&(a[f]=o[f])},e(r,i)};return function(r,i){e(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),yg={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},Mo=function(){function e(r,i,a){this.offset=i,this.length=a,this.parent=r}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),bg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="null",o.value=null,o}return r}(Mo),hh=function(e){Lo(r,e);function r(i,a,o){var f=e.call(this,i,o)||this;return f.type="boolean",f.value=a,f}return r}(Mo),xg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="array",o.items=[],o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),r}(Mo),Sg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="number",o.isInteger=!0,o.value=Number.NaN,o}return r}(Mo),vh=function(e){Lo(r,e);function r(i,a,o){var f=e.call(this,i,a,o)||this;return f.type="string",f.value="",f}return r}(Mo),wg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="property",o.colonOffset=-1,o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),r}(Mo),Cg=function(e){Lo(r,e);function r(i,a){var o=e.call(this,i,a)||this;return o.type="object",o.properties=[],o}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),r}(Mo);function Ln(e){return Gi(e)?e?{}:{not:{}}:e}var gh;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(gh||(gh={}));var Ag=function(){function e(r,i){r===void 0&&(r=-1),i===void 0&&(i=null),this.focusOffset=r,this.exclude=i,this.schemas=[]}return e.prototype.add=function(r){this.schemas.push(r)},e.prototype.merge=function(r){var i;(i=this.schemas).push.apply(i,r.schemas)},e.prototype.include=function(r){return(this.focusOffset===-1||mh(r,this.focusOffset))&&r!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Cd=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(r){},e.prototype.merge=function(r){},e.prototype.include=function(r){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Mn=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(r){for(var i=0,a=r;i<a.length;i++){var o=a[i];this.merge(o)}},e.prototype.merge=function(r){this.problems=this.problems.concat(r.problems)},e.prototype.mergeEnumValues=function(r){if(!this.enumValueMatch&&!r.enumValueMatch&&this.enumValues&&r.enumValues){this.enumValues=this.enumValues.concat(r.enumValues);for(var i=0,a=this.problems;i<a.length;i++){var o=a[i];o.code===Bt.EnumValueMismatch&&(o.message="Value is not accepted. Valid values: "+this.enumValues.map(function(f){return JSON.stringify(f)}).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(r){this.merge(r),this.propertiesMatches++,(r.enumValueMatch||!r.hasProblems()&&r.propertiesMatches)&&this.propertiesValueMatches++,r.enumValueMatch&&r.enumValues&&r.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(r){var i=this.hasProblems();return i!==r.hasProblems()?i?-1:1:this.enumValueMatch!==r.enumValueMatch?r.enumValueMatch?-1:1:this.primaryValueMatches!==r.primaryValueMatches?this.primaryValueMatches-r.primaryValueMatches:this.propertiesValueMatches!==r.propertiesValueMatches?this.propertiesValueMatches-r.propertiesValueMatches:this.propertiesMatches-r.propertiesMatches},e}();function Og(e,r){return r===void 0&&(r=[]),new yh(e,r,[])}function oo(e){return dg(e)}function Ad(e){return cg(e)}function mh(e,r,i){return i===void 0&&(i=!1),r>=e.offset&&r<e.offset+e.length||i&&r===e.offset+e.length}var yh=function(){function e(r,i,a){i===void 0&&(i=[]),a===void 0&&(a=[]),this.root=r,this.syntaxErrors=i,this.comments=a}return e.prototype.getNodeFromOffset=function(r,i){if(i===void 0&&(i=!1),this.root)return fg(this.root,r,i)},e.prototype.visit=function(r){if(this.root){var i=function(a){var o=r(a),f=a.children;if(Array.isArray(f))for(var d=0;d<f.length&&o;d++)o=i(f[d]);return o};i(this.root)}},e.prototype.validate=function(r,i){if(this.root&&i){var a=new Mn;return rn(this.root,i,a,Cd.instance),a.problems.map(function(o){var f=Wt.create(r.positionAt(o.location.offset),r.positionAt(o.location.offset+o.location.length));return Ca.create(f,o.message,o.severity,o.code)})}return null},e.prototype.getMatchingSchemas=function(r,i,a){i===void 0&&(i=-1),a===void 0&&(a=null);var o=new Ag(i,a);return this.root&&r&&rn(this.root,r,new Mn,o),o.schemas},e}();function rn(e,r,i,a){if(!e||!a.include(e))return;switch(e.type){case"object":h(e,r,i,a);break;case"array":v(e,r,i,a);break;case"string":d(e,r,i,a);break;case"number":f(e,r,i,a);break;case"property":return rn(e.valueNode,r,i,a)}o(),a.add({node:e,schema:r});function o(){function g(Me){return e.type===Me||Me==="integer"&&e.type==="number"&&e.isInteger||r.nullable&&e.value===null}if(Array.isArray(r.type)?r.type.some(g)||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:r.errorMessage||"Incorrect type. Expected one of "+r.type.join(", ")+"."}):r.type&&(g(r.type)||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:r.errorMessage||'Incorrect type. Expected "'+r.type+'".'})),Array.isArray(r.allOf))for(var b=0,E=r.allOf;b<E.length;b++){var V=E[b];rn(e,Ln(V),i,a)}var I=Ln(r.not);if(I){var W=new Mn,Y=a.newSub();rn(e,I,W,Y),W.hasProblems()||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,message:"Matches a schema that is not allowed."});for(var _=0,U=Y.schemas;_<U.length;_++){var G=U[_];G.inverted=!G.inverted,a.add(G)}}var ce=function(Me,Xe){for(var yt=[],at=null,fr=0,Er=Me;fr<Er.length;fr++){var cr=Er[fr],Tr=Ln(cr),nr=new Mn,kt=a.newSub();if(rn(e,Tr,nr,kt),nr.hasProblems()||yt.push(Tr),!at)at={schema:Tr,validationResult:nr,matchingSchemas:kt};else if(!Xe&&!nr.hasProblems()&&!at.validationResult.hasProblems())at.matchingSchemas.merge(kt),at.validationResult.propertiesMatches+=nr.propertiesMatches,at.validationResult.propertiesValueMatches+=nr.propertiesValueMatches;else{var Yt=nr.compare(at.validationResult);Yt>0?at={schema:Tr,validationResult:nr,matchingSchemas:kt}:Yt===0&&(at.matchingSchemas.merge(kt),at.validationResult.mergeEnumValues(nr))}}return yt.length>1&&Xe&&i.problems.push({location:{offset:e.offset,length:1},severity:Ct.Warning,message:"Matches multiple schemas when only one must validate."}),at!==null&&(i.merge(at.validationResult),i.propertiesMatches+=at.validationResult.propertiesMatches,i.propertiesValueMatches+=at.validationResult.propertiesValueMatches,a.merge(at.matchingSchemas)),yt.length};Array.isArray(r.anyOf)&&ce(r.anyOf,!1),Array.isArray(r.oneOf)&&ce(r.oneOf,!0);var Ce=function(Me){var Xe=new Mn,yt=a.newSub();rn(e,Ln(Me),Xe,yt),i.merge(Xe),i.propertiesMatches+=Xe.propertiesMatches,i.propertiesValueMatches+=Xe.propertiesValueMatches,a.merge(yt)},ge=function(Me,Xe,yt){var at=Ln(Me),fr=new Mn,Er=a.newSub();rn(e,at,fr,Er),a.merge(Er),fr.hasProblems()?yt&&Ce(yt):Xe&&Ce(Xe)},ke=Ln(r.if);if(ke&&ge(ke,Ln(r.then),Ln(r.else)),Array.isArray(r.enum)){for(var be=oo(e),me=!1,ue=0,Oe=r.enum;ue<Oe.length;ue++){var Te=Oe[ue];if(Ul(be,Te)){me=!0;break}}i.enumValues=r.enum,i.enumValueMatch=me,me||i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,code:Bt.EnumValueMismatch,message:r.errorMessage||"Value is not accepted. Valid values: "+r.enum.map(function(Me){return JSON.stringify(Me)}).join(", ")+"."})}if(wa(r.const)){var be=oo(e);Ul(be,r.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:e.offset,length:e.length},severity:Ct.Warning,code:Bt.EnumValueMismatch,message:r.errorMessage||"Value must be "+JSON.stringify(r.const)+"."}),i.enumValueMatch=!1),i.enumValues=[r.const]}r.deprecationMessage&&e.parent&&i.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Ct.Warning,message:r.deprecationMessage})}function f(g,b,E,V){var I=g.value;Qn(b.multipleOf)&&I%b.multipleOf!==0&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is not divisible by "+b.multipleOf+"."});function W(Ce,ge){if(Qn(ge))return ge;if(Gi(ge)&&ge)return Ce}function Y(Ce,ge){if(!Gi(ge)||!ge)return Ce}var _=W(b.minimum,b.exclusiveMinimum);Qn(_)&&I<=_&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is below the exclusive minimum of "+_+"."});var U=W(b.maximum,b.exclusiveMaximum);Qn(U)&&I>=U&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is above the exclusive maximum of "+U+"."});var G=Y(b.minimum,b.exclusiveMinimum);Qn(G)&&I<G&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is below the minimum of "+G+"."});var ce=Y(b.maximum,b.exclusiveMaximum);Qn(ce)&&I>ce&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Value is above the maximum of "+ce+"."})}function d(g,b,E,V){if(Qn(b.minLength)&&g.value.length<b.minLength&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"String is shorter than the minimum length of "+b.minLength+"."}),Qn(b.maxLength)&&g.value.length>b.maxLength&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"String is longer than the maximum length of "+b.maxLength+"."}),hg(b.pattern)){var I=new RegExp(b.pattern);I.test(g.value)||E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||'String does not match the pattern of "'+b.pattern+'".'})}if(b.format)switch(b.format){case"uri":case"uri-reference":{var W=void 0;if(!g.value)W="URI expected.";else{var Y=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(g.value);Y?!Y[2]&&b.format==="uri"&&(W="URI with a scheme is expected."):W="URI is expected."}W&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||"String is not a URI: "+W})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var _=yg[b.format];(!g.value||!_.pattern.exec(g.value))&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.patternErrorMessage||b.errorMessage||_.errorMessage});break;default:}}function v(g,b,E,V){if(Array.isArray(b.items)){for(var I=b.items,W=0;W<I.length;W++){var Y=I[W],_=Ln(Y),U=new Mn,G=g.items[W];G?(rn(G,_,U,V),E.mergePropertyMatch(U)):g.items.length>=I.length&&E.propertiesValueMatches++}if(g.items.length>I.length)if(typeof b.additionalItems=="object")for(var ce=I.length;ce<g.items.length;ce++){var U=new Mn;rn(g.items[ce],b.additionalItems,U,V),E.mergePropertyMatch(U)}else b.additionalItems===!1&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too many items according to schema. Expected "+I.length+" or fewer."})}else{var Ce=Ln(b.items);if(Ce)for(var ge=0,ke=g.items;ge<ke.length;ge++){var G=ke[ge],U=new Mn;rn(G,Ce,U,V),E.mergePropertyMatch(U)}}var be=Ln(b.contains);if(be){var me=g.items.some(function(Te){var Me=new Mn;return rn(Te,be,Me,Cd.instance),!Me.hasProblems()});me||E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:b.errorMessage||"Array does not contain required item."})}if(Qn(b.minItems)&&g.items.length<b.minItems&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too few items. Expected "+b.minItems+" or more."}),Qn(b.maxItems)&&g.items.length>b.maxItems&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has too many items. Expected "+b.maxItems+" or fewer."}),b.uniqueItems===!0){var ue=oo(g),Oe=ue.some(function(Te,Me){return Me!==ue.lastIndexOf(Te)});Oe&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Array has duplicate items."})}}function h(g,b,E,V){for(var I=Object.create(null),W=[],Y=0,_=g.properties;Y<_.length;Y++){var U=_[Y],G=U.keyNode.value;I[G]=U.valueNode,W.push(G)}if(Array.isArray(b.required))for(var ce=0,Ce=b.required;ce<Ce.length;ce++){var ge=Ce[ce];if(!I[ge]){var ke=g.parent&&g.parent.type==="property"&&g.parent.keyNode,be=ke?{offset:ke.offset,length:ke.length}:{offset:g.offset,length:1};E.problems.push({location:be,severity:Ct.Warning,message:'Missing property "'+ge+'".'})}}var me=function(Nn){for(var Aa=W.indexOf(Nn);Aa>=0;)W.splice(Aa,1),Aa=W.indexOf(Nn)};if(b.properties)for(var ue=0,Oe=Object.keys(b.properties);ue<Oe.length;ue++){var ge=Oe[ue];me(ge);var Te=b.properties[ge],Me=I[ge];if(Me)if(Gi(Te))if(Te)E.propertiesMatches++,E.propertiesValueMatches++;else{var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}else{var Xe=new Mn;rn(Me,Te,Xe,V),E.mergePropertyMatch(Xe)}}if(b.patternProperties)for(var yt=0,at=Object.keys(b.patternProperties);yt<at.length;yt++)for(var fr=at[yt],Er=new RegExp(fr),cr=0,Tr=W.slice(0);cr<Tr.length;cr++){var ge=Tr[cr];if(Er.test(ge)){me(ge);var Me=I[ge];if(Me){var Te=b.patternProperties[fr];if(Gi(Te))if(Te)E.propertiesMatches++,E.propertiesValueMatches++;else{var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}else{var Xe=new Mn;rn(Me,Te,Xe,V),E.mergePropertyMatch(Xe)}}}}if(typeof b.additionalProperties=="object")for(var nr=0,kt=W;nr<kt.length;nr++){var ge=kt[nr],Me=I[ge];if(Me){var Xe=new Mn;rn(Me,b.additionalProperties,Xe,V),E.mergePropertyMatch(Xe)}}else if(b.additionalProperties===!1&&W.length>0)for(var Yt=0,Ht=W;Yt<Ht.length;Yt++){var ge=Ht[Yt],Me=I[ge];if(Me){var U=Me.parent;E.problems.push({location:{offset:U.keyNode.offset,length:U.keyNode.length},severity:Ct.Warning,message:b.errorMessage||"Property "+ge+" is not allowed."})}}if(Qn(b.maxProperties)&&g.properties.length>b.maxProperties&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object has more properties than limit of "+b.maxProperties+"."}),Qn(b.minProperties)&&g.properties.length<b.minProperties&&E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object has fewer properties than the required number of "+b.minProperties}),b.dependencies)for(var _e=0,qe=Object.keys(b.dependencies);_e<qe.length;_e++){var G=qe[_e],Tt=I[G];if(Tt){var Vt=b.dependencies[G];if(Array.isArray(Vt))for(var Ot=0,pn=Vt;Ot<pn.length;Ot++){var Ki=pn[Ot];I[Ki]?E.propertiesValueMatches++:E.problems.push({location:{offset:g.offset,length:g.length},severity:Ct.Warning,message:"Object is missing property "+Ki+" required by property {$key}."})}else{var Te=Ln(Vt);if(Te){var Xe=new Mn;rn(g,Te,Xe,V),E.mergePropertyMatch(Xe)}}}}var qn=Ln(b.propertyNames);if(qn)for(var Kr=0,uo=g.properties;Kr<uo.length;Kr++){var No=uo[Kr],G=No.keyNode;G&&rn(G,qn,E,Cd.instance)}}}function Eg(e,r){var i=[],a=-1,o=e.getText(),f=Ps(o,!1),d=r&&r.collectComments?[]:void 0;function v(){for(;;){var ke=f.scan();switch(E(),ke){case 12:case 13:Array.isArray(d)&&d.push(Wt.create(e.positionAt(f.getTokenOffset()),e.positionAt(f.getTokenOffset()+f.getTokenLength())));break;case 15:case 14:break;default:return ke}}}function h(ke){return f.getToken()===ke?(v(),!0):!1}function g(ke,be,me,ue,Oe){if(Oe===void 0&&(Oe=Ct.Error),i.length===0||me!==a){var Te=Wt.create(e.positionAt(me),e.positionAt(ue));i.push(Ca.create(Te,ke,Oe,be,e.languageId)),a=me}}function b(ke,be,me,ue,Oe){me===void 0&&(me=null),ue===void 0&&(ue=[]),Oe===void 0&&(Oe=[]);var Te=f.getTokenOffset(),Me=f.getTokenOffset()+f.getTokenLength();if(Te===Me&&Te>0){for(Te--;Te>0&&/\s/.test(o.charAt(Te));)Te--;Me=Te+1}if(g(ke,be,Te,Me),me&&V(me,!1),ue.length+Oe.length>0)for(var Xe=f.getToken();Xe!==17;){if(ue.indexOf(Xe)!==-1){v();break}else if(Oe.indexOf(Xe)!==-1)break;Xe=v()}return me}function E(){switch(f.getTokenError()){case 4:return b("Invalid unicode sequence in string.",Bt.InvalidUnicode),!0;case 5:return b("Invalid escape character in string.",Bt.InvalidEscapeCharacter),!0;case 3:return b("Unexpected end of number.",Bt.UnexpectedEndOfNumber),!0;case 1:return b("Unexpected end of comment.",Bt.UnexpectedEndOfComment),!0;case 2:return b("Unexpected end of string.",Bt.UnexpectedEndOfString),!0;case 6:return b("Invalid characters in string. Control characters must be escaped.",Bt.InvalidCharacter),!0}return!1}function V(ke,be){return ke.length=f.getTokenOffset()+f.getTokenLength()-ke.offset,be&&v(),ke}function I(ke){if(f.getToken()!==3)return null;var be=new xg(ke,f.getTokenOffset());v();for(var me=0,ue=!1;f.getToken()!==4&&f.getToken()!==17;){if(f.getToken()===5){ue||b("Value expected",Bt.ValueExpected);var Oe=f.getTokenOffset();if(v(),f.getToken()===4){ue&&g("Trailing comma",Bt.TrailingComma,Oe,Oe+1);continue}}else ue&&b("Expected comma",Bt.CommaExpected);var Te=ce(be,me++);Te?be.items.push(Te):b("Value expected",Bt.ValueExpected,null,[],[4,5]),ue=!0}return f.getToken()!==4?b("Expected comma or closing bracket",Bt.CommaOrCloseBacketExpected,be):V(be,!0)}function W(ke,be){var me=new wg(ke,f.getTokenOffset()),ue=_(me);if(!ue)if(f.getToken()===16){b("Property keys must be doublequoted",Bt.Undefined);var Oe=new vh(me,f.getTokenOffset(),f.getTokenLength());Oe.value=f.getTokenValue(),ue=Oe,v()}else return null;me.keyNode=ue;var Te=be[ue.value];if(Te?(g("Duplicate object key",Bt.DuplicateKey,me.keyNode.offset,me.keyNode.offset+me.keyNode.length,Ct.Warning),typeof Te=="object"&&g("DuplicateKeyWarning",Bt.DuplicateKey,Te.keyNode.offset,Te.keyNode.offset+Te.keyNode.length,Ct.Warning),be[ue.value]=!0):be[ue.value]=me,f.getToken()===6)me.colonOffset=f.getTokenOffset(),v();else if(b("Colon expected",Bt.ColonExpected),f.getToken()===10&&e.positionAt(ue.offset+ue.length).line<e.positionAt(f.getTokenOffset()).line)return me.length=ue.length,me;var Me=ce(me,ue.value);return Me?(me.valueNode=Me,me.length=Me.offset+Me.length-me.offset,me):b("Value expected",Bt.ValueExpected,me,[],[2,5])}function Y(ke){if(f.getToken()!==1)return null;var be=new Cg(ke,f.getTokenOffset()),me=Object.create(null);v();for(var ue=!1;f.getToken()!==2&&f.getToken()!==17;){if(f.getToken()===5){ue||b("Property expected",Bt.PropertyExpected);var Oe=f.getTokenOffset();if(v(),f.getToken()===2){ue&&g("Trailing comma",Bt.TrailingComma,Oe,Oe+1);continue}}else ue&&b("Expected comma",Bt.CommaExpected);var Te=W(be,me);Te?be.properties.push(Te):b("Property expected",Bt.PropertyExpected,null,[],[2,5]),ue=!0}return f.getToken()!==2?b("Expected comma or closing brace",Bt.CommaOrCloseBraceExpected,be):V(be,!0)}function _(ke){if(f.getToken()!==10)return null;var be=new vh(ke,f.getTokenOffset());return be.value=f.getTokenValue(),V(be,!0)}function U(ke){if(f.getToken()!==11)return null;var be=new Sg(ke,f.getTokenOffset());if(f.getTokenError()===0){var me=f.getTokenValue();try{var ue=JSON.parse(me);if(!Qn(ue))return b("Invalid number format.",Bt.Undefined,be);be.value=ue}catch{return b("Invalid number format.",Bt.Undefined,be)}be.isInteger=me.indexOf(".")===-1}return V(be,!0)}function G(ke){var be;switch(f.getToken()){case 7:return V(new bg(ke,f.getTokenOffset()),!0);case 8:return V(new hh(ke,!0,f.getTokenOffset()),!0);case 9:return V(new hh(ke,!1,f.getTokenOffset()),!0);default:return null}}function ce(ke,be){return I(ke)||Y(ke)||_(ke)||U(ke)||G(ke)}var Ce=null,ge=v();return ge!==17&&(Ce=ce(null,null),Ce?f.getToken()!==17&&b("End of file expected.",Bt.Undefined):b("Expected a JSON object, array or literal.",Bt.Undefined)),new yh(Ce,i,d)}function Od(e,r,i){if(e!==null&&typeof e=="object"){var a=r+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var o=`[
|
|
249
|
+
`,f=0;f<e.length;f++)o+=a+Od(e[f],a,i),f<e.length-1&&(o+=","),o+=`
|
|
250
|
+
`;return o+=r+"]",o}else{var d=Object.keys(e);if(d.length===0)return"{}";for(var o=`{
|
|
251
|
+
`,f=0;f<d.length;f++){var v=d[f];o+=a+JSON.stringify(v)+": "+Od(e[v],a,i),f<d.length-1&&(o+=","),o+=`
|
|
252
|
+
`}return o+=r+"}",o}}return i(e)}function Tg(e,r){if(e.length<r.length)return!1;for(var i=0;i<r.length;i++)if(e[i]!==r[i])return!1;return!0}function Ed(e,r){var i=e.length-r.length;return i>0?e.lastIndexOf(r)===i:i===0?e===r:!1}function kg(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function y0(e,r){for(var i="";r>0;)(r&1)===1&&(i+=e),e+=e,r=r>>>1;return i}var Pg=[",","}","]"],Fg=[":"],Ig=function(){function e(r,i,a,o){i===void 0&&(i=[]),a===void 0&&(a=Promise),o===void 0&&(o={}),this.schemaService=r,this.contributions=i,this.promiseConstructor=a,this.clientCapabilities=o,this.templateVarIdCounter=0}return e.prototype.doResolve=function(r){for(var i=this.contributions.length-1;i>=0;i--)if(this.contributions[i].resolveCompletion){var a=this.contributions[i].resolveCompletion(r);if(a)return a}return this.promiseConstructor.resolve(r)},e.prototype.doComplete=function(r,i,a){var o=this,f={items:[],isIncomplete:!1},d=r.getText(),v=r.offsetAt(i),h=a.getNodeFromOffset(v,!0);if(this.isInComment(r,h?h.offset:0,v))return Promise.resolve(f);if(h&&v===h.offset+h.length&&v>0){var g=d[v-1];(h.type==="object"&&g==="}"||h.type==="array"&&g==="]")&&(h=h.parent)}var b=this.getCurrentWord(r,v),E=null;if(h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null"))E=Wt.create(r.positionAt(h.offset),r.positionAt(h.offset+h.length));else{var V=v-b.length;V>0&&d[V-1]==='"'&&V--,E=Wt.create(r.positionAt(V),i)}var I=this.doesSupportsCommitCharacters(),W={},Y={add:function(_){var U=W[_.label];U?U.documentation||(U.documentation=_.documentation):(W[_.label]=_,E&&(_.textEdit=pi.replace(E,_.insertText)),I&&(_.commitCharacters=_.kind===Zn.Property?Fg:Pg),f.items.push(_))},setAsIncomplete:function(){f.isIncomplete=!0},error:function(_){console.error(_)},log:function(_){console.log(_)},getNumberOfProposals:function(){return f.items.length}};return this.schemaService.getSchemaForResource(r.uri,a).then(function(_){var U=[],G=!0,ce="",Ce=null;if(h&&h.type==="string"){var ge=h.parent;ge&&ge.type==="property"&&ge.keyNode===h&&(G=!ge.valueNode,Ce=ge,ce=d.substr(h.offset+1,h.length-2),ge&&(h=ge.parent))}if(h&&h.type==="object"){if(h.offset===v)return f;var ke=h.properties;ke.forEach(function(Oe){(!Ce||Ce!==Oe)&&(W[Oe.keyNode.value]=bd.create("__"))});var be="";G&&(be=o.evaluateSeparatorAfter(r,r.offsetAt(E.end))),_?o.getPropertyCompletions(_,a,h,G,be,Y):o.getSchemaLessPropertyCompletions(a,h,ce,Y);var me=Ad(h);o.contributions.forEach(function(Oe){var Te=Oe.collectPropertyCompletions(r.uri,me,b,G,be==="",Y);Te&&U.push(Te)}),!_&&b.length>0&&d.charAt(v-b.length-1)!=='"'&&(Y.add({kind:Zn.Property,label:o.getLabelForValue(b),insertText:o.getInsertTextForProperty(b,null,!1,be),insertTextFormat:Hr.Snippet,documentation:""}),Y.setAsIncomplete())}var ue={};return _?o.getValueCompletions(_,a,h,v,r,Y,ue):o.getSchemaLessValueCompletions(a,h,v,r,Y),o.contributions.length>0&&o.getContributedValueCompletions(a,h,v,r,Y,U),o.promiseConstructor.all(U).then(function(){if(Y.getNumberOfProposals()===0){var Oe=v;h&&(h.type==="string"||h.type==="number"||h.type==="boolean"||h.type==="null")&&(Oe=h.offset+h.length);var Te=o.evaluateSeparatorAfter(r,Oe);o.addFillerValueCompletions(ue,Te,Y)}return f})})},e.prototype.getPropertyCompletions=function(r,i,a,o,f,d){var v=this,h=i.getMatchingSchemas(r.schema,a.offset);h.forEach(function(g){if(g.node===a&&!g.inverted){var b=g.schema.properties;b&&Object.keys(b).forEach(function(E){var V=b[E],I=!1;if(typeof V=="object"&&V.allOf)for(var W=0,Y=V.allOf;W<Y.length;W++){var _=Y[W];if(_.readOnly){I=!0;break}}if(typeof V=="object"&&!V.deprecationMessage&&!V.doNotSuggest&&!I){var U={kind:Zn.Property,label:v.sanitizeLabel(E),insertText:v.getInsertTextForProperty(E,V,o,f),insertTextFormat:Hr.Snippet,filterText:v.getFilterTextForValue(E),documentation:v.fromMarkup(V.markdownDescription)||V.description||""};Ed(U.insertText,"$1"+f)&&(U.command={title:"Suggest",command:"editor.action.triggerSuggest"}),d.add(U)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(r,i,a,o){var f=this,d=function(h){h.properties.forEach(function(g){var b=g.keyNode.value;o.add({kind:Zn.Property,label:f.sanitizeLabel(b),insertText:f.getInsertTextForValue(b,""),insertTextFormat:Hr.Snippet,filterText:f.getFilterTextForValue(b),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var v=i.parent.keyNode.value;r.visit(function(h){return h.type==="property"&&h!==i.parent&&h.keyNode.value===v&&h.valueNode&&h.valueNode.type==="object"&&d(h.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(h){h.type==="object"&&h!==i&&d(h)});else i.type==="object"&&o.add({kind:Zn.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Hr.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(r,i,a,o,f){var d=this,v=a;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(v=i.offset+i.length,i=i.parent),!i){f.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Hr.Snippet,documentation:""}),f.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Hr.Snippet,documentation:""});return}var h=this.evaluateSeparatorAfter(o,v),g=function(I){mh(I.parent,a,!0)||f.add({kind:d.getSuggestionKind(I.type),label:d.getLabelTextForMatchingNode(I,o),insertText:d.getInsertTextForMatchingNode(I,o,h),insertTextFormat:Hr.Snippet,documentation:""}),I.type==="boolean"&&d.addBooleanValueCompletion(!I.value,h,f)};if(i.type==="property"&&a>i.colonOffset){var b=i.valueNode;if(b&&(a>b.offset+b.length||b.type==="object"||b.type==="array"))return;var E=i.keyNode.value;r.visit(function(I){return I.type==="property"&&I.keyNode.value===E&&I.valueNode&&g(I.valueNode),!0}),E==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(h,f)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var V=i.parent.keyNode.value;r.visit(function(I){return I.type==="property"&&I.keyNode.value===V&&I.valueNode&&I.valueNode.type==="array"&&I.valueNode.items.forEach(g),!0})}else i.items.forEach(g)},e.prototype.getValueCompletions=function(r,i,a,o,f,d,v){var h=this,g=o,b=null,E=null;if(a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null")&&(g=a.offset+a.length,E=a,a=a.parent),!a){this.addSchemaValueCompletions(r.schema,"",d,v);return}if(a.type==="property"&&o>a.colonOffset){var V=a.valueNode;if(V&&o>V.offset+V.length)return;b=a.keyNode.value,a=a.parent}if(a&&(b!==null||a.type==="array")){var I=this.evaluateSeparatorAfter(f,g),W=i.getMatchingSchemas(r.schema,a.offset,E);W.forEach(function(Y){if(Y.node===a&&!Y.inverted&&Y.schema){if(a.type==="array"&&Y.schema.items)if(Array.isArray(Y.schema.items)){var _=h.findItemAtOffset(a,f,o);_<Y.schema.items.length&&h.addSchemaValueCompletions(Y.schema.items[_],I,d,v)}else h.addSchemaValueCompletions(Y.schema.items,I,d,v);if(Y.schema.properties){var U=Y.schema.properties[b];U&&h.addSchemaValueCompletions(U,I,d,v)}}}),b==="$schema"&&!a.parent&&this.addDollarSchemaCompletions(I,d),v.boolean&&(this.addBooleanValueCompletion(!0,I,d),this.addBooleanValueCompletion(!1,I,d)),v.null&&this.addNullValueCompletion(I,d)}},e.prototype.getContributedValueCompletions=function(r,i,a,o,f,d){if(!i)this.contributions.forEach(function(b){var E=b.collectDefaultCompletions(o.uri,f);E&&d.push(E)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i.type==="property"&&a>i.colonOffset){var v=i.keyNode.value,h=i.valueNode;if(!h||a<=h.offset+h.length){var g=Ad(i.parent);this.contributions.forEach(function(b){var E=b.collectValueCompletions(o.uri,g,v,f);E&&d.push(E)})}}},e.prototype.addSchemaValueCompletions=function(r,i,a,o){var f=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,a),this.addDefaultValueCompletions(r,i,a),this.collectTypes(r,o),Array.isArray(r.allOf)&&r.allOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(d){return f.addSchemaValueCompletions(d,i,a,o)}))},e.prototype.addDefaultValueCompletions=function(r,i,a,o){var f=this;o===void 0&&(o=0);var d=!1;if(wa(r.default)){for(var v=r.type,h=r.default,g=o;g>0;g--)h=[h],v="array";a.add({kind:this.getSuggestionKind(v),label:this.getLabelForValue(h),insertText:this.getInsertTextForValue(h,i),insertTextFormat:Hr.Snippet}),d=!0}Array.isArray(r.examples)&&r.examples.forEach(function(b){for(var E=r.type,V=b,I=o;I>0;I--)V=[V],E="array";a.add({kind:f.getSuggestionKind(E),label:f.getLabelForValue(V),insertText:f.getInsertTextForValue(V,i),insertTextFormat:Hr.Snippet}),d=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(b){var E=r.type,V=b.body,I=b.label,W,Y;if(wa(V)){for(var _=r.type,U=o;U>0;U--)V=[V],_="array";W=f.getInsertTextForSnippetValue(V,i),Y=f.getFilterTextForSnippetValue(V),I=I||f.getLabelForSnippetValue(V)}else if(typeof b.bodyText=="string"){for(var G="",ce="",Ce="",U=o;U>0;U--)G=G+Ce+`[
|
|
253
|
+
`,ce=ce+`
|
|
254
|
+
`+Ce+"]",Ce+=" ",E="array";W=G+Ce+b.bodyText.split(`
|
|
192
255
|
`).join(`
|
|
193
|
-
`+
|
|
194
|
-
\r\v":{[,]}`.indexOf(
|
|
256
|
+
`+Ce)+ce+i,I=I||f.sanitizeLabel(W),Y=W.replace(/[\n]/g,"")}a.add({kind:f.getSuggestionKind(E),label:I,documentation:f.fromMarkup(b.markdownDescription)||b.description,insertText:W,insertTextFormat:Hr.Snippet,filterText:Y}),d=!0}),!d&&typeof r.items=="object"&&!Array.isArray(r.items)&&this.addDefaultValueCompletions(r.items,i,a,o+1)},e.prototype.addEnumValueCompletions=function(r,i,a){if(wa(r.const)&&a.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(r.const),insertText:this.getInsertTextForValue(r.const,i),insertTextFormat:Hr.Snippet,documentation:this.fromMarkup(r.markdownDescription)||r.description}),Array.isArray(r.enum))for(var o=0,f=r.enum.length;o<f;o++){var d=r.enum[o],v=this.fromMarkup(r.markdownDescription)||r.description;r.markdownEnumDescriptions&&o<r.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?v=this.fromMarkup(r.markdownEnumDescriptions[o]):r.enumDescriptions&&o<r.enumDescriptions.length&&(v=r.enumDescriptions[o]),a.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(d),insertText:this.getInsertTextForValue(d,i),insertTextFormat:Hr.Snippet,documentation:v})}},e.prototype.collectTypes=function(r,i){if(!(Array.isArray(r.enum)||wa(r.const))){var a=r.type;Array.isArray(a)?a.forEach(function(o){return i[o]=!0}):i[a]=!0}},e.prototype.addFillerValueCompletions=function(r,i,a){r.object&&a.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:Hr.Snippet,detail:"New object",documentation:""}),r.array&&a.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:Hr.Snippet,detail:"New array",documentation:""})},e.prototype.addBooleanValueCompletion=function(r,i,a){a.add({kind:this.getSuggestionKind("boolean"),label:r?"true":"false",insertText:this.getInsertTextForValue(r,i),insertTextFormat:Hr.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(r,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+r,insertTextFormat:Hr.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(r,i){var a=this,o=this.schemaService.getRegisteredSchemaIds(function(f){return f==="http"||f==="https"});o.forEach(function(f){return i.add({kind:Zn.Module,label:a.getLabelForValue(f),filterText:a.getFilterTextForValue(f),insertText:a.getInsertTextForValue(f,r),insertTextFormat:Hr.Snippet,documentation:""})})},e.prototype.sanitizeLabel=function(r){return r=r.replace(/[\n]/g,"\u21B5"),r.length>57&&(r=r.substr(0,57).trim()+"..."),r},e.prototype.getLabelForValue=function(r){return this.sanitizeLabel(JSON.stringify(r))},e.prototype.getFilterTextForValue=function(r){return JSON.stringify(r)},e.prototype.getFilterTextForSnippetValue=function(r){return JSON.stringify(r).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(r){var i=JSON.stringify(r);return i=i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(i)},e.prototype.getInsertTextForPlainText=function(r){return r.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(r,i){var a=JSON.stringify(r,null," ");return a==="{}"?"{$1}"+i:a==="[]"?"[$1]"+i:this.getInsertTextForPlainText(a+i)},e.prototype.getInsertTextForSnippetValue=function(r,i){var a=function(o){return typeof o=="string"&&o[0]==="^"?o.substr(1):JSON.stringify(o)};return Od(r,"",a)+i},e.prototype.getInsertTextForGuessedValue=function(r,i){switch(typeof r){case"object":return r===null?"${1:null}"+i:this.getInsertTextForValue(r,i);case"string":var a=JSON.stringify(r);return a=a.substr(1,a.length-2),a=this.getInsertTextForPlainText(a),'"${1:'+a+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(r)+"}"+i}return this.getInsertTextForValue(r,i)},e.prototype.getSuggestionKind=function(r){if(Array.isArray(r)){var i=r;r=i.length>0?i[0]:null}if(!r)return Zn.Value;switch(r){case"string":return Zn.Value;case"object":return Zn.Module;case"property":return Zn.Property;default:return Zn.Value}},e.prototype.getLabelTextForMatchingNode=function(r,i){switch(r.type){case"array":return"[]";case"object":return"{}";default:var a=i.getText().substr(r.offset,r.length);return a}},e.prototype.getInsertTextForMatchingNode=function(r,i,a){switch(r.type){case"array":return this.getInsertTextForValue([],a);case"object":return this.getInsertTextForValue({},a);default:var o=i.getText().substr(r.offset,r.length)+a;return this.getInsertTextForPlainText(o)}},e.prototype.getInsertTextForProperty=function(r,i,a,o){var f=this.getInsertTextForValue(r,"");if(!a)return f;var d=f+": ",v,h=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var g=i.defaultSnippets[0].body;wa(g)&&(v=this.getInsertTextForSnippetValue(g,""))}h+=i.defaultSnippets.length}if(i.enum&&(!v&&i.enum.length===1&&(v=this.getInsertTextForGuessedValue(i.enum[0],"")),h+=i.enum.length),wa(i.default)&&(v||(v=this.getInsertTextForGuessedValue(i.default,"")),h++),h===0){var b=Array.isArray(i.type)?i.type[0]:i.type;switch(b||(i.properties?b="object":i.items&&(b="array")),b){case"boolean":v="$1";break;case"string":v='"$1"';break;case"object":v="{$1}";break;case"array":v="[$1]";break;case"number":case"integer":v="${1:0}";break;case"null":v="${1:null}";break;default:return f}}}return(!v||h>1)&&(v="$1"),d+v+o},e.prototype.getCurrentWord=function(r,i){for(var a=i-1,o=r.getText();a>=0&&`
|
|
257
|
+
\r\v":{[,]}`.indexOf(o.charAt(a))===-1;)a--;return o.substring(a+1,i)},e.prototype.evaluateSeparatorAfter=function(r,i){var a=Ps(r.getText(),!0);a.setPosition(i);var o=a.scan();switch(o){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(r,i,a){for(var o=Ps(i.getText(),!0),f=r.items,d=f.length-1;d>=0;d--){var v=f[d];if(a>v.offset+v.length){o.setPosition(v.offset+v.length);var h=o.scan();return h===5&&a>=o.getTokenOffset()+o.getTokenLength()?d+1:d}else if(a>=v.offset)return d}return 0},e.prototype.isInComment=function(r,i,a){var o=Ps(r.getText(),!1);o.setPosition(i);for(var f=o.scan();f!==17&&o.getTokenOffset()+o.getTokenLength()<a;)f=o.scan();return(f===12||f===13)&&o.getTokenOffset()<=a},e.prototype.fromMarkup=function(r){if(r&&this.doesSupportMarkdown())return{kind:Io.Markdown,value:r}},e.prototype.doesSupportMarkdown=function(){if(!wa(this.supportsMarkdown)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=r&&r.completionItem&&Array.isArray(r.completionItem.documentationFormat)&&r.completionItem.documentationFormat.indexOf(Io.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!wa(this.supportsCommitCharacters)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=r&&r.completionItem&&!!r.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),Lg=function(){function e(r,i,a){i===void 0&&(i=[]),this.schemaService=r,this.contributions=i,this.promise=a||Promise}return e.prototype.doHover=function(r,i,a){var o=r.offsetAt(i),f=a.getNodeFromOffset(o);if(!f||(f.type==="object"||f.type==="array")&&o>f.offset+1&&o<f.offset+f.length-1)return this.promise.resolve(null);var d=f;if(f.type==="string"){var v=f.parent;if(v&&v.type==="property"&&v.keyNode===f&&(f=v.valueNode,!f))return this.promise.resolve(null)}for(var h=Wt.create(r.positionAt(d.offset),r.positionAt(d.offset+d.length)),g=function(W){var Y={contents:W,range:h};return Y},b=Ad(f),E=this.contributions.length-1;E>=0;E--){var V=this.contributions[E],I=V.getInfoContribution(r.uri,b);if(I)return I.then(function(W){return g(W)})}return this.schemaService.getSchemaForResource(r.uri,a).then(function(W){if(W){var Y=a.getMatchingSchemas(W.schema,f.offset),_=null,U=null,G=null,ce=null;Y.every(function(ge){if(ge.node===f&&!ge.inverted&&ge.schema&&(_=_||ge.schema.title,U=U||ge.schema.markdownDescription||Td(ge.schema.description),ge.schema.enum)){var ke=ge.schema.enum.indexOf(oo(f));ge.schema.markdownEnumDescriptions?G=ge.schema.markdownEnumDescriptions[ke]:ge.schema.enumDescriptions&&(G=Td(ge.schema.enumDescriptions[ke])),G&&(ce=ge.schema.enum[ke],typeof ce!="string"&&(ce=JSON.stringify(ce)))}return!0});var Ce="";return _&&(Ce=Td(_)),U&&(Ce.length>0&&(Ce+=`
|
|
195
258
|
|
|
196
|
-
`),
|
|
259
|
+
`),Ce+=U),G&&(Ce.length>0&&(Ce+=`
|
|
197
260
|
|
|
198
|
-
`),
|
|
261
|
+
`),Ce+="`"+Mg(ce)+"`: "+G),g([Ce])}return null})},e}();function Td(e){if(e){var r=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
199
262
|
|
|
200
|
-
$3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var sh=function(){var t=function(n,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var c in u)u.hasOwnProperty(c)&&(s[c]=u[c])},t(n,i)};return function(n,i){t(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),fr,Js;if(typeof process=="object")Js=!1;else if(typeof navigator=="object"){var lh=navigator.userAgent;Js=lh.indexOf("Windows")>=0}function Sv(t){return 55296<=t&&t<=56319}function wv(t){return 56320<=t&&t<=57343}function Cv(t){return t>=97&&t<=102}function uh(t){return t>=97&&t<=122}function fh(t){return t>=65&&t<=90}function Av(t){return uh(t)||fh(t)}var ch=/^\w[\w\d+.-]*$/,dh=/^\//,hh=/^\/\//;function ph(t,n){if(!t.scheme&&n)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!ch.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!dh.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(hh.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function vh(t,n){return!t&&!n?"file":t}function gh(t,n){switch(t){case"https":case"http":case"file":n?n[0]!==Xn&&(n=Xn+n):n=Xn;break}return n}var Yt="",Xn="/",mh=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,ac=function(){function t(n,i,s,u,c,h){h===void 0&&(h=!1),typeof n=="object"?(this.scheme=n.scheme||Yt,this.authority=n.authority||Yt,this.path=n.path||Yt,this.query=n.query||Yt,this.fragment=n.fragment||Yt):(this.scheme=vh(n,h),this.authority=i||Yt,this.path=gh(this.scheme,s||Yt),this.query=u||Yt,this.fragment=c||Yt,ph(this,h))}return t.isUri=function(n){return n instanceof t?!0:n?typeof n.authority=="string"&&typeof n.fragment=="string"&&typeof n.path=="string"&&typeof n.query=="string"&&typeof n.scheme=="string"&&typeof n.fsPath=="function"&&typeof n.with=="function"&&typeof n.toString=="function":!1},Object.defineProperty(t.prototype,"fsPath",{get:function(){return ad(this,!1)},enumerable:!0,configurable:!0}),t.prototype.with=function(n){if(!n)return this;var i=n.scheme,s=n.authority,u=n.path,c=n.query,h=n.fragment;return i===void 0?i=this.scheme:i===null&&(i=Yt),s===void 0?s=this.authority:s===null&&(s=Yt),u===void 0?u=this.path:u===null&&(u=Yt),c===void 0?c=this.query:c===null&&(c=Yt),h===void 0?h=this.fragment:h===null&&(h=Yt),i===this.scheme&&s===this.authority&&u===this.path&&c===this.query&&h===this.fragment?this:new $a(i,s,u,c,h)},t.parse=function(n,i){i===void 0&&(i=!1);var s=mh.exec(n);return s?new $a(s[2]||Yt,Fu(s[4]||Yt),Fu(s[5]||Yt),Fu(s[7]||Yt),Fu(s[9]||Yt),i):new $a(Yt,Yt,Yt,Yt,Yt)},t.file=function(n){var i=Yt;if(Js&&(n=n.replace(/\\/g,Xn)),n[0]===Xn&&n[1]===Xn){var s=n.indexOf(Xn,2);s===-1?(i=n.substring(2),n=Xn):(i=n.substring(2,s),n=n.substring(s)||Xn)}return new $a("file",i,n,Yt,Yt)},t.from=function(n){return new $a(n.scheme,n.authority,n.path,n.query,n.fragment)},t.prototype.toString=function(n){return n===void 0&&(n=!1),sc(this,n)},t.prototype.toJSON=function(){return this},t.revive=function(n){if(n){if(n instanceof t)return n;var i=new $a(n);return i._formatted=n.external,i._fsPath=n._sep===nd?n.fsPath:null,i}else return n},t}(),nd=Js?1:void 0,$a=function(t){sh(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(n.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=ad(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),n.prototype.toString=function(i){return i===void 0&&(i=!1),i?sc(this,!0):(this._formatted||(this._formatted=sc(this,!1)),this._formatted)},n.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=nd),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},n}(ac),id=(fr={},fr[58]="%3A",fr[47]="%2F",fr[63]="%3F",fr[35]="%23",fr[91]="%5B",fr[93]="%5D",fr[64]="%40",fr[33]="%21",fr[36]="%24",fr[38]="%26",fr[39]="%27",fr[40]="%28",fr[41]="%29",fr[42]="%2A",fr[43]="%2B",fr[44]="%2C",fr[59]="%3B",fr[61]="%3D",fr[32]="%20",fr);function od(t,n){for(var i=void 0,s=-1,u=0;u<t.length;u++){var c=t.charCodeAt(u);if(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===45||c===46||c===95||c===126||n&&c===47)s!==-1&&(i+=encodeURIComponent(t.substring(s,u)),s=-1),i!==void 0&&(i+=t.charAt(u));else{i===void 0&&(i=t.substr(0,u));var h=id[c];h!==void 0?(s!==-1&&(i+=encodeURIComponent(t.substring(s,u)),s=-1),i+=h):s===-1&&(s=u)}}return s!==-1&&(i+=encodeURIComponent(t.substring(s))),i!==void 0?i:t}function yh(t){for(var n=void 0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s===35||s===63?(n===void 0&&(n=t.substr(0,i)),n+=id[s]):n!==void 0&&(n+=t[i])}return n!==void 0?n:t}function ad(t,n){var i;return t.authority&&t.path.length>1&&t.scheme==="file"?i="//"+t.authority+t.path:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?n?i=t.path.substr(1):i=t.path[1].toLowerCase()+t.path.substr(2):i=t.path,Js&&(i=i.replace(/\//g,"\\")),i}function sc(t,n){var i=n?yh:od,s="",u=t.scheme,c=t.authority,h=t.path,m=t.query,p=t.fragment;if(u&&(s+=u,s+=":"),(c||u==="file")&&(s+=Xn,s+=Xn),c){var y=c.indexOf("@");if(y!==-1){var E=c.substr(0,y);c=c.substr(y+1),y=E.indexOf(":"),y===-1?s+=i(E,!1):(s+=i(E.substr(0,y),!1),s+=":",s+=i(E.substr(y+1),!1)),s+="@"}c=c.toLowerCase(),y=c.indexOf(":"),y===-1?s+=i(c,!1):(s+=i(c.substr(0,y),!1),s+=c.substr(y))}if(h){if(h.length>=3&&h.charCodeAt(0)===47&&h.charCodeAt(2)===58){var I=h.charCodeAt(1);I>=65&&I<=90&&(h="/"+String.fromCharCode(I+32)+":"+h.substr(3))}else if(h.length>=2&&h.charCodeAt(1)===58){var I=h.charCodeAt(0);I>=65&&I<=90&&(h=String.fromCharCode(I+32)+":"+h.substr(2))}s+=i(h,!0)}return m&&(s+="?",s+=i(m,!1)),p&&(s+="#",s+=n?p:od(p,!1)),s}function sd(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+sd(t.substr(3)):t}}var ld=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Fu(t){return t.match(ld)?t.replace(ld,function(n){return sd(n)}):t}var bh=function(){function t(n){try{this.patternRegExp=new RegExp(th(n)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return t.prototype.addSchema=function(n){this.schemas.push(n)},t.prototype.matchesPattern=function(n){return this.patternRegExp&&this.patternRegExp.test(n)},t.prototype.getSchemas=function(){return this.schemas},t}(),xh=function(){function t(n,i,s){this.service=n,this.url=i,this.dependencies={},s&&(this.unresolvedSchema=this.service.promise.resolve(new Ga(s)))}return t.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},t.prototype.getResolvedSchema=function(){var n=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return n.service.resolveSchemaContent(i,n.url,n.dependencies)})),this.resolvedSchema},t.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},t}(),Ga=function(){function t(n,i){i===void 0&&(i=[]),this.schema=n,this.errors=i}return t}(),ud=function(){function t(n,i){i===void 0&&(i=[]),this.schema=n,this.errors=i}return t.prototype.getSection=function(n){return cn(this.getSectionRecursive(n,this.schema))},t.prototype.getSectionRecursive=function(n,i){if(!i||typeof i=="boolean"||n.length===0)return i;var s=n.shift();if(i.properties&&typeof i.properties[s])return this.getSectionRecursive(n,i.properties[s]);if(i.patternProperties)for(var u=0,c=Object.keys(i.patternProperties);u<c.length;u++){var h=c[u],m=new RegExp(h);if(m.test(s))return this.getSectionRecursive(n,i.patternProperties[h])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(n,i.additionalProperties);if(s.match("[0-9]+")){if(Array.isArray(i.items)){var p=parseInt(s,10);if(!isNaN(p)&&i.items[p])return this.getSectionRecursive(n,i.items[p])}else if(i.items)return this.getSectionRecursive(n,i.items)}}return null},t}(),Sh=function(){function t(n,i,s){this.contextService=i,this.requestService=n,this.promiseConstructor=s||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return t.prototype.getRegisteredSchemaIds=function(n){return Object.keys(this.registeredSchemasIds).filter(function(i){var s=ac.parse(i).scheme;return s!=="schemaservice"&&(!n||n(s))})},Object.defineProperty(t.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(n){var i=this,s=!1;n=this.normalizeId(n);for(var u=[n],c=Object.keys(this.schemasById).map(function(y){return i.schemasById[y]});u.length;)for(var h=u.pop(),m=0;m<c.length;m++){var p=c[m];p&&(p.url===h||p.dependencies[h])&&(p.url!==h&&u.push(p.url),p.clearSchema(),c[m]=void 0,s=!0)}return s},t.prototype.normalizeId=function(n){try{return ac.parse(n).toString()}catch{return n}},t.prototype.setSchemaContributions=function(n){if(n.schemas){var i=n.schemas;for(var s in i){var u=this.normalizeId(s);this.contributionSchemas[u]=this.addSchemaHandle(u,i[s])}}if(n.schemaAssociations){var c=n.schemaAssociations;for(var h in c){var m=c[h];this.contributionAssociations[h]=m;for(var p=this.getOrAddFilePatternAssociation(h),y=0,E=m;y<E.length;y++){var I=E[y],s=this.normalizeId(I);p.addSchema(s)}}}},t.prototype.addSchemaHandle=function(n,i){var s=new xh(this,n,i);return this.schemasById[n]=s,s},t.prototype.getOrAddSchemaHandle=function(n,i){return this.schemasById[n]||this.addSchemaHandle(n,i)},t.prototype.getOrAddFilePatternAssociation=function(n){var i=this.filePatternAssociationById[n];return i||(i=new bh(n),this.filePatternAssociationById[n]=i,this.filePatternAssociations.push(i)),i},t.prototype.registerExternalSchema=function(n,i,s){i===void 0&&(i=null);var u=this.normalizeId(n);if(this.registeredSchemasIds[u]=!0,i)for(var c=0,h=i;c<h.length;c++){var m=h[c];this.getOrAddFilePatternAssociation(m).addSchema(u)}return s?this.addSchemaHandle(u,s):this.getOrAddSchemaHandle(u)},t.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var n in this.contributionSchemas)this.schemasById[n]=this.contributionSchemas[n],this.registeredSchemasIds[n]=!0;for(var i in this.contributionAssociations)for(var s=this.getOrAddFilePatternAssociation(i),u=0,c=this.contributionAssociations[i];u<c.length;u++){var h=c[u],n=this.normalizeId(h);s.addSchema(n)}},t.prototype.getResolvedSchema=function(n){var i=this.normalizeId(n),s=this.schemasById[i];return s?s.getResolvedSchema():this.promise.resolve(null)},t.prototype.loadSchema=function(n){if(!this.requestService){var i="Unable to load schema from '"+Ru(n)+"'. No schema request service available";return this.promise.resolve(new Ga({},[i]))}return this.requestService(n).then(function(s){if(!s){var u="Unable to load schema from '"+Ru(n)+"': No content.";return new Ga({},[u])}var c={},h=[];c=Jf(s,h);var m=h.length?["Unable to parse content from '"+Ru(n)+"': Parse error at offset "+h[0].offset]:[];return new Ga(c,m)},function(s){var u="Unable to load schema from '"+Ru(n)+"': "+s.toString();return new Ga({},[u])})},t.prototype.resolveSchemaContent=function(n,i,s){var u=this,c=n.errors.slice(0),h=n.schema;if(h.$schema){var m=this.normalizeId(h.$schema);if(m==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new ud({},["Draft-03 schemas are not supported."]));m==="https://json-schema.org/draft/2019-09/schema"&&n.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var p=this.contextService,y=function(W,$){if(!$)return W;var ae=W;return $[0]==="/"&&($=$.substr(1)),$.split("/").some(function(le){return ae=ae[le],!ae}),ae},E=function(W,$,ae,le){var oe=y($,le);if(oe)for(var fe in oe)oe.hasOwnProperty(fe)&&!W.hasOwnProperty(fe)&&(W[fe]=oe[fe]);else c.push("$ref '"+le+"' in '"+ae+"' can not be resolved.")},I=function(W,$,ae,le,oe){p&&!/^\w+:\/\/.*/.test($)&&($=p.resolveRelativePath($,le)),$=u.normalizeId($);var fe=u.getOrAddSchemaHandle($);return fe.getUnresolvedSchema().then(function(ye){if(oe[$]=!0,ye.errors.length){var Ae=ae?$+"#"+ae:$;c.push("Problems loading reference '"+Ae+"': "+ye.errors[0]+".")}return E(W,ye.schema,$,ae),Q(W,ye.schema,$,fe.dependencies)})},Q=function(W,$,ae,le){if(!W||typeof W!="object")return Promise.resolve(null);for(var oe=[W],fe=[],ye=[],Ae=function(){for(var pe=[],Le=0;Le<arguments.length;Le++)pe[Le]=arguments[Le];for(var Ee=0,je=pe;Ee<je.length;Ee++){var rt=je[Ee];typeof rt=="object"&&oe.push(rt)}},we=function(){for(var pe=[],Le=0;Le<arguments.length;Le++)pe[Le]=arguments[Le];for(var Ee=0,je=pe;Ee<je.length;Ee++){var rt=je[Ee];if(typeof rt=="object")for(var Pt in rt){var vt=rt[Pt];typeof vt=="object"&&oe.push(vt)}}},Te=function(){for(var pe=[],Le=0;Le<arguments.length;Le++)pe[Le]=arguments[Le];for(var Ee=0,je=pe;Ee<je.length;Ee++){var rt=je[Ee];if(Array.isArray(rt))for(var Pt=0,vt=rt;Pt<vt.length;Pt++){var jr=vt[Pt];typeof jr=="object"&&oe.push(jr)}}},ke=function(pe){for(var Le=[];pe.$ref;){var Ee=pe.$ref,je=Ee.split("#",2);if(delete pe.$ref,je[0].length>0){ye.push(I(pe,je[0],je[1],ae,le));return}else Le.indexOf(Ee)===-1&&(E(pe,$,ae,je[1]),Le.push(Ee))}Ae(pe.items,pe.additionalProperties,pe.not,pe.contains,pe.propertyNames,pe.if,pe.then,pe.else),we(pe.definitions,pe.properties,pe.patternProperties,pe.dependencies),Te(pe.anyOf,pe.allOf,pe.oneOf,pe.items)};oe.length;){var Me=oe.pop();fe.indexOf(Me)>=0||(fe.push(Me),ke(Me))}return u.promise.all(ye)};return Q(h,h,i,s).then(function(W){return new ud(h,c)})},t.prototype.getSchemaForResource=function(n,i){if(i&&i.root&&i.root.type==="object"){var s=i.root.properties.filter(function($){return $.keyNode.value==="$schema"&&$.valueNode&&$.valueNode.type==="string"});if(s.length>0){var u=Ao(s[0].valueNode);if(u&&eh(u,".")&&this.contextService&&(u=this.contextService.resolveRelativePath(u,n)),u){var c=this.normalizeId(u);return this.getOrAddSchemaHandle(c).getResolvedSchema()}}}for(var h=Object.create(null),m=[],p=0,y=this.filePatternAssociations;p<y.length;p++){var E=y[p];if(E.matchesPattern(n))for(var I=0,Q=E.getSchemas();I<Q.length;I++){var W=Q[I];h[W]||(m.push(W),h[W]=!0)}}return m.length>0?this.createCombinedSchema(n,m).getResolvedSchema():this.promise.resolve(null)},t.prototype.createCombinedSchema=function(n,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var s="schemaservice://combinedSchema/"+encodeURIComponent(n),u={allOf:i.map(function(c){return{$ref:c}})};return this.addSchemaHandle(s,u)},t}();function Ru(t){try{}catch{}return t}var wh=function(){function t(n,i){this.jsonSchemaService=n,this.promise=i,this.validationEnabled=!0}return t.prototype.configure=function(n){n&&(this.validationEnabled=n.validate,this.commentSeverity=n.allowComments?void 0:Je.Error)},t.prototype.doValidation=function(n,i,s,u){var c=this;if(!this.validationEnabled)return this.promise.resolve([]);var h=[],m={},p=function(I){var Q=I.range.start.line+" "+I.range.start.character+" "+I.message;m[Q]||(m[Q]=!0,h.push(I))},y=function(I){var Q=s?dd(s.trailingCommas):Je.Error,W=s?dd(s.comments):c.commentSeverity;if(I){if(I.errors.length&&i.root){var $=i.root,ae=$.type==="object"?$.properties[0]:null;if(ae&&ae.keyNode.value==="$schema"){var le=ae.valueNode||ae,oe=Oe.create(n.positionAt(le.offset),n.positionAt(le.offset+le.length));p(zt.create(oe,I.errors[0],Je.Warning,Tt.SchemaResolveError))}else{var oe=Oe.create(n.positionAt($.offset),n.positionAt($.offset+1));p(zt.create(oe,I.errors[0],Je.Warning,Tt.SchemaResolveError))}}else{var fe=i.validate(n,I.schema);fe&&fe.forEach(p)}fd(I.schema)&&(W=void 0),cd(I.schema)&&(Q=void 0)}for(var ye=0,Ae=i.syntaxErrors;ye<Ae.length;ye++){var we=Ae[ye];if(we.code===Tt.TrailingComma){if(typeof Q!="number")continue;we.severity=Q}p(we)}if(typeof W=="number"){var Te="Comments are not permitted in JSON.";i.comments.forEach(function(ke){p(zt.create(ke,Te,W,Tt.CommentNotPermitted))})}return h};if(u){var E=u.id||"schemaservice://untitled/"+Ch++;return this.jsonSchemaService.resolveSchemaContent(new Ga(u),E,{}).then(function(I){return y(I)})}return this.jsonSchemaService.getSchemaForResource(n.uri,i).then(function(I){return y(I)})},t}(),Ch=0;function fd(t){if(t&&typeof t=="object"){if(de(t.allowComments))return t.allowComments;if(t.allOf)for(var n=0,i=t.allOf;n<i.length;n++){var s=i[n],u=fd(s);if(de(u))return u}}}function cd(t){if(t&&typeof t=="object"){if(de(t.allowTrailingCommas))return t.allowTrailingCommas;if(de(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(var n=0,i=t.allOf;n<i.length;n++){var s=i[n],u=cd(s);if(de(u))return u}}}function dd(t){switch(t){case"error":return Je.Error;case"warning":return Je.Warning;case"ignore":return}}var hd=48,Ah=57,Oh=65,Bu=97,Eh=102;function cr(t){return t<hd?0:t<=Ah?t-hd:(t<Bu&&(t+=Bu-Oh),t>=Bu&&t<=Eh?t-Bu+10:0)}function kh(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:cr(t.charCodeAt(1))*17/255,green:cr(t.charCodeAt(2))*17/255,blue:cr(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:cr(t.charCodeAt(1))*17/255,green:cr(t.charCodeAt(2))*17/255,blue:cr(t.charCodeAt(3))*17/255,alpha:cr(t.charCodeAt(4))*17/255};case 7:return{red:(cr(t.charCodeAt(1))*16+cr(t.charCodeAt(2)))/255,green:(cr(t.charCodeAt(3))*16+cr(t.charCodeAt(4)))/255,blue:(cr(t.charCodeAt(5))*16+cr(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(cr(t.charCodeAt(1))*16+cr(t.charCodeAt(2)))/255,green:(cr(t.charCodeAt(3))*16+cr(t.charCodeAt(4)))/255,blue:(cr(t.charCodeAt(5))*16+cr(t.charCodeAt(6)))/255,alpha:(cr(t.charCodeAt(7))*16+cr(t.charCodeAt(8)))/255}}return null}function Ov(t,n,i,s){return s===void 0&&(s=1),{red:t/255,green:n/255,blue:i/255,alpha:s}}var Th=function(){function t(n){this.schemaService=n}return t.prototype.findDocumentSymbols=function(n,i,s){var u=this;s===void 0&&(s={resultLimit:Number.MAX_VALUE});var c=i.root;if(!c)return null;var h=s.resultLimit,m=n.uri;if((m==="vscode://defaultsettings/keybindings.json"||ic(m.toLowerCase(),"/user/keybindings.json"))&&c.type==="array"){for(var p=[],y=0,E=c.items;y<E.length;y++){var I=E[y];if(I.type==="object")for(var Q=0,W=I.properties;Q<W.length;Q++){var $=W[Q];if($.keyNode.value==="key"&&$.valueNode){var ae=Re.create(n.uri,Oo(n,I));if(p.push({name:Ao($.valueNode),kind:di.Function,location:ae}),h--,h<=0)return s&&s.onResultLimitExceeded&&s.onResultLimitExceeded(m),p}}}return p}var le=function(fe,ye,Ae){return h>=0&&(ye.type==="array"?ye.items.forEach(function(we){return le(fe,we,Ae)}):ye.type==="object"&&ye.properties.forEach(function(we){if(h>=0){var Te=we.valueNode;if(Te){h--;var ke=Re.create(n.uri,Oo(n,we)),Me=Ae?Ae+"."+we.keyNode.value:we.keyNode.value;fe.push({name:u.getKeyLabel(we),kind:u.getSymbolKind(Te.type),location:ke,containerName:Ae}),le(fe,Te,Me)}}})),fe},oe=le([],c,void 0);return h<0&&(oe.pop(),s&&s.onResultLimitExceeded&&s.onResultLimitExceeded(m)),oe},t.prototype.findDocumentSymbols2=function(n,i,s){var u=this;s===void 0&&(s={resultLimit:Number.MAX_VALUE});var c=i.root;if(!c)return null;var h=s.resultLimit,m=n.uri;if((m==="vscode://defaultsettings/keybindings.json"||ic(m.toLowerCase(),"/user/keybindings.json"))&&c.type==="array"){for(var p=[],y=0,E=c.items;y<E.length;y++){var I=E[y];if(I.type==="object")for(var Q=0,W=I.properties;Q<W.length;Q++){var $=W[Q];if($.keyNode.value==="key"&&$.valueNode){var ae=Oo(n,I),le=Oo(n,$.keyNode);if(p.push({name:Ao($.valueNode),kind:di.Function,range:ae,selectionRange:le}),h--,h<=0)return s&&s.onResultLimitExceeded&&s.onResultLimitExceeded(m),p}}}return p}var oe=function(ye,Ae){return h>=0&&(Ae.type==="array"?Ae.items.forEach(function(we,Te){if(we&&h>=0){h--;var ke=Oo(n,we),Me=ke,pe=String(Te),Le=oe([],we);ye.push({name:pe,kind:u.getSymbolKind(we.type),range:ke,selectionRange:Me,children:Le})}}):Ae.type==="object"&&Ae.properties.forEach(function(we){var Te=we.valueNode;if(Te&&h>=0){h--;var ke=Oo(n,we),Me=Oo(n,we.keyNode),pe=oe([],Te);ye.push({name:u.getKeyLabel(we),kind:u.getSymbolKind(Te.type),range:ke,selectionRange:Me,children:pe})}})),ye},fe=oe([],c);return h<0&&(fe.pop(),s&&s.onResultLimitExceeded&&s.onResultLimitExceeded(m)),fe},t.prototype.getSymbolKind=function(n){switch(n){case"object":return di.Module;case"string":return di.String;case"number":return di.Number;case"array":return di.Array;case"boolean":return di.Boolean;default:return di.Variable}},t.prototype.getKeyLabel=function(n){var i=n.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},t.prototype.findDocumentColors=function(n,i,s){return this.schemaService.getSchemaForResource(n.uri,i).then(function(u){var c=[];if(u)for(var h=s&&typeof s.resultLimit=="number"?s.resultLimit:Number.MAX_VALUE,m=i.getMatchingSchemas(u.schema),p={},y=0,E=m;y<E.length;y++){var I=E[y];if(!I.inverted&&I.schema&&(I.schema.format==="color"||I.schema.format==="color-hex")&&I.node&&I.node.type==="string"){var Q=String(I.node.offset);if(!p[Q]){var W=kh(Ao(I.node));if(W){var $=Oo(n,I.node);c.push({color:W,range:$})}if(p[Q]=!0,h--,h<=0)return s&&s.onResultLimitExceeded&&s.onResultLimitExceeded(n.uri),c}}}return c})},t.prototype.getColorPresentations=function(n,i,s,u){var c=[],h=Math.round(s.red*255),m=Math.round(s.green*255),p=Math.round(s.blue*255);function y(I){var Q=I.toString(16);return Q.length!==2?"0"+Q:Q}var E;return s.alpha===1?E="#"+y(h)+y(m)+y(p):E="#"+y(h)+y(m)+y(p)+y(Math.round(s.alpha*255)),c.push({label:E,textEdit:kt.replace(u,JSON.stringify(E))}),c},t}();function Oo(t,n){return Oe.create(t.positionAt(n.offset),t.positionAt(n.offset+n.length))}var Ph={schemaAssociations:{},schemas:{}};function Lh(t,n){var i=[],s=[],u=[],c=-1,h=Ht(t.getText(),!1),m=h.scan();function p(Le){i.push(Le),s.push(u.length)}for(;m!==17;){switch(m){case 1:case 3:{var y=t.positionAt(h.getTokenOffset()).line,E={startLine:y,endLine:y,kind:m===1?"object":"array"};u.push(E);break}case 2:case 4:{var I=m===2?"object":"array";if(u.length>0&&u[u.length-1].kind===I){var E=u.pop(),Q=t.positionAt(h.getTokenOffset()).line;E&&Q>E.startLine+1&&c!==E.startLine&&(E.endLine=Q-1,p(E),c=E.startLine)}break}case 13:{var y=t.positionAt(h.getTokenOffset()).line,W=t.positionAt(h.getTokenOffset()+h.getTokenLength()).line;h.getTokenError()===1&&y+1<t.lineCount?h.setPosition(t.offsetAt(Ne.create(y+1,0))):y<W&&(p({startLine:y,endLine:W,kind:Zt.Comment}),c=y);break}case 12:{var $=t.getText().substr(h.getTokenOffset(),h.getTokenLength()),ae=$.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(ae){var Q=t.positionAt(h.getTokenOffset()).line;if(ae[1]){var E={startLine:Q,endLine:Q,kind:Zt.Region};u.push(E)}else{for(var le=u.length-1;le>=0&&u[le].kind!==Zt.Region;)le--;if(le>=0){var E=u[le];u.length=le,Q>E.startLine&&c!==E.startLine&&(E.endLine=Q,p(E),c=E.startLine)}}}break}}m=h.scan()}var oe=n&&n.rangeLimit;if(typeof oe!="number"||i.length<=oe)return i;n&&n.onRangeLimitExceeded&&n.onRangeLimitExceeded(t.uri);for(var fe=[],ye=0,Ae=s;ye<Ae.length;ye++){var we=Ae[ye];we<30&&(fe[we]=(fe[we]||0)+1)}for(var Te=0,ke=0,le=0;le<fe.length;le++){var Me=fe[le];if(Me){if(Me+Te>oe){ke=le;break}Te+=Me}}for(var pe=[],le=0;le<i.length;le++){var we=s[le];typeof we=="number"&&(we<ke||we===ke&&Te++<oe)&&pe.push(i[le])}return pe}function Ih(t,n,i){function s(m){for(var p=t.offsetAt(m),y=i.getNodeFromOffset(p,!0),E=[];y;){switch(y.type){case"string":case"object":case"array":var I=y.offset+1,Q=y.offset+y.length-1;I<Q&&p>=I&&p<=Q&&E.push(u(I,Q)),E.push(u(y.offset,y.offset+y.length));break;case"number":case"boolean":case"null":case"property":E.push(u(y.offset,y.offset+y.length));break}if(y.type==="property"||y.parent&&y.parent.type==="array"){var W=h(y.offset+y.length,5);W!==-1&&E.push(u(y.offset,W))}y=y.parent}for(var $=void 0,ae=E.length-1;ae>=0;ae--)$=Nu.create(E[ae],$);return $||($=Nu.create(Oe.create(m,m))),$}function u(m,p){return Oe.create(t.positionAt(m),t.positionAt(p))}var c=Ht(t.getText(),!0);function h(m,p){c.setPosition(m);var y=c.scan();return y===p?c.getTokenOffset()+c.getTokenLength():-1}return n.map(s)}function Mh(t){var n=t.promiseConstructor||Promise,i=new Sh(t.schemaRequestService,t.workspaceContext,n);i.setSchemaContributions(Ph);var s=new ih(i,t.contributions,n,t.clientCapabilities),u=new oh(i,t.contributions,n),c=new Th(i),h=new wh(i,n);return{configure:function(m){i.clearExternalSchemas(),m.schemas&&m.schemas.forEach(function(p){i.registerExternalSchema(p.uri,p.fileMatch,p.schema)}),h.configure(m)},resetSchema:function(m){return i.onResourceChange(m)},doValidation:h.doValidation.bind(h),parseJSONDocument:function(m){return qd(m,{collectComments:!0})},newJSONDocument:function(m,p){return Zd(m,p)},doComplete:s.doComplete.bind(s),findDocumentSymbols:c.findDocumentSymbols.bind(c),findDocumentSymbols2:c.findDocumentSymbols2.bind(c),findColorSymbols:function(m,p){return c.findDocumentColors(m,p).then(function(y){return y.map(function(E){return E.range})})},findDocumentColors:c.findDocumentColors.bind(c),getColorPresentations:c.getColorPresentations.bind(c),doHover:u.doHover.bind(u),getFoldingRanges:Lh,getSelectionRanges:Ih,format:function(m,p,y){var E=void 0;if(p){var I=m.offsetAt(p.start),Q=m.offsetAt(p.end)-I;E={offset:I,length:Q}}var W={tabSize:y?y.tabSize:4,insertSpaces:y?y.insertSpaces:!0,eol:`
|
|
201
|
-
`};return
|
|
202
|
-
`)>-1){const
|
|
203
|
-
`+
|
|
263
|
+
$3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Mg(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ng=function(){var e=function(r,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var f in o)o.hasOwnProperty(f)&&(a[f]=o[f])},e(r,i)};return function(r,i){e(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),Ar,Yl;if(typeof process=="object")Yl=!1;else if(typeof navigator=="object"){var Rg=navigator.userAgent;Yl=Rg.indexOf("Windows")>=0}function b0(e){return 55296<=e&&e<=56319}function x0(e){return 56320<=e&&e<=57343}function S0(e){return e>=97&&e<=102}function Dg(e){return e>=97&&e<=122}function Bg(e){return e>=65&&e<=90}function w0(e){return Dg(e)||Bg(e)}var Vg=/^\w[\w\d+.-]*$/,jg=/^\//,Wg=/^\/\//;function Hg(e,r){if(!e.scheme&&r)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!Vg.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!jg.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Wg.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ug(e,r){return!e&&!r?"file":e}function _g(e,r){switch(e){case"https":case"http":case"file":r?r[0]!==Pi&&(r=Pi+r):r=Pi;break}return r}var qt="",Pi="/",zg=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,kd=function(){function e(r,i,a,o,f,d){d===void 0&&(d=!1),typeof r=="object"?(this.scheme=r.scheme||qt,this.authority=r.authority||qt,this.path=r.path||qt,this.query=r.query||qt,this.fragment=r.fragment||qt):(this.scheme=Ug(r,d),this.authority=i||qt,this.path=_g(this.scheme,a||qt),this.query=o||qt,this.fragment=f||qt,Hg(this,d))}return e.isUri=function(r){return r instanceof e?!0:r?typeof r.authority=="string"&&typeof r.fragment=="string"&&typeof r.path=="string"&&typeof r.query=="string"&&typeof r.scheme=="string"&&typeof r.fsPath=="function"&&typeof r.with=="function"&&typeof r.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return wh(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(r){if(!r)return this;var i=r.scheme,a=r.authority,o=r.path,f=r.query,d=r.fragment;return i===void 0?i=this.scheme:i===null&&(i=qt),a===void 0?a=this.authority:a===null&&(a=qt),o===void 0?o=this.path:o===null&&(o=qt),f===void 0?f=this.query:f===null&&(f=qt),d===void 0?d=this.fragment:d===null&&(d=qt),i===this.scheme&&a===this.authority&&o===this.path&&f===this.query&&d===this.fragment?this:new Ms(i,a,o,f,d)},e.parse=function(r,i){i===void 0&&(i=!1);var a=zg.exec(r);return a?new Ms(a[2]||qt,Xf(a[4]||qt),Xf(a[5]||qt),Xf(a[7]||qt),Xf(a[9]||qt),i):new Ms(qt,qt,qt,qt,qt)},e.file=function(r){var i=qt;if(Yl&&(r=r.replace(/\\/g,Pi)),r[0]===Pi&&r[1]===Pi){var a=r.indexOf(Pi,2);a===-1?(i=r.substring(2),r=Pi):(i=r.substring(2,a),r=r.substring(a)||Pi)}return new Ms("file",i,r,qt,qt)},e.from=function(r){return new Ms(r.scheme,r.authority,r.path,r.query,r.fragment)},e.prototype.toString=function(r){return r===void 0&&(r=!1),Pd(this,r)},e.prototype.toJSON=function(){return this},e.revive=function(r){if(r){if(r instanceof e)return r;var i=new Ms(r);return i._formatted=r.external,i._fsPath=r._sep===bh?r.fsPath:null,i}else return r},e}(),bh=Yl?1:void 0,Ms=function(e){Ng(r,e);function r(){var i=e!==null&&e.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(r.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=wh(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),r.prototype.toString=function(i){return i===void 0&&(i=!1),i?Pd(this,!0):(this._formatted||(this._formatted=Pd(this,!1)),this._formatted)},r.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=bh),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},r}(kd),xh=(Ar={},Ar[58]="%3A",Ar[47]="%2F",Ar[63]="%3F",Ar[35]="%23",Ar[91]="%5B",Ar[93]="%5D",Ar[64]="%40",Ar[33]="%21",Ar[36]="%24",Ar[38]="%26",Ar[39]="%27",Ar[40]="%28",Ar[41]="%29",Ar[42]="%2A",Ar[43]="%2B",Ar[44]="%2C",Ar[59]="%3B",Ar[61]="%3D",Ar[32]="%20",Ar);function Sh(e,r){for(var i=void 0,a=-1,o=0;o<e.length;o++){var f=e.charCodeAt(o);if(f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||f===45||f===46||f===95||f===126||r&&f===47)a!==-1&&(i+=encodeURIComponent(e.substring(a,o)),a=-1),i!==void 0&&(i+=e.charAt(o));else{i===void 0&&(i=e.substr(0,o));var d=xh[f];d!==void 0?(a!==-1&&(i+=encodeURIComponent(e.substring(a,o)),a=-1),i+=d):a===-1&&(a=o)}}return a!==-1&&(i+=encodeURIComponent(e.substring(a))),i!==void 0?i:e}function Gg(e){for(var r=void 0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a===35||a===63?(r===void 0&&(r=e.substr(0,i)),r+=xh[a]):r!==void 0&&(r+=e[i])}return r!==void 0?r:e}function wh(e,r){var i;return e.authority&&e.path.length>1&&e.scheme==="file"?i="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?r?i=e.path.substr(1):i=e.path[1].toLowerCase()+e.path.substr(2):i=e.path,Yl&&(i=i.replace(/\//g,"\\")),i}function Pd(e,r){var i=r?Gg:Sh,a="",o=e.scheme,f=e.authority,d=e.path,v=e.query,h=e.fragment;if(o&&(a+=o,a+=":"),(f||o==="file")&&(a+=Pi,a+=Pi),f){var g=f.indexOf("@");if(g!==-1){var b=f.substr(0,g);f=f.substr(g+1),g=b.indexOf(":"),g===-1?a+=i(b,!1):(a+=i(b.substr(0,g),!1),a+=":",a+=i(b.substr(g+1),!1)),a+="@"}f=f.toLowerCase(),g=f.indexOf(":"),g===-1?a+=i(f,!1):(a+=i(f.substr(0,g),!1),a+=f.substr(g))}if(d){if(d.length>=3&&d.charCodeAt(0)===47&&d.charCodeAt(2)===58){var E=d.charCodeAt(1);E>=65&&E<=90&&(d="/"+String.fromCharCode(E+32)+":"+d.substr(3))}else if(d.length>=2&&d.charCodeAt(1)===58){var E=d.charCodeAt(0);E>=65&&E<=90&&(d=String.fromCharCode(E+32)+":"+d.substr(2))}a+=i(d,!0)}return v&&(a+="?",a+=i(v,!1)),h&&(a+="#",a+=r?h:Sh(h,!1)),a}function Ch(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Ch(e.substr(3)):e}}var Ah=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Xf(e){return e.match(Ah)?e.replace(Ah,function(r){return Ch(r)}):e}var $g=function(){function e(r){try{this.patternRegExp=new RegExp(kg(r)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(r){this.schemas.push(r)},e.prototype.matchesPattern=function(r){return this.patternRegExp&&this.patternRegExp.test(r)},e.prototype.getSchemas=function(){return this.schemas},e}(),Kg=function(){function e(r,i,a){this.service=r,this.url=i,this.dependencies={},a&&(this.unresolvedSchema=this.service.promise.resolve(new Ns(a)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var r=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return r.service.resolveSchemaContent(i,r.url,r.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Ns=function(){function e(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return e}(),Oh=function(){function e(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return e.prototype.getSection=function(r){return Ln(this.getSectionRecursive(r,this.schema))},e.prototype.getSectionRecursive=function(r,i){if(!i||typeof i=="boolean"||r.length===0)return i;var a=r.shift();if(i.properties&&typeof i.properties[a])return this.getSectionRecursive(r,i.properties[a]);if(i.patternProperties)for(var o=0,f=Object.keys(i.patternProperties);o<f.length;o++){var d=f[o],v=new RegExp(d);if(v.test(a))return this.getSectionRecursive(r,i.patternProperties[d])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(r,i.additionalProperties);if(a.match("[0-9]+")){if(Array.isArray(i.items)){var h=parseInt(a,10);if(!isNaN(h)&&i.items[h])return this.getSectionRecursive(r,i.items[h])}else if(i.items)return this.getSectionRecursive(r,i.items)}}return null},e}(),Yg=function(){function e(r,i,a){this.contextService=i,this.requestService=r,this.promiseConstructor=a||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(r){return Object.keys(this.registeredSchemasIds).filter(function(i){var a=kd.parse(i).scheme;return a!=="schemaservice"&&(!r||r(a))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(r){var i=this,a=!1;r=this.normalizeId(r);for(var o=[r],f=Object.keys(this.schemasById).map(function(g){return i.schemasById[g]});o.length;)for(var d=o.pop(),v=0;v<f.length;v++){var h=f[v];h&&(h.url===d||h.dependencies[d])&&(h.url!==d&&o.push(h.url),h.clearSchema(),f[v]=void 0,a=!0)}return a},e.prototype.normalizeId=function(r){try{return kd.parse(r).toString()}catch{return r}},e.prototype.setSchemaContributions=function(r){if(r.schemas){var i=r.schemas;for(var a in i){var o=this.normalizeId(a);this.contributionSchemas[o]=this.addSchemaHandle(o,i[a])}}if(r.schemaAssociations){var f=r.schemaAssociations;for(var d in f){var v=f[d];this.contributionAssociations[d]=v;for(var h=this.getOrAddFilePatternAssociation(d),g=0,b=v;g<b.length;g++){var E=b[g],a=this.normalizeId(E);h.addSchema(a)}}}},e.prototype.addSchemaHandle=function(r,i){var a=new Kg(this,r,i);return this.schemasById[r]=a,a},e.prototype.getOrAddSchemaHandle=function(r,i){return this.schemasById[r]||this.addSchemaHandle(r,i)},e.prototype.getOrAddFilePatternAssociation=function(r){var i=this.filePatternAssociationById[r];return i||(i=new $g(r),this.filePatternAssociationById[r]=i,this.filePatternAssociations.push(i)),i},e.prototype.registerExternalSchema=function(r,i,a){i===void 0&&(i=null);var o=this.normalizeId(r);if(this.registeredSchemasIds[o]=!0,i)for(var f=0,d=i;f<d.length;f++){var v=d[f];this.getOrAddFilePatternAssociation(v).addSchema(o)}return a?this.addSchemaHandle(o,a):this.getOrAddSchemaHandle(o)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var r in this.contributionSchemas)this.schemasById[r]=this.contributionSchemas[r],this.registeredSchemasIds[r]=!0;for(var i in this.contributionAssociations)for(var a=this.getOrAddFilePatternAssociation(i),o=0,f=this.contributionAssociations[i];o<f.length;o++){var d=f[o],r=this.normalizeId(d);a.addSchema(r)}},e.prototype.getResolvedSchema=function(r){var i=this.normalizeId(r),a=this.schemasById[i];return a?a.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(r){if(!this.requestService){var i="Unable to load schema from '"+Jf(r)+"'. No schema request service available";return this.promise.resolve(new Ns({},[i]))}return this.requestService(r).then(function(a){if(!a){var o="Unable to load schema from '"+Jf(r)+"': No content.";return new Ns({},[o])}var f={},d=[];f=ug(a,d);var v=d.length?["Unable to parse content from '"+Jf(r)+"': Parse error at offset "+d[0].offset]:[];return new Ns(f,v)},function(a){var o="Unable to load schema from '"+Jf(r)+"': "+a.toString();return new Ns({},[o])})},e.prototype.resolveSchemaContent=function(r,i,a){var o=this,f=r.errors.slice(0),d=r.schema;if(d.$schema){var v=this.normalizeId(d.$schema);if(v==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Oh({},["Draft-03 schemas are not supported."]));v==="https://json-schema.org/draft/2019-09/schema"&&r.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var h=this.contextService,g=function(I,W){if(!W)return I;var Y=I;return W[0]==="/"&&(W=W.substr(1)),W.split("/").some(function(_){return Y=Y[_],!Y}),Y},b=function(I,W,Y,_){var U=g(W,_);if(U)for(var G in U)U.hasOwnProperty(G)&&!I.hasOwnProperty(G)&&(I[G]=U[G]);else f.push("$ref '"+_+"' in '"+Y+"' can not be resolved.")},E=function(I,W,Y,_,U){h&&!/^\w+:\/\/.*/.test(W)&&(W=h.resolveRelativePath(W,_)),W=o.normalizeId(W);var G=o.getOrAddSchemaHandle(W);return G.getUnresolvedSchema().then(function(ce){if(U[W]=!0,ce.errors.length){var Ce=Y?W+"#"+Y:W;f.push("Problems loading reference '"+Ce+"': "+ce.errors[0]+".")}return b(I,ce.schema,W,Y),V(I,ce.schema,W,G.dependencies)})},V=function(I,W,Y,_){if(!I||typeof I!="object")return Promise.resolve(null);for(var U=[I],G=[],ce=[],Ce=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];typeof Xe=="object"&&U.push(Xe)}},ge=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];if(typeof Xe=="object")for(var yt in Xe){var at=Xe[yt];typeof at=="object"&&U.push(at)}}},ke=function(){for(var ue=[],Oe=0;Oe<arguments.length;Oe++)ue[Oe]=arguments[Oe];for(var Te=0,Me=ue;Te<Me.length;Te++){var Xe=Me[Te];if(Array.isArray(Xe))for(var yt=0,at=Xe;yt<at.length;yt++){var fr=at[yt];typeof fr=="object"&&U.push(fr)}}},be=function(ue){for(var Oe=[];ue.$ref;){var Te=ue.$ref,Me=Te.split("#",2);if(delete ue.$ref,Me[0].length>0){ce.push(E(ue,Me[0],Me[1],Y,_));return}else Oe.indexOf(Te)===-1&&(b(ue,W,Y,Me[1]),Oe.push(Te))}Ce(ue.items,ue.additionalProperties,ue.not,ue.contains,ue.propertyNames,ue.if,ue.then,ue.else),ge(ue.definitions,ue.properties,ue.patternProperties,ue.dependencies),ke(ue.anyOf,ue.allOf,ue.oneOf,ue.items)};U.length;){var me=U.pop();G.indexOf(me)>=0||(G.push(me),be(me))}return o.promise.all(ce)};return V(d,d,i,a).then(function(I){return new Oh(d,f)})},e.prototype.getSchemaForResource=function(r,i){if(i&&i.root&&i.root.type==="object"){var a=i.root.properties.filter(function(W){return W.keyNode.value==="$schema"&&W.valueNode&&W.valueNode.type==="string"});if(a.length>0){var o=oo(a[0].valueNode);if(o&&Tg(o,".")&&this.contextService&&(o=this.contextService.resolveRelativePath(o,r)),o){var f=this.normalizeId(o);return this.getOrAddSchemaHandle(f).getResolvedSchema()}}}for(var d=Object.create(null),v=[],h=0,g=this.filePatternAssociations;h<g.length;h++){var b=g[h];if(b.matchesPattern(r))for(var E=0,V=b.getSchemas();E<V.length;E++){var I=V[E];d[I]||(v.push(I),d[I]=!0)}}return v.length>0?this.createCombinedSchema(r,v).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var a="schemaservice://combinedSchema/"+encodeURIComponent(r),o={allOf:i.map(function(f){return{$ref:f}})};return this.addSchemaHandle(a,o)},e}();function Jf(e){try{}catch{}return e}var Xg=function(){function e(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return e.prototype.configure=function(r){r&&(this.validationEnabled=r.validate,this.commentSeverity=r.allowComments?void 0:Ct.Error)},e.prototype.doValidation=function(r,i,a,o){var f=this;if(!this.validationEnabled)return this.promise.resolve([]);var d=[],v={},h=function(E){var V=E.range.start.line+" "+E.range.start.character+" "+E.message;v[V]||(v[V]=!0,d.push(E))},g=function(E){var V=a?kh(a.trailingCommas):Ct.Error,I=a?kh(a.comments):f.commentSeverity;if(E){if(E.errors.length&&i.root){var W=i.root,Y=W.type==="object"?W.properties[0]:null;if(Y&&Y.keyNode.value==="$schema"){var _=Y.valueNode||Y,U=Wt.create(r.positionAt(_.offset),r.positionAt(_.offset+_.length));h(Ca.create(U,E.errors[0],Ct.Warning,Bt.SchemaResolveError))}else{var U=Wt.create(r.positionAt(W.offset),r.positionAt(W.offset+1));h(Ca.create(U,E.errors[0],Ct.Warning,Bt.SchemaResolveError))}}else{var G=i.validate(r,E.schema);G&&G.forEach(h)}Eh(E.schema)&&(I=void 0),Th(E.schema)&&(V=void 0)}for(var ce=0,Ce=i.syntaxErrors;ce<Ce.length;ce++){var ge=Ce[ce];if(ge.code===Bt.TrailingComma){if(typeof V!="number")continue;ge.severity=V}h(ge)}if(typeof I=="number"){var ke="Comments are not permitted in JSON.";i.comments.forEach(function(be){h(Ca.create(be,ke,I,Bt.CommentNotPermitted))})}return d};if(o){var b=o.id||"schemaservice://untitled/"+Jg++;return this.jsonSchemaService.resolveSchemaContent(new Ns(o),b,{}).then(function(E){return g(E)})}return this.jsonSchemaService.getSchemaForResource(r.uri,i).then(function(E){return g(E)})},e}(),Jg=0;function Eh(e){if(e&&typeof e=="object"){if(Gi(e.allowComments))return e.allowComments;if(e.allOf)for(var r=0,i=e.allOf;r<i.length;r++){var a=i[r],o=Eh(a);if(Gi(o))return o}}}function Th(e){if(e&&typeof e=="object"){if(Gi(e.allowTrailingCommas))return e.allowTrailingCommas;if(Gi(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var r=0,i=e.allOf;r<i.length;r++){var a=i[r],o=Th(a);if(Gi(o))return o}}}function kh(e){switch(e){case"error":return Ct.Error;case"warning":return Ct.Warning;case"ignore":return}}var Ph=48,Qg=57,Zg=65,Qf=97,qg=102;function Or(e){return e<Ph?0:e<=Qg?e-Ph:(e<Qf&&(e+=Qf-Zg),e>=Qf&&e<=qg?e-Qf+10:0)}function em(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Or(e.charCodeAt(1))*17/255,green:Or(e.charCodeAt(2))*17/255,blue:Or(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Or(e.charCodeAt(1))*17/255,green:Or(e.charCodeAt(2))*17/255,blue:Or(e.charCodeAt(3))*17/255,alpha:Or(e.charCodeAt(4))*17/255};case 7:return{red:(Or(e.charCodeAt(1))*16+Or(e.charCodeAt(2)))/255,green:(Or(e.charCodeAt(3))*16+Or(e.charCodeAt(4)))/255,blue:(Or(e.charCodeAt(5))*16+Or(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Or(e.charCodeAt(1))*16+Or(e.charCodeAt(2)))/255,green:(Or(e.charCodeAt(3))*16+Or(e.charCodeAt(4)))/255,blue:(Or(e.charCodeAt(5))*16+Or(e.charCodeAt(6)))/255,alpha:(Or(e.charCodeAt(7))*16+Or(e.charCodeAt(8)))/255}}return null}function C0(e,r,i,a){return a===void 0&&(a=1),{red:e/255,green:r/255,blue:i/255,alpha:a}}var tm=function(){function e(r){this.schemaService=r}return e.prototype.findDocumentSymbols=function(r,i,a){var o=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var f=i.root;if(!f)return null;var d=a.resultLimit,v=r.uri;if((v==="vscode://defaultsettings/keybindings.json"||Ed(v.toLowerCase(),"/user/keybindings.json"))&&f.type==="array"){for(var h=[],g=0,b=f.items;g<b.length;g++){var E=b[g];if(E.type==="object")for(var V=0,I=E.properties;V<I.length;V++){var W=I[V];if(W.keyNode.value==="key"&&W.valueNode){var Y=Fs.create(r.uri,so(r,E));if(h.push({name:oo(W.valueNode),kind:$i.Function,location:Y}),d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v),h}}}return h}var _=function(G,ce,Ce){return d>=0&&(ce.type==="array"?ce.items.forEach(function(ge){return _(G,ge,Ce)}):ce.type==="object"&&ce.properties.forEach(function(ge){if(d>=0){var ke=ge.valueNode;if(ke){d--;var be=Fs.create(r.uri,so(r,ge)),me=Ce?Ce+"."+ge.keyNode.value:ge.keyNode.value;G.push({name:o.getKeyLabel(ge),kind:o.getSymbolKind(ke.type),location:be,containerName:Ce}),_(G,ke,me)}}})),G},U=_([],f,void 0);return d<0&&(U.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v)),U},e.prototype.findDocumentSymbols2=function(r,i,a){var o=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var f=i.root;if(!f)return null;var d=a.resultLimit,v=r.uri;if((v==="vscode://defaultsettings/keybindings.json"||Ed(v.toLowerCase(),"/user/keybindings.json"))&&f.type==="array"){for(var h=[],g=0,b=f.items;g<b.length;g++){var E=b[g];if(E.type==="object")for(var V=0,I=E.properties;V<I.length;V++){var W=I[V];if(W.keyNode.value==="key"&&W.valueNode){var Y=so(r,E),_=so(r,W.keyNode);if(h.push({name:oo(W.valueNode),kind:$i.Function,range:Y,selectionRange:_}),d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v),h}}}return h}var U=function(ce,Ce){return d>=0&&(Ce.type==="array"?Ce.items.forEach(function(ge,ke){if(ge&&d>=0){d--;var be=so(r,ge),me=be,ue=String(ke),Oe=U([],ge);ce.push({name:ue,kind:o.getSymbolKind(ge.type),range:be,selectionRange:me,children:Oe})}}):Ce.type==="object"&&Ce.properties.forEach(function(ge){var ke=ge.valueNode;if(ke&&d>=0){d--;var be=so(r,ge),me=so(r,ge.keyNode),ue=U([],ke);ce.push({name:o.getKeyLabel(ge),kind:o.getSymbolKind(ke.type),range:be,selectionRange:me,children:ue})}})),ce},G=U([],f);return d<0&&(G.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(v)),G},e.prototype.getSymbolKind=function(r){switch(r){case"object":return $i.Module;case"string":return $i.String;case"number":return $i.Number;case"array":return $i.Array;case"boolean":return $i.Boolean;default:return $i.Variable}},e.prototype.getKeyLabel=function(r){var i=r.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},e.prototype.findDocumentColors=function(r,i,a){return this.schemaService.getSchemaForResource(r.uri,i).then(function(o){var f=[];if(o)for(var d=a&&typeof a.resultLimit=="number"?a.resultLimit:Number.MAX_VALUE,v=i.getMatchingSchemas(o.schema),h={},g=0,b=v;g<b.length;g++){var E=b[g];if(!E.inverted&&E.schema&&(E.schema.format==="color"||E.schema.format==="color-hex")&&E.node&&E.node.type==="string"){var V=String(E.node.offset);if(!h[V]){var I=em(oo(E.node));if(I){var W=so(r,E.node);f.push({color:I,range:W})}if(h[V]=!0,d--,d<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(r.uri),f}}}return f})},e.prototype.getColorPresentations=function(r,i,a,o){var f=[],d=Math.round(a.red*255),v=Math.round(a.green*255),h=Math.round(a.blue*255);function g(E){var V=E.toString(16);return V.length!==2?"0"+V:V}var b;return a.alpha===1?b="#"+g(d)+g(v)+g(h):b="#"+g(d)+g(v)+g(h)+g(Math.round(a.alpha*255)),f.push({label:b,textEdit:pi.replace(o,JSON.stringify(b))}),f},e}();function so(e,r){return Wt.create(e.positionAt(r.offset),e.positionAt(r.offset+r.length))}var rm={schemaAssociations:{},schemas:{}};function nm(e,r){var i=[],a=[],o=[],f=-1,d=Ps(e.getText(),!1),v=d.scan();function h(Oe){i.push(Oe),a.push(o.length)}for(;v!==17;){switch(v){case 1:case 3:{var g=e.positionAt(d.getTokenOffset()).line,b={startLine:g,endLine:g,kind:v===1?"object":"array"};o.push(b);break}case 2:case 4:{var E=v===2?"object":"array";if(o.length>0&&o[o.length-1].kind===E){var b=o.pop(),V=e.positionAt(d.getTokenOffset()).line;b&&V>b.startLine+1&&f!==b.startLine&&(b.endLine=V-1,h(b),f=b.startLine)}break}case 13:{var g=e.positionAt(d.getTokenOffset()).line,I=e.positionAt(d.getTokenOffset()+d.getTokenLength()).line;d.getTokenError()===1&&g+1<e.lineCount?d.setPosition(e.offsetAt(di.create(g+1,0))):g<I&&(h({startLine:g,endLine:I,kind:_l.Comment}),f=g);break}case 12:{var W=e.getText().substr(d.getTokenOffset(),d.getTokenLength()),Y=W.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(Y){var V=e.positionAt(d.getTokenOffset()).line;if(Y[1]){var b={startLine:V,endLine:V,kind:_l.Region};o.push(b)}else{for(var _=o.length-1;_>=0&&o[_].kind!==_l.Region;)_--;if(_>=0){var b=o[_];o.length=_,V>b.startLine&&f!==b.startLine&&(b.endLine=V,h(b),f=b.startLine)}}}break}}v=d.scan()}var U=r&&r.rangeLimit;if(typeof U!="number"||i.length<=U)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(e.uri);for(var G=[],ce=0,Ce=a;ce<Ce.length;ce++){var ge=Ce[ce];ge<30&&(G[ge]=(G[ge]||0)+1)}for(var ke=0,be=0,_=0;_<G.length;_++){var me=G[_];if(me){if(me+ke>U){be=_;break}ke+=me}}for(var ue=[],_=0;_<i.length;_++){var ge=a[_];typeof ge=="number"&&(ge<be||ge===be&&ke++<U)&&ue.push(i[_])}return ue}function im(e,r,i){function a(v){for(var h=e.offsetAt(v),g=i.getNodeFromOffset(h,!0),b=[];g;){switch(g.type){case"string":case"object":case"array":var E=g.offset+1,V=g.offset+g.length-1;E<V&&h>=E&&h<=V&&b.push(o(E,V)),b.push(o(g.offset,g.offset+g.length));break;case"number":case"boolean":case"null":case"property":b.push(o(g.offset,g.offset+g.length));break}if(g.type==="property"||g.parent&&g.parent.type==="array"){var I=d(g.offset+g.length,5);I!==-1&&b.push(o(g.offset,I))}g=g.parent}for(var W=void 0,Y=b.length-1;Y>=0;Y--)W=Kf.create(b[Y],W);return W||(W=Kf.create(Wt.create(v,v))),W}function o(v,h){return Wt.create(e.positionAt(v),e.positionAt(h))}var f=Ps(e.getText(),!0);function d(v,h){f.setPosition(v);var g=f.scan();return g===h?f.getTokenOffset()+f.getTokenLength():-1}return r.map(a)}function am(e){var r=e.promiseConstructor||Promise,i=new Yg(e.schemaRequestService,e.workspaceContext,r);i.setSchemaContributions(rm);var a=new Ig(i,e.contributions,r,e.clientCapabilities),o=new Lg(i,e.contributions,r),f=new tm(i),d=new Xg(i,r);return{configure:function(v){i.clearExternalSchemas(),v.schemas&&v.schemas.forEach(function(h){i.registerExternalSchema(h.uri,h.fileMatch,h.schema)}),d.configure(v)},resetSchema:function(v){return i.onResourceChange(v)},doValidation:d.doValidation.bind(d),parseJSONDocument:function(v){return Eg(v,{collectComments:!0})},newJSONDocument:function(v,h){return Og(v,h)},doComplete:a.doComplete.bind(a),findDocumentSymbols:f.findDocumentSymbols.bind(f),findDocumentSymbols2:f.findDocumentSymbols2.bind(f),findColorSymbols:function(v,h){return f.findDocumentColors(v,h).then(function(g){return g.map(function(b){return b.range})})},findDocumentColors:f.findDocumentColors.bind(f),getColorPresentations:f.getColorPresentations.bind(f),doHover:o.doHover.bind(o),getFoldingRanges:nm,getSelectionRanges:im,format:function(v,h,g){var b=void 0;if(h){var E=v.offsetAt(h.start),V=v.offsetAt(h.end)-E;b={offset:E,length:V}}var I={tabSize:g?g.tabSize:4,insertSpaces:g?g.insertSpaces:!0,eol:`
|
|
264
|
+
`};return pg(v.getText(),b,I).map(function(W){return pi.replace(Wt.create(v.positionAt(W.offset),v.positionAt(W.offset+W.length)),W.content)})}}}var Fh=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});let lo=null;dt.Qg&&(lo=c(46944),c(13156),c(82518),c(33201),c(77436),c(29641),c(71628),c(6766),c(49812),c(17664),c(83539));const Rs=am({});lo&&(lo.registerHelper("lint","json",function(e,r){return Fh(this,null,function*(){const{schema:i,setError:a}=r;Rs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const o=Yf.create(r.id+".json","json",0,e),f=Rs.parseJSONDocument(o),d=yield Rs.doValidation(o,f);return d.length?a&&a(d[0].message):a&&a(void 0),d.map(v=>({from:lo.Pos(v.range.start.line,v.range.start.character),to:lo.Pos(v.range.end.line,v.range.end.character),message:v.message}))})}),lo.registerHelper("hint","json",(e,r)=>Fh(void 0,null,function*(){const i=r.schema;if(!i)return;Rs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const a=e.getDoc().getCursor(),o=e.getTokenAt(a),f=Yf.create(r.id+".json","json",0,e.getValue()),d=Rs.parseJSONDocument(f),v=yield Rs.doComplete(f,{line:a.line,character:a.ch},d),h=b=>{let E="";for(;b--;)E+=" ";return E};let g=v?v.items.map(b=>({text:b.insertText,displayText:b.label,filter:b.filterText||b.label,from:{line:b.textEdit.range.start.line,ch:b.textEdit.range.start.character},to:{line:b.textEdit.range.end.line,ch:b.textEdit.range.end.character},hint:(E,V,I)=>{const W="_$__REDOC_CURSOR_HERE";let Y=I.text.replace(/(\$1|\${1:[^}]+})/,W)||"";if(Y=Y.replace(/(\$\d+|\${[^}]+})/g,"")||"",E.setSelection(I.from,I.to),Y.indexOf(`
|
|
265
|
+
`)>-1){const U=E.getLine(E.getCursor().line).search(/(\S|$)/);Y=Y.replace(/\n/g,`
|
|
266
|
+
`+h(U))}E.replaceSelection(Y);const _=E.getSearchCursor(W,I.from);_.findNext()&&(E.setCursor(_.from()),_.replace(""))}})):[];return/(property|string)/.test(o.type||"")&&(g=g.filter(b=>b.filter.replace(/(^"|"$)/g,"").startsWith(o.string.replace(/(^"|"$)/g,"")))),{from:lo.Pos(a.line,o.start),to:lo.Pos(a.line,a.ch),list:g}})));const om=(0,At.vJ)`
|
|
204
267
|
.cm-s-material.CodeMirror {
|
|
205
|
-
background-color: var(--
|
|
206
|
-
color: var(--
|
|
207
|
-
font-family: var(--code-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
line-height: var(--code-block-line-height);
|
|
211
|
-
padding: var(--code-block-padding);
|
|
212
|
-
white-space: var(--code-wrap, pre);
|
|
268
|
+
background-color: var(--panel-samples-controls-background-color)!important;
|
|
269
|
+
color: var(--text-color-inverse)!important;
|
|
270
|
+
font-family: var(--code-font-family);
|
|
271
|
+
line-height: 18px;
|
|
272
|
+
padding: 10px;
|
|
213
273
|
}
|
|
214
274
|
|
|
215
275
|
.CodeMirror-lint-mark-error {
|
|
@@ -217,6 +277,10 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
217
277
|
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAVUlEQVR42mNgQAL/GRjigPg/EP8FYntkCX4gtoVKgvE/BoabcEVAhj6S5DUgfgFl/wFJ2gPxL6iuT1DF+kD2R5AYA5KRj6CS/FAMYvszIBltz4AFAAD9fz0YtLg13wAAAABJRU5ErkJggg==') !important;
|
|
218
278
|
}
|
|
219
279
|
|
|
280
|
+
.cm-s-material.CodeMirror-focused div.CodeMirror-selected {
|
|
281
|
+
background: rgba(255, 255, 255, 0.3) !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
220
284
|
.cm-s-material .CodeMirror-code .cm-string.cm-property {
|
|
221
285
|
color: var(--code-block-tokens-property-string-color);
|
|
222
286
|
}
|
|
@@ -226,17 +290,12 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
226
290
|
}
|
|
227
291
|
|
|
228
292
|
.cm-s-material .CodeMirror-code .cm-atom {
|
|
229
|
-
color: var(--text-
|
|
293
|
+
color: var(--text-color-inverse);
|
|
230
294
|
}
|
|
231
295
|
|
|
232
296
|
div .cm-s-material .CodeMirror-matchingbracket {
|
|
233
297
|
outline: 1px solid grey;
|
|
234
298
|
text-decoration: none;
|
|
235
|
-
color: var(--color-gold-8) !important;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
div .cm-s-material .CodeMirror-nonmatchingbracket {
|
|
239
|
-
color: var(--color-red-8) !important;
|
|
240
299
|
}
|
|
241
300
|
|
|
242
301
|
.react-codemirror2 {
|
|
@@ -252,7 +311,7 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
252
311
|
flex: 1;
|
|
253
312
|
border-radius: var(--panel-border-radius);
|
|
254
313
|
}
|
|
255
|
-
`,
|
|
314
|
+
`,sm=ci(({fieldState:e,fieldApi:r,onChange:i,onBlur:a,forwardedRef:o,id:f,mode:d,schema:v})=>{let h;const g=(_,U)=>{/^[a-zA-Z0-9_":]$/.test(U.key)&&h.execCommand("autocomplete")},b=_=>{h=_,h.on("keyup",g)},E=()=>{h.refresh()},V=()=>h.showHint({completeSingle:!0});(0,Jt.useMount)(()=>{setTimeout(()=>{h.refresh()},0),document.addEventListener("click",E)}),(0,Jt.useUnmount)(()=>{document.removeEventListener("click",E)});const{value:I}=e,{setValue:W,setTouched:Y}=r;return A.createElement(A.Fragment,null,A.createElement(om,null),A.createElement(Zv.fk,{editorDidMount:b,value:I||"",ref:o,onBeforeChange:(_,U,G)=>{W(G),i&&i(G)},onBlur:_=>{Y(!1),a&&a(_)},options:{mode:d||Bf.Tr.JSON,theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":V,"Ctrl-Space":V},hintOptions:{id:f,completeSingle:!1,schema:v}}}))});var Fd=c(91582);function lm({mediaType:e,mediaContent:r,properties:i,id:a,resolvedBody:o,formApi:f,getActiveSample:d,validate:v}){const h=(0,Fd.yN)(r),g=e.examples||{},b=Object.keys(g),E=e.schema,V=ds(E||{},e.name)||e.name===Bf.Tr.MULTIPART||e.name===Bf.Tr.URL_ENCODED,{exampleKey:I}=(0,fd.C6)(e.operation,g),W=(0,dt.YQ)((0,xt.P6)(a,e.name,I,g))||(0,xt.oY)(g[I],i),Y=(0,A.useCallback)((G="",ce="",Ce=[])=>ge=>{(0,dt.WW)((0,xt.P6)(a,G,ce,Ce),ge)},[a]),_=(0,A.useCallback)(G=>{h&&h(G),f.setValue("body",d(G))},[f,d,h]),U=(0,A.useCallback)((G,ce)=>{f.setValue(`body.${G}`,ce)},[f]);return A.createElement(A.Fragment,null,b.length&&b.length!==1&&A.createElement(fd.b_,{examples:g,onChange:_,exampleKey:I,panel:"try-it"})||null,V?A.createElement(Jv,{mediaType:e,formApi:f,onChange:U}):A.createElement(sm,{id:"body"+a,field:"body",initialValue:W,schema:(o?.content[e.name]||{}).schema,mode:e.name,validate:v,onChange:Y(e.name,I,g)}))}const um=(0,A.memo)(lm);var fm=c(52383),cm=Object.defineProperty,dm=Object.defineProperties,pm=Object.getOwnPropertyDescriptors,Ih=Object.getOwnPropertySymbols,hm=Object.prototype.hasOwnProperty,vm=Object.prototype.propertyIsEnumerable,Lh=(e,r,i)=>r in e?cm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,gm=(e,r)=>{for(var i in r||(r={}))hm.call(r,i)&&Lh(e,i,r[i]);if(Ih)for(var i of Ih(r))vm.call(r,i)&&Lh(e,i,r[i]);return e},mm=(e,r)=>dm(e,pm(r));function ym({body:{content:e},formApi:r,resolvedBody:i,properties:a,id:o,validate:f,pointer:d}){const v=(0,ui.useRecoilValue)(fm.UF),{examples:h,name:g}=e&&(0,$n.getActiveMediaType)(e,v)||{},b=(0,A.useCallback)(I=>{if(!e||!e.hasSample||!h?.[I])return"";const W=g&&(0,dt.YQ)((0,xt.P6)(o,g,I,h)),Y=W?JSON.parse(W):h?.[I];return(0,xt.oY)(Y,a)},[g,h,o,e,a]),{activeExampleName:E}=(0,ui.useRecoilValue)((0,cd.N)(d));(0,A.useEffect)(()=>{if(g){const I=(0,xt.P6)(o,g,E,h);r.setValue("body",(0,dt.YQ)(I)||b(E||""))}else r.setValue("body",JSON.stringify(a||{},null,2))},[h,E,g,r,b,o,a]);const V=I=>A.createElement(Hv.C,mm(gm({},I),{variant:"dark",fullWidth:!0,Label:zv,Dropdown:_v.Lt}));return A.createElement(A.Fragment,null,A.createElement(Uv.d,{content:e,renderDropdown:V},I=>A.createElement(um,{mediaType:I,mediaContent:e,resolvedBody:i,id:o,properties:a,getActiveSample:b,formApi:r,validate:f})))}const bm=(0,A.memo)(ym),xm=ci(({initValue:e,paramEnum:r,fieldApi:i})=>{const[a,o]=(0,A.useState)(),f=r.map((h,g)=>({idx:g,value:h})),d=h=>{i.setValue(h.value),o(h.value)};(0,Jt.useMount)(()=>{if(e)if(Array.isArray(e)){const h=e.length?e[0]:"";o(h),i.setValue(h)}else o(e),i.setValue(e)});const v=()=>{i.setValue(""),o("")};return A.createElement(mn.VD,{clearable:!0,fullWidth:!0,variant:"dark",value:a,options:f,handleClear:v,onChange:d})}),Sm=({name:e,param:r,place:i,renderParameter:a})=>{var o,f,d,v,h;const[g,b]=A.useState([]),E=()=>{b([...g,g.length?g[g.length-1]+1:0])},V=W=>{b(g.filter(Y=>Y!==W))},I=(o=r.schema.items)!=null&&o.fields?(f=r.schema.items)==null?void 0:f.fields:[{schema:((d=r.schema.items)==null?void 0:d.schema)||r.schema.items,name:"",required:r.required,description:(v=r.schema.items)==null?void 0:v.description,externalDocs:(h=r.schema.items)==null?void 0:h.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1}];return A.createElement(A.Fragment,null,A.createElement(Mh,null,A.createElement(Ye.lX,{required:r.required},e,"(",g.length," items)"),A.createElement("span",{onClick:E},"Add item +")),g?.map((W,Y)=>A.createElement(Mh,{key:W},I.map(_=>a(_,i,`${e}.[${W}]`,`[${Y}]${_.name&&"."+_.name}`,A.createElement(wm,{onClick:()=>V(W)},"Delete"))))))},Mh=At.ZP.div`
|
|
256
315
|
display: flex;
|
|
257
316
|
width: 100%;
|
|
258
317
|
align-items: center;
|
|
@@ -268,19 +327,19 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
268
327
|
span {
|
|
269
328
|
cursor: pointer;
|
|
270
329
|
margin-left: auto;
|
|
271
|
-
color: var(--text-secondary);
|
|
330
|
+
color: var(--text-color-secondary);
|
|
272
331
|
&:hover {
|
|
273
332
|
color: #fff;
|
|
274
333
|
}
|
|
275
334
|
}
|
|
276
|
-
`,
|
|
335
|
+
`,wm=At.ZP.span`
|
|
277
336
|
background: transparent;
|
|
278
337
|
border: none;
|
|
279
338
|
cursor: pointer;
|
|
280
339
|
position: relative;
|
|
281
340
|
margin-left: 5px;
|
|
282
341
|
display: inline-block;
|
|
283
|
-
`;var
|
|
342
|
+
`;var Xl=(e=>(e.ARRAY="array",e.OBJECT="object",e))(Xl||{});function Cm({schema:e,example:r}){return`(${e.type})`+(r?` ${r}`:"")}function Am(e){const r={};return e.forEach(i=>{i.in&&(r[i.in]||(r[i.in]=[]),r[i.in].push(i))}),r}function Om({schema:e,required:r}){return i=>{if(r&&!i)return"Field is required";if(r&&e.type===Xl.ARRAY&&Array.isArray(i)){if(i.length>(e.rawSchema&&e.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${e.rawSchema.maxItems}`;if(i.length<(e.rawSchema&&e.rawSchema.minItems||0)){const a=e.rawSchema.minItems;return`You should select at least ${a===1?`${a} item`:`${a} items`}`}}}}function Em(e){if(e.type===Xl.ARRAY){const r=e.default||e.example;if(!r&&typeof e.rawSchema.items!="boolean"&&Array.isArray(e.rawSchema.items)){if(e.rawSchema.items[0].default)return[e.rawSchema.items[0].default];if(e.rawSchema.items[0].example)return[e.rawSchema.items[0].example]}if(!r&&typeof e.rawSchema.items!="boolean"&&!Array.isArray(e.rawSchema.items)&&(0,dt.Kn)(e.rawSchema.items)){if(e.rawSchema.items.default)return[e.rawSchema.items.default];if(e.rawSchema.items.example)return[e.rawSchema.items.example]}return r||[]}else return(Number.isInteger(e.default)?e.default.toString():e.default)||e.example}function Tm({oneOfType:e}){return e}const km=["path","query","cookie","header"];function Pm({id:e,param:r,values:i}){const a=(0,A.useMemo)(()=>Om(r),[r]),o=Array.isArray(r.schema.enum)&&r.schema.enum.length?r.schema.enum:void 0,f=Em(r.schema),d=e.split(".").map(v=>(0,dt.dw)(v));return o?A.createElement(Ye.NI,null,A.createElement(xm,{initValue:f,paramEnum:o,field:e})):A.createElement(In,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:Cm(r),validate:a,initialValue:f||(0,dt.U2)(i,d),validateOnBlur:!0,validateOnChange:!0})}function Fm({values:e,operation:r}){const i=(0,A.useMemo)(()=>Am(r.parameters||[]),[r]),a=(f,d,v,h,g)=>{var b;const E=v?(0,dt.s1)(v,f.name):f.name,V=Tm(f.schema),I=v?[d,v]:[f.in],W=(0,dt.s1)(...I,(0,dt.A8)(f.name));return V&&console.warn(`Unsupported parameter definition: "${V}"`),(Array.isArray(f.schema.type)?f.schema.type:[f.schema.type]).includes(Xl.ARRAY)?A.createElement(Sm,{key:W,name:E,param:f,place:d,renderParameter:a}):f.schema.type===Xl.OBJECT?(b=f.schema.fields)==null?void 0:b.map(_=>a(_,d,E)):A.createElement(Ye.NI,{key:W},A.createElement(Ye.lX,{required:f.required},h||E,": ",g),V?A.createElement(Ye.GE,null,"Unsupported field schema definition"):A.createElement(Pm,{id:W,param:f,values:e}))},o=f=>{const d=i[f];return!d||!d.length?null:A.createElement(A.Fragment,{key:f},A.createElement(Ye.NI,null,A.createElement(Ye.iG,null," # ",f," parameters "),A.createElement("span",null,"\xA0")),d.map(v=>a(v,f)))};return A.createElement(Ye.iA,null,km.map(o))}var Im=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function Lm(e){return Im(this,null,function*(){return(yield fetch(e)).json()})}const Mm=At.ZP.div`
|
|
284
343
|
position: relative;
|
|
285
344
|
height: 4px;
|
|
286
345
|
display: block;
|
|
@@ -382,19 +441,19 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
382
441
|
right: -8%;
|
|
383
442
|
}
|
|
384
443
|
}
|
|
385
|
-
`,
|
|
444
|
+
`,Nh=()=>A.createElement(Mm,null,A.createElement("div",{className:"indeterminate"})),Nm=At.ZP.div`
|
|
386
445
|
font-family: var(--font-family-monospaced);
|
|
387
446
|
margin-top: 10px;
|
|
388
447
|
line-height: 1;
|
|
389
448
|
padding-left: 10px;
|
|
390
449
|
border-left: 1px solid gray;
|
|
391
|
-
`,
|
|
450
|
+
`,Rm=At.ZP.div`
|
|
392
451
|
margin-bottom: 15px;
|
|
393
|
-
`,
|
|
452
|
+
`,Dm=At.ZP.div`
|
|
394
453
|
padding: 8px 0 20px;
|
|
395
|
-
`,
|
|
454
|
+
`,Bm=At.ZP.div`
|
|
396
455
|
padding: 4px 0;
|
|
397
|
-
`;var
|
|
456
|
+
`;var Vm=Object.defineProperty,jm=Object.defineProperties,Wm=Object.getOwnPropertyDescriptors,Rh=Object.getOwnPropertySymbols,Hm=Object.prototype.hasOwnProperty,Um=Object.prototype.propertyIsEnumerable,Dh=(e,r,i)=>r in e?Vm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,_m=(e,r)=>{for(var i in r||(r={}))Hm.call(r,i)&&Dh(e,i,r[i]);if(Rh)for(var i of Rh(r))Um.call(r,i)&&Dh(e,i,r[i]);return e},zm=(e,r)=>jm(e,Wm(r));const Gm=At.ZP.input`
|
|
398
457
|
cursor: pointer;
|
|
399
458
|
margin-left: 0;
|
|
400
459
|
margin-right: 5px;
|
|
@@ -403,7 +462,7 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
403
462
|
align-self: baseline;
|
|
404
463
|
margin-top: 0;
|
|
405
464
|
margin-bottom: 0;
|
|
406
|
-
|
|
465
|
+
`,$m=At.ZP.label`
|
|
407
466
|
display: inline-block;
|
|
408
467
|
cursor: pointer;
|
|
409
468
|
vertical-align: middle;
|
|
@@ -413,27 +472,27 @@ $3`);return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ah(t){return t.i
|
|
|
413
472
|
|
|
414
473
|
overflow-wrap: break-word;
|
|
415
474
|
line-height: 20px;
|
|
416
|
-
`,
|
|
417
|
-
width: ${({fullWidth:
|
|
475
|
+
`,Km=At.ZP.div`
|
|
476
|
+
width: ${({fullWidth:e})=>e?"100%":"50%"};
|
|
418
477
|
display: inline-flex;
|
|
419
478
|
align-items: center;
|
|
420
479
|
|
|
421
480
|
& > label {
|
|
422
|
-
white-space: ${({nowrap:
|
|
481
|
+
white-space: ${({nowrap:e})=>e?"nowrap":"normal"};
|
|
423
482
|
}
|
|
424
483
|
|
|
425
|
-
${({nowrap:
|
|
484
|
+
${({nowrap:e})=>e?"":`
|
|
426
485
|
:not(:first-child) {
|
|
427
486
|
margin-top: 5px;
|
|
428
487
|
}
|
|
429
488
|
`}
|
|
430
|
-
`;function
|
|
489
|
+
`;function Ym(e,r){const{fullWidth:i,id:a,label:o,nowrap:f}=e;return A.createElement(Km,{fullWidth:i,nowrap:f},A.createElement(Gm,zm(_m({},e),{type:"checkbox",ref:r})),A.createElement($m,{htmlFor:a},o))}const Bh=(0,A.forwardRef)(Ym),Xm=11,Jm=ci(({items:e,fieldApi:r,validateOnChange:i,maxDisplayedItems:a,showControls:o,trimItemsLength:f})=>{const[d,v]=(0,A.useState)(!0),h=_=>{const U=_.target.value,G=_.target.checked;r.setTouched(!0);const ce=r.getValue()||[];let Ce;if(G)Ce=[...ce,U];else{const ge=ce.indexOf(U);Ce=[...ce.slice(0,ge),...ce.slice(ge+1)]}r.setValue(Ce)},g=_=>r.getValue().includes(_),b=()=>{v(_=>!_)},E=()=>{r.setValue(e)},V=()=>{r.setValue([])},I=r.getError(),W=a||Xm,Y=f&&d?e.slice(0,W):e;return A.createElement("div",null,o?A.createElement(Jt.CodeBlockControls,{controls:{select:{onClick:E,label:"Select all",tooltipText:"Select all checkboxes"},deselect:{onClick:V,label:"Deselect all",tooltipText:"Deselect all checkboxes"}}}):null,A.createElement(Qm,null,Y.map(_=>A.createElement(Bh,{fullWidth:!0,id:_,value:_,checked:g(_),label:_,key:_,onChange:U=>{h(U),i&&r.validate()}})),e.length>W&&f?A.createElement(Zm,{onClick:()=>{b()}},d?"Show all":"Collapse"):null),I?A.createElement(Ye.Xq,null,I):"")}),Qm=At.ZP.div`
|
|
431
490
|
padding: 10px;
|
|
432
|
-
|
|
433
|
-
border-radius: 0 0 var(--border-radius
|
|
434
|
-
`,
|
|
491
|
+
background-color: var(--panel-samples-input-background-color);
|
|
492
|
+
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
493
|
+
`,Zm=(0,At.ZP)(Jt.CodeBlockControlButton)`
|
|
435
494
|
float: right;
|
|
436
|
-
`;function wd(t){const{scopes:n,id:i}=t;let s=[];try{s=JSON.parse((0,lt.YQ)(`auth.${i}.scopes`))}catch{}return!n||!n.length?B.createElement(B.Fragment,null):B.createElement(_e.NI,null,B.createElement(_e.lX,null," Scopes: "),B.createElement(Ep,{field:`auth.${i}.scopes`,initialValue:s,items:n,showControls:!0,trimItemsLength:!0}))}const Pp=({token:t,loading:n,error:i})=>n?B.createElement(_e.GE,null,"Please, finish your authorization flow or cancel authorization."):i?B.createElement(up,null,B.createElement(_e.Xq,null,i)):t?.access_token?null:B.createElement(_e.GE,null," No Access Token. Please, Authorize. ");var Lp=Object.defineProperty,Ip=Object.defineProperties,Mp=Object.getOwnPropertyDescriptors,Cd=Object.getOwnPropertySymbols,Np=Object.prototype.hasOwnProperty,Dp=Object.prototype.propertyIsEnumerable,Ad=(t,n,i)=>n in t?Lp(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,ju=(t,n)=>{for(var i in n||(n={}))Np.call(n,i)&&Ad(t,i,n[i]);if(Cd)for(var i of Cd(n))Dp.call(n,i)&&Ad(t,i,n[i]);return t},uc=(t,n)=>Ip(t,Mp(n)),Fp=(t,n,i)=>new Promise((s,u)=>{var c=p=>{try{m(i.next(p))}catch(y){u(y)}},h=p=>{try{m(i.throw(p))}catch(y){u(y)}},m=p=>p.done?s(p.value):Promise.resolve(p.value).then(c,h);m((i=i.apply(t,n)).next())});function Rp(t){if(!t)return"Field is required"}const Wu=({usePkce:t,form:n,id:i,formApi:s,flow:u,tokenUrl:c,authCorsProxyUrl:h,tokenEndpointAuthMethod:m,server:p,scopes:y,authorizationUrl:E,defaultValues:I,clientId:Q})=>{var W,$,ae,le;const{oAuth2RedirectURI:oe,routingBasePath:fe}=(0,Dn.useRecoilValue)(ui.lk),[ye,Ae]=(0,B.useState)(null),[we,Te]=(0,B.useState)(!1),[ke,Me]=(0,B.useState)(!1),[pe,Le]=(0,B.useState)(void 0),[Ee,je]=(0,B.useState)(void 0),[rt,Pt]=(0,B.useState)(void 0),vt=(($=(W=n.values)==null?void 0:W.auth)==null?void 0:$[i])||{},jr=((le=(ae=n.errors)==null?void 0:ae.auth)==null?void 0:le[i])||{},Jn=pe!==void 0&&Ee!==rt?{label:"sync",onClick:()=>{pe&&je(rt)}}:void 0;(0,B.useEffect)(()=>{if(t){const Cr=(0,Cn.CY)(43);fu(Cr).then(Gr=>{Le(Cr),je(Gr),Pt(Gr)})}},[t]);const Ui=Cr=>{if(!Cr||(s.validate(),!(0,Cn.Qr)(jr)))return;Te(!0),Ae(null);const Gr=h?h+(0,gt.jg)(Cr):Cr,Fn=h&&c?h+(0,gt.jg)(c):c,oa=s.getValue(`auth.${i}.scopes`),ko={authorizationUrl:Gr.startsWith("http")?Gr:p+Gr,clientId:vt.client_id,scopes:oa,redirectUri:oe,routingBasePath:fe,successCallback:Zn=>{s.setValue(`auth.${i}.token`,Zn),Te(!1),Ae(null)},errorCallback:Zn=>{Te(!1),Ae(Zn?.message||"Failed to retrieve the access token")}};if(u==="implicit"&&ln.authorizeImplicit(ko),!(0,gt.xl)(m)){console.log(`Unsupported token endpoint auth method: ${m}`);return}u==="authorizationCode"&&ln.authorizeAuthorizationCode(ju(uc(ju({},ko),{tokenUrl:Fn?.startsWith("http")?Fn:p+Fn,clientSecret:vt.client_secret,extraHeaders:(0,gt.Or)({authMethod:m,clientId:vt.client_id,clientSecret:vt.client_secret})}),t&&{codeVerifier:pe,codeChallenge:Ee}))},Qn=()=>{Qt(),Ae(null)},Lr=()=>{Te(!1),Ae(null),ln.clearRedirectData(u)},Qt=()=>{s.setValue(`auth.${i}.token`,"")},pr=()=>{Me(Cr=>!Cr)},en=Cr=>Fp(void 0,[Cr],function*({target:{value:Gr}}){const Fn=yield fu(Gr);Le(Gr),Pt(Fn)});if(!E)return B.createElement(_e.Xq,null,"No flow info");let $r=(0,lt.YQ)(`auth.${i}.token`)||JSON.stringify(I?.token);$r=$r?JSON.parse($r):"";const En=(0,lt.Al)(i,"client_id"),zi={field:`auth.${i}.client_id`,fullWidth:!0,initialValue:(0,lt.YQ)(`auth.${i}.client_id`)||Q||I?.client_id,initValue:(0,lt.YQ)(`auth.${i}.client_id`)||Q||I?.client_id,placeholder:"Your OAuth2 app Client ID",validate:Rp,validateOnBlur:!0,validateOnChange:!0};return B.createElement("div",null,B.createElement(_e.n5,null,B.createElement(_e.NI,null,B.createElement(_e.lX,null," Client ID: "),En?B.createElement(Wt.F0,uc(ju({},zi),{options:En})):B.createElement(Wt.Xn,uc(ju({},zi),{"data-cy":"client-id-input",panel:"try-it"}))),u==="authorizationCode"&&B.createElement(B.Fragment,null,(!t?.hideClientSecretInput||!t)&&B.createElement(_e.NI,null,B.createElement(_e.lX,null,"Client Secret:"),B.createElement(Wt.Xn,{type:"password",fullWidth:!0,field:`auth.${i}.client_secret`,initialValue:(0,lt.YQ)(`auth.${i}.client_secret`)||I?.client_secret,validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),t&&!t.disableManualConfiguration&&B.createElement(cp,null,B.createElement(Sd,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:ke,onChange:pr,"data-cy":"pkce-options-toggle"}),ke&&B.createElement(dp,null,B.createElement(_e.NI,null,B.createElement(_e.lX,null,"Code Verifier"),B.createElement(Wt.nv,{fullWidth:!0,value:pe,onChange:en,panel:"try-it","data-cy":"code-verifier-input"})),B.createElement(_e.NI,null,B.createElement(_e.lX,null,"Code Challenge"),B.createElement(Wt.nv,{fullWidth:!0,value:Ee,onChange:({target:{value:Cr}})=>{je(Cr)},inputActionButton:Jn,panel:"try-it","data-cy":"code-challenge-input"}))))),B.createElement(Wt.Xn,{fullWidth:!0,field:`auth.${i}.token`,type:"hidden",initialValue:$r,panel:"try-it"}),B.createElement(wd,{id:i,scopes:y}),vt.token&&vt.token.access_token?B.createElement(_e.NI,null,B.createElement(_e.lX,null," Access Token: "),B.createElement(Wt.nv,{disabled:!0,type:"password",fullWidth:!0,value:vt.token.access_token,panel:"try-it"})):null),B.createElement(fp,null,vt.token&&vt.token.access_token?B.createElement(Vt.Button,{fullWidth:!0,onClick:Qn},"Log out"):we?B.createElement(B.Fragment,null,B.createElement(Vt.Button,{fullWidth:!0,onClick:Lr},"Cancel"),B.createElement(yd,null)):B.createElement(Vt.Button,{fullWidth:!0,disabled:!(0,Cn.Qr)(jr),onClick:()=>{Ui(E)}},"Authorize")),we||ye||!vt.token||!vt.token.access_token&&B.createElement(Pp,{loading:we,error:ye,token:vt.token}))};var Bp=(t,n,i)=>new Promise((s,u)=>{var c=p=>{try{m(i.next(p))}catch(y){u(y)}},h=p=>{try{m(i.throw(p))}catch(y){u(y)}},m=p=>p.done?s(p.value):Promise.resolve(p.value).then(c,h);m((i=i.apply(t,n)).next())});function jp(t){var n,i;const{scheme:s,defaultValues:u}=t,[c,h]=(0,B.useState)({}),[m,p]=(0,B.useState)(),[y,E]=(0,B.useState)(!1);(0,B.useEffect)(()=>{I(s.openIdConnectUrl)},[s.openIdConnectUrl]);const I=Q=>Bp(this,null,function*(){E(!0),p("");try{const W=yield sp(Q);h(W)}catch(W){p(W.message)}E(!1)});return y?B.createElement(Wp,null):m?B.createElement(Od,{message:m}):B.createElement("div",null,B.createElement("div",null,(n=c?.response_types_supported)!=null&&n.includes("token")?B.createElement(B.Fragment,null,B.createElement(Jr.S6,null,"OAuth2 Implicit Flow"),B.createElement(Wu,{key:t.id,authorizationUrl:c.authorization_endpoint,authCorsProxyUrl:t.authCorsProxyUrl,scopes:c.scopes_supported,server:t.server,id:t.id,form:t.form,formApi:t.formApi,clientId:t.clientId,flow:"implicit",defaultValues:u})):(i=c?.response_types_supported)!=null&&i.includes("code")?B.createElement(B.Fragment,null,B.createElement(Jr.S6,null,"OAuth2 Authorization Flow"),B.createElement(Wu,{key:t.id,authorizationUrl:c.authorization_endpoint,tokenUrl:c.token_endpoint,authCorsProxyUrl:t.authCorsProxyUrl,scopes:c.scopes_supported,server:t.server,id:t.id,form:t.form,formApi:t.formApi,clientId:t.clientId,tokenEndpointAuthMethod:c?.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:u})):B.createElement("div",null,"Unsupported flow")))}function Wp(){return B.createElement("div",null,B.createElement("div",null,B.createElement("div",null,"Fetching OpenID Connect metadata..."),B.createElement(yd,null)))}function Od({message:t}){return B.createElement("div",null,B.createElement("div",null,B.createElement(_e.Xq,null,t)))}var Hp=Object.defineProperty,Up=Object.defineProperties,zp=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,_p=Object.prototype.hasOwnProperty,Vp=Object.prototype.propertyIsEnumerable,kd=(t,n,i)=>n in t?Hp(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,Td=(t,n)=>{for(var i in n||(n={}))_p.call(n,i)&&kd(t,i,n[i]);if(Ed)for(var i of Ed(n))Vp.call(n,i)&&kd(t,i,n[i]);return t},Pd=(t,n)=>Up(t,zp(n)),$p=(t,n,i)=>new Promise((s,u)=>{var c=p=>{try{m(i.next(p))}catch(y){u(y)}},h=p=>{try{m(i.throw(p))}catch(y){u(y)}},m=p=>p.done?s(p.value):Promise.resolve(p.value).then(c,h);m((i=i.apply(t,n)).next())});function Gp(t){if(!t)return"Token is required"}const Kp=({form:t,id:n,formApi:i,server:s,flow:u,authCorsProxyUrl:c,defaultValues:h,clientId:m})=>{var p,y,E,I;const[Q,W]=(0,B.useState)(""),[$,ae]=(0,B.useState)(!1),[le,oe]=(0,B.useState)(!0),fe=((y=(p=t?.values)==null?void 0:p.auth)==null?void 0:y[n])||{},ye=((I=(E=t.errors)==null?void 0:E.auth)==null?void 0:I[n])||{},Ae=()=>{i.setValue(`auth.${n}.token`,""),(0,lt.WW)(`auth.${n}.token`,"")},we=()=>{oe(Ee=>!Ee)},Te=()=>$p(void 0,null,function*(){if($)return;const Ee=c&&u.tokenUrl?c+(0,gt.jg)(u.tokenUrl):u.tokenUrl;if(ye.client_id||ye.client_secret){console.log("Provide client_id and client_secret");return}const je=fe.client_id,rt=fe.client_secret;if(!je||!rt){console.log("Provide client_id and client_secret");return}ae(!0);const Pt=u["x-tokenEndpointAuthMethod"];if(!(0,gt.xl)(Pt)){console.log(`Unsupported token endpoint auth method: ${Pt}`);return}yield ln.authorizeClientCredentials({tokenUrl:Ee.startsWith("http")?Ee:s+Ee,clientId:je,clientSecret:rt,scopes:fe.scopes,extraHeaders:(0,gt.Or)({authMethod:Pt,clientId:je,clientSecret:rt}),successCallback:vt=>{i.setValue(`auth.${n}.token`,vt),ae(!1)},errorCallback:vt=>{Ae(),W(vt.message),ae(!1)}})}),ke=Object.keys(u.scopes);let Me=(0,lt.YQ)(`auth.${n}.token`)||JSON.stringify(h?.token);Me=Me?JSON.parse(Me):"";const pe=(0,lt.Al)(n,"client_id"),Le={field:`auth.${n}.client_id`,fullWidth:!0,initialValue:(0,lt.YQ)(`auth.${n}.client_id`)||m||h?.client_id,initValue:(0,lt.YQ)(`auth.${n}.client_id`)||m||h?.client_id,placeholder:"Your OAuth2 app Client ID"};return B.createElement(B.Fragment,null,B.createElement(_e.n5,null,B.createElement(_e.NI,null,B.createElement(_e.lX,null,"Client ID:"),pe?B.createElement(Wt.F0,Pd(Td({},Le),{options:pe})):B.createElement(Wt.Xn,Pd(Td({},Le),{type:"password",panel:"try-it"}))),B.createElement(_e.NI,null,B.createElement(_e.lX,null,"Client Secret:"),B.createElement(Wt.Xn,{type:"password",fullWidth:!0,field:`auth.${n}.client_secret`,initialValue:(0,lt.YQ)(`auth.${n}.client_secret`)||h?.client_secret,panel:"try-it"})),B.createElement(Wt.Xn,{fullWidth:!0,field:`auth.${n}.token`,type:"hidden",initialValue:Me,validate:Gp}),B.createElement(wd,{id:n,scopes:ke})),B.createElement(Vt.Button,{color:"primary",onClick:Te,blinking:$},$?"Loading...":"Request Token"),B.createElement(_e.ph,null," Access Token "),Q?B.createElement(_e.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",B.createElement("pre",null,Q)," "):fe.token&&fe.token.access_token?B.createElement(_e.TR,null,B.createElement(_e.WA,{length:fe.token.access_token.length,masked:le},fe.token.access_token),B.createElement(_e.lf,{onClick:we},le?"Show":"Hide"," "),B.createElement(_e.h,{onClick:Ae}," Clear ")):B.createElement(_e.Xq,{style:{marginBottom:"1em"}},"No token"))};var Yp=Object.defineProperty,Xp=Object.defineProperties,Jp=Object.getOwnPropertyDescriptors,Ld=Object.getOwnPropertySymbols,Qp=Object.prototype.hasOwnProperty,Zp=Object.prototype.propertyIsEnumerable,Id=(t,n,i)=>n in t?Yp(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,Ya=(t,n)=>{for(var i in n||(n={}))Qp.call(n,i)&&Id(t,i,n[i]);if(Ld)for(var i of Ld(n))Zp.call(n,i)&&Id(t,i,n[i]);return t},Xa=(t,n)=>Xp(t,Jp(n));const qp=({securityDefaults:t,operation:n,activeServer:i,authCorsProxyUrl:s,form:u,formApi:c})=>{var h,m;const[p,y]=(0,B.useState)(0),{parser:E}=(0,Dn.useRecoilValue)(ui.cS);(0,B.useEffect)(()=>{const oe=n.security.map(Ae=>Ae.schemes.map(we=>we.id).join(" and ")),fe=(0,lt.YQ)("securityRequirementName"),ye=oe.findIndex(Ae=>Ae===fe);y(ye<0?0:ye)},[n]);const I=oe=>{y(oe.idx),(0,lt.WW)("securityRequirementName",oe.value)},Q=n.security,$=Q.map(oe=>oe.schemes.map(fe=>fe.id).join(" and ")).filter(Boolean).map((oe,fe)=>({value:oe,idx:fe}));if($.length===0)return B.createElement(Od,{message:"Cannot find security schema in the definition"});const ae=Q[p],le=(0,lt.A8)(ae.schemes[0].id);return B.createElement(B.Fragment,null,B.createElement(_e.n5,null,$.length>1&&B.createElement(_e.NI,null,B.createElement(_e.lX,null," Security scheme: "),B.createElement(Jr.VD,{variant:"dark",fullWidth:!0,options:$,value:$[p].value,onChange:I}))||null,B.createElement(Vt.TryItSecurityApps,{apiId:(m=(h=E?.definition.info)==null?void 0:h["x-metadata"])==null?void 0:m.apiId,value:c.getValue(`auth.${le}`),onChange:oe=>{c.setValue(`auth.${le}`,oe)}}),Q[p].schemes.map(oe=>{var fe,ye,Ae,we,Te,ke,Me;const pe=(0,lt.A8)(oe.id);if(oe.type==="apiKey"){const Le=(0,lt.Al)(pe,""),Ee={field:`auth.${pe}`,fullWidth:!0,initialValue:(0,gt.NG)(oe)||(0,lt.YQ)(`auth.${pe}`)||t?.[pe],initValue:(0,gt.NG)(oe)||(0,lt.YQ)(`auth.${pe}`)||t?.[pe],validate:gt.np,validateOnBlur:!0,validateOnChange:!0};return B.createElement(_e.NI,{key:pe},B.createElement(_e.lX,null," ",oe.name,": "),Le?B.createElement(Wt.F0,Xa(Ya({},Ee),{options:Le})):B.createElement(Wt.Xn,Xa(Ya({},Ee),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(oe.type==="http"){if(oe.scheme==="basic"){const Le=(0,lt.Al)(pe,"username"),Ee={field:`auth.${pe}.username`,fullWidth:!0,initialValue:(0,lt.YQ)(`auth.${pe}.username`)||((fe=t?.[pe])==null?void 0:fe.username),initValue:(0,lt.YQ)(`auth.${pe}.username`)||((ye=t?.[pe])==null?void 0:ye.username),validate:gt.np,validateOnBlur:!0,validateOnChange:!0};return B.createElement(B.Fragment,{key:pe},B.createElement(_e.NI,null,B.createElement(_e.lX,null," ",(0,Vo.l)("tryItAuthBasicUsername"),": "),Le?B.createElement(Wt.F0,Xa(Ya({},Ee),{options:Le})):B.createElement(Wt.Xn,Xa(Ya({},Ee),{panel:"try-it"}))),B.createElement(_e.NI,null,B.createElement(_e.lX,null," ",(0,Vo.l)("tryItAuthBasicPassword"),": "),B.createElement(Wt.Xn,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${pe}.password`,initialValue:(0,lt.YQ)(`auth.${pe}.password`)||((Ae=t?.[pe])==null?void 0:Ae.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(oe.scheme==="bearer"){const Le=(0,lt.Al)(pe,""),Ee={field:`auth.${pe}`,fullWidth:!0,initialValue:(0,lt.YQ)(`auth.${pe}`)||t?.[pe],initValue:(0,lt.YQ)(`auth.${pe}`)||t?.[pe],validate:gt.np,validateOnBlur:!0,validateOnChange:!0};return B.createElement(B.Fragment,{key:pe},B.createElement(_e.NI,null,B.createElement(_e.lX,null," Bearer Token: "),Le?B.createElement(Wt.F0,Xa(Ya({},Ee),{options:Le})):B.createElement(Wt.Xn,Xa(Ya({},Ee),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(oe.type==="oauth2"&&oe.flows&&oe.flows.clientCredentials)return B.createElement(Kp,{key:pe,flow:oe.flows.clientCredentials,server:i,authCorsProxyUrl:s,id:pe,form:u,formApi:c,clientId:oe.flows.clientCredentials["x-defaultClientId"]||oe["x-defaultClientId"],defaultValues:t?.[pe]});if(oe.type==="oauth2"&&oe.flows&&oe.flows.implicit)return B.createElement(Wu,{key:pe,authorizationUrl:oe.flows.implicit.authorizationUrl,authCorsProxyUrl:s,scopes:Object.keys(((Te=(we=oe?.flows)==null?void 0:we.implicit)==null?void 0:Te.scopes)||{}),server:i,id:pe,form:u,formApi:c,clientId:oe.flows.implicit["x-defaultClientId"]||oe["x-defaultClientId"],flow:"implicit",defaultValues:t?.[pe]});if(oe.type==="oauth2"&&oe.flows&&oe.flows.authorizationCode)return B.createElement(Wu,{key:pe,authorizationUrl:oe.flows.authorizationCode.authorizationUrl,tokenUrl:oe.flows.authorizationCode.tokenUrl,authCorsProxyUrl:s,scopes:Object.keys(((ke=oe.flows.authorizationCode)==null?void 0:ke.scopes)||{}),server:i,id:pe,form:u,formApi:c,clientId:oe.flows.authorizationCode["x-defaultClientId"]||oe["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:oe.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:oe.flows.authorizationCode["x-usePkce"],defaultValues:t?.[pe]});if(oe.type==="oauth2"){let Le=(0,lt.YQ)(`auth.${pe}.token`)||JSON.stringify((Me=t?.[pe])==null?void 0:Me.token);return Le=Le?JSON.parse(Le):{},B.createElement(B.Fragment,{key:pe},B.createElement(_e.NI,null,B.createElement(_e.lX,null," Access Token Type: "),B.createElement(Wt.Xn,{fullWidth:!0,field:`auth.${pe}.token.token_type`,initialValue:Le.token_type||"Bearer",panel:"try-it"})),B.createElement(_e.NI,null,B.createElement(_e.lX,null," Access Token: "),B.createElement(Wt.Xn,{type:"password",fullWidth:!0,field:`auth.${pe}.token.access_token`,validate:gt.np,initialValue:Le.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(oe.type==="openIdConnect")return B.createElement(jp,{key:pe,server:i,authCorsProxyUrl:s,id:pe,form:u,formApi:c,scheme:oe,clientId:oe["x-defaultClientId"],defaultValues:t?.[pe]})}})),B.createElement("small",null,B.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))};var ev=f(55919),tv=Object.defineProperty,Md=Object.getOwnPropertySymbols,rv=Object.prototype.hasOwnProperty,nv=Object.prototype.propertyIsEnumerable,Nd=(t,n,i)=>n in t?tv(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,iv=(t,n)=>{for(var i in n||(n={}))rv.call(n,i)&&Nd(t,i,n[i]);if(Md)for(var i of Md(n))nv.call(n,i)&&Nd(t,i,n[i]);return t};function ov({operation:t,properties:n,securityDefaults:i,form:s,resolvedRawSpec:u,server:c,formApi:h,setFormApi:m,handleChange:p,handleServerChange:y}){const E=s.errors||{},I=E.path||E.cookie||E.header||E.query,{hooks:Q,authCorsProxyUrl:W}=(0,Dn.useRecoilValue)(ui.lk),$=u&<.IB.get(u,t.pointer);let ae=s.values&&s.values.auth&&Object.keys(s.values.auth)[0];(!ae||!s.values.auth[ae])&&(ae=void 0),ae&&(s.values.auth[ae].token!==void 0||s.values.auth[ae].client_id!==void 0||s.values.auth[ae].client_secret!==void 0)&&(!s.values.auth[ae].token||!s.values.auth[ae].token.access_token)&&(ae=void 0),ae&&s.values.auth[ae].username!=null&&(!s.values.auth[ae].username||!s.values.auth[ae].password)&&(ae=void 0);const le=t.parameters||[];return!u&&B.createElement(B.Fragment,null,"Loading...")||B.createElement(Qr.l0,{onChange:p,getApi:m,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},B.createElement(Ws,{operation:t,onChange:y}),B.createElement(Ti.UQ,{initialActiveIdx:t.security.length&&ae?1:0},t.security.length&&h&&B.createElement(Yo,{header:(0,Vo.l)("tryItAuth"),"data-cy":"security-trigger",error:!ae&&!!E.auth,success:!!ae,renderChildrenHidden:!0},Vt.OpenApiTryItSecurityPanel||Q?.ReplaceTryItSecurityPanel?B.createElement(av,{field:"auth",validate:gt.np},oe=>B.createElement(ev.Q,{Hook:Vt.OpenApiTryItSecurityPanel||Q?.ReplaceTryItSecurityPanel,props:{server:c,operation:t,onChange:oe,OAuth2:ln}})):B.createElement(qp,{formApi:h,form:s,operation:t,activeServer:c.url,authCorsProxyUrl:W,securityDefaults:i}))||null,t.requestBody&&h&&B.createElement(Yo,{header:(0,Vo.l)("tryItBody"),"data-cy":"body-trigger",error:!!E.body,renderChildrenHidden:!0},B.createElement(Kh,{validate:sv,formApi:h,body:t.requestBody,pointer:t.pointer,id:t.id,resolvedBody:$?.requestBody,properties:n}))||null,le.length&&B.createElement(Yo,{header:(0,Vo.l)("tryItParameters"),"data-cy":"parameters-trigger",error:I,renderChildrenHidden:!0},B.createElement(op,{operation:t,values:s.values,errors:s.errors||{}}))||null))}function av(t){const{fieldApi:n,render:i,userProps:s}=(0,Qr.U$)(iv({},t)),{setValue:u}=n,{children:c}=s;return i(B.createElement(B.Fragment,null,c(u)))}function sv(){}const lv=(0,B.memo)(ov);function uv({shaking:t,className:n,children:i,rootElement:s}){const[u]=(0,lc.Bs)(s),c=(0,Dn.useRecoilValue)(ui.lk);return B.createElement(Jr.q2,{scrollYOffset:c.scrollYOffset,shaking:t,className:n,"data-cy":"console",fullWidth:u?.width},i)}const fv=(0,B.memo)(uv);var cv=Object.defineProperty,dv=Object.defineProperties,hv=Object.getOwnPropertyDescriptors,Hu=Object.getOwnPropertySymbols,Dd=Object.prototype.hasOwnProperty,Fd=Object.prototype.propertyIsEnumerable,Rd=(t,n,i)=>n in t?cv(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,hr=(t,n)=>{for(var i in n||(n={}))Dd.call(n,i)&&Rd(t,i,n[i]);if(Hu)for(var i of Hu(n))Fd.call(n,i)&&Rd(t,i,n[i]);return t},qr=(t,n)=>dv(t,hv(n)),Bd=(t,n)=>{var i={};for(var s in t)Dd.call(t,s)&&n.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&Hu)for(var s of Hu(t))n.indexOf(s)<0&&Fd.call(t,s)&&(i[s]=t[s]);return i},jd=(t,n,i)=>new Promise((s,u)=>{var c=p=>{try{m(i.next(p))}catch(y){u(y)}},h=p=>{try{m(i.throw(p))}catch(y){u(y)}},m=p=>p.done?s(p.value):Promise.resolve(p.value).then(c,h);m((i=i.apply(t,n)).next())});function Wd(t){return t.startsWith("//")?"https:"+t:t}function pv({operation:t,onResponse:n,className:i,rootElement:s,properties:u,securityDefaults:c,onClose:h}){let m=(0,B.useRef)();const[p,y]=(0,Dn.useRecoilState)((0,Ua.N)(t.pointer)),[E,I]=(0,B.useState)(p.activeServer||t.activeServer),[Q,W]=(0,B.useState)(0),[$,ae]=(0,B.useState)(!1),[le,oe]=(0,B.useState)(!1),[fe,ye]=(0,B.useState)({values:{path:(0,gt.ZS)(t.parameters,"path"),cookie:(0,gt.ZS)(t.parameters,"cookie"),header:(0,gt.ZS)(t.parameters,"header"),query:(0,gt.ZS)(t.parameters,"query")}}),[Ae,we]=(0,B.useState)(),[Te,ke]=(0,B.useState)(),[Me,pe]=(0,B.useState)(),[Le,Ee]=(0,B.useState)(),je=(0,lc.D9)(t),{parser:rt,options:Pt}=(0,Dn.useRecoilValue)(ui.cS),vt=(0,B.useCallback)((Qt,pr=Qt.getState())=>{var en=pr,{values:$r}=en,En=Bd(en,["values"]);m.current=Qt,setTimeout(()=>{ye(qr(hr({},En),{values:qr(hr({},$r),{query:(0,gt.FU)($r.query||{})})}))},0)},[]),jr=(0,B.useCallback)(Qt=>{var pr=Qt,{values:en}=pr,$r=Bd(pr,["values"]);const En=qr(hr({},$r),{values:qr(hr({},en),{query:(0,gt.FU)(en.query||{})})});y(zi=>qr(hr({},zi),{requestValues:JSON.parse(JSON.stringify(en))})),ye(En),(0,gt.Hc)(En)},[y]),Jn=(0,B.useCallback)(Qt=>{W(Qt)},[]),Ui=(0,B.useCallback)(Qt=>{I(Qt),y(pr=>qr(hr({},pr),{activeServer:Qt}))},[y]),Qn=(0,B.useCallback)(()=>jd(this,null,function*(){var Qt,pr,en,$r,En,zi,Cr,Gr,Fn,oa,ko,Zn,Zs,Uu,qs,aa,Hd;const{values:_i,invalid:gv}=((Qt=m?.current)==null?void 0:Qt.getState())||fe||{};if((pr=m.current)==null||pr.submitForm(),gv){oe(!0),setTimeout(()=>oe(!1),1e3),($r=(en=Pt.events)==null?void 0:en.tryItSent)==null||$r.call(en,{eventType:ur.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:t.operationId,operationPath:t.path,operationHttpVerb:t.httpVerb,operationSummary:t.description});return}const{servers:el,requestBody:Ja}=t,mv=Ja&&Ja.content&&((En=(0,wn.getActiveMediaType)(Ja.content))==null?void 0:En.name)||"";let Qa=_i.body;if(/json/.test(mv))try{Qa=JSON.parse(Qa)}catch(Nt){console.error(Nt)}ae(!0);const Rn=Ae,Ud=(t.httpVerb||"").toLowerCase();if(!el)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const fc=el.find(Nt=>E.url.endsWith(Nt.url.endsWith("/")?Nt.url.substring(0,Nt.url.length-1):Nt.url)),yv=Date.now();let Vi,Za=_i.auth;if(_i.auth){const Nt=Object.keys(_i.auth)[0],hi=(0,If.dw)(Nt);Vi=qr(hr({},Rn),{components:qr(hr({},Rn?.components),{securitySchemes:qr(hr({},(zi=Rn?.components)==null?void 0:zi.securitySchemes),{[hi]:qr(hr({},(Gr=(Cr=Rn?.components)==null?void 0:Cr.securitySchemes)==null?void 0:Gr[hi]),{type:((ko=(oa=(Fn=Rn?.components)==null?void 0:Fn.securitySchemes)==null?void 0:oa[hi])==null?void 0:ko.type)==="openIdConnect"?"oauth2":((Zs=(Zn=Rn?.components)==null?void 0:Zn.securitySchemes)==null?void 0:Zs[hi]).type})})})}),Za=qr(hr({},Za),{[hi]:Za[Nt]})}else Vi=hr({},Rn);Vi.servers=el;const zu=Pt.corsProxyUrl;zu&&el.length&&(Vi.servers=el.map(Nt=>qr(hr({},Nt),{url:zu+Wd(Nt.url)})),Vi.paths=qr(hr({},Vi.paths),{[t.path]:qr(hr({},Vi.paths[t.path]),{[Ud]:qr(hr({},Vi.paths[t.path][Ud]),{servers:void 0}),servers:void 0})}));const cc=Ja?.content&&((Uu=(0,wn.getActiveMediaType)(Ja.content))==null?void 0:Uu.name)||null;if(cc&&Qa&&Li(cc)){const Nt=Object.values(Qa);Qa=Nt.length>1?Nt:Nt[0]}const dc={server:zu?zu+Wd(fc.url):fc.url,serverVariables:(0,gt.mj)(fc),spec:Vi,pathName:t.path,method:t.httpVerb,parameters:hr(hr(hr(hr({},_i.path),_i.query),_i.header),_i.cookie),securities:{authorized:Za},requestBody:Qa,requestContentType:cc,responseContentType:((qs=_i.header)==null?void 0:qs.Accept)||null,requestInterceptor:(0,gt.Tz)(Pt,t,Za?.Authorization)};try{const Nt=yield kf(dc),hi=Nt?.data;hi instanceof Blob&&(Li(hi.type)&&(Nt.fileInfo={rawData:hi,fileName:(0,gt.AM)(Nt.headers)}),Nt.data=yield hi.text()),n?.({request:dc,response:Nt}),Ee(Nt),pe(void 0)}catch(Nt){Nt&&Nt.response&&Nt.response.data instanceof Blob&&(Nt.response.data=yield Nt.response.data.text(),n?.({request:dc,response:Nt.response})),Ee(void 0),pe(Nt)}finally{ae(!1),W(1),ke(Date.now()-yv),(Hd=(aa=Pt.events)==null?void 0:aa.tryItSent)==null||Hd.call(aa,{eventType:ur.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:t.operationId,operationPath:t.path,operationHttpVerb:t.httpVerb,operationSummary:t.description})}}),[E.url,fe,n,t,Pt,Ae]);(0,Vt.useMount)(()=>jd(this,null,function*(){var Qt;const pr=yield Lf(t,rt.definition);we(pr),(Qt=m.current)==null||Qt.setValues({})})),(0,B.useEffect)(()=>{je&&je!==t&&(Ee(void 0),pe(void 0),W(0))},[t,je]);const Lr=!!(Le||Me);return B.createElement(fv,{shaking:le,className:i,rootElement:s},B.createElement(Ti.Hc,null,B.createElement(Uo,{active:Q,hasResponse:Lr,onChange:Jn}),h&&B.createElement(Jr.PZ,{onClick:h}," \u2715 ")),B.createElement(Jr.RE,{hidden:Q!==0,"data-cy":"console-request-body"},B.createElement(lv,{operation:t,properties:u,securityDefaults:c,form:fe,resolvedRawSpec:Ae,server:E,formApi:m.current,setFormApi:vt,handleChange:jr,handleServerChange:Ui})),B.createElement(Jr.RE,{hidden:Q!==1,"data-cy":"console-response-body"},B.createElement(nu,{response:Le,error:Me,time:Te})),B.createElement(au,{hasResponse:Lr,params:fe.values,operation:t,loading:$,execute:Qn}))}const vv=(0,B.memo)(pv)},85208:(x,N,f)=>{var v=f(34440),C=f(84108),O=f(61085),P=f(77706),D=f(8636);function R(_){var Z=-1,q=_==null?0:_.length;for(this.clear();++Z<q;){var he=_[Z];this.set(he[0],he[1])}}R.prototype.clear=v,R.prototype.delete=C,R.prototype.get=O,R.prototype.has=P,R.prototype.set=D,x.exports=R},81998:(x,N,f)=>{var v=f(90266),C=f(42875),O=f(45828),P=f(24115),D=f(67690);function R(_){var Z=-1,q=_==null?0:_.length;for(this.clear();++Z<q;){var he=_[Z];this.set(he[0],he[1])}}R.prototype.clear=v,R.prototype.delete=C,R.prototype.get=O,R.prototype.has=P,R.prototype.set=D,x.exports=R},72887:(x,N,f)=>{var v=f(65234),C=f(84100),O=v(C,"Map");x.exports=O},95678:(x,N,f)=>{var v=f(39016),C=f(62363),O=f(64348),P=f(53062),D=f(30262);function R(_){var Z=-1,q=_==null?0:_.length;for(this.clear();++Z<q;){var he=_[Z];this.set(he[0],he[1])}}R.prototype.clear=v,R.prototype.delete=C,R.prototype.get=O,R.prototype.has=P,R.prototype.set=D,x.exports=R},70861:(x,N,f)=>{var v=f(84100),C=v.Symbol;x.exports=C},29233:x=>{function N(f,v){for(var C=-1,O=f==null?0:f.length,P=Array(O);++C<O;)P[C]=v(f[C],C,f);return P}x.exports=N},18498:(x,N,f)=>{var v=f(58260);function C(O,P){for(var D=O.length;D--;)if(v(O[D][0],P))return D;return-1}x.exports=C},40548:(x,N,f)=>{var v=f(24007),C=f(86040);function O(P,D){D=v(D,P);for(var R=0,_=D.length;P!=null&&R<_;)P=P[C(D[R++])];return R&&R==_?P:void 0}x.exports=O},69823:(x,N,f)=>{var v=f(70861),C=f(91339),O=f(25151),P="[object Null]",D="[object Undefined]",R=v?v.toStringTag:void 0;function _(Z){return Z==null?Z===void 0?D:P:R&&R in Object(Z)?C(Z):O(Z)}x.exports=_},99817:(x,N,f)=>{var v=f(45563),C=f(28597),O=f(93702),P=f(55784),D=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,_=Function.prototype,Z=Object.prototype,q=_.toString,he=Z.hasOwnProperty,re=RegExp("^"+q.call(he).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function se(V){if(!O(V)||C(V))return!1;var T=v(V)?re:R;return T.test(P(V))}x.exports=se},86245:(x,N,f)=>{var v=f(70861),C=f(29233),O=f(55589),P=f(52624),D=1/0,R=v?v.prototype:void 0,_=R?R.toString:void 0;function Z(q){if(typeof q=="string")return q;if(O(q))return C(q,Z)+"";if(P(q))return _?_.call(q):"";var he=q+"";return he=="0"&&1/q==-D?"-0":he}x.exports=Z},24007:(x,N,f)=>{var v=f(55589),C=f(5130),O=f(44041),P=f(99835);function D(R,_){return v(R)?R:C(R,_)?[R]:O(P(R))}x.exports=D},1622:(x,N,f)=>{var v=f(84100),C=v["__core-js_shared__"];x.exports=C},20302:(x,N,f)=>{var v=typeof f.g=="object"&&f.g&&f.g.Object===Object&&f.g;x.exports=v},77570:(x,N,f)=>{var v=f(58949);function C(O,P){var D=O.__data__;return v(P)?D[typeof P=="string"?"string":"hash"]:D.map}x.exports=C},65234:(x,N,f)=>{var v=f(99817),C=f(67736);function O(P,D){var R=C(P,D);return v(R)?R:void 0}x.exports=O},91339:(x,N,f)=>{var v=f(70861),C=Object.prototype,O=C.hasOwnProperty,P=C.toString,D=v?v.toStringTag:void 0;function R(_){var Z=O.call(_,D),q=_[D];try{_[D]=void 0;var he=!0}catch{}var re=P.call(_);return he&&(Z?_[D]=q:delete _[D]),re}x.exports=R},67736:x=>{function N(f,v){return f?.[v]}x.exports=N},34440:(x,N,f)=>{var v=f(24545);function C(){this.__data__=v?v(null):{},this.size=0}x.exports=C},84108:x=>{function N(f){var v=this.has(f)&&delete this.__data__[f];return this.size-=v?1:0,v}x.exports=N},61085:(x,N,f)=>{var v=f(24545),C="__lodash_hash_undefined__",O=Object.prototype,P=O.hasOwnProperty;function D(R){var _=this.__data__;if(v){var Z=_[R];return Z===C?void 0:Z}return P.call(_,R)?_[R]:void 0}x.exports=D},77706:(x,N,f)=>{var v=f(24545),C=Object.prototype,O=C.hasOwnProperty;function P(D){var R=this.__data__;return v?R[D]!==void 0:O.call(R,D)}x.exports=P},8636:(x,N,f)=>{var v=f(24545),C="__lodash_hash_undefined__";function O(P,D){var R=this.__data__;return this.size+=this.has(P)?0:1,R[P]=v&&D===void 0?C:D,this}x.exports=O},5130:(x,N,f)=>{var v=f(55589),C=f(52624),O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P=/^\w*$/;function D(R,_){if(v(R))return!1;var Z=typeof R;return Z=="number"||Z=="symbol"||Z=="boolean"||R==null||C(R)?!0:P.test(R)||!O.test(R)||_!=null&&R in Object(_)}x.exports=D},58949:x=>{function N(f){var v=typeof f;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?f!=="__proto__":f===null}x.exports=N},28597:(x,N,f)=>{var v=f(1622),C=function(){var P=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return P?"Symbol(src)_1."+P:""}();function O(P){return!!C&&C in P}x.exports=O},90266:x=>{function N(){this.__data__=[],this.size=0}x.exports=N},42875:(x,N,f)=>{var v=f(18498),C=Array.prototype,O=C.splice;function P(D){var R=this.__data__,_=v(R,D);if(_<0)return!1;var Z=R.length-1;return _==Z?R.pop():O.call(R,_,1),--this.size,!0}x.exports=P},45828:(x,N,f)=>{var v=f(18498);function C(O){var P=this.__data__,D=v(P,O);return D<0?void 0:P[D][1]}x.exports=C},24115:(x,N,f)=>{var v=f(18498);function C(O){return v(this.__data__,O)>-1}x.exports=C},67690:(x,N,f)=>{var v=f(18498);function C(O,P){var D=this.__data__,R=v(D,O);return R<0?(++this.size,D.push([O,P])):D[R][1]=P,this}x.exports=C},39016:(x,N,f)=>{var v=f(85208),C=f(81998),O=f(72887);function P(){this.size=0,this.__data__={hash:new v,map:new(O||C),string:new v}}x.exports=P},62363:(x,N,f)=>{var v=f(77570);function C(O){var P=v(this,O).delete(O);return this.size-=P?1:0,P}x.exports=C},64348:(x,N,f)=>{var v=f(77570);function C(O){return v(this,O).get(O)}x.exports=C},53062:(x,N,f)=>{var v=f(77570);function C(O){return v(this,O).has(O)}x.exports=C},30262:(x,N,f)=>{var v=f(77570);function C(O,P){var D=v(this,O),R=D.size;return D.set(O,P),this.size+=D.size==R?0:1,this}x.exports=C},32924:(x,N,f)=>{var v=f(67997),C=500;function O(P){var D=v(P,function(_){return R.size===C&&R.clear(),_}),R=D.cache;return D}x.exports=O},24545:(x,N,f)=>{var v=f(65234),C=v(Object,"create");x.exports=C},25151:x=>{var N=Object.prototype,f=N.toString;function v(C){return f.call(C)}x.exports=v},84100:(x,N,f)=>{var v=f(20302),C=typeof self=="object"&&self&&self.Object===Object&&self,O=v||C||Function("return this")();x.exports=O},44041:(x,N,f)=>{var v=f(32924),C=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,O=/\\(\\)?/g,P=v(function(D){var R=[];return D.charCodeAt(0)===46&&R.push(""),D.replace(C,function(_,Z,q,he){R.push(q?he.replace(O,"$1"):Z||_)}),R});x.exports=P},86040:(x,N,f)=>{var v=f(52624),C=1/0;function O(P){if(typeof P=="string"||v(P))return P;var D=P+"";return D=="0"&&1/P==-C?"-0":D}x.exports=O},55784:x=>{var N=Function.prototype,f=N.toString;function v(C){if(C!=null){try{return f.call(C)}catch{}try{return C+""}catch{}}return""}x.exports=v},58260:x=>{function N(f,v){return f===v||f!==f&&v!==v}x.exports=N},13546:(x,N,f)=>{var v=f(40548);function C(O,P,D){var R=O==null?void 0:v(O,P);return R===void 0?D:R}x.exports=C},55589:x=>{var N=Array.isArray;x.exports=N},45563:(x,N,f)=>{var v=f(69823),C=f(93702),O="[object AsyncFunction]",P="[object Function]",D="[object GeneratorFunction]",R="[object Proxy]";function _(Z){if(!C(Z))return!1;var q=v(Z);return q==P||q==D||q==O||q==R}x.exports=_},93702:x=>{function N(f){var v=typeof f;return f!=null&&(v=="object"||v=="function")}x.exports=N},50440:x=>{function N(f){return f!=null&&typeof f=="object"}x.exports=N},52624:(x,N,f)=>{var v=f(69823),C=f(50440),O="[object Symbol]";function P(D){return typeof D=="symbol"||C(D)&&v(D)==O}x.exports=P},67997:(x,N,f)=>{var v=f(95678),C="Expected a function";function O(P,D){if(typeof P!="function"||D!=null&&typeof D!="function")throw new TypeError(C);var R=function(){var _=arguments,Z=D?D.apply(this,_):_[0],q=R.cache;if(q.has(Z))return q.get(Z);var he=P.apply(this,_);return R.cache=q.set(Z,he)||q,he};return R.cache=new(O.Cache||v),R}O.Cache=v,x.exports=O},99835:(x,N,f)=>{var v=f(86245);function C(O){return O==null?"":v(O)}x.exports=C},14927:(x,N,f)=>{var v=typeof Map=="function"&&Map.prototype,C=Object.getOwnPropertyDescriptor&&v?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,O=v&&C&&typeof C.get=="function"?C.get:null,P=v&&Map.prototype.forEach,D=typeof Set=="function"&&Set.prototype,R=Object.getOwnPropertyDescriptor&&D?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_=D&&R&&typeof R.get=="function"?R.get:null,Z=D&&Set.prototype.forEach,q=typeof WeakMap=="function"&&WeakMap.prototype,he=q?WeakMap.prototype.has:null,re=typeof WeakSet=="function"&&WeakSet.prototype,se=re?WeakSet.prototype.has:null,V=typeof WeakRef=="function"&&WeakRef.prototype,T=V?WeakRef.prototype.deref:null,J=Boolean.prototype.valueOf,M=Object.prototype.toString,S=Function.prototype.toString,L=String.prototype.match,F=String.prototype.slice,K=String.prototype.replace,te=String.prototype.toUpperCase,j=String.prototype.toLowerCase,ie=RegExp.prototype.test,U=Array.prototype.concat,Y=Array.prototype.join,ce=Array.prototype.slice,ge=Math.floor,G=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ve=Object.getOwnPropertySymbols,ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,He=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ve=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===He||"symbol")?Symbol.toStringTag:null,ze=Object.prototype.propertyIsEnumerable,ct=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ne){return ne.__proto__}:null);function ut(ne,be){if(ne===1/0||ne===-1/0||ne!==ne||ne&&ne>-1e3&&ne<1e3||ie.call(/e/,be))return be;var We=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ne=="number"){var et=ne<0?-ge(-ne):ge(ne);if(et!==ne){var ft=String(et),st=F.call(be,ft.length+1);return K.call(ft,We,"$&_")+"."+K.call(K.call(st,/([0-9]{3})/g,"$&_"),/_$/,"")}}return K.call(be,We,"$&_")}var ot=f(65710),Xt=ot.custom,dt=Jt(Xt)?Xt:null;x.exports=function ne(be,We,et,ft){var st=We||{};if(Qe(st,"quoteStyle")&&st.quoteStyle!=="single"&&st.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qe(st,"maxStringLength")&&(typeof st.maxStringLength=="number"?st.maxStringLength<0&&st.maxStringLength!==1/0:st.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var _t=Qe(st,"customInspect")?st.customInspect:!0;if(typeof _t!="boolean"&&_t!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qe(st,"indent")&&st.indent!==null&&st.indent!==" "&&!(parseInt(st.indent,10)===st.indent&&st.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qe(st,"numericSeparator")&&typeof st.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Er=st.numericSeparator;if(typeof be>"u")return"undefined";if(be===null)return"null";if(typeof be=="boolean")return be?"true":"false";if(typeof be=="string")return vn(be,st);if(typeof be=="number"){if(be===0)return 1/0/be>0?"0":"-0";var St=String(be);return Er?ut(be,St):St}if(typeof be=="bigint"){var rr=String(be)+"n";return Er?ut(be,rr):rr}var Bn=typeof st.depth>"u"?5:st.depth;if(typeof et>"u"&&(et=0),et>=Bn&&Bn>0&&typeof be=="object")return Ue(be)?"[Array]":"[Object]";var gr=at(st,et);if(typeof ft>"u")ft=[];else if(Ar(ft,be)>=0)return"[Circular]";function mr(Mr,nr,Ln){if(nr&&(ft=ce.call(ft),ft.push(nr)),Ln){var rn={depth:st.depth};return Qe(st,"quoteStyle")&&(rn.quoteStyle=st.quoteStyle),ne(Mr,rn,et+1,ft)}return ne(Mr,st,et+1,ft)}if(typeof be=="function"&&!Be(be)){var jn=Lt(be),kr=ht(be,mr);return"[Function"+(jn?": "+jn:" (anonymous)")+"]"+(kr.length>0?" { "+Y.call(kr,", ")+" }":"")}if(Jt(be)){var Tn=He?K.call(String(be),/^(Symbol\(.*\))_[^)]*$/,"$1"):ee.call(be);return typeof be=="object"&&!He?vr(Tn):Tn}if(kn(be)){for(var Pn="<"+j.call(String(be.nodeName)),yr=be.attributes||[],Wn=0;Wn<yr.length;Wn++)Pn+=" "+yr[Wn].name+"="+At(nt(yr[Wn].value),"double",st);return Pn+=">",be.childNodes&&be.childNodes.length&&(Pn+="..."),Pn+="</"+j.call(String(be.nodeName))+">",Pn}if(Ue(be)){if(be.length===0)return"[]";var gn=ht(be,mr);return gr&&!mt(gn)?"["+Ze(gn,gr)+"]":"[ "+Y.call(gn,", ")+" ]"}if(it(be)){var qn=ht(be,mr);return!("cause"in Error.prototype)&&"cause"in be&&!ze.call(be,"cause")?"{ ["+String(be)+"] "+Y.call(U.call("[cause]: "+mr(be.cause),qn),", ")+" }":qn.length===0?"["+String(be)+"]":"{ ["+String(be)+"] "+Y.call(qn,", ")+" }"}if(typeof be=="object"&&_t){if(dt&&typeof be[dt]=="function"&&ot)return ot(be,{depth:Bn-et});if(_t!=="symbol"&&typeof be.inspect=="function")return be.inspect()}if(Ft(be)){var $i=[];return P&&P.call(be,function(Mr,nr){$i.push(mr(nr,be,!0)+" => "+mr(Mr,be))}),Rt("Map",O.call(be),$i,gr)}if(Wr(be)){var Kr=[];return Z&&Z.call(be,function(Mr){Kr.push(mr(Mr,be))}),Rt("Set",_.call(be),Kr,gr)}if(hn(be))return Or("WeakMap");if(tn(be))return Or("WeakSet");if(pn(be))return Or("WeakRef");if(qe(be))return vr(mr(Number(be)));if(er(be))return vr(mr(G.call(be)));if(xt(be))return vr(J.call(be));if(Dt(be))return vr(mr(String(be)));if(!Fe(be)&&!Be(be)){var Ir=ht(be,mr),Yr=ct?ct(be)===Object.prototype:be instanceof Object||be.constructor===Object,Ur=be instanceof Object?"":"null prototype",zr=!Yr&&Ve&&Object(be)===be&&Ve in be?F.call(bt(be),8,-1):Ur?"Object":"",To=Yr||typeof be.constructor!="function"?"":be.constructor.name?be.constructor.name+" ":"",mn=To+(zr||Ur?"["+Y.call(U.call([],zr||[],Ur||[]),": ")+"] ":"");return Ir.length===0?mn+"{}":gr?mn+"{"+Ze(Ir,gr)+"}":mn+"{ "+Y.call(Ir,", ")+" }"}return String(be)};function At(ne,be,We){var et=(We.quoteStyle||be)==="double"?'"':"'";return et+ne+et}function nt(ne){return K.call(String(ne),/"/g,""")}function Ue(ne){return bt(ne)==="[object Array]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function Fe(ne){return bt(ne)==="[object Date]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function Be(ne){return bt(ne)==="[object RegExp]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function it(ne){return bt(ne)==="[object Error]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function Dt(ne){return bt(ne)==="[object String]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function qe(ne){return bt(ne)==="[object Number]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function xt(ne){return bt(ne)==="[object Boolean]"&&(!Ve||!(typeof ne=="object"&&Ve in ne))}function Jt(ne){if(He)return ne&&typeof ne=="object"&&ne instanceof Symbol;if(typeof ne=="symbol")return!0;if(!ne||typeof ne!="object"||!ee)return!1;try{return ee.call(ne),!0}catch{}return!1}function er(ne){if(!ne||typeof ne!="object"||!G)return!1;try{return G.call(ne),!0}catch{}return!1}var dr=Object.prototype.hasOwnProperty||function(ne){return ne in this};function Qe(ne,be){return dr.call(ne,be)}function bt(ne){return M.call(ne)}function Lt(ne){if(ne.name)return ne.name;var be=L.call(S.call(ne),/^function\s*([\w$]+)/);return be?be[1]:null}function Ar(ne,be){if(ne.indexOf)return ne.indexOf(be);for(var We=0,et=ne.length;We<et;We++)if(ne[We]===be)return We;return-1}function Ft(ne){if(!O||!ne||typeof ne!="object")return!1;try{O.call(ne);try{_.call(ne)}catch{return!0}return ne instanceof Map}catch{}return!1}function hn(ne){if(!he||!ne||typeof ne!="object")return!1;try{he.call(ne,he);try{se.call(ne,se)}catch{return!0}return ne instanceof WeakMap}catch{}return!1}function pn(ne){if(!T||!ne||typeof ne!="object")return!1;try{return T.call(ne),!0}catch{}return!1}function Wr(ne){if(!_||!ne||typeof ne!="object")return!1;try{_.call(ne);try{O.call(ne)}catch{return!0}return ne instanceof Set}catch{}return!1}function tn(ne){if(!se||!ne||typeof ne!="object")return!1;try{se.call(ne,se);try{he.call(ne,he)}catch{return!0}return ne instanceof WeakSet}catch{}return!1}function kn(ne){return!ne||typeof ne!="object"?!1:typeof HTMLElement<"u"&&ne instanceof HTMLElement?!0:typeof ne.nodeName=="string"&&typeof ne.getAttribute=="function"}function vn(ne,be){if(ne.length>be.maxStringLength){var We=ne.length-be.maxStringLength,et="... "+We+" more character"+(We>1?"s":"");return vn(F.call(ne,0,be.maxStringLength),be)+et}var ft=K.call(K.call(ne,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Hr);return At(ft,"single",be)}function Hr(ne){var be=ne.charCodeAt(0),We={8:"b",9:"t",10:"n",12:"f",13:"r"}[be];return We?"\\"+We:"\\x"+(be<16?"0":"")+te.call(be.toString(16))}function vr(ne){return"Object("+ne+")"}function Or(ne){return ne+" { ? }"}function Rt(ne,be,We,et){var ft=et?Ze(We,et):Y.call(We,", ");return ne+" ("+be+") {"+ft+"}"}function mt(ne){for(var be=0;be<ne.length;be++)if(Ar(ne[be],`
|
|
437
|
-
`)>=0)return!1;return!0}function
|
|
438
|
-
`+
|
|
439
|
-
`+be.prev}function ht(ne,be){var We=Ue(ne),et=[];if(We){et.length=ne.length;for(var ft=0;ft<ne.length;ft++)et[ft]=Qe(ne,ft)?be(ne[ft],ne):""}var st=typeof ve=="function"?ve(ne):[],_t;if(He){_t={};for(var Er=0;Er<st.length;Er++)_t["$"+st[Er]]=st[Er]}for(var St in ne)Qe(ne,St)&&(We&&String(Number(St))===St&&St<ne.length||He&&_t["$"+St]instanceof Symbol||(ie.call(/[^\w$]/,St)?et.push(be(St,ne)+": "+be(ne[St],ne)):et.push(St+": "+be(ne[St],ne))));if(typeof ve=="function")for(var rr=0;rr<st.length;rr++)ze.call(ne,st[rr])&&et.push("["+be(st[rr])+"]: "+be(ne[st[rr]],ne));return et}},83949:x=>{"use strict";var N=String.prototype.replace,f=/%20/g,v={RFC1738:"RFC1738",RFC3986:"RFC3986"};x.exports={default:v.RFC3986,formatters:{RFC1738:function(C){return N.call(C,f,"+")},RFC3986:function(C){return String(C)}},RFC1738:v.RFC1738,RFC3986:v.RFC3986}},67905:(x,N,f)=>{"use strict";var v=f(85095),C=f(95990),O=f(83949);x.exports={formats:O,parse:C,stringify:v}},95990:(x,N,f)=>{"use strict";var v=f(37748),C=Object.prototype.hasOwnProperty,O=Array.isArray,P={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:v.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},D=function(V){return V.replace(/&#(\d+);/g,function(T,J){return String.fromCharCode(parseInt(J,10))})},R=function(V,T){return V&&typeof V=="string"&&T.comma&&V.indexOf(",")>-1?V.split(","):V},_="utf8=%26%2310003%3B",Z="utf8=%E2%9C%93",q=function(T,J){var M={__proto__:null},S=J.ignoreQueryPrefix?T.replace(/^\?/,""):T,L=J.parameterLimit===1/0?void 0:J.parameterLimit,F=S.split(J.delimiter,L),K=-1,te,j=J.charset;if(J.charsetSentinel)for(te=0;te<F.length;++te)F[te].indexOf("utf8=")===0&&(F[te]===Z?j="utf-8":F[te]===_&&(j="iso-8859-1"),K=te,te=F.length);for(te=0;te<F.length;++te)if(te!==K){var ie=F[te],U=ie.indexOf("]="),Y=U===-1?ie.indexOf("="):U+1,ce,ge;Y===-1?(ce=J.decoder(ie,P.decoder,j,"key"),ge=J.strictNullHandling?null:""):(ce=J.decoder(ie.slice(0,Y),P.decoder,j,"key"),ge=v.maybeMap(R(ie.slice(Y+1),J),function(G){return J.decoder(G,P.decoder,j,"value")})),ge&&J.interpretNumericEntities&&j==="iso-8859-1"&&(ge=D(ge)),ie.indexOf("[]=")>-1&&(ge=O(ge)?[ge]:ge),C.call(M,ce)?M[ce]=v.combine(M[ce],ge):M[ce]=ge}return M},he=function(V,T,J,M){for(var S=M?T:R(T,J),L=V.length-1;L>=0;--L){var F,K=V[L];if(K==="[]"&&J.parseArrays)F=[].concat(S);else{F=J.plainObjects?Object.create(null):{};var te=K.charAt(0)==="["&&K.charAt(K.length-1)==="]"?K.slice(1,-1):K,j=parseInt(te,10);!J.parseArrays&&te===""?F={0:S}:!isNaN(j)&&K!==te&&String(j)===te&&j>=0&&J.parseArrays&&j<=J.arrayLimit?(F=[],F[j]=S):te!=="__proto__"&&(F[te]=S)}S=F}return S},re=function(T,J,M,S){if(T){var L=M.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,F=/(\[[^[\]]*])/,K=/(\[[^[\]]*])/g,te=M.depth>0&&F.exec(L),j=te?L.slice(0,te.index):L,ie=[];if(j){if(!M.plainObjects&&C.call(Object.prototype,j)&&!M.allowPrototypes)return;ie.push(j)}for(var U=0;M.depth>0&&(te=K.exec(L))!==null&&U<M.depth;){if(U+=1,!M.plainObjects&&C.call(Object.prototype,te[1].slice(1,-1))&&!M.allowPrototypes)return;ie.push(te[1])}return te&&ie.push("["+L.slice(te.index)+"]"),he(ie,J,M,S)}},se=function(T){if(!T)return P;if(T.decoder!==null&&T.decoder!==void 0&&typeof T.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var J=typeof T.charset>"u"?P.charset:T.charset;return{allowDots:typeof T.allowDots>"u"?P.allowDots:!!T.allowDots,allowPrototypes:typeof T.allowPrototypes=="boolean"?T.allowPrototypes:P.allowPrototypes,allowSparse:typeof T.allowSparse=="boolean"?T.allowSparse:P.allowSparse,arrayLimit:typeof T.arrayLimit=="number"?T.arrayLimit:P.arrayLimit,charset:J,charsetSentinel:typeof T.charsetSentinel=="boolean"?T.charsetSentinel:P.charsetSentinel,comma:typeof T.comma=="boolean"?T.comma:P.comma,decoder:typeof T.decoder=="function"?T.decoder:P.decoder,delimiter:typeof T.delimiter=="string"||v.isRegExp(T.delimiter)?T.delimiter:P.delimiter,depth:typeof T.depth=="number"||T.depth===!1?+T.depth:P.depth,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities=="boolean"?T.interpretNumericEntities:P.interpretNumericEntities,parameterLimit:typeof T.parameterLimit=="number"?T.parameterLimit:P.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects=="boolean"?T.plainObjects:P.plainObjects,strictNullHandling:typeof T.strictNullHandling=="boolean"?T.strictNullHandling:P.strictNullHandling}};x.exports=function(V,T){var J=se(T);if(V===""||V===null||typeof V>"u")return J.plainObjects?Object.create(null):{};for(var M=typeof V=="string"?q(V,J):V,S=J.plainObjects?Object.create(null):{},L=Object.keys(M),F=0;F<L.length;++F){var K=L[F],te=re(K,M[K],J,typeof V=="string");S=v.merge(S,te,J)}return J.allowSparse===!0?S:v.compact(S)}},85095:(x,N,f)=>{"use strict";var v=f(44852),C=f(37748),O=f(83949),P=Object.prototype.hasOwnProperty,D={brackets:function(S){return S+"[]"},comma:"comma",indices:function(S,L){return S+"["+L+"]"},repeat:function(S){return S}},R=Array.isArray,_=Array.prototype.push,Z=function(M,S){_.apply(M,R(S)?S:[S])},q=Date.prototype.toISOString,he=O.default,re={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:C.encode,encodeValuesOnly:!1,format:he,formatter:O.formatters[he],indices:!1,serializeDate:function(S){return q.call(S)},skipNulls:!1,strictNullHandling:!1},se=function(S){return typeof S=="string"||typeof S=="number"||typeof S=="boolean"||typeof S=="symbol"||typeof S=="bigint"},V={},T=function M(S,L,F,K,te,j,ie,U,Y,ce,ge,G,ve,ee,He,Ve){for(var ze=S,ct=Ve,ut=0,ot=!1;(ct=ct.get(V))!==void 0&&!ot;){var Xt=ct.get(S);if(ut+=1,typeof Xt<"u"){if(Xt===ut)throw new RangeError("Cyclic object value");ot=!0}typeof ct.get(V)>"u"&&(ut=0)}if(typeof U=="function"?ze=U(L,ze):ze instanceof Date?ze=ge(ze):F==="comma"&&R(ze)&&(ze=C.maybeMap(ze,function(Jt){return Jt instanceof Date?ge(Jt):Jt})),ze===null){if(te)return ie&&!ee?ie(L,re.encoder,He,"key",G):L;ze=""}if(se(ze)||C.isBuffer(ze)){if(ie){var dt=ee?L:ie(L,re.encoder,He,"key",G);return[ve(dt)+"="+ve(ie(ze,re.encoder,He,"value",G))]}return[ve(L)+"="+ve(String(ze))]}var At=[];if(typeof ze>"u")return At;var nt;if(F==="comma"&&R(ze))ee&&ie&&(ze=C.maybeMap(ze,ie)),nt=[{value:ze.length>0?ze.join(",")||null:void 0}];else if(R(U))nt=U;else{var Ue=Object.keys(ze);nt=Y?Ue.sort(Y):Ue}for(var Fe=K&&R(ze)&&ze.length===1?L+"[]":L,Be=0;Be<nt.length;++Be){var it=nt[Be],Dt=typeof it=="object"&&typeof it.value<"u"?it.value:ze[it];if(!(j&&Dt===null)){var qe=R(ze)?typeof F=="function"?F(Fe,it):Fe:Fe+(ce?"."+it:"["+it+"]");Ve.set(S,ut);var xt=v();xt.set(V,Ve),Z(At,M(Dt,qe,F,K,te,j,F==="comma"&&ee&&R(ze)?null:ie,U,Y,ce,ge,G,ve,ee,He,xt))}}return At},J=function(S){if(!S)return re;if(S.encoder!==null&&typeof S.encoder<"u"&&typeof S.encoder!="function")throw new TypeError("Encoder has to be a function.");var L=S.charset||re.charset;if(typeof S.charset<"u"&&S.charset!=="utf-8"&&S.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var F=O.default;if(typeof S.format<"u"){if(!P.call(O.formatters,S.format))throw new TypeError("Unknown format option provided.");F=S.format}var K=O.formatters[F],te=re.filter;return(typeof S.filter=="function"||R(S.filter))&&(te=S.filter),{addQueryPrefix:typeof S.addQueryPrefix=="boolean"?S.addQueryPrefix:re.addQueryPrefix,allowDots:typeof S.allowDots>"u"?re.allowDots:!!S.allowDots,charset:L,charsetSentinel:typeof S.charsetSentinel=="boolean"?S.charsetSentinel:re.charsetSentinel,delimiter:typeof S.delimiter>"u"?re.delimiter:S.delimiter,encode:typeof S.encode=="boolean"?S.encode:re.encode,encoder:typeof S.encoder=="function"?S.encoder:re.encoder,encodeValuesOnly:typeof S.encodeValuesOnly=="boolean"?S.encodeValuesOnly:re.encodeValuesOnly,filter:te,format:F,formatter:K,serializeDate:typeof S.serializeDate=="function"?S.serializeDate:re.serializeDate,skipNulls:typeof S.skipNulls=="boolean"?S.skipNulls:re.skipNulls,sort:typeof S.sort=="function"?S.sort:null,strictNullHandling:typeof S.strictNullHandling=="boolean"?S.strictNullHandling:re.strictNullHandling}};x.exports=function(M,S){var L=M,F=J(S),K,te;typeof F.filter=="function"?(te=F.filter,L=te("",L)):R(F.filter)&&(te=F.filter,K=te);var j=[];if(typeof L!="object"||L===null)return"";var ie;S&&S.arrayFormat in D?ie=S.arrayFormat:S&&"indices"in S?ie=S.indices?"indices":"repeat":ie="indices";var U=D[ie];if(S&&"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var Y=U==="comma"&&S&&S.commaRoundTrip;K||(K=Object.keys(L)),F.sort&&K.sort(F.sort);for(var ce=v(),ge=0;ge<K.length;++ge){var G=K[ge];F.skipNulls&&L[G]===null||Z(j,T(L[G],G,U,Y,F.strictNullHandling,F.skipNulls,F.encode?F.encoder:null,F.filter,F.sort,F.allowDots,F.serializeDate,F.format,F.formatter,F.encodeValuesOnly,F.charset,ce))}var ve=j.join(F.delimiter),ee=F.addQueryPrefix===!0?"?":"";return F.charsetSentinel&&(F.charset==="iso-8859-1"?ee+="utf8=%26%2310003%3B&":ee+="utf8=%E2%9C%93&"),ve.length>0?ee+ve:""}},37748:(x,N,f)=>{"use strict";var v=f(83949),C=Object.prototype.hasOwnProperty,O=Array.isArray,P=function(){for(var M=[],S=0;S<256;++S)M.push("%"+((S<16?"0":"")+S.toString(16)).toUpperCase());return M}(),D=function(S){for(;S.length>1;){var L=S.pop(),F=L.obj[L.prop];if(O(F)){for(var K=[],te=0;te<F.length;++te)typeof F[te]<"u"&&K.push(F[te]);L.obj[L.prop]=K}}},R=function(S,L){for(var F=L&&L.plainObjects?Object.create(null):{},K=0;K<S.length;++K)typeof S[K]<"u"&&(F[K]=S[K]);return F},_=function M(S,L,F){if(!L)return S;if(typeof L!="object"){if(O(S))S.push(L);else if(S&&typeof S=="object")(F&&(F.plainObjects||F.allowPrototypes)||!C.call(Object.prototype,L))&&(S[L]=!0);else return[S,L];return S}if(!S||typeof S!="object")return[S].concat(L);var K=S;return O(S)&&!O(L)&&(K=R(S,F)),O(S)&&O(L)?(L.forEach(function(te,j){if(C.call(S,j)){var ie=S[j];ie&&typeof ie=="object"&&te&&typeof te=="object"?S[j]=M(ie,te,F):S.push(te)}else S[j]=te}),S):Object.keys(L).reduce(function(te,j){var ie=L[j];return C.call(te,j)?te[j]=M(te[j],ie,F):te[j]=ie,te},K)},Z=function(S,L){return Object.keys(L).reduce(function(F,K){return F[K]=L[K],F},S)},q=function(M,S,L){var F=M.replace(/\+/g," ");if(L==="iso-8859-1")return F.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(F)}catch{return F}},he=function(S,L,F,K,te){if(S.length===0)return S;var j=S;if(typeof S=="symbol"?j=Symbol.prototype.toString.call(S):typeof S!="string"&&(j=String(S)),F==="iso-8859-1")return escape(j).replace(/%u[0-9a-f]{4}/gi,function(ce){return"%26%23"+parseInt(ce.slice(2),16)+"%3B"});for(var ie="",U=0;U<j.length;++U){var Y=j.charCodeAt(U);if(Y===45||Y===46||Y===95||Y===126||Y>=48&&Y<=57||Y>=65&&Y<=90||Y>=97&&Y<=122||te===v.RFC1738&&(Y===40||Y===41)){ie+=j.charAt(U);continue}if(Y<128){ie=ie+P[Y];continue}if(Y<2048){ie=ie+(P[192|Y>>6]+P[128|Y&63]);continue}if(Y<55296||Y>=57344){ie=ie+(P[224|Y>>12]+P[128|Y>>6&63]+P[128|Y&63]);continue}U+=1,Y=65536+((Y&1023)<<10|j.charCodeAt(U)&1023),ie+=P[240|Y>>18]+P[128|Y>>12&63]+P[128|Y>>6&63]+P[128|Y&63]}return ie},re=function(S){for(var L=[{obj:{o:S},prop:"o"}],F=[],K=0;K<L.length;++K)for(var te=L[K],j=te.obj[te.prop],ie=Object.keys(j),U=0;U<ie.length;++U){var Y=ie[U],ce=j[Y];typeof ce=="object"&&ce!==null&&F.indexOf(ce)===-1&&(L.push({obj:j,prop:Y}),F.push(ce))}return D(L),S},se=function(S){return Object.prototype.toString.call(S)==="[object RegExp]"},V=function(S){return!S||typeof S!="object"?!1:!!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S))},T=function(S,L){return[].concat(S,L)},J=function(S,L){if(O(S)){for(var F=[],K=0;K<S.length;K+=1)F.push(L(S[K]));return F}return L(S)};x.exports={arrayToObject:R,assign:Z,combine:T,compact:re,decode:q,encode:he,isBuffer:V,isRegExp:se,maybeMap:J,merge:_}},99913:(x,N,f)=>{"use strict";var v;function C(){return C=Object.assign||function(se){for(var V=1;V<arguments.length;V++){var T=arguments[V];for(var J in T)Object.prototype.hasOwnProperty.call(T,J)&&(se[J]=T[J])}return se},C.apply(this,arguments)}function O(se){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(T){return typeof T}:O=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},O(se)}var P=function(){var se=function(T,J){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,S){M.__proto__=S}||function(M,S){for(var L in S)S.hasOwnProperty(L)&&(M[L]=S[L])},se(T,J)};return function(V,T){se(V,T);function J(){this.constructor=V}V.prototype=T===null?Object.create(T):(J.prototype=T.prototype,new J)}}();v={value:!0},v=N.fk=void 0;var D=f(29901),R=typeof navigator>"u"||f.g.PREVENT_CODEMIRROR_RENDER===!0,_;R||(_=f(46944));var Z=function(){function se(){}return se.equals=function(V,T){var J=this,M=Object.keys,S=O(V),L=O(T);return V&&T&&S==="object"&&S===L?M(V).length===M(T).length&&M(V).every(function(F){return J.equals(V[F],T[F])}):V===T},se}(),q=function(){function se(V,T){this.editor=V,this.props=T}return se.prototype.delegateCursor=function(V,T,J){var M=this.editor.getDoc();J&&this.editor.focus(),T?M.setCursor(V):M.setCursor(V,null,{scroll:!1})},se.prototype.delegateScroll=function(V){this.editor.scrollTo(V.x,V.y)},se.prototype.delegateSelection=function(V,T){var J=this.editor.getDoc();J.setSelections(V),T&&this.editor.focus()},se.prototype.apply=function(V){V&&V.selection&&V.selection.ranges&&this.delegateSelection(V.selection.ranges,V.selection.focus||!1),V&&V.cursor&&this.delegateCursor(V.cursor,V.autoScroll||!1,this.editor.getOption("autofocus")||!1),V&&V.scroll&&this.delegateScroll(V.scroll)},se.prototype.applyNext=function(V,T,J){V&&V.selection&&V.selection.ranges&&T&&T.selection&&T.selection.ranges&&!Z.equals(V.selection.ranges,T.selection.ranges)&&this.delegateSelection(T.selection.ranges,T.selection.focus||!1),V&&V.cursor&&T&&T.cursor&&!Z.equals(V.cursor,T.cursor)&&this.delegateCursor(J.cursor||T.cursor,T.autoScroll||!1,T.autoCursor||!1),V&&V.scroll&&T&&T.scroll&&!Z.equals(V.scroll,T.scroll)&&this.delegateScroll(T.scroll)},se.prototype.applyUserDefined=function(V,T){T&&T.cursor&&this.delegateCursor(T.cursor,V.autoScroll||!1,this.editor.getOption("autofocus")||!1)},se.prototype.wire=function(V){var T=this;Object.keys(V||{}).filter(function(J){return/^on/.test(J)}).forEach(function(J){switch(J){case"onBlur":T.editor.on("blur",function(M,S){T.props.onBlur(T.editor,S)});break;case"onContextMenu":{T.editor.on("contextmenu",function(M,S){T.props.onContextMenu(T.editor,S)});break}case"onCopy":{T.editor.on("copy",function(M,S){T.props.onCopy(T.editor,S)});break}case"onCursor":T.editor.on("cursorActivity",function(M){T.props.onCursor(T.editor,T.editor.getDoc().getCursor())});break;case"onCursorActivity":T.editor.on("cursorActivity",function(M){T.props.onCursorActivity(T.editor)});break;case"onCut":{T.editor.on("cut",function(M,S){T.props.onCut(T.editor,S)});break}case"onDblClick":{T.editor.on("dblclick",function(M,S){T.props.onDblClick(T.editor,S)});break}case"onDragEnter":T.editor.on("dragenter",function(M,S){T.props.onDragEnter(T.editor,S)});break;case"onDragLeave":{T.editor.on("dragleave",function(M,S){T.props.onDragLeave(T.editor,S)});break}case"onDragOver":T.editor.on("dragover",function(M,S){T.props.onDragOver(T.editor,S)});break;case"onDragStart":{T.editor.on("dragstart",function(M,S){T.props.onDragStart(T.editor,S)});break}case"onDrop":T.editor.on("drop",function(M,S){T.props.onDrop(T.editor,S)});break;case"onFocus":T.editor.on("focus",function(M,S){T.props.onFocus(T.editor,S)});break;case"onGutterClick":T.editor.on("gutterClick",function(M,S,L,F){T.props.onGutterClick(T.editor,S,L,F)});break;case"onInputRead":T.editor.on("inputRead",function(M,S){T.props.onInputRead(T.editor,S)});break;case"onKeyDown":T.editor.on("keydown",function(M,S){T.props.onKeyDown(T.editor,S)});break;case"onKeyHandled":T.editor.on("keyHandled",function(M,S,L){T.props.onKeyHandled(T.editor,S,L)});break;case"onKeyPress":T.editor.on("keypress",function(M,S){T.props.onKeyPress(T.editor,S)});break;case"onKeyUp":T.editor.on("keyup",function(M,S){T.props.onKeyUp(T.editor,S)});break;case"onMouseDown":{T.editor.on("mousedown",function(M,S){T.props.onMouseDown(T.editor,S)});break}case"onPaste":{T.editor.on("paste",function(M,S){T.props.onPaste(T.editor,S)});break}case"onRenderLine":{T.editor.on("renderLine",function(M,S,L){T.props.onRenderLine(T.editor,S,L)});break}case"onScroll":T.editor.on("scroll",function(M){T.props.onScroll(T.editor,T.editor.getScrollInfo())});break;case"onSelection":T.editor.on("beforeSelectionChange",function(M,S){T.props.onSelection(T.editor,S)});break;case"onTouchStart":{T.editor.on("touchstart",function(M,S){T.props.onTouchStart(T.editor,S)});break}case"onUpdate":T.editor.on("update",function(M){T.props.onUpdate(T.editor)});break;case"onViewportChange":T.editor.on("viewportChange",function(M,S,L){T.props.onViewportChange(T.editor,S,L)});break}})},se}(),he=function(se){P(V,se);function V(T){var J=se.call(this,T)||this;return R||(J.applied=!1,J.appliedNext=!1,J.appliedUserDefined=!1,J.deferred=null,J.emulating=!1,J.hydrated=!1,J.initCb=function(){J.props.editorDidConfigure&&J.props.editorDidConfigure(J.editor)},J.mounted=!1),J}return V.prototype.hydrate=function(T){var J=this,M=T&&T.options?T.options:{},S=C({},_.defaults,this.editor.options,M),L=Object.keys(S).some(function(F){return J.editor.getOption(F)!==S[F]});L&&Object.keys(S).forEach(function(F){M.hasOwnProperty(F)&&J.editor.getOption(F)!==S[F]&&(J.editor.setOption(F,S[F]),J.mirror.setOption(F,S[F]))}),this.hydrated||(this.deferred?this.resolveChange(T.value):this.initChange(T.value||"")),this.hydrated=!0},V.prototype.initChange=function(T){this.emulating=!0;var J=this.editor.getDoc(),M=J.lastLine(),S=J.getLine(J.lastLine()).length;J.replaceRange(T||"",{line:0,ch:0},{line:M,ch:S}),this.mirror.setValue(T),J.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},V.prototype.resolveChange=function(T){this.emulating=!0;var J=this.editor.getDoc();if(this.deferred.origin==="undo"?J.undo():this.deferred.origin==="redo"?J.redo():J.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),T&&T!==J.getValue()){var M=J.getCursor();J.setValue(T),J.setCursor(M)}this.emulating=!1,this.deferred=null},V.prototype.mirrorChange=function(T){var J=this.editor.getDoc();return T.origin==="undo"?(J.setHistory(this.mirror.getHistory()),this.mirror.undo()):T.origin==="redo"?(J.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(T.text,T.from,T.to,T.origin),this.mirror.getValue()},V.prototype.componentDidMount=function(){var T=this;R||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&_.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=_(this.ref,this.props.options),this.shared=new q(this.editor,this.props),this.mirror=_(function(){},this.props.options),this.editor.on("electricInput",function(){T.mirror.setHistory(T.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){T.mirror.setCursor(T.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(J,M){if(!T.emulating){M.cancel(),T.deferred=M;var S=T.mirrorChange(T.deferred);T.props.onBeforeChange&&T.props.onBeforeChange(T.editor,T.deferred,S)}}),this.editor.on("change",function(J,M){T.mounted&&T.props.onChange&&T.props.onChange(T.editor,M,T.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},V.prototype.componentDidUpdate=function(T){if(!R){var J={cursor:null};this.props.value!==T.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(J.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(T,this.props,J),this.appliedNext=!0),this.shared.applyUserDefined(T,J),this.appliedUserDefined=!0}},V.prototype.componentWillUnmount=function(){R||this.props.editorWillUnmount&&this.props.editorWillUnmount(_)},V.prototype.shouldComponentUpdate=function(T,J){return!R},V.prototype.render=function(){var T=this;if(R)return null;var J=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return D.createElement("div",{className:J,ref:function(S){return T.ref=S}})},V}(D.Component);N.fk=he;var re=function(se){P(V,se);function V(T){var J=se.call(this,T)||this;return R||(J.applied=!1,J.appliedUserDefined=!1,J.continueChange=!1,J.detached=!1,J.hydrated=!1,J.initCb=function(){J.props.editorDidConfigure&&J.props.editorDidConfigure(J.editor)},J.mounted=!1,J.onBeforeChangeCb=function(){J.continueChange=!0}),J}return V.prototype.hydrate=function(T){var J=this,M=T&&T.options?T.options:{},S=C({},_.defaults,this.editor.options,M),L=Object.keys(S).some(function(j){return J.editor.getOption(j)!==S[j]});if(L&&Object.keys(S).forEach(function(j){M.hasOwnProperty(j)&&J.editor.getOption(j)!==S[j]&&J.editor.setOption(j,S[j])}),!this.hydrated){var F=this.editor.getDoc(),K=F.lastLine(),te=F.getLine(F.lastLine()).length;F.replaceRange(T.value||"",{line:0,ch:0},{line:K,ch:te})}this.hydrated=!0},V.prototype.componentDidMount=function(){var T=this;R||(this.detached=this.props.detach===!0,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&_.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=_(this.ref,this.props.options),this.shared=new q(this.editor,this.props),this.editor.on("beforeChange",function(J,M){T.props.onBeforeChange&&T.props.onBeforeChange(T.editor,M,T.editor.getValue(),T.onBeforeChangeCb)}),this.editor.on("change",function(J,M){!T.mounted||!T.props.onChange||(T.props.onBeforeChange?T.continueChange&&T.props.onChange(T.editor,M,T.editor.getValue()):T.props.onChange(T.editor,M,T.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},V.prototype.componentDidUpdate=function(T){if(this.detached&&this.props.detach===!1&&(this.detached=!1,T.editorDidAttach&&T.editorDidAttach(this.editor)),!this.detached&&this.props.detach===!0&&(this.detached=!0,T.editorDidDetach&&T.editorDidDetach(this.editor)),!(R||this.detached)){var J={cursor:null};this.props.value!==T.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),!T.autoCursor&&T.autoCursor!==void 0&&(J.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(T),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(T,J),this.appliedUserDefined=!0)}},V.prototype.componentWillUnmount=function(){R||this.props.editorWillUnmount&&this.props.editorWillUnmount(_)},V.prototype.shouldComponentUpdate=function(T,J){var M=!0;return R&&(M=!1),this.detached&&T.detach&&(M=!1),M},V.prototype.render=function(){var T=this;if(R)return null;var J=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return D.createElement("div",{className:J,ref:function(S){return T.ref=S}})},V}(D.Component);v=re},44852:(x,N,f)=>{"use strict";var v=f(71013),C=f(2864),O=f(14927),P=v("%TypeError%"),D=v("%WeakMap%",!0),R=v("%Map%",!0),_=C("WeakMap.prototype.get",!0),Z=C("WeakMap.prototype.set",!0),q=C("WeakMap.prototype.has",!0),he=C("Map.prototype.get",!0),re=C("Map.prototype.set",!0),se=C("Map.prototype.has",!0),V=function(S,L){for(var F=S,K;(K=F.next)!==null;F=K)if(K.key===L)return F.next=K.next,K.next=S.next,S.next=K,K},T=function(S,L){var F=V(S,L);return F&&F.value},J=function(S,L,F){var K=V(S,L);K?K.value=F:S.next={key:L,next:S.next,value:F}},M=function(S,L){return!!V(S,L)};x.exports=function(){var L,F,K,te={assert:function(j){if(!te.has(j))throw new P("Side channel does not contain "+O(j))},get:function(j){if(D&&j&&(typeof j=="object"||typeof j=="function")){if(L)return _(L,j)}else if(R){if(F)return he(F,j)}else if(K)return T(K,j)},has:function(j){if(D&&j&&(typeof j=="object"||typeof j=="function")){if(L)return q(L,j)}else if(R){if(F)return se(F,j)}else if(K)return M(K,j);return!1},set:function(j,ie){D&&j&&(typeof j=="object"||typeof j=="function")?(L||(L=new D),Z(L,j,ie)):R?(F||(F=new R),re(F,j,ie)):(K||(K={key:{},next:null}),J(K,j,ie))}};return te}},83539:(x,N,f)=>{var v=f(26673),C=f(20788);C=C.__esModule?C.default:C,typeof C=="string"&&(C=[[x.id,C,""]]);var O={};O.insert="head",O.singleton=!1;var P=v(C,O);x.exports=C.locals||{}},17664:(x,N,f)=>{var v=f(26673),C=f(15218);C=C.__esModule?C.default:C,typeof C=="string"&&(C=[[x.id,C,""]]);var O={};O.insert="head",O.singleton=!1;var P=v(C,O);x.exports=C.locals||{}},6766:(x,N,f)=>{var v=f(26673),C=f(80766);C=C.__esModule?C.default:C,typeof C=="string"&&(C=[[x.id,C,""]]);var O={};O.insert="head",O.singleton=!1;var P=v(C,O);x.exports=C.locals||{}},49812:(x,N,f)=>{var v=f(26673),C=f(62459);C=C.__esModule?C.default:C,typeof C=="string"&&(C=[[x.id,C,""]]);var O={};O.insert="head",O.singleton=!1;var P=v(C,O);x.exports=C.locals||{}},56089:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="},17735:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="},96192:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"},71090:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="},46050:x=>{"use strict";x.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="},65710:()=>{},93652:(x,N,f)=>{x.exports=f(24018)},10017:(x,N,f)=>{x.exports=f(27411)},34961:(x,N,f)=>{x.exports=f(79155)},86751:(x,N,f)=>{x.exports=f(13375)},12953:(x,N,f)=>{x.exports=f(95442)},11099:(x,N,f)=>{x.exports=f(55334)},86351:(x,N,f)=>{x.exports=f(48261)},70762:(x,N,f)=>{x.exports=f(92864)},10954:(x,N,f)=>{x.exports=f(27923)},55839:(x,N,f)=>{x.exports=f(89225)},23422:(x,N,f)=>{x.exports=f(95281)},47319:(x,N,f)=>{x.exports=f(55468)}}]);
|
|
495
|
+
`;function Vh(e){const{scopes:r,id:i}=e;let a=[];try{a=JSON.parse((0,dt.YQ)(`auth.${i}.scopes`))}catch{}return!r||!r.length?A.createElement(A.Fragment,null):A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Scopes: "),A.createElement(Jm,{field:`auth.${i}.scopes`,initialValue:a,items:r,showControls:!0,trimItemsLength:!0}))}const qm=({token:e,loading:r,error:i})=>r?A.createElement(Ye.GE,null,"Please, finish your authorization flow or cancel authorization."):i?A.createElement(Nm,null,A.createElement(Ye.Xq,null,i)):e?.access_token?null:A.createElement(Ye.GE,null," No Access Token. Please, Authorize. ");var ey=Object.defineProperty,ty=Object.defineProperties,ry=Object.getOwnPropertyDescriptors,jh=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,Wh=(e,r,i)=>r in e?ey(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Zf=(e,r)=>{for(var i in r||(r={}))ny.call(r,i)&&Wh(e,i,r[i]);if(jh)for(var i of jh(r))iy.call(r,i)&&Wh(e,i,r[i]);return e},Id=(e,r)=>ty(e,ry(r)),ay=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function oy(e){if(!e)return"Field is required"}const qf=({usePkce:e,form:r,id:i,formApi:a,flow:o,tokenUrl:f,authCorsProxyUrl:d,tokenEndpointAuthMethod:v,server:h,scopes:g,authorizationUrl:b,defaultValues:E,clientId:V})=>{var I,W,Y,_;const{oAuth2RedirectURI:U,routingBasePath:G}=(0,ui.useRecoilValue)(Hi.lk),[ce,Ce]=(0,A.useState)(null),[ge,ke]=(0,A.useState)(!1),[be,me]=(0,A.useState)(!1),[ue,Oe]=(0,A.useState)(void 0),[Te,Me]=(0,A.useState)(void 0),[Xe,yt]=(0,A.useState)(void 0),at=((W=(I=r.values)==null?void 0:I.auth)==null?void 0:W[i])||{},fr=((_=(Y=r.errors)==null?void 0:Y.auth)==null?void 0:_[i])||{},Er=ue!==void 0&&Te!==Xe?{label:"sync",onClick:()=>{ue&&Me(Xe)}}:void 0;(0,A.useEffect)(()=>{if(e){const Vt=(0,Fn.CY)(43);Xd(Vt).then(Ot=>{Oe(Vt),Me(Ot),yt(Ot)})}},[e]);const cr=Vt=>{if(!Vt||(a.validate(),!(0,Fn.Qr)(fr)))return;ke(!0),Ce(null);const Ot=d?d+(0,xt.jg)(Vt):Vt,pn=d&&f?d+(0,xt.jg)(f):f,Ki=a.getValue(`auth.${i}.scopes`),qn={authorizationUrl:Ot.startsWith("http")?Ot:h+Ot,clientId:at.client_id,scopes:Ki,redirectUri:U,routingBasePath:G,successCallback:Kr=>{a.setValue(`auth.${i}.token`,Kr),ke(!1),Ce(null)},errorCallback:Kr=>{ke(!1),Ce(Kr?.message||"Failed to retrieve the access token")}};if(o==="implicit"&&ki.authorizeImplicit(qn),!(0,xt.xl)(v)){console.log(`Unsupported token endpoint auth method: ${v}`);return}o==="authorizationCode"&&ki.authorizeAuthorizationCode(Zf(Id(Zf({},qn),{tokenUrl:pn?.startsWith("http")?pn:h+pn,clientSecret:at.client_secret,extraHeaders:(0,xt.Or)({authMethod:v,clientId:at.client_id,clientSecret:at.client_secret})}),e&&{codeVerifier:ue,codeChallenge:Te}))},Tr=()=>{kt(),Ce(null)},nr=()=>{ke(!1),Ce(null),ki.clearRedirectData(o)},kt=()=>{a.setValue(`auth.${i}.token`,"")},Yt=()=>{me(Vt=>!Vt)},Ht=Vt=>ay(void 0,[Vt],function*({target:{value:Ot}}){const pn=yield Xd(Ot);Oe(Ot),yt(pn)});if(!b)return A.createElement(Ye.Xq,null,"No flow info");let _e=(0,dt.YQ)(`auth.${i}.token`)||JSON.stringify(E?.token);_e=_e?JSON.parse(_e):"";const qe=(0,dt.Al)(i,"client_id"),Tt={field:`auth.${i}.client_id`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${i}.client_id`)||V||E?.client_id,initValue:(0,dt.YQ)(`auth.${i}.client_id`)||V||E?.client_id,placeholder:"Your OAuth2 app Client ID",validate:oy,validateOnBlur:!0,validateOnChange:!0};return A.createElement("div",null,A.createElement(Ye.n5,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Client ID: "),qe?A.createElement(jl,Id(Zf({},Tt),{options:qe})):A.createElement(In,Id(Zf({},Tt),{"data-cy":"client-id-input",panel:"try-it"}))),o==="authorizationCode"&&A.createElement(A.Fragment,null,(!e?.hideClientSecretInput||!e)&&A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client Secret:"),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${i}.client_secret`,initialValue:(0,dt.YQ)(`auth.${i}.client_secret`)||E?.client_secret,validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),e&&!e.disableManualConfiguration&&A.createElement(Dm,null,A.createElement(Bh,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:be,onChange:Yt,"data-cy":"pkce-options-toggle"}),be&&A.createElement(Bm,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Code Verifier"),A.createElement(Vl,{fullWidth:!0,value:ue,onChange:Ht,panel:"try-it","data-cy":"code-verifier-input"})),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Code Challenge"),A.createElement(Vl,{fullWidth:!0,value:Te,onChange:({target:{value:Vt}})=>{Me(Vt)},inputActionButton:Er,panel:"try-it","data-cy":"code-challenge-input"}))))),A.createElement(In,{fullWidth:!0,field:`auth.${i}.token`,type:"hidden",initialValue:_e,panel:"try-it"}),A.createElement(Vh,{id:i,scopes:g}),at.token&&at.token.access_token?A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token: "),A.createElement(Vl,{disabled:!0,type:"password",fullWidth:!0,value:at.token.access_token,panel:"try-it"})):null),A.createElement(Rm,null,at.token&&at.token.access_token?A.createElement(Jt.Button,{fullWidth:!0,onClick:Tr},"Log out"):ge?A.createElement(A.Fragment,null,A.createElement(Jt.Button,{fullWidth:!0,onClick:nr},"Cancel"),A.createElement(Nh,null)):A.createElement(Jt.Button,{fullWidth:!0,color:"secondary",disabled:!(0,Fn.Qr)(fr),onClick:()=>{cr(b)}},"Authorize")),ge||ce||!at.token||!at.token.access_token&&A.createElement(qm,{loading:ge,error:ce,token:at.token}))};var sy=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function ly(e){var r,i;const{scheme:a,defaultValues:o}=e,[f,d]=(0,A.useState)({}),[v,h]=(0,A.useState)(),[g,b]=(0,A.useState)(!1);(0,A.useEffect)(()=>{E(a.openIdConnectUrl)},[a.openIdConnectUrl]);const E=V=>sy(this,null,function*(){b(!0),h("");try{const I=yield Lm(V);d(I)}catch(I){h(I.message)}b(!1)});return g?A.createElement(uy,null):v?A.createElement(Hh,{message:v}):A.createElement("div",null,A.createElement("div",null,(r=f?.response_types_supported)!=null&&r.includes("token")?A.createElement(A.Fragment,null,A.createElement(mn.S6,null,"OAuth2 Implicit Flow"),A.createElement(qf,{key:e.id,authorizationUrl:f.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:f.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:o})):(i=f?.response_types_supported)!=null&&i.includes("code")?A.createElement(A.Fragment,null,A.createElement(mn.S6,null,"OAuth2 Authorization Flow"),A.createElement(qf,{key:e.id,authorizationUrl:f.authorization_endpoint,tokenUrl:f.token_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:f.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,tokenEndpointAuthMethod:f?.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:o})):A.createElement("div",null,"Unsupported flow")))}function uy(){return A.createElement("div",null,A.createElement("div",null,A.createElement("div",null,"Fetching OpenID Connect metadata..."),A.createElement(Nh,null)))}function Hh({message:e}){return A.createElement("div",null,A.createElement("div",null,A.createElement(Ye.Xq,null,e)))}var fy=Object.defineProperty,cy=Object.defineProperties,dy=Object.getOwnPropertyDescriptors,Uh=Object.getOwnPropertySymbols,py=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,_h=(e,r,i)=>r in e?fy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,zh=(e,r)=>{for(var i in r||(r={}))py.call(r,i)&&_h(e,i,r[i]);if(Uh)for(var i of Uh(r))hy.call(r,i)&&_h(e,i,r[i]);return e},Gh=(e,r)=>cy(e,dy(r)),vy=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function gy(e){if(!e)return"Token is required"}const my=({form:e,id:r,formApi:i,server:a,flow:o,authCorsProxyUrl:f,defaultValues:d,clientId:v})=>{var h,g,b,E;const[V,I]=(0,A.useState)(""),[W,Y]=(0,A.useState)(!1),[_,U]=(0,A.useState)(!0),G=((g=(h=e?.values)==null?void 0:h.auth)==null?void 0:g[r])||{},ce=((E=(b=e.errors)==null?void 0:b.auth)==null?void 0:E[r])||{},Ce=()=>{i.setValue(`auth.${r}.token`,""),(0,dt.WW)(`auth.${r}.token`,"")},ge=()=>{U(Te=>!Te)},ke=()=>vy(void 0,null,function*(){if(W)return;const Te=f&&o.tokenUrl?f+(0,xt.jg)(o.tokenUrl):o.tokenUrl;if(ce.client_id||ce.client_secret){console.log("Provide client_id and client_secret");return}const Me=G.client_id,Xe=G.client_secret;if(!Me||!Xe){console.log("Provide client_id and client_secret");return}Y(!0);const yt=o["x-tokenEndpointAuthMethod"];if(!(0,xt.xl)(yt)){console.log(`Unsupported token endpoint auth method: ${yt}`);return}yield ki.authorizeClientCredentials({tokenUrl:Te.startsWith("http")?Te:a+Te,clientId:Me,clientSecret:Xe,scopes:G.scopes,extraHeaders:(0,xt.Or)({authMethod:yt,clientId:Me,clientSecret:Xe}),successCallback:at=>{i.setValue(`auth.${r}.token`,at),Y(!1)},errorCallback:at=>{Ce(),I(at.message),Y(!1)}})}),be=Object.keys(o.scopes);let me=(0,dt.YQ)(`auth.${r}.token`)||JSON.stringify(d?.token);me=me?JSON.parse(me):"";const ue=(0,dt.Al)(r,"client_id"),Oe={field:`auth.${r}.client_id`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${r}.client_id`)||v||d?.client_id,initValue:(0,dt.YQ)(`auth.${r}.client_id`)||v||d?.client_id,placeholder:"Your OAuth2 app Client ID"};return A.createElement(A.Fragment,null,A.createElement(Ye.n5,null,A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client ID:"),ue?A.createElement(jl,Gh(zh({},Oe),{options:ue})):A.createElement(In,Gh(zh({},Oe),{type:"password",panel:"try-it"}))),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null,"Client Secret:"),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${r}.client_secret`,initialValue:(0,dt.YQ)(`auth.${r}.client_secret`)||d?.client_secret,panel:"try-it"})),A.createElement(In,{fullWidth:!0,field:`auth.${r}.token`,type:"hidden",initialValue:me,validate:gy}),A.createElement(Vh,{id:r,scopes:be})),A.createElement(Jt.Button,{color:"primary",onClick:ke,blinking:W},W?"Loading...":"Request Token"),A.createElement(Ye.ph,null," Access Token "),V?A.createElement(Ye.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",A.createElement("pre",null,V)," "):G.token&&G.token.access_token?A.createElement(Ye.TR,null,A.createElement(Ye.WA,{length:G.token.access_token.length,masked:_},G.token.access_token),A.createElement(Ye.lf,{onClick:ge},_?"Show":"Hide"," "),A.createElement(Ye.h,{onClick:Ce}," Clear ")):A.createElement(Ye.Xq,{style:{marginBottom:"1em"}},"No token"))};var yy=Object.defineProperty,by=Object.defineProperties,xy=Object.getOwnPropertyDescriptors,$h=Object.getOwnPropertySymbols,Sy=Object.prototype.hasOwnProperty,wy=Object.prototype.propertyIsEnumerable,Kh=(e,r,i)=>r in e?yy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Ds=(e,r)=>{for(var i in r||(r={}))Sy.call(r,i)&&Kh(e,i,r[i]);if($h)for(var i of $h(r))wy.call(r,i)&&Kh(e,i,r[i]);return e},Bs=(e,r)=>by(e,xy(r));const Cy=({securityDefaults:e,operation:r,activeServer:i,authCorsProxyUrl:a,form:o,formApi:f})=>{var d,v;const[h,g]=(0,A.useState)(0),{parser:b}=(0,ui.useRecoilValue)(Hi.cS);(0,A.useEffect)(()=>{const U=r.security.map(Ce=>Ce.schemes.map(ge=>ge.id).join(" and ")),G=(0,dt.YQ)("securityRequirementName"),ce=U.findIndex(Ce=>Ce===G);g(ce<0?0:ce)},[r]);const E=U=>{g(U.idx),(0,dt.WW)("securityRequirementName",U.value)},V=r.security,W=V.map(U=>U.schemes.map(G=>G.id).join(" and ")).filter(Boolean).map((U,G)=>({value:U,idx:G}));if(W.length===0)return A.createElement(Hh,{message:"Cannot find security schema in the definition"});const Y=V[h],_=(0,dt.A8)(Y.schemes[0].id);return A.createElement(A.Fragment,null,A.createElement(Ye.n5,null,W.length>1&&A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Security scheme: "),A.createElement(mn.VD,{variant:"dark",fullWidth:!0,options:W,value:W[h].value,onChange:E}))||null,A.createElement(Jt.TryItSecurityApps,{apiId:(v=(d=b?.definition.info)==null?void 0:d["x-metadata"])==null?void 0:v.apiId,value:f.getValue(`auth.${_}`),onChange:U=>{f.setValue(`auth.${_}`,U)}}),V[h].schemes.map(U=>{var G,ce,Ce,ge,ke,be,me;const ue=(0,dt.A8)(U.id);if(U.type==="apiKey"){const Oe=(0,dt.Al)(ue,""),Te={field:`auth.${ue}`,fullWidth:!0,initialValue:(0,xt.NG)(U)||(0,dt.YQ)(`auth.${ue}`)||e?.[ue],initValue:(0,xt.NG)(U)||(0,dt.YQ)(`auth.${ue}`)||e?.[ue],validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(Ye.NI,{key:ue},A.createElement(Ye.lX,null," ",U.name,": "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(U.type==="http"){if(U.scheme==="basic"){const Oe=(0,dt.Al)(ue,"username"),Te={field:`auth.${ue}.username`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${ue}.username`)||((G=e?.[ue])==null?void 0:G.username),initValue:(0,dt.YQ)(`auth.${ue}.username`)||((ce=e?.[ue])==null?void 0:ce.username),validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," ",(0,Bl.l)("tryItAuthBasicUsername"),": "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{panel:"try-it"}))),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," ",(0,Bl.l)("tryItAuthBasicPassword"),": "),A.createElement(In,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${ue}.password`,initialValue:(0,dt.YQ)(`auth.${ue}.password`)||((Ce=e?.[ue])==null?void 0:Ce.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(U.scheme==="bearer"){const Oe=(0,dt.Al)(ue,""),Te={field:`auth.${ue}`,fullWidth:!0,initialValue:(0,dt.YQ)(`auth.${ue}`)||e?.[ue],initValue:(0,dt.YQ)(`auth.${ue}`)||e?.[ue],validate:xt.np,validateOnBlur:!0,validateOnChange:!0};return A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Bearer Token: "),Oe?A.createElement(jl,Bs(Ds({},Te),{options:Oe})):A.createElement(In,Bs(Ds({},Te),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(U.type==="oauth2"&&U.flows&&U.flows.clientCredentials)return A.createElement(my,{key:ue,flow:U.flows.clientCredentials,server:i,authCorsProxyUrl:a,id:ue,form:o,formApi:f,clientId:U.flows.clientCredentials["x-defaultClientId"]||U["x-defaultClientId"],defaultValues:e?.[ue]});if(U.type==="oauth2"&&U.flows&&U.flows.implicit)return A.createElement(qf,{key:ue,authorizationUrl:U.flows.implicit.authorizationUrl,authCorsProxyUrl:a,scopes:Object.keys(((ke=(ge=U?.flows)==null?void 0:ge.implicit)==null?void 0:ke.scopes)||{}),server:i,id:ue,form:o,formApi:f,clientId:U.flows.implicit["x-defaultClientId"]||U["x-defaultClientId"],flow:"implicit",defaultValues:e?.[ue]});if(U.type==="oauth2"&&U.flows&&U.flows.authorizationCode)return A.createElement(qf,{key:ue,authorizationUrl:U.flows.authorizationCode.authorizationUrl,tokenUrl:U.flows.authorizationCode.tokenUrl,authCorsProxyUrl:a,scopes:Object.keys(((be=U.flows.authorizationCode)==null?void 0:be.scopes)||{}),server:i,id:ue,form:o,formApi:f,clientId:U.flows.authorizationCode["x-defaultClientId"]||U["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:U.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:U.flows.authorizationCode["x-usePkce"],defaultValues:e?.[ue]});if(U.type==="oauth2"){let Oe=(0,dt.YQ)(`auth.${ue}.token`)||JSON.stringify((me=e?.[ue])==null?void 0:me.token);return Oe=Oe?JSON.parse(Oe):{},A.createElement(A.Fragment,{key:ue},A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token Type: "),A.createElement(In,{fullWidth:!0,field:`auth.${ue}.token.token_type`,initialValue:Oe.token_type||"Bearer",panel:"try-it"})),A.createElement(Ye.NI,null,A.createElement(Ye.lX,null," Access Token: "),A.createElement(In,{type:"password",fullWidth:!0,field:`auth.${ue}.token.access_token`,validate:xt.np,initialValue:Oe.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(U.type==="openIdConnect")return A.createElement(ly,{key:ue,server:i,authCorsProxyUrl:a,id:ue,form:o,formApi:f,scheme:U,clientId:U["x-defaultClientId"],defaultValues:e?.[ue]})}})),A.createElement("small",null,A.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))};var Ay=c(55919),Oy=Object.defineProperty,Yh=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Ty=Object.prototype.propertyIsEnumerable,Xh=(e,r,i)=>r in e?Oy(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,ky=(e,r)=>{for(var i in r||(r={}))Ey.call(r,i)&&Xh(e,i,r[i]);if(Yh)for(var i of Yh(r))Ty.call(r,i)&&Xh(e,i,r[i]);return e};function Py({operation:e,properties:r,securityDefaults:i,form:a,resolvedRawSpec:o,server:f,formApi:d,setFormApi:v,handleChange:h,handleServerChange:g}){const b=a.errors||{},E=b.path||b.cookie||b.header||b.query,{hooks:V,authCorsProxyUrl:I}=(0,ui.useRecoilValue)(Hi.lk),W=o&&dt.IB.get(o,e.pointer);let Y=a.values&&a.values.auth&&Object.keys(a.values.auth)[0];(!Y||!a.values.auth[Y])&&(Y=void 0),Y&&(a.values.auth[Y].token!==void 0||a.values.auth[Y].client_id!==void 0||a.values.auth[Y].client_secret!==void 0)&&(!a.values.auth[Y].token||!a.values.auth[Y].token.access_token)&&(Y=void 0),Y&&a.values.auth[Y].username!=null&&(!a.values.auth[Y].username||!a.values.auth[Y].password)&&(Y=void 0);const _=e.parameters||[];return!o&&A.createElement(A.Fragment,null,"Loading...")||A.createElement($t,{onChange:h,getApi:v,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},A.createElement(Lv,{operation:e,onChange:g}),A.createElement(ca.UQ,{initialActiveIdx:e.security.length&&Y?1:0},e.security.length&&d&&A.createElement(ud,{header:(0,Bl.l)("tryItAuth"),"data-cy":"security-trigger",error:!Y&&!!b.auth,success:!!Y,renderChildrenHidden:!0},Jt.OpenApiTryItSecurityPanel||V?.ReplaceTryItSecurityPanel?A.createElement(Fy,{field:"auth",validate:xt.np},U=>A.createElement(Ay.Q,{Hook:Jt.OpenApiTryItSecurityPanel||V?.ReplaceTryItSecurityPanel,props:{server:f,operation:e,onChange:U,OAuth2:ki}})):A.createElement(Cy,{formApi:d,form:a,operation:e,activeServer:f.url,authCorsProxyUrl:I,securityDefaults:i}))||null,e.requestBody&&d&&A.createElement(ud,{header:(0,Bl.l)("tryItBody"),"data-cy":"body-trigger",error:!!b.body,renderChildrenHidden:!0},A.createElement(bm,{validate:Iy,formApi:d,body:e.requestBody,pointer:e.pointer,id:e.id,resolvedBody:W?.requestBody,properties:r}))||null,_.length&&A.createElement(ud,{header:(0,Bl.l)("tryItParameters"),"data-cy":"parameters-trigger",error:E,renderChildrenHidden:!0},A.createElement(Fm,{operation:e,values:a.values,errors:a.errors||{}}))||null))}function Fy(e){const{fieldApi:r,render:i,userProps:a}=to(ky({},e)),{setValue:o}=r,{children:f}=a;return i(A.createElement(A.Fragment,null,f(o)))}function Iy(){}const Ly=(0,A.memo)(Py);function My({shaking:e,className:r,children:i,rootElement:a}){const[o]=(0,Fd.Bs)(a),f=(0,ui.useRecoilValue)(Hi.lk);return A.createElement(mn.q2,{scrollYOffset:f.scrollYOffset,shaking:e,className:r,"data-cy":"console",fullWidth:o?.width},i)}const Ny=(0,A.memo)(My);var Ry=Object.defineProperty,Dy=Object.defineProperties,By=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,Jh=Object.prototype.hasOwnProperty,Qh=Object.prototype.propertyIsEnumerable,Zh=(e,r,i)=>r in e?Ry(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Lr=(e,r)=>{for(var i in r||(r={}))Jh.call(r,i)&&Zh(e,i,r[i]);if(ec)for(var i of ec(r))Qh.call(r,i)&&Zh(e,i,r[i]);return e},wn=(e,r)=>Dy(e,By(r)),qh=(e,r)=>{var i={};for(var a in e)Jh.call(e,a)&&r.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&ec)for(var a of ec(e))r.indexOf(a)<0&&Qh.call(e,a)&&(i[a]=e[a]);return i},ev=(e,r,i)=>new Promise((a,o)=>{var f=h=>{try{v(i.next(h))}catch(g){o(g)}},d=h=>{try{v(i.throw(h))}catch(g){o(g)}},v=h=>h.done?a(h.value):Promise.resolve(h.value).then(f,d);v((i=i.apply(e,r)).next())});function tv(e){return e.startsWith("//")?"https:"+e:e}function Vy({operation:e,onResponse:r,className:i,rootElement:a,properties:o,securityDefaults:f,onClose:d}){let v=(0,A.useRef)();const[h,g]=(0,ui.useRecoilState)((0,cd.N)(e.pointer)),[b,E]=(0,A.useState)(h.activeServer||e.activeServer),[V,I]=(0,A.useState)(0),[W,Y]=(0,A.useState)(!1),[_,U]=(0,A.useState)(!1),[G,ce]=(0,A.useState)({values:{path:(0,xt.ZS)(e.parameters,"path"),cookie:(0,xt.ZS)(e.parameters,"cookie"),header:(0,xt.ZS)(e.parameters,"header"),query:(0,xt.ZS)(e.parameters,"query")}}),[Ce,ge]=(0,A.useState)(),[ke,be]=(0,A.useState)(),[me,ue]=(0,A.useState)(),[Oe,Te]=(0,A.useState)(),Me=(0,Fd.D9)(e),{parser:Xe,options:yt}=(0,ui.useRecoilValue)(Hi.cS),at=(0,A.useCallback)((kt,Yt=kt.getState())=>{var Ht=Yt,{values:_e}=Ht,qe=qh(Ht,["values"]);v.current=kt,setTimeout(()=>{ce(wn(Lr({},qe),{values:wn(Lr({},_e),{query:(0,xt.FU)(_e.query||{})})}))},0)},[]),fr=(0,A.useCallback)(kt=>{var Yt=kt,{values:Ht}=Yt,_e=qh(Yt,["values"]);const qe=wn(Lr({},_e),{values:wn(Lr({},Ht),{query:(0,xt.FU)(Ht.query||{})})});g(Tt=>wn(Lr({},Tt),{requestValues:JSON.parse(JSON.stringify(Ht))})),ce(qe),(0,xt.Hc)(qe)},[g]),Er=(0,A.useCallback)(kt=>{I(kt)},[]),cr=(0,A.useCallback)(kt=>{E(kt),g(Yt=>wn(Lr({},Yt),{activeServer:kt}))},[g]),Tr=(0,A.useCallback)(()=>ev(this,null,function*(){var kt,Yt,Ht,_e,qe,Tt,Vt,Ot,pn,Ki,qn,Kr,uo,No,Nn,Aa,tc;const{values:Fi,invalid:Vs}=((kt=v?.current)==null?void 0:kt.getState())||G||{};if((Yt=v.current)==null||Yt.submitForm(),Vs){U(!0),setTimeout(()=>U(!1),1e3),(_e=(Ht=yt.events)==null?void 0:Ht.tryItSent)==null||_e.call(Ht,{eventType:Sr.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description});return}const{servers:Yi,requestBody:Oa}=e,Ld=Oa&&Oa.content&&((qe=(0,$n.getActiveMediaType)(Oa.content))==null?void 0:qe.name)||"";let Xi=Fi.body;if(/json/.test(Ld))try{Xi=JSON.parse(Xi)}catch(Mt){console.error(Mt)}Y(!0);const Yr=Ce,js=(e.httpVerb||"").toLowerCase();if(!Yi)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const Jl=Yi.find(Mt=>b.url.endsWith(Mt.url.endsWith("/")?Mt.url.substring(0,Mt.url.length-1):Mt.url)),Md=Date.now();let ei,Ea=Fi.auth;if(Fi.auth){const Mt=Object.keys(Fi.auth)[0],ti=(0,zc.dw)(Mt);ei=wn(Lr({},Yr),{components:wn(Lr({},Yr?.components),{securitySchemes:wn(Lr({},(Tt=Yr?.components)==null?void 0:Tt.securitySchemes),{[ti]:wn(Lr({},(Ot=(Vt=Yr?.components)==null?void 0:Vt.securitySchemes)==null?void 0:Ot[ti]),{type:((qn=(Ki=(pn=Yr?.components)==null?void 0:pn.securitySchemes)==null?void 0:Ki[ti])==null?void 0:qn.type)==="openIdConnect"?"oauth2":((uo=(Kr=Yr?.components)==null?void 0:Kr.securitySchemes)==null?void 0:uo[ti]).type})})})}),Ea=wn(Lr({},Ea),{[ti]:Ea[Mt]})}else ei=Lr({},Yr);ei.servers=Yi;const Ro=yt.corsProxyUrl;Ro&&Yi.length&&(ei.servers=Yi.map(Mt=>wn(Lr({},Mt),{url:Ro+tv(Mt.url)})),ei.paths=wn(Lr({},ei.paths),{[e.path]:wn(Lr({},ei.paths[e.path]),{[js]:wn(Lr({},ei.paths[e.path][js]),{servers:void 0}),servers:void 0})}));const Ql=Oa?.content&&((No=(0,$n.getActiveMediaType)(Oa.content))==null?void 0:No.name)||null;if(Ql&&Xi&&pa(Ql)){const Mt=Object.values(Xi);Xi=Mt.length>1?Mt:Mt[0]}const Zl={server:Ro?Ro+tv(Jl.url):Jl.url,serverVariables:(0,xt.mj)(Jl),spec:ei,pathName:e.path,method:e.httpVerb,parameters:Lr(Lr(Lr(Lr({},Fi.path),Fi.query),Fi.header),Fi.cookie),securities:{authorized:Ea},requestBody:Xi,requestContentType:Ql,responseContentType:((Nn=Fi.header)==null?void 0:Nn.Accept)||null,requestInterceptor:(0,xt.Tz)(yt,e,Ea?.Authorization)};try{const Mt=yield Wc(Zl),ti=Mt?.data;ti instanceof Blob&&(pa(ti.type)&&(Mt.fileInfo={rawData:ti,fileName:(0,xt.AM)(Mt.headers)}),Mt.data=yield ti.text()),r?.({request:Zl,response:Mt}),Te(Mt),ue(void 0)}catch(Mt){Mt&&Mt.response&&Mt.response.data instanceof Blob&&(Mt.response.data=yield Mt.response.data.text(),r?.({request:Zl,response:Mt.response})),Te(void 0),ue(Mt)}finally{Y(!1),I(1),be(Date.now()-Md),(tc=(Aa=yt.events)==null?void 0:Aa.tryItSent)==null||tc.call(Aa,{eventType:Sr.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:e.operationId,operationPath:e.path,operationHttpVerb:e.httpVerb,operationSummary:e.description})}}),[b.url,G,r,e,yt,Ce]);(0,Jt.useMount)(()=>ev(this,null,function*(){var kt;const Yt=yield _c(e,Xe.definition);ge(Yt),(kt=v.current)==null||kt.setValues({})})),(0,A.useEffect)(()=>{Me&&Me!==e&&(Te(void 0),ue(void 0),I(0))},[e,Me]);const nr=!!(Oe||me);return A.createElement(Ny,{shaking:_,className:i,rootElement:a},A.createElement(ca.Hc,null,A.createElement(Ao,{active:V,hasResponse:nr,onChange:Er}),d&&A.createElement(mn.PZ,{onClick:d}," \u2715 ")),A.createElement(mn.RE,{hidden:V!==0,"data-cy":"console-request-body"},A.createElement(Ly,{operation:e,properties:o,securityDefaults:f,form:G,resolvedRawSpec:Ce,server:b,formApi:v.current,setFormApi:at,handleChange:fr,handleServerChange:cr})),A.createElement(mn.RE,{hidden:V!==1,"data-cy":"console-response-body"},A.createElement(af,{response:Oe,error:me,time:ke})),A.createElement(lf,{hasResponse:nr,params:G.values,operation:e,loading:W,execute:Tr}))}const jy=(0,A.memo)(Vy)},85208:(S,R,c)=>{var m=c(34440),O=c(84108),k=c(61085),L=c(77706),D=c(8636);function j(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}j.prototype.clear=m,j.prototype.delete=O,j.prototype.get=k,j.prototype.has=L,j.prototype.set=D,S.exports=j},81998:(S,R,c)=>{var m=c(90266),O=c(42875),k=c(45828),L=c(24115),D=c(67690);function j(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}j.prototype.clear=m,j.prototype.delete=O,j.prototype.get=k,j.prototype.has=L,j.prototype.set=D,S.exports=j},72887:(S,R,c)=>{var m=c(65234),O=c(84100),k=m(O,"Map");S.exports=k},95678:(S,R,c)=>{var m=c(39016),O=c(62363),k=c(64348),L=c(53062),D=c(30262);function j(X){var te=-1,re=X==null?0:X.length;for(this.clear();++te<re;){var he=X[te];this.set(he[0],he[1])}}j.prototype.clear=m,j.prototype.delete=O,j.prototype.get=k,j.prototype.has=L,j.prototype.set=D,S.exports=j},70861:(S,R,c)=>{var m=c(84100),O=m.Symbol;S.exports=O},29233:S=>{function R(c,m){for(var O=-1,k=c==null?0:c.length,L=Array(k);++O<k;)L[O]=m(c[O],O,c);return L}S.exports=R},18498:(S,R,c)=>{var m=c(58260);function O(k,L){for(var D=k.length;D--;)if(m(k[D][0],L))return D;return-1}S.exports=O},40548:(S,R,c)=>{var m=c(24007),O=c(86040);function k(L,D){D=m(D,L);for(var j=0,X=D.length;L!=null&&j<X;)L=L[O(D[j++])];return j&&j==X?L:void 0}S.exports=k},69823:(S,R,c)=>{var m=c(70861),O=c(91339),k=c(25151),L="[object Null]",D="[object Undefined]",j=m?m.toStringTag:void 0;function X(te){return te==null?te===void 0?D:L:j&&j in Object(te)?O(te):k(te)}S.exports=X},99817:(S,R,c)=>{var m=c(45563),O=c(28597),k=c(93702),L=c(55784),D=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,X=Function.prototype,te=Object.prototype,re=X.toString,he=te.hasOwnProperty,oe=RegExp("^"+re.call(he).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fe(J){if(!k(J)||O(J))return!1;var F=m(J)?oe:j;return F.test(L(J))}S.exports=fe},86245:(S,R,c)=>{var m=c(70861),O=c(29233),k=c(55589),L=c(52624),D=1/0,j=m?m.prototype:void 0,X=j?j.toString:void 0;function te(re){if(typeof re=="string")return re;if(k(re))return O(re,te)+"";if(L(re))return X?X.call(re):"";var he=re+"";return he=="0"&&1/re==-D?"-0":he}S.exports=te},24007:(S,R,c)=>{var m=c(55589),O=c(5130),k=c(44041),L=c(99835);function D(j,X){return m(j)?j:O(j,X)?[j]:k(L(j))}S.exports=D},1622:(S,R,c)=>{var m=c(84100),O=m["__core-js_shared__"];S.exports=O},20302:(S,R,c)=>{var m=typeof c.g=="object"&&c.g&&c.g.Object===Object&&c.g;S.exports=m},77570:(S,R,c)=>{var m=c(58949);function O(k,L){var D=k.__data__;return m(L)?D[typeof L=="string"?"string":"hash"]:D.map}S.exports=O},65234:(S,R,c)=>{var m=c(99817),O=c(67736);function k(L,D){var j=O(L,D);return m(j)?j:void 0}S.exports=k},91339:(S,R,c)=>{var m=c(70861),O=Object.prototype,k=O.hasOwnProperty,L=O.toString,D=m?m.toStringTag:void 0;function j(X){var te=k.call(X,D),re=X[D];try{X[D]=void 0;var he=!0}catch{}var oe=L.call(X);return he&&(te?X[D]=re:delete X[D]),oe}S.exports=j},67736:S=>{function R(c,m){return c?.[m]}S.exports=R},34440:(S,R,c)=>{var m=c(24545);function O(){this.__data__=m?m(null):{},this.size=0}S.exports=O},84108:S=>{function R(c){var m=this.has(c)&&delete this.__data__[c];return this.size-=m?1:0,m}S.exports=R},61085:(S,R,c)=>{var m=c(24545),O="__lodash_hash_undefined__",k=Object.prototype,L=k.hasOwnProperty;function D(j){var X=this.__data__;if(m){var te=X[j];return te===O?void 0:te}return L.call(X,j)?X[j]:void 0}S.exports=D},77706:(S,R,c)=>{var m=c(24545),O=Object.prototype,k=O.hasOwnProperty;function L(D){var j=this.__data__;return m?j[D]!==void 0:k.call(j,D)}S.exports=L},8636:(S,R,c)=>{var m=c(24545),O="__lodash_hash_undefined__";function k(L,D){var j=this.__data__;return this.size+=this.has(L)?0:1,j[L]=m&&D===void 0?O:D,this}S.exports=k},5130:(S,R,c)=>{var m=c(55589),O=c(52624),k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function D(j,X){if(m(j))return!1;var te=typeof j;return te=="number"||te=="symbol"||te=="boolean"||j==null||O(j)?!0:L.test(j)||!k.test(j)||X!=null&&j in Object(X)}S.exports=D},58949:S=>{function R(c){var m=typeof c;return m=="string"||m=="number"||m=="symbol"||m=="boolean"?c!=="__proto__":c===null}S.exports=R},28597:(S,R,c)=>{var m=c(1622),O=function(){var L=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""}();function k(L){return!!O&&O in L}S.exports=k},90266:S=>{function R(){this.__data__=[],this.size=0}S.exports=R},42875:(S,R,c)=>{var m=c(18498),O=Array.prototype,k=O.splice;function L(D){var j=this.__data__,X=m(j,D);if(X<0)return!1;var te=j.length-1;return X==te?j.pop():k.call(j,X,1),--this.size,!0}S.exports=L},45828:(S,R,c)=>{var m=c(18498);function O(k){var L=this.__data__,D=m(L,k);return D<0?void 0:L[D][1]}S.exports=O},24115:(S,R,c)=>{var m=c(18498);function O(k){return m(this.__data__,k)>-1}S.exports=O},67690:(S,R,c)=>{var m=c(18498);function O(k,L){var D=this.__data__,j=m(D,k);return j<0?(++this.size,D.push([k,L])):D[j][1]=L,this}S.exports=O},39016:(S,R,c)=>{var m=c(85208),O=c(81998),k=c(72887);function L(){this.size=0,this.__data__={hash:new m,map:new(k||O),string:new m}}S.exports=L},62363:(S,R,c)=>{var m=c(77570);function O(k){var L=m(this,k).delete(k);return this.size-=L?1:0,L}S.exports=O},64348:(S,R,c)=>{var m=c(77570);function O(k){return m(this,k).get(k)}S.exports=O},53062:(S,R,c)=>{var m=c(77570);function O(k){return m(this,k).has(k)}S.exports=O},30262:(S,R,c)=>{var m=c(77570);function O(k,L){var D=m(this,k),j=D.size;return D.set(k,L),this.size+=D.size==j?0:1,this}S.exports=O},32924:(S,R,c)=>{var m=c(67997),O=500;function k(L){var D=m(L,function(X){return j.size===O&&j.clear(),X}),j=D.cache;return D}S.exports=k},24545:(S,R,c)=>{var m=c(65234),O=m(Object,"create");S.exports=O},25151:S=>{var R=Object.prototype,c=R.toString;function m(O){return c.call(O)}S.exports=m},84100:(S,R,c)=>{var m=c(20302),O=typeof self=="object"&&self&&self.Object===Object&&self,k=m||O||Function("return this")();S.exports=k},44041:(S,R,c)=>{var m=c(32924),O=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k=/\\(\\)?/g,L=m(function(D){var j=[];return D.charCodeAt(0)===46&&j.push(""),D.replace(O,function(X,te,re,he){j.push(re?he.replace(k,"$1"):te||X)}),j});S.exports=L},86040:(S,R,c)=>{var m=c(52624),O=1/0;function k(L){if(typeof L=="string"||m(L))return L;var D=L+"";return D=="0"&&1/L==-O?"-0":D}S.exports=k},55784:S=>{var R=Function.prototype,c=R.toString;function m(O){if(O!=null){try{return c.call(O)}catch{}try{return O+""}catch{}}return""}S.exports=m},58260:S=>{function R(c,m){return c===m||c!==c&&m!==m}S.exports=R},13546:(S,R,c)=>{var m=c(40548);function O(k,L,D){var j=k==null?void 0:m(k,L);return j===void 0?D:j}S.exports=O},55589:S=>{var R=Array.isArray;S.exports=R},45563:(S,R,c)=>{var m=c(69823),O=c(93702),k="[object AsyncFunction]",L="[object Function]",D="[object GeneratorFunction]",j="[object Proxy]";function X(te){if(!O(te))return!1;var re=m(te);return re==L||re==D||re==k||re==j}S.exports=X},93702:S=>{function R(c){var m=typeof c;return c!=null&&(m=="object"||m=="function")}S.exports=R},50440:S=>{function R(c){return c!=null&&typeof c=="object"}S.exports=R},52624:(S,R,c)=>{var m=c(69823),O=c(50440),k="[object Symbol]";function L(D){return typeof D=="symbol"||O(D)&&m(D)==k}S.exports=L},67997:(S,R,c)=>{var m=c(95678),O="Expected a function";function k(L,D){if(typeof L!="function"||D!=null&&typeof D!="function")throw new TypeError(O);var j=function(){var X=arguments,te=D?D.apply(this,X):X[0],re=j.cache;if(re.has(te))return re.get(te);var he=L.apply(this,X);return j.cache=re.set(te,he)||re,he};return j.cache=new(k.Cache||m),j}k.Cache=m,S.exports=k},99835:(S,R,c)=>{var m=c(86245);function O(k){return k==null?"":m(k)}S.exports=O},14927:(S,R,c)=>{var m=typeof Map=="function"&&Map.prototype,O=Object.getOwnPropertyDescriptor&&m?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,k=m&&O&&typeof O.get=="function"?O.get:null,L=m&&Map.prototype.forEach,D=typeof Set=="function"&&Set.prototype,j=Object.getOwnPropertyDescriptor&&D?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,X=D&&j&&typeof j.get=="function"?j.get:null,te=D&&Set.prototype.forEach,re=typeof WeakMap=="function"&&WeakMap.prototype,he=re?WeakMap.prototype.has:null,oe=typeof WeakSet=="function"&&WeakSet.prototype,fe=oe?WeakSet.prototype.has:null,J=typeof WeakRef=="function"&&WeakRef.prototype,F=J?WeakRef.prototype.deref:null,ee=Boolean.prototype.valueOf,N=Object.prototype.toString,w=Function.prototype.toString,M=String.prototype.match,B=String.prototype.slice,Z=String.prototype.replace,ae=String.prototype.toUpperCase,H=String.prototype.toLowerCase,le=RegExp.prototype.test,z=Array.prototype.concat,q=Array.prototype.join,pe=Array.prototype.slice,xe=Math.floor,Q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ye=Object.getOwnPropertySymbols,ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je||"symbol")?Symbol.toStringTag:null,Ue=Object.prototype.propertyIsEnumerable,vt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(se){return se.__proto__}:null);function pt(se,we){if(se===1/0||se===-1/0||se!==se||se&&se>-1e3&&se<1e3||le.call(/e/,we))return we;var Ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof se=="number"){var nt=se<0?-xe(-se):xe(se);if(nt!==se){var ht=String(nt),ct=B.call(we,ht.length+1);return Z.call(ht,Ve,"$&_")+"."+Z.call(Z.call(ct,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Z.call(we,Ve,"$&_")}var ut=c(65710),er=ut.custom,gt=tr(er)?er:null;S.exports=function se(we,Ve,nt,ht){var ct=Ve||{};if(et(ct,"quoteStyle")&&ct.quoteStyle!=="single"&&ct.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(et(ct,"maxStringLength")&&(typeof ct.maxStringLength=="number"?ct.maxStringLength<0&&ct.maxStringLength!==1/0:ct.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Qt=et(ct,"customInspect")?ct.customInspect:!0;if(typeof Qt!="boolean"&&Qt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(et(ct,"indent")&&ct.indent!==null&&ct.indent!==" "&&!(parseInt(ct.indent,10)===ct.indent&&ct.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(et(ct,"numericSeparator")&&typeof ct.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Gr=ct.numericSeparator;if(typeof we>"u")return"undefined";if(we===null)return"null";if(typeof we=="boolean")return we?"true":"false";if(typeof we=="string")return jn(we,ct);if(typeof we=="number"){if(we===0)return 1/0/we>0?"0":"-0";var Ft=String(we);return Gr?pt(we,Ft):Ft}if(typeof we=="bigint"){var dr=String(we)+"n";return Gr?pt(we,dr):dr}var vi=typeof ct.depth>"u"?5:ct.depth;if(typeof nt>"u"&&(nt=0),nt>=vi&&vi>0&&typeof we=="object")return He(we)?"[Array]":"[Object]";var Nr=ft(ct,nt);if(typeof ht>"u")ht=[];else if(_r(ht,we)>=0)return"[Circular]";function Rr(Qr,pr,ai){if(pr&&(ht=pe.call(ht),ht.push(pr)),ai){var An={depth:ct.depth};return et(ct,"quoteStyle")&&(An.quoteStyle=ct.quoteStyle),se(Qr,An,nt+1,ht)}return se(Qr,ct,nt+1,ht)}if(typeof we=="function"&&!Be(we)){var gi=jt(we),$r=mt(we,Rr);return"[Function"+(gi?": "+gi:" (anonymous)")+"]"+($r.length>0?" { "+q.call($r,", ")+" }":"")}if(tr(we)){var ni=je?Z.call(String(we),/^(Symbol\(.*\))_[^)]*$/,"$1"):ie.call(we);return typeof we=="object"&&!je?Mr(ni):ni}if(ri(we)){for(var ii="<"+H.call(String(we.nodeName)),Dr=we.attributes||[],mi=0;mi<Dr.length;mi++)ii+=" "+Dr[mi].name+"="+Rt(st(Dr[mi].value),"double",ct);return ii+=">",we.childNodes&&we.childNodes.length&&(ii+="..."),ii+="</"+H.call(String(we.nodeName))+">",ii}if(He(we)){if(we.length===0)return"[]";var Wn=mt(we,Rr);return Nr&&!St(Wn)?"["+tt(Wn,Nr)+"]":"[ "+q.call(Wn,", ")+" ]"}if(lt(we)){var Ii=mt(we,Rr);return!("cause"in Error.prototype)&&"cause"in we&&!Ue.call(we,"cause")?"{ ["+String(we)+"] "+q.call(z.call("[cause]: "+Rr(we.cause),Ii),", ")+" }":Ii.length===0?"["+String(we)+"]":"{ ["+String(we)+"] "+q.call(Ii,", ")+" }"}if(typeof we=="object"&&Qt){if(gt&&typeof we[gt]=="function"&&ut)return ut(we,{depth:vi-nt});if(Qt!=="symbol"&&typeof we.inspect=="function")return we.inspect()}if(zt(we)){var Ta=[];return L&&L.call(we,function(Qr,pr){Ta.push(Rr(pr,we,!0)+" => "+Rr(Qr,we))}),Gt("Map",k.call(we),Ta,Nr)}if(nn(we)){var hn=[];return te&&te.call(we,function(Qr){hn.push(Rr(Qr,we))}),Gt("Set",X.call(we),hn,Nr)}if(Bn(we))return zr("WeakMap");if(Cn(we))return zr("WeakSet");if(Vn(we))return zr("WeakRef");if(rt(we))return Mr(Rr(Number(we)));if(or(we))return Mr(Rr(Q.call(we)));if(Pt(we))return Mr(ee.call(we));if(_t(we))return Mr(Rr(String(we)));if(!Re(we)&&!Be(we)){var Jr=mt(we,Rr),vn=vt?vt(we)===Object.prototype:we instanceof Object||we.constructor===Object,on=we instanceof Object?"":"null prototype",sn=!vn&&ze&&Object(we)===we&&ze in we?B.call(Et(we),8,-1):on?"Object":"",fo=vn||typeof we.constructor!="function"?"":we.constructor.name?we.constructor.name+" ":"",Hn=fo+(sn||on?"["+q.call(z.call([],sn||[],on||[]),": ")+"] ":"");return Jr.length===0?Hn+"{}":Nr?Hn+"{"+tt(Jr,Nr)+"}":Hn+"{ "+q.call(Jr,", ")+" }"}return String(we)};function Rt(se,we,Ve){var nt=(Ve.quoteStyle||we)==="double"?'"':"'";return nt+se+nt}function st(se){return Z.call(String(se),/"/g,""")}function He(se){return Et(se)==="[object Array]"&&(!ze||!(typeof se=="object"&&ze in se))}function Re(se){return Et(se)==="[object Date]"&&(!ze||!(typeof se=="object"&&ze in se))}function Be(se){return Et(se)==="[object RegExp]"&&(!ze||!(typeof se=="object"&&ze in se))}function lt(se){return Et(se)==="[object Error]"&&(!ze||!(typeof se=="object"&&ze in se))}function _t(se){return Et(se)==="[object String]"&&(!ze||!(typeof se=="object"&&ze in se))}function rt(se){return Et(se)==="[object Number]"&&(!ze||!(typeof se=="object"&&ze in se))}function Pt(se){return Et(se)==="[object Boolean]"&&(!ze||!(typeof se=="object"&&ze in se))}function tr(se){if(je)return se&&typeof se=="object"&&se instanceof Symbol;if(typeof se=="symbol")return!0;if(!se||typeof se!="object"||!ie)return!1;try{return ie.call(se),!0}catch{}return!1}function or(se){if(!se||typeof se!="object"||!Q)return!1;try{return Q.call(se),!0}catch{}return!1}var kr=Object.prototype.hasOwnProperty||function(se){return se in this};function et(se,we){return kr.call(se,we)}function Et(se){return N.call(se)}function jt(se){if(se.name)return se.name;var we=M.call(w.call(se),/^function\s*([\w$]+)/);return we?we[1]:null}function _r(se,we){if(se.indexOf)return se.indexOf(we);for(var Ve=0,nt=se.length;Ve<nt;Ve++)if(se[Ve]===we)return Ve;return-1}function zt(se){if(!k||!se||typeof se!="object")return!1;try{k.call(se);try{X.call(se)}catch{return!0}return se instanceof Map}catch{}return!1}function Bn(se){if(!he||!se||typeof se!="object")return!1;try{he.call(se,he);try{fe.call(se,fe)}catch{return!0}return se instanceof WeakMap}catch{}return!1}function Vn(se){if(!F||!se||typeof se!="object")return!1;try{return F.call(se),!0}catch{}return!1}function nn(se){if(!X||!se||typeof se!="object")return!1;try{X.call(se);try{k.call(se)}catch{return!0}return se instanceof Set}catch{}return!1}function Cn(se){if(!fe||!se||typeof se!="object")return!1;try{fe.call(se,fe);try{he.call(se,he)}catch{return!0}return se instanceof WeakSet}catch{}return!1}function ri(se){return!se||typeof se!="object"?!1:typeof HTMLElement<"u"&&se instanceof HTMLElement?!0:typeof se.nodeName=="string"&&typeof se.getAttribute=="function"}function jn(se,we){if(se.length>we.maxStringLength){var Ve=se.length-we.maxStringLength,nt="... "+Ve+" more character"+(Ve>1?"s":"");return jn(B.call(se,0,we.maxStringLength),we)+nt}var ht=Z.call(Z.call(se,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,an);return Rt(ht,"single",we)}function an(se){var we=se.charCodeAt(0),Ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[we];return Ve?"\\"+Ve:"\\x"+(we<16?"0":"")+ae.call(we.toString(16))}function Mr(se){return"Object("+se+")"}function zr(se){return se+" { ? }"}function Gt(se,we,Ve,nt){var ht=nt?tt(Ve,nt):q.call(Ve,", ");return se+" ("+we+") {"+ht+"}"}function St(se){for(var we=0;we<se.length;we++)if(_r(se[we],`
|
|
496
|
+
`)>=0)return!1;return!0}function ft(se,we){var Ve;if(se.indent===" ")Ve=" ";else if(typeof se.indent=="number"&&se.indent>0)Ve=q.call(Array(se.indent+1)," ");else return null;return{base:Ve,prev:q.call(Array(we+1),Ve)}}function tt(se,we){if(se.length===0)return"";var Ve=`
|
|
497
|
+
`+we.prev+we.base;return Ve+q.call(se,","+Ve)+`
|
|
498
|
+
`+we.prev}function mt(se,we){var Ve=He(se),nt=[];if(Ve){nt.length=se.length;for(var ht=0;ht<se.length;ht++)nt[ht]=et(se,ht)?we(se[ht],se):""}var ct=typeof ye=="function"?ye(se):[],Qt;if(je){Qt={};for(var Gr=0;Gr<ct.length;Gr++)Qt["$"+ct[Gr]]=ct[Gr]}for(var Ft in se)et(se,Ft)&&(Ve&&String(Number(Ft))===Ft&&Ft<se.length||je&&Qt["$"+Ft]instanceof Symbol||(le.call(/[^\w$]/,Ft)?nt.push(we(Ft,se)+": "+we(se[Ft],se)):nt.push(Ft+": "+we(se[Ft],se))));if(typeof ye=="function")for(var dr=0;dr<ct.length;dr++)Ue.call(se,ct[dr])&&nt.push("["+we(ct[dr])+"]: "+we(se[ct[dr]],se));return nt}},83949:S=>{"use strict";var R=String.prototype.replace,c=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"};S.exports={default:m.RFC3986,formatters:{RFC1738:function(O){return R.call(O,c,"+")},RFC3986:function(O){return String(O)}},RFC1738:m.RFC1738,RFC3986:m.RFC3986}},67905:(S,R,c)=>{"use strict";var m=c(85095),O=c(95990),k=c(83949);S.exports={formats:k,parse:O,stringify:m}},95990:(S,R,c)=>{"use strict";var m=c(37748),O=Object.prototype.hasOwnProperty,k=Array.isArray,L={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:m.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},D=function(J){return J.replace(/&#(\d+);/g,function(F,ee){return String.fromCharCode(parseInt(ee,10))})},j=function(J,F){return J&&typeof J=="string"&&F.comma&&J.indexOf(",")>-1?J.split(","):J},X="utf8=%26%2310003%3B",te="utf8=%E2%9C%93",re=function(F,ee){var N={__proto__:null},w=ee.ignoreQueryPrefix?F.replace(/^\?/,""):F,M=ee.parameterLimit===1/0?void 0:ee.parameterLimit,B=w.split(ee.delimiter,M),Z=-1,ae,H=ee.charset;if(ee.charsetSentinel)for(ae=0;ae<B.length;++ae)B[ae].indexOf("utf8=")===0&&(B[ae]===te?H="utf-8":B[ae]===X&&(H="iso-8859-1"),Z=ae,ae=B.length);for(ae=0;ae<B.length;++ae)if(ae!==Z){var le=B[ae],z=le.indexOf("]="),q=z===-1?le.indexOf("="):z+1,pe,xe;q===-1?(pe=ee.decoder(le,L.decoder,H,"key"),xe=ee.strictNullHandling?null:""):(pe=ee.decoder(le.slice(0,q),L.decoder,H,"key"),xe=m.maybeMap(j(le.slice(q+1),ee),function(Q){return ee.decoder(Q,L.decoder,H,"value")})),xe&&ee.interpretNumericEntities&&H==="iso-8859-1"&&(xe=D(xe)),le.indexOf("[]=")>-1&&(xe=k(xe)?[xe]:xe),O.call(N,pe)?N[pe]=m.combine(N[pe],xe):N[pe]=xe}return N},he=function(J,F,ee,N){for(var w=N?F:j(F,ee),M=J.length-1;M>=0;--M){var B,Z=J[M];if(Z==="[]"&&ee.parseArrays)B=[].concat(w);else{B=ee.plainObjects?Object.create(null):{};var ae=Z.charAt(0)==="["&&Z.charAt(Z.length-1)==="]"?Z.slice(1,-1):Z,H=parseInt(ae,10);!ee.parseArrays&&ae===""?B={0:w}:!isNaN(H)&&Z!==ae&&String(H)===ae&&H>=0&&ee.parseArrays&&H<=ee.arrayLimit?(B=[],B[H]=w):ae!=="__proto__"&&(B[ae]=w)}w=B}return w},oe=function(F,ee,N,w){if(F){var M=N.allowDots?F.replace(/\.([^.[]+)/g,"[$1]"):F,B=/(\[[^[\]]*])/,Z=/(\[[^[\]]*])/g,ae=N.depth>0&&B.exec(M),H=ae?M.slice(0,ae.index):M,le=[];if(H){if(!N.plainObjects&&O.call(Object.prototype,H)&&!N.allowPrototypes)return;le.push(H)}for(var z=0;N.depth>0&&(ae=Z.exec(M))!==null&&z<N.depth;){if(z+=1,!N.plainObjects&&O.call(Object.prototype,ae[1].slice(1,-1))&&!N.allowPrototypes)return;le.push(ae[1])}return ae&&le.push("["+M.slice(ae.index)+"]"),he(le,ee,N,w)}},fe=function(F){if(!F)return L;if(F.decoder!==null&&F.decoder!==void 0&&typeof F.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof F.charset<"u"&&F.charset!=="utf-8"&&F.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var ee=typeof F.charset>"u"?L.charset:F.charset;return{allowDots:typeof F.allowDots>"u"?L.allowDots:!!F.allowDots,allowPrototypes:typeof F.allowPrototypes=="boolean"?F.allowPrototypes:L.allowPrototypes,allowSparse:typeof F.allowSparse=="boolean"?F.allowSparse:L.allowSparse,arrayLimit:typeof F.arrayLimit=="number"?F.arrayLimit:L.arrayLimit,charset:ee,charsetSentinel:typeof F.charsetSentinel=="boolean"?F.charsetSentinel:L.charsetSentinel,comma:typeof F.comma=="boolean"?F.comma:L.comma,decoder:typeof F.decoder=="function"?F.decoder:L.decoder,delimiter:typeof F.delimiter=="string"||m.isRegExp(F.delimiter)?F.delimiter:L.delimiter,depth:typeof F.depth=="number"||F.depth===!1?+F.depth:L.depth,ignoreQueryPrefix:F.ignoreQueryPrefix===!0,interpretNumericEntities:typeof F.interpretNumericEntities=="boolean"?F.interpretNumericEntities:L.interpretNumericEntities,parameterLimit:typeof F.parameterLimit=="number"?F.parameterLimit:L.parameterLimit,parseArrays:F.parseArrays!==!1,plainObjects:typeof F.plainObjects=="boolean"?F.plainObjects:L.plainObjects,strictNullHandling:typeof F.strictNullHandling=="boolean"?F.strictNullHandling:L.strictNullHandling}};S.exports=function(J,F){var ee=fe(F);if(J===""||J===null||typeof J>"u")return ee.plainObjects?Object.create(null):{};for(var N=typeof J=="string"?re(J,ee):J,w=ee.plainObjects?Object.create(null):{},M=Object.keys(N),B=0;B<M.length;++B){var Z=M[B],ae=oe(Z,N[Z],ee,typeof J=="string");w=m.merge(w,ae,ee)}return ee.allowSparse===!0?w:m.compact(w)}},85095:(S,R,c)=>{"use strict";var m=c(44852),O=c(37748),k=c(83949),L=Object.prototype.hasOwnProperty,D={brackets:function(w){return w+"[]"},comma:"comma",indices:function(w,M){return w+"["+M+"]"},repeat:function(w){return w}},j=Array.isArray,X=Array.prototype.push,te=function(N,w){X.apply(N,j(w)?w:[w])},re=Date.prototype.toISOString,he=k.default,oe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:O.encode,encodeValuesOnly:!1,format:he,formatter:k.formatters[he],indices:!1,serializeDate:function(w){return re.call(w)},skipNulls:!1,strictNullHandling:!1},fe=function(w){return typeof w=="string"||typeof w=="number"||typeof w=="boolean"||typeof w=="symbol"||typeof w=="bigint"},J={},F=function N(w,M,B,Z,ae,H,le,z,q,pe,xe,Q,ye,ie,je,ze){for(var Ue=w,vt=ze,pt=0,ut=!1;(vt=vt.get(J))!==void 0&&!ut;){var er=vt.get(w);if(pt+=1,typeof er<"u"){if(er===pt)throw new RangeError("Cyclic object value");ut=!0}typeof vt.get(J)>"u"&&(pt=0)}if(typeof z=="function"?Ue=z(M,Ue):Ue instanceof Date?Ue=xe(Ue):B==="comma"&&j(Ue)&&(Ue=O.maybeMap(Ue,function(tr){return tr instanceof Date?xe(tr):tr})),Ue===null){if(ae)return le&&!ie?le(M,oe.encoder,je,"key",Q):M;Ue=""}if(fe(Ue)||O.isBuffer(Ue)){if(le){var gt=ie?M:le(M,oe.encoder,je,"key",Q);return[ye(gt)+"="+ye(le(Ue,oe.encoder,je,"value",Q))]}return[ye(M)+"="+ye(String(Ue))]}var Rt=[];if(typeof Ue>"u")return Rt;var st;if(B==="comma"&&j(Ue))ie&&le&&(Ue=O.maybeMap(Ue,le)),st=[{value:Ue.length>0?Ue.join(",")||null:void 0}];else if(j(z))st=z;else{var He=Object.keys(Ue);st=q?He.sort(q):He}for(var Re=Z&&j(Ue)&&Ue.length===1?M+"[]":M,Be=0;Be<st.length;++Be){var lt=st[Be],_t=typeof lt=="object"&&typeof lt.value<"u"?lt.value:Ue[lt];if(!(H&&_t===null)){var rt=j(Ue)?typeof B=="function"?B(Re,lt):Re:Re+(pe?"."+lt:"["+lt+"]");ze.set(w,pt);var Pt=m();Pt.set(J,ze),te(Rt,N(_t,rt,B,Z,ae,H,B==="comma"&&ie&&j(Ue)?null:le,z,q,pe,xe,Q,ye,ie,je,Pt))}}return Rt},ee=function(w){if(!w)return oe;if(w.encoder!==null&&typeof w.encoder<"u"&&typeof w.encoder!="function")throw new TypeError("Encoder has to be a function.");var M=w.charset||oe.charset;if(typeof w.charset<"u"&&w.charset!=="utf-8"&&w.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var B=k.default;if(typeof w.format<"u"){if(!L.call(k.formatters,w.format))throw new TypeError("Unknown format option provided.");B=w.format}var Z=k.formatters[B],ae=oe.filter;return(typeof w.filter=="function"||j(w.filter))&&(ae=w.filter),{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:oe.addQueryPrefix,allowDots:typeof w.allowDots>"u"?oe.allowDots:!!w.allowDots,charset:M,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:oe.charsetSentinel,delimiter:typeof w.delimiter>"u"?oe.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:oe.encode,encoder:typeof w.encoder=="function"?w.encoder:oe.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:oe.encodeValuesOnly,filter:ae,format:B,formatter:Z,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:oe.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:oe.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:oe.strictNullHandling}};S.exports=function(N,w){var M=N,B=ee(w),Z,ae;typeof B.filter=="function"?(ae=B.filter,M=ae("",M)):j(B.filter)&&(ae=B.filter,Z=ae);var H=[];if(typeof M!="object"||M===null)return"";var le;w&&w.arrayFormat in D?le=w.arrayFormat:w&&"indices"in w?le=w.indices?"indices":"repeat":le="indices";var z=D[le];if(w&&"commaRoundTrip"in w&&typeof w.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var q=z==="comma"&&w&&w.commaRoundTrip;Z||(Z=Object.keys(M)),B.sort&&Z.sort(B.sort);for(var pe=m(),xe=0;xe<Z.length;++xe){var Q=Z[xe];B.skipNulls&&M[Q]===null||te(H,F(M[Q],Q,z,q,B.strictNullHandling,B.skipNulls,B.encode?B.encoder:null,B.filter,B.sort,B.allowDots,B.serializeDate,B.format,B.formatter,B.encodeValuesOnly,B.charset,pe))}var ye=H.join(B.delimiter),ie=B.addQueryPrefix===!0?"?":"";return B.charsetSentinel&&(B.charset==="iso-8859-1"?ie+="utf8=%26%2310003%3B&":ie+="utf8=%E2%9C%93&"),ye.length>0?ie+ye:""}},37748:(S,R,c)=>{"use strict";var m=c(83949),O=Object.prototype.hasOwnProperty,k=Array.isArray,L=function(){for(var N=[],w=0;w<256;++w)N.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return N}(),D=function(w){for(;w.length>1;){var M=w.pop(),B=M.obj[M.prop];if(k(B)){for(var Z=[],ae=0;ae<B.length;++ae)typeof B[ae]<"u"&&Z.push(B[ae]);M.obj[M.prop]=Z}}},j=function(w,M){for(var B=M&&M.plainObjects?Object.create(null):{},Z=0;Z<w.length;++Z)typeof w[Z]<"u"&&(B[Z]=w[Z]);return B},X=function N(w,M,B){if(!M)return w;if(typeof M!="object"){if(k(w))w.push(M);else if(w&&typeof w=="object")(B&&(B.plainObjects||B.allowPrototypes)||!O.call(Object.prototype,M))&&(w[M]=!0);else return[w,M];return w}if(!w||typeof w!="object")return[w].concat(M);var Z=w;return k(w)&&!k(M)&&(Z=j(w,B)),k(w)&&k(M)?(M.forEach(function(ae,H){if(O.call(w,H)){var le=w[H];le&&typeof le=="object"&&ae&&typeof ae=="object"?w[H]=N(le,ae,B):w.push(ae)}else w[H]=ae}),w):Object.keys(M).reduce(function(ae,H){var le=M[H];return O.call(ae,H)?ae[H]=N(ae[H],le,B):ae[H]=le,ae},Z)},te=function(w,M){return Object.keys(M).reduce(function(B,Z){return B[Z]=M[Z],B},w)},re=function(N,w,M){var B=N.replace(/\+/g," ");if(M==="iso-8859-1")return B.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(B)}catch{return B}},he=function(w,M,B,Z,ae){if(w.length===0)return w;var H=w;if(typeof w=="symbol"?H=Symbol.prototype.toString.call(w):typeof w!="string"&&(H=String(w)),B==="iso-8859-1")return escape(H).replace(/%u[0-9a-f]{4}/gi,function(pe){return"%26%23"+parseInt(pe.slice(2),16)+"%3B"});for(var le="",z=0;z<H.length;++z){var q=H.charCodeAt(z);if(q===45||q===46||q===95||q===126||q>=48&&q<=57||q>=65&&q<=90||q>=97&&q<=122||ae===m.RFC1738&&(q===40||q===41)){le+=H.charAt(z);continue}if(q<128){le=le+L[q];continue}if(q<2048){le=le+(L[192|q>>6]+L[128|q&63]);continue}if(q<55296||q>=57344){le=le+(L[224|q>>12]+L[128|q>>6&63]+L[128|q&63]);continue}z+=1,q=65536+((q&1023)<<10|H.charCodeAt(z)&1023),le+=L[240|q>>18]+L[128|q>>12&63]+L[128|q>>6&63]+L[128|q&63]}return le},oe=function(w){for(var M=[{obj:{o:w},prop:"o"}],B=[],Z=0;Z<M.length;++Z)for(var ae=M[Z],H=ae.obj[ae.prop],le=Object.keys(H),z=0;z<le.length;++z){var q=le[z],pe=H[q];typeof pe=="object"&&pe!==null&&B.indexOf(pe)===-1&&(M.push({obj:H,prop:q}),B.push(pe))}return D(M),w},fe=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},J=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},F=function(w,M){return[].concat(w,M)},ee=function(w,M){if(k(w)){for(var B=[],Z=0;Z<w.length;Z+=1)B.push(M(w[Z]));return B}return M(w)};S.exports={arrayToObject:j,assign:te,combine:F,compact:oe,decode:re,encode:he,isBuffer:J,isRegExp:fe,maybeMap:ee,merge:X}},99913:(S,R,c)=>{"use strict";var m;function O(){return O=Object.assign||function(fe){for(var J=1;J<arguments.length;J++){var F=arguments[J];for(var ee in F)Object.prototype.hasOwnProperty.call(F,ee)&&(fe[ee]=F[ee])}return fe},O.apply(this,arguments)}function k(fe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(F){return typeof F}:k=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(fe)}var L=function(){var fe=function(F,ee){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,w){N.__proto__=w}||function(N,w){for(var M in w)w.hasOwnProperty(M)&&(N[M]=w[M])},fe(F,ee)};return function(J,F){fe(J,F);function ee(){this.constructor=J}J.prototype=F===null?Object.create(F):(ee.prototype=F.prototype,new ee)}}();m={value:!0},m=R.fk=void 0;var D=c(29901),j=typeof navigator>"u"||c.g.PREVENT_CODEMIRROR_RENDER===!0,X;j||(X=c(46944));var te=function(){function fe(){}return fe.equals=function(J,F){var ee=this,N=Object.keys,w=k(J),M=k(F);return J&&F&&w==="object"&&w===M?N(J).length===N(F).length&&N(J).every(function(B){return ee.equals(J[B],F[B])}):J===F},fe}(),re=function(){function fe(J,F){this.editor=J,this.props=F}return fe.prototype.delegateCursor=function(J,F,ee){var N=this.editor.getDoc();ee&&this.editor.focus(),F?N.setCursor(J):N.setCursor(J,null,{scroll:!1})},fe.prototype.delegateScroll=function(J){this.editor.scrollTo(J.x,J.y)},fe.prototype.delegateSelection=function(J,F){var ee=this.editor.getDoc();ee.setSelections(J),F&&this.editor.focus()},fe.prototype.apply=function(J){J&&J.selection&&J.selection.ranges&&this.delegateSelection(J.selection.ranges,J.selection.focus||!1),J&&J.cursor&&this.delegateCursor(J.cursor,J.autoScroll||!1,this.editor.getOption("autofocus")||!1),J&&J.scroll&&this.delegateScroll(J.scroll)},fe.prototype.applyNext=function(J,F,ee){J&&J.selection&&J.selection.ranges&&F&&F.selection&&F.selection.ranges&&!te.equals(J.selection.ranges,F.selection.ranges)&&this.delegateSelection(F.selection.ranges,F.selection.focus||!1),J&&J.cursor&&F&&F.cursor&&!te.equals(J.cursor,F.cursor)&&this.delegateCursor(ee.cursor||F.cursor,F.autoScroll||!1,F.autoCursor||!1),J&&J.scroll&&F&&F.scroll&&!te.equals(J.scroll,F.scroll)&&this.delegateScroll(F.scroll)},fe.prototype.applyUserDefined=function(J,F){F&&F.cursor&&this.delegateCursor(F.cursor,J.autoScroll||!1,this.editor.getOption("autofocus")||!1)},fe.prototype.wire=function(J){var F=this;Object.keys(J||{}).filter(function(ee){return/^on/.test(ee)}).forEach(function(ee){switch(ee){case"onBlur":F.editor.on("blur",function(N,w){F.props.onBlur(F.editor,w)});break;case"onContextMenu":{F.editor.on("contextmenu",function(N,w){F.props.onContextMenu(F.editor,w)});break}case"onCopy":{F.editor.on("copy",function(N,w){F.props.onCopy(F.editor,w)});break}case"onCursor":F.editor.on("cursorActivity",function(N){F.props.onCursor(F.editor,F.editor.getDoc().getCursor())});break;case"onCursorActivity":F.editor.on("cursorActivity",function(N){F.props.onCursorActivity(F.editor)});break;case"onCut":{F.editor.on("cut",function(N,w){F.props.onCut(F.editor,w)});break}case"onDblClick":{F.editor.on("dblclick",function(N,w){F.props.onDblClick(F.editor,w)});break}case"onDragEnter":F.editor.on("dragenter",function(N,w){F.props.onDragEnter(F.editor,w)});break;case"onDragLeave":{F.editor.on("dragleave",function(N,w){F.props.onDragLeave(F.editor,w)});break}case"onDragOver":F.editor.on("dragover",function(N,w){F.props.onDragOver(F.editor,w)});break;case"onDragStart":{F.editor.on("dragstart",function(N,w){F.props.onDragStart(F.editor,w)});break}case"onDrop":F.editor.on("drop",function(N,w){F.props.onDrop(F.editor,w)});break;case"onFocus":F.editor.on("focus",function(N,w){F.props.onFocus(F.editor,w)});break;case"onGutterClick":F.editor.on("gutterClick",function(N,w,M,B){F.props.onGutterClick(F.editor,w,M,B)});break;case"onInputRead":F.editor.on("inputRead",function(N,w){F.props.onInputRead(F.editor,w)});break;case"onKeyDown":F.editor.on("keydown",function(N,w){F.props.onKeyDown(F.editor,w)});break;case"onKeyHandled":F.editor.on("keyHandled",function(N,w,M){F.props.onKeyHandled(F.editor,w,M)});break;case"onKeyPress":F.editor.on("keypress",function(N,w){F.props.onKeyPress(F.editor,w)});break;case"onKeyUp":F.editor.on("keyup",function(N,w){F.props.onKeyUp(F.editor,w)});break;case"onMouseDown":{F.editor.on("mousedown",function(N,w){F.props.onMouseDown(F.editor,w)});break}case"onPaste":{F.editor.on("paste",function(N,w){F.props.onPaste(F.editor,w)});break}case"onRenderLine":{F.editor.on("renderLine",function(N,w,M){F.props.onRenderLine(F.editor,w,M)});break}case"onScroll":F.editor.on("scroll",function(N){F.props.onScroll(F.editor,F.editor.getScrollInfo())});break;case"onSelection":F.editor.on("beforeSelectionChange",function(N,w){F.props.onSelection(F.editor,w)});break;case"onTouchStart":{F.editor.on("touchstart",function(N,w){F.props.onTouchStart(F.editor,w)});break}case"onUpdate":F.editor.on("update",function(N){F.props.onUpdate(F.editor)});break;case"onViewportChange":F.editor.on("viewportChange",function(N,w,M){F.props.onViewportChange(F.editor,w,M)});break}})},fe}(),he=function(fe){L(J,fe);function J(F){var ee=fe.call(this,F)||this;return j||(ee.applied=!1,ee.appliedNext=!1,ee.appliedUserDefined=!1,ee.deferred=null,ee.emulating=!1,ee.hydrated=!1,ee.initCb=function(){ee.props.editorDidConfigure&&ee.props.editorDidConfigure(ee.editor)},ee.mounted=!1),ee}return J.prototype.hydrate=function(F){var ee=this,N=F&&F.options?F.options:{},w=O({},X.defaults,this.editor.options,N),M=Object.keys(w).some(function(B){return ee.editor.getOption(B)!==w[B]});M&&Object.keys(w).forEach(function(B){N.hasOwnProperty(B)&&ee.editor.getOption(B)!==w[B]&&(ee.editor.setOption(B,w[B]),ee.mirror.setOption(B,w[B]))}),this.hydrated||(this.deferred?this.resolveChange(F.value):this.initChange(F.value||"")),this.hydrated=!0},J.prototype.initChange=function(F){this.emulating=!0;var ee=this.editor.getDoc(),N=ee.lastLine(),w=ee.getLine(ee.lastLine()).length;ee.replaceRange(F||"",{line:0,ch:0},{line:N,ch:w}),this.mirror.setValue(F),ee.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},J.prototype.resolveChange=function(F){this.emulating=!0;var ee=this.editor.getDoc();if(this.deferred.origin==="undo"?ee.undo():this.deferred.origin==="redo"?ee.redo():ee.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),F&&F!==ee.getValue()){var N=ee.getCursor();ee.setValue(F),ee.setCursor(N)}this.emulating=!1,this.deferred=null},J.prototype.mirrorChange=function(F){var ee=this.editor.getDoc();return F.origin==="undo"?(ee.setHistory(this.mirror.getHistory()),this.mirror.undo()):F.origin==="redo"?(ee.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(F.text,F.from,F.to,F.origin),this.mirror.getValue()},J.prototype.componentDidMount=function(){var F=this;j||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&X.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=X(this.ref,this.props.options),this.shared=new re(this.editor,this.props),this.mirror=X(function(){},this.props.options),this.editor.on("electricInput",function(){F.mirror.setHistory(F.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){F.mirror.setCursor(F.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(ee,N){if(!F.emulating){N.cancel(),F.deferred=N;var w=F.mirrorChange(F.deferred);F.props.onBeforeChange&&F.props.onBeforeChange(F.editor,F.deferred,w)}}),this.editor.on("change",function(ee,N){F.mounted&&F.props.onChange&&F.props.onChange(F.editor,N,F.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},J.prototype.componentDidUpdate=function(F){if(!j){var ee={cursor:null};this.props.value!==F.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(ee.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(F,this.props,ee),this.appliedNext=!0),this.shared.applyUserDefined(F,ee),this.appliedUserDefined=!0}},J.prototype.componentWillUnmount=function(){j||this.props.editorWillUnmount&&this.props.editorWillUnmount(X)},J.prototype.shouldComponentUpdate=function(F,ee){return!j},J.prototype.render=function(){var F=this;if(j)return null;var ee=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return D.createElement("div",{className:ee,ref:function(w){return F.ref=w}})},J}(D.Component);R.fk=he;var oe=function(fe){L(J,fe);function J(F){var ee=fe.call(this,F)||this;return j||(ee.applied=!1,ee.appliedUserDefined=!1,ee.continueChange=!1,ee.detached=!1,ee.hydrated=!1,ee.initCb=function(){ee.props.editorDidConfigure&&ee.props.editorDidConfigure(ee.editor)},ee.mounted=!1,ee.onBeforeChangeCb=function(){ee.continueChange=!0}),ee}return J.prototype.hydrate=function(F){var ee=this,N=F&&F.options?F.options:{},w=O({},X.defaults,this.editor.options,N),M=Object.keys(w).some(function(H){return ee.editor.getOption(H)!==w[H]});if(M&&Object.keys(w).forEach(function(H){N.hasOwnProperty(H)&&ee.editor.getOption(H)!==w[H]&&ee.editor.setOption(H,w[H])}),!this.hydrated){var B=this.editor.getDoc(),Z=B.lastLine(),ae=B.getLine(B.lastLine()).length;B.replaceRange(F.value||"",{line:0,ch:0},{line:Z,ch:ae})}this.hydrated=!0},J.prototype.componentDidMount=function(){var F=this;j||(this.detached=this.props.detach===!0,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&X.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=X(this.ref,this.props.options),this.shared=new re(this.editor,this.props),this.editor.on("beforeChange",function(ee,N){F.props.onBeforeChange&&F.props.onBeforeChange(F.editor,N,F.editor.getValue(),F.onBeforeChangeCb)}),this.editor.on("change",function(ee,N){!F.mounted||!F.props.onChange||(F.props.onBeforeChange?F.continueChange&&F.props.onChange(F.editor,N,F.editor.getValue()):F.props.onChange(F.editor,N,F.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},J.prototype.componentDidUpdate=function(F){if(this.detached&&this.props.detach===!1&&(this.detached=!1,F.editorDidAttach&&F.editorDidAttach(this.editor)),!this.detached&&this.props.detach===!0&&(this.detached=!0,F.editorDidDetach&&F.editorDidDetach(this.editor)),!(j||this.detached)){var ee={cursor:null};this.props.value!==F.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),!F.autoCursor&&F.autoCursor!==void 0&&(ee.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(F),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(F,ee),this.appliedUserDefined=!0)}},J.prototype.componentWillUnmount=function(){j||this.props.editorWillUnmount&&this.props.editorWillUnmount(X)},J.prototype.shouldComponentUpdate=function(F,ee){var N=!0;return j&&(N=!1),this.detached&&F.detach&&(N=!1),N},J.prototype.render=function(){var F=this;if(j)return null;var ee=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return D.createElement("div",{className:ee,ref:function(w){return F.ref=w}})},J}(D.Component);m=oe},44852:(S,R,c)=>{"use strict";var m=c(71013),O=c(2864),k=c(14927),L=m("%TypeError%"),D=m("%WeakMap%",!0),j=m("%Map%",!0),X=O("WeakMap.prototype.get",!0),te=O("WeakMap.prototype.set",!0),re=O("WeakMap.prototype.has",!0),he=O("Map.prototype.get",!0),oe=O("Map.prototype.set",!0),fe=O("Map.prototype.has",!0),J=function(w,M){for(var B=w,Z;(Z=B.next)!==null;B=Z)if(Z.key===M)return B.next=Z.next,Z.next=w.next,w.next=Z,Z},F=function(w,M){var B=J(w,M);return B&&B.value},ee=function(w,M,B){var Z=J(w,M);Z?Z.value=B:w.next={key:M,next:w.next,value:B}},N=function(w,M){return!!J(w,M)};S.exports=function(){var M,B,Z,ae={assert:function(H){if(!ae.has(H))throw new L("Side channel does not contain "+k(H))},get:function(H){if(D&&H&&(typeof H=="object"||typeof H=="function")){if(M)return X(M,H)}else if(j){if(B)return he(B,H)}else if(Z)return F(Z,H)},has:function(H){if(D&&H&&(typeof H=="object"||typeof H=="function")){if(M)return re(M,H)}else if(j){if(B)return fe(B,H)}else if(Z)return N(Z,H);return!1},set:function(H,le){D&&H&&(typeof H=="object"||typeof H=="function")?(M||(M=new D),te(M,H,le)):j?(B||(B=new j),oe(B,H,le)):(Z||(Z={key:{},next:null}),ee(Z,H,le))}};return ae}},83539:(S,R,c)=>{var m=c(26673),O=c(20788);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},17664:(S,R,c)=>{var m=c(26673),O=c(15218);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},6766:(S,R,c)=>{var m=c(26673),O=c(80766);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},49812:(S,R,c)=>{var m=c(26673),O=c(62459);O=O.__esModule?O.default:O,typeof O=="string"&&(O=[[S.id,O,""]]);var k={};k.insert="head",k.singleton=!1;var L=m(O,k);S.exports=O.locals||{}},56089:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="},17735:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="},96192:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"},71090:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="},46050:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="},65710:()=>{},93652:(S,R,c)=>{S.exports=c(24018)},10017:(S,R,c)=>{S.exports=c(27411)},34961:(S,R,c)=>{S.exports=c(79155)},86751:(S,R,c)=>{S.exports=c(13375)},12953:(S,R,c)=>{S.exports=c(95442)},11099:(S,R,c)=>{S.exports=c(55334)},86351:(S,R,c)=>{S.exports=c(48261)},70762:(S,R,c)=>{S.exports=c(92864)},10954:(S,R,c)=>{S.exports=c(27923)},55839:(S,R,c)=>{S.exports=c(89225)},23422:(S,R,c)=>{S.exports=c(95281)},47319:(S,R,c)=>{S.exports=c(55468)}}]);
|